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: <20250115-9a1a8e824977f49770a5358e@orel>
Date: Wed, 15 Jan 2025 10:56:31 +0100
From: Andrew Jones <ajones@...tanamicro.com>
To: Celeste Liu <uwu@...lacanthus.name>
Cc: Oleg Nesterov <oleg@...hat.com>, 
	Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt <palmer@...belt.com>, 
	Eric Biederman <ebiederm@...ssion.com>, Kees Cook <kees@...nel.org>, Shuah Khan <shuah@...nel.org>, 
	Albert Ou <aou@...s.berkeley.edu>, Alexandre Ghiti <alex@...ti.fr>, 
	"Dmitry V. Levin" <ldv@...ace.io>, Andrea Bolognani <abologna@...hat.com>, 
	Björn Töpel <bjorn@...nel.org>, Thomas Gleixner <tglx@...utronix.de>, Ron Economos <re@...z.net>, 
	Charlie Jenkins <charlie@...osinc.com>, Quan Zhou <zhouquan@...as.ac.cn>, 
	Felix Yan <felixonmars@...hlinux.org>, Ruizhe Pan <c141028@...il.com>, Guo Ren <guoren@...nel.org>, 
	Yao Zi <ziyao@...root.org>, linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org, 
	linux-mm@...ck.org, linux-kselftest@...r.kernel.org, 
	Björn Töpel <bjorn@...osinc.com>
Subject: Re: [PATCH v5 2/2] riscv: selftests: Add a ptrace test to verify a0
 and orig_a0 access

On Wed, Jan 15, 2025 at 05:41:57PM +0800, Celeste Liu wrote:
> On 2025-01-15 17:14, Andrew Jones wrote:
> > On Wed, Jan 15, 2025 at 04:24:59AM +0800, Celeste Liu wrote:
...
> >> +#ifndef sizeof_field
> >> +#define sizeof_field(TYPE, MEMBER) sizeof((((TYPE *)0)->MEMBER))
> >> +#endif
> >> +#ifndef offsetofend
> >> +#define offsetofend(TYPE, MEMBER) \
> >> +	(offsetof(TYPE, MEMBER) + sizeof_field(TYPE, MEMBER))
> >> +#endif
> > 
> > I think this is the sixth test to define these. We should copy
> > include/linux/stddef.h into tools/include. We already have
> > tools/include/uapi/linux/stddef.h with __struct_group and
> > __DECLARE_FLEX_ARRAY, so I think it should just work.
> 
> Agreed. But it may be better to be a separate patchset
> so we can change those definition in different selftests
> one pass.
>

I think a separate "copy stddef.h" patch could be in this series to
avoid having to add the defines here. Then, another series can be
sent with one patch for each conversion. That said, I'm OK with
adding the defines for now and doing the conversion later. I just
hope it will actually happen.

Thanks,
drew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ