treewide: uapi: Replace zero-length arrays with flexible-array membersThere is a regular need in the kernel to provide a way to declarehaving a dynamically sized set of trailing elements in a stru
treewide: uapi: Replace zero-length arrays with flexible-array membersThere is a regular need in the kernel to provide a way to declarehaving a dynamically sized set of trailing elements in a structure.Kernel code should always use “flexible array members”[1] for thesecases. The older style of one-element or zero-length arrays shouldno longer be used[2].This code was transformed with the help of Coccinelle:(linux-5.19-rc2$ spatch --jobs $(getconf _NPROCESSORS_ONLN) --sp-file script.cocci --include-headers --dir . > output.patch)@@identifier S, member, array;type T1, T2;@@struct S { ... T1 member; T2 array[- 0 ];};-fstrict-flex-arrays=3 is coming and we need to land these changesto prevent issues like these in the short future:../fs/minix/dir.c:337:3: warning: 'strcpy' will always overflow; destination buffer has size 0,but the source string has length 2 (including NUL byte) [-Wfortify-source] strcpy(de3->name, "."); ^Since these are all [0] to [] changes, the risk to UAPI is nearly zero. Ifthis breaks anything, we can use a union with a new member name.[1] https://en.wikipedia.org/wiki/Flexible_array_member[2] https://www.kernel.org/doc/html/v5.16/process/deprecated.html#zero-length-and-one-element-arraysLink: https://github.com/KSPP/linux/issues/78Build-tested-by: kernel test robot <[email protected]>Link: https://lore.kernel.org/lkml/62b675ec.wKX6AOZ6cbE71vtF%[email protected]/Acked-by: Dan Williams <[email protected]> # For ndctl.hSigned-off-by: Gustavo A. R. Silva <[email protected]>
show more ...
scsi: fc: Add EDC ELS definitionAdd Exchange Diagnostic Capabilities (EDC) ELS definition and the followingcapability descriptors: - Link Fault Capability Descriptor - Congestion Signaling Cap
scsi: fc: Add EDC ELS definitionAdd Exchange Diagnostic Capabilities (EDC) ELS definition and the followingcapability descriptors: - Link Fault Capability Descriptor - Congestion Signaling Capability DescriptorDefinitions taken from FC-LS-5 r5.01Link: https://lore.kernel.org/r/[email protected]Signed-off-by: James Smart <[email protected]>Signed-off-by: Martin K. Petersen <[email protected]>
scsi: fc: Update formal FPIN descriptor definitionsAdd Fabric Performance Impact Notification (FPIN) descriptor definitionsfor the following FPINs: - Delivery Notification Descriptor - Peer Co
scsi: fc: Update formal FPIN descriptor definitionsAdd Fabric Performance Impact Notification (FPIN) descriptor definitionsfor the following FPINs: - Delivery Notification Descriptor - Peer Congestion Notification Descriptor - Congestion Notification DescriptorLink: https://lore.kernel.org/r/[email protected]Reviewed-by: James Smart <[email protected]>Reviewed-by: Himanshu Madhani <[email protected]>Signed-off-by: Shyam Sundar <[email protected]>Signed-off-by: Nilesh Javali <[email protected]>Signed-off-by: Martin K. Petersen <[email protected]>
scsi: qla2xxx: Change in PUREX to handle FPIN ELS requestsSAN Congestion Management generates ELS pkts whose size can vary and be >64 bytes. Change the PUREX handling code to support non-standard
scsi: qla2xxx: Change in PUREX to handle FPIN ELS requestsSAN Congestion Management generates ELS pkts whose size can vary and be >64 bytes. Change the PUREX handling code to support non-standard ELS pktsize.Link: https://lore.kernel.org/r/[email protected]Reviewed-by: Himanshu Madhani <[email protected]>Signed-off-by: Shyam Sundar <[email protected]>Signed-off-by: Arun Easi <[email protected]>Signed-off-by: Nilesh Javali <[email protected]>Signed-off-by: Martin K. Petersen <[email protected]>
scsi: fc: Update Descriptor definition and add RDF and Link Integrity FPINsUpdate the FC headers for the RDF ELS and populate out the FPIN ELS and theLink integrity FPIN payload.RDF is used to r
scsi: fc: Update Descriptor definition and add RDF and Link Integrity FPINsUpdate the FC headers for the RDF ELS and populate out the FPIN ELS and theLink integrity FPIN payload.RDF is used to register for diagnostic events.FPIN is how the fabric reports a diagnostic event.Specifically, this patch: - Adds the formal definition of TLV descriptors that are now used in a lot of the FC spec. The simplistic fc_fn_desc structure, basically no more than the tlv definition, is removed. - Small tlv helper functions are added as defines. - The list of known Descriptor tags (identifying the TLV) is expanded and a name initializer introduced. - The LSRI descriptor, returned in many new ELS response payloads is added. - The RDF ELS code is added, and the RDF request response structures added. - The FPIN els definition is corrected. - A full definition of a Link Integrity Notification descriptor is added,[mkp: rolled in kbuild warning fix]Link: https://lore.kernel.org/r/[email protected]Reported-by: kbuild test robot <[email protected]>Signed-off-by: James Smart <[email protected]>Reviewed-by: Hannes Reinecke <[email protected]>Signed-off-by: Martin K. Petersen <[email protected]>
scsi: libfc: remove duplicate GPL boilerplate textThe libfc uapi headers already have proper SPDX tags, remove theduplicate boilerplate text.Signed-off-by: Christoph Hellwig <[email protected]>Reviewe
scsi: libfc: remove duplicate GPL boilerplate textThe libfc uapi headers already have proper SPDX tags, remove theduplicate boilerplate text.Signed-off-by: Christoph Hellwig <[email protected]>Reviewed-by: Hannes Reinecke <[email protected]>Signed-off-by: Martin K. Petersen <[email protected]>
scsi: fc: add FPIN ELS definitionT11 has introduced a new Fabric Notifications mechanism whereby the fabriccan notify a port of events occurring in the fabric. The notifications aregiven by the
scsi: fc: add FPIN ELS definitionT11 has introduced a new Fabric Notifications mechanism whereby the fabriccan notify a port of events occurring in the fabric. The notifications aregiven by the FPIN ELS.Add the FPIN ELS definitions to the kernel.Signed-off-by: James Smart <[email protected]>Reviewed-by: Ewan D. Milne <[email protected]>Signed-off-by: Martin K. Petersen <[email protected]>
License cleanup: add SPDX license identifier to uapi header files with a licenseMany user space API headers have licensing information, which is eitherincomplete, badly formatted or just a shortha
License cleanup: add SPDX license identifier to uapi header files with a licenseMany user space API headers have licensing information, which is eitherincomplete, badly formatted or just a shorthand for referring to thelicense under which the file is supposed to be. This makes it hard forcompliance tools to determine the correct license.Update these files with an SPDX license identifier. The identifier waschosen based on the license information in the file.GPL/LGPL licensed headers get the matching GPL/LGPL SPDX licenseidentifier with the added 'WITH Linux-syscall-note' exception, which isthe officially assigned exception identifier for the kernel syscallexception: NOTE! This copyright does *not* cover user programs that use kernel services by normal system calls - this is merely considered normal use of the kernel, and does *not* fall under the heading of "derived work".This exception makes it possible to include GPL headers into non GPLcode, without confusing license compliance tools.Headers which have either explicit dual licensing or are just licensedunder a non GPL license are updated with the corresponding SPDXidentifier and the GPLv2 with syscall exception identifier. The formatis: ((GPL-2.0 WITH Linux-syscall-note) OR SPDX-ID-OF-OTHER-LICENSE)SPDX license identifiers are a legally binding shorthand, which can beused instead of the full boiler plate text. The update does not removeexisting license information as this has to be done on a case by casebasis and the copyright holders might have to be consulted. This willhappen in a separate step.This patch is based on work done by Thomas Gleixner and Kate Stewart andPhilippe Ombredanne. See the previous patch in this series for themethodology of how this patch was researched.Reviewed-by: Kate Stewart <[email protected]>Reviewed-by: Philippe Ombredanne <[email protected]>Reviewed-by: Thomas Gleixner <[email protected]>Signed-off-by: Greg Kroah-Hartman <[email protected]>
uapi: export all headers under uapi directoriesRegularly, when a new header is created in include/uapi/, the developerforgets to add it in the corresponding Kbuild file. This error is usuallydete
uapi: export all headers under uapi directoriesRegularly, when a new header is created in include/uapi/, the developerforgets to add it in the corresponding Kbuild file. This error is usuallydetected after the release is out.In fact, all headers under uapi directories should be exported, thus it'suseless to have an exhaustive list.After this patch, the following files, which were not exported, are nowexported (with make headers_install_all):asm-arc/kvm_para.hasm-arc/ucontext.hasm-blackfin/shmparam.hasm-blackfin/ucontext.hasm-c6x/shmparam.hasm-c6x/ucontext.hasm-cris/kvm_para.hasm-h8300/shmparam.hasm-h8300/ucontext.hasm-hexagon/shmparam.hasm-m32r/kvm_para.hasm-m68k/kvm_para.hasm-m68k/shmparam.hasm-metag/kvm_para.hasm-metag/shmparam.hasm-metag/ucontext.hasm-mips/hwcap.hasm-mips/reg.hasm-mips/ucontext.hasm-nios2/kvm_para.hasm-nios2/ucontext.hasm-openrisc/shmparam.hasm-parisc/kvm_para.hasm-powerpc/perf_regs.hasm-sh/kvm_para.hasm-sh/ucontext.hasm-tile/shmparam.hasm-unicore32/shmparam.hasm-unicore32/ucontext.hasm-x86/hwcap2.hasm-xtensa/kvm_para.hdrm/armada_drm.hdrm/etnaviv_drm.hdrm/vgem_drm.hlinux/aspeed-lpc-ctrl.hlinux/auto_dev-ioctl.hlinux/bcache.hlinux/btrfs_tree.hlinux/can/vxcan.hlinux/cifs/cifs_mount.hlinux/coresight-stm.hlinux/cryptouser.hlinux/fsmap.hlinux/genwqe/genwqe_card.hlinux/hash_info.hlinux/kcm.hlinux/kcov.hlinux/kfd_ioctl.hlinux/lightnvm.hlinux/module.hlinux/nbd-netlink.hlinux/nilfs2_api.hlinux/nilfs2_ondisk.hlinux/nsfs.hlinux/pr.hlinux/qrtr.hlinux/rpmsg.hlinux/sched/types.hlinux/sed-opal.hlinux/smc.hlinux/smc_diag.hlinux/stm.hlinux/switchtec_ioctl.hlinux/vfio_ccw.hlinux/wil6210_uapi.hrdma/bnxt_re-abi.hNote that I have removed from this list the files which are generated in everyexported directories (like .install or .install.cmd).Thanks to Julien Floret <[email protected]> for the tip to get allsubdirs with a pure makefile command.For the record, note that exported files for asm directories are a mix offiles listed by: - include/uapi/asm-generic/Kbuild.asm; - arch/<arch>/include/uapi/asm/Kbuild; - arch/<arch>/include/asm/Kbuild.Signed-off-by: Nicolas Dichtel <[email protected]>Acked-by: Daniel Vetter <[email protected]>Acked-by: Russell King <[email protected]>Acked-by: Mark Salter <[email protected]>Acked-by: Michael Ellerman <[email protected]> (powerpc)Signed-off-by: Masahiro Yamada <[email protected]>
Add type 0x28 NVME type code to scsi fc headersSigned-off-by: James Smart <[email protected]>Acked-by: Johannes Thumshirn <[email protected]>Reviewed-by: Jay Freyensee <james_p_freyensee@linu
Add type 0x28 NVME type code to scsi fc headersSigned-off-by: James Smart <[email protected]>Acked-by: Johannes Thumshirn <[email protected]>Reviewed-by: Jay Freyensee <[email protected]>Signed-off-by: Christoph Hellwig <[email protected]>
UAPI: (Scripted) Disintegrate include/scsi/fcSigned-off-by: David Howells <[email protected]>Acked-by: Arnd Bergmann <[email protected]>Acked-by: Thomas Gleixner <[email protected]>Acked-by: Mich
UAPI: (Scripted) Disintegrate include/scsi/fcSigned-off-by: David Howells <[email protected]>Acked-by: Arnd Bergmann <[email protected]>Acked-by: Thomas Gleixner <[email protected]>Acked-by: Michael Kerrisk <[email protected]>Acked-by: Paul E. McKenney <[email protected]>Acked-by: Dave Jones <[email protected]>
UAPI: (Scripted) Set up UAPI Kbuild filesSet up empty UAPI Kbuild files to be populated by the header splitter.Signed-off-by: David Howells <[email protected]>Acked-by: Arnd Bergmann <arnd@arn
UAPI: (Scripted) Set up UAPI Kbuild filesSet up empty UAPI Kbuild files to be populated by the header splitter.Signed-off-by: David Howells <[email protected]>Acked-by: Arnd Bergmann <[email protected]>Acked-by: Thomas Gleixner <[email protected]>Acked-by: Paul E. McKenney <[email protected]>Acked-by: Dave Jones <[email protected]>