All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Drew Fustini <fustini@kernel.org>
Cc: "Paul Walmsley" <paul.walmsley@sifive.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Alexandre Ghiti" <alex@ghiti.fr>,
	"Samuel Holland" <samuel.holland@sifive.com>,
	"Björn Töpel" <bjorn@rivosinc.com>,
	"Andy Chiu" <andybnac@gmail.com>,
	"Conor Dooley" <conor.dooley@microchip.com>,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	"Drew Fustini" <dfustini@tenstorrent.com>
Subject: Re: [PATCH v2] riscv: Add sysctl to control discard of vstate during syscall
Date: Tue, 12 Aug 2025 10:03:05 +0200	[thread overview]
Message-ID: <lhua545dl1i.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <aJpUWnYEL18dk4aC@x1> (Drew Fustini's message of "Mon, 11 Aug 2025 13:36:42 -0700")

* Drew Fustini:

>> I'm confused.  Current glibc assumes that vector registers are preserved
>> across system calls because the assembler clobbers do not mention them.
>> Similar inline assembly probably has ended up in other projects, too.
>> It works by accident if glibc is compiled for a non-vector target, or if
>> it so happens that GCC never keeps vector registers alive across system
>> calls.
>
> I wasn't trying to make any ABI changes with this sysctl patch. The
> riscv kernel documentation states vector state is not preserved across
> syscalls. I am not trying to change that policy.

Oh, then glibc is just buggy in this area.  I had no idea.  If the
vector state is already clobbered, than the sysctl for experimentation
is fine.

Thanks,
Florian


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

WARNING: multiple messages have this Message-ID (diff)
From: Florian Weimer <fweimer@redhat.com>
To: Drew Fustini <fustini@kernel.org>
Cc: "Paul Walmsley" <paul.walmsley@sifive.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Alexandre Ghiti" <alex@ghiti.fr>,
	"Samuel Holland" <samuel.holland@sifive.com>,
	"Björn Töpel" <bjorn@rivosinc.com>,
	"Andy Chiu" <andybnac@gmail.com>,
	"Conor Dooley" <conor.dooley@microchip.com>,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	"Drew Fustini" <dfustini@tenstorrent.com>
Subject: Re: [PATCH v2] riscv: Add sysctl to control discard of vstate during syscall
Date: Tue, 12 Aug 2025 10:03:05 +0200	[thread overview]
Message-ID: <lhua545dl1i.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <aJpUWnYEL18dk4aC@x1> (Drew Fustini's message of "Mon, 11 Aug 2025 13:36:42 -0700")

* Drew Fustini:

>> I'm confused.  Current glibc assumes that vector registers are preserved
>> across system calls because the assembler clobbers do not mention them.
>> Similar inline assembly probably has ended up in other projects, too.
>> It works by accident if glibc is compiled for a non-vector target, or if
>> it so happens that GCC never keeps vector registers alive across system
>> calls.
>
> I wasn't trying to make any ABI changes with this sysctl patch. The
> riscv kernel documentation states vector state is not preserved across
> syscalls. I am not trying to change that policy.

Oh, then glibc is just buggy in this area.  I had no idea.  If the
vector state is already clobbered, than the sysctl for experimentation
is fine.

Thanks,
Florian


  reply	other threads:[~2025-08-12 12:36 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-06 14:03 [PATCH v2] riscv: Add sysctl to control discard of vstate during syscall Drew Fustini
2025-08-06 14:03 ` Drew Fustini
2025-08-08 12:36 ` Darius Rad
2025-08-08 12:36   ` Darius Rad
2025-08-09  3:58   ` Vivian Wang
2025-08-09  3:58     ` Vivian Wang
2025-08-09  7:54     ` Drew Fustini
2025-08-09  7:54       ` Drew Fustini
2025-08-10  9:52       ` Vivian Wang
2025-08-10  9:52         ` Vivian Wang
2025-08-12  5:46         ` Drew Fustini
2025-08-12  5:46           ` Drew Fustini
2025-08-09 13:23     ` Darius Rad
2025-08-09 13:23       ` Darius Rad
2025-08-09  8:40 ` Florian Weimer
2025-08-09  8:40   ` Florian Weimer
2025-08-09 21:23   ` Drew Fustini
2025-08-09 21:23     ` Drew Fustini
2025-08-10  7:45     ` Florian Weimer
2025-08-10  7:45       ` Florian Weimer
2025-08-11 20:36       ` Drew Fustini
2025-08-11 20:36         ` Drew Fustini
2025-08-12  8:03         ` Florian Weimer [this message]
2025-08-12  8:03           ` Florian Weimer

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=lhua545dl1i.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=alex@ghiti.fr \
    --cc=andybnac@gmail.com \
    --cc=bjorn@rivosinc.com \
    --cc=conor.dooley@microchip.com \
    --cc=dfustini@tenstorrent.com \
    --cc=fustini@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=samuel.holland@sifive.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.