From: Nicolas Schier <nsc@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v3] kbuild: Makefile.lib: fix offsets generation with debug info
Date: Thu, 5 Nov 2026 07:36:55 +0100 [thread overview]
Message-ID: <auwkB55JcRO24RUd@derry.ads.avm.de> (raw)
In-Reply-To: <179385408066.826739.6575864914757012196.b4-review@b4>
On Wed, Nov 04, 2026 at 09:48:00PM -0700, Nathan Chancellor wrote:
> > When debug information is enabled (e.g. -ggdb3), the assembler
> > output file (e.g. kernel/sched/rq-offsets.s) contains additional
> > directives such as .ascii with offset info and debug metadata.
> >
> > For example:
> >
> > .ascii "->RQ_nr_pinned $3048 offsetof(struct rq, nr_pinned)" #
> > ...
> > .ascii "->func); __data = (it_func_ptr)->data; ((void(*)(void *, pro"
> >
> > The current sed-offsets macro uses [^ ]* to match constant names,
> > which is too permissive and can match unexpected characters when
> > debug directives are present. Additionally, the fallback command
> > 's:->::; p;' strips '->' from any unmatched line and prints it,
> > which causes debug metadata to leak into the generated header
> > file (include/generated/rq-offsets.h), breaking the build.
> >
> > Replace [^ ]* with [[:alnum:]_]* to match only valid C identifiers,
> > and remove the fallback 's:->::' command so that only successfully
> > transformed lines are emitted into the generated header.
> >
> > v2:
> > - Add BLANK() macro for better readability of generated headers
> > (suggested by Nathan Chancellor).
> > v3:
> > - Check for ->BLANK() at the beginning of a line
> > (suggested by Nathan Chancellor).
>
> For the future, please include this changelog underneath the '---' below
> your signoff so that it is not included when we apply the patch.
> Nicolas, would you mind snipping that during application?
Sure, thanks for the reminder!
--
Nicolas
next prev parent reply other threads:[~2026-11-05 6:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 10:53 [PATCH] " Dmitry Kandybka
2026-10-05 15:07 ` Nathan Chancellor
2026-10-15 21:01 ` [PATCH v2] " Dmitry Kandybka
2026-10-26 7:47 ` [PATCH v3] " Dmitry Kandybka
2026-11-05 4:48 ` Nathan Chancellor
2026-11-05 6:36 ` Nicolas Schier [this message]
2026-11-05 7:31 ` Nicolas Schier
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=auwkB55JcRO24RUd@derry.ads.avm.de \
--to=nsc@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=stable@vger.kernel.org \
/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
all inboxes | Powered by JetHome®