[LTP] [PATCH v3 2/4] Add script to generate arch(s) dependant syscalls

Jan Stancek jstancek@redhat.com
Wed Oct 9 11:10:09 CEST 2024


On Wed, Oct 9, 2024 at 10:41 AM Andrea Cervesato
<andrea.cervesato@suse.com> wrote:
>
> Hi,
>
> On 10/3/24 15:58, Jan Stancek wrote:
> > On Mon, Sep 30, 2024 at 9:22 PM Andrea Cervesato
> > <andrea.cervesato@suse.de> wrote:
> >> From: Andrea Cervesato <andrea.cervesato@suse.com>
> >>
> >> Add generate_arch.sh script which can be used to generate arch(s)
> >> dependant syscalls file. The way it works is pretty simple: for each
> >> architecture defined into supported-arch.txt, compile kernel headers,
> >> extract the list of syscalls and generate a .in file containing all of
> >> them, associated with their own syscall's number.
> >> The way syscalls files are generated, passes through a C application
> >> which is automatically checking the availability of the syscalls in
> >> the user space environment.
> >>
> >> Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
> >> ---
> >>   include/lapi/syscalls/{aarch64.in => arm64.in}     |   0
> >>   include/lapi/syscalls/blacklist-syscalls.txt       |   6 +
> >>   include/lapi/syscalls/generate_arch.sh             | 210 +++++++++++++++++++++
> >>   include/lapi/syscalls/generate_syscalls.sh         |   9 +-
> >>   .../lapi/syscalls/{loongarch.in => loongarch64.in} |   0
> >>   include/lapi/syscalls/{mips_n64.in => mips64.in}   |   0
> >>   .../lapi/syscalls/{mips_n32.in => mips64n32.in}    |   0
> >>   include/lapi/syscalls/{mips_o32.in => mipso32.in}  |   0
> >>   include/lapi/syscalls/{hppa.in => parisc.in}       |   0
> >>   include/lapi/syscalls/supported-arch.txt           |  12 +-
> >>   10 files changed, 228 insertions(+), 9 deletions(-)
> >>
> >> diff --git a/include/lapi/syscalls/aarch64.in b/include/lapi/syscalls/arm64.in
> >> similarity index 100%
> >> rename from include/lapi/syscalls/aarch64.in
> >> rename to include/lapi/syscalls/arm64.in
> >> diff --git a/include/lapi/syscalls/blacklist-syscalls.txt b/include/lapi/syscalls/blacklist-syscalls.txt
> >> new file mode 100644
> >> index 000000000..e1ae5f76f
> >> --- /dev/null
> >> +++ b/include/lapi/syscalls/blacklist-syscalls.txt
> >> @@ -0,0 +1,6 @@
> >> +arch_specific_syscall
> >> +available
> >> +ni_syscall
> > Overall I like v3, it appears to correct many mistakes we made manually.
> >
> > But I'm not sure we want to blacklist "ni_syscall" entries.
> > It's still a valid syscall number, and the define is still provided in
> > kernel headers.
> >
> > If we have a test for syscall, that upstream deprecates, the test would become
> > unbuildable after we update syscalls with this script (which drops the define).
> >
> > Regards,
> > Jan
> >
> This is a good point. So your suggestion is to keep all syscalls defined
> in blacklist-syscalls.txt available anyway, or just the ni_syscall
> definition? At this point I would just drop the blacklist-syscalls.txt
> file and keep all defined syscalls for the LTP syscalls backorts.

Sounds good, we can drop the blacklist.



More information about the ltp mailing list