Re: [PATCH] mtd: rawnand: denali: Annotate struct denali_chip with __counted_by

2023-09-15 Thread Gustavo A. R. Silva
On 9/15/23 14:12, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIF

Re: [PATCH] HID: uhid: refactor deprecated strncpy

2023-09-15 Thread Kees Cook
On Fri, Sep 15, 2023 at 09:36:23AM +0200, David Rheinsberg wrote: > Hi > > On Fri, Sep 15, 2023, at 7:13 AM, Kees Cook wrote: > >> - /* @hid is zero-initialized, strncpy() is correct, strlcpy() not */ > >> - len = min(sizeof(hid->name), sizeof(ev->u.create2.name)) - 1; > >> - strncpy(hid->name,

Re: [PATCH] mtd: rawnand: ingenic: Annotate struct ingenic_nfc with __counted_by

2023-09-15 Thread Gustavo A. R. Silva
On 9/15/23 14:12, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIF

Re: [PATCH] mtd: rawnand: meson: Annotate struct meson_nfc_nand_chip with __counted_by

2023-09-15 Thread Gustavo A. R. Silva
On 9/15/23 14:12, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIF

Re: [PATCH] mtd: rawnand: marvell: Annotate struct marvell_nand_chip with __counted_by

2023-09-15 Thread Gustavo A. R. Silva
On 9/15/23 14:12, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIF

Re: [PATCH] mtd: rawnand: sunxi: Annotate struct sunxi_nand_chip with __counted_by

2023-09-15 Thread Gustavo A. R. Silva
On 9/15/23 14:13, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIF

Re: [PATCH] udf: Annotate struct udf_bitmap with __counted_by

2023-09-15 Thread Gustavo A. R. Silva
On 9/15/23 14:14, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIF

Re: [PATCH] mtd: rawnand: renesas: Annotate struct rnand_chip with __counted_by

2023-09-15 Thread Gustavo A. R. Silva
On 9/15/23 14:12, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIF

Re: [PATCH] aio: Annotate struct kioctx_table with __counted_by

2023-09-15 Thread Gustavo A. R. Silva
On 9/15/23 14:14, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIF

Re: [PATCH] NFS/flexfiles: Annotate struct nfs4_ff_layout_segment with __counted_by

2023-09-15 Thread Gustavo A. R. Silva
On 9/15/23 14:14, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIF

Re: [PATCH] afs: Annotate struct afs_addr_list with __counted_by

2023-09-15 Thread Gustavo A. R. Silva
On 9/15/23 14:14, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIF

Re: [PATCH] ceph: Annotate struct ceph_monmap with __counted_by

2023-09-15 Thread Gustavo A. R. Silva
On 9/15/23 14:15, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIF

Re: [PATCH] ceph: Annotate struct ceph_osd_request with __counted_by

2023-09-15 Thread Gustavo A. R. Silva
On 9/15/23 14:15, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIF

Re: [PATCH] afs: Annotate struct afs_permits with __counted_by

2023-09-15 Thread Gustavo A. R. Silva
On 9/15/23 14:14, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIF

Re: [PATCH] ocfs2: Annotate struct ocfs2_slot_info with __counted_by

2023-09-15 Thread Gustavo A. R. Silva
On 9/15/23 14:15, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIF

Re: [PATCH] tracing/timerlat: Hotplug support for the user-space interface

2023-09-15 Thread kernel test robot
Hi Daniel, kernel test robot noticed the following build warnings: [auto build test WARNING on linus/master] [also build test WARNING on v6.6-rc1 next-20230915] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--bas

Re: [PATCH][next] net: spider_net: Use size_add() in call to struct_size()

2023-09-15 Thread Geoff Levand
On 9/15/23 14:25, Gustavo A. R. Silva wrote: > If, for any reason, the open-coded arithmetic causes a wraparound, > the protection that `struct_size()` adds against potential integer > overflows is defeated. Fix this by hardening call to `struct_size()` > with `size_add()`. > > Fixes: 3f1071ec39f7

Re: [PATCH v4 01/18] cgroup/misc: Add per resource callbacks for CSS events

2023-09-15 Thread Haitao Huang
On Fri, 15 Sep 2023 12:58:11 -0500, Tejun Heo wrote: On Fri, Sep 15, 2023 at 07:55:45AM -1000, Tejun Heo wrote: On Tue, Sep 12, 2023 at 09:06:18PM -0700, Haitao Huang wrote: > @@ -37,6 +37,11 @@ struct misc_res { >u64 max; >atomic64_t usage; >atomic64_t events; > + > + /* per reso

[PATCH 3/9] mm/damon/core: use nr_accesses_bp as a source of damos_before_apply tracepoint

2023-09-15 Thread SeongJae Park
damos_before_apply tracepoint is exposing access rate of DAMON regions using nr_accesses field of regions, which was actually used by DAMOS in the past. However, it has changed to use nr_accesses_bp instead. Update the tracepoint to expose the value that DAMOS is really using. Note that it doesn'

[PATCH] x86/mm/dump_pagetables: Add SLAB_VIRTUAL knowledge

2023-09-15 Thread Kees Cook
Add the markings for the SLAB_VIRTUAL area. Cc: Matteo Rizzo Cc: Jann Horn Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x...@kernel.org Cc: "H. Peter Anvin" Signed-off-by: Kees Cook --- This is on top of the SLAB_VIRTU

Re: [PATCH v4 01/18] cgroup/misc: Add per resource callbacks for CSS events

2023-09-15 Thread Haitao Huang
Hi Jarkko On Wed, 13 Sep 2023 04:39:06 -0500, Jarkko Sakkinen wrote: On Wed Sep 13, 2023 at 7:06 AM EEST, Haitao Huang wrote: From: Kristen Carlson Accardi Consumers of the misc cgroup controller might need to perform separate actions for Cgroups Subsystem State(CSS) events: cgroup alloc

Re: [PATCH v4 15/18] x86/sgx: Prepare for multiple LRUs

2023-09-15 Thread Haitao Huang
On Wed, 13 Sep 2023 10:42:52 -0500, Jarkko Sakkinen wrote: On Wed Sep 13, 2023 at 7:06 AM EEST, Haitao Huang wrote: Add sgx_can_reclaim() wrapper and encapsulate direct references to the global LRU list in the reclaimer functions so that they can be called with an LRU list per EPC cgroup.

Re: [PATCH v4 12/18] x86/sgx: Add EPC OOM path to forcefully reclaim EPC

2023-09-15 Thread Haitao Huang
On Wed, 13 Sep 2023 10:34:28 -0500, Jarkko Sakkinen wrote: +++ b/arch/x86/kernel/cpu/sgx/encl.h @@ -39,6 +39,7 @@ enum sgx_encl_flags { SGX_ENCL_DEBUG = BIT(1), SGX_ENCL_CREATED= BIT(2), SGX_ENCL_INITIALIZED= BIT(3), + SGX_ENCL_OOM

<    1   2