Re: [PATCH][next] wifi: rtw89: coex: Fix -Wstringop-overflow warnings in _append_tdma()

2023-11-13 Thread Gustavo A. R. Silva
On 11/13/23 18:37, Ping-Ke Shih wrote: -Original Message- From: Gustavo A. R. Silva Sent: Tuesday, November 14, 2023 3:36 AM To: Ping-Ke Shih ; Kalle Valo Cc: linux-wirel...@vger.kernel.org; linux-ker...@vger.kernel.org; Gustavo A. R. Silva ; linux-hardening@vger.kernel.org Subje

RE: [PATCH][next] wifi: rtw89: coex: Fix -Wstringop-overflow warnings in _append_tdma()

2023-11-13 Thread Ping-Ke Shih
> -Original Message- > From: Gustavo A. R. Silva > Sent: Tuesday, November 14, 2023 3:36 AM > To: Ping-Ke Shih ; Kalle Valo > Cc: linux-wirel...@vger.kernel.org; linux-ker...@vger.kernel.org; Gustavo A. > R. Silva > ; linux-hardening@vger.kernel.org > Subject: [PATCH][next] wifi: rtw89

[net-next 06/14] net/mlx5: simplify mlx5_set_driver_version string assignments

2023-11-13 Thread Saeed Mahameed
From: Justin Stitt In total, just assigning this version string takes: (1) strncpy()'s (5) strlen()'s (3) strncat()'s (1) snprintf()'s (4) max_t()'s Moreover, `strncpy` is deprecated [1] and `strncat` really shouldn't be used either [2]. With this in mind, let's simply use a single `snprintf`.

[PATCH][next] hwmon: (aspeed-pwm-tacho) Fix -Wstringop-overflow warning in aspeed_create_fan_tach_channel()

2023-11-13 Thread Gustavo A. R. Silva
Based on the documentation below, the maximum number of Fan tach channels is 16: Documentation/devicetree/bindings/hwmon/aspeed-pwm-tacho.txt:45: 45 - aspeed,fan-tach-ch : should specify the Fan tach input channel. 46 integer value in the range 0 through 15, with 0 indicating 47

[PATCH][next] wifi: rtw89: coex: Fix -Wstringop-overflow warnings in _append_tdma()

2023-11-13 Thread Gustavo A. R. Silva
Copy a couple of structures directly, instead of using `memcpy()`. This addesses the following -Wstringop-overflow warnings: drivers/net/wireless/realtek/rtw89/coex.c: In function ‘_append_tdma’: ./include/linux/fortify-string.h:57:33: warning: writing 8 bytes into a region of size 0 [-Wstringop-

Re: [PATCH] qnx4: fix to avoid panic due to buffer overflow

2023-11-13 Thread Anders Larsen
On 2023-11-13 10:25 Ronald Monthero wrote: > On Mon, Nov 13, 2023 at 2:16 AM Anders Larsen wrote: > > On 2023-11-12 10:53 Ronald Monthero wrote: > > > qnx4 dir name length can vary to be of maximum size > > > QNX4_NAME_MAX or QNX4_SHORT_NAME_MAX depending on whether > > > 'link info' entry is stor

Re: [PATCH V2] usb: musb: Check requset->buf before use to avoid crash issue

2023-11-13 Thread xingxing luo
On Wed, Nov 1, 2023 at 3:31 PM Greg KH wrote: > > On Wed, Nov 01, 2023 at 03:14:21PM +0800, Xingxing Luo wrote: > > When connecting USB to PC, there is a very low probability of kernel > > crash. The reason is that in ep0_txstate(), the buf member of struct > > usb_request used may be a null point

Re: [PATCH] qnx4: fix to avoid panic due to buffer overflow

2023-11-13 Thread Ronald Monthero
On Mon, Nov 13, 2023 at 2:16 AM Anders Larsen wrote: > > On 2023-11-12 10:53 Ronald Monthero wrote: > > qnx4 dir name length can vary to be of maximum size > > QNX4_NAME_MAX or QNX4_SHORT_NAME_MAX depending on whether > > 'link info' entry is stored and the status byte is set. > > So to avoid buff

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

2023-11-13 Thread Peter Zijlstra
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 > KVM_HC_PROTECT_MEMORY hypercall to request the KVM hypervisor to > set specified permissions on a list of guest pages. > > U

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

2023-11-13 Thread Peter Zijlstra
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. This > patching function is used by many features such as KProbes and FTrace. > > Update the permissions counters for the text