From: "Christophe Leroy (CS GROUP)" <chleroy@kernel.org>
To: "Yury Norov (NVIDIA)" <yury.norov@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Randy Dunlap <rdunlap@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
Jani Nikula <jani.nikula@linux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Tvrtko Ursulin <tursulin@ursulin.net>,
Petr Pavlu <petr.pavlu@suse.com>,
Daniel Gomez <da.gomez@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Danilo Krummrich <dakr@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, linux-modules@vger.kernel.org,
linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] kernel.h: drop STACK_MAGIC macro
Date: Mon, 1 Dec 2025 10:38:01 +0100 [thread overview]
Message-ID: <3e7ddbea-978f-44f7-abdd-7319908fd83c@kernel.org> (raw)
In-Reply-To: <20251129195304.204082-2-yury.norov@gmail.com>
Le 29/11/2025 à 20:53, Yury Norov (NVIDIA) a écrit :
> The macro is only used by i915. Move it to a local header and drop from
> the kernel.h.
At the begining of the git history we have:
$ git grep STACK_MAGIC 1da177e4c3f41
1da177e4c3f41:arch/h8300/kernel/traps.c: if (STACK_MAGIC !=
*(unsigned long *)((unsigned long)current+PAGE_SIZE))
1da177e4c3f41:arch/m68k/mac/macints.c: if (STACK_MAGIC !=
*(unsigned long *)current->kernel_stack_page)
1da177e4c3f41:include/linux/kernel.h:#define STACK_MAGIC 0xdeadbeef
Would be good to know the history of its usage over time.
I see:
- Removed from m68k by 3cd53b14e7c4 ("m68k/mac: Improve NMI handler")
- Removed from h8300 by 1c4b5ecb7ea1 ("remove the h8300 architecture")
- Started being used in i915 selftest by 250f8c8140ac ("drm/i915/gtt:
Read-only pages for insert_entries on bdw+")
Christophe
>
> Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
> ---
> drivers/gpu/drm/i915/i915_utils.h | 2 ++
> include/linux/kernel.h | 2 --
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_utils.h b/drivers/gpu/drm/i915/i915_utils.h
> index a0c892e4c40d..6c197e968305 100644
> --- a/drivers/gpu/drm/i915/i915_utils.h
> +++ b/drivers/gpu/drm/i915/i915_utils.h
> @@ -32,6 +32,8 @@
> #include <linux/workqueue.h>
> #include <linux/sched/clock.h>
>
> +#define STACK_MAGIC 0xdeadbeef
> +
> #ifdef CONFIG_X86
> #include <asm/hypervisor.h>
> #endif
> diff --git a/include/linux/kernel.h b/include/linux/kernel.h
> index 5b46924fdff5..61d63c57bc2d 100644
> --- a/include/linux/kernel.h
> +++ b/include/linux/kernel.h
> @@ -40,8 +40,6 @@
>
> #include <uapi/linux/kernel.h>
>
> -#define STACK_MAGIC 0xdeadbeef
> -
> struct completion;
> struct user;
>
next prev parent reply other threads:[~2025-12-01 9:38 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-29 19:52 [PATCH 0/3] Unload linux/kernel.h Yury Norov (NVIDIA)
2025-11-29 19:53 ` [PATCH 1/3] kernel.h: drop STACK_MAGIC macro Yury Norov (NVIDIA)
2025-11-29 20:32 ` Andy Shevchenko
2025-11-29 23:40 ` Randy Dunlap
2025-12-01 7:46 ` Jani Nikula
2025-12-02 20:58 ` Andi Shyti
2025-12-02 21:18 ` Yury Norov
2025-12-03 7:40 ` Jani Nikula
2025-12-01 9:38 ` Christophe Leroy (CS GROUP) [this message]
2025-12-02 2:50 ` Yury Norov
2025-12-02 7:37 ` Andy Shevchenko
2025-11-29 19:53 ` [PATCH 2/3] kernel.h: move VERIFY_OCTAL_PERMISSIONS() to sysfs.h Yury Norov (NVIDIA)
2025-11-29 20:24 ` Andy Shevchenko
2025-11-29 20:33 ` Andy Shevchenko
2025-11-29 20:35 ` Andy Shevchenko
2025-11-30 17:56 ` Yury Norov
2025-11-30 19:35 ` Andy Shevchenko
2025-11-30 6:19 ` Randy Dunlap
2025-11-30 17:42 ` Yury Norov
2025-11-30 19:38 ` Andy Shevchenko
2025-12-01 19:51 ` Randy Dunlap
2025-12-01 20:00 ` Andy Shevchenko
2025-11-30 18:27 ` Yury Norov
2025-11-30 19:42 ` Andy Shevchenko
2025-12-01 19:01 ` Petr Pavlu
2025-12-01 19:20 ` Andy Shevchenko
2025-11-29 19:53 ` [PATCH 3/3] tracing: move tracing declarations from kernel.h to a dedicated header Yury Norov (NVIDIA)
2025-11-29 20:30 ` Andy Shevchenko
2025-11-30 18:16 ` Yury Norov
2025-11-30 19:44 ` Andy Shevchenko
2025-11-30 20:36 ` Steven Rostedt
2025-11-30 23:09 ` david laight
2025-12-01 2:50 ` Andy Shevchenko
2025-12-01 10:16 ` david laight
2025-12-01 15:37 ` Andy Shevchenko
2025-11-30 20:34 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3e7ddbea-978f-44f7-abdd-7319908fd83c@kernel.org \
--to=chleroy@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=da.gomez@kernel.org \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=petr.pavlu@suse.com \
--cc=rafael@kernel.org \
--cc=rdunlap@infradead.org \
--cc=rodrigo.vivi@intel.com \
--cc=rostedt@goodmis.org \
--cc=tursulin@ursulin.net \
--cc=yury.norov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).