[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALCETrX60P=kKBHHfCDBKUdtS71KAfoqXrTydT3J=GX1fxX8KQ@mail.gmail.com>
Date: Tue, 20 Sep 2016 23:39:23 -0700
From: Andy Lutomirski <luto@...capital.net>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: Dmitry Safonov <0x7f454c46@...il.com>,
Dmitry Safonov <dsafonov@...tuozzo.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>, X86 ML <x86@...nel.org>,
Oleg Nesterov <oleg@...hat.com>,
Steven Rostedt <rostedt@...dmis.org>,
Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [RFC 0/3] Put vdso in ramfs-like filesystem (vdsofs)
> On 09/20/16 18:07, H. Peter Anvin wrote:
> >
> >> - vvar is highly magical. IMO letting it get mapped with VM_MAYWRITE
> >> is asking for trouble, as anything that writes it will COW it, leading
> >> to strange malfunctions.
> >>
>
> The vvar page obviously needs to be mapped MAP_SHARED, and the
> underlying file needs to reject writes. A solution where this area
> doesn't end up MAP_SHARED is obviously defective.
Hmm, maybe. But it does certainly work now, and I'm not sure what we
gain by making it more file-like than needed. Using a non-null
vm_file removes tons of special cases, but giving it a real
address_space doesn't seem very useful to me.
>
> As far as keeping the user from doing really stupid things... they can
> map a RAM page over the vvar area and there is nothing the kernel really
> can do to keep them from doing something like that without doing things
> that are probably way worse than the disease. At least it will be
> obvious looking at the mapping file what is going on.
I don't want an overly clever debugger to poke the page. MAP_SHARED
might be sufficient.
Powered by blists - more mailing lists