Re: [PATCH] neighbour: Fix __randomize_layout crash in struct neighbour

2023-11-27 Thread Kees Cook
On Sat, Nov 25, 2023 at 03:33:58PM -0600, Gustavo A. R. Silva wrote: > Previously, one-element and zero-length arrays were treated as true > flexible arrays, even though they are actually "fake" flex arrays. > The __randomize_layout would leave them untouched at the end of the > struct, similarly t

Re: [RFC PATCH v2 17/19] heki: x86: Update permissions counters during text patching

2023-11-27 Thread Peter Zijlstra
On Mon, Nov 27, 2023 at 10:48:29AM -0600, Madhavan T. Venkataraman wrote: > Apologies for the late reply. I was on vacation. Please see my response below: > > On 11/13/23 02:19, Peter Zijlstra wrote: > > On Sun, Nov 12, 2023 at 09:23:24PM -0500, Mickaël Salaün wrote: > >> From: Madhavan T. Venkata

Re: [RFC PATCH v2 18/19] heki: x86: Protect guest kernel memory using the KVM hypervisor

2023-11-27 Thread Peter Zijlstra
On Mon, Nov 27, 2023 at 11:05:23AM -0600, Madhavan T. Venkataraman wrote: > Apologies for the late reply. I was on vacation. Please see my response below: > > On 11/13/23 02:54, Peter Zijlstra wrote: > > On Sun, Nov 12, 2023 at 09:23:25PM -0500, Mickaël Salaün wrote: > >> From: Madhavan T. Venkata

Re: [RFC PATCH v2 18/19] heki: x86: Protect guest kernel memory using the KVM hypervisor

2023-11-27 Thread Madhavan T. Venkataraman
Apologies for the late reply. I was on vacation. Please see my response below: On 11/13/23 02:54, Peter Zijlstra wrote: > On Sun, Nov 12, 2023 at 09:23:25PM -0500, Mickaël Salaün wrote: >> From: Madhavan T. Venkataraman >> >> Implement a hypervisor function, kvm_protect_memory() that calls the >>

Re: [RFC PATCH v2 17/19] heki: x86: Update permissions counters during text patching

2023-11-27 Thread Madhavan T. Venkataraman
Apologies for the late reply. I was on vacation. Please see my response below: On 11/13/23 02:19, Peter Zijlstra wrote: > On Sun, Nov 12, 2023 at 09:23:24PM -0500, Mickaël Salaün wrote: >> From: Madhavan T. Venkataraman >> >> X86 uses a function called __text_poke() to modify executable code. Thi

Re: [PATCH 0/3] kernfs: Convert from strlcpy() to strscpy()

2023-11-27 Thread Greg Kroah-Hartman
On Thu, Nov 16, 2023 at 11:21:22AM -0800, Kees Cook wrote: > Hi, > > One of the last users of strlcpy() is kernfs, which has some complex > calling hierarchies that needed to be carefully examined. This series > refactors the strlcpy() calls into strscpy() calls, and bubbles up all > changes in re

Re: [PATCH RFC 0/7] sysctl: constify sysctl ctl_tables

2023-11-27 Thread Joel Granados
Hey Thomas In general I would like to see more clarity with the motivation and I would also expect some system testing. My comments inline: On Sat, Nov 25, 2023 at 01:52:49PM +0100, Thomas Weißschuh wrote: > Problem description: > > The kernel contains a lot of struct ctl_table throught the tree

Re: [PATCH 1/2] mux: Turn 'mux' into a flexible array in 'struct mux_chip'

2023-11-27 Thread Dan Carpenter
On Sun, Nov 26, 2023 at 09:08:11AM +0100, Christophe JAILLET wrote: > The 'mux' array stored in 'struct mux_chip' can be changed into a flexible > array. > > This saves: >- a pointer in the structure >- an indirection when accessing the array >- some pointer arithmetic when computing a