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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e8d9d010-7fa1-da61-feeb-43f0a101a323@quicinc.com>
Date:   Thu, 2 Jun 2022 13:32:48 -0700
From:   Jeff Johnson <quic_jjohnson@...cinc.com>
To:     Duoming Zhou <duoming@....edu.cn>,
        <linux-wireless@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC:     <amitkarwar@...il.com>, <ganapathi017@...il.com>,
        <sharvari.harisangam@....com>, <huxinming820@...il.com>,
        <kvalo@...nel.org>, <davem@...emloft.net>, <edumazet@...gle.com>,
        <kuba@...nel.org>, <pabeni@...hat.com>, <netdev@...r.kernel.org>,
        <gregkh@...uxfoundation.org>, <johannes@...solutions.net>,
        <rafael@...nel.org>
Subject: Re: [PATCH v4 1/2] devcoredump: remove the useless gfp_t parameter in
 dev_coredumpv

On 6/2/2022 6:33 AM, Duoming Zhou wrote:
> The dev_coredumpv() could not be used in atomic context, because
> it calls kvasprintf_const() and kstrdup() with GFP_KERNEL parameter.
> The process is shown below:
> 
> dev_coredumpv(..., gfp_t gfp)
>    dev_coredumpm
>      dev_set_name
>        kobject_set_name_vargs
>          kvasprintf_const(GFP_KERNEL, ...); //may sleep
>            kstrdup(s, GFP_KERNEL); //may sleep
> 
> This patch removes gfp_t parameter of dev_coredumpv() and changes the
> gfp_t parameter of dev_coredumpm() to GFP_KERNEL in order to show
> dev_coredumpv() could not be used in atomic context.

shouldn't you remove the gfp parameter to dev_coredumpm() as well since 
it is actually within that function where dev_set_name() is called which 
cannot be done in atomic context?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ