All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stas Sergeev <stsp@list.ru>
To: Andy Lutomirski <luto@kernel.org>, Nadav Amit <namit@vmware.com>
Cc: "x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Borislav Petkov <bp@alien8.de>, Rik van Riel <riel@redhat.com>,
	Dave Hansen <dave.hansen@intel.com>,
	Michal Hocko <mhocko@suse.com>,
	Sasha Levin <sasha.levin@oracle.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v3 1/4] x86/vm86/32: Switch to flush_tlb_mm_range() in mark_screen_rdonly()
Date: Fri, 28 Apr 2017 01:17:07 +0300	[thread overview]
Message-ID: <e7e41389-5234-6ce2-604c-c01a740b4718@list.ru> (raw)
In-Reply-To: <CALCETrUnuDkizRffWTCcNFCyxCd_LEtP58g_ysm+vuZJkvWLWQ@mail.gmail.com>

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(). :)

  parent reply	other threads:[~2017-04-27 22:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-22  7:01 [PATCH v3 0/4] x86/mm: Straightforward TLB flush fixes/cleanups Andy Lutomirski
2017-04-22  7:01 ` [PATCH v3 1/4] x86/vm86/32: Switch to flush_tlb_mm_range() in mark_screen_rdonly() Andy Lutomirski
2017-04-26  8:26   ` [tip:x86/mm] " tip-bot for Andy Lutomirski
2017-04-26 23:56   ` [PATCH v3 1/4] " Nadav Amit
2017-04-27  0:02     ` Nadav Amit
2017-04-27 16:08       ` Andy Lutomirski
2017-04-27 22:15         ` Stas Sergeev
2017-04-27 22:17         ` Stas Sergeev [this message]
2017-04-22  7:01 ` [PATCH v3 2/4] x86/mm: Remove flush_tlb() and flush_tlb_current_task() Andy Lutomirski
2017-04-26  8:27   ` [tip:x86/mm] " tip-bot for Andy Lutomirski
2017-04-22  7:01 ` [PATCH v3 3/4] x86/mm: Make flush_tlb_mm_range() more predictable Andy Lutomirski
2017-04-26  8:27   ` [tip:x86/mm] " tip-bot for Andy Lutomirski
2017-04-22  7:01 ` [PATCH v3 4/4] x86/mm: Fix flush_tlb_page() on Xen Andy Lutomirski
2017-04-26  8:28   ` [tip:x86/mm] " tip-bot for Andy Lutomirski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e7e41389-5234-6ce2-604c-c01a740b4718@list.ru \
    --to=stsp@list.ru \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mhocko@suse.com \
    --cc=namit@vmware.com \
    --cc=riel@redhat.com \
    --cc=sasha.levin@oracle.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.