From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D356128851F for ; Thu, 19 Mar 2026 16:08:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773936502; cv=none; b=G+4J13jQNlcKNDhuuX4plw3zmIsDjBabEivUdblcbNnXTfOd/Wp6f04RohL6eIMChekCBoRZqUQZV1zbOZygD7uTVEt9vW1dOrw5MX/3Z0JDwXUE5K+mbEmsrFoHI83Dm1r1FCU1JEpoI9Ded7TAcytHJ8HgZCmZG6j3SDoyzZk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773936502; c=relaxed/simple; bh=duG+Y2ZTbf5eCd9D7fRhcOZPd+c1dKGVX1ALSc8g4q4=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=VM9x548quUKf7fbMOoXV4bU8RAJt0N0LlRlDTURQYdRQHHX5LIiDcRqAEmRcVHVk0K2HKc1HO2ctBDFo4P7+vpLtmapjjUF0y3Fy8rx57yHDI5ksLkwQGEv9r0gdvUYviFy6yepcEVD40YRTuuAzLX/4UfPIaTTBYQzzsb1yEPQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=MdSTJz67; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="MdSTJz67" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-4853466655dso13755935e9.3 for ; Thu, 19 Mar 2026 09:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1773936499; x=1774541299; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=I83H7LOQRTTShg4dUTvQZW36KKHx3Zyf+FuXAIrcoEk=; b=MdSTJz67UepkbBpfIdXrMqgAOaqNoLNPJ7t/F5d1VP8nrKzVV5VBi3kl4SbnG8n7dy X4ywrX8Xcrx0k9ZcTr1+SqaAqz/CgYz2Pd9B4E5q6LpW30OhTO5GMFrAXS/e2vuDTLKt wkvMw207xEwUYcpAUeaW/eMq8TBPQW7tHfpyKbvADL8LYkspWvwbThYW+E6jniNZDa7o bKHqGv7bWMPui6ObHNcz08ysv8dsnSsq0izkjQzFQatgpQgkqfsFHinNhlZLJGc9/GCs cG1kI82jYOufcUe22dpvAoec+oAjlEsldSj+2UZ4GakC6GoheTlii6Yq95OkbKFoSjCg u2aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773936499; x=1774541299; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=I83H7LOQRTTShg4dUTvQZW36KKHx3Zyf+FuXAIrcoEk=; b=M7NQWZ2W3JpyGXDiMYIJj4jct1FIih2o7pqbIozsPzx82DBL/SQgULv4AaHoTlKsGt 72zzqZn1cSY9D/RBnLVpS1clHsFvD+ycNkAKKkuZJiazUnxEA3/Sel+t6bQtn9oRAFEE +EJdI/pHFqnwPAVbMOfzfpkt0xej54CTdJ/jEQy1nsJ1JcX8CjJHfb6QDrAMgGrLBt+V HBU0pgypLNaSVSqNAwEWODQwYJyRv6oMlx3NRuDuMnXJDzihfhdU2T+9Y1wByrkIYwQ+ lhlflVR0mEUcTN9dGBuo12Sn4OOEdlHxSG3j1z9qK/3aDja2SF2D49w2HyhyeLhacuBh ZJYA== X-Gm-Message-State: AOJu0YyEECyag+AfE/101MJu90Id38mpW7G4vrp0gkHdffqGfKa4d2hg WIm1FiCW1JLZuaWWL6k2AOrzh0rx9Kvtey2KxjPcJ+9bQFFtBddJAs+yOwXOw7HJMQKqm7+nFcW hpMU8ZphdHiiGPg== X-Received: from wmdd10.prod.google.com ([2002:a05:600c:a20a:b0:485:29a1:bfbb]) (user=jackmanb job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:8183:b0:486:f634:ef1 with SMTP id 5b1f17b1804b1-486f634100dmr112320615e9.17.1773936498983; Thu, 19 Mar 2026 09:08:18 -0700 (PDT) Date: Thu, 19 Mar 2026 16:03:23 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAEsevGkC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIzMDY0NL3fS0AjMTXfNES3ODRAuDpESTVCWg2oKi1LTMCrA50bG1tQDBqVS 3VwAAAA== X-Change-Id: 20260319-gfp64-7a970a80ba4e X-Mailer: b4 0.14.3 Message-ID: <20260319-gfp64-v1-0-2c73b8d42b7f@google.com> Subject: [PATCH 0/5] mm: Switch gfp_t to unsigned long From: Brendan Jackman To: Andrew Morton , Michal Hocko , David Rientjes , Shakeel Butt , Vlastimil Babka , Suren Baghdasaryan , Brendan Jackman , Johannes Weiner , Zi Yan , Harry Yoo , Hao Li , Christoph Lameter , Roman Gushchin , Uladzislau Rezki Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org Content-Type: text/plain; charset="utf-8" As pointed out by Vlastimil in [0], my proposal for __GFP_UNMAPPED is probably not needed for 32-bit. This offers a way out of the GFP flag scarcity so in preparation for this, flip gfp_t to be 64-bit on 64-bit machines, while leaving it 32-bit on 32-bit machines. For mm-internal code that prints raw GFP flags as hex, this just updates the format specifier to %lx. Presumably developers have a reason for wanting to see the whole flags word as a number in the log. For printks outside of mm/, I assume they are only using %x because the authors didn't know about %pGg, so they are converted to the latter as prep patches. Stuff I've done to try and find issues with this: - Built x86 allmodconfig and arm64 defconfig. Hopefully the 0-day bot will alert me to the important builds I'm missing (I briefly tried to build s390 and sparc64 but ran into tooling issues and gave up). - Ran some selftests on a x86 VM. - Poked around at stuff that refers to ___GFP_LAST_BIT to see if anything looks wrong. - Ran this Coccinelle script to look for explicit casts to plain int: --- virtual report @r@ gfp_t x; position p; @@ ( (unsigned int)x@p | (int)x@p ) @script:python depends on report@ p << r.p; @@ msg = "WARNING: Explicit integer cast of gfp_t" coccilib.report.print_report(p[0], msg) --- Obviously this series doesn't "do anything" so maybe it doesn't make sense to merge it unless it goes in alongside __GFP_UNMAPPED, but it does seem to make sense to review it independently so I'm posting it as a separate series. [0] https://lore.kernel.org/all/6206d021-e6c2-4899-b426-cacd71ebd5ef@kernel.org/ To: Andrew Morton To: Michal Hocko To: David Rientjes To: Shakeel Butt To: Vlastimil Babka To: Suren Baghdasaryan To: Brendan Jackman To: Johannes Weiner To: Zi Yan To: Harry Yoo To: Hao Li To: Christoph Lameter To: Roman Gushchin To: Uladzislau Rezki Cc: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org Signed-off-by: Brendan Jackman --- Brendan Jackman (5): drm/managed: Use special gfp_t format specifier iwlegacy: 3945-mac: Use special gfp_t format specifier mm/kfence: Use special gfp_t format specifier net/rds: Use special gfp_t format specifier mm: Change gfp_t to unsigned long drivers/gpu/drm/drm_managed.c | 4 ++-- drivers/net/wireless/intel/iwlegacy/3945-mac.c | 4 ++-- include/linux/types.h | 2 +- lib/test_lockup.c | 2 +- mm/kfence/kfence_test.c | 2 +- mm/oom_kill.c | 2 +- mm/page_alloc.c | 5 ++++- mm/page_owner.c | 4 ++-- mm/slab_common.c | 2 +- mm/slub.c | 2 +- mm/vmalloc.c | 2 +- net/rds/tcp_recv.c | 2 +- 12 files changed, 18 insertions(+), 15 deletions(-) --- base-commit: 8a30aeb0d1b4e4aaf7f7bae72f20f2ae75385ccb change-id: 20260319-gfp64-7a970a80ba4e Best regards, -- Brendan Jackman