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] [day] [month] [year] [list]
Date:   Thu, 20 Oct 2022 13:53:03 +0800
From:   youling 257 <youling257@...il.com>
To:     Marco Elver <elver@...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 Biggers <ebiggers@...nel.org>,
        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>,
        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>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        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,
        linux-mm@...ck.org, linux-arch@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 18/43] instrumented.h: add KMSAN support

without the revert, this include/linux/kmsan-checks.h patch no help.
busybox top, com.android.bluetooth cpu usage 12%.
my kernel config, config-6.1.0-rc1-android-x86_64+

CPU:  3.6% usr 12.1% sys  0.0% nic 84.1% idle  0.0% io  0.0% irq  0.0% sirq
Load average: 1.49 0.65 0.25 4/1336 4940
  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
 1381   926 1002     S    1265m 16.1   5 12.4 {droid.bluetooth}
com.android.bluetooth
  919     1 0        S<    187m  2.4   2  2.2 /system/bin/surfaceflinger
 2220   926 10327    S    1882m 24.0   7  1.1 com.baidu.input
 3163   926 10175    S    2153m 27.5   0  0.0 {rojekti.clipper}
fi.rojekti.clipper
 1250   926 1000     S<   2140m 27.3   0  0.0 system_server
 2548   926 10125    S    2078m 26.5   4  0.0 {chiztech.swapps}
com.schiztech.swapps
 2516   926 10217    S    2058m 26.3   2  0.0 {ogle.android.gm}
com.google.android.gm
 2925   926 10318    S    1876m 24.0   1  0.0 {onelli.juicessh}
com.sonelli.juicessh
  926     1 0        S    1780m 22.7   7  0.0 {main} zygote
 3374  3369 0        S    1541m 19.7   2  0.0 {main} com.topjohnwu.magisk:root
 3079   926 10021    S    1477m 18.9   0  0.0 {ndroid.systemui}
com.android.systemui

2022-10-20 5:36 GMT+08:00, Marco Elver <elver@...gle.com>:
> On Thu, Oct 20, 2022 at 04:07AM +0800, youling 257 wrote:
>> That is i did,i already test, remove "u64 __tmp…kmsan_unpoison_memory", no
>> help.
>> i only remove kmsan_copy_to_user, fix my issue.
>
> Ok - does only the below work (without the reverts)?
>
> diff --git a/include/linux/kmsan-checks.h b/include/linux/kmsan-checks.h
> index c4cae333deec..eb05caa8f523 100644
> --- a/include/linux/kmsan-checks.h
> +++ b/include/linux/kmsan-checks.h
> @@ -73,8 +73,8 @@ static inline void kmsan_unpoison_memory(const void
> *address, size_t size)
>  static inline void kmsan_check_memory(const void *address, size_t size)
>  {
>  }
> -static inline void kmsan_copy_to_user(void __user *to, const void *from,
> -				      size_t to_copy, size_t left)
> +static __always_inline void kmsan_copy_to_user(void __user *to, const void
> *from,
> +					       size_t to_copy, size_t left)
>  {
>  }
>
>
> ... because when you say only removing kmsan_copy_to_user() (from
> instrument_put_user()) works, it really doesn't make any sense. The only
> explanation would be if the compiler inlining is broken.
>

Download attachment "config-6.1.0-rc1-android-x86_64+" of type "application/octet-stream" (199909 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ