Re: [PATCH v12 3/39] prctl: arch-agnostic prctl for shadow stack

2024-09-03 Thread Yury Khrustalev
On Thu, Aug 29, 2024 at 12:27:19AM +0100, Mark Brown wrote: > Three architectures (x86, aarch64, riscv) have announced support for > shadow stacks with fairly similar functionality. While x86 is using > arch_prctl() to control the functionality neither arm64 nor riscv uses > that interface so this

Re: [PATCH v12 4/39] mman: Add map_shadow_stack() flags

2024-09-03 Thread Yury Khrustalev
On Thu, Aug 29, 2024 at 12:27:20AM +0100, Mark Brown wrote: > In preparation for adding arm64 GCS support make the map_shadow_stack() > SHADOW_STACK_SET_TOKEN flag generic and add _SET_MARKER. The existing > flag indicates that a token usable for stack switch should be added to > the top of the new

Re: [PATCH v12 6/39] arm64/gcs: Document the ABI for Guarded Control Stacks

2024-09-03 Thread Yury Khrustalev
On Thu, Aug 29, 2024 at 12:27:22AM +0100, Mark Brown wrote: > Add some documentation of the userspace ABI for Guarded Control Stacks. > > Reviewed-by: Thiago Jung Bauermann > Reviewed-by: Catalin Marinas > Signed-off-by: Mark Brown Acked-by: Yury Khrustalev

Re: [PATCH v12 17/39] arm64/hwcap: Add hwcap for GCS

2024-09-03 Thread Yury Khrustalev
On Thu, Aug 29, 2024 at 12:27:33AM +0100, Mark Brown wrote: > Provide a hwcap to enable userspace to detect support for GCS. > > Reviewed-by: Thiago Jung Bauermann > Reviewed-by: Catalin Marinas > Signed-off-by: Mark Brown Acked-by: Yury Khrustalev

Re: [PATCH v12 21/39] arm64/gcs: Ensure that new threads have a GCS

2024-09-03 Thread Yury Khrustalev
On Thu, Aug 29, 2024 at 12:27:37AM +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 v12 23/39] arm64/mm: Implement map_shadow_stack()

2024-09-03 Thread Yury Khrustalev
On Thu, Aug 29, 2024 at 12:27:39AM +0100, Mark Brown wrote: > As discussed extensively in the changelog for the addition of this > syscall on x86 ("x86/shstk: Introduce map_shadow_stack syscall") the > existing mmap() and madvise() syscalls do not map entirely well onto the > security requirements

Re: [PATCH v12 25/39] arm64/signal: Expose GCS state in signal frames

2024-09-03 Thread Yury Khrustalev
On Thu, Aug 29, 2024 at 12:27:41AM +0100, Mark Brown wrote: > Add a context for the GCS state and include it in the signal context when > running on a system that supports GCS. We reuse the same flags that the > prctl() uses to specify which GCS features are enabled and also provide the > current G

Re: [PATCH 3/3] riscv: mm: Do not restrict mmap address based on hint

2024-09-03 Thread Palmer Dabbelt
On Mon, 26 Aug 2024 19:24:38 PDT (-0700), c...@cyyself.name wrote: On Aug 27, 2024, at 00:36, Charlie Jenkins wrote: The hint address should not forcefully restrict the addresses returned by mmap as this causes mmap to report ENOMEM when there is memory still available. Fixing in this way

Re: [PATCH 0/3] riscv: mm: Do not restrict mmap address based on hint

2024-09-03 Thread patchwork-bot+linux-riscv
Hello: This series was applied to riscv/linux.git (fixes) by Palmer Dabbelt : On Mon, 26 Aug 2024 09:36:44 -0700 you wrote: > There have been a couple of reports that using the hint address to > restrict the address returned by mmap hint address has caused issues in > applications. A different so

Re: [PATCH v3 0/3] RISC-V: mm: do not treat hint addr on mmap as the upper bound to search

2024-09-03 Thread patchwork-bot+linux-riscv
Hello: This series was applied to riscv/linux.git (fixes) by Palmer Dabbelt : On Tue, 27 Aug 2024 16:05:15 +0800 you wrote: > Previous patch series[1][2] changes a mmap behavior that treats the hint > address as the upper bound of the mmap address range. The motivation of the > previous patch ser

Re: [PATCH HID 4/7] HID: bpf: allow BPF programs to force using hid-generic

2024-09-03 Thread Benjamin Tissoires
On Sep 03 2024, Peter Hutterer wrote: > On Tue, Sep 03, 2024 at 01:14:34AM +0900, Benjamin Tissoires wrote: > > The use case is when we fix a device through HID-BPF, 99% of the cases > > we want the device to use hid-generic now instead of a dedicated device. > > s/dedicated device/dedicated drive

[PATCH] Documentation: maintainer: Improve grammar in mailing list participation section

2024-09-03 Thread Steven Davis
In the section "Mailing list participation", the first few lines had grammatical errors and overall was not clear. I fixed this by adding "The" before "Linux kernel" and specifying that the mailing list is for developers. Signed-off-by: Steven Davis --- .../maintainer/feature-and-driver-maintain

Re: [PATCH] Documentation: maintainer: Improve grammar in mailing list participation section

2024-09-03 Thread Jakub Kicinski
On Tue, 3 Sep 2024 11:19:25 -0400 Steven Davis wrote: > In the section "Mailing list participation", the first few > lines had grammatical errors and overall was not clear. Not clear in what way? > I fixed this by adding "The" before "Linux kernel" and > specifying that the mailing list is for d

Re: [PATCH v12 15/39] KVM: arm64: Manage GCS access and registers for guests

2024-09-03 Thread Marc Zyngier
On Thu, 29 Aug 2024 00:27:31 +0100, Mark Brown wrote: > > GCS introduces a number of system registers for EL1 and EL0, on systems > with GCS we need to context switch them and expose them to VMMs to allow > guests to use GCS. > > In order to allow guests to use GCS we also need to configure > HC

Re: [PATCH HID 6/7] HID: bpf: Allow to control the connect mask of hid-generic from BPF

2024-09-03 Thread Benjamin Tissoires
On Sep 03 2024, Peter Hutterer wrote: > On Tue, Sep 03, 2024 at 01:14:36AM +0900, Benjamin Tissoires wrote: > > We make struct hid_device_id writeable and use the .driver_data field > > of hid-generic as the connect mask. > > I think this needs to be spelled out a bit more: for this to work the >

Re: [PATCH v12 26/39] arm64/ptrace: Expose GCS via ptrace and core files

2024-09-03 Thread Catalin Marinas
On Mon, Sep 02, 2024 at 07:58:28PM +0100, Mark Brown wrote: > On Mon, Sep 02, 2024 at 07:56:32PM +0100, Catalin Marinas wrote: > > On Thu, Aug 29, 2024 at 12:27:42AM +0100, Mark Brown wrote: > > > > +static int gcs_get(struct task_struct *target, > > > +const struct user_regset *regset

Re: [PATCH v2 6/6] alloc_tag: config to store page allocation tag refs in page flags

2024-09-03 Thread Suren Baghdasaryan
On Sun, Sep 1, 2024 at 10:16 PM Andrew Morton wrote: > > On Sun, 1 Sep 2024 21:41:28 -0700 Suren Baghdasaryan > wrote: > > > Add CONFIG_PGALLOC_TAG_USE_PAGEFLAGS to store allocation tag > > references directly in the page flags. This removes dependency on > > page_ext and results in better perf

[PATCH] docs: submitting-patches: Advertise b4

2024-09-03 Thread Mark Brown
ed at <https://b4.docs.kernel.org/en/latest/>. This can +help with things like tracking dependencies, running checkpatch and +with formatting and sending mails. + + References -- --- base-commit: 7c626ce4bae1ac14f60076d00eafe71af30450ba change-id: 20240903-documentatio

[PATCH] docs: submitting-patches: Advertise b4

2024-09-03 Thread Mark Brown
ed at <https://b4.docs.kernel.org/en/latest/>. This can +help with things like tracking dependencies, running checkpatch and +with formatting and sending mails. + + References -- --- base-commit: 7c626ce4bae1ac14f60076d00eafe71af30450ba change-id: 20240903-documentatio

[PATCH] docs: submitting-patches: Advertise b4

2024-09-03 Thread Mark Brown
ed at <https://b4.docs.kernel.org/en/latest/>. This can +help with things like tracking dependencies, running checkpatch and +with formatting and sending mails. + + References -- --- base-commit: 7c626ce4bae1ac14f60076d00eafe71af30450ba change-id: 20240903-documentatio

Re: [PATCH] docs: submitting-patches: Advertise b4

2024-09-03 Thread Shuah Khan
50ba change-id: 20240903-documentation-b4-advert-18016e83d7d9 Best regards, Looks good to me. Thanks for the update. Reviewed-by: Shuah Khan thanks, -- Shuah

Re: [PATCH v2 5/6] alloc_tag: make page allocation tag reference size configurable

2024-09-03 Thread Suren Baghdasaryan
On Sun, Sep 1, 2024 at 10:09 PM Andrew Morton wrote: > > On Sun, 1 Sep 2024 21:41:27 -0700 Suren Baghdasaryan > wrote: > > > Introduce CONFIG_PGALLOC_TAG_REF_BITS to control the size of the > > page allocation tag references. When the size is configured to be > > less than a direct pointer, the

Re: [PATCH v2 5/6] alloc_tag: make page allocation tag reference size configurable

2024-09-03 Thread Kent Overstreet
On Tue, Sep 03, 2024 at 06:07:28PM GMT, Suren Baghdasaryan wrote: > On Sun, Sep 1, 2024 at 10:09 PM Andrew Morton > wrote: > > > > On Sun, 1 Sep 2024 21:41:27 -0700 Suren Baghdasaryan > > wrote: > > > > > Introduce CONFIG_PGALLOC_TAG_REF_BITS to control the size of the > > > page allocation ta

Re: [PATCH v2 6/6] alloc_tag: config to store page allocation tag refs in page flags

2024-09-03 Thread John Hubbard
On 9/3/24 11:19 AM, Suren Baghdasaryan wrote: On Sun, Sep 1, 2024 at 10:16 PM Andrew Morton wrote: On Sun, 1 Sep 2024 21:41:28 -0700 Suren Baghdasaryan wrote: ... We shouldn't be offering things like this to our users. If we cannot decide, how can they? Thinking about the ease of use, t

Re: [PATCH v2 5/6] alloc_tag: make page allocation tag reference size configurable

2024-09-03 Thread Suren Baghdasaryan
On Tue, Sep 3, 2024 at 6:17 PM Kent Overstreet wrote: > > On Tue, Sep 03, 2024 at 06:07:28PM GMT, Suren Baghdasaryan wrote: > > On Sun, Sep 1, 2024 at 10:09 PM Andrew Morton > > wrote: > > > > > > On Sun, 1 Sep 2024 21:41:27 -0700 Suren Baghdasaryan > > > wrote: > > > > > > > Introduce CONFIG

Re: [PATCH v2 6/6] alloc_tag: config to store page allocation tag refs in page flags

2024-09-03 Thread John Hubbard
On 9/3/24 6:25 PM, John Hubbard wrote: On 9/3/24 11:19 AM, Suren Baghdasaryan wrote: On Sun, Sep 1, 2024 at 10:16 PM Andrew Morton wrote: On Sun,  1 Sep 2024 21:41:28 -0700 Suren Baghdasaryan wrote: ... We shouldn't be offering things like this to our users.  If we cannot decide, how can t

Re: [PATCH v2 6/6] alloc_tag: config to store page allocation tag refs in page flags

2024-09-03 Thread Matthew Wilcox
On Tue, Sep 03, 2024 at 06:25:52PM -0700, John Hubbard wrote: > The more I read this story, the clearer it becomes that this should be > entirely done by the build system: set it, or don't set it, automatically. > > And if you can make it not even a kconfig item at all, that's probably even > bett

Re: [PATCH v2 6/6] alloc_tag: config to store page allocation tag refs in page flags

2024-09-03 Thread Kent Overstreet
On Tue, Sep 03, 2024 at 06:25:52PM GMT, John Hubbard wrote: > On 9/3/24 11:19 AM, Suren Baghdasaryan wrote: > > On Sun, Sep 1, 2024 at 10:16 PM Andrew Morton > > wrote: > > > On Sun, 1 Sep 2024 21:41:28 -0700 Suren Baghdasaryan > > > wrote: > ... > > > We shouldn't be offering things like this

Re: [PATCH] docs: submitting-patches: Advertise b4

2024-09-03 Thread Mauro Carvalho Chehab
running checkpatch and > +with formatting and sending mails. > + > + No need for two blank lines (yeah, there's a mix on this file of using one or two blank lines for paragraphs). I would also add quick example(s) on how to use it for common workflows. > References > --