linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Celeste Liu <uwu@coelacanthus.name>
To: Andrew Jones <ajones@ventanamicro.com>
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 19:23:14 +0800	[thread overview]
Message-ID: <e286346c-0aa0-49ae-b789-75524221f58d@coelacanthus.name> (raw)
In-Reply-To: <20250115-9a1a8e824977f49770a5358e@orel>

On 2025-01-15 17:56, Andrew Jones wrote:
> 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.

v6 has been sent. The "copy stddef.h" patch has been included.
Once this patchset land, I will send another patchset to deal
with other usages.

https://lore.kernel.org/lkml/20250115-riscv-new-regset-v6-0-59bfddd33525@coelacanthus.name/T/

> 
> Thanks,
> drew



      reply	other threads:[~2025-01-15 11:23 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
2025-01-15 11:23         ` Celeste Liu [this message]

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=e286346c-0aa0-49ae-b789-75524221f58d@coelacanthus.name \
    --to=uwu@coelacanthus.name \
    --cc=abologna@redhat.com \
    --cc=ajones@ventanamicro.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=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