Re: [PATCH 1/2] x86: math-emu: check __copy_from_user result

2019-10-02 Thread Kees Cook
On Wed, Oct 02, 2019 at 09:11:23AM +0200, Arnd Bergmann wrote: > On Wed, Oct 2, 2019 at 1:39 AM Kees Cook wrote: > > > > diff --git a/arch/x86/math-emu/reg_ld_str.c > > > b/arch/x86/math-emu/reg_ld_str.c > > > index f3779743d15e..fe6246ff9887 100644 > > > --- a/arch/x86/math-emu/reg_ld_str.c > >

Re: [PATCH 1/2] x86: math-emu: check __copy_from_user result

2019-10-02 Thread Arnd Bergmann
On Wed, Oct 2, 2019 at 1:39 AM Kees Cook wrote: > > diff --git a/arch/x86/math-emu/reg_ld_str.c b/arch/x86/math-emu/reg_ld_str.c > > index f3779743d15e..fe6246ff9887 100644 > > --- a/arch/x86/math-emu/reg_ld_str.c > > +++ b/arch/x86/math-emu/reg_ld_str.c > > @@ -85,7 +85,7 @@ int FPU_load_extende

Re: [PATCH 1/2] x86: math-emu: check __copy_from_user result

2019-10-01 Thread Kees Cook
On Tue, Oct 01, 2019 at 04:23:34PM +0200, Arnd Bergmann wrote: > The new __must_check annotation on __copy_from_user successfully > identified some code that has lacked the check since at least > linux-2.1.73: > > arch/x86/math-emu/reg_ld_str.c:88:2: error: ignoring return value of function > dec

[PATCH 1/2] x86: math-emu: check __copy_from_user result

2019-10-01 Thread Arnd Bergmann
The new __must_check annotation on __copy_from_user successfully identified some code that has lacked the check since at least linux-2.1.73: arch/x86/math-emu/reg_ld_str.c:88:2: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]