lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51077555-5341-cf53-78bb-842d2e39d1ec@csgroup.eu>
Date:   Tue, 30 Aug 2022 15:06:21 +0000
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     Alexander Potapenko <glider@...gle.com>
CC:     Alexander Viro <viro@...iv.linux.org.uk>,
        Alexei Starovoitov <ast@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Andrey Konovalov <andreyknvl@...gle.com>,
        Andy Lutomirski <luto@...nel.org>,
        Arnd Bergmann <arnd@...db.de>, Borislav Petkov <bp@...en8.de>,
        Christoph Hellwig <hch@....de>,
        Christoph Lameter <cl@...ux.com>,
        David Rientjes <rientjes@...gle.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Eric Dumazet <edumazet@...gle.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        Ilya Leoshkevich <iii@...ux.ibm.com>,
        Ingo Molnar <mingo@...hat.com>, Jens Axboe <axboe@...nel.dk>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Kees Cook <keescook@...omium.org>,
        Marco Elver <elver@...gle.com>,
        Mark Rutland <mark.rutland@....com>,
        Matthew Wilcox <willy@...radead.org>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        Pekka Enberg <penberg@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Petr Mladek <pmladek@...e.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Vegard Nossum <vegard.nossum@...cle.com>,
        Vlastimil Babka <vbabka@...e.cz>,
        "kasan-dev@...glegroups.com" <kasan-dev@...glegroups.com>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v5 04/44] x86: asm: instrument usercopy in get_user() and
 put_user()



Le 26/08/2022 à 17:07, Alexander Potapenko a écrit :
> Use hooks from instrumented.h to notify bug detection tools about
> usercopy events in variations of get_user() and put_user().
> 
> Signed-off-by: Alexander Potapenko <glider@...gle.com>
> ---
> v5:
>   -- handle put_user(), make sure to not evaluate pointer/value twice
> 
> Link: https://linux-review.googlesource.com/id/Ia9f12bfe5832623250e20f1859fdf5cc485a2fce
> ---
>   arch/x86/include/asm/uaccess.h | 22 +++++++++++++++-------
>   1 file changed, 15 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
> index 913e593a3b45f..c1b8982899eca 100644
> --- a/arch/x86/include/asm/uaccess.h
> +++ b/arch/x86/include/asm/uaccess.h
> @@ -5,6 +5,7 @@
>    * User space memory access functions
>    */
>   #include <linux/compiler.h>
> +#include <linux/instrumented.h>
>   #include <linux/kasan-checks.h>
>   #include <linux/string.h>
>   #include <asm/asm.h>
> @@ -103,6 +104,7 @@ extern int __get_user_bad(void);
>   		     : "=a" (__ret_gu), "=r" (__val_gu),		\
>   			ASM_CALL_CONSTRAINT				\
>   		     : "0" (ptr), "i" (sizeof(*(ptr))));		\
> +	instrument_get_user(__val_gu);					\

Where is that instrument_get_user() defined ? I can't find it neither in 
v6.0-rc3 nor in linux-next.

>   	(x) = (__force __typeof__(*(ptr))) __val_gu;			\
>   	__builtin_expect(__ret_gu, 0);					\
>   })

Christophe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ