Re: [PATCH 5/7] signal: Add unsafe_copy_siginfo_to_user()

2021-06-15 Thread Christophe Leroy
Le 15/06/2021 à 09:21, Christoph Hellwig a écrit : On Tue, Jun 15, 2021 at 09:03:42AM +0200, Christophe Leroy wrote: Le 15/06/2021 ?? 08:52, Christoph Hellwig a ??crit??: On Tue, Jun 15, 2021 at 06:41:01AM +, Christophe Leroy wrote: + unsafe_copy_to_user(__ucs_to, __ucs_from,

Re: [PATCH 5/7] signal: Add unsafe_copy_siginfo_to_user()

2021-06-15 Thread Christoph Hellwig
On Tue, Jun 15, 2021 at 09:03:42AM +0200, Christophe Leroy wrote: > > > Le 15/06/2021 ?? 08:52, Christoph Hellwig a ??crit??: > > On Tue, Jun 15, 2021 at 06:41:01AM +, Christophe Leroy wrote: > > > + unsafe_copy_to_user(__ucs_to, __ucs_from, \ > > > +

Re: [PATCH 5/7] signal: Add unsafe_copy_siginfo_to_user()

2021-06-15 Thread Christophe Leroy
Le 15/06/2021 à 08:52, Christoph Hellwig a écrit : On Tue, Jun 15, 2021 at 06:41:01AM +, Christophe Leroy wrote: + unsafe_copy_to_user(__ucs_to, __ucs_from, \ + sizeof(struct kernel_siginfo), label); \ + unsafe_clear_user(__

Re: [PATCH 5/7] signal: Add unsafe_copy_siginfo_to_user()

2021-06-14 Thread Christoph Hellwig
On Tue, Jun 15, 2021 at 06:41:01AM +, Christophe Leroy wrote: > + unsafe_copy_to_user(__ucs_to, __ucs_from, \ > + sizeof(struct kernel_siginfo), label); \ > + unsafe_clear_user(__ucs_expansion, SI_EXPANSION_SIZE, label); \ > +} while

[PATCH 5/7] signal: Add unsafe_copy_siginfo_to_user()

2021-06-14 Thread Christophe Leroy
In the same spirit as commit fb05121fd6a2 ("signal: Add unsafe_get_compat_sigset()"), implement an 'unsafe' version of copy_siginfo_to_user() in order to use it within user access blocks. For that, also add an 'unsafe' version of clear_user(). Signed-off-by: Christophe Leroy --- include/linux/s