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: <397aa8b.4be56.181270327b5.Coremail.duoming@zju.edu.cn>
Date:   Fri, 3 Jun 2022 08:42:07 +0800 (GMT+08:00)
From:   duoming@....edu.cn
To:     "Jeff Johnson" <quic_jjohnson@...cinc.com>
Cc:     linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
        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

Hello,

On Thu, 2 Jun 2022 13:32:48 -0700 Jeff Johnson wrote:

> 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?

Thanks for your suggestion, I will remove the gfp_t parameter of dev_coredumpm() as well. 

Best regards,
Duoming Zhou

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ