Re: [PATCH v3 1/4] kexec: simplify compat_sys_kexec_load

2021-05-19 Thread Arnd Bergmann
On Wed, May 19, 2021 at 12:45 AM Eric W. Biederman wrote: > Arnd Bergmann writes: > > On Tue, May 18, 2021 at 4:05 PM Arnd Bergmann wrote: > >> On Tue, May 18, 2021 at 3:41 PM Eric W. Biederman > >> wrote: > > I think something like the untested diff below is enough to get rid of >

Re: [PATCH v3 1/4] kexec: simplify compat_sys_kexec_load

2021-05-18 Thread Eric W. Biederman
Arnd Bergmann writes: > On Tue, May 18, 2021 at 4:05 PM Arnd Bergmann wrote: >> >> On Tue, May 18, 2021 at 3:41 PM Eric W. Biederman >> wrote: >> > >> > Arnd Bergmann writes: >> > >> > > From: Arnd Bergmann KEXEC_ARCH_DEFAULT >> > > >> > > The compat version of sys_kexec_load() uses

RE: [PATCH v3 1/4] kexec: simplify compat_sys_kexec_load

2021-05-18 Thread David Laight
From: Arnd Bergmann > Sent: 17 May 2021 21:34 > > The compat version of sys_kexec_load() uses compat_alloc_user_space to > convert the user-provided arguments into the native format. > > Move the conversion into the regular implementation with > an in_compat_syscall() check to simplify it and

Re: [PATCH v3 1/4] kexec: simplify compat_sys_kexec_load

2021-05-18 Thread Eric W. Biederman
Arnd Bergmann writes: > On Tue, May 18, 2021 at 4:05 PM Arnd Bergmann wrote: >> >> On Tue, May 18, 2021 at 3:41 PM Eric W. Biederman >> wrote: >> > >> > Arnd Bergmann writes: >> > >> > > From: Arnd Bergmann KEXEC_ARCH_DEFAULT >> > > >> > > The compat version of sys_kexec_load() uses

Re: [PATCH v3 1/4] kexec: simplify compat_sys_kexec_load

2021-05-18 Thread Arnd Bergmann
On Tue, May 18, 2021 at 4:05 PM Arnd Bergmann wrote: > > On Tue, May 18, 2021 at 3:41 PM Eric W. Biederman > wrote: > > > > Arnd Bergmann writes: > > > > > From: Arnd Bergmann KEXEC_ARCH_DEFAULT > > > > > > The compat version of sys_kexec_load() uses compat_alloc_user_space to > > > convert

Re: [PATCH v3 1/4] kexec: simplify compat_sys_kexec_load

2021-05-18 Thread Arnd Bergmann
On Tue, May 18, 2021 at 3:41 PM Eric W. Biederman wrote: > > Arnd Bergmann writes: > > > From: Arnd Bergmann KEXEC_ARCH_DEFAULT > > > > The compat version of sys_kexec_load() uses compat_alloc_user_space to > > convert the user-provided arguments into the native format. > > > > Move the

Re: [PATCH v3 1/4] kexec: simplify compat_sys_kexec_load

2021-05-18 Thread Eric W. Biederman
Arnd Bergmann writes: > From: Arnd Bergmann > > The compat version of sys_kexec_load() uses compat_alloc_user_space to > convert the user-provided arguments into the native format. > > Move the conversion into the regular implementation with > an in_compat_syscall() check to simplify it and

Re: [PATCH v3 1/4] kexec: simplify compat_sys_kexec_load

2021-05-18 Thread Arnd Bergmann
On Tue, May 18, 2021 at 8:38 AM Christoph Hellwig wrote: > > > + if (in_compat_syscall()) > > + return copy_user_compat_segment_list(image, nr_segments, > > segments); > > Annoying overly lone line here. Oops, I was sure I had fixed all of these when you pointed this out before.

Re: [PATCH v3 1/4] kexec: simplify compat_sys_kexec_load

2021-05-18 Thread Arnd Bergmann
On Tue, May 18, 2021 at 8:40 AM Christoph Hellwig wrote: > > On Mon, May 17, 2021 at 10:57:24PM -0500, Eric W. Biederman wrote: > > We open ourselves up to bugs whenever we lie to the type system. > > > > Skimming through the code it looks like it should be possible > > to not need the

Re: [PATCH v3 1/4] kexec: simplify compat_sys_kexec_load

2021-05-18 Thread Christoph Hellwig
On Mon, May 17, 2021 at 10:57:24PM -0500, Eric W. Biederman wrote: > We open ourselves up to bugs whenever we lie to the type system. > > Skimming through the code it looks like it should be possible > to not need the in_compat_syscall and the casts to the wrong > type by changing the order of

Re: [PATCH v3 1/4] kexec: simplify compat_sys_kexec_load

2021-05-18 Thread Christoph Hellwig
> + if (in_compat_syscall()) > + return copy_user_compat_segment_list(image, nr_segments, > segments); Annoying overly lone line here. Otherwise: Reviewed-by: Christoph Hellwig ___ kexec mailing list kexec@lists.infradead.org

Re: [PATCH v3 1/4] kexec: simplify compat_sys_kexec_load

2021-05-17 Thread Eric W. Biederman
Arnd Bergmann writes: > From: Arnd Bergmann > > The compat version of sys_kexec_load() uses compat_alloc_user_space to > convert the user-provided arguments into the native format. > > Move the conversion into the regular implementation with > an in_compat_syscall() check to simplify it and

[PATCH v3 1/4] kexec: simplify compat_sys_kexec_load

2021-05-17 Thread Arnd Bergmann
From: Arnd Bergmann The compat version of sys_kexec_load() uses compat_alloc_user_space to convert the user-provided arguments into the native format. Move the conversion into the regular implementation with an in_compat_syscall() check to simplify it and avoid the compat_alloc_user_space()