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>] [day] [month] [year] [list]
Date:   Sun, 5 Mar 2017 14:40:04 +0530
From:   Suraj Choudhari <surajschoudhari@...il.com>
To:     linux-kernel@...r.kernel.org
Subject: Fwd: Query - Related to kernel changes for GFP_NOIO flag

Hi,

GFP_NOIO flag used for kmalloc is currently defined as -  '__GFP_RECLAIM'

#define GFP_NOIO        (__GFP_RECLAIM)

#define __GFP_RECLAIM ((__force
gfp_t)(___GFP_DIRECT_RECLAIM|___GFP_KSWAPD_RECLAIM


However, prior to 4.4 kernel, this flag was defined as __GFP_WAIT.
#define GFP_NOIO        (__GFP_WAIT)


Queries -
======
1]  Can any physical disk IO happen due to memory allocation done
using 'GFP_NOIO' ?

      The reason to ask is since the GFP_NOIO is now modified to use
__GFP_KSWAPD_RECLAIM,  so I am thinking that physical disk IO may
probably happen while swapping the stale pages to disk in kswapd.

2] If kernel code wants to use kmalloc() and wants to ensure there is
NO any physical/disk IO due to kmalloc,  shall the kernel code use
__GFP_DIRECT_RECLAIM instead of GFP_NOIO ?


Thanks,
Suraj

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ