Sashiko discussions
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@kernel.org>
To: Jens Remus <jremus@linux.ibm.com>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>,
	Indu Bhagat <ibhagatgnu@gmail.com>,
	bpf@vger.kernel.org, sashiko@lists.linux.dev,
	Heiko Carstens <hca@linux.ibm.com>
Subject: Re: [PATCH v14 05/19] unwind_user/sframe: Add support for reading .sframe contents
Date: Wed, 13 May 2026 08:22:49 -0400	[thread overview]
Message-ID: <20260513082249.51238d75@fedora> (raw)
In-Reply-To: <5e7a8a95-fee6-42f7-9c17-a8c1684240ec@linux.ibm.com>

On Tue, 12 May 2026 15:35:09 +0200
Jens Remus <jremus@linux.ibm.com> wrote:

> 
> 
> IIUC config options that get selected should not depend on.  So the
> following would not be ok, although it seems to work?
> 
> diff --git a/arch/Kconfig b/arch/Kconfig
> @@ -495,6 +495,8 @@ config HAVE_UNWIND_USER_FP
> 
>  config HAVE_UNWIND_USER_SFRAME
> 	bool
> +	depends on 64BIT
> +	depends on HAVE_EFFICIENT_UNALIGNED_ACCESS

A config selected by architectures should not have architecture
dependencies, as those architectures should not be selecting it!

Archs with both 32 bit and 64 bit should do:

	select HAVE_UNWIND_USER_SFRAME if 64BIT

And no arch without unaligned access should have it selected.

> 	select UNWIND_USER
> 


> 
> Shall I better use BUILD_BUG_ON(!IS_ENABLED(CONFIG_...)) instead?  Would
> I add that to all functions that are affected (i.e. __read_fre(),
> __read_default_fre_datawords(), and __read_flex_fde_fre_datawords()),
> duplicating the build-time error message, or would I better introduce a
> dummy function to check this precondition (and 64-bit arch), for
> instance:

Yeah, that's a better idea. You only need one BUILD_BUG_ON() in the
file for it to have the desired effect. You don't need to add a dummy
function. Just put it in sframe_read_header().

Thanks,

-- Steve

  reply	other threads:[~2026-05-13 12:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260505121718.3572346-6-jremus@linux.ibm.com>
     [not found] ` <20260505185932.C708CC2BCB4@smtp.kernel.org>
2026-05-06 14:34   ` [PATCH v14 05/19] unwind_user/sframe: Add support for reading .sframe contents Jens Remus
2026-05-06 15:01     ` Steven Rostedt
2026-05-06 15:29       ` Jens Remus
2026-05-08  9:49       ` Jens Remus
2026-05-08 23:04         ` Indu Bhagat
2026-05-12 13:35       ` Jens Remus
2026-05-13 12:22         ` Steven Rostedt [this message]
2026-05-08 23:03     ` Indu Bhagat

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=20260513082249.51238d75@fedora \
    --to=rostedt@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=hca@linux.ibm.com \
    --cc=ibhagatgnu@gmail.com \
    --cc=jpoimboe@kernel.org \
    --cc=jremus@linux.ibm.com \
    --cc=sashiko@lists.linux.dev \
    /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