[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Stable-review] [RFC] mlock/stack guard interaction fixup



On Sun, 2010-08-22 at 15:26 +0100, Ben Hutchings wrote:
> On Sun, 2010-08-22 at 10:55 +0100, Ian Campbell wrote:
> [...]
> > In the meantime I notice you've committed the patches. Can we get them
> > queued up for stable backports at some point? I appreciate you might
> > want them to bake for a bit longer in 2.6.36-rc first.
> > 
> > Greg, we are talking about:
> > 0e8e50e20c837eeec8323bba7dcd25fe5479194c mm: make stack guard page logic use vm_prev pointer
> > 7798330ac8114c731cfab83e634c6ecedaa233d7 mm: make the mlock() stack guard page checks stricter
> > 297c5eee372478fc32fec5fe8eed711eedb13f3d mm: make the vma list be doubly linked
> [...]
> 
> Should these go into 2.6.32-21?  What exactly is the impact of not
> applying them?

It broke save/restore under Xen when using these kernels in dom0,
although I think it's just random chance that this was the particular
functionality which it affected in Xen's automated test since really it
breaks locking down buffers on the stack which the toolstack uses to
make hypercalls. The toolstack often copies stuff into special buffers
to lock them down but not in this case which may be why only
save/restore appears to have gotten broken.

I think we either need to add these 3 patches to the xen flavour or to
revert the relevant changesets from 2.6.32.19 and .20 (just for
flavour=xen). FWIW upstream xen.git has reverted to 2.6.32.18 for the
time being but I don't think we need to go that far.

I think I would err on the side of reverting for now. The relevant
changesets are:
        e4599a4a45259b9cfb0942d36f6f35f3dca1d893 mm: fix up some user-visible effects of the stack guard page
        058daedc8311ab42702dfe29d3ff16dff7e7eaf8 mm: fix page table unmap for stack guard page properly
        ab832422673d1774c4ce3941f2ac87743d73bded mm: fix missing page table unmap for stack guard page failure case
        7e281afe24330aeea86113ac241eabdac8ba2311 mm: keep a guard page below a grow-down stack segment

In principle this issue could affect non-Xen users of mlock (and perhaps
mprotect too) but I think in practice not many applications lock down
only parts of their stack.

Ian.
-- 
Ian Campbell

I'm having fun HITCHHIKING to CINCINNATI or FAR ROCKAWAY!!

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: