Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-09-02 Thread Sven Schnelle
Linus Torvalds writes: > On Mon, 2 Sept 2024 at 13:49, Andrew Morton wrote: >> >> uprobe_clear_state() is a pretty simple low-level thing. Side-effects >> seem unlikely? > > I think uprobe_clear_state() should be removed from fork.c entirely, > made 'static', and then we'd have > > area

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-09-02 Thread Linus Torvalds
On Mon, 2 Sept 2024 at 13:49, Andrew Morton wrote: > > uprobe_clear_state() is a pretty simple low-level thing. Side-effects > seem unlikely? I think uprobe_clear_state() should be removed from fork.c entirely, made 'static', and then we'd have area->xol_mapping.close = uprobe_clear_sta

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-09-02 Thread Andrew Morton
On Mon, 02 Sep 2024 21:06:48 +0200 Sven Schnelle wrote: > So uprobe_clear_state() in the beginning free's the memory area > containing the vm_special_mapping data, but exit_mmap() uses this > address later via vma->vm_private_data (which was set in > _install_special_mapping(). > > The followin

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-09-02 Thread Sven Schnelle
Nathan Chancellor writes: > Hi Michael, > > On Mon, Aug 12, 2024 at 06:26:02PM +1000, Michael Ellerman wrote: >> Add an optional close() callback to struct vm_special_mapping. It will >> be used, by powerpc at least, to handle unmapping of the VDSO. >> >> Although support for unmapping the VDSO w

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-20 Thread Andrew Morton
On Tue, 20 Aug 2024 16:14:29 -0700 Linus Torvalds wrote: > Andrew - I think this is good, but there may be other issues lurking. > Do with it as you see fit, Hey you know me, I'll merge any old thing if I think it'll help nurture newbies.

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-20 Thread Linus Torvalds
On Tue, 20 Aug 2024 at 14:56, Rob Landley wrote: > > Tested-by: Rob Landley Ok, here's the patch with the fixes for problems that were pointed out, and with the beginnings of a commit message. I'm going to be traveling for the next ~10 days, and while I'll have my laptop and internet, I'm unlik

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-20 Thread Rob Landley
On 8/20/24 16:31, Linus Torvalds wrote: > On Tue, 20 Aug 2024 at 14:17, Rob Landley wrote: >> >> Hexagon also has &&vdso_page which I don't understand (but have a toolchain >> for >> somewhere to at least smoketest...) > > The '&&' is just a typo. It should obviously be just a single '&'. As > m

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-20 Thread Linus Torvalds
On Tue, 20 Aug 2024 at 14:17, Rob Landley wrote: > > Hexagon also has &&vdso_page which I don't understand (but have a toolchain > for > somewhere to at least smoketest...) The '&&' is just a typo. It should obviously be just a single '&'. As mentioned, the only testing that patch got was a x86-

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-20 Thread Rob Landley
On 8/20/24 10:31, Linus Torvalds wrote: > On Mon, 19 Aug 2024 at 23:26, Michael Ellerman wrote: >> >> Linus Torvalds writes: >> > +static struct vm_special_mapping vdso_mapping = { >> > + .name = "[vdso]", >> > + .pages = syscall_pages; >> ^ >>

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-20 Thread Linus Torvalds
On Mon, 19 Aug 2024 at 23:26, Michael Ellerman wrote: > > Linus Torvalds writes: > > +static struct vm_special_mapping vdso_mapping = { > > + .name = "[vdso]", > > + .pages = syscall_pages; > ^ > should be , Ack. Changed here lo

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-19 Thread Michael Ellerman
Linus Torvalds writes: > On Mon, 19 Aug 2024 at 13:15, Linus Torvalds > wrote: >> >> Ok, I did a quick hack-job to remove that disgusting >> install_special_mapping() legacy case. >> >> With this [..] > > I forgot to actually attach that "this". Here it is. For real, this time. > >

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-19 Thread Linus Torvalds
On Mon, 19 Aug 2024 at 18:05, Andrew Morton wrote: > > > > > I forgot to actually attach that "this". Here it is. For real, this time. > > Thanks. Do you think your one-liner remains desirable with this fix in > place? That patch actually removes the whole 'legacy_special_mapping_vmops' that my

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-19 Thread Andrew Morton
On Mon, 19 Aug 2024 13:16:32 -0700 Linus Torvalds wrote: > On Mon, 19 Aug 2024 at 13:15, Linus Torvalds > wrote: > > > > Ok, I did a quick hack-job to remove that disgusting > > install_special_mapping() legacy case. > > > > With this [..] > > I forgot to actually attach that "this". Here it i

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-19 Thread Linus Torvalds
On Mon, 19 Aug 2024 at 13:15, Linus Torvalds wrote: > > Ok, I did a quick hack-job to remove that disgusting > install_special_mapping() legacy case. > > With this [..] I forgot to actually attach that "this". Here it is. For real, this time. Linus arch/csky/kernel/vdso.c

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-19 Thread Linus Torvalds
On Mon, 19 Aug 2024 at 12:51, Nathan Chancellor wrote: > > Yes, that appears to fix it for me. I don't have much to say about the > rest but others might :) Ok, I did a quick hack-job to remove that disgusting install_special_mapping() legacy case. With this, the old "install_special_mapping()"

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-19 Thread Nathan Chancellor
On Mon, Aug 19, 2024 at 12:29:34PM -0700, Linus Torvalds wrote: > On Mon, 19 Aug 2024 at 11:53, Nathan Chancellor wrote: > > > > > > Modules linked in: > > Pid: 24, comm: mount Not tainted 6.11.0-rc4-next-20240819 > > RIP: 0033:0x68006f6c > > RSP: 6c8bfc68 EFLAGS: 00010206 > > RAX: 00

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-19 Thread Linus Torvalds
On Mon, 19 Aug 2024 at 11:53, Nathan Chancellor wrote: > > > Modules linked in: > Pid: 24, comm: mount Not tainted 6.11.0-rc4-next-20240819 > RIP: 0033:0x68006f6c > RSP: 6c8bfc68 EFLAGS: 00010206 > RAX: 68006f6c RBX: 68a0aa18 RCX: 600d8b09 > RDX: R

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-19 Thread Nathan Chancellor
Hi Michael, On Mon, Aug 12, 2024 at 06:26:02PM +1000, Michael Ellerman wrote: > Add an optional close() callback to struct vm_special_mapping. It will > be used, by powerpc at least, to handle unmapping of the VDSO. > > Although support for unmapping the VDSO was initially added > for CRIU[1], it