lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat,  7 Oct 2023 20:58:17 +0800
From:   Zhangjin Wu <falcon@...ylab.org>
To:     arnd@...db.de
Cc:     falcon@...ylab.org, linux-kernel@...r.kernel.org,
        linux-mips@...r.kernel.org, linux-riscv@...ts.infradead.org,
        tim.bird@...y.com, tanyuan@...ylab.org
Subject: Re: [PATCH v1 4/7] DCE/DSE: mips: add HAVE_TRIM_UNUSED_SYSCALLS support

Hi, Arnd

> On Tue, Sep 26, 2023, at 00:40, Zhangjin Wu wrote:
> > For HAVE_TRIM_UNUSED_SYSCALLS, the syscall tables are hacked with the
> > input used syscalls.
> >
> > Based on the used syscalls information, a new version of tbl file is
> > generated from the original tbl file and named with a 'used' suffix.
> >
> > With this new tbl file, both unistd_nr_*.h and syscall_table_*.h files
> > are updated to only include the used syscalls.
> >
> >     $ grep _Linux_syscalls -ur arch/mips/include/generated/asm/
> >     arch/mips/include/generated/asm/unistd_nr_n64.h:#define 
> > __NR_64_Linux_syscalls	165
> >     arch/mips/include/generated/asm/unistd_nr_n32.h:#define 
> > __NR_N32_Linux_syscalls	165
> >     arch/mips/include/generated/asm/unistd_nr_o32.h:#define 
> > __NR_O32_Linux_syscalls	89
> >
> >     $ grep -vr sys_ni_syscall 
> > arch/mips/include/generated/asm/syscall_table_*.h
> >     arch/mips/include/generated/asm/syscall_table_n32.h:__SYSCALL(58, 
> > sys_exit)
> >     arch/mips/include/generated/asm/syscall_table_n32.h:__SYSCALL(164, 
> > sys_reboot)
> >     arch/mips/include/generated/asm/syscall_table_n64.h:__SYSCALL(58, 
> > sys_exit)
> 
> My feeling is that instead of postprocessing the generated files,
> it would be much better to make the elimination part of the
> existing infrastructure that generates the files from syscall.tbl,
> and finally change the include/asm-generic/unistd.h to the
> same format, as we had planned for a long time.
>

Agree very much, then we can simply touch the common files, no need to
touch the arch specific files.

> I should be able to help out with that part.
>

Thanks, is it enough to touch these ones?

    $ ls scripts/syscall*
    scripts/syscallhdr.sh  scripts/syscallnr.sh  scripts/syscalltbl.sh

One question here is that is it possible or required to share the used syscalls
selection code among them?

Another question require your help is the compat part, the compat stuff makes
things harder (include the Kconfig symbol interface definition and select
logic), perhaps we can simply limit our first DSE version under !COMPAT?

Best regards,
Zhangjin

>       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ