mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Björn Töpel" <bjorn@kernel.org>
To: Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	linux-riscv@lists.infradead.org
Cc: "Björn Töpel" <bjorn@rivosinc.com>,
	linux-kernel@vger.kernel.org, linux@rivosinc.com,
	"Palmer Dabbelt" <palmer@rivosinc.com>,
	"Rémi Denis-Courmont" <remi@remlab.net>,
	"Darius Rad" <darius@bluespec.com>,
	"Andy Chiu" <andy.chiu@sifive.com>
Subject: Re: [PATCH v2] riscv: Discard vector state on syscalls
Date: Mon, 26 Jun 2023 20:04:13 +0200	[thread overview]
Message-ID: <87sfaem76q.fsf@all.your.base.are.belong.to.us> (raw)
In-Reply-To: <87y1k6m827.fsf@all.your.base.are.belong.to.us>

Björn Töpel <bjorn@kernel.org> writes:

> Björn Töpel <bjorn@kernel.org> writes:
>
>> From: Björn Töpel <bjorn@rivosinc.com>
>>
>> The RISC-V vector specification states:
>>   Executing a system call causes all caller-saved vector registers
>>   (v0-v31, vl, vtype) and vstart to become unspecified.
>
> A bit of a corner case, but this will make sigreturn syscalls discard
> the vector state as well.
>
> Is that an issue? E.g. a user cannot build userspace context switching
> application. Does arm64 SVE handle sigreturn in a special way?

NVM; My bad. The vector state is cleared on *entry*, but then the
registers passed on signal stack is restored as usual.

Sorry for the noise! We're all good!
Björn

  reply	other threads:[~2023-06-26 18:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-26 16:57 Björn Töpel
2023-06-26 17:45 ` Björn Töpel
2023-06-26 18:04   ` Björn Töpel [this message]
2023-06-27 15:15 ` Andy Chiu
2023-06-28 10:35   ` Björn Töpel
2023-06-28 17:03     ` Andy Chiu
2023-06-29  5:52       ` Björn Töpel

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=87sfaem76q.fsf@all.your.base.are.belong.to.us \
    --to=bjorn@kernel.org \
    --cc=andy.chiu@sifive.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=bjorn@rivosinc.com \
    --cc=darius@bluespec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux@rivosinc.com \
    --cc=palmer@dabbelt.com \
    --cc=palmer@rivosinc.com \
    --cc=paul.walmsley@sifive.com \
    --cc=remi@remlab.net \
    /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

all inboxes | Powered by JetHome®