[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aW6YlXEbusvDiDWw@curiosity>
Date: Mon, 19 Jan 2026 23:48:21 +0300
From: Sergey Matyukevich <geomatsi@...il.com>
To: Andy Chiu <andybnac@...il.com>, Paul Walmsley <pjw@...nel.org>
Cc: linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, Paul Walmsley <pjw@...nel.org>,
Palmer Dabbelt <palmer@...belt.com>,
Alexandre Ghiti <alex@...ti.fr>, Oleg Nesterov <oleg@...hat.com>,
Shuah Khan <shuah@...nel.org>, Thomas Huth <thuth@...hat.com>,
Charlie Jenkins <charlie@...osinc.com>,
Samuel Holland <samuel.holland@...ive.com>,
Joel Granados <joel.granados@...nel.org>,
Conor Dooley <conor.dooley@...rochip.com>,
Yong-Xuan Wang <yongxuan.wang@...ive.com>,
Heiko Stuebner <heiko@...ech.de>, Guo Ren <guoren@...nel.org>
Subject: Re: [PATCH v5 2/9] riscv: vector: init vector context with proper
vlenb
Hi,
On Wed, Jan 07, 2026 at 12:49:31AM -0600, Andy Chiu wrote:
> On Sun, Dec 14, 2025 at 10:35 AM Sergey Matyukevich <geomatsi@...il.com> wrote:
> >
> > The vstate in thread_struct is zeroed when the vector context is
> > initialized. That includes read-only register vlenb, which holds
> > the vector register length in bytes. Zeroed state persists until
> > mstatus.VS becomes 'dirty' and a context switch saves the actual
> > hardware values.
> >
> > This can expose the zero vlenb value to the user-space in early
> > debug scenarios, e.g. when ptrace attaches to a traced process
> > early, before any vector instruction except the first one was
> > executed.
> >
> > Fix this by specifying proper vlenb on vector context init.
> >
> > Signed-off-by: Sergey Matyukevich <geomatsi@...il.com>
>
> Reviewed-by: Andy Chiu <andybnac@...il.com>
>
Thanks for reviews !
What would be the recommended way to proceed with these patches ?
I have reviews from Andy for the patches 1,2 and 5 (selftest for 2).
They can be used independently of the remainig ptrace v-state
validation changes and their tests.
Would it make sense to split the series into two parts, so that
the v-state validation can continue evolve independently ?
Regards,
Sergey
Powered by blists - more mailing lists