From: Andrew Jones <ajones@ventanamicro.com>
To: Celeste Liu <uwu@coelacanthus.name>
Cc: "Oleg Nesterov" <oleg@redhat.com>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Eric Biederman" <ebiederm@xmission.com>,
"Kees Cook" <kees@kernel.org>, "Shuah Khan" <shuah@kernel.org>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Alexandre Ghiti" <alex@ghiti.fr>,
"Dmitry V. Levin" <ldv@strace.io>,
"Andrea Bolognani" <abologna@redhat.com>,
"Björn Töpel" <bjorn@kernel.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ron Economos" <re@w6rz.net>,
"Charlie Jenkins" <charlie@rivosinc.com>,
"Quan Zhou" <zhouquan@iscas.ac.cn>,
"Felix Yan" <felixonmars@archlinux.org>,
"Ruizhe Pan" <c141028@gmail.com>, "Guo Ren" <guoren@kernel.org>,
"Yao Zi" <ziyao@disroot.org>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
"Björn Töpel" <bjorn@rivosinc.com>
Subject: Re: [PATCH v5 2/2] riscv: selftests: Add a ptrace test to verify a0 and orig_a0 access
Date: Wed, 15 Jan 2025 10:56:31 +0100 [thread overview]
Message-ID: <20250115-9a1a8e824977f49770a5358e@orel> (raw)
In-Reply-To: <17dfb122-4ae3-477f-93a8-1748b819c59c@coelacanthus.name>
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
next prev parent reply other threads:[~2025-01-15 9:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-14 20:24 [PATCH v5 0/2] riscv/ptrace: add new regset to access original a0 register Celeste Liu
2025-01-14 20:24 ` [PATCH v5 1/2] " Celeste Liu
2025-01-14 20:24 ` [PATCH v5 2/2] riscv: selftests: Add a ptrace test to verify a0 and orig_a0 access Celeste Liu
2025-01-15 9:14 ` Andrew Jones
2025-01-15 9:41 ` Celeste Liu
2025-01-15 9:56 ` Andrew Jones [this message]
2025-01-15 11:23 ` Celeste Liu
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=20250115-9a1a8e824977f49770a5358e@orel \
--to=ajones@ventanamicro.com \
--cc=abologna@redhat.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=bjorn@kernel.org \
--cc=bjorn@rivosinc.com \
--cc=c141028@gmail.com \
--cc=charlie@rivosinc.com \
--cc=ebiederm@xmission.com \
--cc=felixonmars@archlinux.org \
--cc=guoren@kernel.org \
--cc=kees@kernel.org \
--cc=ldv@strace.io \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-riscv@lists.infradead.org \
--cc=oleg@redhat.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=re@w6rz.net \
--cc=shuah@kernel.org \
--cc=tglx@linutronix.de \
--cc=uwu@coelacanthus.name \
--cc=zhouquan@iscas.ac.cn \
--cc=ziyao@disroot.org \
/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