Re: [PATCH v13 22/40] arm64/gcs: Ensure that new threads have a GCS

2024-10-04 Thread Catalin Marinas
On Tue, Oct 01, 2024 at 11:59:01PM +0100, Mark Brown wrote: > When a new thread is created by a thread with GCS enabled the GCS needs > to be specified along with the regular stack. > > Unfortunately plain clone() is not extensible and existing clone3() > users will not specify a stack so all exis

Re: [PATCH v13 22/40] arm64/gcs: Ensure that new threads have a GCS

2024-10-04 Thread Mark Brown
On Fri, Oct 04, 2024 at 02:18:45PM +0300, Catalin Marinas wrote: > I think Szabolcs mentioned a GCS leak with v12: > https://lore.kernel.org/r/ZtrihWQFyb2/x...@arm.com > (and in some private messages IIRC) > Has this been identified? The changelog only mentions a leak in v8. Yes, it's this in

Re: (subset) [PATCH v13 00/40] arm64/gcs: Provide support for GCS in userspace

2024-10-04 Thread Catalin Marinas
On Tue, 01 Oct 2024 23:58:39 +0100, Mark Brown wrote: > The arm64 Guarded Control Stack (GCS) feature provides support for > hardware protected stacks of return addresses, intended to provide > hardening against return oriented programming (ROP) attacks and to make > it easier to gather call stacks

[PATCH 1/7] KVM: Add API documentation for KVM_HYPERV_SET_TLB_FLUSH_INHIBIT

2024-10-04 Thread Nikolas Wipper
Add API documentation for the new KVM_HYPERV_SET_TLB_FLUSH_INHIBIT ioctl. Signed-off-by: Nikolas Wipper --- Documentation/virt/kvm/api.rst | 41 ++ 1 file changed, 41 insertions(+) diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index

[PATCH 0/7] KVM: x86: Introduce new ioctl KVM_HYPERV_SET_TLB_FLUSH_INHIBIT

2024-10-04 Thread Nikolas Wipper
This series introduces a new ioctl KVM_HYPERV_SET_TLB_FLUSH_INHIBIT. It allows hypervisors to inhibit remote TLB flushing of a vCPU coming from Hyper-V hyper-calls (namely HvFlushVirtualAddressSpace(Ex) and HvFlushirtualAddressList(Ex)). It is required to implement the HvTranslateVirtualAddress hyp

[PATCH RFC net] docs: netdev: document guidance on cleanup patches

2024-10-04 Thread Simon Horman
The purpose of this section is to document what is the current practice regarding clean-up patches which address checkpatch warnings and similar problems. I feel there is a value in having this documented so others can easily refer to it. Clearly this topic is subjective. And to some extent the cu

Re: [PATCH v2 1/6] Add AutoFDO support for Clang build

2024-10-04 Thread Rong Xu
On Fri, Oct 4, 2024 at 9:38 AM Mike Rapoport wrote: > > On Fri, Oct 04, 2024 at 09:28:36AM -0700, Rong Xu wrote: > > On Thu, Oct 3, 2024 at 11:09 PM Mike Rapoport wrote: > > > > > > On Thu, Oct 03, 2024 at 11:20:17AM -0700, Rong Xu wrote: > > > > Writing the doc with all these code-blocks was not

Re: [PATCH] docs: dev-tools: Add documentation for the device focused kselftests

2024-10-04 Thread Shuah Khan
On 10/3/24 08:41, Nícolas F. R. A. Prado wrote: On Wed, Oct 02, 2024 at 12:00:10PM -0600, Shuah Khan wrote: On 10/1/24 09:43, Nícolas F. R. A. Prado wrote: Add documentation for the kselftests focused on testing devices and point to it from the kselftest documentation. There are multiple tests

Re: [PATCH v2 1/6] Add AutoFDO support for Clang build

2024-10-04 Thread Rong Xu
On Thu, Oct 3, 2024 at 11:09 PM Mike Rapoport wrote: > > On Thu, Oct 03, 2024 at 11:20:17AM -0700, Rong Xu wrote: > > Writing the doc with all these code-blocks was not fun either. > > We are happy to change if there is a better way for this. > > > > -Rong > > > > On Thu, Oct 3, 2024 at 9:13 AM Pe

Re: [PATCH v2 1/6] Add AutoFDO support for Clang build

2024-10-04 Thread Mike Rapoport
On Fri, Oct 04, 2024 at 09:28:36AM -0700, Rong Xu wrote: > On Thu, Oct 3, 2024 at 11:09 PM Mike Rapoport wrote: > > > > On Thu, Oct 03, 2024 at 11:20:17AM -0700, Rong Xu wrote: > > > Writing the doc with all these code-blocks was not fun either. > > > We are happy to change if there is a better wa

Re: [PATCH v2 1/6] Add AutoFDO support for Clang build

2024-10-04 Thread Justin Stitt
On Fri, Oct 4, 2024 at 11:29 AM Peter Zijlstra wrote: > > On Fri, Oct 04, 2024 at 11:10:04AM -0700, Kees Cook wrote: > > > +Configure the kernel with::(make) > > + > > + CONFIG_AUTOFDO_CLANG=y > > > > Then we could avoid the extra 2 lines but still gain the rendered language > > highlights? >

Re: [PATCH v2 1/6] Add AutoFDO support for Clang build

2024-10-04 Thread Peter Zijlstra
On Fri, Oct 04, 2024 at 11:10:04AM -0700, Kees Cook wrote: > +Configure the kernel with::(make) > + > + CONFIG_AUTOFDO_CLANG=y > > Then we could avoid the extra 2 lines but still gain the rendered language > highlights? The whole double-colon thing is already a pain to read; you're making it

Re: [PATCH 33/33] kselftest/riscv: kselftest for user mode cfi

2024-10-04 Thread Deepak Gupta
On Wed, Oct 02, 2024 at 05:18:36PM -0600, Shuah Khan wrote: On 10/1/24 10:06, Deepak Gupta wrote: Adds kselftest for RISC-V control flow integrity implementation for user mode. There is not a lot going on in kernel for enabling landing pad for user mode. cfi selftest are intended to be compiled

Re: [PATCH] docs: dev-tools: Add documentation for the device focused kselftests

2024-10-04 Thread Shuah Khan
On 10/4/24 11:36, Jonathan Corbet wrote: Shuah Khan writes: Jon, Let me know if you would like me to take this through kselftest tree. I'm happy either way - go ahead and grab it if you like, just let me know. Thanks, jon Applied to linux-kselftest next for Linux 6.13-rc1. thanks, --

Re: [PATCH v2] Documentation/process: maintainer-soc: clarify submitting patches

2024-10-04 Thread Bagas Sanjaya
On Wed, Sep 25, 2024 at 11:56:35AM +0200, Krzysztof Kozlowski wrote: > Patches for SoCs are expected to be picked up by SoC submaintainers. > The main SoC maintainers should be addressed only in few cases. > > Rewrite the section about maintainer handling to document above > expectation. > LGTM,

Re: [PATCH 00/15] KVM: x86: Introduce new ioctl KVM_TRANSLATE2

2024-10-04 Thread Nikolas Wipper
I saw this on another series[*]: > if KVM_TRANSLATE2 lands (though I'm somewhat curious as to why QEMU doesn't do > the page walks itself). The simple reason for keeping this functionality in KVM, is that it already has a mature, production-level page walker (which is already exposed) and creatin

[PATCH 7/7] KVM: selftests: Add tests for KVM_HYPERV_SET_TLB_FLUSH_INHIBIT

2024-10-04 Thread Nikolas Wipper
Add basic test for KVM_HYPERV_SET_TLB_FLUSH_INHIBIT. Since information about the suspension is not communicated to userspace this test checks for suspension by checking whether the thread running a vCPU is still executing. Signed-off-by: Nikolas Wipper --- tools/testing/selftests/kvm/Makefile

[PATCH 5/7] KVM: x86: Implement KVM_HYPERV_SET_TLB_FLUSH_INHIBIT

2024-10-04 Thread Nikolas Wipper
Implement KVM_HYPERV_SET_TLB_FLUSH_INHIBIT for x86. Apart from setting/ clearing the internal TLB flush inhibit flag this ioctl also wakes up vCPUs suspended and waiting on this vCPU. When the flag is set, a vCPU trying to flush the inhibited vCPUs TLB with a Hyper-V hyper-call suspendeds until th

[PATCH 6/7] KVM: x86: Add trace events to track Hyper-V suspensions

2024-10-04 Thread Nikolas Wipper
Add trace events to track suspensions and unsuspensions vCPUs, because of Hyper-V mechanisms. Signed-off-by: Nikolas Wipper --- arch/x86/kvm/hyperv.c | 4 arch/x86/kvm/trace.h | 39 +++ 2 files changed, 43 insertions(+) diff --git a/arch/x86/kvm/hyperv

[PATCH 2/7] KVM: x86: Implement Hyper-V's vCPU suspended state

2024-10-04 Thread Nikolas Wipper
Introduce a suspension state for Hyper-V enlightened vCPUs. Microsoft's "Hypervisor Top Level Functional Specification" (TLFS) introduces this state as a "vCPU that is stopped on a instruction guest boundary, either explicitly or implicitly due to an intercept". The only documented explicit suspens

[PATCH 4/7] KVM: Introduce KVM_HYPERV_SET_TLB_FLUSH_INHIBIT

2024-10-04 Thread Nikolas Wipper
Introduce a new ioctl to control whether remote flushing via Hyper-V hyper-calls should be allowed on a vCPU. When the tlb_flush_inhibit bit is set, vCPUs attempting to flush the TLB of the inhibitied vCPU will be suspended until the bit is clearded. Signed-off-by: Nikolas Wipper --- include/uap

[PATCH 3/7] KVM: x86: Check vCPUs before enqueuing TLB flushes in kvm_hv_flush_tlb()

2024-10-04 Thread Nikolas Wipper
In Hyper-V's kvm_hv_flush_tlb(), check targeted vCPUs and store them in a bitmap before flushing their TLBs. In a subsequent commit, remote TLB flushes may need to be aborted, so allow checking for that before starting to enque the flushes. No functional change intended. Signed-off-by: Nikolas Wi

Re: [PATCH v2] Documentation/process: maintainer-soc: clarify submitting patches

2024-10-04 Thread Kevin Hilman
Krzysztof Kozlowski writes: > Patches for SoCs are expected to be picked up by SoC submaintainers. > The main SoC maintainers should be addressed only in few cases. > > Rewrite the section about maintainer handling to document above > expectation. > > Signed-off-by: Krzysztof Kozlowski > Cc: Lin

Re: [PATCH] docs: dev-tools: Add documentation for the device focused kselftests

2024-10-04 Thread Jonathan Corbet
Shuah Khan writes: > Jon, Let me know if you would like me to take this through kselftest > tree. I'm happy either way - go ahead and grab it if you like, just let me know. Thanks, jon

Re: [PATCH v2 1/6] Add AutoFDO support for Clang build

2024-10-04 Thread Kees Cook
On Thu, Oct 03, 2024 at 05:41:43PM +0200, Peter Zijlstra wrote: > On Wed, Oct 02, 2024 at 04:34:00PM -0700, Rong Xu wrote: > > +Preparation > > +=== > > + > > +Configure the kernel with: > > + > > + .. code-block:: make > > + > > + CONFIG_AUTOFDO_CLANG=y > > + > > + > [...] > > +