kernelh-move-ptr_if-and-u64_to_user_ptr-to-util_macrosh.patch removed from -mm tree
The quilt patch titled
Subject: kernel.h: move PTR_IF() and u64_to_user_ptr() to util_macros.h
has been removed from the -mm tree. Its filename was
kernelh-move-ptr_if-and-u64_to_user_ptr-to-util_macrosh.patch
This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Andy Shevchenko <[email protected]>
Subject: kernel.h: move PTR_IF() and u64_to_user_ptr() to util_macros.h
Date: Mon, 24 Mar 2025 12:50:25 +0200
While the natural choice of PTR_IF() is kconfig.h, the latter is too broad to include C code and actually the macro was moved out from there in the past. But kernel.h is neither a good choice for that. Move it to util_macros.h. Do the same for u64_to_user_ptr().
While moving, add necessary documentation.
---
include/linux/kernel.h | 10 ----- include/linux/util_macros.h | 66 ++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 9 deletions(-)
include/linux/kernel.h renamed from include/linux/kernel.h~kernelh-move-ptr_if-and-u64_to_user_ptr-to-util_macrosh +1 -9
@@ -33,6 +33,7 @@#include <linux/sprintf.h> #include <linux/static_call_types.h> #include <linux/instruction_pointer.h> +#include <linux/util_macros.h> #include <linux/wordpart.h> #include <asm/byteorder.h>
@@ -41,15 +42,6 @@#define STACK_MAGIC 0xdeadbeef -#define PTR_IF (cond, ptr) ((cond) ? (ptr) : NULL) - -#define u64_to_user_ptr (x) ( \ -{ \ - typecheck(u64, (x)); \ - (void __user *)(uintptr_t)(x); \ -} \ -) -struct completion ;struct user ;
include/linux/util_macros.h renamed from include/linux/util_macros.h~kernelh-move-ptr_if-and-u64_to_user_ptr-to-util_macrosh +66 -0
72 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are
util_macrosh-make-the-header-more-resilient.patch