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: <3ae24ccf-d7ce-cfb8-8363-e9eb647bbffe@suse.com>
Date:   Fri, 30 Nov 2018 15:13:04 +0100
From:   Juergen Gross <jgross@...e.com>
To:     Wen Yang <wen.yang99@....com.cn>, boris.ostrovsky@...cle.com,
        sstabellini@...nel.org
Cc:     xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org,
        zhong.weidong@....com.cn, Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH v3] pvcalls-front: Avoid __get_free_pages(GFP_KERNEL)
 under spinlock

On 30/11/2018 12:01, Wen Yang wrote:
> The problem is that we call this with a spin lock held.
> The call tree is:
> pvcalls_front_accept() holds bedata->socket_lock.
>     -> create_active()
>         -> __get_free_pages() uses GFP_KERNEL
> 
> The create_active() function is only called from pvcalls_front_accept()
> with a spin_lock held, The allocation is not allowed to sleep and
> GFP_KERNEL is not sufficient.
> 
> This issue was detected by using the Coccinelle software.
> 
> v2: Add a function doing the allocations which is called
>     outside the lock and passing the allocated data to
>     create_active().
> v3: Use the matching deallocators i.e., free_page()
>     and free_pages(), respectively.
> 
> Suggested-by: Juergen Gross <jgross@...e.com>
> Signed-off-by: Wen Yang <wen.yang99@....com.cn>
> CC: Julia Lawall <julia.lawall@...6.fr>
> CC: Boris Ostrovsky <boris.ostrovsky@...cle.com>
> CC: Juergen Gross <jgross@...e.com>
> CC: Stefano Stabellini <sstabellini@...nel.org>
> CC: xen-devel@...ts.xenproject.org
> CC: linux-kernel@...r.kernel.org
> ---

This patch is malformed. Please send it via an appropriate tool/mailer.

See e.g. Documentation/process/submitting-patches.rst or
Documentation/process/email-clients.rst in the Linux kernel source tree.


Juergen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ