mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Greg Ungerer" <gerg@linux-m68k.org>,
	"Thomas Huth" <thuth@redhat.com>,
	linux-m68k@lists.linux-m68k.org,
	"Geert Uytterhoeven" <geert@linux-m68k.org>
Cc: linux-kernel@vger.kernel.org, "Oleg Nesterov" <oleg@redhat.com>
Subject: Re: [PATCH v2] m68k: Avoid CONFIG_COLDFIRE switch in uapi header
Date: Tue, 20 Feb 2024 16:09:55 +0100	[thread overview]
Message-ID: <4824192b-5573-4246-a47c-ad6249e2900e@app.fastmail.com> (raw)
In-Reply-To: <6f3b246e-7417-4455-abe4-ca3b42fdda4c@linux-m68k.org>

On Tue, Feb 20, 2024, at 15:13, Greg Ungerer wrote:
> On 20/2/24 02:01, Thomas Huth wrote:
>> We should not use any CONFIG switches in uapi headers since these
>> only work during kernel compilation; they are not defined for
>> userspace. Fix it by moving the struct pt_regs to the kernel-internal
>> header instead - struct pt_regs does not seem to be required for
>> the userspace headers on m68k at all.
>> 
>> Suggested-by: Greg Ungerer <gerg@linux-m68k.org>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>   v2: Move the struct instead of changing the #ifdef
>> 
>>   See previous discussion here:
>>   https://lore.kernel.org/lkml/6e3f2a2e-2430-4b4f-9ead-d9a4d5e42713@linux-m68k.org/
>
> I am fine with this. FWIW the following architectures do
> not define pt_regs in their uapi/ptrace.h header either:
> arc, arm64, loongarch, nios2, openrisc, riscv, s390, xtensa
> Though quite a few of them have a user_pt_regs instead.
>
> So for me:
>
> Acked-by: Greg Ungerer <gerg@linux-m68k.org>
>
> Geert, Arnd, do you have any thoughts on this?

It clearly doesn't change the ABI, so that part is fine.

If asm/ptrace.h is included by some userspace tool to
get the definition, it might cause a compile-time error
that needs a trivial source change.

This could be needed for ptrace (gdb, strace) or signal
handling and setjmp (libc), though it's more likely that these
already have their own copies.

     Arnd

  reply	other threads:[~2024-02-20 15:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19 16:01 Thomas Huth
2024-02-20 14:13 ` Greg Ungerer
2024-02-20 15:09   ` Arnd Bergmann [this message]
2024-02-23  8:13     ` Thomas Huth
2024-04-02  7:18       ` Greg Ungerer

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=4824192b-5573-4246-a47c-ad6249e2900e@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=geert@linux-m68k.org \
    --cc=gerg@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=oleg@redhat.com \
    --cc=thuth@redhat.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

all inboxes | Powered by JetHome®