No description
Find a file
Gustavo A. R. Silva 93a5b461a4 RDMA/irdma: Replace one-element array with flexible-array member
[ Upstream commit 38313c6d2a ]

One-element and zero-length arrays are deprecated. So, replace
one-element array in struct irdma_qvlist_info with flexible-array
member.

A patch for this was sent a while ago[1]. However, it seems that, at
the time, the changes were partially folded[2][3], and the actual
flexible-array transformation was omitted. This patch fixes that.

The only binary difference seen before/after changes is shown below:

|  drivers/infiniband/hw/irdma/hw.o
| @@ -868,7 +868,7 @@
| drivers/infiniband/hw/irdma/hw.c:484 (discriminator 2)
|	size += struct_size(iw_qvlist, qv_info, rf->msix_count);
|      55b:      imul   $0x45c,%rdi,%rdi
|-     562:      add    $0x10,%rdi
|+     562:      add    $0x4,%rdi

which is, of course, expected as it reflects the mistake made
while folding the patch I've mentioned above.

Worth mentioning is the fact that with this change we save 12 bytes
of memory, as can be inferred from the diff snapshot above. Notice
that:

$ pahole -C rdma_qv_info idrivers/infiniband/hw/irdma/hw.o
struct irdma_qv_info {
	u32                        v_idx;                /*     0     4 */
	u16                        ceq_idx;              /*     4     2 */
	u16                        aeq_idx;              /*     6     2 */
	u8                         itr_idx;              /*     8     1 */

	/* size: 12, cachelines: 1, members: 4 */
	/* padding: 3 */
	/* last cacheline: 12 bytes */
};

Link: https://lore.kernel.org/linux-hardening/20210525230038.GA175516@embeddedor/ [1]
Link: https://lore.kernel.org/linux-hardening/bf46b428deef4e9e89b0ea1704b1f0e5@intel.com/ [2]
Link: https://lore.kernel.org/linux-rdma/20210520143809.819-1-shiraz.saleem@intel.com/T/#u [3]
Fixes: 44d9e52977 ("RDMA/irdma: Implement device initialization definitions")
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/ZMpsQrZadBaJGkt4@work
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-19 12:22:45 +02:00
arch x86/APM: drop the duplicate APM_MINOR_DEV macro 2023-09-19 12:22:45 +02:00
block block/partition: fix signedness issue for Amiga partitions 2023-07-23 13:47:37 +02:00
certs
crypto crypto: api - Use work queue in crypto_destroy_instance 2023-09-19 12:22:33 +02:00
Documentation ACPI: thermal: Drop nocrt parameter 2023-09-02 09:17:07 +02:00
drivers RDMA/irdma: Replace one-element array with flexible-array member 2023-09-19 12:22:45 +02:00
fs pNFS: Fix assignment of xprtdata.cred 2023-09-19 12:22:43 +02:00
include lwt: Check LWTUNNEL_XMIT_CONTINUE strictly 2023-09-19 12:22:34 +02:00
init x86/mm: Initialize text poking earlier 2023-08-08 19:58:33 +02:00
io_uring io_uring: fix drain stalls by invalid SQE 2023-09-19 12:22:39 +02:00
ipc
kernel audit: fix possible soft lockup in __audit_inode_child() 2023-09-19 12:22:39 +02:00
lib radix tree: remove unused variable 2023-08-30 16:18:18 +02:00
LICENSES
mm net-memcg: Fix scope of sockmem pressure indicators 2023-09-19 12:22:33 +02:00
net netrom: Deny concurrent connect(). 2023-09-19 12:22:35 +02:00
samples samples/bpf: fix broken map lookup probe 2023-09-19 12:22:34 +02:00
scripts kbuild: Disable GCOV for *.mod.o 2023-07-23 13:47:17 +02:00
security smackfs: Prevent underflow in smk_set_cipso() 2023-09-19 12:22:39 +02:00
sound ALSA: ac97: Fix possible error value of *rac97 2023-09-19 12:22:40 +02:00
tools selftests/bpf: Clean up fmod_ret in bench_rename test script 2023-09-19 12:22:33 +02:00
usr
virt KVM: Grab a reference to KVM for VM and vCPU stats file descriptors 2023-08-03 10:22:40 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS iio: stx104: Move to addac subdirectory 2023-08-26 14:23:27 +02:00
Makefile Linux 5.15.131 2023-09-06 21:28:41 +01:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.