Re: [PATCH v2] ntp: remove accidental integer wrap-around

2024-05-24 Thread Thomas Gleixner
On Fri, May 17 2024 at 20:22, Justin Stitt wrote: > time_maxerror is unconditionally incremented and the result is checked > against NTP_PHASE_LIMIT, but the increment itself can overflow, > resulting in wrap-around to negative space. > > The user can supply some crazy values which is causing the o

Re: [PATCH v2] ntp: remove accidental integer wrap-around

2024-05-24 Thread Thomas Gleixner
On Fri, May 24 2024 at 14:09, Thomas Gleixner wrote: > On Fri, May 17 2024 at 20:22, Justin Stitt wrote: > I dug into history to find a Fixes tag. That unearthed something > interesting. Exactly this check used to be there until commit > eea83d896e31 ("ntp: NTP4 user space bits update") which land

Re: [PATCH v3 2/6] mm/slab: Plumb kmem_buckets into __do_kmalloc_node()

2024-05-24 Thread Vlastimil Babka
On 4/24/24 11:40 PM, Kees Cook wrote: > To be able to choose which buckets to allocate from, make the buckets > available to the lower level kmalloc interfaces by adding them as the > first argument. Where the bucket is not available, pass NULL, which means > "use the default system kmalloc bucket

Re: [PATCH v3 4/6] mm/slab: Introduce kmem_buckets_create() and family

2024-05-24 Thread Vlastimil Babka
On 4/24/24 11:41 PM, Kees Cook wrote: > Dedicated caches are available for fixed size allocations via > kmem_cache_alloc(), but for dynamically sized allocations there is only > the global kmalloc API's set of buckets available. This means it isn't > possible to separate specific sets of dynamicall

Re: [PATCH v3 0/6] slab: Introduce dedicated bucket allocator

2024-05-24 Thread Kent Overstreet
On Wed, Apr 24, 2024 at 02:40:57PM -0700, Kees Cook wrote: > Hi, > > Series change history: > > v3: > - clarify rationale and purpose in commit log > - rebase to -next (CONFIG_CODE_TAGGING) > - simplify calling styles and split out bucket plumbing more cleanly > - consolidate kmem_bucket

Re: [PATCH v3 2/6] mm/slab: Plumb kmem_buckets into __do_kmalloc_node()

2024-05-24 Thread Kent Overstreet
On Wed, Apr 24, 2024 at 02:40:59PM -0700, Kees Cook wrote: > To be able to choose which buckets to allocate from, make the buckets > available to the lower level kmalloc interfaces by adding them as the > first argument. Where the bucket is not available, pass NULL, which means > "use the default s

[PATCH] Bluetooth: Use sizeof(*pointer) instead of sizeof(type)

2024-05-24 Thread Erick Archer
It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer --- drivers/bluetooth/btrtl.c | 2 +- drivers/bluetoot

[PATCH] Input: keyboard - use sizeof(*pointer) instead of sizeof(type)

2024-05-24 Thread Erick Archer
It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer --- drivers/input/keyboard/atkbd.c | 2 +- drivers/in

Re: [PATCH] Bluetooth: Use sizeof(*pointer) instead of sizeof(type)

2024-05-24 Thread patchwork-bot+bluetooth
Hello: This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz : On Fri, 24 May 2024 19:11:51 +0200 you wrote: > It is preferred to use sizeof(*pointer) instead of sizeof(type) > due to the type of the variable can change and one needs not > change the former (un

Re: [PATCH v2] ntp: remove accidental integer wrap-around

2024-05-24 Thread Justin Stitt
Thomas, I appreciate you reviewing my patches. On Fri, May 24, 2024 at 5:09 AM Thomas Gleixner wrote: > > On Fri, May 17 2024 at 20:22, Justin Stitt wrote: > > time_maxerror is unconditionally incremented and the result is checked > > against NTP_PHASE_LIMIT, but the increment itself can overflo

Re: [PATCH v2] ntp: remove accidental integer wrap-around

2024-05-24 Thread Thomas Gleixner
Justin! On Fri, May 24 2024 at 15:43, Justin Stitt wrote: > I appreciate you reviewing my patches. You're welcome! > On Fri, May 24, 2024 at 5:09 AM Thomas Gleixner wrote: >> So instead of turning the clock back, we might be better off to actually >> put the normalization in place at the assign