Re: [PATCH v2] x86/stackprotector: Work around strict Clang TLS symbol requirements

2024-10-15 Thread Ard Biesheuvel
On Wed, 16 Oct 2024 at 04:10, Nathan Chancellor wrote: > > On Tue, Oct 15, 2024 at 12:56:57PM +0200, Ard Biesheuvel wrote: > > On Mon, 14 Oct 2024 at 22:59, Kees Cook wrote: > > > > > > On Wed, Oct 09, 2024 at 02:43:53PM +0200, Ard Biesheuvel wrote: > > > > However, if a non-TLS definition of the

Re: [PATCH] hv: hyperv.h: Annotate vmbus_channel_gpadl_header with __counted_by()

2024-10-15 Thread kernel test robot
Hi Thorsten, kernel test robot noticed the following build warnings: [auto build test WARNING on kees/for-next/pstore] [also build test WARNING on kees/for-next/kspp linus/master v6.12-rc3 next-20241015] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting

Re: [PATCH 5/5][next] uapi: net: Avoid -Wflex-array-member-not-at-end warnings

2024-10-15 Thread Kuniyuki Iwashima
From: "Gustavo A. R. Silva" Date: Tue, 15 Oct 2024 18:33:23 -0600 > diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c > index b068651984fe..aac82a4af36f 100644 > --- a/net/appletalk/ddp.c > +++ b/net/appletalk/ddp.c > @@ -1832,7 +1832,7 @@ static int atalk_compat_routing_ioctl(struct sock *sk

Re: [PATCH 4/5][next] uapi: net: arp: Avoid -Wflex-array-member-not-at-end warnings

2024-10-15 Thread Kuniyuki Iwashima
From: "Gustavo A. R. Silva" Date: Tue, 15 Oct 2024 18:32:43 -0600 > -Wflex-array-member-not-at-end was introduced in GCC-14, and we are > getting ready to enable it, globally. > > Address the following warnings by changing the type of the middle struct > members in a couple of composite structs,

Re: [PATCH 1/5][next] net: dev: Introduce struct sockaddr_legacy

2024-10-15 Thread Kuniyuki Iwashima
From: "Gustavo A. R. Silva" Date: Tue, 15 Oct 2024 18:27:16 -0600 > We are currently working on enabling the -Wflex-array-member-not-at-end > compiler option. This option has helped us detect several objects of > the type `struct sockaddr` that appear in the middle of composite > structures like `

Re: [PATCH v2] x86/stackprotector: Work around strict Clang TLS symbol requirements

2024-10-15 Thread Nathan Chancellor
On Tue, Oct 15, 2024 at 12:56:57PM +0200, Ard Biesheuvel wrote: > On Mon, 14 Oct 2024 at 22:59, Kees Cook wrote: > > > > On Wed, Oct 09, 2024 at 02:43:53PM +0200, Ard Biesheuvel wrote: > > > However, if a non-TLS definition of the symbol in question is visible in > > > the same compilation unit (w

[PATCH 5/5][next] uapi: net: Avoid -Wflex-array-member-not-at-end warnings

2024-10-15 Thread Gustavo A. R. Silva
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Address the following warnings by changing the type of the middle struct members in a couple of composite structs, which are currently causing trouble, from `struct sockaddr` to `struct sockad

[PATCH 4/5][next] uapi: net: arp: Avoid -Wflex-array-member-not-at-end warnings

2024-10-15 Thread Gustavo A. R. Silva
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Address the following warnings by changing the type of the middle struct members in a couple of composite structs, which are currently causing trouble, from `struct sockaddr` to `struct sockad

[PATCH 3/5][next] uapi: wireless: Avoid -Wflex-array-member-not-at-end warnings

2024-10-15 Thread Gustavo A. R. Silva
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Address the following warnings by changing the type of the middle struct members in various composite structs, which are currently causing trouble, from `struct sockaddr` to `struct sockaddr_l

[PATCH 2/5][next] nfsd: avoid -Wflex-array-member-not-at-end warnings

2024-10-15 Thread Gustavo A. R. Silva
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Address the following warnings by changing the type of the middle struct members in `struct nfsd_genl_rqstp`, which are currently causing trouble, from `struct sockaddr` to `struct sockaddr_le

[PATCH 1/5][next] net: dev: Introduce struct sockaddr_legacy

2024-10-15 Thread Gustavo A. R. Silva
We are currently working on enabling the -Wflex-array-member-not-at-end compiler option. This option has helped us detect several objects of the type `struct sockaddr` that appear in the middle of composite structures like `struct rtentry`, `struct compat_rtentry`, and others: include/uapi/linux/w

[PATCH 0/5][next] net: Avoid thousands of -Wflex-array-member-not-at-end warnings

2024-10-15 Thread Gustavo A. R. Silva
This series aims to resolve thousands of -Wflex-array-member-not-at-end warnings by introducing `struct sockaddr_legacy`. The intention is to use it to replace the type of several struct members in the middle of composite structures, currently of type `struct sockaddr`. These middle struct members

Re: [PATCH v2 2/2] wifi: mwifiex: Annotate mwifiex_ie_types_wildcard_ssid_params with __counted_by()

2024-10-15 Thread Brian Norris
Hi Alper, On Tue, Oct 08, 2024 at 01:20:55AM +0300, Alper Nebi Yasak wrote: > Add the __counted_by compiler attribute to the flexible array member > `ssid` to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and > CONFIG_FORTIFY_SOURCE. > > Signed-off-by: Alper Nebi Yasak > --- > I've mimi

Re: [PATCH v2 1/2] wifi: mwifiex: Fix memcpy() field-spanning write warning in mwifiex_config_scan()

2024-10-15 Thread Brian Norris
On Tue, Oct 08, 2024 at 01:20:54AM +0300, Alper Nebi Yasak wrote: > Replace one-element array with a flexible-array member in `struct > mwifiex_ie_types_wildcard_ssid_params` to fix the following warning > on a MT8173 Chromebook (mt8173-elm-hana): > > [ 356.775250] [ cut here ]---

[RESEND PATCH] nfs: Annotate struct pnfs_commit_array with __counted_by()

2024-10-15 Thread Thorsten Blum
Add the __counted_by compiler attribute to the flexible array member buckets to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. Compile-tested only. Signed-off-by: Thorsten Blum --- include/linux/nfs_xdr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH v3 1/1] mseal: update mseal.rst

2024-10-15 Thread Jeff Xu
Hi Andrew, If there is no objection, please pull this v3 patch to mm-unstable. I believe I already responded to all comments related to this patch. This will keep mseal.rst up-to-date with current implementation of memory sealing. Thanks -Jeff On Mon, Oct 7, 2024 at 9:09 PM wrote: > > From: J

Re: [PATCH] pstore: Fix uaf when backend is unregistered

2024-10-15 Thread Zach Wade
On 2024/10/9 21:36, Zach Wade wrote: On 2024/10/9 1:23, Kees Cook wrote: On Wed, Oct 09, 2024 at 01:10:14AM +0800, Zach Wade wrote: when unload pstore_blk, we will unlink the pstore file and set pos->dentry to NULL, but simple_unlink(d_inode(root), pos->dentry) may free inode of pos->dentr

Re: [PATCH v2] x86/stackprotector: Work around strict Clang TLS symbol requirements

2024-10-15 Thread Ard Biesheuvel
On Mon, 14 Oct 2024 at 22:59, Kees Cook wrote: > > On Wed, Oct 09, 2024 at 02:43:53PM +0200, Ard Biesheuvel wrote: > > However, if a non-TLS definition of the symbol in question is visible in > > the same compilation unit (which amounts to the whole of vmlinux if LTO > > is enabled), it will drop

[PATCH] hv: hyperv.h: Annotate vmbus_channel_gpadl_header with __counted_by()

2024-10-15 Thread Thorsten Blum
Add the __counted_by compiler attribute to the flexible array member range to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. Compile-tested only. Signed-off-by: Thorsten Blum --- include/linux/hyperv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif