Re: [PATCH] net/mlx4_core: Avoid impossible mlx4_db_alloc() order value

2025-02-14 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Mon, 10 Feb 2025 09:45:05 -0800 you wrote: > GCC can see that the value range for "order" is capped, but this leads > it to consider that it might be negative, leading to a false positive > warning (with GCC 15 wit

Re: [RFC] Circumventing FineIBT Via Entrypoints

2025-02-14 Thread Jennifer Miller
On Sat, Feb 15, 2025 at 12:11:17AM +, Andrew Cooper wrote: > On 15/02/2025 12:07 am, Jennifer Miller wrote: > > On Fri, Feb 14, 2025 at 11:06:50PM +, Andrew Cooper wrote: > >> On 13/02/2025 11:24 pm, Jennifer Miller wrote: > >>> On Thu, Feb 13, 2025 at 09:24:18PM +, Andrew Cooper wrote:

Re: [RFC] Circumventing FineIBT Via Entrypoints

2025-02-14 Thread Andrew Cooper
On 15/02/2025 12:07 am, Jennifer Miller wrote: > On Fri, Feb 14, 2025 at 11:06:50PM +, Andrew Cooper wrote: >> On 13/02/2025 11:24 pm, Jennifer Miller wrote: >>> On Thu, Feb 13, 2025 at 09:24:18PM +, Andrew Cooper wrote: >>> Still, I hadn't considered misusing readonly/unmapped pages on the

Re: [RFC] Circumventing FineIBT Via Entrypoints

2025-02-14 Thread Jennifer Miller
On Fri, Feb 14, 2025 at 11:06:50PM +, Andrew Cooper wrote: > On 13/02/2025 11:24 pm, Jennifer Miller wrote: > > On Thu, Feb 13, 2025 at 09:24:18PM +, Andrew Cooper wrote: > ; swap stacks as normal > movQWORD PTR gs:[rip+0x7f005f85],rsp # 0x6014 > > mo

Re: [RFC] Circumventing FineIBT Via Entrypoints

2025-02-14 Thread Andrew Cooper
On 13/02/2025 11:24 pm, Jennifer Miller wrote: > On Thu, Feb 13, 2025 at 09:24:18PM +, Andrew Cooper wrote: ; swap stacks as normal movQWORD PTR gs:[rip+0x7f005f85],rsp # 0x6014 movrsp,QWORD PTR gs:[rip+0x7f02c56d] # 0x2c618 >> ... these are memory a

Re: [PATCH] x86/kcfi: Require FRED for FineIBT

2025-02-14 Thread Andrew Cooper
On 14/02/2025 9:54 pm, Kees Cook wrote: > On Fri, Feb 14, 2025 at 07:39:20PM +, Andrew Cooper wrote: >> On 14/02/2025 7:22 pm, Kees Cook wrote: >>> diff --git a/arch/x86/include/asm/cfi.h b/arch/x86/include/asm/cfi.h >>> index ef5e0a698253..dfa2ba4cceca 100644 >>> --- a/arch/x86/include/asm/cfi

Re: [RFC] Circumventing FineIBT Via Entrypoints

2025-02-14 Thread Josh Poimboeuf
On Thu, Feb 13, 2025 at 08:23:34PM +0100, Jann Horn wrote: > On Thu, Feb 13, 2025 at 7:15 AM Jennifer Miller wrote: > > In short, we could have the slowpath branch as you suggested, in the > > slowpath permit the stack switch and preserving of the registers on the > > stack, but then do a sanity c

Re: [PATCH v2][next] UAPI: ndctl / acpi: intel: Avoid multiple -Wflex-array-member-not-at-end warnings

2025-02-14 Thread Dave Jiang
On 2/13/25 5:53 PM, Gustavo A. R. Silva wrote: > -Wflex-array-member-not-at-end was introduced in GCC-14, and we are > getting ready to enable it, globally. > > So, in order to avoid ending up with flexible-array members in the > middle of other structs, we use the `__struct_group()` helper to

Re: [PATCH] x86/kcfi: Require FRED for FineIBT

2025-02-14 Thread Kees Cook
On Fri, Feb 14, 2025 at 07:39:20PM +, Andrew Cooper wrote: > On 14/02/2025 7:22 pm, Kees Cook wrote: > > diff --git a/arch/x86/include/asm/cfi.h b/arch/x86/include/asm/cfi.h > > index ef5e0a698253..dfa2ba4cceca 100644 > > --- a/arch/x86/include/asm/cfi.h > > +++ b/arch/x86/include/asm/cfi.h > >

Re: [PATCH] x86/kcfi: Require FRED for FineIBT

2025-02-14 Thread Andrew Cooper
On 14/02/2025 7:22 pm, Kees Cook wrote: > diff --git a/arch/x86/include/asm/cfi.h b/arch/x86/include/asm/cfi.h > index ef5e0a698253..dfa2ba4cceca 100644 > --- a/arch/x86/include/asm/cfi.h > +++ b/arch/x86/include/asm/cfi.h > @@ -93,7 +93,7 @@ > * > */ > enum cfi_mode { > - CFI_AUTO,

[PATCH net-next 05/14] iavf: negotiate PTP capabilities

2025-02-14 Thread Tony Nguyen
From: Jacob Keller Add a new extended capabilities negotiation to exchange information from the PF about what PTP capabilities are supported by this VF. This requires sending a VIRTCHNL_OP_1588_PTP_GET_CAPS message, and waiting for the response from the PF. Handle this early on during the VF init

[PATCH] x86/kcfi: Require FRED for FineIBT

2025-02-14 Thread Kees Cook
With what appears to be an unavoidable pivot gadget always present in the kernel (the entry code), FineIBT's lack of caller-side CFI hash validation leaves it critically flawed[1]. Require FRED for FineIBT[2] (and probably should also require eXecute-Only memory too), and default to kCFI when CFI i

Re: [RFC PATCH v5 1/7] mseal, system mappings: kernel config and header change

2025-02-14 Thread Jeff Xu
On Fri, Feb 14, 2025 at 7:00 AM Lorenzo Stoakes wrote: > > On Fri, Feb 14, 2025 at 06:39:48AM -0800, Jeff Xu wrote: > > mseal_system_mappings() can be placed in mm.h in this patch, as you > > suggested. But in the near future, it will be moved out of mm.h and find > > a right header. The functiona

Re: [RFC PATCH v5 1/7] mseal, system mappings: kernel config and header change

2025-02-14 Thread Lorenzo Stoakes
On Fri, Feb 14, 2025 at 06:39:48AM -0800, Jeff Xu wrote: > mseal_system_mappings() can be placed in mm.h in this patch, as you > suggested. But in the near future, it will be moved out of mm.h and find > a right header. The functionality belongs to exe namespace, because of > the reasons I put in t

Re: [RFC PATCH v5 1/7] mseal, system mappings: kernel config and header change

2025-02-14 Thread Jeff Xu
On Thu, Feb 13, 2025 at 5:10 PM Liam R. Howlett wrote: > > * Liam R. Howlett [250213 19:14]: > > * Jeff Xu [250213 17:00]: > > > On Thu, Feb 13, 2025 at 12:54 PM Liam R. Howlett > > > wrote: > > > > > > > > > > > > > > > > > VM_SEALED isn't defined in 32-bit systems, and mseal.c isn't part > >

Re: [RFC PATCH v5 2/7] selftests: x86: test_mremap_vdso: skip if vdso is msealed

2025-02-14 Thread Jeff Xu
On Thu, Feb 13, 2025 at 6:52 PM Kees Cook wrote: > > > > On February 13, 2025 2:20:01 PM PST, Jeff Xu wrote: > >On Thu, Feb 13, 2025 at 11:28 AM Kees Cook wrote: > >> > >> > >> > >> On February 13, 2025 6:14:00 AM PST, Jeff Xu wrote: > >> >On Wed, Feb 12, 2025 at 5:04 AM Thomas Weißschuh > >> >

[PATCH v3] scsi: hpsa: Remove deprecated and unnecessary strncpy()

2025-02-14 Thread Thorsten Blum
While replacing strncpy() with strscpy(), Bart Van Assche pointed out that the code occurs inside sysfs write callbacks, which already uses NUL-terminated strings. This allows the string to be passed directly to sscanf() without requiring a temporary copy. Remove the deprecated and unnecessary str

Re: [RFC] Circumventing FineIBT Via Entrypoints

2025-02-14 Thread Peter Zijlstra
On Thu, Feb 13, 2025 at 08:41:16PM +, Andrew Cooper wrote: > The problem is that SYSCALL entry/exit is a toxic operating mode, > because you only have to think about sneezing and another user->kernel > priv-esc appears. For a very brief moment I thought we could leave out the ENDBR there and

Re: [RFC] Circumventing FineIBT Via Entrypoints

2025-02-14 Thread Peter Zijlstra
On Thu, Feb 13, 2025 at 12:53:28PM -0800, Kees Cook wrote: > Right, the "if they can control a function pointer" is the part I'm > focusing on. This attack depends on making an indirect call with a > controlled pointer. Non-FineIBT CFI will protect against that step, > so I think this is only an i

Re: [RFC] Circumventing FineIBT Via Entrypoints

2025-02-14 Thread Peter Zijlstra
On Thu, Feb 13, 2025 at 01:31:30AM +, Andrew Cooper wrote: > But, FRED support is slated for PantherLake/DiamondRapids which haven't > shipped yet, so are no use to the problem right now. FRED also fixes this IBT 'oopsie' IIRC.