LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: rick.p.edgecombe@intel.com
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org,
linux-mm@kvack.org, mroos@linux.ee, mingo@redhat.com,
namit@vmware.com, luto@kernel.org, bp@alien8.de,
netdev@vger.kernel.org, dave.hansen@intel.com,
sparclinux@vger.kernel.org
Subject: Re: [PATCH v2] vmalloc: Fix issues with flush flag
Date: Wed, 22 May 2019 10:40:19 -0700 (PDT) [thread overview]
Message-ID: <20190522.104019.40493905027242516.davem@davemloft.net> (raw)
In-Reply-To: <339ef85d984f329aa66f29fa80781624e6e4aecc.camel@intel.com>
From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
Date: Tue, 21 May 2019 01:59:54 +0000
> On Mon, 2019-05-20 at 18:43 -0700, David Miller wrote:
>> From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
>> Date: Tue, 21 May 2019 01:20:33 +0000
>>
>> > Should it handle executing an unmapped page gracefully? Because
>> > this
>> > change is causing that to happen much earlier. If something was
>> > relying
>> > on a cached translation to execute something it could find the
>> > mapping
>> > disappear.
>>
>> Does this work by not mapping any kernel mappings at the beginning,
>> and then filling in the BPF mappings in response to faults?
> No, nothing too fancy. It just flushes the vm mapping immediatly in
> vfree for execute (and RO) mappings. The only thing that happens around
> allocation time is setting of a new flag to tell vmalloc to do the
> flush.
>
> The problem before was that the pages would be freed before the execute
> mapping was flushed. So then when the pages got recycled, random,
> sometimes coming from userspace, data would be mapped as executable in
> the kernel by the un-flushed tlb entries.
If I am to understand things correctly, there was a case where 'end'
could be smaller than 'start' when doing a range flush. That would
definitely kill some of the sparc64 TLB flush routines.
next prev parent reply other threads:[~2019-05-22 17:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-20 20:07 Rick Edgecombe
2019-05-20 21:25 ` Andy Lutomirski
2019-05-20 21:48 ` Edgecombe, Rick P
2019-05-20 21:36 ` Meelis Roos
2019-05-20 22:17 ` Edgecombe, Rick P
2019-05-20 22:48 ` David Miller
2019-05-21 0:20 ` Edgecombe, Rick P
2019-05-21 0:33 ` David Miller
2019-05-21 1:20 ` Edgecombe, Rick P
2019-05-21 1:43 ` David Miller
2019-05-21 1:59 ` Edgecombe, Rick P
2019-05-22 17:40 ` David Miller [this message]
2019-05-22 19:26 ` Edgecombe, Rick P
2019-05-22 22:40 ` Edgecombe, Rick P
2019-05-24 15:50 ` Edgecombe, Rick P
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=20190522.104019.40493905027242516.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=mroos@linux.ee \
--cc=namit@vmware.com \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rick.p.edgecombe@intel.com \
--cc=sparclinux@vger.kernel.org \
--subject='Re: [PATCH v2] vmalloc: Fix issues with flush flag' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).