Re: [PATCH] leds: lp3952: replace deprecated strncpy with strscpy

2023-09-23 Thread Kees Cook
On Fri, Sep 22, 2023 at 03:27:17PM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. > > We expect `dest` to be NUL-terminated due to its use with dev_err. > > l

Re: [PATCH] isdn: replace deprecated strncpy with strscpy

2023-09-23 Thread Kees Cook
On Fri, Sep 22, 2023 at 11:58:06AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. > > We expect `iclock->name` to be NUL-terminated based on its use within > p

Re: [PATCH] isdn: kcapi: replace deprecated strncpy with strscpy_pad

2023-09-23 Thread Kees Cook
On Fri, Sep 22, 2023 at 11:49:14AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. > > `buf` is used in this context as a data buffer with 64 bytes of memory >

Re: [PATCH] Input: synaptics-rmi4 - replace deprecated strncpy

2023-09-23 Thread Kees Cook
On Thu, Sep 21, 2023 at 09:58:11AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1] > > Let's use memcpy() as the bounds have already been checked and this > decays into a simple byte copy from one buffer to another removing any > ambiguity tha

Re: [PATCH] Input: axp20x-pek - refactor deprecated strncpy

2023-09-23 Thread Kees Cook
On Thu, Sep 21, 2023 at 09:17:25AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. > > Ensuring we have a trailing NUL-byte and checking the length of bytes > c

Re: [PATCH] IB/hfi1: replace deprecated strncpy

2023-09-23 Thread Kees Cook
On Fri, Sep 22, 2023 at 09:25:39AM -0500, Dean Luick wrote: > On 9/22/2023 5:29 AM, Leon Romanovsky wrote: > > > > On Thu, 21 Sep 2023 07:17:47 +, Justin Stitt wrote: > >> `strncpy` is deprecated for use on NUL-terminated destination strings > >> [1] and as such we should prefer more robust and

Re: [PATCH v3] hwmon: refactor deprecated strncpy

2023-09-23 Thread Kees Cook
On Thu, Sep 21, 2023 at 05:41:46AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > Let's refactor this kcalloc() + strncpy() into a kmemdup_nul() which has > more obvious behavior and is less error prone. > > To avoid truncating the last

Re: [PATCH] iio: adc: stm32-adc: replace deprecated strncpy

2023-09-23 Thread Kees Cook
On Thu, Sep 21, 2023 at 04:54:00AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > We expect adc->chan_name[val] to be NUL-terminated based on ch_name's > use within

Re: [PATCH] i3c: replace deprecated strncpy

2023-09-23 Thread Kees Cook
On Thu, Sep 21, 2023 at 03:51:04AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > We expect adap->name to be NUL-terminated based on i2c_adapter name use: > | dev_db

Re: [PATCH v4] EDAC/mc_sysfs: refactor deprecated strncpy

2023-09-23 Thread Kees Cook
On Mon, Sep 18, 2023 at 07:47:29AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We've already calculated bounds, possible truncation with '\0' or '\n' > and manually NUL-terminated. The situation is now just a literal byte > copy from

Re: [PATCH 08/14] net: ipa: Annotate struct ipa_power with __counted_by

2023-09-23 Thread Kees Cook
On Sat, Sep 23, 2023 at 07:09:19AM -0500, Alex Elder wrote: > On 9/22/23 12:28 PM, 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

Re: [PATCH 04/14] net: hns: Annotate struct ppe_common_cb with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:28, 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] mfd: iqs62x: Annotate struct iqs62x_fw_blk with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:53, 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] gpiolib: cdev: Annotate struct linereq with __counted_by

2023-09-23 Thread Linus Walleij
On Fri, Sep 22, 2023 at 7:52 PM 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

Re: [PATCH 10/14] net: openvswitch: Annotate struct dp_meter_instance with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:28, 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] soc: qcom: smem: Annotate struct qcom_smem with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:54, 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] firewire: Annotate struct fw_node with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:53, 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 08/14] net: ipa: Annotate struct ipa_power with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:28, 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] eeprom: at24: Annotate struct at24_data with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:51, 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] hte: Annotate struct hte_device with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:53, 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] gpiolib: cdev: Annotate struct linereq with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:52, 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] hpet: Annotate struct hpets with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:53, 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] qed/red_ll2: Fix undefined behavior bug in struct qed_ll2_info

2023-09-23 Thread Kees Cook
On September 23, 2023 6:15:59 PM PDT, "Gustavo A. R. Silva" wrote: >The flexible structure (a structure that contains a flexible-array member >at the end) `qed_ll2_tx_packet` is nested within the second layer of >`struct qed_ll2_info`: > >struct qed_ll2_tx_packet { > ... >/* Flexibl

Re: [GIT PULL] hardening fixes for v6.6-rc3

2023-09-23 Thread Linus Torvalds
On Fri, 22 Sept 2023 at 20:49, Kees Cook wrote: > > 2) __cplusplus is relatively common in UAPI headers already: >$ git grep __cplusplus -- include/uapi | wc -l >58 Look a bit closer. Most of those - by far - is for the usual #if defined(__cplusplus) extern "C" { #endif pattern.

Re: [PATCH] iio: sx9324: replace deprecated strncpy

2023-09-23 Thread Jonathan Cameron
On Thu, 21 Sep 2023 07:01:01 + Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > `prop` is defined as this string literal with size 30 (including null): > | #defin

Re: [PATCH] video: fbdev: mmp: Annotate struct mmphw_ctrl with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:51, 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] virt: acrn: Annotate struct vm_memory_region_batch with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:51, 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] KVM: Annotate struct kvm_irq_routing_table with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:51, 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] reset: Annotate struct reset_control_array with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:52, 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] irqchip/imx-intmux: Annotate struct intmux_data with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:51, 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] ALSA: usx2y: Annotate struct snd_usx2y_urb_seq with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:50, 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] x86/platform/uv: Annotate struct uv_rtc_timer_head with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:51, 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] virtio_console: Annotate struct port_buffer with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:51, 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] regulator: da9063: Annotate struct da9063_regulators with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:52, 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

[PATCH] qed/red_ll2: Fix undefined behavior bug in struct qed_ll2_info

2023-09-23 Thread Gustavo A. R. Silva
The flexible structure (a structure that contains a flexible-array member at the end) `qed_ll2_tx_packet` is nested within the second layer of `struct qed_ll2_info`: struct qed_ll2_tx_packet { ... /* Flexible Array of bds_set determined by max_bds_per_packet */ struct {

Re: [PATCH] misc: bcm-vk: Annotate struct bcm_vk_wkent with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:50, 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] irqdomain: Annotate struct irq_domain with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:51, 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] memory: atmel-ebi: Annotate struct atmel_ebi_dev with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:52, 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] gcov: Annotate struct gcov_iterator with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:52, 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] mailbox: zynqmp: Annotate struct zynqmp_ipi_pdata with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:53, 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] libata: Annotate struct ata_cpr_log with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:52, 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] watch_queue: Annotate struct watch_filter with __counted_by

2023-09-23 Thread Siddh Raman Pant
On Fri, 22 Sep 2023 23:24:08 +0530, 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 indexi

Re: [PATCH] ALSA: hda: Annotate struct hda_conn_list with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:50, 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] ASoC: apple: mca: Annotate struct mca_data with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:50, 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] bus: vexpress-config: Annotate struct vexpress_syscfg_func with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:52, 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 07/14] net: mana: Annotate struct mana_rxq with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:28, 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] serial: 8250_pci1xxxx: Annotate struct pci1xxxx_8250 with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:52, 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] watch_queue: Annotate struct watch_filter with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:54, 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 08/14] net: ipa: Annotate struct ipa_power with __counted_by

2023-09-23 Thread Alex Elder
On 9/22/23 12:28 PM, 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] ALSA: usx2y: Annotate struct snd_usx2y_urb_seq with __counted_by

2023-09-23 Thread Takashi Iwai
On Fri, 22 Sep 2023 19:50:47 +0200, 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 ind

Re: [PATCH] ALSA: hda: Annotate struct hda_conn_list with __counted_by

2023-09-23 Thread Takashi Iwai
On Fri, 22 Sep 2023 19:50:42 +0200, 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 ind

Re: [PATCH] scsi: target: tcmu: Annotate struct tcmu_tmr with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:53, 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] ACPI: PRM: Annotate struct prm_module_info with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:53, 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] drivers: thermal: tsens: Annotate struct tsens_priv with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:53, 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] mxser: Annotate struct mxser_board with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:52, 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] sparc: Annotate struct cpuinfo_tree with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:52, 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] regulator: da9062: Annotate struct da9062_regulators with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:53, 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] hwmon: Annotate struct gsc_hwmon_platform_data with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:50, 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] platform/chrome: wilco_ec: Annotate struct ec_event_queue with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:51, 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] power: supply: axp20x_ac_power: Annotate struct axp20x_ac_power with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On Fri, Sep 22, 2023 at 10:53:55AM -0700, 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

Re: [PATCH] power: supply: axp20x_usb_power: Annotate struct axp20x_usb_power with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On Fri, Sep 22, 2023 at 10:53:58AM -0700, 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

Re: [PATCH] regulator: mc13xxx: Annotate struct mc13xxx_regulator_priv with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On Fri, Sep 22, 2023 at 10:54:02AM -0700, 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

Re: [PATCH] mm/memcg: Annotate struct mem_cgroup_threshold_ary with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On Fri, Sep 22, 2023 at 10:53:28AM -0700, 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

Re: [PATCH] libnvdimm: Annotate struct nd_region with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On Fri, Sep 22, 2023 at 10:52:39AM -0700, 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

Re: [PATCH] module: Annotate struct module_notes_attrs with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On Fri, Sep 22, 2023 at 10:52:53AM -0700, 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

Re: [PATCH] spi: mchp-pci1xxxx: Annotate struct pci1xxxx_spi with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On Fri, Sep 22, 2023 at 10:53:23AM -0700, 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

Re: [PATCH] i3c: dw: Annotate struct dw_i3c_xfer with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On Fri, Sep 22, 2023 at 10:50:11AM -0700, 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

Re: [PATCH] PCI: hv: Annotate struct hv_dr_state with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On Fri, Sep 22, 2023 at 10:52:57AM -0700, 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

Re: [PATCH] cxl/acpi: Annotate struct cxl_cxims_data with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On Fri, Sep 22, 2023 at 10:53:19AM -0700, 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

Re: [PATCH] i3c: svc: Annotate struct svc_i3c_xfer with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On Fri, Sep 22, 2023 at 10:50:23AM -0700, 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

Re: [PATCH] platform/surface: aggregator: Annotate struct ssam_event with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On Fri, Sep 22, 2023 at 10:54:37AM -0700, 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

Re: [PATCH] media: i2c: Annotate struct i2c_atr with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On Fri, Sep 22, 2023 at 10:54:25AM -0700, 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

Re: [PATCH] platform/x86: hp-bioscfg: Annotate struct bios_args with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On Fri, Sep 22, 2023 at 10:54:21AM -0700, 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

Re: [PATCH] input: mt: Annotate struct input_mt with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:50, 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] Input: Annotate struct input_leds with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:50, 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] input: Annotate struct evdev_client with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:50, 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] i3c/master/mipi-i3c-hci: Annotate struct hci_rings_data with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:50, 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] i3c: master: cdns: Annotate struct cdns_i3c_xfer with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:50, 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] pinctrl: uniphier: Annotate struct uniphier_pinctrl_reg_region with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:50, 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] i2c: mux: demux-pinctrl: Annotate struct i2c_demux_pinctrl_priv with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:49, 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] media: v4l2-event: Annotate struct v4l2_subscribed_event with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:49, 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] media: allegro: Annotate struct mcu_msg_push_buffers_internal with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:49, 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_replay_map with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:49, 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 1/9] drm/amd/pm: Annotate struct smu10_voltage_dependency_table with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:32, 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 12/14] net: openvswitch: Annotate struct dp_meter with __counted_by

2023-09-23 Thread Gustavo A. R. Silva
On 9/22/23 11:28, 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