summaryrefslogtreecommitdiff
path: root/mm/usercopy.c
diff options
context:
space:
mode:
authorKees Cook <kees@kernel.org>2025-02-28 10:19:34 -0800
committerKees Cook <kees@kernel.org>2025-02-28 11:51:26 -0800
commit808aac63e2bdf9bae08485e072bf3d317a18acbf (patch)
tree1bcb7f88aa98d111c24cfbf3381ff7545d1bf458 /mm/usercopy.c
parenta64dcfb451e254085a7daee5fe51bf22959d52d3 (diff)
uaccess: Introduce ucopysize.h
The object size sanity checking macros that uaccess.h and uio.h use have been living in thread_info.h for historical reasons. Needing to use jump labels for these checks, however, introduces a header include loop under certain conditions. The dependencies for the object checking macros are very limited, but they are used by separate header files, so introduce a new header that can be used directly by uaccess.h and uio.h. As a result, this also means thread_info.h (which is rather large) and be removed from those headers. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202502281153.TG2XK5SI-lkp@intel.com/ Signed-off-by: Kees Cook <kees@kernel.org>
Diffstat (limited to 'mm/usercopy.c')
-rw-r--r--mm/usercopy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/usercopy.c b/mm/usercopy.c
index 83c164aba6e0..16d63bd010af 100644
--- a/mm/usercopy.c
+++ b/mm/usercopy.c
@@ -17,7 +17,7 @@
#include <linux/sched.h>
#include <linux/sched/task.h>
#include <linux/sched/task_stack.h>
-#include <linux/thread_info.h>
+#include <linux/ucopysize.h>
#include <linux/vmalloc.h>
#include <linux/atomic.h>
#include <linux/jump_label.h>