Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kernel.h: drop STACK_MAGIC macro

Patch series "Unload linux/kernel.h", v5.

kernel.h hosts declarations that can be placed better. This series
decouples kernel.h with some explicit and implicit dependencies; also,
moves tracing functionality to a new independent header.


This patch (of 6):

The macro was introduced in 1994, v1.0.4, for stacks protection. Since
that, people found better ways to protect stacks, and now the macro is
only used by i915 selftests. Move it to a local header and drop from the
kernel.h.

Link: https://lkml.kernel.org/r/20260116042510.241009-1-ynorov@nvidia.com
Link: https://lkml.kernel.org/r/20260116042510.241009-2-ynorov@nvidia.com
Signed-off-by: Yury Norov <ynorov@nvidia.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Reviewed-by: Aaron Tomlin <atomlin@atomlin.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Petr Pavlu <petr.pavlu@suse.com>
Cc: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Yury Norov and committed by
Andrew Morton
f2e0abdc e8d899d3

+3 -2
+1
drivers/gpu/drm/i915/gt/selftest_ring_submission.c
··· 3 3 * Copyright © 2020 Intel Corporation 4 4 */ 5 5 6 + #include "i915_selftest.h" 6 7 #include "intel_engine_pm.h" 7 8 #include "selftests/igt_flush_test.h" 8 9
+2
drivers/gpu/drm/i915/i915_selftest.h
··· 26 26 27 27 #include <linux/types.h> 28 28 29 + #define STACK_MAGIC 0xdeadbeef 30 + 29 31 struct pci_dev; 30 32 struct drm_i915_private; 31 33
-2
include/linux/kernel.h
··· 39 39 40 40 #include <uapi/linux/kernel.h> 41 41 42 - #define STACK_MAGIC 0xdeadbeef 43 - 44 42 struct completion; 45 43 struct user; 46 44