> 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.