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]
Message-ID: <875xpc2in5.ffs@tglx>
Date: Mon, 28 Oct 2024 19:21:18 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Jinjie Ruan <ruanjinjie@...wei.com>, oleg@...hat.com,
 linux@...linux.org.uk, will@...nel.org, mark.rutland@....com,
 catalin.marinas@....com, sstabellini@...nel.org, maz@...nel.org,
 peterz@...radead.org, luto@...nel.org, kees@...nel.org, wad@...omium.org,
 akpm@...ux-foundation.org, samitolvanen@...gle.com, arnd@...db.de,
 ojeda@...nel.org, rppt@...nel.org, hca@...ux.ibm.com,
 aliceryhl@...gle.com, samuel.holland@...ive.com, paulmck@...nel.org,
 aquini@...hat.com, petr.pavlu@...e.com, ruanjinjie@...wei.com,
 viro@...iv.linux.org.uk, rmk+kernel@...linux.org.uk, ardb@...nel.org,
 wangkefeng.wang@...wei.com, surenb@...gle.com, linus.walleij@...aro.org,
 yangyj.ee@...il.com, broonie@...nel.org, mbenes@...e.cz,
 puranjay@...nel.org, pcc@...gle.com, guohanjun@...wei.com,
 sudeep.holla@....com, Jonathan.Cameron@...wei.com, prarit@...hat.com,
 liuwei09@...tc.cn, dwmw@...zon.co.uk, oliver.upton@...ux.dev,
 kristina.martsenko@....com, ptosi@...gle.com, frederic@...nel.org,
 vschneid@...hat.com, thiago.bauermann@...aro.org, joey.gouly@....com,
 liuyuntao12@...wei.com, leobras@...hat.com, linux-kernel@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, xen-devel@...ts.xenproject.org
Subject: Re: [PATCH -next v4 17/19] entry: Add syscall arch functions to use
 generic syscall for arm64

On Fri, Oct 25 2024 at 18:06, Jinjie Ruan wrote:

$Subject: Can you please make this simply:

    entry: Add arch_pre/post_report_syscall_entry/exit()

> Add some syscall arch functions to support arm64 to use generic syscall
> code, which do not affect existing architectures that use generic entry:
>
>  - arch_pre/post_report_syscall_entry/exit().

> Also make syscall_exit_work() not static and move report_single_step() to
> thread_info.h, which can be used by arm64 later.

This does way too many things which have nothing to do with the subject
line.

>  long syscall_trace_enter(struct pt_regs *regs, long syscall,
>  				unsigned long work)
>  {
> @@ -34,7 +77,9 @@ long syscall_trace_enter(struct pt_regs *regs, long syscall,
>  
>  	/* Handle ptrace */
>  	if (work & (SYSCALL_WORK_SYSCALL_TRACE | SYSCALL_WORK_SYSCALL_EMU)) {
> +		unsigned long saved_reg = arch_pre_report_syscall_entry(regs);

Lacks a new line between declaration and code.

>  		ret = ptrace_report_syscall_entry(regs);
> +		arch_post_report_syscall_entry(regs, saved_reg, ret);

Though I'm not sure whether these pre/post hooks buy anything. It's
probably simpler to do:

-  		ret = ptrace_report_syscall_entry(regs);
+		ret = arch_ptrace_report_syscall_entry(regs);

And have the default implementation as

        return ptrace_report_syscall_entry(regs);

and let ARM64 implement it's magic around it in the architecture
header. The actual ptrace_report_syscall_entry() is simple enough to be
in both places. That reduces the inflation of architecture specific
helpers and keeps the code tidy.

Thanks,

        tglx





Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ