mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>,
	linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org,
	Petr Mladek <pmladek@suse.com>,
	Joe Lawrence <joe.lawrence@redhat.com>,
	x86@kernel.org
Subject: Re: [tip: objtool/core] objtool/klp: Add --debug option to show cloning decisions
Date: Fri, 31 Oct 2025 16:25:26 -0400	[thread overview]
Message-ID: <20251031202526.GB2486902@ax162> (raw)
In-Reply-To: <wi54qqmdbzuajt7f5krknhcibs7pj45zhf42n3z5nyqujoabgz@hbduuwymyufh>

On Fri, Oct 31, 2025 at 09:11:44AM -0700, Josh Poimboeuf wrote:
> On Fri, Oct 31, 2025 at 03:21:00PM +0100, Borislav Petkov wrote:
> > On Fri, Oct 31, 2025 at 10:09:44AM -0400, Nathan Chancellor wrote:
> > > Yeah, that looks good to me and matches the workaround that Peter did in
> > > include/linux/compiler-clang.h. If cleanup is going to be used more in
> > > objtool, it might be worth taking that approach there too like:
> > > 
> > >   #ifdef __clang__
> > >   #define __cleanup(func) __maybe_unused __attribute__((__cleanup__(func)))
> > >   #else
> > >   #define __cleanup(func) __attribute__((__cleanup__(func)))
> > >   #endif
> > 
> > LGTM.
> > 
> > I'll wait for the objool-er folks to lemme know what they want before
> > I productize it.
> > 
> > Thx Nathan!
> 
> How about __maybe_unused unconditionally without the #ifdef damage?

Yeah I had only suggested that to mirror the kernel but fundamentally,
GCC already treats it that way so I don't think there is any harm in
just doing this unconditionally.

Nathan

  reply	other threads:[~2025-10-31 20:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-16  9:52 tip-bot2 for Josh Poimboeuf
2025-10-31 11:49 ` Borislav Petkov
2025-10-31 14:09   ` Nathan Chancellor
2025-10-31 14:21     ` Borislav Petkov
2025-10-31 16:11       ` Josh Poimboeuf
2025-10-31 20:25         ` Nathan Chancellor [this message]
2025-11-01 12:44           ` [PATCH] tools/objtool: Copy the __cleanup unused variable fix for older clang Borislav Petkov
2025-11-01 16:43             ` Nathan Chancellor

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=20251031202526.GB2486902@ax162 \
    --to=nathan@kernel.org \
    --cc=bp@alien8.de \
    --cc=joe.lawrence@redhat.com \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=x86@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®