Re: [PATCH v8 07/11] sframe: Add debug helpers with object name

From: sashiko-bot

Date: Wed Oct 07 2026 - 08:24:09 EST


Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] build: missing <linux/module.h> in sframe_debug.h
--

commit 586ddaf5514eed589ba4352e7a7684af607fdccf
Author: Dylan Hatch <dylanbhatch@xxxxxxxxxx>

sframe: Add debug helpers with object name

This commit adds debug helpers that include the object name, formatting
messages with either the module name or vmlinux for kernel SFrame sections.

> diff --git a/kernel/unwind/sframe_debug.h b/kernel/unwind/sframe_debug.h
> new file mode 100644
> index 0000000000000..f0bc2136eaad0
> --- /dev/null
> +++ b/kernel/unwind/sframe_debug.h
> @@ -0,0 +1,34 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _SFRAME_DEBUG_H
> +#define _SFRAME_DEBUG_H
> +
> +#include <linux/sframe.h>
> +#include "sframe.h"
> +
> +#ifdef CONFIG_MODULES
> +
> +#define objname(sec) ((sec) == &kernel_sfsec \
> + ? "vmlinux" \
> + : container_of((sec), struct module, sframe_sec)->name)

[Severity: Low]
Does this header need to include <linux/module.h> and <linux/stddef.h>?

The objname macro uses container_of and struct module, but the required
headers are not explicitly included. Any future C file including
sframe_debug.h directly without first including <linux/module.h> will fail
to compile.

--
Sashiko AI review · https://sashiko.dev/#/patchset/20261007114335.440322-1-dylanbhatch@xxxxxxxxxx?part=7