Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "André Almeida" <andrealmeid@igalia.com>
To: Magnus Lindholm <linmag7@gmail.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	Arnd Bergmanon <arnd@arndb.de>,
	Christian Brauner <brauner@kernel.org>,
	linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
	kernel-dev@igalia.com,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	linux-alpha@vger.kernel.org, linux-s390@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, soc@lists.linux.dev,
	linux-mips@vger.kernel.org, sparclinux@vger.kernel.org
Subject: Re: [PATCH v7 12/13] alpha: Remove alpha_ prefix from custom syscall entries
Date: Fri, 18 Sep 2026 17:11:06 -0300	[thread overview]
Message-ID: <a2627927-7526-40b7-8464-fecb0e04ecad@igalia.com> (raw)
In-Reply-To: <CA+=Fv5Q+sOLmT0Wf3OGdKw=mBt_EoS8ZQDF3wwGrm2-2vnOYgg@mail.gmail.com>

Em 18/09/2026 07:54, Magnus Lindholm escreveu:
> Hi André,
> 
> On Fri, Sep 18, 2026 at 1:48 AM André Almeida <andrealmeid@igalia.com> wrote:
>>
>> Some architectures need special entry points for some syscalls (like
>> clone3). The current approach is, instead of having a special name like
>> arch_syscall, to name if as __syscall. This is enough to different the
>> common entry point to the architecture specific entry point.
>>
>> Change alpha special syscall entries to do the same. This makes easier to
>> join the syscall tables. Leave alpha_syscall_zero because this syscall only
>> exists in alpha anyway.
>>
>> Signed-off-by: André Almeida <andrealmeid@igalia.com>
>> ---
>>   arch/alpha/kernel/entry.S              | 8 ++++----
>>   arch/alpha/kernel/syscalls/syscall.tbl | 8 ++++----
>>   2 files changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S
>> index 9f2608de2544..8a85fcf117cb 100644
>> --- a/arch/alpha/kernel/entry.S
>> +++ b/arch/alpha/kernel/entry.S
>> @@ -879,9 +879,9 @@ ret_from_kernel_thread:
>>
>>   .macro fork_like name
>>          .align  4
>> -       .globl  alpha_\name
>> -       .ent    alpha_\name
>> -alpha_\name:
>> +       .globl  __sys_\name
>> +       .ent    __sys_\name
>> +__sys_\name:
>>          .prologue 0
>>          bsr     $1, do_switch_stack
>>          // NB: if anyone adds preemption, this block will need to be protected
>> @@ -896,7 +896,7 @@ alpha_\name:
>>          ldq     $26, 56($sp)
>>          lda     $sp, SWITCH_STACK_SIZE($sp)
>>          ret
>> -.end   alpha_\name
>> +.end   __sys_\name
>>   .endm
>>
>>   fork_like fork
>> diff --git a/arch/alpha/kernel/syscalls/syscall.tbl b/arch/alpha/kernel/syscalls/syscall.tbl
>> index 8fc4701a6328..a41276634923 100644
>> --- a/arch/alpha/kernel/syscalls/syscall.tbl
>> +++ b/arch/alpha/kernel/syscalls/syscall.tbl
>> @@ -9,7 +9,7 @@
>>   #
>>   0      common  osf_syscall                     alpha_syscall_zero
>>   1      common  exit                            sys_exit
>> -2      common  fork                            alpha_fork
>> +2      common  fork                            __sys_fork
>>   3      common  read                            sys_read
>>   4      common  write                           sys_write
>>   5      common  osf_old_open                    sys_ni_syscall
>> @@ -72,7 +72,7 @@
>>   63     common  getpgrp                         sys_getpgrp
>>   64     common  getpagesize                     sys_getpagesize
>>   65     common  osf_mremap                      sys_ni_syscall
>> -66     common  vfork                           alpha_vfork
>> +66     common  vfork                           __sys_vfork
>>   67     common  stat                            sys_newstat
>>   68     common  lstat                           sys_newlstat
>>   69     common  osf_sbrk                        sys_ni_syscall
>> @@ -242,7 +242,7 @@
>>   309    common  get_kernel_syms                 sys_ni_syscall
>>   310    common  syslog                          sys_syslog
>>   311    common  reboot                          sys_reboot
>> -312    common  clone                           alpha_clone
>> +312    common  clone                           __sys_clone
>>   313    common  uselib                          sys_uselib
>>   314    common  mlock                           sys_mlock
>>   315    common  munlock                         sys_munlock
>> @@ -474,7 +474,7 @@
>>   542    common  fsmount                         sys_fsmount
>>   543    common  fspick                          sys_fspick
>>   544    common  pidfd_open                      sys_pidfd_open
>> -545    common  clone3                          alpha_clone3
>> +545    common  clone3                          __clone3
>>   546    common  close_range                     sys_close_range
>>   547    common  openat2                         sys_openat2
>>   548    common  pidfd_getfd                     sys_pidfd_getfd
>>
>> --
>> 2.55.0
>>
>>
> 
> The fork_like macro now defines __sys_clone3, but the syscall table
> entry is changed from alpha_clone3 to __clone3.
> 
> This should be __sys_clone3, like the other custom entry points.
> 
> I also confirmed this by building the tree at this patch, before applying
> patch 13:
> 
> LD      .tmp_vmlinux1
> alpha-unknown-linux-gnu-ld: arch/alpha/kernel/systbls.o:
> in function `sys_call_table':
> (.data+0x1108): undefined reference to `__clone3'
> 
> Patch 13 hides the issue because the common table uses __clone3 as the
> ABI tag but correctly selects __sys_clone3 as the syscall entry point.
Thank you very much for testing this work! I've applied a fix for this 
for the next version.


  reply	other threads:[~2026-09-18 20:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17 23:46 [PATCH v7 00/13] syscalls: Add a shared table for all archs André Almeida
2026-09-17 23:46 ` [PATCH v7 01/13] syscalls: Make --abis parsing more robust André Almeida
2026-09-17 23:46 ` [PATCH v7 02/13] syscalls: Create unified partial table for all archs André Almeida
2026-09-17 23:46 ` [PATCH v7 03/13] scripts/syscall.tbl: Use the common table André Almeida
2026-09-18  6:34   ` Arnd Bergmann
2026-09-18 19:58     ` André Almeida
2026-09-17 23:46 ` [PATCH v7 04/13] arm: Use the common syscall table André Almeida
2026-09-18  6:22   ` Arnd Bergmann
2026-09-18 20:10     ` André Almeida
2026-09-17 23:46 ` [PATCH v7 05/13] s390: " André Almeida
2026-09-17 23:46 ` [PATCH v7 06/13] sparc: " André Almeida
2026-09-17 23:46 ` [PATCH v7 07/13] mips: Remove duplicated syscallnr.sh André Almeida
2026-09-17 23:46 ` [PATCH v7 08/13] mips: Get rid of custom mips ABIs for syscall tables André Almeida
2026-09-17 23:46 ` [PATCH v7 09/13] mips: Use the common syscall table André Almeida
2026-09-18  6:56   ` Arnd Bergmann
2026-09-17 23:46 ` [PATCH v7 10/13] syscalls: Add an option for offsetting the common table André Almeida
2026-09-17 23:46 ` [PATCH v7 11/13] alpha: Define entry point for set_mempolicy_home_node syscall André Almeida
2026-09-18 11:36   ` Magnus Lindholm
2026-09-17 23:46 ` [PATCH v7 12/13] alpha: Remove alpha_ prefix from custom syscall entries André Almeida
2026-09-18 10:54   ` Magnus Lindholm
2026-09-18 20:11     ` André Almeida [this message]
2026-09-17 23:46 ` [PATCH v7 13/13] alpha: Use the common syscall table André Almeida
2026-09-18 10:57   ` Magnus Lindholm

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=a2627927-7526-40b7-8464-fecb0e04ecad@igalia.com \
    --to=andrealmeid@igalia.com \
    --cc=arnd@arndb.de \
    --cc=brauner@kernel.org \
    --cc=kernel-dev@igalia.com \
    --cc=linmag7@gmail.com \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=soc@lists.linux.dev \
    --cc=sparclinux@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /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