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>] [day] [month] [year] [list]
Message-ID: <1686633217-4397-1-git-send-email-quic_charante@quicinc.com>
Date:   Tue, 13 Jun 2023 10:43:37 +0530
From:   Charan Teja Kalla <quic_charante@...cinc.com>
To:     <akpm@...ux-foundation.org>, <yury.norov@...il.com>,
        <mingo@...nel.org>, <mgorman@...hsingularity.net>
CC:     <linux-kernel@...r.kernel.org>, <quic_pkondeti@...cinc.com>,
        "Charan Teja Kalla" <quic_charante@...cinc.com>
Subject: [PATCH] mm: fix gfp-translate for changes in gfp.h

The commit cb5a065b4ea9 ("headers/deps: mm: Split <linux/gfp_types.h>
out of <linux/gfp.h>") made all the gfp flags that the gfp-translate
script needed to move from gfp.h to gfp_types.h.  Made changes
accordingly in the gfp-translate scipt.

w/o this patch:
$./scripts/gfp-translate 0xc2cc0
Source: /local/mnt/workspace/linux_next/linux
Parsing: 0xc2cc0

with this patch:
Source: /local/mnt/workspace/linux_next/linux
Parsing: 0xc2cc0
 #define ___GFP_IO               0x40
 #define ___GFP_FS               0x80
 #define ___GFP_DIRECT_RECLAIM   0x400
 #define ___GFP_KSWAPD_RECLAIM   0x800
 #define ___GFP_NOWARN           0x2000
 #define ___GFP_COMP             0x40000
 #define ___GFP_NOMEMALLOC       0x80000

Fixes: cb5a065b4ea9 ("headers/deps: mm: Split <linux/gfp_types.h> out of <linux/gfp.h>")
Signed-off-by: Charan Teja Kalla <quic_charante@...cinc.com>
---
 scripts/gfp-translate | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/gfp-translate b/scripts/gfp-translate
index b2ce416..6c9aed1 100755
--- a/scripts/gfp-translate
+++ b/scripts/gfp-translate
@@ -63,11 +63,11 @@ fi
 
 # Extract GFP flags from the kernel source
 TMPFILE=`mktemp -t gfptranslate-XXXXXX` || exit 1
-grep -q ___GFP $SOURCE/include/linux/gfp.h
+grep -q ___GFP $SOURCE/include/linux/gfp_types.h
 if [ $? -eq 0 ]; then
-	grep "^#define ___GFP" $SOURCE/include/linux/gfp.h | sed -e 's/u$//' | grep -v GFP_BITS > $TMPFILE
+	grep "^#define ___GFP" $SOURCE/include/linux/gfp_types.h | sed -e 's/u$//' | grep -v GFP_BITS > $TMPFILE
 else
-	grep "^#define __GFP" $SOURCE/include/linux/gfp.h | sed -e 's/(__force gfp_t)//' | sed -e 's/u)/)/' | grep -v GFP_BITS | sed -e 's/)\//) \//' > $TMPFILE
+	grep "^#define __GFP" $SOURCE/include/linux/gfp_types.h | sed -e 's/(__force gfp_t)//' | sed -e 's/u)/)/' | grep -v GFP_BITS | sed -e 's/)\//) \//' > $TMPFILE
 fi
 
 # Parse the flags
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ