Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1632407

Re: [PATCH v3 1/4] x86/vm86/32: Switch to flush_tlb_mm_range() in mark_screen_rdonly()

From Stas Sergeev <stsp@list.ru>
Newsgroups linux.kernel
Subject Re: [PATCH v3 1/4] x86/vm86/32: Switch to flush_tlb_mm_range() in mark_screen_rdonly()
Date 2017-04-28 00:20 +0200
Message-ID <tAZVv-6VL-7@gated-at.bofh.it> (permalink)
References <tyXl7-8cH-1@gated-at.bofh.it> <tyXl8-8cH-11@gated-at.bofh.it> <tAF0J-Ug-1@gated-at.bofh.it> <tAFap-1ct-3@gated-at.bofh.it> <tAU9s-2Zz-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


27.04.2017 19:08, Andy Lutomirski пишет:
> Those should probably be pgd_none(), not pgd_none_or_clear_bad().
>
> But this whole function is just garbage.  It mucks with page
> protections without even looking up the VMA.  What happens if the
> pages are file-backed?  How about chardevs?
>
> I'd like to delete it.  Stas, do you know if there's any code at all
> that uses VM86_SCREEN_BITMAP?  Some Googling didn't turn any up at
> all.
dosemu1 has this:
https://sourceforge.net/p/dosemu/code/ci/master/tree/src/env/video/video.c
Scroll down to line 255.
---

#if VIDEO_CHECK_DIRTY
if (!config_dualmon) {
vm86s.flags |= VM86_SCREEN_BITMAP;
}
#endif --- The check expands to "if 0": 
https://sourceforge.net/p/dosemu/code/ci/master/tree/src/include/video.h 
line 27: ---

#define VIDEO_CHECK_DIRTY 0 --- Plus, in video.c you can see the comment 
that basically says that this functionality was of no use (not sure what 
exactly they were saying though). dosemu2 has no traces of this code at 
all. So perfectly fine with me if you remove it. In fact, I've cleaned 
up dosemu2 from any fancy stuff of vm86(), so probably more cleanups are 
possible on kernel side. I even wanted to switch to vm86old() if not for 
the very nasty bug that vm86old() generates SIGTRAP when int3 is called 
in v86. If this is fixed (and its a 1-line fix), we can remove entire 
vm86(). :)

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v3 1/4] x86/vm86/32: Switch to flush_tlb_mm_range() in  mark_screen_rdonly() Nadav Amit <namit@vmware.com> - 2017-04-27 02:00 +0200
  Re: [PATCH v3 1/4] x86/vm86/32: Switch to flush_tlb_mm_range() in  mark_screen_rdonly() Nadav Amit <namit@vmware.com> - 2017-04-27 02:10 +0200
    Re: [PATCH v3 1/4] x86/vm86/32: Switch to flush_tlb_mm_range() in mark_screen_rdonly() Andy Lutomirski <luto@kernel.org> - 2017-04-27 18:10 +0200
      Re: [PATCH v3 1/4] x86/vm86/32: Switch to flush_tlb_mm_range() in  mark_screen_rdonly() Stas Sergeev <stsp@list.ru> - 2017-04-28 00:20 +0200
      Re: [PATCH v3 1/4] x86/vm86/32: Switch to flush_tlb_mm_range() in  mark_screen_rdonly() Stas Sergeev <stsp@list.ru> - 2017-04-28 00:20 +0200

csiph-web