From 2d7b8f2b5269b54a043ac278e043ab69b50068ae Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 2 Mar 2023 11:35:51 +0100 Subject: refresh --- ...ovide-a-common-kernel-installation-script.patch | 1085 -------------------- 0001-readfile-implement-readfile-syscall.patch | 2 +- 0001-vsmp-driver.patch | 2 +- ...ts-coccicheck-use-grep-E-instead-of-egrep.patch | 29 - 0003-selftests-add-readfile-2-selftests.patch | 2 +- series | 2 - usb.patch | 2 +- 7 files changed, 4 insertions(+), 1120 deletions(-) delete mode 100644 0001-Kbuild-provide-a-common-kernel-installation-script.patch delete mode 100644 0003-scripts-coccicheck-use-grep-E-instead-of-egrep.patch diff --git a/0001-Kbuild-provide-a-common-kernel-installation-script.patch b/0001-Kbuild-provide-a-common-kernel-installation-script.patch deleted file mode 100644 index 6681fdf6857af..0000000000000 --- a/0001-Kbuild-provide-a-common-kernel-installation-script.patch +++ /dev/null @@ -1,1085 +0,0 @@ -From b5f96fdf4fa53462a63219ac354b73b961b6df5f Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman -Date: Sat, 3 Apr 2021 18:15:28 +0200 -Subject: [PATCH] Kbuild: provide a common kernel installation script - -All arches seem to do almost exactly the same thing, so unify them all -into a single script that can be much easier to maintain. - -Signed-off-by: Greg Kroah-Hartman ---- - arch/arm/boot/Makefile | 6 - - arch/arm/boot/install.sh | 66 -------------------- - arch/arm64/boot/Makefile | 4 - - arch/arm64/boot/install.sh | 60 ------------------ - arch/ia64/Makefile | 2 - arch/ia64/install.sh | 40 ------------ - arch/m68k/Makefile | 2 - arch/m68k/install.sh | 52 --------------- - arch/nds32/boot/Makefile | 4 - - arch/nios2/boot/Makefile | 2 - arch/nios2/boot/install.sh | 52 --------------- - arch/parisc/Makefile | 4 - - arch/parisc/boot/Makefile | 2 - arch/parisc/boot/install.sh | 65 ------------------- - arch/parisc/install.sh | 66 -------------------- - arch/powerpc/boot/Makefile | 4 - - arch/powerpc/boot/install.sh | 55 ---------------- - arch/riscv/boot/Makefile | 4 - - arch/riscv/boot/install.sh | 60 ------------------ - arch/s390/boot/Makefile | 2 - arch/s390/boot/install.sh | 30 --------- - arch/sh/boot/compressed/install.sh | 56 ---------------- - arch/sparc/boot/Makefile | 2 - arch/sparc/boot/install.sh | 50 --------------- - arch/x86/boot/Makefile | 2 - arch/x86/boot/install.sh | 59 ----------------- - scripts/install.sh | 122 +++++++++++++++++++++++++++++++++++++ - 27 files changed, 142 insertions(+), 731 deletions(-) - delete mode 100644 arch/arm/boot/install.sh - delete mode 100644 arch/arm64/boot/install.sh - delete mode 100644 arch/ia64/install.sh - delete mode 100644 arch/m68k/install.sh - delete mode 100644 arch/nios2/boot/install.sh - delete mode 100644 arch/parisc/boot/install.sh - delete mode 100644 arch/parisc/install.sh - delete mode 100644 arch/powerpc/boot/install.sh - delete mode 100644 arch/riscv/boot/install.sh - delete mode 100644 arch/s390/boot/install.sh - delete mode 100644 arch/sh/boot/compressed/install.sh - delete mode 100644 arch/sparc/boot/install.sh - delete mode 100644 arch/x86/boot/install.sh - create mode 100755 scripts/install.sh - ---- a/arch/arm/boot/Makefile -+++ b/arch/arm/boot/Makefile -@@ -104,15 +104,15 @@ initrd: - (echo You must specify INITRD; exit -1) - - install: -- $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \ -+ $(CONFIG_SHELL) $(srctree)/scripts/install.sh "$(KERNELRELEASE)" \ - $(obj)/Image System.map "$(INSTALL_PATH)" - - zinstall: -- $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \ -+ $(CONFIG_SHELL) $(srctree)/scripts/install.sh "$(KERNELRELEASE)" \ - $(obj)/zImage System.map "$(INSTALL_PATH)" - - uinstall: -- $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \ -+ $(CONFIG_SHELL) $(srctree)/scripts/install.sh "$(KERNELRELEASE)" \ - $(obj)/uImage System.map "$(INSTALL_PATH)" - - subdir- := bootp compressed dts ---- a/arch/arm/boot/install.sh -+++ /dev/null -@@ -1,66 +0,0 @@ --#!/bin/sh --# --# arch/arm/boot/install.sh --# --# This file is subject to the terms and conditions of the GNU General Public --# License. See the file "COPYING" in the main directory of this archive --# for more details. --# --# Copyright (C) 1995 by Linus Torvalds --# --# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin --# Adapted from code in arch/i386/boot/install.sh by Russell King --# --# "make install" script for arm architecture --# --# Arguments: --# $1 - kernel version --# $2 - kernel image file --# $3 - kernel map file --# $4 - default install path (blank if root directory) --# -- --verify () { -- if [ ! -f "$1" ]; then -- echo "" 1>&2 -- echo " *** Missing file: $1" 1>&2 -- echo ' *** You need to run "make" before "make install".' 1>&2 -- echo "" 1>&2 -- exit 1 -- fi --} -- --# Make sure the files actually exist --verify "$2" --verify "$3" -- --# User may have a custom install script --if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi --if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi -- --if [ "$(basename $2)" = "zImage" ]; then --# Compressed install -- echo "Installing compressed kernel" -- base=vmlinuz --else --# Normal install -- echo "Installing normal kernel" -- base=vmlinux --fi -- --if [ -f $4/$base-$1 ]; then -- mv $4/$base-$1 $4/$base-$1.old --fi --cat $2 > $4/$base-$1 -- --# Install system map file --if [ -f $4/System.map-$1 ]; then -- mv $4/System.map-$1 $4/System.map-$1.old --fi --cp $3 $4/System.map-$1 -- --if [ -x /sbin/loadmap ]; then -- /sbin/loadmap --else -- echo "You have to install it yourself" --fi ---- a/arch/arm64/boot/Makefile -+++ b/arch/arm64/boot/Makefile -@@ -37,9 +37,9 @@ $(obj)/Image.lzo: $(obj)/Image FORCE - $(call if_changed,lzo) - - install: -- $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ -+ $(CONFIG_SHELL) $(srctree)/scripts/install.sh $(KERNELRELEASE) \ - $(obj)/Image System.map "$(INSTALL_PATH)" - - zinstall: -- $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ -+ $(CONFIG_SHELL) $(srctree)/scripts/install.sh $(KERNELRELEASE) \ - $(obj)/Image.gz System.map "$(INSTALL_PATH)" ---- a/arch/arm64/boot/install.sh -+++ /dev/null -@@ -1,60 +0,0 @@ --#!/bin/sh --# --# arch/arm64/boot/install.sh --# --# This file is subject to the terms and conditions of the GNU General Public --# License. See the file "COPYING" in the main directory of this archive --# for more details. --# --# Copyright (C) 1995 by Linus Torvalds --# --# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin --# Adapted from code in arch/i386/boot/install.sh by Russell King --# --# "make install" script for the AArch64 Linux port --# --# Arguments: --# $1 - kernel version --# $2 - kernel image file --# $3 - kernel map file --# $4 - default install path (blank if root directory) --# -- --verify () { -- if [ ! -f "$1" ]; then -- echo "" 1>&2 -- echo " *** Missing file: $1" 1>&2 -- echo ' *** You need to run "make" before "make install".' 1>&2 -- echo "" 1>&2 -- exit 1 -- fi --} -- --# Make sure the files actually exist --verify "$2" --verify "$3" -- --# User may have a custom install script --if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi --if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi -- --if [ "$(basename $2)" = "Image.gz" ]; then --# Compressed install -- echo "Installing compressed kernel" -- base=vmlinuz --else --# Normal install -- echo "Installing normal kernel" -- base=vmlinux --fi -- --if [ -f $4/$base-$1 ]; then -- mv $4/$base-$1 $4/$base-$1.old --fi --cat $2 > $4/$base-$1 -- --# Install system map file --if [ -f $4/System.map-$1 ]; then -- mv $4/System.map-$1 $4/System.map-$1.old --fi --cp $3 $4/System.map-$1 ---- a/arch/ia64/Makefile -+++ b/arch/ia64/Makefile -@@ -77,7 +77,7 @@ archheaders: - CLEAN_FILES += vmlinux.gz - - install: vmlinux.gz -- sh $(srctree)/arch/ia64/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)" -+ sh $(srctree)/scripts/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)" - - define archhelp - echo '* compressed - Build compressed kernel image' ---- a/arch/ia64/install.sh -+++ /dev/null -@@ -1,40 +0,0 @@ --#!/bin/sh --# --# arch/ia64/install.sh --# --# This file is subject to the terms and conditions of the GNU General Public --# License. See the file "COPYING" in the main directory of this archive --# for more details. --# --# Copyright (C) 1995 by Linus Torvalds --# --# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin --# --# "make install" script for ia64 architecture --# --# Arguments: --# $1 - kernel version --# $2 - kernel image file --# $3 - kernel map file --# $4 - default install path (blank if root directory) --# -- --# User may have a custom install script -- --if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi --if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi -- --# Default install - same as make zlilo -- --if [ -f $4/vmlinuz ]; then -- mv $4/vmlinuz $4/vmlinuz.old --fi -- --if [ -f $4/System.map ]; then -- mv $4/System.map $4/System.old --fi -- --cat $2 > $4/vmlinuz --cp $3 $4/System.map -- --test -x /usr/sbin/elilo && /usr/sbin/elilo ---- a/arch/m68k/Makefile -+++ b/arch/m68k/Makefile -@@ -143,4 +143,4 @@ archheaders: - $(Q)$(MAKE) $(build)=arch/m68k/kernel/syscalls all - - install: -- sh $(srctree)/arch/m68k/install.sh $(KERNELRELEASE) vmlinux.gz System.map "$(INSTALL_PATH)" -+ sh $(srctree)/scripts/install.sh $(KERNELRELEASE) vmlinux.gz System.map "$(INSTALL_PATH)" ---- a/arch/m68k/install.sh -+++ /dev/null -@@ -1,52 +0,0 @@ --#!/bin/sh --# --# This file is subject to the terms and conditions of the GNU General Public --# License. See the file "COPYING" in the main directory of this archive --# for more details. --# --# Copyright (C) 1995 by Linus Torvalds --# --# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin --# --# "make install" script for m68k architecture --# --# Arguments: --# $1 - kernel version --# $2 - kernel image file --# $3 - kernel map file --# $4 - default install path (blank if root directory) --# -- --verify () { -- if [ ! -f "$1" ]; then -- echo "" 1>&2 -- echo " *** Missing file: $1" 1>&2 -- echo ' *** You need to run "make" before "make install".' 1>&2 -- echo "" 1>&2 -- exit 1 -- fi --} -- --# Make sure the files actually exist --verify "$2" --verify "$3" -- --# User may have a custom install script -- --if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi --if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi -- --# Default install - same as make zlilo -- --if [ -f $4/vmlinuz ]; then -- mv $4/vmlinuz $4/vmlinuz.old --fi -- --if [ -f $4/System.map ]; then -- mv $4/System.map $4/System.old --fi -- --cat $2 > $4/vmlinuz --cp $3 $4/System.map -- --sync ---- a/arch/nds32/boot/Makefile -+++ b/arch/nds32/boot/Makefile -@@ -8,9 +8,9 @@ $(obj)/Image.gz: $(obj)/Image FORCE - $(call if_changed,gzip) - - install: $(obj)/Image -- $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ -+ $(CONFIG_SHELL) $(srctree)/scripts/install.sh $(KERNELRELEASE) \ - $(obj)/Image System.map "$(INSTALL_PATH)" - - zinstall: $(obj)/Image.gz -- $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ -+ $(CONFIG_SHELL) $(srctree)/scripts/install.sh $(KERNELRELEASE) \ - $(obj)/Image.gz System.map "$(INSTALL_PATH)" ---- a/arch/nios2/boot/Makefile -+++ b/arch/nios2/boot/Makefile -@@ -32,4 +32,4 @@ $(obj)/compressed/vmlinux: $(obj)/vmlinu - $(Q)$(MAKE) $(build)=$(obj)/compressed $@ - - install: -- sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)" -+ sh $(srctree)/scripts/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)" ---- a/arch/nios2/boot/install.sh -+++ /dev/null -@@ -1,52 +0,0 @@ --#!/bin/sh --# --# This file is subject to the terms and conditions of the GNU General Public --# License. See the file "COPYING" in the main directory of this archive --# for more details. --# --# Copyright (C) 1995 by Linus Torvalds --# --# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin --# --# "make install" script for nios2 architecture --# --# Arguments: --# $1 - kernel version --# $2 - kernel image file --# $3 - kernel map file --# $4 - default install path (blank if root directory) --# -- --verify () { -- if [ ! -f "$1" ]; then -- echo "" 1>&2 -- echo " *** Missing file: $1" 1>&2 -- echo ' *** You need to run "make" before "make install".' 1>&2 -- echo "" 1>&2 -- exit 1 -- fi --} -- --# Make sure the files actually exist --verify "$2" --verify "$3" -- --# User may have a custom install script -- --if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi --if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi -- --# Default install - same as make zlilo -- --if [ -f $4/vmlinuz ]; then -- mv $4/vmlinuz $4/vmlinuz.old --fi -- --if [ -f $4/System.map ]; then -- mv $4/System.map $4/System.old --fi -- --cat $2 > $4/vmlinuz --cp $3 $4/System.map -- --sync ---- a/arch/parisc/Makefile -+++ b/arch/parisc/Makefile -@@ -164,10 +164,10 @@ vmlinuz: vmlinux - endif - - install: -- $(CONFIG_SHELL) $(srctree)/arch/parisc/install.sh \ -+ $(CONFIG_SHELL) $(srctree)/scripts/install.sh \ - $(KERNELRELEASE) vmlinux System.map "$(INSTALL_PATH)" - zinstall: -- $(CONFIG_SHELL) $(srctree)/arch/parisc/install.sh \ -+ $(CONFIG_SHELL) $(srctree)/scripts/install.sh \ - $(KERNELRELEASE) vmlinuz System.map "$(INSTALL_PATH)" - - CLEAN_FILES += lifimage ---- a/arch/parisc/boot/Makefile -+++ b/arch/parisc/boot/Makefile -@@ -17,5 +17,5 @@ $(obj)/compressed/vmlinux: FORCE - $(Q)$(MAKE) $(build)=$(obj)/compressed $@ - - install: $(CONFIGURE) $(obj)/bzImage -- sh -x $(srctree)/$(obj)/install.sh $(KERNELRELEASE) $(obj)/bzImage \ -+ sh -x $(srctree)/scripts/install.sh $(KERNELRELEASE) $(obj)/bzImage \ - System.map "$(INSTALL_PATH)" ---- a/arch/parisc/boot/install.sh -+++ /dev/null -@@ -1,65 +0,0 @@ --#!/bin/sh --# --# arch/parisc/install.sh, derived from arch/i386/boot/install.sh --# --# This file is subject to the terms and conditions of the GNU General Public --# License. See the file "COPYING" in the main directory of this archive --# for more details. --# --# Copyright (C) 1995 by Linus Torvalds --# --# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin --# --# "make install" script for i386 architecture --# --# Arguments: --# $1 - kernel version --# $2 - kernel image file --# $3 - kernel map file --# $4 - default install path (blank if root directory) --# -- --verify () { -- if [ ! -f "$1" ]; then -- echo "" 1>&2 -- echo " *** Missing file: $1" 1>&2 -- echo ' *** You need to run "make" before "make install".' 1>&2 -- echo "" 1>&2 -- exit 1 -- fi --} -- --# Make sure the files actually exist -- --verify "$2" --verify "$3" -- --# User may have a custom install script -- --if [ -n "${INSTALLKERNEL}" ]; then -- if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi -- if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi --fi -- --# Default install -- --if [ "$(basename $2)" = "zImage" ]; then --# Compressed install -- echo "Installing compressed kernel" -- base=vmlinuz --else --# Normal install -- echo "Installing normal kernel" -- base=vmlinux --fi -- --if [ -f $4/$base-$1 ]; then -- mv $4/$base-$1 $4/$base-$1.old --fi --cat $2 > $4/$base-$1 -- --# Install system map file --if [ -f $4/System.map-$1 ]; then -- mv $4/System.map-$1 $4/System.map-$1.old --fi --cp $3 $4/System.map-$1 ---- a/arch/parisc/install.sh -+++ /dev/null -@@ -1,66 +0,0 @@ --#!/bin/sh --# --# arch/parisc/install.sh, derived from arch/i386/boot/install.sh --# --# This file is subject to the terms and conditions of the GNU General Public --# License. See the file "COPYING" in the main directory of this archive --# for more details. --# --# Copyright (C) 1995 by Linus Torvalds --# --# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin --# --# "make install" script for i386 architecture --# --# Arguments: --# $1 - kernel version --# $2 - kernel image file --# $3 - kernel map file --# $4 - default install path (blank if root directory) --# -- --verify () { -- if [ ! -f "$1" ]; then -- echo "" 1>&2 -- echo " *** Missing file: $1" 1>&2 -- echo ' *** You need to run "make" before "make install".' 1>&2 -- echo "" 1>&2 -- exit 1 -- fi --} -- --# Make sure the files actually exist -- --verify "$2" --verify "$3" -- --# User may have a custom install script -- --if [ -n "${INSTALLKERNEL}" ]; then -- if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi -- if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi --fi -- --# Default install -- --if [ "$(basename $2)" = "vmlinuz" ]; then --# Compressed install -- echo "Installing compressed kernel" -- base=vmlinuz --else --# Normal install -- echo "Installing normal kernel" -- base=vmlinux --fi -- --if [ -f $4/$base-$1 ]; then -- mv $4/$base-$1 $4/$base-$1.old --fi --cat $2 > $4/$base-$1 -- --# Install system map file --if [ -f $4/System.map-$1 ]; then -- mv $4/System.map-$1 $4/System.map-$1.old --fi --cp $3 $4/System.map-$1 -- ---- a/arch/powerpc/boot/Makefile -+++ b/arch/powerpc/boot/Makefile -@@ -442,11 +442,11 @@ $(obj)/zImage.initrd: $(addprefix $(obj) - - # Only install the vmlinux - install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) -- sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" -+ sh -x $(srctree)/scripts/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" - - # Install the vmlinux and other built boot targets. - zInstall: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) -- sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $^ -+ sh -x $(srctree)/scripts/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $^ - - PHONY += install zInstall - ---- a/arch/powerpc/boot/install.sh -+++ /dev/null -@@ -1,55 +0,0 @@ --#!/bin/sh --# --# This file is subject to the terms and conditions of the GNU General Public --# License. See the file "COPYING" in the main directory of this archive --# for more details. --# --# Copyright (C) 1995 by Linus Torvalds --# --# Blatantly stolen from in arch/i386/boot/install.sh by Dave Hansen --# --# "make install" script for ppc64 architecture --# --# Arguments: --# $1 - kernel version --# $2 - kernel image file --# $3 - kernel map file --# $4 - default install path (blank if root directory) --# $5 and more - kernel boot files; zImage*, uImage, cuImage.*, etc. --# -- --# Bail with error code if anything goes wrong --set -e -- --# User may have a custom install script -- --if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi --if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi -- --# Default install -- --# this should work for both the pSeries zImage and the iSeries vmlinux.sm --image_name=`basename $2` -- --if [ -f $4/$image_name ]; then -- mv $4/$image_name $4/$image_name.old --fi -- --if [ -f $4/System.map ]; then -- mv $4/System.map $4/System.old --fi -- --cat $2 > $4/$image_name --cp $3 $4/System.map -- --# Copy all the bootable image files --path=$4 --shift 4 --while [ $# -ne 0 ]; do -- image_name=`basename $1` -- if [ -f $path/$image_name ]; then -- mv $path/$image_name $path/$image_name.old -- fi -- cat $1 > $path/$image_name -- shift --done; ---- a/arch/riscv/boot/Makefile -+++ b/arch/riscv/boot/Makefile -@@ -60,9 +60,9 @@ $(obj)/loader.bin: $(obj)/loader FORCE - $(call if_changed,objcopy) - - install: -- $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ -+ $(CONFIG_SHELL) $(srctree)/scripts/install.sh $(KERNELRELEASE) \ - $(obj)/Image System.map "$(INSTALL_PATH)" - - zinstall: -- $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ -+ $(CONFIG_SHELL) $(srctree)/scripts/install.sh $(KERNELRELEASE) \ - $(obj)/Image.gz System.map "$(INSTALL_PATH)" ---- a/arch/riscv/boot/install.sh -+++ /dev/null -@@ -1,60 +0,0 @@ --#!/bin/sh --# --# arch/riscv/boot/install.sh --# --# This file is subject to the terms and conditions of the GNU General Public --# License. See the file "COPYING" in the main directory of this archive --# for more details. --# --# Copyright (C) 1995 by Linus Torvalds --# --# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin --# Adapted from code in arch/i386/boot/install.sh by Russell King --# --# "make install" script for the RISC-V Linux port --# --# Arguments: --# $1 - kernel version --# $2 - kernel image file --# $3 - kernel map file --# $4 - default install path (blank if root directory) --# -- --verify () { -- if [ ! -f "$1" ]; then -- echo "" 1>&2 -- echo " *** Missing file: $1" 1>&2 -- echo ' *** You need to run "make" before "make install".' 1>&2 -- echo "" 1>&2 -- exit 1 -- fi --} -- --# Make sure the files actually exist --verify "$2" --verify "$3" -- --# User may have a custom install script --if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi --if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi -- --if [ "$(basename $2)" = "Image.gz" ]; then --# Compressed install -- echo "Installing compressed kernel" -- base=vmlinuz --else --# Normal install -- echo "Installing normal kernel" -- base=vmlinux --fi -- --if [ -f $4/$base-$1 ]; then -- mv $4/$base-$1 $4/$base-$1.old --fi --cat $2 > $4/$base-$1 -- --# Install system map file --if [ -f $4/System.map-$1 ]; then -- mv $4/System.map-$1 $4/System.map-$1.old --fi --cp $3 $4/System.map-$1 ---- a/arch/s390/boot/Makefile -+++ b/arch/s390/boot/Makefile -@@ -71,5 +71,5 @@ $(obj)/startup.a: $(OBJECTS) FORCE - $(call if_changed,ar) - - install: -- sh -x $(srctree)/$(obj)/install.sh $(KERNELRELEASE) $(obj)/bzImage \ -+ sh -x $(srctree)/scripts/install.sh $(KERNELRELEASE) $(obj)/bzImage \ - System.map "$(INSTALL_PATH)" ---- a/arch/s390/boot/install.sh -+++ /dev/null -@@ -1,30 +0,0 @@ --#!/bin/sh --# SPDX-License-Identifier: GPL-2.0 --# --# arch/s390x/boot/install.sh --# --# Copyright (C) 1995 by Linus Torvalds --# --# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin --# --# "make install" script for s390 architecture --# --# Arguments: --# $1 - kernel version --# $2 - kernel image file --# $3 - kernel map file --# $4 - default install path (blank if root directory) --# -- --# User may have a custom install script -- --if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi --if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi -- --echo "Warning: '${INSTALLKERNEL}' command not available - additional " \ -- "bootloader config required" >&2 --if [ -f $4/vmlinuz-$1 ]; then mv $4/vmlinuz-$1 $4/vmlinuz-$1.old; fi --if [ -f $4/System.map-$1 ]; then mv $4/System.map-$1 $4/System.map-$1.old; fi -- --cat $2 > $4/vmlinuz-$1 --cp $3 $4/System.map-$1 ---- a/arch/sh/boot/compressed/install.sh -+++ /dev/null -@@ -1,56 +0,0 @@ --#!/bin/sh --# --# arch/sh/boot/install.sh --# --# This file is subject to the terms and conditions of the GNU General Public --# License. See the file "COPYING" in the main directory of this archive --# for more details. --# --# Copyright (C) 1995 by Linus Torvalds --# --# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin --# Adapted from code in arch/i386/boot/install.sh by Russell King --# Adapted from code in arch/arm/boot/install.sh by Stuart Menefy --# --# "make install" script for sh architecture --# --# Arguments: --# $1 - kernel version --# $2 - kernel image file --# $3 - kernel map file --# $4 - default install path (blank if root directory) --# -- --# User may have a custom install script -- --if [ -x /sbin/${INSTALLKERNEL} ]; then -- exec /sbin/${INSTALLKERNEL} "$@" --fi -- --if [ "$2" = "zImage" ]; then --# Compressed install -- echo "Installing compressed kernel" -- if [ -f $4/vmlinuz-$1 ]; then -- mv $4/vmlinuz-$1 $4/vmlinuz.old -- fi -- -- if [ -f $4/System.map-$1 ]; then -- mv $4/System.map-$1 $4/System.old -- fi -- -- cat $2 > $4/vmlinuz-$1 -- cp $3 $4/System.map-$1 --else --# Normal install -- echo "Installing normal kernel" -- if [ -f $4/vmlinux-$1 ]; then -- mv $4/vmlinux-$1 $4/vmlinux.old -- fi -- -- if [ -f $4/System.map ]; then -- mv $4/System.map $4/System.old -- fi -- -- cat $2 > $4/vmlinux-$1 -- cp $3 $4/System.map --fi ---- a/arch/sparc/boot/Makefile -+++ b/arch/sparc/boot/Makefile -@@ -72,5 +72,5 @@ $(obj)/tftpboot.img: $(obj)/image $(obj) - $(call if_changed,piggy) - - install: -- sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(obj)/zImage \ -+ sh $(srctree)/scripts/install.sh $(KERNELRELEASE) $(obj)/zImage \ - System.map "$(INSTALL_PATH)" ---- a/arch/sparc/boot/install.sh -+++ /dev/null -@@ -1,50 +0,0 @@ --#!/bin/sh --# --# This file is subject to the terms and conditions of the GNU General Public --# License. See the file "COPYING" in the main directory of this archive --# for more details. --# --# Copyright (C) 1995 by Linus Torvalds --# --# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin --# --# "make install" script for SPARC architecture --# --# Arguments: --# $1 - kernel version --# $2 - kernel image file --# $3 - kernel map file --# $4 - default install path (blank if root directory) --# -- --verify () { -- if [ ! -f "$1" ]; then -- echo "" 1>&2 -- echo " *** Missing file: $1" 1>&2 -- echo ' *** You need to run "make" before "make install".' 1>&2 -- echo "" 1>&2 -- exit 1 -- fi --} -- --# Make sure the files actually exist --verify "$2" --verify "$3" -- --# User may have a custom install script -- --if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi --if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi -- --# Default install - same as make zlilo -- --if [ -f $4/vmlinuz ]; then -- mv $4/vmlinuz $4/vmlinuz.old --fi -- --if [ -f $4/System.map ]; then -- mv $4/System.map $4/System.old --fi -- --cat $2 > $4/vmlinuz --cp $3 $4/System.map ---- a/arch/x86/boot/Makefile -+++ b/arch/x86/boot/Makefile -@@ -157,5 +157,5 @@ bzlilo: - if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi - - install: -- sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(obj)/bzImage \ -+ sh $(srctree)/scripts/install.sh $(KERNELRELEASE) $(obj)/bzImage \ - System.map "$(INSTALL_PATH)" ---- a/arch/x86/boot/install.sh -+++ /dev/null -@@ -1,59 +0,0 @@ --#!/bin/sh --# --# This file is subject to the terms and conditions of the GNU General Public --# License. See the file "COPYING" in the main directory of this archive --# for more details. --# --# Copyright (C) 1995 by Linus Torvalds --# --# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin --# --# "make install" script for i386 architecture --# --# Arguments: --# $1 - kernel version --# $2 - kernel image file --# $3 - kernel map file --# $4 - default install path (blank if root directory) --# -- --verify () { -- if [ ! -f "$1" ]; then -- echo "" 1>&2 -- echo " *** Missing file: $1" 1>&2 -- echo ' *** You need to run "make" before "make install".' 1>&2 -- echo "" 1>&2 -- exit 1 -- fi --} -- --# Make sure the files actually exist --verify "$2" --verify "$3" -- --# User may have a custom install script -- --if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi --if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi -- --# Default install - same as make zlilo -- --if [ -f $4/vmlinuz ]; then -- mv $4/vmlinuz $4/vmlinuz.old --fi -- --if [ -f $4/System.map ]; then -- mv $4/System.map $4/System.old --fi -- --cat $2 > $4/vmlinuz --cp $3 $4/System.map -- --if [ -x /sbin/lilo ]; then -- /sbin/lilo --elif [ -x /etc/lilo/install ]; then -- /etc/lilo/install --else -- sync -- echo "Cannot find LILO." --fi ---- /dev/null -+++ b/scripts/install.sh -@@ -0,0 +1,122 @@ -+#!/bin/sh -+# SPDX-License-Identifier: GPL-2.0 -+# -+# Copyright (C) 1995 Linus Torvalds -+# Copyright (C) 2021 Greg Kroah-Hartman -+# -+# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin -+# Adapted from code in arch/i386/boot/install.sh by Russell King -+# -+# "make install" script for the kernel -+# -+# Arguments: -+# $1 - kernel version -+# $2 - kernel image file -+# $3 - kernel map file -+# $4 - default install path (blank if root directory) -+# -+# Installs the built kernel image and map and symbol file in the specified -+# install location. If no install path is selected, the files will be placed -+# in the root directory. -+# -+# The name of the kernel image will be "vmlinux-VERSION" for uncompressed -+# kernels or "vmlinuz-VERSION' for compressed kernels. -+# -+# The kernel map file will be named "System.map-VERSION" -+# -+# If there is currently a kernel image or kernel map file present with the name -+# of the file to be copied to the location, it will be renamed to contain a -+# ".old" suffix. -+# -+# If ~/bin/${INSTALLKERNEL} or /sbin/${INSTALLKERNEL} is executable, execution -+# will be passed to that program instead of this one to allow for distro or -+# system specific installation scripts to be used. -+ -+verify () { -+ if [ ! -f "${1}" ]; then -+ echo "" 1>&2 -+ echo " *** Missing file: ${1}" 1>&2 -+ echo ' *** You need to run "make" before "make install".' 1>&2 -+ echo "" 1>&2 -+ exit 1 -+ fi -+} -+ -+install () { -+ install_source=${1} -+ install_target=${2} -+ -+ echo "installing '${install_source}' to '${install_target}'" -+ -+ # if the target is already present, move it to a .old filename -+ if [ -f "${install_target}" ]; then -+ mv "${install_target}" "${install_target}".old -+ fi -+ cat "${install_source}" > "${install_target}" -+} -+ -+# Make sure the files actually exist -+verify "${2}" -+verify "${3}" -+ -+# User may have a custom install script, if so, call that instead. -+if [ -x ~/bin/"${INSTALLKERNEL}" ]; then exec ~/bin/"${INSTALLKERNEL}" "$@"; fi -+if [ -x /sbin/"${INSTALLKERNEL}" ]; then exec /sbin/"${INSTALLKERNEL}" "$@"; fi -+ -+base=$(basename "${2}") -+if [ "${base}" = "zImage" ] || -+ [ "${base}" = "Image.gz" ] || -+ [ "${base}" = "bzImage" ]; then -+ # Compressed install -+ echo "Installing compressed kernel" -+ base=vmlinuz -+else -+ # Normal install -+ echo "Installing normal kernel" -+ base=vmlinux -+fi -+ -+# Install kernel image -+install "${2}" "${4}"/"${base}"-"${1}" -+ -+# Install system map file -+install "${3}" "${4}"/System.map-"${1}" -+ -+sync -+ -+# Odd arch specific stuff here when needed: -+case "${ARCH}" in -+ arm) -+ if [ -x /sbin/loadmap ]; then -+ /sbin/loadmap -+ else -+ echo "You have to install it yourself" -+ fi -+ ;; -+ ia64) -+ if [ -x /usr/sbin/elilo ]; then -+ /usr/sbin/elilo -+ fi -+ ;; -+ powerpc) -+ # powerpc installation can list other boot targets after the -+ # install path that should be copied to the correct location -+ path=$4 -+ shift 4 -+ while [ $# -ne 0 ]; do -+ image_name=$(basename "${1}") -+ install "${1}" "${path}"/"${image_name}" -+ shift -+ done; -+ sync -+ ;; -+ x86) -+ if [ -x /sbin/lilo ]; then -+ /sbin/lilo -+ elif [ -x /etc/lilo/install ]; then -+ /etc/lilo/install -+ else -+ echo "Cannot find LILO, ensure your bootloader knows of the new kernel image." -+ fi -+ ;; -+esac diff --git a/0001-readfile-implement-readfile-syscall.patch b/0001-readfile-implement-readfile-syscall.patch index 84effce170dcd..061e2e1ead653 100644 --- a/0001-readfile-implement-readfile-syscall.patch +++ b/0001-readfile-implement-readfile-syscall.patch @@ -20,7 +20,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/fs/open.c +++ b/fs/open.c -@@ -1525,3 +1525,53 @@ int stream_open(struct inode *inode, str +@@ -1564,3 +1564,53 @@ int stream_open(struct inode *inode, str } EXPORT_SYMBOL(stream_open); diff --git a/0001-vsmp-driver.patch b/0001-vsmp-driver.patch index 0c44f9b5ec138..c3bff3b483633 100644 --- a/0001-vsmp-driver.patch +++ b/0001-vsmp-driver.patch @@ -28,7 +28,7 @@ first cut to cleanup +Description: Shows the full version of the vSMP hypervisor --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -22328,6 +22328,12 @@ F: lib/test_printf.c +@@ -22419,6 +22419,12 @@ F: lib/test_printf.c F: lib/test_scanf.c F: lib/vsprintf.c diff --git a/0003-scripts-coccicheck-use-grep-E-instead-of-egrep.patch b/0003-scripts-coccicheck-use-grep-E-instead-of-egrep.patch deleted file mode 100644 index e0322f95d8845..0000000000000 --- a/0003-scripts-coccicheck-use-grep-E-instead-of-egrep.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 81da721534f3fe8c01428a1179ad70a50e2e34b8 Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman -Date: Wed, 21 Sep 2022 11:11:47 +0200 -Subject: [PATCH 3/3] scripts: coccicheck: use "grep -E" instead of "egrep" - -The latest version of grep claims that egrep is now obsolete so the build -now contains warnings that look like: - egrep: warning: egrep is obsolescent; using grep -E -fix this up by moving the vdso Makefile to use "grep -E" instead. - -Cc: Julia Lawall -Cc: Nicolas Palix -Cc: cocci@inria.fr -Signed-off-by: Greg Kroah-Hartman ---- - scripts/coccicheck | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/scripts/coccicheck -+++ b/scripts/coccicheck -@@ -47,7 +47,7 @@ FLAGS="--very-quiet" - # inspected there. - # - # --profile will not output if --very-quiet is used, so avoid it. --echo $SPFLAGS | egrep -e "--profile|--show-trying" 2>&1 > /dev/null -+echo $SPFLAGS | grep -E -e "--profile|--show-trying" 2>&1 > /dev/null - if [ $? -eq 0 ]; then - FLAGS="--quiet" - fi diff --git a/0003-selftests-add-readfile-2-selftests.patch b/0003-selftests-add-readfile-2-selftests.patch index 382331f1d3eed..701dc8884fb76 100644 --- a/0003-selftests-add-readfile-2-selftests.patch +++ b/0003-selftests-add-readfile-2-selftests.patch @@ -25,7 +25,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile -@@ -65,6 +65,7 @@ TARGETS += resctrl +@@ -66,6 +66,7 @@ TARGETS += resctrl TARGETS += rlimits TARGETS += rseq TARGETS += rtc diff --git a/series b/series index 605edb2489935..aab7f87aacd0b 100644 --- a/series +++ b/series @@ -1,7 +1,6 @@ # usb.patch 0001-vsmp-driver.patch -0003-scripts-coccicheck-use-grep-E-instead-of-egrep.patch 0001-driver-core-aux-test-code.patch copying.patch 0001-readfile-implement-readfile-syscall.patch @@ -12,7 +11,6 @@ spdxcheck-print-out-files-without-any-spdx-lines.patch -0001-Kbuild-provide-a-common-kernel-installation-script.patch ## broken patch! diff --git a/usb.patch b/usb.patch index 693dfc235e3f2..68f471ef2e255 100644 --- a/usb.patch +++ b/usb.patch @@ -4,7 +4,7 @@ --- a/drivers/usb/storage/unusual_uas.h +++ b/drivers/usb/storage/unusual_uas.h -@@ -118,6 +118,17 @@ UNUSUAL_DEV(0x152d, 0x0578, 0x0000, 0x99 +@@ -111,6 +111,17 @@ UNUSUAL_DEV(0x152d, 0x0578, 0x0000, 0x99 USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BROKEN_FUA), -- cgit 1.2.3-korg From 8498b17c2e92652d40e289c5ba1bca6f111f82f0 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 2 Apr 2023 20:28:01 +0200 Subject: more patches --- ...-remove-CONFIG_SYSFS_DEPRECATED-and-CONFI.patch | 257 +++++++++++++++++++++ ...-class-fix-block-class-problem-when-remov.patch | 39 ++++ series | 2 + 3 files changed, 298 insertions(+) create mode 100644 0001-driver-core-remove-CONFIG_SYSFS_DEPRECATED-and-CONFI.patch create mode 100644 0002-driver-core-class-fix-block-class-problem-when-remov.patch diff --git a/0001-driver-core-remove-CONFIG_SYSFS_DEPRECATED-and-CONFI.patch b/0001-driver-core-remove-CONFIG_SYSFS_DEPRECATED-and-CONFI.patch new file mode 100644 index 0000000000000..ea262880241fe --- /dev/null +++ b/0001-driver-core-remove-CONFIG_SYSFS_DEPRECATED-and-CONFI.patch @@ -0,0 +1,257 @@ +From 763ee8434fbbea0ce5a614ae0c6bb74ec0ed078a Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Thu, 23 Feb 2023 08:33:26 +0100 +Subject: [PATCH 1/2] driver core: remove CONFIG_SYSFS_DEPRECATED and + CONFIG_SYSFS_DEPRECATED_V2 + +CONFIG_SYSFS_DEPRECATED was added in commit 88a22c985e35 +("CONFIG_SYSFS_DEPRECATED") in 2006 to allow systems with older versions +of some tools (i.e. Fedora 3's version of udev) to boot properly. Four +years later, in 2010, the option was attempted to be removed as most of +userspace should have been fixed up properly by then, but some kernel +developers clung to those old systems and refused to update, so we added +CONFIG_SYSFS_DEPRECATED_V2 in commit e52eec13cd6b ("SYSFS: Allow boot +time switching between deprecated and modern sysfs layout") to allow +them to continue to boot properly, and we allowed a boot time parameter +to be used to switch back to the old format if needed. + +Over time, the logic that was covered under these config options was +slowly removed from individual driver subsystems successfully, removed, +and the only thing that is now left in the kernel are some changes in +the block layer's representation in sysfs where real directories are +used instead of symlinks like normal. + +Because the original changes were done to userspace tools in 2006, and +all distros that use those tools are long end-of-life, and older +non-udev-based systems do not care about the block layer's sysfs +representation, it is time to finally remove this old logic and the +config entries from the kernel. + +Cc: Jonathan Corbet +Cc: "Rafael J. Wysocki" +Cc: linux-block@vger.kernel.org +Cc: linux-doc@vger.kernel.org +Acked-by: Jens Axboe +Link: https://lore.kernel.org/r/20230223073326.2073220-1-gregkh@linuxfoundation.org +Signed-off-by: Greg Kroah-Hartman +--- + Documentation/admin-guide/kernel-parameters.txt | 9 ----- + block/genhd.c | 19 ++++-------- + drivers/base/class.c | 2 - + drivers/base/core.c | 37 ----------------------- + include/linux/device.h | 6 --- + init/Kconfig | 38 ------------------------ + 6 files changed, 8 insertions(+), 103 deletions(-) + +--- a/Documentation/admin-guide/kernel-parameters.txt ++++ b/Documentation/admin-guide/kernel-parameters.txt +@@ -6130,15 +6130,6 @@ + later by a loaded module cannot be set this way. + Example: sysctl.vm.swappiness=40 + +- sysfs.deprecated=0|1 [KNL] +- Enable/disable old style sysfs layout for old udev +- on older distributions. When this option is enabled +- very new udev will not work anymore. When this option +- is disabled (or CONFIG_SYSFS_DEPRECATED not compiled) +- in older udev will not work anymore. +- Default depends on CONFIG_SYSFS_DEPRECATED_V2 set in +- the kernel configuration. +- + sysrq_always_enabled + [KNL] + Ignore sysrq setting - this boot parameter will +--- a/block/genhd.c ++++ b/block/genhd.c +@@ -466,12 +466,10 @@ int __must_check device_add_disk(struct + if (ret) + goto out_device_del; + +- if (!sysfs_deprecated) { +- ret = sysfs_create_link(block_depr, &ddev->kobj, +- kobject_name(&ddev->kobj)); +- if (ret) +- goto out_device_del; +- } ++ ret = sysfs_create_link(block_depr, &ddev->kobj, ++ kobject_name(&ddev->kobj)); ++ if (ret) ++ goto out_device_del; + + /* + * avoid probable deadlock caused by allocating memory with +@@ -554,8 +552,7 @@ out_put_holder_dir: + out_del_integrity: + blk_integrity_del(disk); + out_del_block_link: +- if (!sysfs_deprecated) +- sysfs_remove_link(block_depr, dev_name(ddev)); ++ sysfs_remove_link(block_depr, dev_name(ddev)); + out_device_del: + device_del(ddev); + out_free_ext_minor: +@@ -657,8 +654,7 @@ void del_gendisk(struct gendisk *disk) + + part_stat_set_all(disk->part0, 0); + disk->part0->bd_stamp = 0; +- if (!sysfs_deprecated) +- sysfs_remove_link(block_depr, dev_name(disk_to_dev(disk))); ++ sysfs_remove_link(block_depr, dev_name(disk_to_dev(disk))); + pm_runtime_set_memalloc_noio(disk_to_dev(disk), false); + device_del(disk_to_dev(disk)); + +@@ -912,8 +908,7 @@ static int __init genhd_device_init(void + register_blkdev(BLOCK_EXT_MAJOR, "blkext"); + + /* create top-level block dir */ +- if (!sysfs_deprecated) +- block_depr = kobject_create_and_add("block", NULL); ++ block_depr = kobject_create_and_add("block", NULL); + return 0; + } + +--- a/drivers/base/class.c ++++ b/drivers/base/class.c +@@ -180,7 +180,7 @@ int __class_register(struct class *cls, + + #if defined(CONFIG_BLOCK) + /* let the block class directory show up in the root of sysfs */ +- if (!sysfs_deprecated || cls != &block_class) ++ if (cls != &block_class) + cp->subsys.kobj.kset = class_kset; + #else + cp->subsys.kobj.kset = class_kset; +--- a/drivers/base/core.c ++++ b/drivers/base/core.c +@@ -36,19 +36,6 @@ + #include "physical_location.h" + #include "power/power.h" + +-#ifdef CONFIG_SYSFS_DEPRECATED +-#ifdef CONFIG_SYSFS_DEPRECATED_V2 +-long sysfs_deprecated = 1; +-#else +-long sysfs_deprecated = 0; +-#endif +-static int __init sysfs_deprecated_setup(char *arg) +-{ +- return kstrtol(arg, 10, &sysfs_deprecated); +-} +-early_param("sysfs.deprecated", sysfs_deprecated_setup); +-#endif +- + /* Device links support. */ + static LIST_HEAD(deferred_sync); + static unsigned int defer_sync_state_count = 1; +@@ -3137,15 +3124,6 @@ static struct kobject *get_device_parent + struct kobject *parent_kobj; + struct kobject *k; + +-#ifdef CONFIG_BLOCK +- /* block disks show up in /sys/block */ +- if (sysfs_deprecated && dev->class == &block_class) { +- if (parent && parent->class == &block_class) +- return &parent->kobj; +- return &block_class.p->subsys.kobj; +- } +-#endif +- + /* + * If we have no parent, we live in "virtual". + * Class-devices with a non class-device as parent, live +@@ -3324,12 +3302,6 @@ static int device_add_class_symlinks(str + goto out_subsys; + } + +-#ifdef CONFIG_BLOCK +- /* /sys/block has directories and does not need symlinks */ +- if (sysfs_deprecated && dev->class == &block_class) +- return 0; +-#endif +- + /* link in the class directory pointing to the device */ + error = sysfs_create_link(&dev->class->p->subsys.kobj, + &dev->kobj, dev_name(dev)); +@@ -3359,10 +3331,6 @@ static void device_remove_class_symlinks + if (dev->parent && device_is_not_partition(dev)) + sysfs_remove_link(&dev->kobj, "device"); + sysfs_remove_link(&dev->kobj, "subsystem"); +-#ifdef CONFIG_BLOCK +- if (sysfs_deprecated && dev->class == &block_class) +- return; +-#endif + sysfs_delete_link(&dev->class->p->subsys.kobj, &dev->kobj, dev_name(dev)); + } + +@@ -4652,11 +4620,6 @@ int device_change_owner(struct device *d + if (error) + goto out; + +-#ifdef CONFIG_BLOCK +- if (sysfs_deprecated && dev->class == &block_class) +- goto out; +-#endif +- + /* + * Change the owner of the symlink located in the class directory of + * the device class associated with @dev which points to the actual +--- a/include/linux/device.h ++++ b/include/linux/device.h +@@ -1092,10 +1092,4 @@ int dev_err_probe(const struct device *d + #define MODULE_ALIAS_CHARDEV_MAJOR(major) \ + MODULE_ALIAS("char-major-" __stringify(major) "-*") + +-#ifdef CONFIG_SYSFS_DEPRECATED +-extern long sysfs_deprecated; +-#else +-#define sysfs_deprecated 0 +-#endif +- + #endif /* _DEVICE_H_ */ +--- a/init/Kconfig ++++ b/init/Kconfig +@@ -1297,44 +1297,6 @@ config SCHED_AUTOGROUP + desktop applications. Task group autogeneration is currently based + upon task session. + +-config SYSFS_DEPRECATED +- bool "Enable deprecated sysfs features to support old userspace tools" +- depends on SYSFS +- default n +- help +- This option adds code that switches the layout of the "block" class +- devices, to not show up in /sys/class/block/, but only in +- /sys/block/. +- +- This switch is only active when the sysfs.deprecated=1 boot option is +- passed or the SYSFS_DEPRECATED_V2 option is set. +- +- This option allows new kernels to run on old distributions and tools, +- which might get confused by /sys/class/block/. Since 2007/2008 all +- major distributions and tools handle this just fine. +- +- Recent distributions and userspace tools after 2009/2010 depend on +- the existence of /sys/class/block/, and will not work with this +- option enabled. +- +- Only if you are using a new kernel on an old distribution, you might +- need to say Y here. +- +-config SYSFS_DEPRECATED_V2 +- bool "Enable deprecated sysfs features by default" +- default n +- depends on SYSFS +- depends on SYSFS_DEPRECATED +- help +- Enable deprecated sysfs by default. +- +- See the CONFIG_SYSFS_DEPRECATED option for more details about this +- option. +- +- Only if you are using a new kernel on an old distribution, you might +- need to say Y here. Even then, odds are you would not need it +- enabled, you can always pass the boot option if absolutely necessary. +- + config RELAY + bool "Kernel->user space relay support (formerly relayfs)" + select IRQ_WORK diff --git a/0002-driver-core-class-fix-block-class-problem-when-remov.patch b/0002-driver-core-class-fix-block-class-problem-when-remov.patch new file mode 100644 index 0000000000000..521337e3e03bf --- /dev/null +++ b/0002-driver-core-class-fix-block-class-problem-when-remov.patch @@ -0,0 +1,39 @@ +From 6ecddadae3f779408bfa6a1b0c81e7728a00395e Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Tue, 7 Mar 2023 08:43:59 +0100 +Subject: [PATCH 2/2] driver core: class: fix block class problem when removing + CONFIG_SYSFS_DEPRECATED* + +In removing the CONFIG_SYSFS_DEPRECATED and CONFIG_SYSFS_DEPRECATED_V2 +config options, I messed up in the __class_register() function and got +the logic incorrect. Fix this all up by just removing the special case +of a block device class logic in this function, as that is what is +intended. + +In testing, this solves the boot problem on my systems, hopefully on +others as well. + +Cc: "Rafael J. Wysocki" +Reported-by: Stephen Rothwell +Fixes: 721da5cee9d4 ("driver core: remove CONFIG_SYSFS_DEPRECATED and CONFIG_SYSFS_DEPRECATED_V2") +Signed-off-by: Greg Kroah-Hartman +--- + drivers/base/class.c | 6 ------ + 1 file changed, 6 deletions(-) + +--- a/drivers/base/class.c ++++ b/drivers/base/class.c +@@ -178,13 +178,7 @@ int __class_register(struct class *cls, + if (!cls->dev_kobj) + cls->dev_kobj = sysfs_dev_char_kobj; + +-#if defined(CONFIG_BLOCK) +- /* let the block class directory show up in the root of sysfs */ +- if (cls != &block_class) +- cp->subsys.kobj.kset = class_kset; +-#else + cp->subsys.kobj.kset = class_kset; +-#endif + cp->subsys.kobj.ktype = &class_ktype; + cp->class = cls; + cls->p = cp; diff --git a/series b/series index aab7f87aacd0b..c3f4fe52648e3 100644 --- a/series +++ b/series @@ -1,4 +1,6 @@ # +0001-driver-core-remove-CONFIG_SYSFS_DEPRECATED-and-CONFI.patch +0002-driver-core-class-fix-block-class-problem-when-remov.patch usb.patch 0001-vsmp-driver.patch 0001-driver-core-aux-test-code.patch -- cgit 1.2.3-korg From 222b4400a177dbbb27447e4883ce1e0257a6efe7 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 4 Apr 2023 09:29:54 +0200 Subject: memstick patch --- ...x-memory-leak-if-card-device-is-never-reg.patch | 54 ++++++++++++++++++++++ series | 1 + 2 files changed, 55 insertions(+) create mode 100644 0001-memstick-fix-memory-leak-if-card-device-is-never-reg.patch diff --git a/0001-memstick-fix-memory-leak-if-card-device-is-never-reg.patch b/0001-memstick-fix-memory-leak-if-card-device-is-never-reg.patch new file mode 100644 index 0000000000000..276e5f9cd0812 --- /dev/null +++ b/0001-memstick-fix-memory-leak-if-card-device-is-never-reg.patch @@ -0,0 +1,54 @@ +From fb1f85bf132550be559fe712e845eee4475d193f Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Sat, 1 Apr 2023 19:12:32 +0200 +Subject: [PATCH 1/2] memstick: fix memory leak if card device is never + registered with the driver core + +When calling dev_set_name() memory is allocated for the name for the +struct device. Once that structure device is registered, or attempted +to be registerd, with the driver core, the driver core will handle +cleaning up that memory when the device is removed from the system. + +Unfortunatly for the memstick code, there is an error path that causes +the struct device to never be registered, and so the memory allocated in +dev_set_name will be leaked. Fix that leak by manually freeing it right +before the memory for the device is freed. + +Cc: Maxim Levitsky +Cc: Alex Dubov +Cc: Ulf Hansson +Cc: "Rafael J. Wysocki" +Cc: Hans de Goede +Cc: Kay Sievers +Cc: linux-mmc@vger.kernel.org +Fixes: 0252c3b4f018 ("memstick: struct device - replace bus_id with dev_name(), +Cc: stable +Co-developed-by: Greg Kroah-Hartman +Signed-off-by: Greg Kroah-Hartman +Co-developed-by: Mirsad Goran Todorovac +--- + drivers/memstick/core/memstick.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/drivers/memstick/core/memstick.c ++++ b/drivers/memstick/core/memstick.c +@@ -410,6 +410,7 @@ static struct memstick_dev *memstick_all + return card; + err_out: + host->card = old_card; ++ kfree_const(card->dev.kobj.name); + kfree(card); + return NULL; + } +@@ -468,8 +469,10 @@ static void memstick_check(struct work_s + put_device(&card->dev); + host->card = NULL; + } +- } else ++ } else { ++ kfree_const(card->dev.kobj.name); + kfree(card); ++ } + } + + out_power_off: diff --git a/series b/series index c3f4fe52648e3..1c62875d6a49a 100644 --- a/series +++ b/series @@ -1,4 +1,5 @@ # +0001-memstick-fix-memory-leak-if-card-device-is-never-reg.patch 0001-driver-core-remove-CONFIG_SYSFS_DEPRECATED-and-CONFI.patch 0002-driver-core-class-fix-block-class-problem-when-remov.patch usb.patch -- cgit 1.2.3-korg From 8721ff1fd2cc941a36a30014ad2f047ac41ff3db Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 16 Jun 2023 10:15:18 +0200 Subject: updates --- ...-remove-CONFIG_SYSFS_DEPRECATED-and-CONFI.patch | 257 --------------------- ...x-memory-leak-if-card-device-is-never-reg.patch | 54 ----- 0001-readfile-implement-readfile-syscall.patch | 2 +- 0001-vsmp-driver.patch | 2 +- ...-class-fix-block-class-problem-when-remov.patch | 39 ---- 0003-selftests-add-readfile-2-selftests.patch | 2 +- ...es.rst-clean-out-empty-and-unused-entries.patch | 44 ++++ qlcnic_sysfs.patch | 20 +- series | 4 +- usb.patch | 4 +- 10 files changed, 60 insertions(+), 368 deletions(-) delete mode 100644 0001-driver-core-remove-CONFIG_SYSFS_DEPRECATED-and-CONFI.patch delete mode 100644 0001-memstick-fix-memory-leak-if-card-device-is-never-reg.patch delete mode 100644 0002-driver-core-class-fix-block-class-problem-when-remov.patch create mode 100644 documentation-embargoed-hardware-issues.rst-clean-out-empty-and-unused-entries.patch diff --git a/0001-driver-core-remove-CONFIG_SYSFS_DEPRECATED-and-CONFI.patch b/0001-driver-core-remove-CONFIG_SYSFS_DEPRECATED-and-CONFI.patch deleted file mode 100644 index ea262880241fe..0000000000000 --- a/0001-driver-core-remove-CONFIG_SYSFS_DEPRECATED-and-CONFI.patch +++ /dev/null @@ -1,257 +0,0 @@ -From 763ee8434fbbea0ce5a614ae0c6bb74ec0ed078a Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman -Date: Thu, 23 Feb 2023 08:33:26 +0100 -Subject: [PATCH 1/2] driver core: remove CONFIG_SYSFS_DEPRECATED and - CONFIG_SYSFS_DEPRECATED_V2 - -CONFIG_SYSFS_DEPRECATED was added in commit 88a22c985e35 -("CONFIG_SYSFS_DEPRECATED") in 2006 to allow systems with older versions -of some tools (i.e. Fedora 3's version of udev) to boot properly. Four -years later, in 2010, the option was attempted to be removed as most of -userspace should have been fixed up properly by then, but some kernel -developers clung to those old systems and refused to update, so we added -CONFIG_SYSFS_DEPRECATED_V2 in commit e52eec13cd6b ("SYSFS: Allow boot -time switching between deprecated and modern sysfs layout") to allow -them to continue to boot properly, and we allowed a boot time parameter -to be used to switch back to the old format if needed. - -Over time, the logic that was covered under these config options was -slowly removed from individual driver subsystems successfully, removed, -and the only thing that is now left in the kernel are some changes in -the block layer's representation in sysfs where real directories are -used instead of symlinks like normal. - -Because the original changes were done to userspace tools in 2006, and -all distros that use those tools are long end-of-life, and older -non-udev-based systems do not care about the block layer's sysfs -representation, it is time to finally remove this old logic and the -config entries from the kernel. - -Cc: Jonathan Corbet -Cc: "Rafael J. Wysocki" -Cc: linux-block@vger.kernel.org -Cc: linux-doc@vger.kernel.org -Acked-by: Jens Axboe -Link: https://lore.kernel.org/r/20230223073326.2073220-1-gregkh@linuxfoundation.org -Signed-off-by: Greg Kroah-Hartman ---- - Documentation/admin-guide/kernel-parameters.txt | 9 ----- - block/genhd.c | 19 ++++-------- - drivers/base/class.c | 2 - - drivers/base/core.c | 37 ----------------------- - include/linux/device.h | 6 --- - init/Kconfig | 38 ------------------------ - 6 files changed, 8 insertions(+), 103 deletions(-) - ---- a/Documentation/admin-guide/kernel-parameters.txt -+++ b/Documentation/admin-guide/kernel-parameters.txt -@@ -6130,15 +6130,6 @@ - later by a loaded module cannot be set this way. - Example: sysctl.vm.swappiness=40 - -- sysfs.deprecated=0|1 [KNL] -- Enable/disable old style sysfs layout for old udev -- on older distributions. When this option is enabled -- very new udev will not work anymore. When this option -- is disabled (or CONFIG_SYSFS_DEPRECATED not compiled) -- in older udev will not work anymore. -- Default depends on CONFIG_SYSFS_DEPRECATED_V2 set in -- the kernel configuration. -- - sysrq_always_enabled - [KNL] - Ignore sysrq setting - this boot parameter will ---- a/block/genhd.c -+++ b/block/genhd.c -@@ -466,12 +466,10 @@ int __must_check device_add_disk(struct - if (ret) - goto out_device_del; - -- if (!sysfs_deprecated) { -- ret = sysfs_create_link(block_depr, &ddev->kobj, -- kobject_name(&ddev->kobj)); -- if (ret) -- goto out_device_del; -- } -+ ret = sysfs_create_link(block_depr, &ddev->kobj, -+ kobject_name(&ddev->kobj)); -+ if (ret) -+ goto out_device_del; - - /* - * avoid probable deadlock caused by allocating memory with -@@ -554,8 +552,7 @@ out_put_holder_dir: - out_del_integrity: - blk_integrity_del(disk); - out_del_block_link: -- if (!sysfs_deprecated) -- sysfs_remove_link(block_depr, dev_name(ddev)); -+ sysfs_remove_link(block_depr, dev_name(ddev)); - out_device_del: - device_del(ddev); - out_free_ext_minor: -@@ -657,8 +654,7 @@ void del_gendisk(struct gendisk *disk) - - part_stat_set_all(disk->part0, 0); - disk->part0->bd_stamp = 0; -- if (!sysfs_deprecated) -- sysfs_remove_link(block_depr, dev_name(disk_to_dev(disk))); -+ sysfs_remove_link(block_depr, dev_name(disk_to_dev(disk))); - pm_runtime_set_memalloc_noio(disk_to_dev(disk), false); - device_del(disk_to_dev(disk)); - -@@ -912,8 +908,7 @@ static int __init genhd_device_init(void - register_blkdev(BLOCK_EXT_MAJOR, "blkext"); - - /* create top-level block dir */ -- if (!sysfs_deprecated) -- block_depr = kobject_create_and_add("block", NULL); -+ block_depr = kobject_create_and_add("block", NULL); - return 0; - } - ---- a/drivers/base/class.c -+++ b/drivers/base/class.c -@@ -180,7 +180,7 @@ int __class_register(struct class *cls, - - #if defined(CONFIG_BLOCK) - /* let the block class directory show up in the root of sysfs */ -- if (!sysfs_deprecated || cls != &block_class) -+ if (cls != &block_class) - cp->subsys.kobj.kset = class_kset; - #else - cp->subsys.kobj.kset = class_kset; ---- a/drivers/base/core.c -+++ b/drivers/base/core.c -@@ -36,19 +36,6 @@ - #include "physical_location.h" - #include "power/power.h" - --#ifdef CONFIG_SYSFS_DEPRECATED --#ifdef CONFIG_SYSFS_DEPRECATED_V2 --long sysfs_deprecated = 1; --#else --long sysfs_deprecated = 0; --#endif --static int __init sysfs_deprecated_setup(char *arg) --{ -- return kstrtol(arg, 10, &sysfs_deprecated); --} --early_param("sysfs.deprecated", sysfs_deprecated_setup); --#endif -- - /* Device links support. */ - static LIST_HEAD(deferred_sync); - static unsigned int defer_sync_state_count = 1; -@@ -3137,15 +3124,6 @@ static struct kobject *get_device_parent - struct kobject *parent_kobj; - struct kobject *k; - --#ifdef CONFIG_BLOCK -- /* block disks show up in /sys/block */ -- if (sysfs_deprecated && dev->class == &block_class) { -- if (parent && parent->class == &block_class) -- return &parent->kobj; -- return &block_class.p->subsys.kobj; -- } --#endif -- - /* - * If we have no parent, we live in "virtual". - * Class-devices with a non class-device as parent, live -@@ -3324,12 +3302,6 @@ static int device_add_class_symlinks(str - goto out_subsys; - } - --#ifdef CONFIG_BLOCK -- /* /sys/block has directories and does not need symlinks */ -- if (sysfs_deprecated && dev->class == &block_class) -- return 0; --#endif -- - /* link in the class directory pointing to the device */ - error = sysfs_create_link(&dev->class->p->subsys.kobj, - &dev->kobj, dev_name(dev)); -@@ -3359,10 +3331,6 @@ static void device_remove_class_symlinks - if (dev->parent && device_is_not_partition(dev)) - sysfs_remove_link(&dev->kobj, "device"); - sysfs_remove_link(&dev->kobj, "subsystem"); --#ifdef CONFIG_BLOCK -- if (sysfs_deprecated && dev->class == &block_class) -- return; --#endif - sysfs_delete_link(&dev->class->p->subsys.kobj, &dev->kobj, dev_name(dev)); - } - -@@ -4652,11 +4620,6 @@ int device_change_owner(struct device *d - if (error) - goto out; - --#ifdef CONFIG_BLOCK -- if (sysfs_deprecated && dev->class == &block_class) -- goto out; --#endif -- - /* - * Change the owner of the symlink located in the class directory of - * the device class associated with @dev which points to the actual ---- a/include/linux/device.h -+++ b/include/linux/device.h -@@ -1092,10 +1092,4 @@ int dev_err_probe(const struct device *d - #define MODULE_ALIAS_CHARDEV_MAJOR(major) \ - MODULE_ALIAS("char-major-" __stringify(major) "-*") - --#ifdef CONFIG_SYSFS_DEPRECATED --extern long sysfs_deprecated; --#else --#define sysfs_deprecated 0 --#endif -- - #endif /* _DEVICE_H_ */ ---- a/init/Kconfig -+++ b/init/Kconfig -@@ -1297,44 +1297,6 @@ config SCHED_AUTOGROUP - desktop applications. Task group autogeneration is currently based - upon task session. - --config SYSFS_DEPRECATED -- bool "Enable deprecated sysfs features to support old userspace tools" -- depends on SYSFS -- default n -- help -- This option adds code that switches the layout of the "block" class -- devices, to not show up in /sys/class/block/, but only in -- /sys/block/. -- -- This switch is only active when the sysfs.deprecated=1 boot option is -- passed or the SYSFS_DEPRECATED_V2 option is set. -- -- This option allows new kernels to run on old distributions and tools, -- which might get confused by /sys/class/block/. Since 2007/2008 all -- major distributions and tools handle this just fine. -- -- Recent distributions and userspace tools after 2009/2010 depend on -- the existence of /sys/class/block/, and will not work with this -- option enabled. -- -- Only if you are using a new kernel on an old distribution, you might -- need to say Y here. -- --config SYSFS_DEPRECATED_V2 -- bool "Enable deprecated sysfs features by default" -- default n -- depends on SYSFS -- depends on SYSFS_DEPRECATED -- help -- Enable deprecated sysfs by default. -- -- See the CONFIG_SYSFS_DEPRECATED option for more details about this -- option. -- -- Only if you are using a new kernel on an old distribution, you might -- need to say Y here. Even then, odds are you would not need it -- enabled, you can always pass the boot option if absolutely necessary. -- - config RELAY - bool "Kernel->user space relay support (formerly relayfs)" - select IRQ_WORK diff --git a/0001-memstick-fix-memory-leak-if-card-device-is-never-reg.patch b/0001-memstick-fix-memory-leak-if-card-device-is-never-reg.patch deleted file mode 100644 index 276e5f9cd0812..0000000000000 --- a/0001-memstick-fix-memory-leak-if-card-device-is-never-reg.patch +++ /dev/null @@ -1,54 +0,0 @@ -From fb1f85bf132550be559fe712e845eee4475d193f Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman -Date: Sat, 1 Apr 2023 19:12:32 +0200 -Subject: [PATCH 1/2] memstick: fix memory leak if card device is never - registered with the driver core - -When calling dev_set_name() memory is allocated for the name for the -struct device. Once that structure device is registered, or attempted -to be registerd, with the driver core, the driver core will handle -cleaning up that memory when the device is removed from the system. - -Unfortunatly for the memstick code, there is an error path that causes -the struct device to never be registered, and so the memory allocated in -dev_set_name will be leaked. Fix that leak by manually freeing it right -before the memory for the device is freed. - -Cc: Maxim Levitsky -Cc: Alex Dubov -Cc: Ulf Hansson -Cc: "Rafael J. Wysocki" -Cc: Hans de Goede -Cc: Kay Sievers -Cc: linux-mmc@vger.kernel.org -Fixes: 0252c3b4f018 ("memstick: struct device - replace bus_id with dev_name(), -Cc: stable -Co-developed-by: Greg Kroah-Hartman -Signed-off-by: Greg Kroah-Hartman -Co-developed-by: Mirsad Goran Todorovac ---- - drivers/memstick/core/memstick.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - ---- a/drivers/memstick/core/memstick.c -+++ b/drivers/memstick/core/memstick.c -@@ -410,6 +410,7 @@ static struct memstick_dev *memstick_all - return card; - err_out: - host->card = old_card; -+ kfree_const(card->dev.kobj.name); - kfree(card); - return NULL; - } -@@ -468,8 +469,10 @@ static void memstick_check(struct work_s - put_device(&card->dev); - host->card = NULL; - } -- } else -+ } else { -+ kfree_const(card->dev.kobj.name); - kfree(card); -+ } - } - - out_power_off: diff --git a/0001-readfile-implement-readfile-syscall.patch b/0001-readfile-implement-readfile-syscall.patch index 061e2e1ead653..2a9ab13b86f32 100644 --- a/0001-readfile-implement-readfile-syscall.patch +++ b/0001-readfile-implement-readfile-syscall.patch @@ -20,7 +20,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/fs/open.c +++ b/fs/open.c -@@ -1564,3 +1564,53 @@ int stream_open(struct inode *inode, str +@@ -1572,3 +1572,53 @@ int stream_open(struct inode *inode, str } EXPORT_SYMBOL(stream_open); diff --git a/0001-vsmp-driver.patch b/0001-vsmp-driver.patch index c3bff3b483633..d105defeea751 100644 --- a/0001-vsmp-driver.patch +++ b/0001-vsmp-driver.patch @@ -28,7 +28,7 @@ first cut to cleanup +Description: Shows the full version of the vSMP hypervisor --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -22419,6 +22419,12 @@ F: lib/test_printf.c +@@ -22629,6 +22629,12 @@ F: lib/test_printf.c F: lib/test_scanf.c F: lib/vsprintf.c diff --git a/0002-driver-core-class-fix-block-class-problem-when-remov.patch b/0002-driver-core-class-fix-block-class-problem-when-remov.patch deleted file mode 100644 index 521337e3e03bf..0000000000000 --- a/0002-driver-core-class-fix-block-class-problem-when-remov.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 6ecddadae3f779408bfa6a1b0c81e7728a00395e Mon Sep 17 00:00:00 2001 -From: Greg Kroah-Hartman -Date: Tue, 7 Mar 2023 08:43:59 +0100 -Subject: [PATCH 2/2] driver core: class: fix block class problem when removing - CONFIG_SYSFS_DEPRECATED* - -In removing the CONFIG_SYSFS_DEPRECATED and CONFIG_SYSFS_DEPRECATED_V2 -config options, I messed up in the __class_register() function and got -the logic incorrect. Fix this all up by just removing the special case -of a block device class logic in this function, as that is what is -intended. - -In testing, this solves the boot problem on my systems, hopefully on -others as well. - -Cc: "Rafael J. Wysocki" -Reported-by: Stephen Rothwell -Fixes: 721da5cee9d4 ("driver core: remove CONFIG_SYSFS_DEPRECATED and CONFIG_SYSFS_DEPRECATED_V2") -Signed-off-by: Greg Kroah-Hartman ---- - drivers/base/class.c | 6 ------ - 1 file changed, 6 deletions(-) - ---- a/drivers/base/class.c -+++ b/drivers/base/class.c -@@ -178,13 +178,7 @@ int __class_register(struct class *cls, - if (!cls->dev_kobj) - cls->dev_kobj = sysfs_dev_char_kobj; - --#if defined(CONFIG_BLOCK) -- /* let the block class directory show up in the root of sysfs */ -- if (cls != &block_class) -- cp->subsys.kobj.kset = class_kset; --#else - cp->subsys.kobj.kset = class_kset; --#endif - cp->subsys.kobj.ktype = &class_ktype; - cp->class = cls; - cls->p = cp; diff --git a/0003-selftests-add-readfile-2-selftests.patch b/0003-selftests-add-readfile-2-selftests.patch index 701dc8884fb76..68eecc16d4dff 100644 --- a/0003-selftests-add-readfile-2-selftests.patch +++ b/0003-selftests-add-readfile-2-selftests.patch @@ -25,7 +25,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile -@@ -66,6 +66,7 @@ TARGETS += resctrl +@@ -68,6 +68,7 @@ TARGETS += riscv TARGETS += rlimits TARGETS += rseq TARGETS += rtc diff --git a/documentation-embargoed-hardware-issues.rst-clean-out-empty-and-unused-entries.patch b/documentation-embargoed-hardware-issues.rst-clean-out-empty-and-unused-entries.patch new file mode 100644 index 0000000000000..75851fe943d3c --- /dev/null +++ b/documentation-embargoed-hardware-issues.rst-clean-out-empty-and-unused-entries.patch @@ -0,0 +1,44 @@ +From foo@baz Fri Jun 16 10:09:56 AM CEST 2023 +Date: Fri, 16 Jun 2023 10:09:56 +0200 +To: Greg KH +From: Greg Kroah-Hartman +Subject: [PATCH] Documentation: embargoed-hardware-issues.rst: clean out empty and unused entries + +There are a few empty entries in the company/project list, which +confuses people as to why they are there, so remove them entirely, and +also remove an entry that doesn't wish to participate in this process. + +Signed-off-by: Greg Kroah-Hartman +--- + Documentation/process/embargoed-hardware-issues.rst | 4 ---- + 1 file changed, 4 deletions(-) + +--- a/Documentation/process/embargoed-hardware-issues.rst ++++ b/Documentation/process/embargoed-hardware-issues.rst +@@ -244,7 +244,6 @@ disclosure of a particular issue, unless + an involved disclosed party. The current ambassadors list: + + ============= ======================================================== +- AMD Tom Lendacky + Ampere Darren Hart + ARM Catalin Marinas + IBM Power Anton Blanchard +@@ -254,7 +253,6 @@ an involved disclosed party. The current + Samsung Javier González + + Microsoft James Morris +- VMware + Xen Andrew Cooper + + Canonical John Johansen +@@ -263,10 +261,8 @@ an involved disclosed party. The current + Red Hat Josh Poimboeuf + SUSE Jiri Kosina + +- Amazon + Google Kees Cook + +- GCC + LLVM Nick Desaulniers + ============= ======================================================== + diff --git a/qlcnic_sysfs.patch b/qlcnic_sysfs.patch index a3c5a94e529c1..5eb02aeabc25e 100644 --- a/qlcnic_sysfs.patch +++ b/qlcnic_sysfs.patch @@ -4,7 +4,7 @@ --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c -@@ -32,9 +32,9 @@ int qlcnicvf_config_led(struct qlcnic_ad +@@ -31,9 +31,9 @@ int qlcnicvf_config_led(struct qlcnic_ad return -EOPNOTSUPP; } @@ -17,7 +17,7 @@ { struct qlcnic_adapter *adapter = dev_get_drvdata(dev); unsigned long new; -@@ -56,9 +56,8 @@ err_out: +@@ -55,9 +55,8 @@ err_out: return ret; } @@ -29,7 +29,7 @@ { struct qlcnic_adapter *adapter = dev_get_drvdata(dev); int bridged_mode = 0; -@@ -68,10 +67,11 @@ static ssize_t qlcnic_show_bridged_mode( +@@ -67,10 +66,11 @@ static ssize_t qlcnic_show_bridged_mode( return sprintf(buf, "%d\n", bridged_mode); } @@ -44,7 +44,7 @@ { struct qlcnic_adapter *adapter = dev_get_drvdata(dev); unsigned long new; -@@ -85,12 +85,13 @@ static ssize_t qlcnic_store_diag_mode(st +@@ -84,12 +84,13 @@ static ssize_t qlcnic_store_diag_mode(st return len; } @@ -60,7 +60,7 @@ static int qlcnic_validate_beacon(struct qlcnic_adapter *adapter, u16 beacon, u8 *state, u8 *rate) -@@ -211,9 +212,8 @@ out: +@@ -210,9 +211,8 @@ out: return err; } @@ -72,7 +72,7 @@ { struct qlcnic_adapter *adapter = dev_get_drvdata(dev); int err = 0; -@@ -234,8 +234,8 @@ static ssize_t qlcnic_store_beacon(struc +@@ -233,8 +233,8 @@ static ssize_t qlcnic_store_beacon(struc return err; } @@ -83,7 +83,7 @@ { struct qlcnic_adapter *adapter = dev_get_drvdata(dev); -@@ -263,6 +263,7 @@ static int qlcnic_sysfs_validate_crb(str +@@ -262,6 +262,7 @@ static int qlcnic_sysfs_validate_crb(str return 0; } @@ -91,7 +91,7 @@ static ssize_t qlcnic_sysfs_read_crb(struct file *filp, struct kobject *kobj, struct bin_attribute *attr, char *buf, -@@ -1175,24 +1176,6 @@ static ssize_t qlcnic_83xx_sysfs_flash_w +@@ -1174,24 +1175,6 @@ static ssize_t qlcnic_83xx_sysfs_flash_w return size; } @@ -116,7 +116,7 @@ static const struct bin_attribute bin_attr_crb = { .attr = { .name = "crb", .mode = 0644 }, .size = 0, -@@ -1318,6 +1301,24 @@ void qlcnic_unregister_hwmon_dev(struct +@@ -1317,6 +1300,24 @@ void qlcnic_unregister_hwmon_dev(struct } #endif @@ -141,7 +141,7 @@ void qlcnic_create_sysfs_entries(struct qlcnic_adapter *adapter) { struct device *dev = &adapter->pdev->dev; -@@ -1331,6 +1332,11 @@ void qlcnic_create_sysfs_entries(struct +@@ -1330,6 +1331,11 @@ void qlcnic_create_sysfs_entries(struct void qlcnic_remove_sysfs_entries(struct qlcnic_adapter *adapter) { struct device *dev = &adapter->pdev->dev; diff --git a/series b/series index 1c62875d6a49a..3ba830b63206a 100644 --- a/series +++ b/series @@ -1,7 +1,5 @@ # -0001-memstick-fix-memory-leak-if-card-device-is-never-reg.patch -0001-driver-core-remove-CONFIG_SYSFS_DEPRECATED-and-CONFI.patch -0002-driver-core-class-fix-block-class-problem-when-remov.patch +documentation-embargoed-hardware-issues.rst-clean-out-empty-and-unused-entries.patch usb.patch 0001-vsmp-driver.patch 0001-driver-core-aux-test-code.patch diff --git a/usb.patch b/usb.patch index 68f471ef2e255..bfaed2e78bb9b 100644 --- a/usb.patch +++ b/usb.patch @@ -4,9 +4,9 @@ --- a/drivers/usb/storage/unusual_uas.h +++ b/drivers/usb/storage/unusual_uas.h -@@ -111,6 +111,17 @@ UNUSUAL_DEV(0x152d, 0x0578, 0x0000, 0x99 +@@ -118,6 +118,17 @@ UNUSUAL_DEV(0x152d, 0x0583, 0x0000, 0x99 USB_SC_DEVICE, USB_PR_DEVICE, NULL, - US_FL_BROKEN_FUA), + US_FL_NO_REPORT_OPCODES), +/* Reported-by: Greg Kroah-Hartman */ +UNUSUAL_DEV(0x152d, 0x0583, 0x0000, 0x9999, -- cgit 1.2.3-korg From c4a298735eb23d6a2b0b55b35a32accf0e79c790 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 27 Jun 2023 13:28:39 +0200 Subject: updates --- 0001-vsmp-driver.patch | 2 +- pmu_attr_visible.patch | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ series | 1 + 3 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 pmu_attr_visible.patch diff --git a/0001-vsmp-driver.patch b/0001-vsmp-driver.patch index d105defeea751..9194070356ce9 100644 --- a/0001-vsmp-driver.patch +++ b/0001-vsmp-driver.patch @@ -28,7 +28,7 @@ first cut to cleanup +Description: Shows the full version of the vSMP hypervisor --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -22629,6 +22629,12 @@ F: lib/test_printf.c +@@ -22634,6 +22634,12 @@ F: lib/test_printf.c F: lib/test_scanf.c F: lib/vsprintf.c diff --git a/pmu_attr_visible.patch b/pmu_attr_visible.patch new file mode 100644 index 0000000000000..f5af16a1b22c5 --- /dev/null +++ b/pmu_attr_visible.patch @@ -0,0 +1,63 @@ +--- + kernel/events/core.c | 40 ++++++++++++++++++++++++++++------------ + 1 file changed, 28 insertions(+), 12 deletions(-) + +--- a/kernel/events/core.c ++++ b/kernel/events/core.c +@@ -11351,9 +11351,32 @@ static DEVICE_ATTR_RW(perf_event_mux_int + static struct attribute *pmu_dev_attrs[] = { + &dev_attr_type.attr, + &dev_attr_perf_event_mux_interval_ms.attr, ++ &dev_attr_nr_addr_filters.attr, ++ NULL, ++}; ++ ++static umode_t pmu_dev_is_visible(struct kobject *kobj, struct attribute *a, int n) ++{ ++ struct device *dev = kobj_to_dev(kobj); ++ struct pmu *pmu = dev_get_drvdata(dev); ++ ++ if (!pmu->nr_addr_filters) ++ return 0; ++ ++ return a->mode; ++ ++ return 0; ++} ++ ++static struct attribute_group pmu_dev_attr_group = { ++ .is_visible = pmu_dev_is_visible, ++ .attrs = pmu_dev_attrs, ++}; ++ ++const static struct attribute_group *pmu_dev_groups[] = { ++ &pmu_dev_attr_group, + NULL, + }; +-ATTRIBUTE_GROUPS(pmu_dev); + + static int pmu_bus_running; + static struct bus_type pmu_bus = { +@@ -11389,18 +11412,11 @@ static int pmu_dev_alloc(struct pmu *pmu + if (ret) + goto free_dev; + +- /* For PMUs with address filters, throw in an extra attribute: */ +- if (pmu->nr_addr_filters) +- ret = device_create_file(pmu->dev, &dev_attr_nr_addr_filters); +- +- if (ret) +- goto del_dev; +- +- if (pmu->attr_update) ++ if (pmu->attr_update) { + ret = sysfs_update_groups(&pmu->dev->kobj, pmu->attr_update); +- +- if (ret) +- goto del_dev; ++ if (ret) ++ goto del_dev; ++ } + + out: + return ret; diff --git a/series b/series index 3ba830b63206a..81b604e97fa7e 100644 --- a/series +++ b/series @@ -1,4 +1,5 @@ # +pmu_attr_visible.patch documentation-embargoed-hardware-issues.rst-clean-out-empty-and-unused-entries.patch usb.patch 0001-vsmp-driver.patch -- cgit 1.2.3-korg