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]
Message-ID: <ae8abbbe-108d-93bd-99d6-251e0d1f36ac@hpe.com>
Date:   Tue, 26 Mar 2019 14:58:45 -0700
From:   Mike Travis <mike.travis@....com>
To:     Yuri Norov <ynorov@...vell.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Yury Norov <yury.norov@...il.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Arnd Bergmann <arnd@...db.de>,
        Kees Cook <keescook@...omium.org>,
        Matthew Wilcox <willy@...radead.org>,
        Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Mike Travis <travis@....com>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 3/6] bitmap_parselist: rework input string parser



On 3/26/2019 2:09 PM, Yuri Norov wrote:
> + Mike Travis <travis@....com>
> + Thomas Gleixner <tglx@...utronix.de>
> 
> ----------------------------------------------------------------------
> On Tue, Mar 26, 2019 at 12:07:45AM +0300, Yury Norov wrote:
>>> The requirement for this rework is to keep the __bitmap_parselist()
>>> copy-less and single-pass but make it more readable and maintainable by
>>> splitting into logical parts and removing explicit nested cycles and
>>> opaque local variables.
>>>
>>> __bitmap_parselist() can parse userspace inputs and therefore we cannot
>>> use simple_strtoul() to parse numbers.
> 
>> So, all above depends to what memory we access kernel / user space.
>> Perhaps we can get copy of memory of a given size and then parse it in kernel space always?
> 
>> --
>> With Best Regards,
>> Andy Shevchenko
> 
> What I missed during rework is that we have only one caller of *parselist_userĀ  -
> it's write_irq_affinity() introduced by Mike Travis in kernel/irq/proc.c. It doesn't look
> like a hot path as it's file operations handler. If no objections from Mike or Thomas,

No objections from me as long as you can still change irq affinity using 
a cpulist instead of a cpumask.

Thanks,
Mike Travis


> I think it would make sense to copy_from_user() the userspace data at the beginning
> in sake of simplicity of __bitmap_parselist(), as you suggested above.
> 
> Yury
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ