1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/Documentation
Arnd Bergmann e910c8e3aa autofs: use flexible array in ioctl structure
Commit df8fc4e934 ("kbuild: Enable -fstrict-flex-arrays=3") introduced a warning
for the autofs_dev_ioctl structure:

In function 'check_name',
    inlined from 'validate_dev_ioctl' at fs/autofs/dev-ioctl.c:131:9,
    inlined from '_autofs_dev_ioctl' at fs/autofs/dev-ioctl.c:624:8:
fs/autofs/dev-ioctl.c:33:14: error: 'strchr' reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread]
   33 |         if (!strchr(name, '/'))
      |              ^~~~~~~~~~~~~~~~~
In file included from include/linux/auto_dev-ioctl.h:10,
                 from fs/autofs/autofs_i.h:10,
                 from fs/autofs/dev-ioctl.c:14:
include/uapi/linux/auto_dev-ioctl.h: In function '_autofs_dev_ioctl':
include/uapi/linux/auto_dev-ioctl.h:112:14: note: source object 'path' of size 0
  112 |         char path[0];
      |              ^~~~

This is easily fixed by changing the gnu 0-length array into a c99
flexible array. Since this is a uapi structure, we have to be careful
about possible regressions but this one should be fine as they are
equivalent here. While it would break building with ancient gcc versions
that predate c99, it helps building with --std=c99 and -Wpedantic builds
in user space, as well as non-gnu compilers. This means we probably
also want it fixed in stable kernels.

Cc: stable@vger.kernel.org
Cc: Kees Cook <keescook@chromium.org>
Cc: Gustavo A. R. Silva" <gustavoars@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20230523081944.581710-1-arnd@kernel.org
2023-05-30 16:42:00 -07:00
..
ABI dmaengine updates for v6.4 2023-05-03 11:11:56 -07:00
accel accel/qaic: Add documentation for AIC100 accelerator driver 2023-04-06 08:23:03 +02:00
accounting Scheduler changes for v6.4: 2023-04-28 14:53:30 -07:00
admin-guide for-6.4/block-2023-05-06 2023-05-06 08:28:58 -07:00
arch A handful of late-arriving documentation fixes, plus one Spanish 2023-05-05 13:16:42 -07:00
arm ARM: SoC devicetree changes for 6.4 2023-04-25 12:11:54 -07:00
arm64 irqchip/gic-v3: Add Rockchip 3588001 erratum workaround 2023-04-18 17:31:17 +01:00
block Documentation/block: drop the request.rst file 2023-05-12 11:04:58 -06:00
bpf lsm/stable-6.4 PR 20230428 2023-04-29 10:17:05 -07:00
cdrom
core-api - Nick Piggin's "shoot lazy tlbs" series, to improve the peformance of 2023-04-27 19:42:02 -07:00
cpu-freq Docs/subsystem-apis: Remove '[The ]Linux' prefixes from titles of listed documents 2023-01-24 15:27:08 -07:00
crypto Docs/subsystem-apis: Remove '[The ]Linux' prefixes from titles of listed documents 2023-01-24 15:27:08 -07:00
dev-tools Mainly singleton patches all over the place. Series of note are: 2023-04-27 19:57:00 -07:00
devicetree dt-bindings: PCI: fsl,imx6q: fix assigned-clocks warning 2023-05-09 08:01:49 +02:00
doc-guide
driver-api pwm: Changes for v6.4-rc1 2023-05-03 11:25:01 -07:00
fault-injection block: null_blk: make fault-injection dynamically configurable per device 2023-04-13 07:38:55 -06:00
fb drm/modes: Introduce more named modes 2022-11-24 12:42:40 +01:00
features s390: enable ARCH_HAS_MEMBARRIER_SYNC_CORE 2023-03-27 17:19:52 +02:00
filesystems autofs: use flexible array in ioctl structure 2023-05-30 16:42:00 -07:00
firmware-guide ACPI: docs: enumeration: Correct reference to the I²C device data type 2023-03-07 14:09:49 +01:00
firmware_class
fpga Documentation: fpga: dfl: Add documentation for DFHv1 2023-01-19 16:07:40 +01:00
gpu Merge tag 'amd-drm-next-6.4-2023-03-17' of https://gitlab.freedesktop.org/agd5f/linux into drm-next 2023-03-20 16:44:36 +10:00
hid It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
hwmon hwmon: (aquacomputer_d5next) Add support for Aquacomputer Aquastream XT 2023-04-21 07:27:23 -07:00
i2c Documentation: i2c: correct spelling 2023-02-15 20:59:44 +01:00
iio
images
infiniband
input Docs/subsystem-apis: Remove '[The ]Linux' prefixes from titles of listed documents 2023-01-24 15:27:08 -07:00
isdn Documentation: isdn: correct spelling 2023-02-10 16:28:13 -08:00
kbuild parisc: update kbuild doc. aliases for parisc64 2023-05-03 17:43:10 +02:00
kernel-hacking Documentation: Add document for false sharing 2023-04-10 16:46:11 -06:00
leds - New Drivers 2023-05-02 10:36:02 -07:00
litmus-tests LKMM scripting updates for v6.4 2023-04-24 12:02:25 -07:00
livepatch Objtool changes for v6.4: 2023-04-28 14:02:54 -07:00
locking docs: locking: refer to the actual existing config names 2023-02-23 12:26:00 -07:00
loongarch This was a not-too-busy cycle for documentation; highlights include: 2022-12-12 17:18:50 -08:00
maintainer docs: rebasing-and-merging: Drop wrong statement about git 2023-03-07 10:26:22 -07:00
mhi
mips
misc-devices
mm - Nick Piggin's "shoot lazy tlbs" series, to improve the peformance of 2023-04-27 19:42:02 -07:00
netlabel
netlink net/handshake: Add a kernel API for requesting a TLSv1.3 handshake 2023-04-19 18:48:48 -07:00
networking docs: networking: fix x25-iface.rst heading & index order 2023-05-10 10:31:46 +01:00
nvdimm
nvme docs, nvme: add a feature and quirk policy document 2022-12-28 05:37:12 -10:00
PCI ixgb: Remove ixgb driver 2023-03-19 10:51:07 +00:00
pcmcia
peci Docs/subsystem-apis: Remove '[The ]Linux' prefixes from titles of listed documents 2023-01-24 15:27:08 -07:00
power regulator: consumer.rst: fix 'regulator_enable' typo. 2023-04-27 21:55:38 +01:00
powerpc docs: powerpc: add POWER9 and POWER10 to CPU families 2022-11-24 23:31:47 +11:00
process Mainly singleton patches all over the place. Series of note are: 2023-04-27 19:57:00 -07:00
RCU doc: Update whatisRCU.rst 2023-04-05 13:47:18 +00:00
riscv RISC-V Patches for the 6.4 Merge Window, Part 1 2023-04-28 16:55:39 -07:00
rust rust: sort uml documentation arch support table 2023-04-06 23:11:04 +02:00
s390 VFIO updates for v6.3-rc1 2023-02-25 11:52:57 -08:00
scheduler sh updates for v6.4 2023-04-27 17:41:23 -07:00
scsi scsi: core: Declare SCSI host template pointer members const 2023-03-24 19:19:19 -04:00
security lsm: move hook comments docs to security/security.c 2023-04-28 11:58:34 -04:00
sound ALSA: docs: Fix code block indentation in ALSA driver example 2023-05-03 08:08:25 +02:00
sphinx docs: Use HTML comments for the kernel-toc SPDX line 2023-02-16 16:06:44 -07:00
sphinx-static docs: Add more information to the HTML sidebar 2023-02-08 13:28:27 -07:00
spi spi: docs: adjust summary to CONFIG_SYSFS_DEPRECATED removal 2023-03-14 13:30:52 +00:00
staging tee: optee: Add SMC for loading OP-TEE image 2023-04-03 08:57:49 +02:00
target scsi: target: Documentation: Correct spelling 2023-02-08 18:49:48 -05:00
timers Documentation: timers: hrtimers: Make hybrid union historical 2023-05-02 10:49:58 -06:00
tools rtla/timerlat: Add auto-analysis only option 2023-04-25 19:26:17 -04:00
trace Minor tracing updates: 2023-05-05 13:11:02 -07:00
translations A handful of late-arriving documentation fixes, plus one Spanish 2023-05-05 13:16:42 -07:00
usb usb: gadget: uvc: Make bmControls attr read/write 2023-03-29 08:51:26 +02:00
userspace-api Char/Misc drivers for 6.4-rc1 2023-04-27 12:07:50 -07:00
virt VFIO updates for v6.4-rc1 2023-05-02 11:56:43 -07:00
w1
watchdog Documentation/watchdog/hpwdt: Fix Format 2023-02-16 17:31:29 -07:00
.gitignore
atomic_bitops.txt
atomic_t.txt Documentation: Fixed a typo in atomic_t.txt 2023-01-03 20:47:04 -08:00
Changes
CodingStyle
conf.py docs: turn off "smart quotes" in the HTML build 2023-04-20 17:53:18 -06:00
docutils.conf
dontdiff scripts: remove bin2c 2023-01-26 12:43:33 +09:00
index.rst docs: create a top-level arch/ directory 2023-03-23 13:27:27 -06:00
Kconfig Documentation: Avoid duplicate Kconfig inclusion 2023-01-19 13:56:34 -07:00
Makefile kbuild: do not print extra logs for V=2 2023-01-22 23:43:32 +09:00
memory-barriers.txt locking/memory-barriers.txt: Improve documentation for writel() example 2023-01-03 20:47:04 -08:00
SubmittingPatches
subsystem-apis.rst doc: add documentation for accel subsystem 2022-11-22 13:14:52 +02:00