The following commit has been merged in the master branch: commit 29d9f30d4ce6c7a38745a54a8cddface10013490 Merge: 56a451b780676bc1cdac011735fe2869fa2e9abf 7f80ccfe996871ca69648efee74a60ae7ad0dcd9 Author: Linus Torvalds torvalds@linux-foundation.org Date: Tue Mar 31 17:29:33 2020 -0700
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next
Pull networking updates from David Miller: "Highlights:
1) Fix the iwlwifi regression, from Johannes Berg.
2) Support BSS coloring and 802.11 encapsulation offloading in hardware, from John Crispin.
3) Fix some potential Spectre issues in qtnfmac, from Sergey Matyukevich.
4) Add TTL decrement action to openvswitch, from Matteo Croce.
5) Allow paralleization through flow_action setup by not taking the RTNL mutex, from Vlad Buslov.
6) A lot of zero-length array to flexible-array conversions, from Gustavo A. R. Silva.
7) Align XDP statistics names across several drivers for consistency, from Lorenzo Bianconi.
8) Add various pieces of infrastructure for offloading conntrack, and make use of it in mlx5 driver, from Paul Blakey.
9) Allow using listening sockets in BPF sockmap, from Jakub Sitnicki.
10) Lots of parallelization improvements during configuration changes in mlxsw driver, from Ido Schimmel.
11) Add support to devlink for generic packet traps, which report packets dropped during ACL processing. And use them in mlxsw driver. From Jiri Pirko.
12) Support bcmgenet on ACPI, from Jeremy Linton.
13) Make BPF compatible with RT, from Thomas Gleixnet, Alexei Starovoitov, and your's truly.
14) Support XDP meta-data in virtio_net, from Yuya Kusakabe.
15) Fix sysfs permissions when network devices change namespaces, from Christian Brauner.
16) Add a flags element to ethtool_ops so that drivers can more simply indicate which coalescing parameters they actually support, and therefore the generic layer can validate the user's ethtool request. Use this in all drivers, from Jakub Kicinski.
17) Offload FIFO qdisc in mlxsw, from Petr Machata.
18) Support UDP sockets in sockmap, from Lorenz Bauer.
19) Fix stretch ACK bugs in several TCP congestion control modules, from Pengcheng Yang.
20) Support virtual functiosn in octeontx2 driver, from Tomasz Duszynski.
21) Add region operations for devlink and use it in ice driver to dump NVM contents, from Jacob Keller.
22) Add support for hw offload of MACSEC, from Antoine Tenart.
23) Add support for BPF programs that can be attached to LSM hooks, from KP Singh.
24) Support for multiple paths, path managers, and counters in MPTCP. From Peter Krystad, Paolo Abeni, Florian Westphal, Davide Caratti, and others.
25) More progress on adding the netlink interface to ethtool, from Michal Kubecek"
* git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2121 commits) net: ipv6: rpl_iptunnel: Fix potential memory leak in rpl_do_srh_inline cxgb4/chcr: nic-tls stats in ethtool net: dsa: fix oops while probing Marvell DSA switches net/bpfilter: remove superfluous testing message net: macb: Fix handling of fixed-link node net: dsa: ksz: Select KSZ protocol tag netdevsim: dev: Fix memory leak in nsim_dev_take_snapshot_write net: stmmac: add EHL 2.5Gbps PCI info and PCI ID net: stmmac: add EHL PSE0 & PSE1 1Gbps PCI info and PCI ID net: stmmac: create dwmac-intel.c to contain all Intel platform net: dsa: bcm_sf2: Support specifying VLAN tag egress rule net: dsa: bcm_sf2: Add support for matching VLAN TCI net: dsa: bcm_sf2: Move writing of CFP_DATA(5) into slicing functions net: dsa: bcm_sf2: Check earlier for FLOW_EXT and FLOW_MAC_EXT net: dsa: bcm_sf2: Disable learning for ASP port net: dsa: b53: Deny enslaving port 7 for 7278 into a bridge net: dsa: b53: Prevent tagged VLAN on port 7 for 7278 net: dsa: b53: Restore VLAN entries upon (re)configuration net: dsa: bcm_sf2: Fix overflow checks hv_netvsc: Remove unnecessary round_up for recv_completion_cnt ...
diff --combined MAINTAINERS index a2b9bbf6e8b2,e3e2db696ae9..195052943574 --- a/MAINTAINERS +++ b/MAINTAINERS @@@ -176,7 -176,7 +176,7 @@@ L: linux-wpan@vger.kernel.or S: Maintained F: net/6lowpan/ F: include/net/6lowpan.h - F: Documentation/networking/6lowpan.txt + F: Documentation/networking/6lowpan.rst
6PACK NETWORK DRIVER FOR AX.25 M: Andreas Koensgen ajk@comnets.uni-bremen.de @@@ -214,7 -214,7 +214,7 @@@ Q: http://patchwork.kernel.org/project/ T: git git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs.git T: git git://github.com/martinetd/linux.git S: Maintained -F: Documentation/filesystems/9p.txt +F: Documentation/filesystems/9p.rst F: fs/9p/ F: net/9p/ F: include/net/9p/ @@@ -303,8 -303,8 +303,8 @@@ F: drivers/net/ethernet/alteon/acenic ACER ASPIRE ONE TEMPERATURE AND FAN DRIVER M: Peter Kaestle peter@piie.net L: platform-driver-x86@vger.kernel.org -W: http://piie.net/?section=acerhdf S: Maintained +W: http://piie.net/?section=acerhdf F: drivers/platform/x86/acerhdf.c
ACER WMI LAPTOP EXTRAS @@@ -584,7 -584,7 +584,7 @@@ AFFS FILE SYSTE M: David Sterba dsterba@suse.com L: linux-fsdevel@vger.kernel.org S: Odd Fixes -F: Documentation/filesystems/affs.txt +F: Documentation/filesystems/affs.rst F: fs/affs/
AFS FILESYSTEM @@@ -593,7 -593,7 +593,7 @@@ L: linux-afs@lists.infradead.or S: Supported F: fs/afs/ F: include/trace/events/afs.h -F: Documentation/filesystems/afs.txt +F: Documentation/filesystems/afs.rst W: https://www.infradead.org/~dhowells/kafs/
AGPGART DRIVER @@@ -931,14 -931,6 +931,14 @@@ S: Supporte F: drivers/iio/adc/ad7124.c F: Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml
+ANALOG DEVICES INC AD7192 DRIVER +M: Alexandru Tachici alexandru.tachici@analog.com +L: linux-iio@vger.kernel.org +W: http://ez.analog.com/community/linux-device-drivers +S: Supported +F: drivers/iio/adc/ad7192.c +F: Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml + ANALOG DEVICES INC AD7292 DRIVER M: Marcelo Schmitt marcelo.schmitt1@gmail.com L: linux-iio@vger.kernel.org @@@ -1089,15 -1081,6 +1089,15 @@@ F: drivers/iio/adc/ltc249 X: drivers/iio/*/adjd* F: drivers/staging/iio/*/ad*
+ANALOG DEVICES INC HMC425A DRIVER +M: Beniamin Bia beniamin.bia@analog.com +M: Michael Hennerich michael.hennerich@analog.com +L: linux-iio@vger.kernel.org +S: Supported +W: http://ez.analog.com/community/linux-device-drivers +F: Documentation/devicetree/bindings/iio/amplifiers/adi,hmc425a.yaml +F: drivers/iio/amplifiers/hmc425a.c + ANALOGBITS PLL LIBRARIES M: Paul Walmsley paul.walmsley@sifive.com S: Supported @@@ -2293,7 -2276,6 +2293,7 @@@ T: git git://git.kernel.org/pub/scm/lin S: Maintained F: Documentation/devicetree/bindings/i2c/i2c-rk3x.txt F: Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml +F: Documentation/devicetree/bindings/spi/spi-rockchip.yaml F: arch/arm/boot/dts/rk3* F: arch/arm/boot/dts/rv1108* F: arch/arm/mach-rockchip/ @@@ -2766,8 -2748,8 +2766,8 @@@ ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRA M: Corentin Chary corentin.chary@gmail.com L: acpi4asus-user@lists.sourceforge.net L: platform-driver-x86@vger.kernel.org -W: http://acpi4asus.sf.net S: Maintained +W: http://acpi4asus.sf.net F: drivers/platform/x86/asus*.c F: drivers/platform/x86/eeepc*.c
@@@ -2975,14 -2957,6 +2975,14 @@@ S: Maintaine F: Documentation/devicetree/bindings/sound/axentia,* F: sound/soc/atmel/tse850-pcm5142.c
+AXI-FAN-CONTROL HARDWARE MONITOR DRIVER +M: Nuno Sá nuno.sa@analog.com +W: http://ez.analog.com/community/linux-device-drivers +L: linux-hwmon@vger.kernel.org +S: Supported +F: drivers/hwmon/axi-fan-control.c +F: Documentation/devicetree/bindings/hwmon/adi,axi-fan-control.yaml + AXXIA I2C CONTROLLER M: Krzysztof Adamski krzysztof.adamski@nokia.com L: linux-i2c@vger.kernel.org @@@ -3089,7 -3063,7 +3089,7 @@@ M: Luis de Bethencourt <luisbg@kernel.o M: Salah Triki salah.triki@gmail.com S: Maintained T: git git://git.kernel.org/pub/scm/linux/kernel/git/luisbg/linux-befs.git -F: Documentation/filesystems/befs.txt +F: Documentation/filesystems/befs.rst F: fs/befs/
BFQ I/O SCHEDULER @@@ -3103,7 -3077,7 +3103,7 @@@ F: Documentation/block/bfq-iosched.rs BFS FILE SYSTEM M: "Tigran A. Aivazian" aivazian.tigran@gmail.com S: Maintained -F: Documentation/filesystems/bfs.txt +F: Documentation/filesystems/bfs.rst F: fs/bfs/ F: include/uapi/linux/bfs_fs.h
@@@ -3173,6 -3147,8 +3173,8 @@@ R: Martin KaFai Lau <kafai@fb.com R: Song Liu songliubraving@fb.com R: Yonghong Song yhs@fb.com R: Andrii Nakryiko andriin@fb.com + R: John Fastabend john.fastabend@gmail.com + R: KP Singh kpsingh@chromium.org L: netdev@vger.kernel.org L: bpf@vger.kernel.org T: git git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git @@@ -3239,11 -3215,22 +3241,22 @@@ L: bpf@vger.kernel.or S: Maintained F: arch/powerpc/net/
- BPF JIT for RISC-V (RV64G) + BPF JIT for RISC-V (32-bit) + M: Luke Nelson luke.r.nels@gmail.com + M: Xi Wang xi.wang@gmail.com + L: netdev@vger.kernel.org + L: bpf@vger.kernel.org + S: Maintained + F: arch/riscv/net/ + X: arch/riscv/net/bpf_jit_comp64.c + + BPF JIT for RISC-V (64-bit) M: Björn Töpel bjorn.topel@gmail.com L: netdev@vger.kernel.org + L: bpf@vger.kernel.org S: Maintained F: arch/riscv/net/ + X: arch/riscv/net/bpf_jit_comp32.c
BPF JIT for S390 M: Ilya Leoshkevich iii@linux.ibm.com @@@ -3636,7 -3623,7 +3649,7 @@@ W: http://btrfs.wiki.kernel.org Q: http://patchwork.kernel.org/project/linux-btrfs/list/ T: git git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git S: Maintained -F: Documentation/filesystems/btrfs.txt +F: Documentation/filesystems/btrfs.rst F: fs/btrfs/ F: include/linux/btrfs* F: include/uapi/linux/btrfs* @@@ -3933,7 -3920,7 +3946,7 @@@ W: http://ceph.com T: git git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client.git T: git git://github.com/ceph/ceph-client.git S: Supported -F: Documentation/filesystems/ceph.txt +F: Documentation/filesystems/ceph.rst F: fs/ceph/
CERTIFICATE HANDLING @@@ -3946,6 -3933,11 +3959,6 @@@ F: certs F: scripts/sign-file.c F: scripts/extract-cert.c
-CERTIFIED WIRELESS USB (WUSB) SUBSYSTEM -L: devel@driverdev.osuosl.org -S: Obsolete -F: drivers/staging/wusbcore/ - CFAG12864B LCD DRIVER M: Miguel Ojeda Sandonis miguel.ojeda.sandonis@gmail.com S: Maintained @@@ -4139,7 -4131,6 +4152,7 @@@ B: https://github.com/ClangBuiltLinux/l C: irc://chat.freenode.net/clangbuiltlinux S: Supported K: \b(?i:clang|llvm)\b +F: Documentation/kbuild/llvm.rst
CLEANCACHE API M: Konrad Rzeszutek Wilk konrad.wilk@oracle.com @@@ -4445,7 -4436,7 +4458,7 @@@ F: include/linux/cpuidle. CRAMFS FILESYSTEM M: Nicolas Pitre nico@fluxnic.net S: Maintained -F: Documentation/filesystems/cramfs.txt +F: Documentation/filesystems/cramfs.rst F: fs/cramfs/
CREATIVE SB0540 @@@ -4745,6 -4736,26 +4758,6 @@@ S: Maintaine F: drivers/media/platform/sunxi/sun8i-di/ F: Documentation/devicetree/bindings/media/allwinner,sun8i-h3-deinterlace.yaml
-DELL SMBIOS DRIVER -M: Pali Rohár pali.rohar@gmail.com -M: Mario Limonciello mario.limonciello@dell.com -L: platform-driver-x86@vger.kernel.org -S: Maintained -F: drivers/platform/x86/dell-smbios.* - -DELL SMBIOS SMM DRIVER -M: Mario Limonciello mario.limonciello@dell.com -L: platform-driver-x86@vger.kernel.org -S: Maintained -F: drivers/platform/x86/dell-smbios-smm.c - -DELL SMBIOS WMI DRIVER -M: Mario Limonciello mario.limonciello@dell.com -L: platform-driver-x86@vger.kernel.org -S: Maintained -F: drivers/platform/x86/dell-smbios-wmi.c -F: tools/wmi/dell-smbios-example.c - DEFZA FDDI NETWORK DRIVER M: "Maciej W. Rozycki" macro@linux-mips.org S: Maintained @@@ -4767,37 -4778,17 +4780,37 @@@ M: Pali Rohár <pali.rohar@gmail.com S: Maintained F: drivers/platform/x86/dell-rbtn.*
+DELL LAPTOP SMM DRIVER +M: Pali Rohár pali.rohar@gmail.com +S: Maintained +F: drivers/hwmon/dell-smm-hwmon.c +F: include/uapi/linux/i8k.h + DELL REMOTE BIOS UPDATE DRIVER M: Stuart Hayes stuart.w.hayes@gmail.com L: platform-driver-x86@vger.kernel.org S: Maintained F: drivers/platform/x86/dell_rbu.c
-DELL LAPTOP SMM DRIVER +DELL SMBIOS DRIVER M: Pali Rohár pali.rohar@gmail.com +M: Mario Limonciello mario.limonciello@dell.com +L: platform-driver-x86@vger.kernel.org S: Maintained -F: drivers/hwmon/dell-smm-hwmon.c -F: include/uapi/linux/i8k.h +F: drivers/platform/x86/dell-smbios.* + +DELL SMBIOS SMM DRIVER +M: Mario Limonciello mario.limonciello@dell.com +L: platform-driver-x86@vger.kernel.org +S: Maintained +F: drivers/platform/x86/dell-smbios-smm.c + +DELL SMBIOS WMI DRIVER +M: Mario Limonciello mario.limonciello@dell.com +L: platform-driver-x86@vger.kernel.org +S: Maintained +F: drivers/platform/x86/dell-smbios-wmi.c +F: tools/wmi/dell-smbios-example.c
DELL SYSTEMS MANAGEMENT BASE DRIVER (dcdbas) M: Stuart Hayes stuart.w.hayes@gmail.com @@@ -4806,17 -4797,17 +4819,17 @@@ S: Maintaine F: Documentation/driver-api/dcdbas.rst F: drivers/platform/x86/dcdbas.*
+DELL WMI DESCRIPTOR DRIVER +M: Mario Limonciello mario.limonciello@dell.com +S: Maintained +F: drivers/platform/x86/dell-wmi-descriptor.c + DELL WMI NOTIFICATIONS DRIVER M: Matthew Garrett mjg59@srcf.ucam.org M: Pali Rohár pali.rohar@gmail.com S: Maintained F: drivers/platform/x86/dell-wmi.c
-DELL WMI DESCRIPTOR DRIVER -M: Mario Limonciello mario.limonciello@dell.com -S: Maintained -F: drivers/platform/x86/dell-wmi-descriptor.c - DELTA ST MEDIA DRIVER M: Hugues Fruchet hugues.fruchet@st.com L: linux-media@vger.kernel.org @@@ -5223,7 -5214,7 +5236,7 @@@ M: Greg Kroah-Hartman <gregkh@linuxfoun R: "Rafael J. Wysocki" rafael@kernel.org T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git S: Supported -F: Documentation/kobject.txt +F: Documentation/core-api/kobject.rst F: drivers/base/ F: fs/debugfs/ F: fs/sysfs/ @@@ -5960,7 -5951,7 +5973,7 @@@ W: http://ecryptfs.or W: https://launchpad.net/ecryptfs T: git git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs.git S: Odd Fixes -F: Documentation/filesystems/ecryptfs.txt +F: Documentation/filesystems/ecryptfs.rst F: fs/ecryptfs/
EDAC-AMD64 @@@ -6020,12 -6011,6 +6033,12 @@@ F: Documentation/driver-api/edac.rs F: drivers/edac/ F: include/linux/edac.h
+EDAC-DMC520 +M: Lei Wang lewan@microsoft.com +L: linux-edac@vger.kernel.org +S: Supported +F: drivers/edac/dmc520_edac.c + EDAC-E752X M: Mark Gross mark.gross@intel.com L: linux-edac@vger.kernel.org @@@ -6276,12 -6261,12 +6289,12 @@@ F: drivers/video/fbdev/s1d13xxxfb. F: include/video/s1d13xxxfb.h
EROFS FILE SYSTEM -M: Gao Xiang gaoxiang25@huawei.com +M: Gao Xiang xiang@kernel.org M: Chao Yu yuchao0@huawei.com L: linux-erofs@lists.ozlabs.org S: Maintained T: git git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git -F: Documentation/filesystems/erofs.txt +F: Documentation/filesystems/erofs.rst F: fs/erofs/ F: include/trace/events/erofs.h
@@@ -6332,11 -6317,17 +6345,11 @@@ F: include/trace/events/mdio. F: include/uapi/linux/mdio.h F: include/uapi/linux/mii.h
-EXFAT FILE SYSTEM -M: Valdis Kletnieks valdis.kletnieks@vt.edu -L: linux-fsdevel@vger.kernel.org -S: Maintained -F: drivers/staging/exfat/ - EXT2 FILE SYSTEM M: Jan Kara jack@suse.com L: linux-ext4@vger.kernel.org S: Maintained -F: Documentation/filesystems/ext2.txt +F: Documentation/filesystems/ext2.rst F: fs/ext2/ F: include/linux/ext2*
@@@ -6364,6 -6355,7 +6377,6 @@@ T: git git://git.kernel.org/pub/scm/lin S: Maintained F: Documentation/admin-guide/efi-stub.rst F: arch/*/kernel/efi.c -F: arch/x86/boot/compressed/eboot.[ch] F: arch/*/include/asm/efi.h F: arch/x86/platform/efi/ F: drivers/firmware/efi/ @@@ -6409,7 -6401,7 +6422,7 @@@ L: linux-f2fs-devel@lists.sourceforge.n W: https://f2fs.wiki.kernel.org/ T: git git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git S: Maintained -F: Documentation/filesystems/f2fs.txt +F: Documentation/filesystems/f2fs.rst F: Documentation/ABI/testing/sysfs-fs-f2fs F: fs/f2fs/ F: include/linux/f2fs_fs.h @@@ -6879,13 -6871,6 +6892,13 @@@ S: Maintaine F: drivers/i2c/busses/i2c-fsi.c F: Documentation/devicetree/bindings/i2c/i2c-fsi.txt
+FSI-ATTACHED SPI DRIVER +M: Eddie James eajames@linux.ibm.com +L: linux-spi@vger.kernel.org +S: Maintained +F: drivers/spi/spi-fsi.c +F: Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml + FSNOTIFY: FILESYSTEM NOTIFICATION INFRASTRUCTURE M: Jan Kara jack@suse.cz R: Amir Goldstein amir73il@gmail.com @@@ -6961,7 -6946,7 +6974,7 @@@ S: Maintaine F: scripts/gcc-plugins/ F: scripts/gcc-plugin.sh F: scripts/Makefile.gcc-plugins -F: Documentation/core-api/gcc-plugins.rst +F: Documentation/kbuild/gcc-plugins.rst
GASKET DRIVER FRAMEWORK M: Rob Springer rspringer@google.com @@@ -7375,8 -7360,8 +7388,8 @@@ F: drivers/media/usb/hackrf HARD DRIVE ACTIVE PROTECTION SYSTEM (HDAPS) DRIVER M: Frank Seidel frank@f-seidel.de L: platform-driver-x86@vger.kernel.org -W: http://www.kernel.org/pub/linux/kernel/people/fseidel/hdaps/ S: Maintained +W: http://www.kernel.org/pub/linux/kernel/people/fseidel/hdaps/ F: drivers/platform/x86/hdaps.c
HARDWARE MONITORING @@@ -7458,13 -7443,13 +7471,13 @@@ F: drivers/infiniband/hw/hfi HFS FILESYSTEM L: linux-fsdevel@vger.kernel.org S: Orphan -F: Documentation/filesystems/hfs.txt +F: Documentation/filesystems/hfs.rst F: fs/hfs/
HFSPLUS FILESYSTEM L: linux-fsdevel@vger.kernel.org S: Orphan -F: Documentation/filesystems/hfsplus.txt +F: Documentation/filesystems/hfsplus.rst F: fs/hfsplus/
HGA FRAMEBUFFER DRIVER @@@ -7979,7 -7964,6 +7992,7 @@@ L: linux-ia64@vger.kernel.or T: git git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git S: Maintained F: arch/ia64/ +F: Documentation/ia64/
IBM Power 842 compression accelerator M: Haren Myneni haren@us.ibm.com @@@ -8119,15 -8103,15 +8132,15 @@@ F: drivers/ide/ide-cd IDEAPAD LAPTOP EXTRAS DRIVER M: Ike Panhc ike.pan@canonical.com L: platform-driver-x86@vger.kernel.org -W: http://launchpad.net/ideapad-laptop S: Maintained +W: http://launchpad.net/ideapad-laptop F: drivers/platform/x86/ideapad-laptop.c
IDEAPAD LAPTOP SLIDEBAR DRIVER M: Andrey Moiseev o2g.org.ru@gmail.com L: linux-input@vger.kernel.org -W: https://github.com/o2genum/ideapad-slidebar S: Maintained +W: https://github.com/o2genum/ideapad-slidebar F: drivers/input/misc/ideapad_slidebar.c
IDT VersaClock 5 CLOCK DRIVER @@@ -8343,7 -8327,7 +8356,7 @@@ M: Jan Kara <jack@suse.cz R: Amir Goldstein amir73il@gmail.com L: linux-fsdevel@vger.kernel.org S: Maintained -F: Documentation/filesystems/inotify.txt +F: Documentation/filesystems/inotify.rst F: fs/notify/inotify/ F: include/linux/inotify.h F: include/uapi/linux/inotify.h @@@ -8593,8 -8577,8 +8606,8 @@@ F: samples/mei/ INTEL MENLOW THERMAL DRIVER M: Sujith Thomas sujith.thomas@intel.com L: platform-driver-x86@vger.kernel.org -W: https://01.org/linux-acpi S: Supported +W: https://01.org/linux-acpi F: drivers/platform/x86/intel_menlow.c
INTEL MIC DRIVERS (mic) @@@ -8603,15 -8587,15 +8616,15 @@@ M: Ashutosh Dixit <ashutosh.dixit@intel S: Supported W: https://github.com/sudeepdutt/mic W: http://software.intel.com/en-us/mic-developer +F: Documentation/misc-devices/mic/ +F: drivers/dma/mic_x100_dma.c +F: drivers/dma/mic_x100_dma.h +F: drivers/misc/mic/ F: include/linux/mic_bus.h F: include/linux/scif.h F: include/uapi/linux/mic_common.h F: include/uapi/linux/mic_ioctl.h F: include/uapi/linux/scif_ioctl.h -F: drivers/misc/mic/ -F: drivers/dma/mic_x100_dma.c -F: drivers/dma/mic_x100_dma.h -F: Documentation/mic/
INTEL PMC CORE DRIVER M: Rajneesh Bhardwaj rajneesh.bhardwaj@intel.com @@@ -8624,10 -8608,10 +8637,10 @@@ INTEL PMC/P-Unit IPC DRIVE M: Zha Qipengqipeng.zha@intel.com L: platform-driver-x86@vger.kernel.org S: Maintained -F: drivers/platform/x86/intel_pmc_ipc.c -F: drivers/platform/x86/intel_punit_ipc.c F: arch/x86/include/asm/intel_pmc_ipc.h F: arch/x86/include/asm/intel_punit_ipc.h +F: drivers/platform/x86/intel_pmc_ipc.c +F: drivers/platform/x86/intel_punit_ipc.c
INTEL PMIC GPIO DRIVERS M: Andy Shevchenko andy@kernel.org @@@ -8672,8 -8656,8 +8685,8 @@@ M: Srinivas Pandruvada <srinivas.pandru L: platform-driver-x86@vger.kernel.org S: Maintained F: drivers/platform/x86/intel_speed_select_if/ -F: tools/power/x86/intel-speed-select/ F: include/uapi/linux/isst_if.h +F: tools/power/x86/intel-speed-select/
INTEL STRATIX10 FIRMWARE DRIVERS M: Richard Gong richard.gong@linux.intel.com @@@ -9309,8 -9293,8 +9322,8 @@@ L: keyrings@vger.kernel.or S: Supported F: Documentation/security/keys/trusted-encrypted.rst F: include/keys/trusted-type.h -F: security/keys/trusted.c -F: include/keys/trusted.h +F: include/keys/trusted_tpm.h +F: security/keys/trusted-keys/
KEYS/KEYRINGS M: David Howells dhowells@redhat.com @@@ -9385,6 -9369,8 +9398,8 @@@ F: include/net/l3mdev. L7 BPF FRAMEWORK M: John Fastabend john.fastabend@gmail.com M: Daniel Borkmann daniel@iogearbox.net + M: Jakub Sitnicki jakub@cloudflare.com + M: Lorenz Bauer lmb@cloudflare.com L: netdev@vger.kernel.org L: bpf@vger.kernel.org S: Maintained @@@ -9392,6 -9378,7 +9407,7 @@@ F: include/linux/skmsg. F: net/core/skmsg.c F: net/core/sock_map.c F: net/ipv4/tcp_bpf.c + F: net/ipv4/udp_bpf.c
LANTIQ / INTEL Ethernet drivers M: Hauke Mehrtens hauke@hauke-m.de @@@ -10122,6 -10109,13 +10138,13 @@@ M: Nicolas Pitre <nico@fluxnic.net S: Odd Fixes F: drivers/mmc/host/mvsdio.*
+ MARVELL USB MDIO CONTROLLER DRIVER + M: Tobias Waldekranz tobias@waldekranz.com + L: netdev@vger.kernel.org + S: Maintained + F: drivers/net/phy/mdio-mvusb.c + F: Documentation/devicetree/bindings/net/marvell,mvusb.yaml + MARVELL XENON MMC/SD/SDIO HOST CONTROLLER DRIVER M: Hu Ziji huziji@marvell.com L: linux-mmc@vger.kernel.org @@@ -10978,7 -10972,6 +11001,7 @@@ F: drivers/media/platform/atmel/atmel-i F: drivers/media/platform/atmel/atmel-isc-base.c F: drivers/media/platform/atmel/atmel-isc-regs.h F: Documentation/devicetree/bindings/media/atmel-isc.txt +F: include/linux/atmel-isc-media.h
MICROCHIP ISI DRIVER M: Eugen Hristev eugen.hristev@microchip.com @@@ -11204,7 -11197,6 +11227,7 @@@ S: Maintaine F: arch/mips/loongson64/ F: arch/mips/include/asm/mach-loongson64/ F: drivers/platform/mips/cpu_hwmon.c +F: drivers/irqchip/irq-loongson* F: drivers/*/*loongson3* F: drivers/*/*/*loongson3*
@@@ -11293,8 -11285,7 +11316,8 @@@ F: drivers/tty/mxser. MONOLITHIC POWER SYSTEM PMIC DRIVER M: Saravanan Sekar sravanhome@gmail.com S: Maintained -F: Documentation/devicetree/bindings/regulator/mpq7920.yaml +F: Documentation/devicetree/bindings/regulator/mps,mp*.yaml +F: drivers/regulator/mp5416.c F: drivers/regulator/mpq7920.c F: drivers/regulator/mpq7920.h
@@@ -11738,6 -11729,7 +11761,7 @@@ W: https://github.com/multipath-tcp/mpt B: https://github.com/multipath-tcp/mptcp_net-next/issues S: Maintained F: include/net/mptcp.h + F: include/uapi/linux/mptcp.h F: net/mptcp/ F: tools/testing/selftests/net/mptcp/
@@@ -11826,7 -11818,7 +11850,7 @@@ W: https://nilfs.sourceforge.io W: https://nilfs.osdn.jp/ T: git git://github.com/konis/nilfs2.git S: Supported -F: Documentation/filesystems/nilfs2.txt +F: Documentation/filesystems/nilfs2.rst F: fs/nilfs2/ F: include/trace/events/nilfs2.h F: include/uapi/linux/nilfs2_api.h @@@ -11896,7 -11888,6 +11920,7 @@@ F: scripts/nsdep F: Documentation/core-api/symbol-namespaces.rst
NTB AMD DRIVER +M: Sanjay R Mehta sanju.mehta@amd.com M: Shyam Sundar S K Shyam-sundar.S-k@amd.com L: linux-ntb@googlegroups.com S: Supported @@@ -11936,7 -11927,7 +11960,7 @@@ L: linux-ntfs-dev@lists.sourceforge.ne W: http://www.tuxera.com/ T: git git://git.kernel.org/pub/scm/linux/kernel/git/aia21/ntfs.git S: Supported -F: Documentation/filesystems/ntfs.txt +F: Documentation/filesystems/ntfs.rst F: fs/ntfs/
NUBUS SUBSYSTEM @@@ -12282,7 -12273,7 +12306,7 @@@ OMFS FILESYSTE M: Bob Copeland me@bobcopeland.com L: linux-karma-devel@lists.sourceforge.net S: Maintained -F: Documentation/filesystems/omfs.txt +F: Documentation/filesystems/omfs.rst F: fs/omfs/
OMNIKEY CARDMAN 4000 DRIVER @@@ -12531,8 -12522,8 +12555,8 @@@ M: Joseph Qi <joseph.qi@linux.alibaba.c L: ocfs2-devel@oss.oracle.com (moderated for non-subscribers) W: http://ocfs2.wiki.kernel.org S: Supported -F: Documentation/filesystems/ocfs2.txt -F: Documentation/filesystems/dlmfs.txt +F: Documentation/filesystems/ocfs2.rst +F: Documentation/filesystems/dlmfs.rst F: fs/ocfs2/
ORANGEFS FILESYSTEM @@@ -12542,7 -12533,7 +12566,7 @@@ L: devel@lists.orangefs.or T: git git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux.git S: Supported F: fs/orangefs/ -F: Documentation/filesystems/orangefs.txt +F: Documentation/filesystems/orangefs.rst
ORINOCO DRIVER L: linux-wireless@vger.kernel.org @@@ -13384,9 -13375,7 +13408,9 @@@ F: Documentation/devicetree/bindings/ii
PNP SUPPORT M: "Rafael J. Wysocki" rafael.j.wysocki@intel.com +L: linux-acpi@vger.kernel.org S: Maintained +F: include/linux/pnp.h F: drivers/pnp/
POSIX CLOCKS and TIMERS @@@ -13506,7 -13495,7 +13530,7 @@@ S: Maintaine F: fs/proc/ F: include/linux/proc_fs.h F: tools/testing/selftests/proc/ -F: Documentation/filesystems/proc.txt +F: Documentation/filesystems/proc.rst
PROC SYSCTL M: Luis Chamberlain mcgrof@kernel.org @@@ -13556,12 -13545,6 +13580,12 @@@ F: net/psampl F: include/net/psample.h F: include/uapi/linux/psample.h
+PRESSURE STALL INFORMATION (PSI) +M: Johannes Weiner hannes@cmpxchg.org +S: Maintained +F: kernel/sched/psi.c +F: include/linux/psi* + PSTORE FILESYSTEM M: Kees Cook keescook@chromium.org M: Anton Vorontsov anton@enomsg.org @@@ -13706,6 -13689,12 +13730,12 @@@ L: alsa-devel@alsa-project.org (moderat S: Supported F: sound/soc/qcom/
+ QCOM IPA DRIVER + M: Alex Elder elder@kernel.org + L: netdev@vger.kernel.org + S: Supported + F: drivers/net/ipa/ + QEMU MACHINE EMULATOR AND VIRTUALIZER SUPPORT M: Gabriel Somlo somlo@cmu.edu M: "Michael S. Tsirkin" mst@redhat.com @@@ -13941,7 -13930,6 +13971,7 @@@ L: linux-arm-msm@vger.kernel.or T: git git://linuxtv.org/media_tree.git S: Maintained F: drivers/media/platform/qcom/venus/ +F: Documentation/devicetree/bindings/media/*venus*
QUALCOMM WCN36XX WIRELESS DRIVER M: Kalle Valo kvalo@codeaurora.org @@@ -14356,12 -14344,9 +14386,12 @@@ F: Documentation/devicetree/bindings/me
HANTRO VPU CODEC DRIVER M: Ezequiel Garcia ezequiel@collabora.com +M: Philipp Zabel p.zabel@pengutronix.de L: linux-media@vger.kernel.org +L: linux-rockchip@lists.infradead.org S: Maintained F: drivers/staging/media/hantro/ +F: Documentation/devicetree/bindings/media/nxp,imx8mq-vpu.yaml F: Documentation/devicetree/bindings/media/rockchip-vpu.txt
ROCKER DRIVER @@@ -14408,14 -14393,6 +14438,14 @@@ F: include/net/rose. F: include/uapi/linux/rose.h F: net/rose/
+ROTATION DRIVER FOR ALLWINNER A83T +M: Jernej Skrabec jernej.skrabec@siol.net +L: linux-media@vger.kernel.org +T: git git://linuxtv.org/media_tree.git +S: Maintained +F: drivers/media/platform/sunxi/sun8i-rotate/ +F: Documentation/devicetree/bindings/media/allwinner,sun8i-a83t-de2-rotate.yaml + RTL2830 MEDIA DRIVER M: Antti Palosaari crope@iki.fi L: linux-media@vger.kernel.org @@@ -15029,7 -15006,7 +15059,7 @@@ X: security/selinux
SELINUX SECURITY MODULE M: Paul Moore paul@paul-moore.com -M: Stephen Smalley sds@tycho.nsa.gov +M: Stephen Smalley stephen.smalley.work@gmail.com M: Eric Paris eparis@parisplace.org L: selinux@vger.kernel.org W: https://selinuxproject.org @@@ -15041,7 -15018,6 +15071,7 @@@ F: security/selinux F: scripts/selinux/ F: Documentation/admin-guide/LSM/SELinux.rst F: Documentation/ABI/obsolete/sysfs-selinux-disable +F: Documentation/ABI/obsolete/sysfs-selinux-checkreqprot
SENSABLE PHANTOM M: Jiri Slaby jirislaby@gmail.com @@@ -15099,6 -15075,14 +15129,6 @@@ M: Dimitri Sivanich <sivanich@sgi.com S: Maintained F: drivers/misc/sgi-gru/
-SGI SN-IA64 (Altix) SERIAL CONSOLE DRIVER -M: Pat Gefre pfg@sgi.com -L: linux-ia64@vger.kernel.org -S: Supported -F: Documentation/ia64/serial.rst -F: drivers/tty/serial/ioc?_serial.c -F: include/linux/ioc?.h - SGI XP/XPC/XPNET DRIVER M: Cliff Whickman cpw@sgi.com M: Robin Holt robinmholt@gmail.com @@@ -15113,14 -15097,6 +15143,14 @@@ W: http://www.ibm.com/developerworks/li S: Supported F: net/smc/
+SHARP GP2AP002A00F/GP2AP002S00F SENSOR DRIVER +M: Linus Walleij linus.walleij@linaro.org +L: linux-iio@vger.kernel.org +T: git git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git +S: Maintained +F: drivers/iio/light/gp2ap002.c +F: Documentation/devicetree/bindings/iio/light/sharp,gp2ap002.yaml + SHARP RJ54N1CB0C SENSOR DRIVER M: Jacopo Mondi jacopo@jmondi.org L: linux-media@vger.kernel.org @@@ -15387,10 -15363,11 +15417,10 @@@ S: Odd Fixe F: drivers/net/ethernet/smsc/smc91x.*
SMIA AND SMIA++ IMAGE SENSOR DRIVER -M: Sakari Ailus sakari.ailus@iki.fi +M: Sakari Ailus sakari.ailus@linux.intel.com L: linux-media@vger.kernel.org S: Maintained F: drivers/media/i2c/smiapp/ -F: include/media/i2c/smiapp.h F: drivers/media/i2c/smiapp-pll.c F: drivers/media/i2c/smiapp-pll.h F: include/uapi/linux/smiapp.h @@@ -15569,14 -15546,6 +15599,14 @@@ S: Maintaine F: drivers/media/i2c/imx214.c F: Documentation/devicetree/bindings/media/i2c/sony,imx214.txt
+SONY IMX219 SENSOR DRIVER +M: Dave Stevenson dave.stevenson@raspberrypi.com +L: linux-media@vger.kernel.org +T: git git://linuxtv.org/media_tree.git +S: Maintained +F: drivers/media/i2c/imx219.c +F: Documentation/devicetree/bindings/media/i2c/imx219.yaml + SONY IMX258 SENSOR DRIVER M: Sakari Ailus sakari.ailus@linux.intel.com L: linux-media@vger.kernel.org @@@ -15627,8 -15596,8 +15657,8 @@@ F: include/linux/memstick. SONY VAIO CONTROL DEVICE DRIVER M: Mattia Dongili malattia@linux.it L: platform-driver-x86@vger.kernel.org -W: http://www.linux.it/~malattia/wiki/index.php/Sony_drivers S: Maintained +W: http://www.linux.it/~malattia/wiki/index.php/Sony_drivers F: Documentation/admin-guide/laptops/sony-laptop.rst F: drivers/char/sonypi.c F: drivers/platform/x86/sony-laptop.c @@@ -15799,7 -15768,7 +15829,7 @@@ L: squashfs-devel@lists.sourceforge.ne W: http://squashfs.org.uk T: git git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-next.git S: Maintained -F: Documentation/filesystems/squashfs.txt +F: Documentation/filesystems/squashfs.rst F: fs/squashfs/
SRM (Alpha) environment access @@@ -16175,6 -16144,13 +16205,13 @@@ L: netdev@vger.kernel.or S: Supported F: drivers/net/ethernet/synopsys/
+ SYNOPSYS DESIGNWARE ETHERNET XPCS DRIVER + M: Jose Abreu Jose.Abreu@synopsys.com + L: netdev@vger.kernel.org + S: Supported + F: drivers/net/phy/mdio-xpcs.c + F: include/linux/mdio-xpcs.h + SYNOPSYS DESIGNWARE I2C DRIVER M: Jarkko Nikula jarkko.nikula@linux.intel.com R: Andy Shevchenko andriy.shevchenko@linux.intel.com @@@ -16244,7 -16220,7 +16281,7 @@@ F: drivers/platform/x86/system76_acpi. SYSV FILESYSTEM M: Christoph Hellwig hch@infradead.org S: Maintained -F: Documentation/filesystems/sysv-fs.txt +F: Documentation/filesystems/sysv-fs.rst F: fs/sysv/ F: include/linux/sysv_fs.h
@@@ -16603,10 -16579,10 +16640,10 @@@ THINKPAD ACPI EXTRAS DRIVE M: Henrique de Moraes Holschuh ibm-acpi@hmh.eng.br L: ibm-acpi-devel@lists.sourceforge.net L: platform-driver-x86@vger.kernel.org +S: Maintained W: http://ibm-acpi.sourceforge.net W: http://thinkwiki.org/wiki/Ibm-acpi T: git git://repo.or.cz/linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git -S: Maintained F: drivers/platform/x86/thinkpad_acpi.c
THUNDERBOLT DRIVER @@@ -16810,12 -16786,12 +16847,12 @@@ F: sound/soc/codecs/twl4030 TI VPE/CAL DRIVERS M: Benoit Parrot bparrot@ti.com L: linux-media@vger.kernel.org +S: Maintained W: http://linuxtv.org/ Q: http://patchwork.linuxtv.org/project/linux-media/list/ -S: Maintained -F: drivers/media/platform/ti-vpe/ -F: Documentation/devicetree/bindings/media/ti,vpe.yaml F: Documentation/devicetree/bindings/media/ti,cal.yaml +F: Documentation/devicetree/bindings/media/ti,vpe.yaml +F: drivers/media/platform/ti-vpe/
TI WILINK WIRELESS DRIVERS L: linux-wireless@vger.kernel.org @@@ -17109,7 -17085,7 +17146,7 @@@ T: git git://git.kernel.org/pub/scm/lin T: git git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs.git fixes W: http://www.linux-mtd.infradead.org/doc/ubifs.html S: Supported -F: Documentation/filesystems/ubifs.txt +F: Documentation/filesystems/ubifs.rst F: fs/ubifs/
UCLINUX (M68KNOMMU AND COLDFIRE) @@@ -17128,7 -17104,7 +17165,7 @@@ F: arch/m68k/include/asm/*_no. UDF FILESYSTEM M: Jan Kara jack@suse.com S: Maintained -F: Documentation/filesystems/udf.txt +F: Documentation/filesystems/udf.rst F: fs/udf/
UDRAW TABLET @@@ -17157,6 -17133,11 +17194,6 @@@ S: Maintaine F: drivers/usb/common/ulpi.c F: include/linux/ulpi/
-ULTRA-WIDEBAND (UWB) SUBSYSTEM -L: devel@driverdev.osuosl.org -S: Obsolete -F: drivers/staging/uwb/ - UNICODE SUBSYSTEM M: Gabriel Krisman Bertazi krisman@collabora.com L: linux-fsdevel@vger.kernel.org @@@ -17240,12 -17221,6 +17277,12 @@@ S: Maintaine F: Documentation/usb/acm.rst F: drivers/usb/class/cdc-acm.*
+USB APPLE MFI FASTCHARGE DRIVER +M: Bastien Nocera hadess@hadess.net +L: linux-usb@vger.kernel.org +S: Maintained +F: drivers/usb/misc/apple-mfi-fastcharge.c + USB AR5523 WIRELESS DRIVER M: Pontus Fuchs pontus.fuchs@gmail.com L: linux-wireless@vger.kernel.org @@@ -17508,7 -17483,7 +17545,7 @@@ L: linux-media@vger.kernel.or T: git git://linuxtv.org/media_tree.git W: https://linuxtv.org S: Odd Fixes -F: drivers/media/usb/usbvision/ +F: drivers/staging/media/usbvision/
USB WEBCAM GADGET M: Laurent Pinchart laurent.pinchart@ideasonboard.com @@@ -17917,6 -17892,13 +17954,13 @@@ S: Supporte F: arch/x86/kernel/cpu/vmware.c F: arch/x86/include/asm/vmware.h
+ VMWARE VIRTUAL PTP CLOCK DRIVER + M: Vivek Thampi vithampi@vmware.com + M: "VMware, Inc." pv-drivers@vmware.com + L: netdev@vger.kernel.org + S: Supported + F: drivers/ptp/ptp_vmw.c + VMWARE PVRDMA DRIVER M: Adit Ranadive aditr@vmware.com M: VMware PV-Drivers pv-drivers@vmware.com @@@ -18251,10 -18233,10 +18295,10 @@@ X86 PLATFORM DRIVER M: Darren Hart dvhart@infradead.org M: Andy Shevchenko andy@infradead.org L: platform-driver-x86@vger.kernel.org -T: git git://git.infradead.org/linux-platform-drivers-x86.git S: Odd Fixes -F: drivers/platform/x86/ +T: git git://git.infradead.org/linux-platform-drivers-x86.git F: drivers/platform/olpc/ +F: drivers/platform/x86/
X86 PLATFORM DRIVERS - ARCH R: Darren Hart dvhart@infradead.org @@@ -18568,7 -18550,7 +18612,7 @@@ L: linux-fsdevel@vger.kernel.or T: git git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs.git S: Maintained F: fs/zonefs/ -F: Documentation/filesystems/zonefs.txt +F: Documentation/filesystems/zonefs.rst
ZPOOL COMPRESSED PAGE STORAGE API M: Dan Streetman ddstreet@ieee.org diff --combined arch/arm64/configs/defconfig index e7573289a66f,13cd865d7d4b..a6c0d02d9928 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@@ -62,7 -62,6 +62,7 @@@ CONFIG_ARCH_ZX= CONFIG_ARCH_ZYNQMP=y CONFIG_ARM64_VA_BITS_48=y CONFIG_SCHED_MC=y +CONFIG_SCHED_SMT=y CONFIG_NUMA=y CONFIG_SECCOMP=y CONFIG_KEXEC=y @@@ -284,6 -283,7 +284,7 @@@ CONFIG_SMSC911X= CONFIG_SNI_AVE=y CONFIG_SNI_NETSEC=y CONFIG_STMMAC_ETH=m + CONFIG_TI_K3_AM65_CPSW_NUSS=y CONFIG_MDIO_BUS_MUX_MMIOREG=y CONFIG_MARVELL_PHY=m CONFIG_MARVELL_10G_PHY=m @@@ -699,6 -699,8 +700,8 @@@ CONFIG_QCOM_HIDMA_MGMT= CONFIG_QCOM_HIDMA=y CONFIG_RCAR_DMAC=y CONFIG_RENESAS_USB_DMAC=m + CONFIG_TI_K3_UDMA=y + CONFIG_TI_K3_UDMA_GLUE_LAYER=y CONFIG_VFIO=y CONFIG_VFIO_PCI=y CONFIG_VIRTIO_PCI=y diff --combined arch/x86/mm/init_32.c index 8ae0272c1c51,eb6ede2c3d43..de73992b8432 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c @@@ -238,7 -238,11 +238,11 @@@ page_table_range_init(unsigned long sta } }
- static inline int is_kernel_text(unsigned long addr) + /* + * The <linux/kallsyms.h> already defines is_kernel_text, + * using '__' prefix not to get in conflict. + */ + static inline int __is_kernel_text(unsigned long addr) { if (addr >= (unsigned long)_text && addr <= (unsigned long)__init_end) return 1; @@@ -328,8 -332,8 +332,8 @@@ repeat addr2 = (pfn + PTRS_PER_PTE-1) * PAGE_SIZE + PAGE_OFFSET + PAGE_SIZE-1;
- if (is_kernel_text(addr) || - is_kernel_text(addr2)) + if (__is_kernel_text(addr) || + __is_kernel_text(addr2)) prot = PAGE_KERNEL_LARGE_EXEC;
pages_2m++; @@@ -354,7 -358,7 +358,7 @@@ */ pgprot_t init_prot = __pgprot(PTE_IDENT_ATTR);
- if (is_kernel_text(addr)) + if (__is_kernel_text(addr)) prot = PAGE_KERNEL_EXEC;
pages_4k++; @@@ -788,6 -792,44 +792,6 @@@ void __init mem_init(void x86_init.hyper.init_after_bootmem();
mem_init_print_info(NULL); - printk(KERN_INFO "virtual kernel memory layout:\n" - " fixmap : 0x%08lx - 0x%08lx (%4ld kB)\n" - " cpu_entry : 0x%08lx - 0x%08lx (%4ld kB)\n" -#ifdef CONFIG_HIGHMEM - " pkmap : 0x%08lx - 0x%08lx (%4ld kB)\n" -#endif - " vmalloc : 0x%08lx - 0x%08lx (%4ld MB)\n" - " lowmem : 0x%08lx - 0x%08lx (%4ld MB)\n" - " .init : 0x%08lx - 0x%08lx (%4ld kB)\n" - " .data : 0x%08lx - 0x%08lx (%4ld kB)\n" - " .text : 0x%08lx - 0x%08lx (%4ld kB)\n", - FIXADDR_START, FIXADDR_TOP, - (FIXADDR_TOP - FIXADDR_START) >> 10, - - CPU_ENTRY_AREA_BASE, - CPU_ENTRY_AREA_BASE + CPU_ENTRY_AREA_MAP_SIZE, - CPU_ENTRY_AREA_MAP_SIZE >> 10, - -#ifdef CONFIG_HIGHMEM - PKMAP_BASE, PKMAP_BASE+LAST_PKMAP*PAGE_SIZE, - (LAST_PKMAP*PAGE_SIZE) >> 10, -#endif - - VMALLOC_START, VMALLOC_END, - (VMALLOC_END - VMALLOC_START) >> 20, - - (unsigned long)__va(0), (unsigned long)high_memory, - ((unsigned long)high_memory - (unsigned long)__va(0)) >> 20, - - (unsigned long)&__init_begin, (unsigned long)&__init_end, - ((unsigned long)&__init_end - - (unsigned long)&__init_begin) >> 10, - - (unsigned long)&_etext, (unsigned long)&_edata, - ((unsigned long)&_edata - (unsigned long)&_etext) >> 10, - - (unsigned long)&_text, (unsigned long)&_etext, - ((unsigned long)&_etext - (unsigned long)&_text) >> 10);
/* * Check boundaries twice: Some fundamental inconsistencies can @@@ -843,7 -885,7 +847,7 @@@ static void mark_nxdata_nx(void */ unsigned long start = PFN_ALIGN(_etext); /* - * This comes from is_kernel_text upper limit. Also HPAGE where used: + * This comes from __is_kernel_text upper limit. Also HPAGE where used: */ unsigned long size = (((unsigned long)__init_end + HPAGE_SIZE) & HPAGE_MASK) - start;
diff --combined drivers/base/core.c index 5e3cc1651c78,befc2722dbfc..139cdf7e7327 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@@ -64,12 -64,12 +64,12 @@@ static inline void device_links_write_u mutex_unlock(&device_links_lock); }
-int device_links_read_lock(void) +int device_links_read_lock(void) __acquires(&device_links_srcu) { return srcu_read_lock(&device_links_srcu); }
-void device_links_read_unlock(int idx) +void device_links_read_unlock(int idx) __releases(&device_links_srcu) { srcu_read_unlock(&device_links_srcu, idx); } @@@ -523,13 -523,9 +523,13 @@@ static void device_link_add_missing_sup
mutex_lock(&wfs_lock); list_for_each_entry_safe(dev, tmp, &wait_for_suppliers, - links.needs_suppliers) - if (!fwnode_call_int_op(dev->fwnode, add_links, dev)) + links.needs_suppliers) { + int ret = fwnode_call_int_op(dev->fwnode, add_links, dev); + if (!ret) list_del_init(&dev->links.needs_suppliers); + else if (ret != -ENODEV) + dev->links.need_for_probe = false; + } mutex_unlock(&wfs_lock); }
@@@ -2345,31 -2341,6 +2345,31 @@@ static int device_private_init(struct d return 0; }
+static u32 fw_devlink_flags; +static int __init fw_devlink_setup(char *arg) +{ + if (!arg) + return -EINVAL; + + if (strcmp(arg, "off") == 0) { + fw_devlink_flags = 0; + } else if (strcmp(arg, "permissive") == 0) { + fw_devlink_flags = DL_FLAG_SYNC_STATE_ONLY; + } else if (strcmp(arg, "on") == 0) { + fw_devlink_flags = DL_FLAG_AUTOPROBE_CONSUMER; + } else if (strcmp(arg, "rpm") == 0) { + fw_devlink_flags = DL_FLAG_AUTOPROBE_CONSUMER | + DL_FLAG_PM_RUNTIME; + } + return 0; +} +early_param("fw_devlink", fw_devlink_setup); + +u32 fw_devlink_get_flags(void) +{ + return fw_devlink_flags; +} + /** * device_add - add device to device hierarchy. * @dev: device. @@@ -2404,7 -2375,6 +2404,7 @@@ int device_add(struct device *dev struct class_interface *class_intf; int error = -EINVAL, fw_ret; struct kobject *glue_dir = NULL; + bool is_fwnode_dev = false;
dev = get_device(dev); if (!dev) @@@ -2502,10 -2472,8 +2502,10 @@@
kobject_uevent(&dev->kobj, KOBJ_ADD);
- if (dev->fwnode && !dev->fwnode->dev) + if (dev->fwnode && !dev->fwnode->dev) { dev->fwnode->dev = dev; + is_fwnode_dev = true; + }
/* * Check if any of the other devices (consumers) have been waiting for @@@ -2521,8 -2489,7 +2521,8 @@@ */ device_link_add_missing_supplier_links();
- if (fwnode_has_op(dev->fwnode, add_links)) { + if (fw_devlink_flags && is_fwnode_dev && + fwnode_has_op(dev->fwnode, add_links)) { fw_ret = fwnode_call_int_op(dev->fwnode, add_links, dev); if (fw_ret == -ENODEV) device_link_wait_for_mandatory_supplier(dev); @@@ -3504,6 -3471,126 +3504,126 @@@ out } EXPORT_SYMBOL_GPL(device_move);
+ static int device_attrs_change_owner(struct device *dev, kuid_t kuid, + kgid_t kgid) + { + struct kobject *kobj = &dev->kobj; + struct class *class = dev->class; + const struct device_type *type = dev->type; + int error; + + if (class) { + /* + * Change the device groups of the device class for @dev to + * @kuid/@kgid. + */ + error = sysfs_groups_change_owner(kobj, class->dev_groups, kuid, + kgid); + if (error) + return error; + } + + if (type) { + /* + * Change the device groups of the device type for @dev to + * @kuid/@kgid. + */ + error = sysfs_groups_change_owner(kobj, type->groups, kuid, + kgid); + if (error) + return error; + } + + /* Change the device groups of @dev to @kuid/@kgid. */ + error = sysfs_groups_change_owner(kobj, dev->groups, kuid, kgid); + if (error) + return error; + + if (device_supports_offline(dev) && !dev->offline_disabled) { + /* Change online device attributes of @dev to @kuid/@kgid. */ + error = sysfs_file_change_owner(kobj, dev_attr_online.attr.name, + kuid, kgid); + if (error) + return error; + } + + return 0; + } + + /** + * device_change_owner - change the owner of an existing device. + * @dev: device. + * @kuid: new owner's kuid + * @kgid: new owner's kgid + * + * This changes the owner of @dev and its corresponding sysfs entries to + * @kuid/@kgid. This function closely mirrors how @dev was added via driver + * core. + * + * Returns 0 on success or error code on failure. + */ + int device_change_owner(struct device *dev, kuid_t kuid, kgid_t kgid) + { + int error; + struct kobject *kobj = &dev->kobj; + + dev = get_device(dev); + if (!dev) + return -EINVAL; + + /* + * Change the kobject and the default attributes and groups of the + * ktype associated with it to @kuid/@kgid. + */ + error = sysfs_change_owner(kobj, kuid, kgid); + if (error) + goto out; + + /* + * Change the uevent file for @dev to the new owner. The uevent file + * was created in a separate step when @dev got added and we mirror + * that step here. + */ + error = sysfs_file_change_owner(kobj, dev_attr_uevent.attr.name, kuid, + kgid); + if (error) + goto out; + + /* + * Change the device groups, the device groups associated with the + * device class, and the groups associated with the device type of @dev + * to @kuid/@kgid. + */ + error = device_attrs_change_owner(dev, kuid, kgid); + if (error) + goto out; + + error = dpm_sysfs_change_owner(dev, kuid, kgid); + 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 + * directory entry for @dev to @kuid/@kgid. This ensures that the + * symlink shows the same permissions as its target. + */ + error = sysfs_link_change_owner(&dev->class->p->subsys.kobj, &dev->kobj, + dev_name(dev), kuid, kgid); + if (error) + goto out; + + out: + put_device(dev); + return error; + } + EXPORT_SYMBOL_GPL(device_change_owner); + /** * device_shutdown - call ->shutdown() on each device to shutdown. */ diff --combined drivers/net/ethernet/intel/e1000e/netdev.c index 0f02c7a5ee9b,1e1625122596..177c6da80c57 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@@ -3280,10 -3280,10 +3280,10 @@@ static void e1000_configure_rx(struct e
dev_info(&adapter->pdev->dev, "Some CPU C-states have been disabled in order to enable jumbo frames\n"); - pm_qos_update_request(&adapter->pm_qos_req, lat); + cpu_latency_qos_update_request(&adapter->pm_qos_req, lat); } else { - pm_qos_update_request(&adapter->pm_qos_req, - PM_QOS_DEFAULT_VALUE); + cpu_latency_qos_update_request(&adapter->pm_qos_req, + PM_QOS_DEFAULT_VALUE); }
/* Enable Receives */ @@@ -3536,6 -3536,7 +3536,7 @@@ s32 e1000e_get_base_timinca(struct e100 break; case e1000_pch_cnp: case e1000_pch_tgp: + case e1000_pch_adp: if (er32(TSYNCRXCTL) & E1000_TSYNCRXCTL_SYSCFI) { /* Stable 24MHz frequency */ incperiod = INCPERIOD_24MHZ; @@@ -3807,7 -3808,7 +3808,7 @@@ static void e1000_flush_tx_ring(struct tdt = er32(TDT(0)); BUG_ON(tdt != tx_ring->next_to_use); tx_desc = E1000_TX_DESC(*tx_ring, tx_ring->next_to_use); - tx_desc->buffer_addr = tx_ring->dma; + tx_desc->buffer_addr = cpu_to_le64(tx_ring->dma);
tx_desc->lower.data = cpu_to_le32(txd_lower | size); tx_desc->upper.data = 0; @@@ -4049,6 -4050,7 +4050,7 @@@ void e1000e_reset(struct e1000_adapter case e1000_pch_cnp: /* fall-through */ case e1000_pch_tgp: + case e1000_pch_adp: fc->refresh_time = 0xFFFF; fc->pause_time = 0xFFFF;
@@@ -4636,7 -4638,8 +4638,7 @@@ int e1000e_open(struct net_device *netd e1000_update_mng_vlan(adapter);
/* DMA latency requirement to workaround jumbo issue */ - pm_qos_add_request(&adapter->pm_qos_req, PM_QOS_CPU_DMA_LATENCY, - PM_QOS_DEFAULT_VALUE); + cpu_latency_qos_add_request(&adapter->pm_qos_req, PM_QOS_DEFAULT_VALUE);
/* before we allocate an interrupt, we must be ready to handle it. * Setting DEBUG_SHIRQ in the kernel makes it fire an interrupt @@@ -4678,7 -4681,7 +4680,7 @@@ return 0;
err_req_irq: - pm_qos_remove_request(&adapter->pm_qos_req); + cpu_latency_qos_remove_request(&adapter->pm_qos_req); e1000e_release_hw_control(adapter); e1000_power_down_phy(adapter); e1000e_free_rx_resources(adapter->rx_ring); @@@ -4742,7 -4745,7 +4744,7 @@@ int e1000e_close(struct net_device *net !test_bit(__E1000_TESTING, &adapter->state)) e1000e_release_hw_control(adapter);
- pm_qos_remove_request(&adapter->pm_qos_req); + cpu_latency_qos_remove_request(&adapter->pm_qos_req);
pm_runtime_put_sync(&pdev->dev);
@@@ -5461,10 -5464,7 +5463,7 @@@ static int e1000_tso(struct e1000_ring cmd_length = E1000_TXD_CMD_IP; ipcse = skb_transport_offset(skb) - 1; } else if (skb_is_gso_v6(skb)) { - ipv6_hdr(skb)->payload_len = 0; - tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, - &ipv6_hdr(skb)->daddr, - 0, IPPROTO_TCP, 0); + tcp_v6_gso_csum_prep(skb); ipcse = 0; } ipcss = skb_network_offset(skb); @@@ -7759,6 -7759,11 +7758,11 @@@ static const struct pci_device_id e1000 { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_LM14), board_pch_cnp }, { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_V14), board_pch_cnp }, { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_LM15), board_pch_cnp }, + { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_V15), board_pch_cnp }, + { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_LM16), board_pch_cnp }, + { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_V16), board_pch_cnp }, + { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_LM17), board_pch_cnp }, + { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_V17), board_pch_cnp },
{ 0, 0, 0, 0, 0, 0, 0 } /* terminate list */ }; diff --combined drivers/net/wireless/ath/ath10k/core.c index a202a4eea76a,70f3bae92a85..f26cc6989dad --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@@ -540,6 -540,33 +540,33 @@@ static const struct ath10k_hw_params at .fw_diag_ce_download = true, .tx_stats_over_pktlog = false, }, + { + .id = QCA9377_HW_1_1_DEV_VERSION, + .dev_id = QCA9377_1_0_DEVICE_ID, + .bus = ATH10K_BUS_SDIO, + .name = "qca9377 hw1.1 sdio", + .patch_load_addr = QCA9377_HW_1_0_PATCH_LOAD_ADDR, + .uart_pin = 19, + .otp_exe_param = 0, + .channel_counters_freq_hz = 88000, + .max_probe_resp_desc_thres = 0, + .cal_data_len = 8124, + .fw = { + .dir = QCA9377_HW_1_0_FW_DIR, + .board = QCA9377_HW_1_0_BOARD_DATA_FILE, + .board_size = QCA9377_BOARD_DATA_SZ, + .board_ext_size = QCA9377_BOARD_EXT_DATA_SZ, + }, + .hw_ops = &qca6174_ops, + .hw_clk = qca6174_clk, + .target_cpu_freq = 176000000, + .decap_align_bytes = 4, + .n_cipher_suites = 8, + .num_peers = TARGET_QCA9377_HL_NUM_PEERS, + .ast_skid_limit = 0x10, + .num_wds_entries = 0x20, + .uart_pin_workaround = true, + }, { .id = QCA4019_HW_1_0_DEV_VERSION, .dev_id = 0, @@@ -874,6 -901,13 +901,13 @@@ static int ath10k_core_get_board_id_fro return -ENODATA; }
+ if (ar->id.bmi_ids_valid) { + ath10k_dbg(ar, ATH10K_DBG_BOOT, + "boot already acquired valid otp board id,skip download, board_id %d chip_id %d\n", + ar->id.bmi_board_id, ar->id.bmi_chip_id); + goto skip_otp_download; + } + ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot upload otp to 0x%x len %zd for board id\n", address, ar->normal_mode_fw.fw_file.otp_len); @@@ -921,6 -955,8 +955,8 @@@ ar->id.bmi_board_id = board_id; ar->id.bmi_chip_id = chip_id;
+ skip_otp_download: + return 0; }
@@@ -1052,11 -1088,11 +1088,11 @@@ static int ath10k_download_fw(struct at }
memset(&latency_qos, 0, sizeof(latency_qos)); - pm_qos_add_request(&latency_qos, PM_QOS_CPU_DMA_LATENCY, 0); + cpu_latency_qos_add_request(&latency_qos, 0);
ret = ath10k_bmi_fast_download(ar, address, data, data_len);
- pm_qos_remove_request(&latency_qos); + cpu_latency_qos_remove_request(&latency_qos);
return ret; } @@@ -2119,6 -2155,40 +2155,40 @@@ done return 0; }
+ static void ath10k_core_fetch_btcoex_dt(struct ath10k *ar) + { + struct device_node *node; + u8 coex_support = 0; + int ret; + + node = ar->dev->of_node; + if (!node) + goto out; + + ret = of_property_read_u8(node, "qcom,coexist-support", &coex_support); + if (ret) { + ar->coex_support = true; + goto out; + } + + if (coex_support) { + ar->coex_support = true; + } else { + ar->coex_support = false; + ar->coex_gpio_pin = -1; + goto out; + } + + ret = of_property_read_u32(node, "qcom,coexist-gpio-pin", + &ar->coex_gpio_pin); + if (ret) + ar->coex_gpio_pin = -1; + + out: + ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot coex_support %d coex_gpio_pin %d\n", + ar->coex_support, ar->coex_gpio_pin); + } + static int ath10k_init_uart(struct ath10k *ar) { int ret; @@@ -2696,14 -2766,22 +2766,22 @@@ int ath10k_core_start(struct ath10k *ar if (test_bit(WMI_SERVICE_BSS_CHANNEL_INFO_64, ar->wmi.svc_map)) val |= WMI_10_4_BSS_CHANNEL_INFO_64;
+ ath10k_core_fetch_btcoex_dt(ar); + /* 10.4 firmware supports BT-Coex without reloading firmware * via pdev param. To support Bluetooth coexistence pdev param, * WMI_COEX_GPIO_SUPPORT of extended resource config should be * enabled always. + * + * We can still enable BTCOEX if firmware has the support + * eventhough btceox_support value is + * ATH10K_DT_BTCOEX_NOT_FOUND */ + if (test_bit(WMI_SERVICE_COEX_GPIO, ar->wmi.svc_map) && test_bit(ATH10K_FW_FEATURE_BTCOEX_PARAM, - ar->running_fw->fw_file.fw_features)) + ar->running_fw->fw_file.fw_features) && + ar->coex_support) val |= WMI_10_4_COEX_GPIO_SUPPORT;
if (test_bit(WMI_SERVICE_TDLS_EXPLICIT_MODE_ONLY, @@@ -2863,6 -2941,8 +2941,8 @@@ void ath10k_core_stop(struct ath10k *ar ath10k_htt_tx_stop(&ar->htt); ath10k_htt_rx_free(&ar->htt); ath10k_wmi_detach(ar); + + ar->id.bmi_ids_valid = false; } EXPORT_SYMBOL(ath10k_core_stop);
diff --combined drivers/net/wireless/intel/ipw2x00/ipw2100.c index 5dfcce77d094,7b785546b866..97ea6e2035e6 --- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c @@@ -629,30 -629,30 +629,30 @@@ static char *snprint_line(char *buf, si int out, i, j, l; char c;
- out = snprintf(buf, count, "%08X", ofs); + out = scnprintf(buf, count, "%08X", ofs);
for (l = 0, i = 0; i < 2; i++) { - out += snprintf(buf + out, count - out, " "); + out += scnprintf(buf + out, count - out, " "); for (j = 0; j < 8 && l < len; j++, l++) - out += snprintf(buf + out, count - out, "%02X ", + out += scnprintf(buf + out, count - out, "%02X ", data[(i * 8 + j)]); for (; j < 8; j++) - out += snprintf(buf + out, count - out, " "); + out += scnprintf(buf + out, count - out, " "); }
- out += snprintf(buf + out, count - out, " "); + out += scnprintf(buf + out, count - out, " "); for (l = 0, i = 0; i < 2; i++) { - out += snprintf(buf + out, count - out, " "); + out += scnprintf(buf + out, count - out, " "); for (j = 0; j < 8 && l < len; j++, l++) { c = data[(i * 8 + j)]; if (!isascii(c) || !isprint(c)) c = '.';
- out += snprintf(buf + out, count - out, "%c", c); + out += scnprintf(buf + out, count - out, "%c", c); }
for (; j < 8; j++) - out += snprintf(buf + out, count - out, " "); + out += scnprintf(buf + out, count - out, " "); }
return buf; @@@ -1730,7 -1730,7 +1730,7 @@@ static int ipw2100_up(struct ipw2100_pr /* the ipw2100 hardware really doesn't want power management delays * longer than 175usec */ - pm_qos_update_request(&ipw2100_pm_qos_req, 175); + cpu_latency_qos_update_request(&ipw2100_pm_qos_req, 175);
/* If the interrupt is enabled, turn it off... */ spin_lock_irqsave(&priv->low_lock, flags); @@@ -1875,8 -1875,7 +1875,8 @@@ static void ipw2100_down(struct ipw2100 ipw2100_disable_interrupts(priv); spin_unlock_irqrestore(&priv->low_lock, flags);
- pm_qos_update_request(&ipw2100_pm_qos_req, PM_QOS_DEFAULT_VALUE); + cpu_latency_qos_update_request(&ipw2100_pm_qos_req, + PM_QOS_DEFAULT_VALUE);
/* We have to signal any supplicant if we are disassociating */ if (associated) @@@ -6567,7 -6566,8 +6567,7 @@@ static int __init ipw2100_init(void printk(KERN_INFO DRV_NAME ": %s, %s\n", DRV_DESCRIPTION, DRV_VERSION); printk(KERN_INFO DRV_NAME ": %s\n", DRV_COPYRIGHT);
- pm_qos_add_request(&ipw2100_pm_qos_req, PM_QOS_CPU_DMA_LATENCY, - PM_QOS_DEFAULT_VALUE); + cpu_latency_qos_add_request(&ipw2100_pm_qos_req, PM_QOS_DEFAULT_VALUE);
ret = pci_register_driver(&ipw2100_pci_driver); if (ret) @@@ -6594,7 -6594,7 +6594,7 @@@ static void __exit ipw2100_exit(void &driver_attr_debug_level); #endif pci_unregister_driver(&ipw2100_pci_driver); - pm_qos_remove_request(&ipw2100_pm_qos_req); + cpu_latency_qos_remove_request(&ipw2100_pm_qos_req); }
module_init(ipw2100_init); diff --combined drivers/net/wireless/intersil/orinoco/orinoco_usb.c index 0e42de291803,a77bbcd544d6..651c676b5506 --- a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c +++ b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c @@@ -202,7 -202,7 +202,7 @@@ struct ezusb_packet __le16 crc; /* CRC up to here */ __le16 hermes_len; __le16 hermes_rid; - u8 data[0]; + u8 data[]; } __packed;
/* Table of devices that work or may work with this driver */ @@@ -365,6 -365,17 +365,6 @@@ static struct request_context *ezusb_al return ctx; }
- -/* Hopefully the real complete_all will soon be exported, in the mean - * while this should work. */ -static inline void ezusb_complete_all(struct completion *comp) -{ - complete(comp); - complete(comp); - complete(comp); - complete(comp); -} - static void ezusb_ctx_complete(struct request_context *ctx) { struct ezusb_priv *upriv = ctx->upriv; @@@ -398,7 -409,7 +398,7 @@@
netif_wake_queue(dev); } - ezusb_complete_all(&ctx->done); + complete_all(&ctx->done); ezusb_request_context_put(ctx); break;
@@@ -408,7 -419,7 +408,7 @@@ /* This is normal, as all request contexts get flushed * when the device is disconnected */ err("Called, CTX not terminating, but device gone"); - ezusb_complete_all(&ctx->done); + complete_all(&ctx->done); ezusb_request_context_put(ctx); break; } @@@ -679,11 -690,11 +679,11 @@@ static void ezusb_req_ctx_wait(struct e * get the chance to run themselves. So we make sure * that we don't sleep for ever */ int msecs = DEF_TIMEOUT * (1000 / HZ); - while (!ctx->done.done && msecs--) + + while (!try_wait_for_completion(&ctx->done) && msecs--) udelay(1000); } else { - wait_event_interruptible(ctx->done.wait, - ctx->done.done); + wait_for_completion(&ctx->done); } break; default: diff --combined drivers/staging/qlge/qlge_ethtool.c index 441ac08d14d2,050c0da23c6f..949abd53a7a9 --- a/drivers/staging/qlge/qlge_ethtool.c +++ b/drivers/staging/qlge/qlge_ethtool.c @@@ -259,9 -259,8 +259,9 @@@ static void ql_update_stats(struct ql_a "Error reading status register 0x%.04x.\n", i); goto end; - } else + } else { *iter = data; + } iter++; }
@@@ -274,9 -273,8 +274,9 @@@ "Error reading status register 0x%.04x.\n", i); goto end; - } else + } else { *iter = data; + } iter++; }
@@@ -292,9 -290,8 +292,9 @@@ "Error reading status register 0x%.04x.\n", i); goto end; - } else + } else { *iter = data; + } iter++; }
@@@ -307,9 -304,8 +307,9 @@@ "Error reading status register 0x%.04x.\n", i); goto end; - } else + } else { *iter = data; + } iter++; }
@@@ -320,9 -316,8 +320,9 @@@ netif_err(qdev, drv, qdev->ndev, "Error reading status register 0x%.04x.\n", i); goto end; - } else + } else { *iter = data; + } end: ql_sem_unlock(qdev, qdev->xg_sem_mask); quit: @@@ -493,9 -488,8 +493,9 @@@ static int ql_start_loopback(struct ql_ if (netif_carrier_ok(qdev->ndev)) { set_bit(QL_LB_LINK_UP, &qdev->flags); netif_carrier_off(qdev->ndev); - } else + } else { clear_bit(QL_LB_LINK_UP, &qdev->flags); + } qdev->link_config |= CFG_LOOPBACK_PCS; return ql_mb_set_port_cfg(qdev); } @@@ -692,6 -686,7 +692,6 @@@ static int ql_set_pauseparam(struct net struct ethtool_pauseparam *pause) { struct ql_adapter *qdev = netdev_priv(netdev); - int status = 0;
if ((pause->rx_pause) && (pause->tx_pause)) qdev->link_config |= CFG_PAUSE_STD; @@@ -700,7 -695,8 +700,7 @@@ else return -EINVAL;
- status = ql_mb_set_port_cfg(qdev); - return status; + return ql_mb_set_port_cfg(qdev); }
static u32 ql_get_msglevel(struct net_device *ndev) @@@ -718,6 -714,8 +718,8 @@@ static void ql_set_msglevel(struct net_ }
const struct ethtool_ops qlge_ethtool_ops = { + .supported_coalesce_params = ETHTOOL_COALESCE_USECS | + ETHTOOL_COALESCE_MAX_FRAMES, .get_drvinfo = ql_get_drvinfo, .get_wol = ql_get_wol, .set_wol = ql_set_wol, diff --combined include/asm-generic/vmlinux.lds.h index 2444336ef04c,39da8d8b561d..71e387a5fe90 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@@ -535,6 -535,7 +535,7 @@@ \ RO_EXCEPTION_TABLE \ NOTES \ + BTF \ \ . = ALIGN((align)); \ __end_rodata = .; @@@ -621,6 -622,20 +622,20 @@@ __stop___ex_table = .; \ }
+ /* + * .BTF + */ + #ifdef CONFIG_DEBUG_INFO_BTF + #define BTF \ + .BTF : AT(ADDR(.BTF) - LOAD_OFFSET) { \ + __start_BTF = .; \ + *(.BTF) \ + __stop_BTF = .; \ + } + #else + #define BTF + #endif + /* * Init task */ @@@ -894,17 -909,10 +909,17 @@@ * section definitions so that such archs put those in earlier section * definitions. */ +#ifdef RUNTIME_DISCARD_EXIT +#define EXIT_DISCARDS +#else +#define EXIT_DISCARDS \ + EXIT_TEXT \ + EXIT_DATA +#endif + #define DISCARDS \ /DISCARD/ : { \ - EXIT_TEXT \ - EXIT_DATA \ + EXIT_DISCARDS \ EXIT_CALL \ *(.discard) \ *(.discard.*) \ diff --combined include/linux/limits.h index 7fc497ee1393,0d3de82dd354..b568b9c30bbf --- a/include/linux/limits.h +++ b/include/linux/limits.h @@@ -4,8 -4,19 +4,8 @@@
#include <uapi/linux/limits.h> #include <linux/types.h> +#include <vdso/limits.h>
-#define USHRT_MAX ((unsigned short)~0U) -#define SHRT_MAX ((short)(USHRT_MAX >> 1)) -#define SHRT_MIN ((short)(-SHRT_MAX - 1)) -#define INT_MAX ((int)(~0U >> 1)) -#define INT_MIN (-INT_MAX - 1) -#define UINT_MAX (~0U) -#define LONG_MAX ((long)(~0UL >> 1)) -#define LONG_MIN (-LONG_MAX - 1) -#define ULONG_MAX (~0UL) -#define LLONG_MAX ((long long)(~0ULL >> 1)) -#define LLONG_MIN (-LLONG_MAX - 1) -#define ULLONG_MAX (~0ULL) #define SIZE_MAX (~(size_t)0) #define PHYS_ADDR_MAX (~(phys_addr_t)0)
@@@ -16,6 -27,7 +16,7 @@@ #define S16_MAX ((s16)(U16_MAX >> 1)) #define S16_MIN ((s16)(-S16_MAX - 1)) #define U32_MAX ((u32)~0U) + #define U32_MIN ((u32)0) #define S32_MAX ((s32)(U32_MAX >> 1)) #define S32_MIN ((s32)(-S32_MAX - 1)) #define U64_MAX ((u64)~0ULL) diff --combined include/linux/lsm_hooks.h index 28d435049f24,c09623b32489..988ca0df7824 --- a/include/linux/lsm_hooks.h +++ b/include/linux/lsm_hooks.h @@@ -103,10 -103,6 +103,10 @@@ * @sb_free_security: * Deallocate and clear the sb->s_security field. * @sb contains the super_block structure to be modified. + * @sb_free_mnt_opts: + * Free memory associated with @mnt_ops. + * @sb_eat_lsm_opts: + * Eat (scan @orig options) and save them in @mnt_opts. * @sb_statfs: * Check permission before obtaining filesystem statistics for the @mnt * mountpoint. @@@ -140,10 -136,6 +140,10 @@@ * @sb superblock being remounted * @data contains the filesystem-specific data. * Return 0 if permission is granted. + * @sb_kern_mount: + * Mount this @sb if allowed by permissions. + * @sb_show_options: + * Show (print on @m) mount options for this @sb. * @sb_umount: * Check permission before the @mnt file system is unmounted. * @mnt contains the mounted file system. @@@ -163,8 -155,6 +163,8 @@@ * Copy all security options from a given superblock to another * @oldsb old superblock which contain information to clone * @newsb new superblock which needs filled in + * @sb_add_mnt_opt: + * Add one mount @option to @mnt_opts. * @sb_parse_opts_str: * Parse a string of security data filling in the opts structure * @options string containing all mount options known by the LSM @@@ -461,12 -451,6 +461,12 @@@ * security module does not know about attribute or a negative error code * to abort the copy up. Note that the caller is responsible for reading * and writing the xattrs as this hook is merely a filter. + * @d_instantiate: + * Fill in @inode security information for a @dentry if allowed. + * @getprocattr: + * Read attribute @name for process @p and store it into @value if allowed. + * @setprocattr: + * Write (set) attribute @name to @value, size @size if allowed. * * Security hooks for kernfs node operations * @@@ -1129,7 -1113,6 +1129,7 @@@ * In case of failure, @secid will be set to zero. * * Security hooks for individual messages held in System V IPC message queues + * * @msg_msg_alloc_security: * Allocate and attach a security structure to the msg->security field. * The security field is initialized to NULL when the structure is first @@@ -1319,10 -1302,6 +1319,10 @@@ * @cap contains the capability <include/linux/capability.h>. * @opts contains options for the capable check <include/linux/security.h> * Return 0 if the capability is granted for @tsk. + * @quotactl: + * Check whether the quotactl syscall is allowed for this @sb. + * @quota_on: + * Check whether QUOTAON is allowed for this @dentry. * @syslog: * Check permission before accessing the kernel message ring or changing * logging to the console. @@@ -1470,645 -1449,22 +1470,35 @@@ * @bpf_prog_free_security: * Clean up the security information stored inside bpf prog. * - * @locked_down + * @locked_down: * Determine whether a kernel feature that potentially enables arbitrary * code execution in kernel space should be permitted. * * @what: kernel feature being accessed + * + * Security hooks for perf events + * + * @perf_event_open: + * Check whether the @type of perf_event_open syscall is allowed. + * @perf_event_alloc: + * Allocate and save perf_event security info. + * @perf_event_free: + * Release (free) perf_event security info. + * @perf_event_read: + * Read perf_event security info if allowed. + * @perf_event_write: + * Write perf_event security info if allowed. */ union security_list_options { - int (*binder_set_context_mgr)(struct task_struct *mgr); - int (*binder_transaction)(struct task_struct *from, - struct task_struct *to); - int (*binder_transfer_binder)(struct task_struct *from, - struct task_struct *to); - int (*binder_transfer_file)(struct task_struct *from, - struct task_struct *to, - struct file *file); - - int (*ptrace_access_check)(struct task_struct *child, - unsigned int mode); - int (*ptrace_traceme)(struct task_struct *parent); - int (*capget)(struct task_struct *target, kernel_cap_t *effective, - kernel_cap_t *inheritable, kernel_cap_t *permitted); - int (*capset)(struct cred *new, const struct cred *old, - const kernel_cap_t *effective, - const kernel_cap_t *inheritable, - const kernel_cap_t *permitted); - int (*capable)(const struct cred *cred, - struct user_namespace *ns, - int cap, - unsigned int opts); - int (*quotactl)(int cmds, int type, int id, struct super_block *sb); - int (*quota_on)(struct dentry *dentry); - int (*syslog)(int type); - int (*settime)(const struct timespec64 *ts, const struct timezone *tz); - int (*vm_enough_memory)(struct mm_struct *mm, long pages); - - int (*bprm_set_creds)(struct linux_binprm *bprm); - int (*bprm_check_security)(struct linux_binprm *bprm); - void (*bprm_committing_creds)(struct linux_binprm *bprm); - void (*bprm_committed_creds)(struct linux_binprm *bprm); - - int (*fs_context_dup)(struct fs_context *fc, struct fs_context *src_sc); - int (*fs_context_parse_param)(struct fs_context *fc, struct fs_parameter *param); - - int (*sb_alloc_security)(struct super_block *sb); - void (*sb_free_security)(struct super_block *sb); - void (*sb_free_mnt_opts)(void *mnt_opts); - int (*sb_eat_lsm_opts)(char *orig, void **mnt_opts); - int (*sb_remount)(struct super_block *sb, void *mnt_opts); - int (*sb_kern_mount)(struct super_block *sb); - int (*sb_show_options)(struct seq_file *m, struct super_block *sb); - int (*sb_statfs)(struct dentry *dentry); - int (*sb_mount)(const char *dev_name, const struct path *path, - const char *type, unsigned long flags, void *data); - int (*sb_umount)(struct vfsmount *mnt, int flags); - int (*sb_pivotroot)(const struct path *old_path, const struct path *new_path); - int (*sb_set_mnt_opts)(struct super_block *sb, - void *mnt_opts, - unsigned long kern_flags, - unsigned long *set_kern_flags); - int (*sb_clone_mnt_opts)(const struct super_block *oldsb, - struct super_block *newsb, - unsigned long kern_flags, - unsigned long *set_kern_flags); - int (*sb_add_mnt_opt)(const char *option, const char *val, int len, - void **mnt_opts); - int (*move_mount)(const struct path *from_path, const struct path *to_path); - int (*dentry_init_security)(struct dentry *dentry, int mode, - const struct qstr *name, void **ctx, - u32 *ctxlen); - int (*dentry_create_files_as)(struct dentry *dentry, int mode, - struct qstr *name, - const struct cred *old, - struct cred *new); - - - #ifdef CONFIG_SECURITY_PATH - int (*path_unlink)(const struct path *dir, struct dentry *dentry); - int (*path_mkdir)(const struct path *dir, struct dentry *dentry, - umode_t mode); - int (*path_rmdir)(const struct path *dir, struct dentry *dentry); - int (*path_mknod)(const struct path *dir, struct dentry *dentry, - umode_t mode, unsigned int dev); - int (*path_truncate)(const struct path *path); - int (*path_symlink)(const struct path *dir, struct dentry *dentry, - const char *old_name); - int (*path_link)(struct dentry *old_dentry, const struct path *new_dir, - struct dentry *new_dentry); - int (*path_rename)(const struct path *old_dir, struct dentry *old_dentry, - const struct path *new_dir, - struct dentry *new_dentry); - int (*path_chmod)(const struct path *path, umode_t mode); - int (*path_chown)(const struct path *path, kuid_t uid, kgid_t gid); - int (*path_chroot)(const struct path *path); - #endif - /* Needed for inode based security check */ - int (*path_notify)(const struct path *path, u64 mask, - unsigned int obj_type); - int (*inode_alloc_security)(struct inode *inode); - void (*inode_free_security)(struct inode *inode); - int (*inode_init_security)(struct inode *inode, struct inode *dir, - const struct qstr *qstr, - const char **name, void **value, - size_t *len); - int (*inode_create)(struct inode *dir, struct dentry *dentry, - umode_t mode); - int (*inode_link)(struct dentry *old_dentry, struct inode *dir, - struct dentry *new_dentry); - int (*inode_unlink)(struct inode *dir, struct dentry *dentry); - int (*inode_symlink)(struct inode *dir, struct dentry *dentry, - const char *old_name); - int (*inode_mkdir)(struct inode *dir, struct dentry *dentry, - umode_t mode); - int (*inode_rmdir)(struct inode *dir, struct dentry *dentry); - int (*inode_mknod)(struct inode *dir, struct dentry *dentry, - umode_t mode, dev_t dev); - int (*inode_rename)(struct inode *old_dir, struct dentry *old_dentry, - struct inode *new_dir, - struct dentry *new_dentry); - int (*inode_readlink)(struct dentry *dentry); - int (*inode_follow_link)(struct dentry *dentry, struct inode *inode, - bool rcu); - int (*inode_permission)(struct inode *inode, int mask); - int (*inode_setattr)(struct dentry *dentry, struct iattr *attr); - int (*inode_getattr)(const struct path *path); - int (*inode_setxattr)(struct dentry *dentry, const char *name, - const void *value, size_t size, int flags); - void (*inode_post_setxattr)(struct dentry *dentry, const char *name, - const void *value, size_t size, - int flags); - int (*inode_getxattr)(struct dentry *dentry, const char *name); - int (*inode_listxattr)(struct dentry *dentry); - int (*inode_removexattr)(struct dentry *dentry, const char *name); - int (*inode_need_killpriv)(struct dentry *dentry); - int (*inode_killpriv)(struct dentry *dentry); - int (*inode_getsecurity)(struct inode *inode, const char *name, - void **buffer, bool alloc); - int (*inode_setsecurity)(struct inode *inode, const char *name, - const void *value, size_t size, - int flags); - int (*inode_listsecurity)(struct inode *inode, char *buffer, - size_t buffer_size); - void (*inode_getsecid)(struct inode *inode, u32 *secid); - int (*inode_copy_up)(struct dentry *src, struct cred **new); - int (*inode_copy_up_xattr)(const char *name); - - int (*kernfs_init_security)(struct kernfs_node *kn_dir, - struct kernfs_node *kn); - - int (*file_permission)(struct file *file, int mask); - int (*file_alloc_security)(struct file *file); - void (*file_free_security)(struct file *file); - int (*file_ioctl)(struct file *file, unsigned int cmd, - unsigned long arg); - int (*mmap_addr)(unsigned long addr); - int (*mmap_file)(struct file *file, unsigned long reqprot, - unsigned long prot, unsigned long flags); - int (*file_mprotect)(struct vm_area_struct *vma, unsigned long reqprot, - unsigned long prot); - int (*file_lock)(struct file *file, unsigned int cmd); - int (*file_fcntl)(struct file *file, unsigned int cmd, - unsigned long arg); - void (*file_set_fowner)(struct file *file); - int (*file_send_sigiotask)(struct task_struct *tsk, - struct fown_struct *fown, int sig); - int (*file_receive)(struct file *file); - int (*file_open)(struct file *file); - - int (*task_alloc)(struct task_struct *task, unsigned long clone_flags); - void (*task_free)(struct task_struct *task); - int (*cred_alloc_blank)(struct cred *cred, gfp_t gfp); - void (*cred_free)(struct cred *cred); - int (*cred_prepare)(struct cred *new, const struct cred *old, - gfp_t gfp); - void (*cred_transfer)(struct cred *new, const struct cred *old); - void (*cred_getsecid)(const struct cred *c, u32 *secid); - int (*kernel_act_as)(struct cred *new, u32 secid); - int (*kernel_create_files_as)(struct cred *new, struct inode *inode); - int (*kernel_module_request)(char *kmod_name); - int (*kernel_load_data)(enum kernel_load_data_id id); - int (*kernel_read_file)(struct file *file, enum kernel_read_file_id id); - int (*kernel_post_read_file)(struct file *file, char *buf, loff_t size, - enum kernel_read_file_id id); - int (*task_fix_setuid)(struct cred *new, const struct cred *old, - int flags); - int (*task_setpgid)(struct task_struct *p, pid_t pgid); - int (*task_getpgid)(struct task_struct *p); - int (*task_getsid)(struct task_struct *p); - void (*task_getsecid)(struct task_struct *p, u32 *secid); - int (*task_setnice)(struct task_struct *p, int nice); - int (*task_setioprio)(struct task_struct *p, int ioprio); - int (*task_getioprio)(struct task_struct *p); - int (*task_prlimit)(const struct cred *cred, const struct cred *tcred, - unsigned int flags); - int (*task_setrlimit)(struct task_struct *p, unsigned int resource, - struct rlimit *new_rlim); - int (*task_setscheduler)(struct task_struct *p); - int (*task_getscheduler)(struct task_struct *p); - int (*task_movememory)(struct task_struct *p); - int (*task_kill)(struct task_struct *p, struct kernel_siginfo *info, - int sig, const struct cred *cred); - int (*task_prctl)(int option, unsigned long arg2, unsigned long arg3, - unsigned long arg4, unsigned long arg5); - void (*task_to_inode)(struct task_struct *p, struct inode *inode); - - int (*ipc_permission)(struct kern_ipc_perm *ipcp, short flag); - void (*ipc_getsecid)(struct kern_ipc_perm *ipcp, u32 *secid); - - int (*msg_msg_alloc_security)(struct msg_msg *msg); - void (*msg_msg_free_security)(struct msg_msg *msg); - - int (*msg_queue_alloc_security)(struct kern_ipc_perm *perm); - void (*msg_queue_free_security)(struct kern_ipc_perm *perm); - int (*msg_queue_associate)(struct kern_ipc_perm *perm, int msqflg); - int (*msg_queue_msgctl)(struct kern_ipc_perm *perm, int cmd); - int (*msg_queue_msgsnd)(struct kern_ipc_perm *perm, struct msg_msg *msg, - int msqflg); - int (*msg_queue_msgrcv)(struct kern_ipc_perm *perm, struct msg_msg *msg, - struct task_struct *target, long type, - int mode); - - int (*shm_alloc_security)(struct kern_ipc_perm *perm); - void (*shm_free_security)(struct kern_ipc_perm *perm); - int (*shm_associate)(struct kern_ipc_perm *perm, int shmflg); - int (*shm_shmctl)(struct kern_ipc_perm *perm, int cmd); - int (*shm_shmat)(struct kern_ipc_perm *perm, char __user *shmaddr, - int shmflg); - - int (*sem_alloc_security)(struct kern_ipc_perm *perm); - void (*sem_free_security)(struct kern_ipc_perm *perm); - int (*sem_associate)(struct kern_ipc_perm *perm, int semflg); - int (*sem_semctl)(struct kern_ipc_perm *perm, int cmd); - int (*sem_semop)(struct kern_ipc_perm *perm, struct sembuf *sops, - unsigned nsops, int alter); - - int (*netlink_send)(struct sock *sk, struct sk_buff *skb); - - void (*d_instantiate)(struct dentry *dentry, struct inode *inode); - - int (*getprocattr)(struct task_struct *p, char *name, char **value); - int (*setprocattr)(const char *name, void *value, size_t size); - int (*ismaclabel)(const char *name); - int (*secid_to_secctx)(u32 secid, char **secdata, u32 *seclen); - int (*secctx_to_secid)(const char *secdata, u32 seclen, u32 *secid); - void (*release_secctx)(char *secdata, u32 seclen); - - void (*inode_invalidate_secctx)(struct inode *inode); - int (*inode_notifysecctx)(struct inode *inode, void *ctx, u32 ctxlen); - int (*inode_setsecctx)(struct dentry *dentry, void *ctx, u32 ctxlen); - int (*inode_getsecctx)(struct inode *inode, void **ctx, u32 *ctxlen); - - #ifdef CONFIG_SECURITY_NETWORK - int (*unix_stream_connect)(struct sock *sock, struct sock *other, - struct sock *newsk); - int (*unix_may_send)(struct socket *sock, struct socket *other); - - int (*socket_create)(int family, int type, int protocol, int kern); - int (*socket_post_create)(struct socket *sock, int family, int type, - int protocol, int kern); - int (*socket_socketpair)(struct socket *socka, struct socket *sockb); - int (*socket_bind)(struct socket *sock, struct sockaddr *address, - int addrlen); - int (*socket_connect)(struct socket *sock, struct sockaddr *address, - int addrlen); - int (*socket_listen)(struct socket *sock, int backlog); - int (*socket_accept)(struct socket *sock, struct socket *newsock); - int (*socket_sendmsg)(struct socket *sock, struct msghdr *msg, - int size); - int (*socket_recvmsg)(struct socket *sock, struct msghdr *msg, - int size, int flags); - int (*socket_getsockname)(struct socket *sock); - int (*socket_getpeername)(struct socket *sock); - int (*socket_getsockopt)(struct socket *sock, int level, int optname); - int (*socket_setsockopt)(struct socket *sock, int level, int optname); - int (*socket_shutdown)(struct socket *sock, int how); - int (*socket_sock_rcv_skb)(struct sock *sk, struct sk_buff *skb); - int (*socket_getpeersec_stream)(struct socket *sock, - char __user *optval, - int __user *optlen, unsigned len); - int (*socket_getpeersec_dgram)(struct socket *sock, - struct sk_buff *skb, u32 *secid); - int (*sk_alloc_security)(struct sock *sk, int family, gfp_t priority); - void (*sk_free_security)(struct sock *sk); - void (*sk_clone_security)(const struct sock *sk, struct sock *newsk); - void (*sk_getsecid)(struct sock *sk, u32 *secid); - void (*sock_graft)(struct sock *sk, struct socket *parent); - int (*inet_conn_request)(struct sock *sk, struct sk_buff *skb, - struct request_sock *req); - void (*inet_csk_clone)(struct sock *newsk, - const struct request_sock *req); - void (*inet_conn_established)(struct sock *sk, struct sk_buff *skb); - int (*secmark_relabel_packet)(u32 secid); - void (*secmark_refcount_inc)(void); - void (*secmark_refcount_dec)(void); - void (*req_classify_flow)(const struct request_sock *req, - struct flowi *fl); - int (*tun_dev_alloc_security)(void **security); - void (*tun_dev_free_security)(void *security); - int (*tun_dev_create)(void); - int (*tun_dev_attach_queue)(void *security); - int (*tun_dev_attach)(struct sock *sk, void *security); - int (*tun_dev_open)(void *security); - int (*sctp_assoc_request)(struct sctp_endpoint *ep, - struct sk_buff *skb); - int (*sctp_bind_connect)(struct sock *sk, int optname, - struct sockaddr *address, int addrlen); - void (*sctp_sk_clone)(struct sctp_endpoint *ep, struct sock *sk, - struct sock *newsk); - #endif /* CONFIG_SECURITY_NETWORK */ - - #ifdef CONFIG_SECURITY_INFINIBAND - int (*ib_pkey_access)(void *sec, u64 subnet_prefix, u16 pkey); - int (*ib_endport_manage_subnet)(void *sec, const char *dev_name, - u8 port_num); - int (*ib_alloc_security)(void **sec); - void (*ib_free_security)(void *sec); - #endif /* CONFIG_SECURITY_INFINIBAND */ - - #ifdef CONFIG_SECURITY_NETWORK_XFRM - int (*xfrm_policy_alloc_security)(struct xfrm_sec_ctx **ctxp, - struct xfrm_user_sec_ctx *sec_ctx, - gfp_t gfp); - int (*xfrm_policy_clone_security)(struct xfrm_sec_ctx *old_ctx, - struct xfrm_sec_ctx **new_ctx); - void (*xfrm_policy_free_security)(struct xfrm_sec_ctx *ctx); - int (*xfrm_policy_delete_security)(struct xfrm_sec_ctx *ctx); - int (*xfrm_state_alloc)(struct xfrm_state *x, - struct xfrm_user_sec_ctx *sec_ctx); - int (*xfrm_state_alloc_acquire)(struct xfrm_state *x, - struct xfrm_sec_ctx *polsec, - u32 secid); - void (*xfrm_state_free_security)(struct xfrm_state *x); - int (*xfrm_state_delete_security)(struct xfrm_state *x); - int (*xfrm_policy_lookup)(struct xfrm_sec_ctx *ctx, u32 fl_secid, - u8 dir); - int (*xfrm_state_pol_flow_match)(struct xfrm_state *x, - struct xfrm_policy *xp, - const struct flowi *fl); - int (*xfrm_decode_session)(struct sk_buff *skb, u32 *secid, int ckall); - #endif /* CONFIG_SECURITY_NETWORK_XFRM */ - - /* key management security hooks */ - #ifdef CONFIG_KEYS - int (*key_alloc)(struct key *key, const struct cred *cred, - unsigned long flags); - void (*key_free)(struct key *key); - int (*key_permission)(key_ref_t key_ref, const struct cred *cred, - unsigned perm); - int (*key_getsecurity)(struct key *key, char **_buffer); - #endif /* CONFIG_KEYS */ - - #ifdef CONFIG_AUDIT - int (*audit_rule_init)(u32 field, u32 op, char *rulestr, - void **lsmrule); - int (*audit_rule_known)(struct audit_krule *krule); - int (*audit_rule_match)(u32 secid, u32 field, u32 op, void *lsmrule); - void (*audit_rule_free)(void *lsmrule); - #endif /* CONFIG_AUDIT */ - - #ifdef CONFIG_BPF_SYSCALL - int (*bpf)(int cmd, union bpf_attr *attr, - unsigned int size); - int (*bpf_map)(struct bpf_map *map, fmode_t fmode); - int (*bpf_prog)(struct bpf_prog *prog); - int (*bpf_map_alloc_security)(struct bpf_map *map); - void (*bpf_map_free_security)(struct bpf_map *map); - int (*bpf_prog_alloc_security)(struct bpf_prog_aux *aux); - void (*bpf_prog_free_security)(struct bpf_prog_aux *aux); - #endif /* CONFIG_BPF_SYSCALL */ - int (*locked_down)(enum lockdown_reason what); - #ifdef CONFIG_PERF_EVENTS - int (*perf_event_open)(struct perf_event_attr *attr, int type); - int (*perf_event_alloc)(struct perf_event *event); - void (*perf_event_free)(struct perf_event *event); - int (*perf_event_read)(struct perf_event *event); - int (*perf_event_write)(struct perf_event *event); - - #endif + #define LSM_HOOK(RET, DEFAULT, NAME, ...) RET (*NAME)(__VA_ARGS__); + #include "lsm_hook_defs.h" + #undef LSM_HOOK };
struct security_hook_heads { - struct hlist_head binder_set_context_mgr; - struct hlist_head binder_transaction; - struct hlist_head binder_transfer_binder; - struct hlist_head binder_transfer_file; - struct hlist_head ptrace_access_check; - struct hlist_head ptrace_traceme; - struct hlist_head capget; - struct hlist_head capset; - struct hlist_head capable; - struct hlist_head quotactl; - struct hlist_head quota_on; - struct hlist_head syslog; - struct hlist_head settime; - struct hlist_head vm_enough_memory; - struct hlist_head bprm_set_creds; - struct hlist_head bprm_check_security; - struct hlist_head bprm_committing_creds; - struct hlist_head bprm_committed_creds; - struct hlist_head fs_context_dup; - struct hlist_head fs_context_parse_param; - struct hlist_head sb_alloc_security; - struct hlist_head sb_free_security; - struct hlist_head sb_free_mnt_opts; - struct hlist_head sb_eat_lsm_opts; - struct hlist_head sb_remount; - struct hlist_head sb_kern_mount; - struct hlist_head sb_show_options; - struct hlist_head sb_statfs; - struct hlist_head sb_mount; - struct hlist_head sb_umount; - struct hlist_head sb_pivotroot; - struct hlist_head sb_set_mnt_opts; - struct hlist_head sb_clone_mnt_opts; - struct hlist_head sb_add_mnt_opt; - struct hlist_head move_mount; - struct hlist_head dentry_init_security; - struct hlist_head dentry_create_files_as; - #ifdef CONFIG_SECURITY_PATH - struct hlist_head path_unlink; - struct hlist_head path_mkdir; - struct hlist_head path_rmdir; - struct hlist_head path_mknod; - struct hlist_head path_truncate; - struct hlist_head path_symlink; - struct hlist_head path_link; - struct hlist_head path_rename; - struct hlist_head path_chmod; - struct hlist_head path_chown; - struct hlist_head path_chroot; - #endif - /* Needed for inode based modules as well */ - struct hlist_head path_notify; - struct hlist_head inode_alloc_security; - struct hlist_head inode_free_security; - struct hlist_head inode_init_security; - struct hlist_head inode_create; - struct hlist_head inode_link; - struct hlist_head inode_unlink; - struct hlist_head inode_symlink; - struct hlist_head inode_mkdir; - struct hlist_head inode_rmdir; - struct hlist_head inode_mknod; - struct hlist_head inode_rename; - struct hlist_head inode_readlink; - struct hlist_head inode_follow_link; - struct hlist_head inode_permission; - struct hlist_head inode_setattr; - struct hlist_head inode_getattr; - struct hlist_head inode_setxattr; - struct hlist_head inode_post_setxattr; - struct hlist_head inode_getxattr; - struct hlist_head inode_listxattr; - struct hlist_head inode_removexattr; - struct hlist_head inode_need_killpriv; - struct hlist_head inode_killpriv; - struct hlist_head inode_getsecurity; - struct hlist_head inode_setsecurity; - struct hlist_head inode_listsecurity; - struct hlist_head inode_getsecid; - struct hlist_head inode_copy_up; - struct hlist_head inode_copy_up_xattr; - struct hlist_head kernfs_init_security; - struct hlist_head file_permission; - struct hlist_head file_alloc_security; - struct hlist_head file_free_security; - struct hlist_head file_ioctl; - struct hlist_head mmap_addr; - struct hlist_head mmap_file; - struct hlist_head file_mprotect; - struct hlist_head file_lock; - struct hlist_head file_fcntl; - struct hlist_head file_set_fowner; - struct hlist_head file_send_sigiotask; - struct hlist_head file_receive; - struct hlist_head file_open; - struct hlist_head task_alloc; - struct hlist_head task_free; - struct hlist_head cred_alloc_blank; - struct hlist_head cred_free; - struct hlist_head cred_prepare; - struct hlist_head cred_transfer; - struct hlist_head cred_getsecid; - struct hlist_head kernel_act_as; - struct hlist_head kernel_create_files_as; - struct hlist_head kernel_load_data; - struct hlist_head kernel_read_file; - struct hlist_head kernel_post_read_file; - struct hlist_head kernel_module_request; - struct hlist_head task_fix_setuid; - struct hlist_head task_setpgid; - struct hlist_head task_getpgid; - struct hlist_head task_getsid; - struct hlist_head task_getsecid; - struct hlist_head task_setnice; - struct hlist_head task_setioprio; - struct hlist_head task_getioprio; - struct hlist_head task_prlimit; - struct hlist_head task_setrlimit; - struct hlist_head task_setscheduler; - struct hlist_head task_getscheduler; - struct hlist_head task_movememory; - struct hlist_head task_kill; - struct hlist_head task_prctl; - struct hlist_head task_to_inode; - struct hlist_head ipc_permission; - struct hlist_head ipc_getsecid; - struct hlist_head msg_msg_alloc_security; - struct hlist_head msg_msg_free_security; - struct hlist_head msg_queue_alloc_security; - struct hlist_head msg_queue_free_security; - struct hlist_head msg_queue_associate; - struct hlist_head msg_queue_msgctl; - struct hlist_head msg_queue_msgsnd; - struct hlist_head msg_queue_msgrcv; - struct hlist_head shm_alloc_security; - struct hlist_head shm_free_security; - struct hlist_head shm_associate; - struct hlist_head shm_shmctl; - struct hlist_head shm_shmat; - struct hlist_head sem_alloc_security; - struct hlist_head sem_free_security; - struct hlist_head sem_associate; - struct hlist_head sem_semctl; - struct hlist_head sem_semop; - struct hlist_head netlink_send; - struct hlist_head d_instantiate; - struct hlist_head getprocattr; - struct hlist_head setprocattr; - struct hlist_head ismaclabel; - struct hlist_head secid_to_secctx; - struct hlist_head secctx_to_secid; - struct hlist_head release_secctx; - struct hlist_head inode_invalidate_secctx; - struct hlist_head inode_notifysecctx; - struct hlist_head inode_setsecctx; - struct hlist_head inode_getsecctx; - #ifdef CONFIG_SECURITY_NETWORK - struct hlist_head unix_stream_connect; - struct hlist_head unix_may_send; - struct hlist_head socket_create; - struct hlist_head socket_post_create; - struct hlist_head socket_socketpair; - struct hlist_head socket_bind; - struct hlist_head socket_connect; - struct hlist_head socket_listen; - struct hlist_head socket_accept; - struct hlist_head socket_sendmsg; - struct hlist_head socket_recvmsg; - struct hlist_head socket_getsockname; - struct hlist_head socket_getpeername; - struct hlist_head socket_getsockopt; - struct hlist_head socket_setsockopt; - struct hlist_head socket_shutdown; - struct hlist_head socket_sock_rcv_skb; - struct hlist_head socket_getpeersec_stream; - struct hlist_head socket_getpeersec_dgram; - struct hlist_head sk_alloc_security; - struct hlist_head sk_free_security; - struct hlist_head sk_clone_security; - struct hlist_head sk_getsecid; - struct hlist_head sock_graft; - struct hlist_head inet_conn_request; - struct hlist_head inet_csk_clone; - struct hlist_head inet_conn_established; - struct hlist_head secmark_relabel_packet; - struct hlist_head secmark_refcount_inc; - struct hlist_head secmark_refcount_dec; - struct hlist_head req_classify_flow; - struct hlist_head tun_dev_alloc_security; - struct hlist_head tun_dev_free_security; - struct hlist_head tun_dev_create; - struct hlist_head tun_dev_attach_queue; - struct hlist_head tun_dev_attach; - struct hlist_head tun_dev_open; - struct hlist_head sctp_assoc_request; - struct hlist_head sctp_bind_connect; - struct hlist_head sctp_sk_clone; - #endif /* CONFIG_SECURITY_NETWORK */ - #ifdef CONFIG_SECURITY_INFINIBAND - struct hlist_head ib_pkey_access; - struct hlist_head ib_endport_manage_subnet; - struct hlist_head ib_alloc_security; - struct hlist_head ib_free_security; - #endif /* CONFIG_SECURITY_INFINIBAND */ - #ifdef CONFIG_SECURITY_NETWORK_XFRM - struct hlist_head xfrm_policy_alloc_security; - struct hlist_head xfrm_policy_clone_security; - struct hlist_head xfrm_policy_free_security; - struct hlist_head xfrm_policy_delete_security; - struct hlist_head xfrm_state_alloc; - struct hlist_head xfrm_state_alloc_acquire; - struct hlist_head xfrm_state_free_security; - struct hlist_head xfrm_state_delete_security; - struct hlist_head xfrm_policy_lookup; - struct hlist_head xfrm_state_pol_flow_match; - struct hlist_head xfrm_decode_session; - #endif /* CONFIG_SECURITY_NETWORK_XFRM */ - #ifdef CONFIG_KEYS - struct hlist_head key_alloc; - struct hlist_head key_free; - struct hlist_head key_permission; - struct hlist_head key_getsecurity; - #endif /* CONFIG_KEYS */ - #ifdef CONFIG_AUDIT - struct hlist_head audit_rule_init; - struct hlist_head audit_rule_known; - struct hlist_head audit_rule_match; - struct hlist_head audit_rule_free; - #endif /* CONFIG_AUDIT */ - #ifdef CONFIG_BPF_SYSCALL - struct hlist_head bpf; - struct hlist_head bpf_map; - struct hlist_head bpf_prog; - struct hlist_head bpf_map_alloc_security; - struct hlist_head bpf_map_free_security; - struct hlist_head bpf_prog_alloc_security; - struct hlist_head bpf_prog_free_security; - #endif /* CONFIG_BPF_SYSCALL */ - struct hlist_head locked_down; - #ifdef CONFIG_PERF_EVENTS - struct hlist_head perf_event_open; - struct hlist_head perf_event_alloc; - struct hlist_head perf_event_free; - struct hlist_head perf_event_read; - struct hlist_head perf_event_write; - #endif + #define LSM_HOOK(RET, DEFAULT, NAME, ...) struct hlist_head NAME; + #include "lsm_hook_defs.h" + #undef LSM_HOOK } __randomize_layout;
/* @@@ -2134,6 -1490,12 +1524,12 @@@ struct lsm_blob_sizes int lbs_task; };
+ /* + * LSM_RET_VOID is used as the default value in LSM_HOOK definitions for void + * LSM hooks (in include/linux/lsm_hook_defs.h). + */ + #define LSM_RET_VOID ((void) 0) + /* * Initializing a security_hook_list structure takes * up a lot of space in a source file. This macro takes diff --combined include/net/drop_monitor.h index f68bc373544a,ddd441a60e03..3f5b6ddb3179 --- a/include/net/drop_monitor.h +++ b/include/net/drop_monitor.h @@@ -6,20 -6,23 +6,23 @@@ #include <linux/ktime.h> #include <linux/netdevice.h> #include <linux/skbuff.h> + #include <net/flow_offload.h>
/** * struct net_dm_hw_metadata - Hardware-supplied packet metadata. * @trap_group_name: Hardware trap group name. * @trap_name: Hardware trap name. * @input_dev: Input netdevice. + * @fa_cookie: Flow action user cookie. */ struct net_dm_hw_metadata { const char *trap_group_name; const char *trap_name; struct net_device *input_dev; + const struct flow_action_cookie *fa_cookie; };
-#if IS_ENABLED(CONFIG_NET_DROP_MONITOR) +#if IS_REACHABLE(CONFIG_NET_DROP_MONITOR) void net_dm_hw_report(struct sk_buff *skb, const struct net_dm_hw_metadata *hw_metadata); #else diff --combined init/Kconfig index f11846c06176,680dbb7dd64f..f095ec64bb91 --- a/init/Kconfig +++ b/init/Kconfig @@@ -6,7 -6,8 +6,7 @@@ config DEFCONFIG_LIS default "/lib/modules/$(shell,uname -r)/.config" default "/etc/kernel-config" default "/boot/config-$(shell,uname -r)" - default ARCH_DEFCONFIG - default "arch/$(ARCH)/defconfig" + default "arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)"
config CC_IS_GCC def_bool $(success,$(CC) --version | head -n 1 | grep -q gcc) @@@ -450,10 -451,6 +450,10 @@@ config HAVE_SCHED_AVG_IR depends on IRQ_TIME_ACCOUNTING || PARAVIRT_TIME_ACCOUNTING depends on SMP
+config SCHED_THERMAL_PRESSURE + bool "Enable periodic averaging of thermal pressure" + depends on SMP + config BSD_PROCESS_ACCT bool "BSD Process Accounting" depends on MULTIUSER @@@ -1618,6 -1615,19 +1618,19 @@@ config KALLSYMS_BASE_RELATIV # end of the "standard kernel features (expert users)" menu
# syscall, maps, verifier + + config BPF_LSM + bool "LSM Instrumentation with BPF" + depends on BPF_EVENTS + depends on BPF_SYSCALL + depends on SECURITY + depends on BPF_JIT + help + Enables instrumentation of the security hooks with eBPF programs for + implementing dynamic MAC and Audit Policies. + + If you are unsure how to answer this question, answer N. + config BPF_SYSCALL bool "Enable bpf() system call" select BPF @@@ -2210,19 -2220,6 +2223,19 @@@ config TRIM_UNUSED_KSYM
If unsure, or if you need to build out-of-tree modules, say N.
+config UNUSED_KSYMS_WHITELIST + string "Whitelist of symbols to keep in ksymtab" + depends on TRIM_UNUSED_KSYMS + help + By default, all unused exported symbols will be un-exported from the + build when TRIM_UNUSED_KSYMS is selected. + + UNUSED_KSYMS_WHITELIST allows to whitelist symbols that must be kept + exported at all times, even in absence of in-tree users. The value to + set here is the path to a text file containing the list of symbols, + one per line. The path can be absolute, or relative to the kernel + source tree. + endif # MODULES
config MODULES_TREE_LOOKUP diff --combined kernel/events/core.c index d22e4ba59dfa,9b89ef176247..318435c5bf0b --- a/kernel/events/core.c +++ b/kernel/events/core.c @@@ -49,7 -49,6 +49,7 @@@ #include <linux/sched/mm.h> #include <linux/proc_ns.h> #include <linux/mount.h> +#include <linux/min_heap.h>
#include "internal.h"
@@@ -892,47 -891,6 +892,47 @@@ static inline void perf_cgroup_sched_in rcu_read_unlock(); }
+static int perf_cgroup_ensure_storage(struct perf_event *event, + struct cgroup_subsys_state *css) +{ + struct perf_cpu_context *cpuctx; + struct perf_event **storage; + int cpu, heap_size, ret = 0; + + /* + * Allow storage to have sufficent space for an iterator for each + * possibly nested cgroup plus an iterator for events with no cgroup. + */ + for (heap_size = 1; css; css = css->parent) + heap_size++; + + for_each_possible_cpu(cpu) { + cpuctx = per_cpu_ptr(event->pmu->pmu_cpu_context, cpu); + if (heap_size <= cpuctx->heap_size) + continue; + + storage = kmalloc_node(heap_size * sizeof(struct perf_event *), + GFP_KERNEL, cpu_to_node(cpu)); + if (!storage) { + ret = -ENOMEM; + break; + } + + raw_spin_lock_irq(&cpuctx->ctx.lock); + if (cpuctx->heap_size < heap_size) { + swap(cpuctx->heap, storage); + if (storage == cpuctx->heap_default) + storage = NULL; + cpuctx->heap_size = heap_size; + } + raw_spin_unlock_irq(&cpuctx->ctx.lock); + + kfree(storage); + } + + return ret; +} + static inline int perf_cgroup_connect(int fd, struct perf_event *event, struct perf_event_attr *attr, struct perf_event *group_leader) @@@ -952,10 -910,6 +952,10 @@@ goto out; }
+ ret = perf_cgroup_ensure_storage(event, css); + if (ret) + goto out; + cgrp = container_of(css, struct perf_cgroup, css); event->cgrp = cgrp;
@@@ -1577,30 -1531,6 +1577,30 @@@ perf_event_groups_less(struct perf_even if (left->cpu > right->cpu) return false;
+#ifdef CONFIG_CGROUP_PERF + if (left->cgrp != right->cgrp) { + if (!left->cgrp || !left->cgrp->css.cgroup) { + /* + * Left has no cgroup but right does, no cgroups come + * first. + */ + return true; + } + if (!right->cgrp || !right->cgrp->css.cgroup) { + /* + * Right has no cgroup but left does, no cgroups come + * first. + */ + return false; + } + /* Two dissimilar cgroups, order by id. */ + if (left->cgrp->css.cgroup->kn->id < right->cgrp->css.cgroup->kn->id) + return true; + + return false; + } +#endif + if (left->group_index < right->group_index) return true; if (left->group_index > right->group_index) @@@ -1680,48 -1610,25 +1680,48 @@@ del_event_from_groups(struct perf_even }
/* - * Get the leftmost event in the @cpu subtree. + * Get the leftmost event in the cpu/cgroup subtree. */ static struct perf_event * -perf_event_groups_first(struct perf_event_groups *groups, int cpu) +perf_event_groups_first(struct perf_event_groups *groups, int cpu, + struct cgroup *cgrp) { struct perf_event *node_event = NULL, *match = NULL; struct rb_node *node = groups->tree.rb_node; +#ifdef CONFIG_CGROUP_PERF + u64 node_cgrp_id, cgrp_id = 0; + + if (cgrp) + cgrp_id = cgrp->kn->id; +#endif
while (node) { node_event = container_of(node, struct perf_event, group_node);
if (cpu < node_event->cpu) { node = node->rb_left; - } else if (cpu > node_event->cpu) { + continue; + } + if (cpu > node_event->cpu) { node = node->rb_right; - } else { - match = node_event; + continue; + } +#ifdef CONFIG_CGROUP_PERF + node_cgrp_id = 0; + if (node_event->cgrp && node_event->cgrp->css.cgroup) + node_cgrp_id = node_event->cgrp->css.cgroup->kn->id; + + if (cgrp_id < node_cgrp_id) { node = node->rb_left; + continue; + } + if (cgrp_id > node_cgrp_id) { + node = node->rb_right; + continue; } +#endif + match = node_event; + node = node->rb_left; }
return match; @@@ -1734,26 -1641,12 +1734,26 @@@ static struct perf_event perf_event_groups_next(struct perf_event *event) { struct perf_event *next; +#ifdef CONFIG_CGROUP_PERF + u64 curr_cgrp_id = 0; + u64 next_cgrp_id = 0; +#endif
next = rb_entry_safe(rb_next(&event->group_node), typeof(*event), group_node); - if (next && next->cpu == event->cpu) - return next; + if (next == NULL || next->cpu != event->cpu) + return NULL;
- return NULL; +#ifdef CONFIG_CGROUP_PERF + if (event->cgrp && event->cgrp->css.cgroup) + curr_cgrp_id = event->cgrp->css.cgroup->kn->id; + + if (next->cgrp && next->cgrp->css.cgroup) + next_cgrp_id = next->cgrp->css.cgroup->kn->id; + + if (curr_cgrp_id != next_cgrp_id) + return NULL; +#endif + return next; }
/* @@@ -2093,12 -1986,6 +2093,12 @@@ static int perf_get_aux_event(struct pe return 1; }
+static inline struct list_head *get_event_list(struct perf_event *event) +{ + struct perf_event_context *ctx = event->ctx; + return event->attr.pinned ? &ctx->pinned_active : &ctx->flexible_active; +} + static void perf_group_detach(struct perf_event *event) { struct perf_event *sibling, *tmp; @@@ -2141,8 -2028,12 +2141,8 @@@ if (!RB_EMPTY_NODE(&event->group_node)) { add_event_to_groups(sibling, event->ctx);
- if (sibling->state == PERF_EVENT_STATE_ACTIVE) { - struct list_head *list = sibling->attr.pinned ? - &ctx->pinned_active : &ctx->flexible_active; - - list_add_tail(&sibling->active_list, list); - } + if (sibling->state == PERF_EVENT_STATE_ACTIVE) + list_add_tail(&sibling->active_list, get_event_list(sibling)); }
WARN_ON_ONCE(sibling->ctx != event->ctx); @@@ -2291,7 -2182,6 +2291,7 @@@ __perf_remove_from_context(struct perf_
if (!ctx->nr_events && ctx->is_active) { ctx->is_active = 0; + ctx->rotate_necessary = 0; if (ctx->task) { WARN_ON_ONCE(cpuctx->task_ctx != ctx); cpuctx->task_ctx = NULL; @@@ -2460,8 -2350,6 +2460,8 @@@ event_sched_in(struct perf_event *event { int ret = 0;
+ WARN_ON_ONCE(event->ctx != ctx); + lockdep_assert_held(&ctx->lock);
if (event->state <= PERF_EVENT_STATE_OFF) @@@ -3189,6 -3077,12 +3189,6 @@@ static void ctx_sched_out(struct perf_e if (!ctx->nr_active || !(is_active & EVENT_ALL)) return;
- /* - * If we had been multiplexing, no rotations are necessary, now no events - * are active. - */ - ctx->rotate_necessary = 0; - perf_pmu_disable(ctx->pmu); if (is_active & EVENT_PINNED) { list_for_each_entry_safe(event, tmp, &ctx->pinned_active, active_list) @@@ -3198,13 -3092,6 +3198,13 @@@ if (is_active & EVENT_FLEXIBLE) { list_for_each_entry_safe(event, tmp, &ctx->flexible_active, active_list) group_sched_out(event, cpuctx, ctx); + + /* + * Since we cleared EVENT_FLEXIBLE, also clear + * rotate_necessary, is will be reset by + * ctx_flexible_sched_in() when needed. + */ + ctx->rotate_necessary = 0; } perf_pmu_enable(ctx->pmu); } @@@ -3501,103 -3388,71 +3501,103 @@@ static void cpu_ctx_sched_out(struct pe ctx_sched_out(&cpuctx->ctx, cpuctx, event_type); }
-static int visit_groups_merge(struct perf_event_groups *groups, int cpu, - int (*func)(struct perf_event *, void *), void *data) +static bool perf_less_group_idx(const void *l, const void *r) { - struct perf_event **evt, *evt1, *evt2; - int ret; - - evt1 = perf_event_groups_first(groups, -1); - evt2 = perf_event_groups_first(groups, cpu); + const struct perf_event *le = l, *re = r;
- while (evt1 || evt2) { - if (evt1 && evt2) { - if (evt1->group_index < evt2->group_index) - evt = &evt1; - else - evt = &evt2; - } else if (evt1) { - evt = &evt1; - } else { - evt = &evt2; - } - - ret = func(*evt, data); - if (ret) - return ret; + return le->group_index < re->group_index; +}
- *evt = perf_event_groups_next(*evt); - } +static void swap_ptr(void *l, void *r) +{ + void **lp = l, **rp = r;
- return 0; + swap(*lp, *rp); }
-struct sched_in_data { - struct perf_event_context *ctx; - struct perf_cpu_context *cpuctx; - int can_add_hw; +static const struct min_heap_callbacks perf_min_heap = { + .elem_size = sizeof(struct perf_event *), + .less = perf_less_group_idx, + .swp = swap_ptr, };
-static int pinned_sched_in(struct perf_event *event, void *data) +static void __heap_add(struct min_heap *heap, struct perf_event *event) { - struct sched_in_data *sid = data; + struct perf_event **itrs = heap->data;
- if (event->state <= PERF_EVENT_STATE_OFF) - return 0; + if (event) { + itrs[heap->nr] = event; + heap->nr++; + } +}
- if (!event_filter_match(event)) - return 0; +static noinline int visit_groups_merge(struct perf_cpu_context *cpuctx, + struct perf_event_groups *groups, int cpu, + int (*func)(struct perf_event *, void *), + void *data) +{ +#ifdef CONFIG_CGROUP_PERF + struct cgroup_subsys_state *css = NULL; +#endif + /* Space for per CPU and/or any CPU event iterators. */ + struct perf_event *itrs[2]; + struct min_heap event_heap; + struct perf_event **evt; + int ret; + + if (cpuctx) { + event_heap = (struct min_heap){ + .data = cpuctx->heap, + .nr = 0, + .size = cpuctx->heap_size, + }; + + lockdep_assert_held(&cpuctx->ctx.lock);
- if (group_can_go_on(event, sid->cpuctx, sid->can_add_hw)) { - if (!group_sched_in(event, sid->cpuctx, sid->ctx)) - list_add_tail(&event->active_list, &sid->ctx->pinned_active); +#ifdef CONFIG_CGROUP_PERF + if (cpuctx->cgrp) + css = &cpuctx->cgrp->css; +#endif + } else { + event_heap = (struct min_heap){ + .data = itrs, + .nr = 0, + .size = ARRAY_SIZE(itrs), + }; + /* Events not within a CPU context may be on any CPU. */ + __heap_add(&event_heap, perf_event_groups_first(groups, -1, NULL)); } + evt = event_heap.data;
- /* - * If this pinned group hasn't been scheduled, - * put it in error state. - */ - if (event->state == PERF_EVENT_STATE_INACTIVE) - perf_event_set_state(event, PERF_EVENT_STATE_ERROR); + __heap_add(&event_heap, perf_event_groups_first(groups, cpu, NULL)); + +#ifdef CONFIG_CGROUP_PERF + for (; css; css = css->parent) + __heap_add(&event_heap, perf_event_groups_first(groups, cpu, css->cgroup)); +#endif + + min_heapify_all(&event_heap, &perf_min_heap); + + while (event_heap.nr) { + ret = func(*evt, data); + if (ret) + return ret; + + *evt = perf_event_groups_next(*evt); + if (*evt) + min_heapify(&event_heap, 0, &perf_min_heap); + else + min_heap_pop(&event_heap, &perf_min_heap); + }
return 0; }
-static int flexible_sched_in(struct perf_event *event, void *data) +static int merge_sched_in(struct perf_event *event, void *data) { - struct sched_in_data *sid = data; + struct perf_event_context *ctx = event->ctx; + struct perf_cpu_context *cpuctx = __get_cpu_context(ctx); + int *can_add_hw = data;
if (event->state <= PERF_EVENT_STATE_OFF) return 0; @@@ -3605,17 -3460,14 +3605,17 @@@ if (!event_filter_match(event)) return 0;
- if (group_can_go_on(event, sid->cpuctx, sid->can_add_hw)) { - int ret = group_sched_in(event, sid->cpuctx, sid->ctx); - if (ret) { - sid->can_add_hw = 0; - sid->ctx->rotate_necessary = 1; - return 0; - } - list_add_tail(&event->active_list, &sid->ctx->flexible_active); + if (group_can_go_on(event, cpuctx, *can_add_hw)) { + if (!group_sched_in(event, cpuctx, ctx)) + list_add_tail(&event->active_list, get_event_list(event)); + } + + if (event->state == PERF_EVENT_STATE_INACTIVE) { + if (event->attr.pinned) + perf_event_set_state(event, PERF_EVENT_STATE_ERROR); + + *can_add_hw = 0; + ctx->rotate_necessary = 1; }
return 0; @@@ -3625,28 -3477,30 +3625,28 @@@ static voi ctx_pinned_sched_in(struct perf_event_context *ctx, struct perf_cpu_context *cpuctx) { - struct sched_in_data sid = { - .ctx = ctx, - .cpuctx = cpuctx, - .can_add_hw = 1, - }; + int can_add_hw = 1;
- visit_groups_merge(&ctx->pinned_groups, + if (ctx != &cpuctx->ctx) + cpuctx = NULL; + + visit_groups_merge(cpuctx, &ctx->pinned_groups, smp_processor_id(), - pinned_sched_in, &sid); + merge_sched_in, &can_add_hw); }
static void ctx_flexible_sched_in(struct perf_event_context *ctx, struct perf_cpu_context *cpuctx) { - struct sched_in_data sid = { - .ctx = ctx, - .cpuctx = cpuctx, - .can_add_hw = 1, - }; + int can_add_hw = 1;
- visit_groups_merge(&ctx->flexible_groups, + if (ctx != &cpuctx->ctx) + cpuctx = NULL; + + visit_groups_merge(cpuctx, &ctx->flexible_groups, smp_processor_id(), - flexible_sched_in, &sid); + merge_sched_in, &can_add_hw); }
static void @@@ -3987,12 -3841,6 +3987,12 @@@ ctx_event_to_rotate(struct perf_event_c typeof(*event), group_node); }
+ /* + * Unconditionally clear rotate_necessary; if ctx_flexible_sched_in() + * finds there are unschedulable events, it will set it again. + */ + ctx->rotate_necessary = 0; + return event; }
@@@ -6707,11 -6555,6 +6707,11 @@@ static void perf_output_read(struct per perf_output_read_one(handle, event, enabled, running); }
+static inline bool perf_sample_save_hw_index(struct perf_event *event) +{ + return event->attr.branch_sample_type & PERF_SAMPLE_BRANCH_HW_INDEX; +} + void perf_output_sample(struct perf_output_handle *handle, struct perf_event_header *header, struct perf_sample_data *data, @@@ -6800,8 -6643,6 +6800,8 @@@ * sizeof(struct perf_branch_entry);
perf_output_put(handle, data->br_stack->nr); + if (perf_sample_save_hw_index(event)) + perf_output_put(handle, data->br_stack->hw_idx); perf_output_copy(handle, data->br_stack->entries, size); } else { /* @@@ -6995,9 -6836,6 +6995,9 @@@ void perf_prepare_sample(struct perf_ev if (sample_type & PERF_SAMPLE_BRANCH_STACK) { int size = sizeof(u64); /* nr */ if (data->br_stack) { + if (perf_sample_save_hw_index(event)) + size += sizeof(u64); + size += data->br_stack->nr * sizeof(struct perf_branch_entry); } @@@ -8417,23 -8255,22 +8417,22 @@@ static void perf_event_bpf_emit_ksymbol enum perf_bpf_event_type type) { bool unregister = type == PERF_BPF_EVENT_PROG_UNLOAD; - char sym[KSYM_NAME_LEN]; int i;
if (prog->aux->func_cnt == 0) { - bpf_get_prog_name(prog, sym); perf_event_ksymbol(PERF_RECORD_KSYMBOL_TYPE_BPF, (u64)(unsigned long)prog->bpf_func, - prog->jited_len, unregister, sym); + prog->jited_len, unregister, + prog->aux->ksym.name); } else { for (i = 0; i < prog->aux->func_cnt; i++) { struct bpf_prog *subprog = prog->aux->func[i];
- bpf_get_prog_name(subprog, sym); perf_event_ksymbol( PERF_RECORD_KSYMBOL_TYPE_BPF, (u64)(unsigned long)subprog->bpf_func, - subprog->jited_len, unregister, sym); + subprog->jited_len, unregister, + prog->aux->ksym.name); } } } @@@ -9368,7 -9205,6 +9367,6 @@@ static void bpf_overflow_handler(struc int ret = 0;
ctx.regs = perf_arch_bpf_user_pt_regs(regs); - preempt_disable(); if (unlikely(__this_cpu_inc_return(bpf_prog_active) != 1)) goto out; rcu_read_lock(); @@@ -9376,7 -9212,6 +9374,6 @@@ rcu_read_unlock(); out: __this_cpu_dec(bpf_prog_active); - preempt_enable(); if (!ret) return;
@@@ -10511,9 -10346,6 +10508,9 @@@ skip_type cpuctx->online = cpumask_test_cpu(cpu, perf_online_mask);
__perf_mux_hrtimer_init(cpuctx, cpu); + + cpuctx->heap_size = ARRAY_SIZE(cpuctx->heap_default); + cpuctx->heap = cpuctx->heap_default; }
got_cpu_context: @@@ -10959,6 -10791,12 +10956,6 @@@ perf_event_alloc(struct perf_event_att if (!has_branch_stack(event)) event->attr.branch_sample_type = 0;
- if (cgroup_fd != -1) { - err = perf_cgroup_connect(cgroup_fd, event, attr, group_leader); - if (err) - goto err_ns; - } - pmu = perf_init_event(event); if (IS_ERR(pmu)) { err = PTR_ERR(pmu); @@@ -10980,12 -10818,6 +10977,12 @@@ goto err_pmu; }
+ if (cgroup_fd != -1) { + err = perf_cgroup_connect(cgroup_fd, event, attr, group_leader); + if (err) + goto err_pmu; + } + err = exclusive_event_init(event); if (err) goto err_pmu; @@@ -11046,12 -10878,12 +11043,12 @@@ err_per_task exclusive_event_destroy(event);
err_pmu: + if (is_cgroup_event(event)) + perf_detach_cgroup(event); if (event->destroy) event->destroy(event); module_put(pmu->module); err_ns: - if (is_cgroup_event(event)) - perf_detach_cgroup(event); if (event->ns) put_pid_ns(event->ns); if (event->hw.target) diff --combined kernel/seccomp.c index ec5c606bc3a1,787041eb011b..55a6184f5990 --- a/kernel/seccomp.c +++ b/kernel/seccomp.c @@@ -268,16 -268,14 +268,14 @@@ static u32 seccomp_run_filters(const st * All filters in the list are evaluated and the lowest BPF return * value always takes priority (ignoring the DATA). */ - preempt_disable(); for (; f; f = f->prev) { - u32 cur_ret = BPF_PROG_RUN(f->prog, sd); + u32 cur_ret = bpf_prog_run_pin_on_cpu(f->prog, sd);
if (ACTION_ONLY(cur_ret) < ACTION_ONLY(ret)) { ret = cur_ret; *match = f; } } - preempt_enable(); return ret; } #endif /* CONFIG_SECCOMP_FILTER */ @@@ -528,12 -526,8 +526,12 @@@ static long seccomp_attach_filter(unsig int ret;
ret = seccomp_can_sync_threads(); - if (ret) - return ret; + if (ret) { + if (flags & SECCOMP_FILTER_FLAG_TSYNC_ESRCH) + return -ESRCH; + else + return ret; + } }
/* Set log flag, if present. */ @@@ -1225,7 -1219,6 +1223,7 @@@ static const struct file_operations sec .poll = seccomp_notify_poll, .release = seccomp_notify_release, .unlocked_ioctl = seccomp_notify_ioctl, + .compat_ioctl = seccomp_notify_ioctl, };
static struct file *init_listener(struct seccomp_filter *filter) @@@ -1293,12 -1286,10 +1291,12 @@@ static long seccomp_set_mode_filter(uns * In the successful case, NEW_LISTENER returns the new listener fd. * But in the failure case, TSYNC returns the thread that died. If you * combine these two flags, there's no way to tell whether something - * succeeded or failed. So, let's disallow this combination. + * succeeded or failed. So, let's disallow this combination if the user + * has not explicitly requested no errors from TSYNC. */ if ((flags & SECCOMP_FILTER_FLAG_TSYNC) && - (flags & SECCOMP_FILTER_FLAG_NEW_LISTENER)) + (flags & SECCOMP_FILTER_FLAG_NEW_LISTENER) && + ((flags & SECCOMP_FILTER_FLAG_TSYNC_ESRCH) == 0)) return -EINVAL;
/* Prepare the new filter before holding any locks. */
linux-merge@lists.open-mesh.org