···5555the different fan speeds possible. Cooling states are referred to by5656single unsigned integers, where larger numbers mean greater heat5757dissipation. The precise set of cooling states associated with a device5858-(as referred to by the cooling-min-level and cooling-max-level5959-properties) should be defined in a particular device's binding.5858+should be defined in a particular device's binding.6059For more examples of cooling devices, refer to the example sections below.61606261Required properties:···6768 the maximum cooling state requested in the reference.6869 See Cooling device maps section below for more details6970 on how consumers refer to cooling devices.7070-7171-Optional properties:7272-- cooling-min-level: An integer indicating the smallest7373- Type: unsigned cooling state accepted. Typically 0.7474- Size: one cell7575-7676-- cooling-max-level: An integer indicating the largest7777- Type: unsigned cooling state accepted.7878- Size: one cell79718072* Trip points8173···216226 396000 950000217227 198000 850000218228 >;219219- cooling-min-level = <0>;220220- cooling-max-level = <3>;221229 #cooling-cells = <2>; /* min followed by max */222230 };223231 ...···229241 */230242 fan0: fan@48 {231243 ...232232- cooling-min-level = <0>;233233- cooling-max-level = <9>;234244 #cooling-cells = <2>; /* min followed by max */235245 };236246};
···11+Nuvoton NPCM7xx timer22+33+Nuvoton NPCM7xx have three timer modules, each timer module provides five 24-bit44+timer counters.55+66+Required properties:77+- compatible : "nuvoton,npcm750-timer" for Poleg NPCM750.88+- reg : Offset and length of the register set for the device.99+- interrupts : Contain the timer interrupt with flags for1010+ falling edge.1111+- clocks : phandle of timer reference clock (usually a 25 MHz clock).1212+1313+Example:1414+1515+timer@f0008000 {1616+ compatible = "nuvoton,npcm750-timer";1717+ interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;1818+ reg = <0xf0008000 0x50>;1919+ clocks = <&clk NPCM7XX_CLK_TIMER>;2020+};2121+
···1515- interrupts : Should be the clock event device interrupt.1616- clocks : The clocks provided by the SoC to drive the timer, must contain1717 an entry for each entry in clock-names.1818-- clock-names : Must include the following entries: "igp" and "per".1818+- clock-names : Must include the following entries: "ipg" and "per".19192020Example:2121tpm5: tpm@40260000 {
+29-12
Documentation/livepatch/shadow-vars.txt
···3434 - data[] - storage for shadow data35353636It is important to note that the klp_shadow_alloc() and3737-klp_shadow_get_or_alloc() calls, described below, store a *copy* of the3838-data that the functions are provided. Callers should provide whatever3939-mutual exclusion is required of the shadow data.3737+klp_shadow_get_or_alloc() are zeroing the variable by default.3838+They also allow to call a custom constructor function when a non-zero3939+value is needed. Callers should provide whatever mutual exclusion4040+is required.4141+4242+Note that the constructor is called under klp_shadow_lock spinlock. It allows4343+to do actions that can be done only once when a new variable is allocated.40444145* klp_shadow_get() - retrieve a shadow variable data pointer4246 - search hashtable for <obj, id> pair···5147 - WARN and return NULL5248 - if <obj, id> doesn't already exist5349 - allocate a new shadow variable5454- - copy data into the new shadow variable5050+ - initialize the variable using a custom constructor and data when provided5551 - add <obj, id> to the global hashtable56525753* klp_shadow_get_or_alloc() - get existing or alloc a new shadow variable···6056 - return existing shadow variable6157 - if <obj, id> doesn't already exist6258 - allocate a new shadow variable6363- - copy data into the new shadow variable5959+ - initialize the variable using a custom constructor and data when provided6460 - add <obj, id> pair to the global hashtable65616662* klp_shadow_free() - detach and free a <obj, id> shadow variable6763 - find and remove a <obj, id> reference from global hashtable6868- - if found, free shadow variable6464+ - if found6565+ - call destructor function if defined6666+ - free shadow variable69677068* klp_shadow_free_all() - detach and free all <*, id> shadow variables7169 - find and remove any <*, id> references from global hashtable7272- - if found, free shadow variable7070+ - if found7171+ - call destructor function if defined7272+ - free shadow variable7373747475752. Use cases···115107 sta = kzalloc(sizeof(*sta) + hw->sta_data_size, gfp);116108117109 /* Attach a corresponding shadow variable, then initialize it */118118- ps_lock = klp_shadow_alloc(sta, PS_LOCK, NULL, sizeof(*ps_lock), gfp);110110+ ps_lock = klp_shadow_alloc(sta, PS_LOCK, sizeof(*ps_lock), gfp,111111+ NULL, NULL);119112 if (!ps_lock)120113 goto shadow_fail;121114 spin_lock_init(ps_lock);···140131141132void sta_info_free(struct ieee80211_local *local, struct sta_info *sta)142133{143143- klp_shadow_free(sta, PS_LOCK);134134+ klp_shadow_free(sta, PS_LOCK, NULL);144135 kfree(sta);145136 ...146137···157148For commit 1d147bfa6429, a good spot to allocate a shadow spinlock is158149inside ieee80211_sta_ps_deliver_wakeup():159150151151+int ps_lock_shadow_ctor(void *obj, void *shadow_data, void *ctor_data)152152+{153153+ spinlock_t *lock = shadow_data;154154+155155+ spin_lock_init(lock);156156+ return 0;157157+}158158+160159#define PS_LOCK 1161160void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta)162161{163163- DEFINE_SPINLOCK(ps_lock_fallback);164162 spinlock_t *ps_lock;165163166164 /* sync with ieee80211_tx_h_unicast_ps_buf */167165 ps_lock = klp_shadow_get_or_alloc(sta, PS_LOCK,168168- &ps_lock_fallback, sizeof(ps_lock_fallback),169169- GFP_ATOMIC);166166+ sizeof(*ps_lock), GFP_ATOMIC,167167+ ps_lock_shadow_ctor, NULL);168168+170169 if (ps_lock)171170 spin_lock(ps_lock);172171 ...
+3-3
Documentation/networking/filter.txt
···169169BPF engine and instruction set170170------------------------------171171172172-Under tools/net/ there's a small helper tool called bpf_asm which can172172+Under tools/bpf/ there's a small helper tool called bpf_asm which can173173be used to write low-level filters for example scenarios mentioned in the174174previous section. Asm-like syntax mentioned here has been implemented in175175bpf_asm and will be used for further explanations (instead of dealing with···359359In particular, as usage with xt_bpf or cls_bpf can result in more complex BPF360360filters that might not be obvious at first, it's good to test filters before361361attaching to a live system. For that purpose, there's a small tool called362362-bpf_dbg under tools/net/ in the kernel source directory. This debugger allows362362+bpf_dbg under tools/bpf/ in the kernel source directory. This debugger allows363363for testing BPF filters against given pcap files, single stepping through the364364BPF code on the pcap's packets and to do BPF machine register dumps.365365···483483[ 3389.935851] JIT code: 00000030: 00 e8 28 94 ff e0 83 f8 01 75 07 b8 ff ff 00 00484484[ 3389.935852] JIT code: 00000040: eb 02 31 c0 c9 c3485485486486-In the kernel source tree under tools/net/, there's bpf_jit_disasm for486486+In the kernel source tree under tools/bpf/, there's bpf_jit_disasm for487487generating disassembly out of the kernel log's hexdump:488488489489# ./bpf_jit_disasm
+4-4
Documentation/networking/ip-sysctl.txt
···13901390 Default: 2 (as specified by RFC3810 9.1)13911391 Minimum: 1 (as specified by RFC6636 4.5)1392139213931393-max_dst_opts_cnt - INTEGER13931393+max_dst_opts_number - INTEGER13941394 Maximum number of non-padding TLVs allowed in a Destination13951395 options extension header. If this value is less than zero13961396 then unknown options are disallowed and the number of known13971397 TLVs allowed is the absolute value of this number.13981398 Default: 81399139914001400-max_hbh_opts_cnt - INTEGER14001400+max_hbh_opts_number - INTEGER14011401 Maximum number of non-padding TLVs allowed in a Hop-by-Hop14021402 options extension header. If this value is less than zero14031403 then unknown options are disallowed and the number of known14041404 TLVs allowed is the absolute value of this number.14051405 Default: 81406140614071407-max dst_opts_len - INTEGER14071407+max_dst_opts_length - INTEGER14081408 Maximum length allowed for a Destination options extension14091409 header.14101410 Default: INT_MAX (unlimited)1411141114121412-max hbh_opts_len - INTEGER14121412+max_hbh_length - INTEGER14131413 Maximum length allowed for a Hop-by-Hop options extension14141414 header.14151415 Default: INT_MAX (unlimited)
+35-6
MAINTAINERS
···13731373F: drivers/net/ethernet/amd/am79c961a.*1374137413751375ARM/ENERGY MICRO (SILICON LABS) EFM32 SUPPORT13761376-M: Uwe Kleine-König <kernel@pengutronix.de>13761376+M: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>13771377+R: Pengutronix Kernel Team <kernel@pengutronix.de>13771378L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)13781379S: Maintained13791380N: efm32···1402140114031402ARM/FREESCALE IMX / MXC ARM ARCHITECTURE14041403M: Shawn Guo <shawnguo@kernel.org>14051405-M: Sascha Hauer <kernel@pengutronix.de>14041404+M: Sascha Hauer <s.hauer@pengutronix.de>14051405+R: Pengutronix Kernel Team <kernel@pengutronix.de>14061406R: Fabio Estevam <fabio.estevam@nxp.com>14071407L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)14081408S: Maintained···1418141614191417ARM/FREESCALE VYBRID ARM ARCHITECTURE14201418M: Shawn Guo <shawnguo@kernel.org>14211421-M: Sascha Hauer <kernel@pengutronix.de>14191419+M: Sascha Hauer <s.hauer@pengutronix.de>14201420+R: Pengutronix Kernel Team <kernel@pengutronix.de>14221421R: Stefan Agner <stefan@agner.ch>14231422L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)14241423S: Maintained···4248424542494246DEVICE DIRECT ACCESS (DAX)42504247M: Dan Williams <dan.j.williams@intel.com>42484248+M: Dave Jiang <dave.jiang@intel.com>42494249+M: Ross Zwisler <ross.zwisler@linux.intel.com>42504250+M: Vishal Verma <vishal.l.verma@intel.com>42514251L: linux-nvdimm@lists.01.org42524252S: Supported42534253F: drivers/dax/···56585652F: Documentation/devicetree/bindings/net/fsl-fec.txt5659565356605654FREESCALE IMX / MXC FRAMEBUFFER DRIVER56615661-M: Sascha Hauer <kernel@pengutronix.de>56555655+M: Sascha Hauer <s.hauer@pengutronix.de>56565656+R: Pengutronix Kernel Team <kernel@pengutronix.de>56625657L: linux-fbdev@vger.kernel.org56635658L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)56645659S: Maintained···57905783F: fs/crypto/57915784F: include/linux/fscrypt*.h57925785F: Documentation/filesystems/fscrypt.rst57865786+57875787+FSNOTIFY: FILESYSTEM NOTIFICATION INFRASTRUCTURE57885788+M: Jan Kara <jack@suse.cz>57895789+R: Amir Goldstein <amir73il@gmail.com>57905790+L: linux-fsdevel@vger.kernel.org57915791+S: Maintained57925792+F: fs/notify/57935793+F: include/linux/fsnotify*.h5793579457945795FUJITSU LAPTOP EXTRAS57955796M: Jonathan Woithe <jwoithe@just42.net>···62716256F: drivers/media/usb/hdpvr/6272625762736258HEWLETT PACKARD ENTERPRISE ILO NMI WATCHDOG DRIVER62746274-M: Jimmy Vance <jimmy.vance@hpe.com>62596259+M: Jerry Hoemann <jerry.hoemann@hpe.com>62756260S: Supported62766261F: Documentation/watchdog/hpwdt.txt62776262F: drivers/watchdog/hpwdt.c···8063804880648049LIBNVDIMM BLK: MMIO-APERTURE DRIVER80658050M: Ross Zwisler <ross.zwisler@linux.intel.com>80518051+M: Dan Williams <dan.j.williams@intel.com>80528052+M: Vishal Verma <vishal.l.verma@intel.com>80538053+M: Dave Jiang <dave.jiang@intel.com>80668054L: linux-nvdimm@lists.01.org80678055Q: https://patchwork.kernel.org/project/linux-nvdimm/list/80688056S: Supported···8074805680758057LIBNVDIMM BTT: BLOCK TRANSLATION TABLE80768058M: Vishal Verma <vishal.l.verma@intel.com>80598059+M: Dan Williams <dan.j.williams@intel.com>80608060+M: Ross Zwisler <ross.zwisler@linux.intel.com>80618061+M: Dave Jiang <dave.jiang@intel.com>80778062L: linux-nvdimm@lists.01.org80788063Q: https://patchwork.kernel.org/project/linux-nvdimm/list/80798064S: Supported···8084806380858064LIBNVDIMM PMEM: PERSISTENT MEMORY DRIVER80868065M: Ross Zwisler <ross.zwisler@linux.intel.com>80668066+M: Dan Williams <dan.j.williams@intel.com>80678067+M: Vishal Verma <vishal.l.verma@intel.com>80688068+M: Dave Jiang <dave.jiang@intel.com>80878069L: linux-nvdimm@lists.01.org80888070Q: https://patchwork.kernel.org/project/linux-nvdimm/list/80898071S: Supported···8102807881038079LIBNVDIMM: NON-VOLATILE MEMORY DEVICE SUBSYSTEM81048080M: Dan Williams <dan.j.williams@intel.com>80818081+M: Ross Zwisler <ross.zwisler@linux.intel.com>80828082+M: Vishal Verma <vishal.l.verma@intel.com>80838083+M: Dave Jiang <dave.jiang@intel.com>81058084L: linux-nvdimm@lists.01.org81068085Q: https://patchwork.kernel.org/project/linux-nvdimm/list/81078086T: git git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git···97929765F: tools/testing/selftests/net/97939766F: lib/net_utils.c97949767F: lib/random32.c97689768+F: Documentation/networking/9795976997969770NETWORKING [IPSEC]97979771M: Steffen Klassert <steffen.klassert@secunet.com>···12844128161284512817SIOX1284612818M: Gavin Schenk <g.schenk@eckelmann.de>1284712847-M: Uwe Kleine-König <kernel@pengutronix.de>1281912819+M: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>1282012820+R: Pengutronix Kernel Team <kernel@pengutronix.de>1284812821S: Supported1284912822F: drivers/siox/*1285012823F: include/trace/events/siox.h
···366366 }367367368368 /* Force signals we don't understand to SIGKILL */369369- if (WARN_ON(signal != SIGKILL ||369369+ if (WARN_ON(signal != SIGKILL &&370370 siginfo_layout(signal, code) != SIL_FAULT)) {371371 signal = SIGKILL;372372 }
···553553#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE554554 lbz r0,HSTATE_HWTHREAD_STATE(r13)555555 cmpwi r0,KVM_HWTHREAD_IN_KERNEL556556- beq 1f556556+ beq 0f557557 li r0,KVM_HWTHREAD_IN_KERNEL558558 stb r0,HSTATE_HWTHREAD_STATE(r13)559559 /* Order setting hwthread_state vs. testing hwthread_req */560560 sync561561- lbz r0,HSTATE_HWTHREAD_REQ(r13)561561+0: lbz r0,HSTATE_HWTHREAD_REQ(r13)562562 cmpwi r0,0563563 beq 1f564564 b kvm_start_guest
+11
arch/powerpc/kernel/setup_64.c
···890890 return;891891892892 l1d_size = ppc64_caches.l1d.size;893893+894894+ /*895895+ * If there is no d-cache-size property in the device tree, l1d_size896896+ * could be zero. That leads to the loop in the asm wrapping around to897897+ * 2^64-1, and then walking off the end of the fallback area and898898+ * eventually causing a page fault which is fatal. Just default to899899+ * something vaguely sane.900900+ */901901+ if (!l1d_size)902902+ l1d_size = (64 * 1024);903903+893904 limit = min(ppc64_bolted_size(), ppc64_rma_size);894905895906 /*
+1-1
arch/powerpc/lib/feature-fixups.c
···5555 unsigned int *target = (unsigned int *)branch_target(src);56565757 /* Branch within the section doesn't need translating */5858- if (target < alt_start || target >= alt_end) {5858+ if (target < alt_start || target > alt_end) {5959 instr = translate_branch(dest, src);6060 if (!instr)6161 return 1;
···389389 if (xive_pool_vps == XIVE_INVALID_VP)390390 return;391391392392+ /* Check if pool VP already active, if it is, pull it */393393+ if (in_be32(xive_tima + TM_QW2_HV_POOL + TM_WORD2) & TM_QW2W2_VP)394394+ in_be64(xive_tima + TM_SPC_PULL_POOL_CTX);395395+392396 /* Enable the pool VP */393397 vp = xive_pool_vps + cpu;394398 pr_debug("CPU %d setting up pool VP 0x%x\n", cpu, vp);
···4747config ARCH_SUPPORTS_DEBUG_PAGEALLOC4848 def_bool y49495050-config KEXEC5151- def_bool y5252- select KEXEC_CORE5353-5450config AUDIT_ARCH5551 def_bool y5652···286290 older machines.287291288292config MARCH_Z14289289- bool "IBM z14"293293+ bool "IBM z14 ZR1 and z14"290294 select HAVE_MARCH_Z14_FEATURES291295 help292292- Select this to enable optimizations for IBM z14 (3906 series).293293- The kernel will be slightly faster but will not work on older294294- machines.296296+ Select this to enable optimizations for IBM z14 ZR1 and z14 (3907297297+ and 3906 series). The kernel will be slightly faster but will not298298+ work on older machines.295299296300endchoice297301···520524source kernel/Kconfig.preempt521525522526source kernel/Kconfig.hz527527+528528+config KEXEC529529+ def_bool y530530+ select KEXEC_CORE531531+532532+config KEXEC_FILE533533+ bool "kexec file based system call"534534+ select KEXEC_CORE535535+ select BUILD_BIN2C536536+ depends on CRYPTO537537+ depends on CRYPTO_SHA256538538+ depends on CRYPTO_SHA256_S390539539+ help540540+ Enable the kexec file based system call. In contrast to the normal541541+ kexec system call this system call takes file descriptors for the542542+ kernel and initramfs as arguments.543543+544544+config ARCH_HAS_KEXEC_PURGATORY545545+ def_bool y546546+ depends on KEXEC_FILE523547524548config ARCH_RANDOM525549 def_bool y
-6
arch/s390/boot/Makefile
···33# Makefile for the linux s390-specific parts of the memory manager.44#5566-COMPILE_VERSION := __linux_compile_version_id__`hostname | \77- tr -c '[0-9A-Za-z]' '_'`__`date | \88- tr -c '[0-9A-Za-z]' '_'`_t99-1010-ccflags-y := -DCOMPILE_VERSION=$(COMPILE_VERSION) -gstabs -I.1111-126targets := image137targets += bzImage148subdir- := compressed
···2424CONFIG_CGROUP_DEVICE=y2525CONFIG_CGROUP_CPUACCT=y2626CONFIG_CGROUP_PERF=y2727-CONFIG_CHECKPOINT_RESTORE=y2827CONFIG_NAMESPACES=y2928CONFIG_USER_NS=y3029CONFIG_SCHED_AUTOGROUP=y3130CONFIG_BLK_DEV_INITRD=y3231CONFIG_EXPERT=y3332# CONFIG_SYSFS_SYSCALL is not set3333+CONFIG_CHECKPOINT_RESTORE=y3434CONFIG_BPF_SYSCALL=y3535CONFIG_USERFAULTFD=y3636# CONFIG_COMPAT_BRK is not set···5959CONFIG_DEFAULT_DEADLINE=y6060CONFIG_LIVEPATCH=y6161CONFIG_TUNE_ZEC12=y6262-CONFIG_NR_CPUS=2566262+CONFIG_NR_CPUS=5126363CONFIG_NUMA=y6464CONFIG_PREEMPT=y6565CONFIG_HZ_100=y6666+CONFIG_KEXEC_FILE=y6667CONFIG_MEMORY_HOTPLUG=y6768CONFIG_MEMORY_HOTREMOVE=y6869CONFIG_KSM=y···306305CONFIG_IP6_NF_NAT=m307306CONFIG_IP6_NF_TARGET_MASQUERADE=m308307CONFIG_NF_TABLES_BRIDGE=m309309-CONFIG_NET_SCTPPROBE=m310308CONFIG_RDS=m311309CONFIG_RDS_RDMA=m312310CONFIG_RDS_TCP=m···364364CONFIG_NET_ACT_SKBEDIT=m365365CONFIG_NET_ACT_CSUM=m366366CONFIG_DNS_RESOLVER=y367367+CONFIG_OPENVSWITCH=m367368CONFIG_NETLINK_DIAG=m368369CONFIG_CGROUP_NET_PRIO=y369370CONFIG_BPF_JIT=y370371CONFIG_NET_PKTGEN=m371371-CONFIG_NET_TCPPROBE=m372372CONFIG_DEVTMPFS=y373373CONFIG_DMA_CMA=y374374CONFIG_CMA_SIZE_MBYTES=0···380380CONFIG_BLK_DEV_NBD=m381381CONFIG_BLK_DEV_RAM=y382382CONFIG_BLK_DEV_RAM_SIZE=32768383383-CONFIG_BLK_DEV_RAM_DAX=y384383CONFIG_VIRTIO_BLK=y385384CONFIG_BLK_DEV_RBD=m385385+CONFIG_BLK_DEV_NVME=m386386CONFIG_ENCLOSURE_SERVICES=m387387CONFIG_GENWQE=m388388CONFIG_RAID_ATTRS=m···461461CONFIG_PPPOL2TP=m462462CONFIG_PPP_ASYNC=m463463CONFIG_PPP_SYNC_TTY=m464464+CONFIG_INPUT_EVDEV=y464465# CONFIG_INPUT_KEYBOARD is not set465466# CONFIG_INPUT_MOUSE is not set466467# CONFIG_SERIO is not set···475474CONFIG_WATCHDOG_NOWAYOUT=y476475CONFIG_SOFT_WATCHDOG=m477476CONFIG_DIAG288_WATCHDOG=m477477+CONFIG_DRM=y478478+CONFIG_DRM_VIRTIO_GPU=y479479+CONFIG_FRAMEBUFFER_CONSOLE=y478480# CONFIG_HID is not set479481# CONFIG_USB_SUPPORT is not set480482CONFIG_INFINIBAND=m···486482CONFIG_MLX5_INFINIBAND=m487483CONFIG_VFIO=m488484CONFIG_VFIO_PCI=m485485+CONFIG_VIRTIO_PCI=m489486CONFIG_VIRTIO_BALLOON=m487487+CONFIG_VIRTIO_INPUT=y490488CONFIG_EXT4_FS=y491489CONFIG_EXT4_FS_POSIX_ACL=y492490CONFIG_EXT4_FS_SECURITY=y···647641CONFIG_TEST_BPF=m648642CONFIG_BUG_ON_DATA_CORRUPTION=y649643CONFIG_S390_PTDUMP=y644644+CONFIG_PERSISTENT_KEYRINGS=y645645+CONFIG_BIG_KEYS=y650646CONFIG_ENCRYPTED_KEYS=m651647CONFIG_SECURITY=y652648CONFIG_SECURITY_NETWORK=y···657649CONFIG_SECURITY_SELINUX_BOOTPARAM=y658650CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0659651CONFIG_SECURITY_SELINUX_DISABLE=y652652+CONFIG_INTEGRITY_SIGNATURE=y653653+CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y660654CONFIG_IMA=y655655+CONFIG_IMA_DEFAULT_HASH_SHA256=y656656+CONFIG_IMA_WRITE_POLICY=y661657CONFIG_IMA_APPRAISE=y662662-CONFIG_CRYPTO_RSA=m663658CONFIG_CRYPTO_DH=m664659CONFIG_CRYPTO_ECDH=m665660CONFIG_CRYPTO_USER=m661661+# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set666662CONFIG_CRYPTO_PCRYPT=m667663CONFIG_CRYPTO_CRYPTD=m668664CONFIG_CRYPTO_MCRYPTD=m669665CONFIG_CRYPTO_TEST=m670670-CONFIG_CRYPTO_GCM=m671666CONFIG_CRYPTO_CHACHA20POLY1305=m672667CONFIG_CRYPTO_LRW=m673668CONFIG_CRYPTO_PCBC=m···718707CONFIG_CRYPTO_AES_S390=m719708CONFIG_CRYPTO_GHASH_S390=m720709CONFIG_CRYPTO_CRC32_S390=y721721-CONFIG_ASYMMETRIC_KEY_TYPE=y722722-CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m723723-CONFIG_X509_CERTIFICATE_PARSER=m710710+CONFIG_PKCS7_MESSAGE_PARSER=y711711+CONFIG_SYSTEM_TRUSTED_KEYRING=y724712CONFIG_CRC7=m725713CONFIG_CRC8=m726714CONFIG_RANDOM32_SELFTEST=y
-661
arch/s390/configs/gcov_defconfig
···11-CONFIG_SYSVIPC=y22-CONFIG_POSIX_MQUEUE=y33-CONFIG_AUDIT=y44-CONFIG_NO_HZ_IDLE=y55-CONFIG_HIGH_RES_TIMERS=y66-CONFIG_BSD_PROCESS_ACCT=y77-CONFIG_BSD_PROCESS_ACCT_V3=y88-CONFIG_TASKSTATS=y99-CONFIG_TASK_DELAY_ACCT=y1010-CONFIG_TASK_XACCT=y1111-CONFIG_TASK_IO_ACCOUNTING=y1212-CONFIG_IKCONFIG=y1313-CONFIG_IKCONFIG_PROC=y1414-CONFIG_NUMA_BALANCING=y1515-# CONFIG_NUMA_BALANCING_DEFAULT_ENABLED is not set1616-CONFIG_MEMCG=y1717-CONFIG_MEMCG_SWAP=y1818-CONFIG_BLK_CGROUP=y1919-CONFIG_CFS_BANDWIDTH=y2020-CONFIG_RT_GROUP_SCHED=y2121-CONFIG_CGROUP_PIDS=y2222-CONFIG_CGROUP_FREEZER=y2323-CONFIG_CGROUP_HUGETLB=y2424-CONFIG_CPUSETS=y2525-CONFIG_CGROUP_DEVICE=y2626-CONFIG_CGROUP_CPUACCT=y2727-CONFIG_CGROUP_PERF=y2828-CONFIG_CHECKPOINT_RESTORE=y2929-CONFIG_NAMESPACES=y3030-CONFIG_USER_NS=y3131-CONFIG_SCHED_AUTOGROUP=y3232-CONFIG_BLK_DEV_INITRD=y3333-CONFIG_EXPERT=y3434-# CONFIG_SYSFS_SYSCALL is not set3535-CONFIG_BPF_SYSCALL=y3636-CONFIG_USERFAULTFD=y3737-# CONFIG_COMPAT_BRK is not set3838-CONFIG_PROFILING=y3939-CONFIG_OPROFILE=m4040-CONFIG_KPROBES=y4141-CONFIG_JUMP_LABEL=y4242-CONFIG_GCOV_KERNEL=y4343-CONFIG_GCOV_PROFILE_ALL=y4444-CONFIG_MODULES=y4545-CONFIG_MODULE_FORCE_LOAD=y4646-CONFIG_MODULE_UNLOAD=y4747-CONFIG_MODULE_FORCE_UNLOAD=y4848-CONFIG_MODVERSIONS=y4949-CONFIG_MODULE_SRCVERSION_ALL=y5050-CONFIG_BLK_DEV_INTEGRITY=y5151-CONFIG_BLK_DEV_THROTTLING=y5252-CONFIG_BLK_WBT=y5353-CONFIG_BLK_WBT_SQ=y5454-CONFIG_PARTITION_ADVANCED=y5555-CONFIG_IBM_PARTITION=y5656-CONFIG_BSD_DISKLABEL=y5757-CONFIG_MINIX_SUBPARTITION=y5858-CONFIG_SOLARIS_X86_PARTITION=y5959-CONFIG_UNIXWARE_DISKLABEL=y6060-CONFIG_CFQ_GROUP_IOSCHED=y6161-CONFIG_DEFAULT_DEADLINE=y6262-CONFIG_LIVEPATCH=y6363-CONFIG_TUNE_ZEC12=y6464-CONFIG_NR_CPUS=5126565-CONFIG_NUMA=y6666-CONFIG_HZ_100=y6767-CONFIG_MEMORY_HOTPLUG=y6868-CONFIG_MEMORY_HOTREMOVE=y6969-CONFIG_KSM=y7070-CONFIG_TRANSPARENT_HUGEPAGE=y7171-CONFIG_CLEANCACHE=y7272-CONFIG_FRONTSWAP=y7373-CONFIG_MEM_SOFT_DIRTY=y7474-CONFIG_ZSWAP=y7575-CONFIG_ZBUD=m7676-CONFIG_ZSMALLOC=m7777-CONFIG_ZSMALLOC_STAT=y7878-CONFIG_DEFERRED_STRUCT_PAGE_INIT=y7979-CONFIG_IDLE_PAGE_TRACKING=y8080-CONFIG_PCI=y8181-CONFIG_HOTPLUG_PCI=y8282-CONFIG_HOTPLUG_PCI_S390=y8383-CONFIG_CHSC_SCH=y8484-CONFIG_CRASH_DUMP=y8585-CONFIG_BINFMT_MISC=m8686-CONFIG_HIBERNATION=y8787-CONFIG_NET=y8888-CONFIG_PACKET=y8989-CONFIG_PACKET_DIAG=m9090-CONFIG_UNIX=y9191-CONFIG_UNIX_DIAG=m9292-CONFIG_XFRM_USER=m9393-CONFIG_NET_KEY=m9494-CONFIG_SMC=m9595-CONFIG_SMC_DIAG=m9696-CONFIG_INET=y9797-CONFIG_IP_MULTICAST=y9898-CONFIG_IP_ADVANCED_ROUTER=y9999-CONFIG_IP_MULTIPLE_TABLES=y100100-CONFIG_IP_ROUTE_MULTIPATH=y101101-CONFIG_IP_ROUTE_VERBOSE=y102102-CONFIG_NET_IPIP=m103103-CONFIG_NET_IPGRE_DEMUX=m104104-CONFIG_NET_IPGRE=m105105-CONFIG_NET_IPGRE_BROADCAST=y106106-CONFIG_IP_MROUTE=y107107-CONFIG_IP_MROUTE_MULTIPLE_TABLES=y108108-CONFIG_IP_PIMSM_V1=y109109-CONFIG_IP_PIMSM_V2=y110110-CONFIG_SYN_COOKIES=y111111-CONFIG_NET_IPVTI=m112112-CONFIG_INET_AH=m113113-CONFIG_INET_ESP=m114114-CONFIG_INET_IPCOMP=m115115-CONFIG_INET_XFRM_MODE_TRANSPORT=m116116-CONFIG_INET_XFRM_MODE_TUNNEL=m117117-CONFIG_INET_XFRM_MODE_BEET=m118118-CONFIG_INET_DIAG=m119119-CONFIG_INET_UDP_DIAG=m120120-CONFIG_TCP_CONG_ADVANCED=y121121-CONFIG_TCP_CONG_HSTCP=m122122-CONFIG_TCP_CONG_HYBLA=m123123-CONFIG_TCP_CONG_SCALABLE=m124124-CONFIG_TCP_CONG_LP=m125125-CONFIG_TCP_CONG_VENO=m126126-CONFIG_TCP_CONG_YEAH=m127127-CONFIG_TCP_CONG_ILLINOIS=m128128-CONFIG_IPV6_ROUTER_PREF=y129129-CONFIG_INET6_AH=m130130-CONFIG_INET6_ESP=m131131-CONFIG_INET6_IPCOMP=m132132-CONFIG_IPV6_MIP6=m133133-CONFIG_INET6_XFRM_MODE_TRANSPORT=m134134-CONFIG_INET6_XFRM_MODE_TUNNEL=m135135-CONFIG_INET6_XFRM_MODE_BEET=m136136-CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m137137-CONFIG_IPV6_VTI=m138138-CONFIG_IPV6_SIT=m139139-CONFIG_IPV6_GRE=m140140-CONFIG_IPV6_MULTIPLE_TABLES=y141141-CONFIG_IPV6_SUBTREES=y142142-CONFIG_NETFILTER=y143143-CONFIG_NF_CONNTRACK=m144144-CONFIG_NF_CONNTRACK_SECMARK=y145145-CONFIG_NF_CONNTRACK_EVENTS=y146146-CONFIG_NF_CONNTRACK_TIMEOUT=y147147-CONFIG_NF_CONNTRACK_TIMESTAMP=y148148-CONFIG_NF_CONNTRACK_AMANDA=m149149-CONFIG_NF_CONNTRACK_FTP=m150150-CONFIG_NF_CONNTRACK_H323=m151151-CONFIG_NF_CONNTRACK_IRC=m152152-CONFIG_NF_CONNTRACK_NETBIOS_NS=m153153-CONFIG_NF_CONNTRACK_SNMP=m154154-CONFIG_NF_CONNTRACK_PPTP=m155155-CONFIG_NF_CONNTRACK_SANE=m156156-CONFIG_NF_CONNTRACK_SIP=m157157-CONFIG_NF_CONNTRACK_TFTP=m158158-CONFIG_NF_CT_NETLINK=m159159-CONFIG_NF_CT_NETLINK_TIMEOUT=m160160-CONFIG_NF_TABLES=m161161-CONFIG_NFT_EXTHDR=m162162-CONFIG_NFT_META=m163163-CONFIG_NFT_CT=m164164-CONFIG_NFT_COUNTER=m165165-CONFIG_NFT_LOG=m166166-CONFIG_NFT_LIMIT=m167167-CONFIG_NFT_NAT=m168168-CONFIG_NFT_COMPAT=m169169-CONFIG_NFT_HASH=m170170-CONFIG_NETFILTER_XT_SET=m171171-CONFIG_NETFILTER_XT_TARGET_AUDIT=m172172-CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m173173-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m174174-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m175175-CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m176176-CONFIG_NETFILTER_XT_TARGET_CT=m177177-CONFIG_NETFILTER_XT_TARGET_DSCP=m178178-CONFIG_NETFILTER_XT_TARGET_HMARK=m179179-CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m180180-CONFIG_NETFILTER_XT_TARGET_LOG=m181181-CONFIG_NETFILTER_XT_TARGET_MARK=m182182-CONFIG_NETFILTER_XT_TARGET_NFLOG=m183183-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m184184-CONFIG_NETFILTER_XT_TARGET_TEE=m185185-CONFIG_NETFILTER_XT_TARGET_TPROXY=m186186-CONFIG_NETFILTER_XT_TARGET_TRACE=m187187-CONFIG_NETFILTER_XT_TARGET_SECMARK=m188188-CONFIG_NETFILTER_XT_TARGET_TCPMSS=m189189-CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m190190-CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m191191-CONFIG_NETFILTER_XT_MATCH_BPF=m192192-CONFIG_NETFILTER_XT_MATCH_CLUSTER=m193193-CONFIG_NETFILTER_XT_MATCH_COMMENT=m194194-CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m195195-CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m196196-CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m197197-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m198198-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m199199-CONFIG_NETFILTER_XT_MATCH_CPU=m200200-CONFIG_NETFILTER_XT_MATCH_DCCP=m201201-CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m202202-CONFIG_NETFILTER_XT_MATCH_DSCP=m203203-CONFIG_NETFILTER_XT_MATCH_ESP=m204204-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m205205-CONFIG_NETFILTER_XT_MATCH_HELPER=m206206-CONFIG_NETFILTER_XT_MATCH_IPRANGE=m207207-CONFIG_NETFILTER_XT_MATCH_IPVS=m208208-CONFIG_NETFILTER_XT_MATCH_LENGTH=m209209-CONFIG_NETFILTER_XT_MATCH_LIMIT=m210210-CONFIG_NETFILTER_XT_MATCH_MAC=m211211-CONFIG_NETFILTER_XT_MATCH_MARK=m212212-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m213213-CONFIG_NETFILTER_XT_MATCH_NFACCT=m214214-CONFIG_NETFILTER_XT_MATCH_OSF=m215215-CONFIG_NETFILTER_XT_MATCH_OWNER=m216216-CONFIG_NETFILTER_XT_MATCH_POLICY=m217217-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m218218-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m219219-CONFIG_NETFILTER_XT_MATCH_QUOTA=m220220-CONFIG_NETFILTER_XT_MATCH_RATEEST=m221221-CONFIG_NETFILTER_XT_MATCH_REALM=m222222-CONFIG_NETFILTER_XT_MATCH_RECENT=m223223-CONFIG_NETFILTER_XT_MATCH_STATE=m224224-CONFIG_NETFILTER_XT_MATCH_STATISTIC=m225225-CONFIG_NETFILTER_XT_MATCH_STRING=m226226-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m227227-CONFIG_NETFILTER_XT_MATCH_TIME=m228228-CONFIG_NETFILTER_XT_MATCH_U32=m229229-CONFIG_IP_SET=m230230-CONFIG_IP_SET_BITMAP_IP=m231231-CONFIG_IP_SET_BITMAP_IPMAC=m232232-CONFIG_IP_SET_BITMAP_PORT=m233233-CONFIG_IP_SET_HASH_IP=m234234-CONFIG_IP_SET_HASH_IPPORT=m235235-CONFIG_IP_SET_HASH_IPPORTIP=m236236-CONFIG_IP_SET_HASH_IPPORTNET=m237237-CONFIG_IP_SET_HASH_NETPORTNET=m238238-CONFIG_IP_SET_HASH_NET=m239239-CONFIG_IP_SET_HASH_NETNET=m240240-CONFIG_IP_SET_HASH_NETPORT=m241241-CONFIG_IP_SET_HASH_NETIFACE=m242242-CONFIG_IP_SET_LIST_SET=m243243-CONFIG_IP_VS=m244244-CONFIG_IP_VS_PROTO_TCP=y245245-CONFIG_IP_VS_PROTO_UDP=y246246-CONFIG_IP_VS_PROTO_ESP=y247247-CONFIG_IP_VS_PROTO_AH=y248248-CONFIG_IP_VS_RR=m249249-CONFIG_IP_VS_WRR=m250250-CONFIG_IP_VS_LC=m251251-CONFIG_IP_VS_WLC=m252252-CONFIG_IP_VS_LBLC=m253253-CONFIG_IP_VS_LBLCR=m254254-CONFIG_IP_VS_DH=m255255-CONFIG_IP_VS_SH=m256256-CONFIG_IP_VS_SED=m257257-CONFIG_IP_VS_NQ=m258258-CONFIG_IP_VS_FTP=m259259-CONFIG_IP_VS_PE_SIP=m260260-CONFIG_NF_CONNTRACK_IPV4=m261261-CONFIG_NF_TABLES_IPV4=m262262-CONFIG_NFT_CHAIN_ROUTE_IPV4=m263263-CONFIG_NF_TABLES_ARP=m264264-CONFIG_NFT_CHAIN_NAT_IPV4=m265265-CONFIG_IP_NF_IPTABLES=m266266-CONFIG_IP_NF_MATCH_AH=m267267-CONFIG_IP_NF_MATCH_ECN=m268268-CONFIG_IP_NF_MATCH_RPFILTER=m269269-CONFIG_IP_NF_MATCH_TTL=m270270-CONFIG_IP_NF_FILTER=m271271-CONFIG_IP_NF_TARGET_REJECT=m272272-CONFIG_IP_NF_NAT=m273273-CONFIG_IP_NF_TARGET_MASQUERADE=m274274-CONFIG_IP_NF_MANGLE=m275275-CONFIG_IP_NF_TARGET_CLUSTERIP=m276276-CONFIG_IP_NF_TARGET_ECN=m277277-CONFIG_IP_NF_TARGET_TTL=m278278-CONFIG_IP_NF_RAW=m279279-CONFIG_IP_NF_SECURITY=m280280-CONFIG_IP_NF_ARPTABLES=m281281-CONFIG_IP_NF_ARPFILTER=m282282-CONFIG_IP_NF_ARP_MANGLE=m283283-CONFIG_NF_CONNTRACK_IPV6=m284284-CONFIG_NF_TABLES_IPV6=m285285-CONFIG_NFT_CHAIN_ROUTE_IPV6=m286286-CONFIG_NFT_CHAIN_NAT_IPV6=m287287-CONFIG_IP6_NF_IPTABLES=m288288-CONFIG_IP6_NF_MATCH_AH=m289289-CONFIG_IP6_NF_MATCH_EUI64=m290290-CONFIG_IP6_NF_MATCH_FRAG=m291291-CONFIG_IP6_NF_MATCH_OPTS=m292292-CONFIG_IP6_NF_MATCH_HL=m293293-CONFIG_IP6_NF_MATCH_IPV6HEADER=m294294-CONFIG_IP6_NF_MATCH_MH=m295295-CONFIG_IP6_NF_MATCH_RPFILTER=m296296-CONFIG_IP6_NF_MATCH_RT=m297297-CONFIG_IP6_NF_TARGET_HL=m298298-CONFIG_IP6_NF_FILTER=m299299-CONFIG_IP6_NF_TARGET_REJECT=m300300-CONFIG_IP6_NF_MANGLE=m301301-CONFIG_IP6_NF_RAW=m302302-CONFIG_IP6_NF_SECURITY=m303303-CONFIG_IP6_NF_NAT=m304304-CONFIG_IP6_NF_TARGET_MASQUERADE=m305305-CONFIG_NF_TABLES_BRIDGE=m306306-CONFIG_NET_SCTPPROBE=m307307-CONFIG_RDS=m308308-CONFIG_RDS_RDMA=m309309-CONFIG_RDS_TCP=m310310-CONFIG_L2TP=m311311-CONFIG_L2TP_DEBUGFS=m312312-CONFIG_L2TP_V3=y313313-CONFIG_L2TP_IP=m314314-CONFIG_L2TP_ETH=m315315-CONFIG_BRIDGE=m316316-CONFIG_VLAN_8021Q=m317317-CONFIG_VLAN_8021Q_GVRP=y318318-CONFIG_NET_SCHED=y319319-CONFIG_NET_SCH_CBQ=m320320-CONFIG_NET_SCH_HTB=m321321-CONFIG_NET_SCH_HFSC=m322322-CONFIG_NET_SCH_PRIO=m323323-CONFIG_NET_SCH_MULTIQ=m324324-CONFIG_NET_SCH_RED=m325325-CONFIG_NET_SCH_SFB=m326326-CONFIG_NET_SCH_SFQ=m327327-CONFIG_NET_SCH_TEQL=m328328-CONFIG_NET_SCH_TBF=m329329-CONFIG_NET_SCH_GRED=m330330-CONFIG_NET_SCH_DSMARK=m331331-CONFIG_NET_SCH_NETEM=m332332-CONFIG_NET_SCH_DRR=m333333-CONFIG_NET_SCH_MQPRIO=m334334-CONFIG_NET_SCH_CHOKE=m335335-CONFIG_NET_SCH_QFQ=m336336-CONFIG_NET_SCH_CODEL=m337337-CONFIG_NET_SCH_FQ_CODEL=m338338-CONFIG_NET_SCH_INGRESS=m339339-CONFIG_NET_SCH_PLUG=m340340-CONFIG_NET_CLS_BASIC=m341341-CONFIG_NET_CLS_TCINDEX=m342342-CONFIG_NET_CLS_ROUTE4=m343343-CONFIG_NET_CLS_FW=m344344-CONFIG_NET_CLS_U32=m345345-CONFIG_CLS_U32_PERF=y346346-CONFIG_CLS_U32_MARK=y347347-CONFIG_NET_CLS_RSVP=m348348-CONFIG_NET_CLS_RSVP6=m349349-CONFIG_NET_CLS_FLOW=m350350-CONFIG_NET_CLS_CGROUP=y351351-CONFIG_NET_CLS_BPF=m352352-CONFIG_NET_CLS_ACT=y353353-CONFIG_NET_ACT_POLICE=m354354-CONFIG_NET_ACT_GACT=m355355-CONFIG_GACT_PROB=y356356-CONFIG_NET_ACT_MIRRED=m357357-CONFIG_NET_ACT_IPT=m358358-CONFIG_NET_ACT_NAT=m359359-CONFIG_NET_ACT_PEDIT=m360360-CONFIG_NET_ACT_SIMP=m361361-CONFIG_NET_ACT_SKBEDIT=m362362-CONFIG_NET_ACT_CSUM=m363363-CONFIG_DNS_RESOLVER=y364364-CONFIG_NETLINK_DIAG=m365365-CONFIG_CGROUP_NET_PRIO=y366366-CONFIG_BPF_JIT=y367367-CONFIG_NET_PKTGEN=m368368-CONFIG_NET_TCPPROBE=m369369-CONFIG_DEVTMPFS=y370370-CONFIG_DMA_CMA=y371371-CONFIG_CMA_SIZE_MBYTES=0372372-CONFIG_CONNECTOR=y373373-CONFIG_ZRAM=m374374-CONFIG_BLK_DEV_LOOP=m375375-CONFIG_BLK_DEV_CRYPTOLOOP=m376376-CONFIG_BLK_DEV_DRBD=m377377-CONFIG_BLK_DEV_NBD=m378378-CONFIG_BLK_DEV_RAM=y379379-CONFIG_BLK_DEV_RAM_SIZE=32768380380-CONFIG_BLK_DEV_RAM_DAX=y381381-CONFIG_VIRTIO_BLK=y382382-CONFIG_ENCLOSURE_SERVICES=m383383-CONFIG_GENWQE=m384384-CONFIG_RAID_ATTRS=m385385-CONFIG_SCSI=y386386-CONFIG_BLK_DEV_SD=y387387-CONFIG_CHR_DEV_ST=m388388-CONFIG_CHR_DEV_OSST=m389389-CONFIG_BLK_DEV_SR=m390390-CONFIG_CHR_DEV_SG=y391391-CONFIG_CHR_DEV_SCH=m392392-CONFIG_SCSI_ENCLOSURE=m393393-CONFIG_SCSI_CONSTANTS=y394394-CONFIG_SCSI_LOGGING=y395395-CONFIG_SCSI_SPI_ATTRS=m396396-CONFIG_SCSI_FC_ATTRS=y397397-CONFIG_SCSI_SAS_LIBSAS=m398398-CONFIG_SCSI_SRP_ATTRS=m399399-CONFIG_ISCSI_TCP=m400400-CONFIG_SCSI_DEBUG=m401401-CONFIG_ZFCP=y402402-CONFIG_SCSI_VIRTIO=m403403-CONFIG_SCSI_DH=y404404-CONFIG_SCSI_DH_RDAC=m405405-CONFIG_SCSI_DH_HP_SW=m406406-CONFIG_SCSI_DH_EMC=m407407-CONFIG_SCSI_DH_ALUA=m408408-CONFIG_SCSI_OSD_INITIATOR=m409409-CONFIG_SCSI_OSD_ULD=m410410-CONFIG_MD=y411411-CONFIG_BLK_DEV_MD=y412412-CONFIG_MD_LINEAR=m413413-CONFIG_MD_MULTIPATH=m414414-CONFIG_MD_FAULTY=m415415-CONFIG_BLK_DEV_DM=m416416-CONFIG_DM_CRYPT=m417417-CONFIG_DM_SNAPSHOT=m418418-CONFIG_DM_THIN_PROVISIONING=m419419-CONFIG_DM_MIRROR=m420420-CONFIG_DM_LOG_USERSPACE=m421421-CONFIG_DM_RAID=m422422-CONFIG_DM_ZERO=m423423-CONFIG_DM_MULTIPATH=m424424-CONFIG_DM_MULTIPATH_QL=m425425-CONFIG_DM_MULTIPATH_ST=m426426-CONFIG_DM_DELAY=m427427-CONFIG_DM_UEVENT=y428428-CONFIG_DM_FLAKEY=m429429-CONFIG_DM_VERITY=m430430-CONFIG_DM_SWITCH=m431431-CONFIG_NETDEVICES=y432432-CONFIG_BONDING=m433433-CONFIG_DUMMY=m434434-CONFIG_EQUALIZER=m435435-CONFIG_IFB=m436436-CONFIG_MACVLAN=m437437-CONFIG_MACVTAP=m438438-CONFIG_VXLAN=m439439-CONFIG_TUN=m440440-CONFIG_VETH=m441441-CONFIG_VIRTIO_NET=m442442-CONFIG_NLMON=m443443-# CONFIG_NET_VENDOR_ARC is not set444444-# CONFIG_NET_VENDOR_CHELSIO is not set445445-# CONFIG_NET_VENDOR_INTEL is not set446446-# CONFIG_NET_VENDOR_MARVELL is not set447447-CONFIG_MLX4_EN=m448448-CONFIG_MLX5_CORE=m449449-CONFIG_MLX5_CORE_EN=y450450-# CONFIG_NET_VENDOR_NATSEMI is not set451451-CONFIG_PPP=m452452-CONFIG_PPP_BSDCOMP=m453453-CONFIG_PPP_DEFLATE=m454454-CONFIG_PPP_MPPE=m455455-CONFIG_PPPOE=m456456-CONFIG_PPTP=m457457-CONFIG_PPPOL2TP=m458458-CONFIG_PPP_ASYNC=m459459-CONFIG_PPP_SYNC_TTY=m460460-# CONFIG_INPUT_KEYBOARD is not set461461-# CONFIG_INPUT_MOUSE is not set462462-# CONFIG_SERIO is not set463463-CONFIG_LEGACY_PTY_COUNT=0464464-CONFIG_HW_RANDOM_VIRTIO=m465465-CONFIG_RAW_DRIVER=m466466-CONFIG_HANGCHECK_TIMER=m467467-CONFIG_TN3270_FS=y468468-# CONFIG_HWMON is not set469469-CONFIG_WATCHDOG=y470470-CONFIG_WATCHDOG_NOWAYOUT=y471471-CONFIG_SOFT_WATCHDOG=m472472-CONFIG_DIAG288_WATCHDOG=m473473-# CONFIG_HID is not set474474-# CONFIG_USB_SUPPORT is not set475475-CONFIG_INFINIBAND=m476476-CONFIG_INFINIBAND_USER_ACCESS=m477477-CONFIG_MLX4_INFINIBAND=m478478-CONFIG_MLX5_INFINIBAND=m479479-CONFIG_VFIO=m480480-CONFIG_VFIO_PCI=m481481-CONFIG_VIRTIO_BALLOON=m482482-CONFIG_EXT4_FS=y483483-CONFIG_EXT4_FS_POSIX_ACL=y484484-CONFIG_EXT4_FS_SECURITY=y485485-CONFIG_EXT4_ENCRYPTION=y486486-CONFIG_JBD2_DEBUG=y487487-CONFIG_JFS_FS=m488488-CONFIG_JFS_POSIX_ACL=y489489-CONFIG_JFS_SECURITY=y490490-CONFIG_JFS_STATISTICS=y491491-CONFIG_XFS_FS=y492492-CONFIG_XFS_QUOTA=y493493-CONFIG_XFS_POSIX_ACL=y494494-CONFIG_XFS_RT=y495495-CONFIG_GFS2_FS=m496496-CONFIG_GFS2_FS_LOCKING_DLM=y497497-CONFIG_OCFS2_FS=m498498-CONFIG_BTRFS_FS=y499499-CONFIG_BTRFS_FS_POSIX_ACL=y500500-CONFIG_NILFS2_FS=m501501-CONFIG_FS_DAX=y502502-CONFIG_EXPORTFS_BLOCK_OPS=y503503-CONFIG_FANOTIFY=y504504-CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y505505-CONFIG_QUOTA_NETLINK_INTERFACE=y506506-CONFIG_QFMT_V1=m507507-CONFIG_QFMT_V2=m508508-CONFIG_AUTOFS4_FS=m509509-CONFIG_FUSE_FS=y510510-CONFIG_CUSE=m511511-CONFIG_OVERLAY_FS=m512512-CONFIG_OVERLAY_FS_REDIRECT_DIR=y513513-CONFIG_FSCACHE=m514514-CONFIG_CACHEFILES=m515515-CONFIG_ISO9660_FS=y516516-CONFIG_JOLIET=y517517-CONFIG_ZISOFS=y518518-CONFIG_UDF_FS=m519519-CONFIG_MSDOS_FS=m520520-CONFIG_VFAT_FS=m521521-CONFIG_NTFS_FS=m522522-CONFIG_NTFS_RW=y523523-CONFIG_PROC_KCORE=y524524-CONFIG_TMPFS=y525525-CONFIG_TMPFS_POSIX_ACL=y526526-CONFIG_HUGETLBFS=y527527-CONFIG_CONFIGFS_FS=m528528-CONFIG_ECRYPT_FS=m529529-CONFIG_CRAMFS=m530530-CONFIG_SQUASHFS=m531531-CONFIG_SQUASHFS_XATTR=y532532-CONFIG_SQUASHFS_LZO=y533533-CONFIG_SQUASHFS_XZ=y534534-CONFIG_ROMFS_FS=m535535-CONFIG_NFS_FS=m536536-CONFIG_NFS_V3_ACL=y537537-CONFIG_NFS_V4=m538538-CONFIG_NFS_SWAP=y539539-CONFIG_NFSD=m540540-CONFIG_NFSD_V3_ACL=y541541-CONFIG_NFSD_V4=y542542-CONFIG_NFSD_V4_SECURITY_LABEL=y543543-CONFIG_CIFS=m544544-CONFIG_CIFS_STATS=y545545-CONFIG_CIFS_STATS2=y546546-CONFIG_CIFS_WEAK_PW_HASH=y547547-CONFIG_CIFS_UPCALL=y548548-CONFIG_CIFS_XATTR=y549549-CONFIG_CIFS_POSIX=y550550-# CONFIG_CIFS_DEBUG is not set551551-CONFIG_CIFS_DFS_UPCALL=y552552-CONFIG_NLS_DEFAULT="utf8"553553-CONFIG_NLS_CODEPAGE_437=m554554-CONFIG_NLS_CODEPAGE_850=m555555-CONFIG_NLS_ASCII=m556556-CONFIG_NLS_ISO8859_1=m557557-CONFIG_NLS_ISO8859_15=m558558-CONFIG_NLS_UTF8=m559559-CONFIG_DLM=m560560-CONFIG_PRINTK_TIME=y561561-CONFIG_DEBUG_INFO=y562562-CONFIG_DEBUG_INFO_DWARF4=y563563-CONFIG_GDB_SCRIPTS=y564564-# CONFIG_ENABLE_MUST_CHECK is not set565565-CONFIG_FRAME_WARN=1024566566-CONFIG_UNUSED_SYMBOLS=y567567-CONFIG_MAGIC_SYSRQ=y568568-CONFIG_DEBUG_MEMORY_INIT=y569569-CONFIG_PANIC_ON_OOPS=y570570-CONFIG_RCU_TORTURE_TEST=m571571-CONFIG_RCU_CPU_STALL_TIMEOUT=60572572-CONFIG_LATENCYTOP=y573573-CONFIG_SCHED_TRACER=y574574-CONFIG_FTRACE_SYSCALLS=y575575-CONFIG_STACK_TRACER=y576576-CONFIG_BLK_DEV_IO_TRACE=y577577-CONFIG_FUNCTION_PROFILER=y578578-CONFIG_HIST_TRIGGERS=y579579-CONFIG_LKDTM=m580580-CONFIG_PERCPU_TEST=m581581-CONFIG_ATOMIC64_SELFTEST=y582582-CONFIG_TEST_BPF=m583583-CONFIG_BUG_ON_DATA_CORRUPTION=y584584-CONFIG_S390_PTDUMP=y585585-CONFIG_PERSISTENT_KEYRINGS=y586586-CONFIG_BIG_KEYS=y587587-CONFIG_ENCRYPTED_KEYS=m588588-CONFIG_SECURITY=y589589-CONFIG_SECURITY_NETWORK=y590590-CONFIG_SECURITY_SELINUX=y591591-CONFIG_SECURITY_SELINUX_BOOTPARAM=y592592-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0593593-CONFIG_SECURITY_SELINUX_DISABLE=y594594-CONFIG_INTEGRITY_SIGNATURE=y595595-CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y596596-CONFIG_IMA=y597597-CONFIG_IMA_WRITE_POLICY=y598598-CONFIG_IMA_APPRAISE=y599599-CONFIG_CRYPTO_DH=m600600-CONFIG_CRYPTO_ECDH=m601601-CONFIG_CRYPTO_USER=m602602-# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set603603-CONFIG_CRYPTO_PCRYPT=m604604-CONFIG_CRYPTO_CRYPTD=m605605-CONFIG_CRYPTO_MCRYPTD=m606606-CONFIG_CRYPTO_TEST=m607607-CONFIG_CRYPTO_CHACHA20POLY1305=m608608-CONFIG_CRYPTO_LRW=m609609-CONFIG_CRYPTO_PCBC=m610610-CONFIG_CRYPTO_KEYWRAP=m611611-CONFIG_CRYPTO_XCBC=m612612-CONFIG_CRYPTO_VMAC=m613613-CONFIG_CRYPTO_CRC32=m614614-CONFIG_CRYPTO_MICHAEL_MIC=m615615-CONFIG_CRYPTO_RMD128=m616616-CONFIG_CRYPTO_RMD160=m617617-CONFIG_CRYPTO_RMD256=m618618-CONFIG_CRYPTO_RMD320=m619619-CONFIG_CRYPTO_SHA512=m620620-CONFIG_CRYPTO_SHA3=m621621-CONFIG_CRYPTO_TGR192=m622622-CONFIG_CRYPTO_WP512=m623623-CONFIG_CRYPTO_AES_TI=m624624-CONFIG_CRYPTO_ANUBIS=m625625-CONFIG_CRYPTO_BLOWFISH=m626626-CONFIG_CRYPTO_CAMELLIA=m627627-CONFIG_CRYPTO_CAST5=m628628-CONFIG_CRYPTO_CAST6=m629629-CONFIG_CRYPTO_FCRYPT=m630630-CONFIG_CRYPTO_KHAZAD=m631631-CONFIG_CRYPTO_SALSA20=m632632-CONFIG_CRYPTO_SEED=m633633-CONFIG_CRYPTO_SERPENT=m634634-CONFIG_CRYPTO_TEA=m635635-CONFIG_CRYPTO_TWOFISH=m636636-CONFIG_CRYPTO_842=m637637-CONFIG_CRYPTO_LZ4=m638638-CONFIG_CRYPTO_LZ4HC=m639639-CONFIG_CRYPTO_ANSI_CPRNG=m640640-CONFIG_CRYPTO_USER_API_HASH=m641641-CONFIG_CRYPTO_USER_API_SKCIPHER=m642642-CONFIG_CRYPTO_USER_API_RNG=m643643-CONFIG_CRYPTO_USER_API_AEAD=m644644-CONFIG_ZCRYPT=m645645-CONFIG_PKEY=m646646-CONFIG_CRYPTO_PAES_S390=m647647-CONFIG_CRYPTO_SHA1_S390=m648648-CONFIG_CRYPTO_SHA256_S390=m649649-CONFIG_CRYPTO_SHA512_S390=m650650-CONFIG_CRYPTO_DES_S390=m651651-CONFIG_CRYPTO_AES_S390=m652652-CONFIG_CRYPTO_GHASH_S390=m653653-CONFIG_CRYPTO_CRC32_S390=y654654-CONFIG_CRC7=m655655-CONFIG_CRC8=m656656-CONFIG_CORDIC=m657657-CONFIG_CMM=m658658-CONFIG_APPLDATA_BASE=y659659-CONFIG_KVM=m660660-CONFIG_KVM_S390_UCONTROL=y661661-CONFIG_VHOST_NET=m
+15-5
arch/s390/configs/performance_defconfig
···2525CONFIG_CGROUP_DEVICE=y2626CONFIG_CGROUP_CPUACCT=y2727CONFIG_CGROUP_PERF=y2828-CONFIG_CHECKPOINT_RESTORE=y2928CONFIG_NAMESPACES=y3029CONFIG_USER_NS=y3130CONFIG_SCHED_AUTOGROUP=y3231CONFIG_BLK_DEV_INITRD=y3332CONFIG_EXPERT=y3433# CONFIG_SYSFS_SYSCALL is not set3434+CONFIG_CHECKPOINT_RESTORE=y3535CONFIG_BPF_SYSCALL=y3636CONFIG_USERFAULTFD=y3737# CONFIG_COMPAT_BRK is not set···4545CONFIG_MODULE_FORCE_UNLOAD=y4646CONFIG_MODVERSIONS=y4747CONFIG_MODULE_SRCVERSION_ALL=y4848+CONFIG_MODULE_SIG=y4949+CONFIG_MODULE_SIG_SHA256=y4850CONFIG_BLK_DEV_INTEGRITY=y4951CONFIG_BLK_DEV_THROTTLING=y5052CONFIG_BLK_WBT=y···6462CONFIG_NR_CPUS=5126563CONFIG_NUMA=y6664CONFIG_HZ_100=y6565+CONFIG_KEXEC_FILE=y6766CONFIG_MEMORY_HOTPLUG=y6867CONFIG_MEMORY_HOTREMOVE=y6968CONFIG_KSM=y···304301CONFIG_IP6_NF_NAT=m305302CONFIG_IP6_NF_TARGET_MASQUERADE=m306303CONFIG_NF_TABLES_BRIDGE=m307307-CONFIG_NET_SCTPPROBE=m308304CONFIG_RDS=m309305CONFIG_RDS_RDMA=m310306CONFIG_RDS_TCP=m···361359CONFIG_NET_ACT_SKBEDIT=m362360CONFIG_NET_ACT_CSUM=m363361CONFIG_DNS_RESOLVER=y362362+CONFIG_OPENVSWITCH=m364363CONFIG_NETLINK_DIAG=m365364CONFIG_CGROUP_NET_PRIO=y366365CONFIG_BPF_JIT=y367366CONFIG_NET_PKTGEN=m368368-CONFIG_NET_TCPPROBE=m369367CONFIG_DEVTMPFS=y370368CONFIG_DMA_CMA=y371369CONFIG_CMA_SIZE_MBYTES=0···377375CONFIG_BLK_DEV_NBD=m378376CONFIG_BLK_DEV_RAM=y379377CONFIG_BLK_DEV_RAM_SIZE=32768380380-CONFIG_BLK_DEV_RAM_DAX=y381378CONFIG_VIRTIO_BLK=y379379+CONFIG_BLK_DEV_RBD=m380380+CONFIG_BLK_DEV_NVME=m382381CONFIG_ENCLOSURE_SERVICES=m383382CONFIG_GENWQE=m384383CONFIG_RAID_ATTRS=m···458455CONFIG_PPPOL2TP=m459456CONFIG_PPP_ASYNC=m460457CONFIG_PPP_SYNC_TTY=m458458+CONFIG_INPUT_EVDEV=y461459# CONFIG_INPUT_KEYBOARD is not set462460# CONFIG_INPUT_MOUSE is not set463461# CONFIG_SERIO is not set···472468CONFIG_WATCHDOG_NOWAYOUT=y473469CONFIG_SOFT_WATCHDOG=m474470CONFIG_DIAG288_WATCHDOG=m471471+CONFIG_DRM=y472472+CONFIG_DRM_VIRTIO_GPU=y473473+CONFIG_FRAMEBUFFER_CONSOLE=y475474# CONFIG_HID is not set476475# CONFIG_USB_SUPPORT is not set477476CONFIG_INFINIBAND=m···483476CONFIG_MLX5_INFINIBAND=m484477CONFIG_VFIO=m485478CONFIG_VFIO_PCI=m479479+CONFIG_VIRTIO_PCI=m486480CONFIG_VIRTIO_BALLOON=m481481+CONFIG_VIRTIO_INPUT=y487482CONFIG_EXT4_FS=y488483CONFIG_EXT4_FS_POSIX_ACL=y489484CONFIG_EXT4_FS_SECURITY=y···516507CONFIG_FUSE_FS=y517508CONFIG_CUSE=m518509CONFIG_OVERLAY_FS=m519519-CONFIG_OVERLAY_FS_REDIRECT_DIR=y520510CONFIG_FSCACHE=m521511CONFIG_CACHEFILES=m522512CONFIG_ISO9660_FS=y···600592CONFIG_INTEGRITY_SIGNATURE=y601593CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y602594CONFIG_IMA=y595595+CONFIG_IMA_DEFAULT_HASH_SHA256=y603596CONFIG_IMA_WRITE_POLICY=y604597CONFIG_IMA_APPRAISE=y598598+CONFIG_CRYPTO_FIPS=y605599CONFIG_CRYPTO_DH=m606600CONFIG_CRYPTO_ECDH=m607601CONFIG_CRYPTO_USER=m
+11-2
arch/s390/defconfig
···88CONFIG_TASK_DELAY_ACCT=y99CONFIG_TASK_XACCT=y1010CONFIG_TASK_IO_ACCOUNTING=y1111+# CONFIG_CPU_ISOLATION is not set1112CONFIG_IKCONFIG=y1213CONFIG_IKCONFIG_PROC=y1314CONFIG_CGROUPS=y···2423CONFIG_CGROUP_DEVICE=y2524CONFIG_CGROUP_CPUACCT=y2625CONFIG_CGROUP_PERF=y2727-CONFIG_CHECKPOINT_RESTORE=y2826CONFIG_NAMESPACES=y2927CONFIG_USER_NS=y3028CONFIG_BLK_DEV_INITRD=y3129CONFIG_EXPERT=y3230# CONFIG_SYSFS_SYSCALL is not set3131+CONFIG_CHECKPOINT_RESTORE=y3332CONFIG_BPF_SYSCALL=y3433CONFIG_USERFAULTFD=y3534# CONFIG_COMPAT_BRK is not set···4847CONFIG_NR_CPUS=2564948CONFIG_NUMA=y5049CONFIG_HZ_100=y5050+CONFIG_KEXEC_FILE=y5151CONFIG_MEMORY_HOTPLUG=y5252CONFIG_MEMORY_HOTREMOVE=y5353CONFIG_KSM=y···131129CONFIG_TUN=m132130CONFIG_VIRTIO_NET=y133131# CONFIG_NET_VENDOR_ALACRITECH is not set132132+# CONFIG_NET_VENDOR_CORTINA is not set134133# CONFIG_NET_VENDOR_SOLARFLARE is not set134134+# CONFIG_NET_VENDOR_SOCIONEXT is not set135135# CONFIG_NET_VENDOR_SYNOPSYS is not set136136# CONFIG_INPUT is not set137137# CONFIG_SERIO is not set138138+# CONFIG_VT is not set138139CONFIG_DEVKMEM=y139140CONFIG_RAW_DRIVER=m140141CONFIG_VIRTIO_BALLOON=y···182177CONFIG_STACK_TRACER=y183178CONFIG_BLK_DEV_IO_TRACE=y184179CONFIG_FUNCTION_PROFILER=y185185-CONFIG_KPROBES_SANITY_TEST=y180180+# CONFIG_RUNTIME_TESTING_MENU is not set186181CONFIG_S390_PTDUMP=y187182CONFIG_CRYPTO_CRYPTD=m183183+CONFIG_CRYPTO_AUTHENC=m188184CONFIG_CRYPTO_TEST=m189185CONFIG_CRYPTO_CCM=m190186CONFIG_CRYPTO_GCM=m191187CONFIG_CRYPTO_CBC=y188188+CONFIG_CRYPTO_CFB=m192189CONFIG_CRYPTO_CTS=m193190CONFIG_CRYPTO_LRW=m194191CONFIG_CRYPTO_PCBC=m···220213CONFIG_CRYPTO_SALSA20=m221214CONFIG_CRYPTO_SEED=m222215CONFIG_CRYPTO_SERPENT=m216216+CONFIG_CRYPTO_SM4=m217217+CONFIG_CRYPTO_SPECK=m223218CONFIG_CRYPTO_TEA=m224219CONFIG_CRYPTO_TWOFISH=m225220CONFIG_CRYPTO_DEFLATE=m
+1-1
arch/s390/hypfs/inode.c
···320320321321 if (sb->s_root)322322 hypfs_delete_tree(sb->s_root);323323- if (sb_info->update_file)323323+ if (sb_info && sb_info->update_file)324324 hypfs_remove(sb_info->update_file);325325 kfree(sb->s_fs_info);326326 sb->s_fs_info = NULL;
+23
arch/s390/include/asm/kexec.h
···4646static inline void crash_setup_regs(struct pt_regs *newregs,4747 struct pt_regs *oldregs) { }48484949+struct kimage;5050+struct s390_load_data {5151+ /* Pointer to the kernel buffer. Used to register cmdline etc.. */5252+ void *kernel_buf;5353+5454+ /* Total size of loaded segments in memory. Used as an offset. */5555+ size_t memsz;5656+5757+ /* Load address of initrd. Used to register INITRD_START in kernel. */5858+ unsigned long initrd_load_addr;5959+};6060+6161+int kexec_file_add_purgatory(struct kimage *image,6262+ struct s390_load_data *data);6363+int kexec_file_add_initrd(struct kimage *image,6464+ struct s390_load_data *data,6565+ char *initrd, unsigned long initrd_len);6666+int *kexec_file_update_kernel(struct kimage *iamge,6767+ struct s390_load_data *data);6868+6969+extern const struct kexec_file_ops s390_kexec_image_ops;7070+extern const struct kexec_file_ops s390_kexec_elf_ops;7171+4972#endif /*_S390_KEXEC_H */
···11/* SPDX-License-Identifier: GPL-2.0 */22/*33 * S390 version44- * Copyright IBM Corp. 1999, 201044+ * Copyright IBM Corp. 1999, 201755 */66#ifndef _ASM_S390_SETUP_H77#define _ASM_S390_SETUP_H···3737#define LPP_MAGIC _BITUL(31)3838#define LPP_PID_MASK _AC(0xffffffff, UL)39394040+/* Offsets to entry points in kernel/head.S */4141+4242+#define STARTUP_NORMAL_OFFSET 0x100004343+#define STARTUP_KDUMP_OFFSET 0x100104444+4545+/* Offsets to parameters in kernel/head.S */4646+4747+#define IPL_DEVICE_OFFSET 0x104004848+#define INITRD_START_OFFSET 0x104084949+#define INITRD_SIZE_OFFSET 0x104105050+#define OLDMEM_BASE_OFFSET 0x104185151+#define OLDMEM_SIZE_OFFSET 0x104205252+#define COMMAND_LINE_OFFSET 0x104805353+4054#ifndef __ASSEMBLY__41554256#include <asm/lowcore.h>4357#include <asm/types.h>44584545-#define IPL_DEVICE (*(unsigned long *) (0x10400))4646-#define INITRD_START (*(unsigned long *) (0x10408))4747-#define INITRD_SIZE (*(unsigned long *) (0x10410))4848-#define OLDMEM_BASE (*(unsigned long *) (0x10418))4949-#define OLDMEM_SIZE (*(unsigned long *) (0x10420))5050-#define COMMAND_LINE ((char *) (0x10480))5959+#define IPL_DEVICE (*(unsigned long *) (IPL_DEVICE_OFFSET))6060+#define INITRD_START (*(unsigned long *) (INITRD_START_OFFSET))6161+#define INITRD_SIZE (*(unsigned long *) (INITRD_SIZE_OFFSET))6262+#define OLDMEM_BASE (*(unsigned long *) (OLDMEM_BASE_OFFSET))6363+#define OLDMEM_SIZE (*(unsigned long *) (OLDMEM_SIZE_OFFSET))6464+#define COMMAND_LINE ((char *) (COMMAND_LINE_OFFSET))51655266extern int memory_end_set;5367extern unsigned long memory_end;···135121136122#else /* __ASSEMBLY__ */137123138138-#define IPL_DEVICE 0x10400139139-#define INITRD_START 0x10408140140-#define INITRD_SIZE 0x10410141141-#define OLDMEM_BASE 0x10418142142-#define OLDMEM_SIZE 0x10420143143-#define COMMAND_LINE 0x10480124124+#define IPL_DEVICE (IPL_DEVICE_OFFSET)125125+#define INITRD_START (INITRD_START_OFFSET)126126+#define INITRD_SIZE (INITRD_SIZE_OFFSET)127127+#define OLDMEM_BASE (OLDMEM_BASE_OFFSET)128128+#define OLDMEM_SIZE (OLDMEM_SIZE_OFFSET)129129+#define COMMAND_LINE (COMMAND_LINE_OFFSET)144130145131#endif /* __ASSEMBLY__ */146132#endif /* _ASM_S390_SETUP_H */
+16-7
arch/s390/include/uapi/asm/signal.h
···9797#include <asm-generic/signal-defs.h>98989999#ifndef __KERNEL__100100-/* Here we must cater to libcs that poke about in kernel headers. */101100101101+/*102102+ * There are two system calls in regard to sigaction, sys_rt_sigaction103103+ * and sys_sigaction. Internally the kernel uses the struct old_sigaction104104+ * for the older sys_sigaction system call, and the kernel version of the105105+ * struct sigaction for the newer sys_rt_sigaction.106106+ *107107+ * The uapi definition for struct sigaction has made a strange distinction108108+ * between 31-bit and 64-bit in the past. For 64-bit the uapi structure109109+ * looks like the kernel struct sigaction, but for 31-bit it used to110110+ * look like the kernel struct old_sigaction. That practically made the111111+ * structure unusable for either system call. To get around this problem112112+ * the glibc always had its own definitions for the sigaction structures.113113+ *114114+ * The current struct sigaction uapi definition below is suitable for the115115+ * sys_rt_sigaction system call only.116116+ */102117struct sigaction {103118 union {104119 __sighandler_t _sa_handler;105120 void (*_sa_sigaction)(int, struct siginfo *, void *);106121 } _u;107107-#ifndef __s390x__ /* lovely */108108- sigset_t sa_mask;109109- unsigned long sa_flags;110110- void (*sa_restorer)(void);111111-#else /* __s390x__ */112122 unsigned long sa_flags;113123 void (*sa_restorer)(void);114124 sigset_t sa_mask;115115-#endif /* __s390x__ */116125};117126118127#define sa_handler _u._sa_handler
···583583 model = cpumcf_z13_pmu_event_attr;584584 break;585585 case 0x3906:586586+ case 0x3907:586587 model = cpumcf_z14_pmu_event_attr;587588 break;588589 default:
···388388378 common s390_guarded_storage sys_s390_guarded_storage compat_sys_s390_guarded_storage389389379 common statx sys_statx compat_sys_statx390390380 common s390_sthyi sys_s390_sthyi compat_sys_s390_sthyi391391+381 common kexec_file_load sys_kexec_file_load compat_sys_kexec_file_load
···11+/* SPDX-License-Identifier: GPL-2.0 */22+/*33+ * Purgatory setup code44+ *55+ * Copyright IBM Corp. 201866+ *77+ * Author(s): Philipp Rudo <prudo@linux.vnet.ibm.com>88+ */99+1010+#include <linux/linkage.h>1111+#include <asm/asm-offsets.h>1212+#include <asm/page.h>1313+#include <asm/sigp.h>1414+1515+/* The purgatory is the code running between two kernels. It's main purpose1616+ * is to verify that the next kernel was not corrupted after load and to1717+ * start it.1818+ *1919+ * If the next kernel is a crash kernel there are some peculiarities to2020+ * consider:2121+ *2222+ * First the purgatory is called twice. Once only to verify the2323+ * sha digest. So if the crash kernel got corrupted the old kernel can try2424+ * to trigger a stand-alone dumper. And once to actually load the crash kernel.2525+ *2626+ * Second the purgatory also has to swap the crash memory region with its2727+ * destination at address 0. As the purgatory is part of crash memory this2828+ * requires some finesse. The tactic here is that the purgatory first copies2929+ * itself to the end of the destination and then swaps the rest of the3030+ * memory running from there.3131+ */3232+3333+#define bufsz purgatory_end-stack3434+3535+.macro MEMCPY dst,src,len3636+ lgr %r0,\dst3737+ lgr %r1,\len3838+ lgr %r2,\src3939+ lgr %r3,\len4040+4141+20: mvcle %r0,%r2,04242+ jo 20b4343+.endm4444+4545+.macro MEMSWAP dst,src,buf,len4646+10: cghi \len,bufsz4747+ jh 11f4848+ lgr %r4,\len4949+ j 12f5050+11: lghi %r4,bufsz5151+5252+12: MEMCPY \buf,\dst,%r45353+ MEMCPY \dst,\src,%r45454+ MEMCPY \src,\buf,%r45555+5656+ agr \dst,%r45757+ agr \src,%r45858+ sgr \len,%r45959+6060+ cghi \len,06161+ jh 10b6262+.endm6363+6464+.macro START_NEXT_KERNEL base6565+ lg %r4,kernel_entry-\base(%r13)6666+ lg %r5,load_psw_mask-\base(%r13)6767+ ogr %r4,%r56868+ stg %r4,0(%r0)6969+7070+ xgr %r0,%r07171+ diag %r0,%r0,0x3087272+.endm7373+7474+.text7575+.align PAGE_SIZE7676+ENTRY(purgatory_start)7777+ /* The purgatory might be called after a diag308 so better set7878+ * architecture and addressing mode.7979+ */8080+ lhi %r1,18181+ sigp %r1,%r0,SIGP_SET_ARCHITECTURE8282+ sam648383+8484+ larl %r5,gprregs8585+ stmg %r6,%r15,0(%r5)8686+8787+ basr %r13,08888+.base_crash:8989+9090+ /* Setup stack */9191+ larl %r15,purgatory_end9292+ aghi %r15,-1609393+9494+ /* If the next kernel is KEXEC_TYPE_CRASH the purgatory is called9595+ * directly with a flag passed in %r2 whether the purgatory shall do9696+ * checksum verification only (%r2 = 0 -> verification only).9797+ *9898+ * Check now and preserve over C function call by storing in9999+ * %r10 whith100100+ * 1 -> checksum verification only101101+ * 0 -> load new kernel102102+ */103103+ lghi %r10,0104104+ lg %r11,kernel_type-.base_crash(%r13)105105+ cghi %r11,1 /* KEXEC_TYPE_CRASH */106106+ jne .do_checksum_verification107107+ cghi %r2,0 /* checksum verification only */108108+ jne .do_checksum_verification109109+ lghi %r10,1110110+111111+.do_checksum_verification:112112+ brasl %r14,verify_sha256_digest113113+114114+ cghi %r10,1 /* checksum verification only */115115+ je .return_old_kernel116116+ cghi %r2,0 /* checksum match */117117+ jne .disabled_wait118118+119119+ /* If the next kernel is a crash kernel the purgatory has to swap120120+ * the mem regions first.121121+ */122122+ cghi %r11,1 /* KEXEC_TYPE_CRASH */123123+ je .start_crash_kernel124124+125125+ /* start normal kernel */126126+ START_NEXT_KERNEL .base_crash127127+128128+.return_old_kernel:129129+ lmg %r6,%r15,gprregs-.base_crash(%r13)130130+ br %r14131131+132132+.disabled_wait:133133+ lpswe disabled_wait_psw-.base_crash(%r13)134134+135135+.start_crash_kernel:136136+ /* Location of purgatory_start in crash memory */137137+ lgr %r8,%r13138138+ aghi %r8,-(.base_crash-purgatory_start)139139+140140+ /* Destination for this code i.e. end of memory to be swapped. */141141+ lg %r9,crash_size-.base_crash(%r13)142142+ aghi %r9,-(purgatory_end-purgatory_start)143143+144144+ /* Destination in crash memory, i.e. same as r9 but in crash memory. */145145+ lg %r10,crash_start-.base_crash(%r13)146146+ agr %r10,%r9147147+148148+ /* Buffer location (in crash memory) and size. As the purgatory is149149+ * behind the point of no return it can re-use the stack as buffer.150150+ */151151+ lghi %r11,bufsz152152+ larl %r12,stack153153+154154+ MEMCPY %r12,%r9,%r11 /* dst -> (crash) buf */155155+ MEMCPY %r9,%r8,%r11 /* self -> dst */156156+157157+ /* Jump to new location. */158158+ lgr %r7,%r9159159+ aghi %r7,.jump_to_dst-purgatory_start160160+ br %r7161161+162162+.jump_to_dst:163163+ basr %r13,0164164+.base_dst:165165+166166+ /* clear buffer */167167+ MEMCPY %r12,%r10,%r11 /* (crash) buf -> (crash) dst */168168+169169+ /* Load new buffer location after jump */170170+ larl %r7,stack171171+ aghi %r10,stack-purgatory_start172172+ MEMCPY %r10,%r7,%r11 /* (new) buf -> (crash) buf */173173+174174+ /* Now the code is set up to run from its designated location. Start175175+ * swapping the rest of crash memory now.176176+ *177177+ * The registers will be used as follow:178178+ *179179+ * %r0-%r4 reserved for macros defined above180180+ * %r5-%r6 tmp registers181181+ * %r7 pointer to current struct sha region182182+ * %r8 index to iterate over all sha regions183183+ * %r9 pointer in crash memory184184+ * %r10 pointer in old kernel185185+ * %r11 total size (still) to be moved186186+ * %r12 pointer to buffer187187+ */188188+ lgr %r12,%r7189189+ lgr %r11,%r9190190+ lghi %r10,0191191+ lg %r9,crash_start-.base_dst(%r13)192192+ lghi %r8,16 /* KEXEC_SEGMENTS_MAX */193193+ larl %r7,purgatory_sha_regions194194+195195+ j .loop_first196196+197197+ /* Loop over all purgatory_sha_regions. */198198+.loop_next:199199+ aghi %r8,-1200200+ cghi %r8,0201201+ je .loop_out202202+203203+ aghi %r7,__KEXEC_SHA_REGION_SIZE204204+205205+.loop_first:206206+ lg %r5,__KEXEC_SHA_REGION_START(%r7)207207+ cghi %r5,0208208+ je .loop_next209209+210210+ /* Copy [end last sha region, start current sha region) */211211+ /* Note: kexec_sha_region->start points in crash memory */212212+ sgr %r5,%r9213213+ MEMCPY %r9,%r10,%r5214214+215215+ agr %r9,%r5216216+ agr %r10,%r5217217+ sgr %r11,%r5218218+219219+ /* Swap sha region */220220+ lg %r6,__KEXEC_SHA_REGION_LEN(%r7)221221+ MEMSWAP %r9,%r10,%r12,%r6222222+ sg %r11,__KEXEC_SHA_REGION_LEN(%r7)223223+ j .loop_next224224+225225+.loop_out:226226+ /* Copy rest of crash memory */227227+ MEMCPY %r9,%r10,%r11228228+229229+ /* start crash kernel */230230+ START_NEXT_KERNEL .base_dst231231+232232+233233+load_psw_mask:234234+ .long 0x00080000,0x80000000235235+236236+ .align 8237237+disabled_wait_psw:238238+ .quad 0x0002000180000000239239+ .quad 0x0000000000000000 + .do_checksum_verification240240+241241+gprregs:242242+ .rept 10243243+ .quad 0244244+ .endr245245+246246+purgatory_sha256_digest:247247+ .global purgatory_sha256_digest248248+ .rept 32 /* SHA256_DIGEST_SIZE */249249+ .byte 0250250+ .endr251251+252252+purgatory_sha_regions:253253+ .global purgatory_sha_regions254254+ .rept 16 * __KEXEC_SHA_REGION_SIZE /* KEXEC_SEGMENTS_MAX */255255+ .byte 0256256+ .endr257257+258258+kernel_entry:259259+ .global kernel_entry260260+ .quad 0261261+262262+kernel_type:263263+ .global kernel_type264264+ .quad 0265265+266266+crash_start:267267+ .global crash_start268268+ .quad 0269269+270270+crash_size:271271+ .global crash_size272272+ .quad 0273273+274274+ .align PAGE_SIZE275275+stack:276276+ /* The buffer to move this code must be as big as the code. */277277+ .skip stack-purgatory_start278278+ .align PAGE_SIZE279279+purgatory_end:
···136136#endif137137138138#ifndef __ASSEMBLY__139139-#ifndef __BPF__140139/*141140 * This output constraint should be used for any inline asm which has a "call"142141 * instruction. Otherwise the asm may be inserted before the frame pointer···144145 */145146register unsigned long current_stack_pointer asm(_ASM_SP);146147#define ASM_CALL_CONSTRAINT "+r" (current_stack_pointer)147147-#endif148148#endif149149150150#endif /* _ASM_X86_ASM_H */
···749749extern void enable_sep_cpu(void);750750extern int sysenter_setup(void);751751752752-extern void early_trap_init(void);753752void early_trap_pf_init(void);754753755754/* Defined in head.S */756755extern struct desc_ptr early_gdt_descr;757756758758-extern void cpu_set_gdt(int);759757extern void switch_to_new_gdt(int);760758extern void load_direct_gdt(int);761759extern void load_fixmap_gdt(int);
+4
arch/x86/kernel/acpi/boot.c
···215215 apic_id = processor->local_apic_id;216216 enabled = processor->lapic_flags & ACPI_MADT_ENABLED;217217218218+ /* Ignore invalid ID */219219+ if (apic_id == 0xffffffff)220220+ return 0;221221+218222 /*219223 * We need to register disabled CPU as well to permit220224 * counting disabled CPUs. This allows us to size
···11-// SPDX-License-Identifier: GPL-2.022-/* Fallback functions when the main IOMMU code is not compiled in. This33- code is roughly equivalent to i386. */44-#include <linux/dma-direct.h>55-#include <linux/scatterlist.h>66-#include <linux/string.h>77-#include <linux/gfp.h>88-#include <linux/pci.h>99-#include <linux/mm.h>1010-1111-#include <asm/processor.h>1212-#include <asm/iommu.h>1313-#include <asm/dma.h>1414-1515-#define NOMMU_MAPPING_ERROR 01616-1717-static int1818-check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size)1919-{2020- if (hwdev && !dma_capable(hwdev, bus, size)) {2121- if (*hwdev->dma_mask >= DMA_BIT_MASK(32))2222- printk(KERN_ERR2323- "nommu_%s: overflow %Lx+%zu of device mask %Lx\n",2424- name, (long long)bus, size,2525- (long long)*hwdev->dma_mask);2626- return 0;2727- }2828- return 1;2929-}3030-3131-static dma_addr_t nommu_map_page(struct device *dev, struct page *page,3232- unsigned long offset, size_t size,3333- enum dma_data_direction dir,3434- unsigned long attrs)3535-{3636- dma_addr_t bus = phys_to_dma(dev, page_to_phys(page)) + offset;3737- WARN_ON(size == 0);3838- if (!check_addr("map_single", dev, bus, size))3939- return NOMMU_MAPPING_ERROR;4040- return bus;4141-}4242-4343-/* Map a set of buffers described by scatterlist in streaming4444- * mode for DMA. This is the scatter-gather version of the4545- * above pci_map_single interface. Here the scatter gather list4646- * elements are each tagged with the appropriate dma address4747- * and length. They are obtained via sg_dma_{address,length}(SG).4848- *4949- * NOTE: An implementation may be able to use a smaller number of5050- * DMA address/length pairs than there are SG table elements.5151- * (for example via virtual mapping capabilities)5252- * The routine returns the number of addr/length pairs actually5353- * used, at most nents.5454- *5555- * Device ownership issues as mentioned above for pci_map_single are5656- * the same here.5757- */5858-static int nommu_map_sg(struct device *hwdev, struct scatterlist *sg,5959- int nents, enum dma_data_direction dir,6060- unsigned long attrs)6161-{6262- struct scatterlist *s;6363- int i;6464-6565- WARN_ON(nents == 0 || sg[0].length == 0);6666-6767- for_each_sg(sg, s, nents, i) {6868- BUG_ON(!sg_page(s));6969- s->dma_address = sg_phys(s);7070- if (!check_addr("map_sg", hwdev, s->dma_address, s->length))7171- return 0;7272- s->dma_length = s->length;7373- }7474- return nents;7575-}7676-7777-static int nommu_mapping_error(struct device *dev, dma_addr_t dma_addr)7878-{7979- return dma_addr == NOMMU_MAPPING_ERROR;8080-}8181-8282-const struct dma_map_ops nommu_dma_ops = {8383- .alloc = dma_generic_alloc_coherent,8484- .free = dma_generic_free_coherent,8585- .map_sg = nommu_map_sg,8686- .map_page = nommu_map_page,8787- .is_phys = 1,8888- .mapping_error = nommu_mapping_error,8989- .dma_supported = x86_dma_supported,9090-};
+40-5
arch/x86/kernel/smpboot.c
···7777#include <asm/i8259.h>7878#include <asm/misc.h>7979#include <asm/qspinlock.h>8080+#include <asm/intel-family.h>8181+#include <asm/cpu_device_id.h>80828183/* Number of siblings per CPU package */8284int smp_num_siblings = 1;···392390 return false;393391}394392393393+/*394394+ * Define snc_cpu[] for SNC (Sub-NUMA Cluster) CPUs.395395+ *396396+ * These are Intel CPUs that enumerate an LLC that is shared by397397+ * multiple NUMA nodes. The LLC on these systems is shared for398398+ * off-package data access but private to the NUMA node (half399399+ * of the package) for on-package access.400400+ *401401+ * CPUID (the source of the information about the LLC) can only402402+ * enumerate the cache as being shared *or* unshared, but not403403+ * this particular configuration. The CPU in this case enumerates404404+ * the cache to be shared across the entire package (spanning both405405+ * NUMA nodes).406406+ */407407+408408+static const struct x86_cpu_id snc_cpu[] = {409409+ { X86_VENDOR_INTEL, 6, INTEL_FAM6_SKYLAKE_X },410410+ {}411411+};412412+395413static bool match_llc(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o)396414{397415 int cpu1 = c->cpu_index, cpu2 = o->cpu_index;398416399399- if (per_cpu(cpu_llc_id, cpu1) != BAD_APICID &&400400- per_cpu(cpu_llc_id, cpu1) == per_cpu(cpu_llc_id, cpu2))401401- return topology_sane(c, o, "llc");417417+ /* Do not match if we do not have a valid APICID for cpu: */418418+ if (per_cpu(cpu_llc_id, cpu1) == BAD_APICID)419419+ return false;402420403403- return false;421421+ /* Do not match if LLC id does not match: */422422+ if (per_cpu(cpu_llc_id, cpu1) != per_cpu(cpu_llc_id, cpu2))423423+ return false;424424+425425+ /*426426+ * Allow the SNC topology without warning. Return of false427427+ * means 'c' does not share the LLC of 'o'. This will be428428+ * reflected to userspace.429429+ */430430+ if (!topology_same_node(c, o) && x86_match_cpu(snc_cpu))431431+ return false;432432+433433+ return topology_sane(c, o, "llc");404434}405435406436/*···490456491457/*492458 * Set if a package/die has multiple NUMA nodes inside.493493- * AMD Magny-Cours and Intel Cluster-on-Die have this.459459+ * AMD Magny-Cours, Intel Cluster-on-Die, and Intel460460+ * Sub-NUMA Clustering have this.494461 */495462static bool x86_has_numa_in_package;496463
···732732 */733733enum {734734 Opt_queue_depth,735735+ Opt_lock_timeout,735736 Opt_last_int,736737 /* int args above */737738 Opt_last_string,···741740 Opt_read_write,742741 Opt_lock_on_read,743742 Opt_exclusive,743743+ Opt_notrim,744744 Opt_err745745};746746747747static match_table_t rbd_opts_tokens = {748748 {Opt_queue_depth, "queue_depth=%d"},749749+ {Opt_lock_timeout, "lock_timeout=%d"},749750 /* int args above */750751 /* string args above */751752 {Opt_read_only, "read_only"},···756753 {Opt_read_write, "rw"}, /* Alternate spelling */757754 {Opt_lock_on_read, "lock_on_read"},758755 {Opt_exclusive, "exclusive"},756756+ {Opt_notrim, "notrim"},759757 {Opt_err, NULL}760758};761759762760struct rbd_options {763761 int queue_depth;762762+ unsigned long lock_timeout;764763 bool read_only;765764 bool lock_on_read;766765 bool exclusive;766766+ bool trim;767767};768768769769#define RBD_QUEUE_DEPTH_DEFAULT BLKDEV_MAX_RQ770770+#define RBD_LOCK_TIMEOUT_DEFAULT 0 /* no timeout */770771#define RBD_READ_ONLY_DEFAULT false771772#define RBD_LOCK_ON_READ_DEFAULT false772773#define RBD_EXCLUSIVE_DEFAULT false774774+#define RBD_TRIM_DEFAULT true773775774776static int parse_rbd_opts_token(char *c, void *private)775777{···804796 }805797 rbd_opts->queue_depth = intval;806798 break;799799+ case Opt_lock_timeout:800800+ /* 0 is "wait forever" (i.e. infinite timeout) */801801+ if (intval < 0 || intval > INT_MAX / 1000) {802802+ pr_err("lock_timeout out of range\n");803803+ return -EINVAL;804804+ }805805+ rbd_opts->lock_timeout = msecs_to_jiffies(intval * 1000);806806+ break;807807 case Opt_read_only:808808 rbd_opts->read_only = true;809809 break;···823807 break;824808 case Opt_exclusive:825809 rbd_opts->exclusive = true;810810+ break;811811+ case Opt_notrim:812812+ rbd_opts->trim = false;826813 break;827814 default:828815 /* libceph prints "bad option" msg */···14111392 case OBJ_OP_DISCARD:14121393 return true;14131394 default:14141414- rbd_assert(0);13951395+ BUG();14151396 }14161397}14171398···24852466 }24862467 return false;24872468 default:24882488- rbd_assert(0);24692469+ BUG();24892470 }24902471}24912472···25132494 }25142495 return false;25152496 default:25162516- rbd_assert(0);24972497+ BUG();25172498 }25182499}25192500···35523533/*35533534 * lock_rwsem must be held for read35543535 */35553555-static void rbd_wait_state_locked(struct rbd_device *rbd_dev)35363536+static int rbd_wait_state_locked(struct rbd_device *rbd_dev, bool may_acquire)35563537{35573538 DEFINE_WAIT(wait);35393539+ unsigned long timeout;35403540+ int ret = 0;35413541+35423542+ if (test_bit(RBD_DEV_FLAG_BLACKLISTED, &rbd_dev->flags))35433543+ return -EBLACKLISTED;35443544+35453545+ if (rbd_dev->lock_state == RBD_LOCK_STATE_LOCKED)35463546+ return 0;35473547+35483548+ if (!may_acquire) {35493549+ rbd_warn(rbd_dev, "exclusive lock required");35503550+ return -EROFS;35513551+ }3558355235593553 do {35603554 /*···35793547 prepare_to_wait_exclusive(&rbd_dev->lock_waitq, &wait,35803548 TASK_UNINTERRUPTIBLE);35813549 up_read(&rbd_dev->lock_rwsem);35823582- schedule();35503550+ timeout = schedule_timeout(ceph_timeout_jiffies(35513551+ rbd_dev->opts->lock_timeout));35833552 down_read(&rbd_dev->lock_rwsem);35843584- } while (rbd_dev->lock_state != RBD_LOCK_STATE_LOCKED &&35853585- !test_bit(RBD_DEV_FLAG_BLACKLISTED, &rbd_dev->flags));35533553+ if (test_bit(RBD_DEV_FLAG_BLACKLISTED, &rbd_dev->flags)) {35543554+ ret = -EBLACKLISTED;35553555+ break;35563556+ }35573557+ if (!timeout) {35583558+ rbd_warn(rbd_dev, "timed out waiting for lock");35593559+ ret = -ETIMEDOUT;35603560+ break;35613561+ }35623562+ } while (rbd_dev->lock_state != RBD_LOCK_STATE_LOCKED);3586356335873564 finish_wait(&rbd_dev->lock_waitq, &wait);35653565+ return ret;35883566}3589356735903568static void rbd_queue_workfn(struct work_struct *work)···36803638 (op_type != OBJ_OP_READ || rbd_dev->opts->lock_on_read);36813639 if (must_be_locked) {36823640 down_read(&rbd_dev->lock_rwsem);36833683- if (rbd_dev->lock_state != RBD_LOCK_STATE_LOCKED &&36843684- !test_bit(RBD_DEV_FLAG_BLACKLISTED, &rbd_dev->flags)) {36853685- if (rbd_dev->opts->exclusive) {36863686- rbd_warn(rbd_dev, "exclusive lock required");36873687- result = -EROFS;36883688- goto err_unlock;36893689- }36903690- rbd_wait_state_locked(rbd_dev);36913691- }36923692- if (test_bit(RBD_DEV_FLAG_BLACKLISTED, &rbd_dev->flags)) {36933693- result = -EBLACKLISTED;36413641+ result = rbd_wait_state_locked(rbd_dev,36423642+ !rbd_dev->opts->exclusive);36433643+ if (result)36943644 goto err_unlock;36953695- }36963645 }3697364636983647 img_request = rbd_img_request_create(rbd_dev, op_type, snapc);···39353902{39363903 struct gendisk *disk;39373904 struct request_queue *q;39383938- u64 segment_size;39053905+ unsigned int objset_bytes =39063906+ rbd_dev->layout.object_size * rbd_dev->layout.stripe_count;39393907 int err;3940390839413909 /* create gendisk info */···39763942 blk_queue_flag_set(QUEUE_FLAG_NONROT, q);39773943 /* QUEUE_FLAG_ADD_RANDOM is off by default for blk-mq */3978394439793979- /* set io sizes to object size */39803980- segment_size = rbd_obj_bytes(&rbd_dev->header);39813981- blk_queue_max_hw_sectors(q, segment_size / SECTOR_SIZE);39453945+ blk_queue_max_hw_sectors(q, objset_bytes >> SECTOR_SHIFT);39823946 q->limits.max_sectors = queue_max_hw_sectors(q);39833947 blk_queue_max_segments(q, USHRT_MAX);39843948 blk_queue_max_segment_size(q, UINT_MAX);39853985- blk_queue_io_min(q, segment_size);39863986- blk_queue_io_opt(q, segment_size);39493949+ blk_queue_io_min(q, objset_bytes);39503950+ blk_queue_io_opt(q, objset_bytes);3987395139883988- /* enable the discard support */39893989- blk_queue_flag_set(QUEUE_FLAG_DISCARD, q);39903990- q->limits.discard_granularity = segment_size;39913991- blk_queue_max_discard_sectors(q, segment_size / SECTOR_SIZE);39923992- blk_queue_max_write_zeroes_sectors(q, segment_size / SECTOR_SIZE);39523952+ if (rbd_dev->opts->trim) {39533953+ blk_queue_flag_set(QUEUE_FLAG_DISCARD, q);39543954+ q->limits.discard_granularity = objset_bytes;39553955+ blk_queue_max_discard_sectors(q, objset_bytes >> SECTOR_SHIFT);39563956+ blk_queue_max_write_zeroes_sectors(q, objset_bytes >> SECTOR_SHIFT);39573957+ }3993395839943959 if (!ceph_test_opt(rbd_dev->rbd_client->client, NOCRC))39953960 q->backing_dev_info->capabilities |= BDI_CAP_STABLE_WRITES;···5212517952135180 rbd_opts->read_only = RBD_READ_ONLY_DEFAULT;52145181 rbd_opts->queue_depth = RBD_QUEUE_DEPTH_DEFAULT;51825182+ rbd_opts->lock_timeout = RBD_LOCK_TIMEOUT_DEFAULT;52155183 rbd_opts->lock_on_read = RBD_LOCK_ON_READ_DEFAULT;52165184 rbd_opts->exclusive = RBD_EXCLUSIVE_DEFAULT;51855185+ rbd_opts->trim = RBD_TRIM_DEFAULT;5217518652185187 copts = ceph_parse_options(options, mon_addrs,52195188 mon_addrs + mon_addrs_size - 1,···5251521652525217static int rbd_add_acquire_lock(struct rbd_device *rbd_dev)52535218{52195219+ int ret;52205220+52545221 if (!(rbd_dev->header.features & RBD_FEATURE_EXCLUSIVE_LOCK)) {52555222 rbd_warn(rbd_dev, "exclusive-lock feature is not enabled");52565223 return -EINVAL;···5260522352615224 /* FIXME: "rbd map --exclusive" should be in interruptible */52625225 down_read(&rbd_dev->lock_rwsem);52635263- rbd_wait_state_locked(rbd_dev);52265226+ ret = rbd_wait_state_locked(rbd_dev, true);52645227 up_read(&rbd_dev->lock_rwsem);52655265- if (test_bit(RBD_DEV_FLAG_BLACKLISTED, &rbd_dev->flags)) {52285228+ if (ret) {52665229 rbd_warn(rbd_dev, "failed to acquire exclusive lock");52675230 return -EROFS;52685231 }
+97-31
drivers/char/random.c
···427427 * its value (from 0->1->2).428428 */429429static int crng_init = 0;430430-#define crng_ready() (likely(crng_init > 0))430430+#define crng_ready() (likely(crng_init > 1))431431static int crng_init_cnt = 0;432432+static unsigned long crng_global_init_time = 0;432433#define CRNG_INIT_CNT_THRESH (2*CHACHA20_KEY_SIZE)433434static void _extract_crng(struct crng_state *crng,434435 __u32 out[CHACHA20_BLOCK_WORDS]);···788787 crng->init_time = jiffies - CRNG_RESEED_INTERVAL - 1;789788}790789790790+#ifdef CONFIG_NUMA791791+static void numa_crng_init(void)792792+{793793+ int i;794794+ struct crng_state *crng;795795+ struct crng_state **pool;796796+797797+ pool = kcalloc(nr_node_ids, sizeof(*pool), GFP_KERNEL|__GFP_NOFAIL);798798+ for_each_online_node(i) {799799+ crng = kmalloc_node(sizeof(struct crng_state),800800+ GFP_KERNEL | __GFP_NOFAIL, i);801801+ spin_lock_init(&crng->lock);802802+ crng_initialize(crng);803803+ pool[i] = crng;804804+ }805805+ mb();806806+ if (cmpxchg(&crng_node_pool, NULL, pool)) {807807+ for_each_node(i)808808+ kfree(pool[i]);809809+ kfree(pool);810810+ }811811+}812812+#else813813+static void numa_crng_init(void) {}814814+#endif815815+816816+/*817817+ * crng_fast_load() can be called by code in the interrupt service818818+ * path. So we can't afford to dilly-dally.819819+ */791820static int crng_fast_load(const char *cp, size_t len)792821{793822 unsigned long flags;···825794826795 if (!spin_trylock_irqsave(&primary_crng.lock, flags))827796 return 0;828828- if (crng_ready()) {797797+ if (crng_init != 0) {829798 spin_unlock_irqrestore(&primary_crng.lock, flags);830799 return 0;831800 }···841810 wake_up_interruptible(&crng_init_wait);842811 pr_notice("random: fast init done\n");843812 }813813+ return 1;814814+}815815+816816+/*817817+ * crng_slow_load() is called by add_device_randomness, which has two818818+ * attributes. (1) We can't trust the buffer passed to it is819819+ * guaranteed to be unpredictable (so it might not have any entropy at820820+ * all), and (2) it doesn't have the performance constraints of821821+ * crng_fast_load().822822+ *823823+ * So we do something more comprehensive which is guaranteed to touch824824+ * all of the primary_crng's state, and which uses a LFSR with a825825+ * period of 255 as part of the mixing algorithm. Finally, we do826826+ * *not* advance crng_init_cnt since buffer we may get may be something827827+ * like a fixed DMI table (for example), which might very well be828828+ * unique to the machine, but is otherwise unvarying.829829+ */830830+static int crng_slow_load(const char *cp, size_t len)831831+{832832+ unsigned long flags;833833+ static unsigned char lfsr = 1;834834+ unsigned char tmp;835835+ unsigned i, max = CHACHA20_KEY_SIZE;836836+ const char * src_buf = cp;837837+ char * dest_buf = (char *) &primary_crng.state[4];838838+839839+ if (!spin_trylock_irqsave(&primary_crng.lock, flags))840840+ return 0;841841+ if (crng_init != 0) {842842+ spin_unlock_irqrestore(&primary_crng.lock, flags);843843+ return 0;844844+ }845845+ if (len > max)846846+ max = len;847847+848848+ for (i = 0; i < max ; i++) {849849+ tmp = lfsr;850850+ lfsr >>= 1;851851+ if (tmp & 1)852852+ lfsr ^= 0xE1;853853+ tmp = dest_buf[i % CHACHA20_KEY_SIZE];854854+ dest_buf[i % CHACHA20_KEY_SIZE] ^= src_buf[i % len] ^ lfsr;855855+ lfsr += (tmp << 3) | (tmp >> 5);856856+ }857857+ spin_unlock_irqrestore(&primary_crng.lock, flags);844858 return 1;845859}846860···907831 _crng_backtrack_protect(&primary_crng, buf.block,908832 CHACHA20_KEY_SIZE);909833 }910910- spin_lock_irqsave(&primary_crng.lock, flags);834834+ spin_lock_irqsave(&crng->lock, flags);911835 for (i = 0; i < 8; i++) {912836 unsigned long rv;913837 if (!arch_get_random_seed_long(&rv) &&···917841 }918842 memzero_explicit(&buf, sizeof(buf));919843 crng->init_time = jiffies;920920- spin_unlock_irqrestore(&primary_crng.lock, flags);844844+ spin_unlock_irqrestore(&crng->lock, flags);921845 if (crng == &primary_crng && crng_init < 2) {922846 invalidate_batched_entropy();847847+ numa_crng_init();923848 crng_init = 2;924849 process_random_ready_list();925850 wake_up_interruptible(&crng_init_wait);···933856{934857 unsigned long v, flags;935858936936- if (crng_init > 1 &&937937- time_after(jiffies, crng->init_time + CRNG_RESEED_INTERVAL))859859+ if (crng_ready() &&860860+ (time_after(crng_global_init_time, crng->init_time) ||861861+ time_after(jiffies, crng->init_time + CRNG_RESEED_INTERVAL)))938862 crng_reseed(crng, crng == &primary_crng ? &input_pool : NULL);939863 spin_lock_irqsave(&crng->lock, flags);940864 if (arch_get_random_long(&v))···1059981 unsigned long time = random_get_entropy() ^ jiffies;1060982 unsigned long flags;106198310621062- if (!crng_ready()) {10631063- crng_fast_load(buf, size);10641064- return;10651065- }984984+ if (!crng_ready() && size)985985+ crng_slow_load(buf, size);10669861067987 trace_add_device_randomness(size, _RET_IP_);1068988 spin_lock_irqsave(&input_pool.lock, flags);···12151139 fast_mix(fast_pool);12161140 add_interrupt_bench(cycles);1217114112181218- if (!crng_ready()) {11421142+ if (unlikely(crng_init == 0)) {12191143 if ((fast_pool->count >= 64) &&12201144 crng_fast_load((char *) fast_pool->pool,12211145 sizeof(fast_pool->pool))) {···17561680 */17571681static int rand_initialize(void)17581682{17591759-#ifdef CONFIG_NUMA17601760- int i;17611761- struct crng_state *crng;17621762- struct crng_state **pool;17631763-#endif17641764-17651683 init_std_data(&input_pool);17661684 init_std_data(&blocking_pool);17671685 crng_initialize(&primary_crng);17681768-17691769-#ifdef CONFIG_NUMA17701770- pool = kcalloc(nr_node_ids, sizeof(*pool), GFP_KERNEL|__GFP_NOFAIL);17711771- for_each_online_node(i) {17721772- crng = kmalloc_node(sizeof(struct crng_state),17731773- GFP_KERNEL | __GFP_NOFAIL, i);17741774- spin_lock_init(&crng->lock);17751775- crng_initialize(crng);17761776- pool[i] = crng;17771777- }17781778- mb();17791779- crng_node_pool = pool;17801780-#endif16861686+ crng_global_init_time = jiffies;17811687 return 0;17821688}17831689early_initcall(rand_initialize);···19321874 return -EPERM;19331875 input_pool.entropy_count = 0;19341876 blocking_pool.entropy_count = 0;18771877+ return 0;18781878+ case RNDRESEEDCRNG:18791879+ if (!capable(CAP_SYS_ADMIN))18801880+ return -EPERM;18811881+ if (crng_init < 2)18821882+ return -ENODATA;18831883+ crng_reseed(&primary_crng, NULL);18841884+ crng_global_init_time = jiffies - 1;19351885 return 0;19361886 default:19371887 return -EINVAL;···22782212{22792213 struct entropy_store *poolp = &input_pool;2280221422812281- if (!crng_ready()) {22152215+ if (unlikely(crng_init == 0)) {22822216 crng_fast_load(buffer, count);22832217 return;22842218 }
+8
drivers/clocksource/Kconfig
···133133 help134134 Enables support for the VT8500 driver.135135136136+config NPCM7XX_TIMER137137+ bool "NPCM7xx timer driver" if COMPILE_TEST138138+ depends on HAS_IOMEM139139+ select CLKSRC_MMIO140140+ help141141+ Enable 24-bit TIMER0 and TIMER1 counters in the NPCM7xx architecture,142142+ While TIMER0 serves as clockevent and TIMER1 serves as clocksource.143143+136144config CADENCE_TTC_TIMER137145 bool "Cadence TTC timer driver" if COMPILE_TEST138146 depends on COMMON_CLK
···138138 lut = (struct drm_color_lut *)blob->data;139139 lut_size = blob->length / sizeof(struct drm_color_lut);140140141141- if (__is_lut_linear(lut, lut_size)) {142142- /* Set to bypass if lut is set to linear */143143- stream->out_transfer_func->type = TF_TYPE_BYPASS;144144- stream->out_transfer_func->tf = TRANSFER_FUNCTION_LINEAR;145145- return 0;146146- }147147-148141 gamma = dc_create_gamma();149142 if (!gamma)150143 return -ENOMEM;
+10-6
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
···4743474347444744 for (i=0; i < dep_table->count; i++) {47454745 if (dep_table->entries[i].vddc != odn_dep_table->entries[i].vddc) {47464746- data->need_update_smu7_dpm_table |= DPMTABLE_OD_UPDATE_VDDC;47474747- break;47464746+ data->need_update_smu7_dpm_table |= DPMTABLE_OD_UPDATE_VDDC | DPMTABLE_OD_UPDATE_MCLK;47474747+ return;47484748 }47494749 }47504750- if (i == dep_table->count)47504750+ if (i == dep_table->count && data->need_update_smu7_dpm_table & DPMTABLE_OD_UPDATE_VDDC) {47514751 data->need_update_smu7_dpm_table &= ~DPMTABLE_OD_UPDATE_VDDC;47524752+ data->need_update_smu7_dpm_table |= DPMTABLE_OD_UPDATE_MCLK;47534753+ }4752475447534755 dep_table = table_info->vdd_dep_on_sclk;47544756 odn_dep_table = (struct phm_ppt_v1_clock_voltage_dependency_table *)&(odn_table->vdd_dependency_on_sclk);47554757 for (i=0; i < dep_table->count; i++) {47564758 if (dep_table->entries[i].vddc != odn_dep_table->entries[i].vddc) {47574757- data->need_update_smu7_dpm_table |= DPMTABLE_OD_UPDATE_VDDC;47584758- break;47594759+ data->need_update_smu7_dpm_table |= DPMTABLE_OD_UPDATE_VDDC | DPMTABLE_OD_UPDATE_SCLK;47604760+ return;47594761 }47604762 }47614761- if (i == dep_table->count)47634763+ if (i == dep_table->count && data->need_update_smu7_dpm_table & DPMTABLE_OD_UPDATE_VDDC) {47624764 data->need_update_smu7_dpm_table &= ~DPMTABLE_OD_UPDATE_VDDC;47654765+ data->need_update_smu7_dpm_table |= DPMTABLE_OD_UPDATE_SCLK;47664766+ }47634767}4764476847654769static int smu7_odn_edit_dpm_table(struct pp_hwmgr *hwmgr,
···11501150 switch (notification) {11511151 case VGT_G2V_PPGTT_L3_PAGE_TABLE_CREATE:11521152 root_entry_type = GTT_TYPE_PPGTT_ROOT_L3_ENTRY;11531153+ /* fall through */11531154 case VGT_G2V_PPGTT_L4_PAGE_TABLE_CREATE:11541155 mm = intel_vgpu_get_ppgtt_mm(vgpu, root_entry_type, pdps);11551156 return PTR_ERR_OR_ZERO(mm);
···473473 spin_lock_irqsave(&i915->pmu.lock, flags);474474 spin_lock(&kdev->power.lock);475475476476- if (!i915->pmu.sample[__I915_SAMPLE_RC6_ESTIMATED].cur)477477- i915->pmu.suspended_jiffies_last =478478- kdev->power.suspended_jiffies;476476+ /*477477+ * After the above branch intel_runtime_pm_get_if_in_use failed478478+ * to get the runtime PM reference we cannot assume we are in479479+ * runtime suspend since we can either: a) race with coming out480480+ * of it before we took the power.lock, or b) there are other481481+ * states than suspended which can bring us here.482482+ *483483+ * We need to double-check that we are indeed currently runtime484484+ * suspended and if not we cannot do better than report the last485485+ * known RC6 value.486486+ */487487+ if (kdev->power.runtime_status == RPM_SUSPENDED) {488488+ if (!i915->pmu.sample[__I915_SAMPLE_RC6_ESTIMATED].cur)489489+ i915->pmu.suspended_jiffies_last =490490+ kdev->power.suspended_jiffies;479491480480- val = kdev->power.suspended_jiffies -481481- i915->pmu.suspended_jiffies_last;482482- val += jiffies - kdev->power.accounting_timestamp;492492+ val = kdev->power.suspended_jiffies -493493+ i915->pmu.suspended_jiffies_last;494494+ val += jiffies - kdev->power.accounting_timestamp;495495+496496+ val = jiffies_to_nsecs(val);497497+ val += i915->pmu.sample[__I915_SAMPLE_RC6].cur;498498+499499+ i915->pmu.sample[__I915_SAMPLE_RC6_ESTIMATED].cur = val;500500+ } else if (i915->pmu.sample[__I915_SAMPLE_RC6_ESTIMATED].cur) {501501+ val = i915->pmu.sample[__I915_SAMPLE_RC6_ESTIMATED].cur;502502+ } else {503503+ val = i915->pmu.sample[__I915_SAMPLE_RC6].cur;504504+ }483505484506 spin_unlock(&kdev->power.lock);485485-486486- val = jiffies_to_nsecs(val);487487- val += i915->pmu.sample[__I915_SAMPLE_RC6].cur;488488- i915->pmu.sample[__I915_SAMPLE_RC6_ESTIMATED].cur = val;489489-490507 spin_unlock_irqrestore(&i915->pmu.lock, flags);491508 }492509
+1-1
drivers/gpu/drm/i915/intel_audio.c
···729729 struct drm_i915_private *dev_priv = kdev_to_i915(kdev);730730 u32 tmp;731731732732- if (!IS_GEN9_BC(dev_priv))732732+ if (!IS_GEN9(dev_priv))733733 return;734734735735 i915_audio_component_get_power(kdev);
···577577 * know the next preemption status we see corresponds578578 * to this ELSP update.579579 */580580+ GEM_BUG_ON(!execlists_is_active(execlists,581581+ EXECLISTS_ACTIVE_USER));580582 GEM_BUG_ON(!port_count(&port[0]));581583 if (port_count(&port[0]) > 1)582584 goto unlock;···740738 memset(port, 0, sizeof(*port));741739 port++;742740 }741741+742742+ execlists_clear_active(execlists, EXECLISTS_ACTIVE_USER);743743}744744745745static void execlists_cancel_requests(struct intel_engine_cs *engine)···1005100110061002 if (fw)10071003 intel_uncore_forcewake_put(dev_priv, execlists->fw_domains);10041004+10051005+ /* If the engine is now idle, so should be the flag; and vice versa. */10061006+ GEM_BUG_ON(execlists_is_active(&engine->execlists,10071007+ EXECLISTS_ACTIVE_USER) ==10081008+ !port_isset(engine->execlists.port));10081009}1009101010101011static void queue_request(struct intel_engine_cs *engine,
···387387 break;388388389389 case POWER_SUPPLY_PROP_CAPACITY:390390- if (dev->battery_report_type == HID_FEATURE_REPORT) {390390+ if (dev->battery_status != HID_BATTERY_REPORTED &&391391+ !dev->battery_avoid_query) {391392 value = hidinput_query_battery_capacity(dev);392393 if (value < 0)393394 return value;···404403 break;405404406405 case POWER_SUPPLY_PROP_STATUS:407407- if (!dev->battery_reported &&408408- dev->battery_report_type == HID_FEATURE_REPORT) {406406+ if (dev->battery_status != HID_BATTERY_REPORTED &&407407+ !dev->battery_avoid_query) {409408 value = hidinput_query_battery_capacity(dev);410409 if (value < 0)411410 return value;412411413412 dev->battery_capacity = value;414414- dev->battery_reported = true;413413+ dev->battery_status = HID_BATTERY_QUERIED;415414 }416415417417- if (!dev->battery_reported)416416+ if (dev->battery_status == HID_BATTERY_UNKNOWN)418417 val->intval = POWER_SUPPLY_STATUS_UNKNOWN;419418 else if (dev->battery_capacity == 100)420419 val->intval = POWER_SUPPLY_STATUS_FULL;···487486 dev->battery_report_type = report_type;488487 dev->battery_report_id = field->report->id;489488489489+ /*490490+ * Stylus is normally not connected to the device and thus we491491+ * can't query the device and get meaningful battery strength.492492+ * We have to wait for the device to report it on its own.493493+ */494494+ dev->battery_avoid_query = report_type == HID_INPUT_REPORT &&495495+ field->physical == HID_DG_STYLUS;496496+490497 dev->battery = power_supply_register(&dev->dev, psy_desc, &psy_cfg);491498 if (IS_ERR(dev->battery)) {492499 error = PTR_ERR(dev->battery);···539530540531 capacity = hidinput_scale_battery_capacity(dev, value);541532542542- if (!dev->battery_reported || capacity != dev->battery_capacity) {533533+ if (dev->battery_status != HID_BATTERY_REPORTED ||534534+ capacity != dev->battery_capacity) {543535 dev->battery_capacity = capacity;544544- dev->battery_reported = true;536536+ dev->battery_status = HID_BATTERY_REPORTED;545537 power_supply_changed(dev->battery);546538 }547539}
+5
drivers/hid/hidraw.c
···192192 int ret = 0, len;193193 unsigned char report_number;194194195195+ if (!hidraw_table[minor] || !hidraw_table[minor]->exist) {196196+ ret = -ENODEV;197197+ goto out;198198+ }199199+195200 dev = hidraw_table[minor]->hid;196201197202 if (!dev->ll_driver->raw_request) {
+13
drivers/hid/i2c-hid/i2c-hid.c
···4747/* quirks to control the device */4848#define I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV BIT(0)4949#define I2C_HID_QUIRK_NO_IRQ_AFTER_RESET BIT(1)5050+#define I2C_HID_QUIRK_RESEND_REPORT_DESCR BIT(2)50515152/* flags */5253#define I2C_HID_STARTED 0···172171 I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV },173172 { I2C_VENDOR_ID_HANTICK, I2C_PRODUCT_ID_HANTICK_5288,174173 I2C_HID_QUIRK_NO_IRQ_AFTER_RESET },174174+ { I2C_VENDOR_ID_RAYD, I2C_PRODUCT_ID_RAYD_3118,175175+ I2C_HID_QUIRK_RESEND_REPORT_DESCR },175176 { 0, 0 }176177};177178···12221219 ret = i2c_hid_hwreset(client);12231220 if (ret)12241221 return ret;12221222+12231223+ /* RAYDIUM device (2386:3118) need to re-send report descr cmd12241224+ * after resume, after this it will be back normal.12251225+ * otherwise it issues too many incomplete reports.12261226+ */12271227+ if (ihid->quirks & I2C_HID_QUIRK_RESEND_REPORT_DESCR) {12281228+ ret = i2c_hid_command(client, &hid_report_descr_cmd, NULL, 0);12291229+ if (ret)12301230+ return ret;12311231+ }1225123212261233 if (hid->driver && hid->driver->reset_resume) {12271234 ret = hid->driver->reset_resume(hid);
···285285 struct sk_buff_head *rxq)286286{287287 u16 buf[4] = { 0 }, status, seq_id;288288- u64 ns, timelo, timehi;289288 struct skb_shared_hwtstamps *shwt;289289+ struct sk_buff_head received;290290+ u64 ns, timelo, timehi;291291+ unsigned long flags;290292 int err;293293+294294+ /* The latched timestamp belongs to one of the received frames. */295295+ __skb_queue_head_init(&received);296296+ spin_lock_irqsave(&rxq->lock, flags);297297+ skb_queue_splice_tail_init(rxq, &received);298298+ spin_unlock_irqrestore(&rxq->lock, flags);291299292300 mutex_lock(&chip->reg_lock);293301 err = mv88e6xxx_port_ptp_read(chip, ps->port_id,···319311 /* Since the device can only handle one time stamp at a time,320312 * we purge any extra frames from the queue.321313 */322322- for ( ; skb; skb = skb_dequeue(rxq)) {314314+ for ( ; skb; skb = __skb_dequeue(&received)) {323315 if (mv88e6xxx_ts_valid(status) && seq_match(skb, seq_id)) {324316 ns = timehi << 16 | timelo;325317
+27-22
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
···19271927 return retval;19281928}1929192919301930-static char *bnxt_get_pkgver(struct net_device *dev, char *buf, size_t buflen)19301930+static void bnxt_get_pkgver(struct net_device *dev)19311931{19321932+ struct bnxt *bp = netdev_priv(dev);19321933 u16 index = 0;19331933- u32 datalen;19341934+ char *pkgver;19351935+ u32 pkglen;19361936+ u8 *pkgbuf;19371937+ int len;1934193819351939 if (bnxt_find_nvram_item(dev, BNX_DIR_TYPE_PKG_LOG,19361940 BNX_DIR_ORDINAL_FIRST, BNX_DIR_EXT_NONE,19371937- &index, NULL, &datalen) != 0)19381938- return NULL;19411941+ &index, NULL, &pkglen) != 0)19421942+ return;1939194319401940- memset(buf, 0, buflen);19411941- if (bnxt_get_nvram_item(dev, index, 0, datalen, buf) != 0)19421942- return NULL;19441944+ pkgbuf = kzalloc(pkglen, GFP_KERNEL);19451945+ if (!pkgbuf) {19461946+ dev_err(&bp->pdev->dev, "Unable to allocate memory for pkg version, length = %u\n",19471947+ pkglen);19481948+ return;19491949+ }1943195019441944- return bnxt_parse_pkglog(BNX_PKG_LOG_FIELD_IDX_PKG_VERSION, buf,19451945- datalen);19511951+ if (bnxt_get_nvram_item(dev, index, 0, pkglen, pkgbuf))19521952+ goto err;19531953+19541954+ pkgver = bnxt_parse_pkglog(BNX_PKG_LOG_FIELD_IDX_PKG_VERSION, pkgbuf,19551955+ pkglen);19561956+ if (pkgver && *pkgver != 0 && isdigit(*pkgver)) {19571957+ len = strlen(bp->fw_ver_str);19581958+ snprintf(bp->fw_ver_str + len, FW_VER_STR_LEN - len - 1,19591959+ "/pkg %s", pkgver);19601960+ }19611961+err:19621962+ kfree(pkgbuf);19461963}1947196419481965static int bnxt_get_eeprom(struct net_device *dev,···26322615 struct hwrm_selftest_qlist_input req = {0};26332616 struct bnxt_test_info *test_info;26342617 struct net_device *dev = bp->dev;26352635- char *pkglog;26362618 int i, rc;2637261926382638- pkglog = kzalloc(BNX_PKG_LOG_MAX_LENGTH, GFP_KERNEL);26392639- if (pkglog) {26402640- char *pkgver;26412641- int len;26202620+ bnxt_get_pkgver(dev);2642262126432643- pkgver = bnxt_get_pkgver(dev, pkglog, BNX_PKG_LOG_MAX_LENGTH);26442644- if (pkgver && *pkgver != 0 && isdigit(*pkgver)) {26452645- len = strlen(bp->fw_ver_str);26462646- snprintf(bp->fw_ver_str + len, FW_VER_STR_LEN - len - 1,26472647- "/pkg %s", pkgver);26482648- }26492649- kfree(pkglog);26502650- }26512622 if (bp->hwrm_spec_code < 0x10704 || !BNXT_SINGLE_PF(bp))26522623 return;26532624
···107107 * @mask_table: Hash table used to store masks108108 * @flow_table: Hash table used to store flower rules109109 * @cmsg_work: Workqueue for control messages processing110110- * @cmsg_skbs: List of skbs for control message processing110110+ * @cmsg_skbs_high: List of higher priority skbs for control message111111+ * processing112112+ * @cmsg_skbs_low: List of lower priority skbs for control message113113+ * processing111114 * @nfp_mac_off_list: List of MAC addresses to offload112115 * @nfp_mac_index_list: List of unique 8-bit indexes for non NFP netdevs113116 * @nfp_ipv4_off_list: List of IPv4 addresses to offload···139136 DECLARE_HASHTABLE(mask_table, NFP_FLOWER_MASK_HASH_BITS);140137 DECLARE_HASHTABLE(flow_table, NFP_FLOWER_HASH_BITS);141138 struct work_struct cmsg_work;142142- struct sk_buff_head cmsg_skbs;139139+ struct sk_buff_head cmsg_skbs_high;140140+ struct sk_buff_head cmsg_skbs_low;143141 struct list_head nfp_mac_off_list;144142 struct list_head nfp_mac_index_list;145143 struct list_head nfp_ipv4_off_list;
···733733 u32 rx_indir_table[128];734734};735735736736+#ifdef CONFIG_RFS_ACCEL737737+/**738738+ * struct efx_async_filter_insertion - Request to asynchronously insert a filter739739+ * @net_dev: Reference to the netdevice740740+ * @spec: The filter to insert741741+ * @work: Workitem for this request742742+ * @rxq_index: Identifies the channel for which this request was made743743+ * @flow_id: Identifies the kernel-side flow for which this request was made744744+ */745745+struct efx_async_filter_insertion {746746+ struct net_device *net_dev;747747+ struct efx_filter_spec spec;748748+ struct work_struct work;749749+ u16 rxq_index;750750+ u32 flow_id;751751+};752752+753753+/* Maximum number of ARFS workitems that may be in flight on an efx_nic */754754+#define EFX_RPS_MAX_IN_FLIGHT 8755755+#endif /* CONFIG_RFS_ACCEL */756756+736757/**737758 * struct efx_nic - an Efx NIC738759 * @name: Device name (net device name or bus id before net device registered)···871850 * @rps_expire_channel: Next channel to check for expiry872851 * @rps_expire_index: Next index to check for expiry in873852 * @rps_expire_channel's @rps_flow_id853853+ * @rps_slot_map: bitmap of in-flight entries in @rps_slot854854+ * @rps_slot: array of ARFS insertion requests for efx_filter_rfs_work()874855 * @active_queues: Count of RX and TX queues that haven't been flushed and drained.875856 * @rxq_flush_pending: Count of number of receive queues that need to be flushed.876857 * Decremented when the efx_flush_rx_queue() is called.···10271004 struct mutex rps_mutex;10281005 unsigned int rps_expire_channel;10291006 unsigned int rps_expire_index;10071007+ unsigned long rps_slot_map;10081008+ struct efx_async_filter_insertion rps_slot[EFX_RPS_MAX_IN_FLIGHT];10301009#endif1031101010321011 atomic_t active_queues;
+31-29
drivers/net/ethernet/sfc/rx.c
···827827828828#ifdef CONFIG_RFS_ACCEL829829830830-/**831831- * struct efx_async_filter_insertion - Request to asynchronously insert a filter832832- * @net_dev: Reference to the netdevice833833- * @spec: The filter to insert834834- * @work: Workitem for this request835835- * @rxq_index: Identifies the channel for which this request was made836836- * @flow_id: Identifies the kernel-side flow for which this request was made837837- */838838-struct efx_async_filter_insertion {839839- struct net_device *net_dev;840840- struct efx_filter_spec spec;841841- struct work_struct work;842842- u16 rxq_index;843843- u32 flow_id;844844-};845845-846830static void efx_filter_rfs_work(struct work_struct *data)847831{848832 struct efx_async_filter_insertion *req = container_of(data, struct efx_async_filter_insertion,849833 work);850834 struct efx_nic *efx = netdev_priv(req->net_dev);851835 struct efx_channel *channel = efx_get_channel(efx, req->rxq_index);836836+ int slot_idx = req - efx->rps_slot;852837 int rc;853838854854- rc = efx->type->filter_insert(efx, &req->spec, false);839839+ rc = efx->type->filter_insert(efx, &req->spec, true);855840 if (rc >= 0) {856841 /* Remember this so we can check whether to expire the filter857842 * later.···863878 }864879865880 /* Release references */881881+ clear_bit(slot_idx, &efx->rps_slot_map);866882 dev_put(req->net_dev);867867- kfree(req);868883}869884870885int efx_filter_rfs(struct net_device *net_dev, const struct sk_buff *skb,···873888 struct efx_nic *efx = netdev_priv(net_dev);874889 struct efx_async_filter_insertion *req;875890 struct flow_keys fk;891891+ int slot_idx;892892+ int rc;876893877877- if (flow_id == RPS_FLOW_ID_INVALID)878878- return -EINVAL;894894+ /* find a free slot */895895+ for (slot_idx = 0; slot_idx < EFX_RPS_MAX_IN_FLIGHT; slot_idx++)896896+ if (!test_and_set_bit(slot_idx, &efx->rps_slot_map))897897+ break;898898+ if (slot_idx >= EFX_RPS_MAX_IN_FLIGHT)899899+ return -EBUSY;879900880880- if (!skb_flow_dissect_flow_keys(skb, &fk, 0))881881- return -EPROTONOSUPPORT;901901+ if (flow_id == RPS_FLOW_ID_INVALID) {902902+ rc = -EINVAL;903903+ goto out_clear;904904+ }882905883883- if (fk.basic.n_proto != htons(ETH_P_IP) && fk.basic.n_proto != htons(ETH_P_IPV6))884884- return -EPROTONOSUPPORT;885885- if (fk.control.flags & FLOW_DIS_IS_FRAGMENT)886886- return -EPROTONOSUPPORT;906906+ if (!skb_flow_dissect_flow_keys(skb, &fk, 0)) {907907+ rc = -EPROTONOSUPPORT;908908+ goto out_clear;909909+ }887910888888- req = kmalloc(sizeof(*req), GFP_ATOMIC);889889- if (!req)890890- return -ENOMEM;911911+ if (fk.basic.n_proto != htons(ETH_P_IP) && fk.basic.n_proto != htons(ETH_P_IPV6)) {912912+ rc = -EPROTONOSUPPORT;913913+ goto out_clear;914914+ }915915+ if (fk.control.flags & FLOW_DIS_IS_FRAGMENT) {916916+ rc = -EPROTONOSUPPORT;917917+ goto out_clear;918918+ }891919920920+ req = efx->rps_slot + slot_idx;892921 efx_filter_init_rx(&req->spec, EFX_FILTER_PRI_HINT,893922 efx->rx_scatter ? EFX_FILTER_FLAG_RX_SCATTER : 0,894923 rxq_index);···932933 req->flow_id = flow_id;933934 schedule_work(&req->work);934935 return 0;936936+out_clear:937937+ clear_bit(slot_idx, &efx->rps_slot_map);938938+ return rc;935939}936940937941bool __efx_filter_rfs_expire(struct efx_nic *efx, unsigned int quota)
+1-1
drivers/net/ethernet/stmicro/stmmac/dwmac4.h
···347347#define MTL_RX_OVERFLOW_INT BIT(16)348348349349/* Default operating mode of the MAC */350350-#define GMAC_CORE_INIT (GMAC_CONFIG_JD | GMAC_CONFIG_PS | GMAC_CONFIG_ACS | \350350+#define GMAC_CORE_INIT (GMAC_CONFIG_JD | GMAC_CONFIG_PS | \351351 GMAC_CONFIG_BE | GMAC_CONFIG_DCRS)352352353353/* To dump the core regs excluding the Address Registers */
-7
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
···31313232 value |= GMAC_CORE_INIT;33333434- /* Clear ACS bit because Ethernet switch tagging formats such as3535- * Broadcom tags can look like invalid LLC/SNAP packets and cause the3636- * hardware to truncate packets on reception.3737- */3838- if (netdev_uses_dsa(dev))3939- value &= ~GMAC_CONFIG_ACS;4040-4134 if (mtu > 1500)4235 value |= GMAC_CONFIG_2K;4336 if (mtu > 2000)
+6-1
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
···3495349534963496 /* ACS is set; GMAC core strips PAD/FCS for IEEE 802.334973497 * Type frames (LLC/LLC-SNAP)34983498+ *34993499+ * llc_snap is never checked in GMAC >= 4, so this ACS35003500+ * feature is always disabled and packets need to be35013501+ * stripped manually.34983502 */34993499- if (unlikely(status != llc_snap))35033503+ if (unlikely(priv->synopsys_id >= DWMAC_CORE_4_00) ||35043504+ unlikely(status != llc_snap))35003505 frame_len -= ETH_FCS_LEN;3501350635023507 if (netif_msg_rx_status(priv)) {
+2-3
drivers/net/macsec.c
···3277327732783278 err = netdev_upper_dev_link(real_dev, dev, extack);32793279 if (err < 0)32803280- goto put_dev;32803280+ goto unregister;3281328132823282 /* need to be already registered so that ->init has run and32833283 * the MAC addr is set···33163316 macsec_del_dev(macsec);33173317unlink:33183318 netdev_upper_dev_unlink(real_dev, dev);33193319-put_dev:33203320- dev_put(real_dev);33193319+unregister:33213320 unregister_netdevice(dev);33223321 return err;33233322}
+177-1
drivers/net/phy/microchip.c
···2020#include <linux/ethtool.h>2121#include <linux/phy.h>2222#include <linux/microchipphy.h>2323+#include <linux/delay.h>23242425#define DRIVER_AUTHOR "WOOJUNG HUH <woojung.huh@microchip.com>"2526#define DRIVER_DESC "Microchip LAN88XX PHY driver"···3029 int chip_rev;3130 __u32 wolopts;3231};3232+3333+static int lan88xx_read_page(struct phy_device *phydev)3434+{3535+ return __phy_read(phydev, LAN88XX_EXT_PAGE_ACCESS);3636+}3737+3838+static int lan88xx_write_page(struct phy_device *phydev, int page)3939+{4040+ return __phy_write(phydev, LAN88XX_EXT_PAGE_ACCESS, page);4141+}33423443static int lan88xx_phy_config_intr(struct phy_device *phydev)3544{···7564 genphy_suspend(phydev);76657766 return 0;6767+}6868+6969+static int lan88xx_TR_reg_set(struct phy_device *phydev, u16 regaddr,7070+ u32 data)7171+{7272+ int val, save_page, ret = 0;7373+ u16 buf;7474+7575+ /* Save current page */7676+ save_page = phy_save_page(phydev);7777+ if (save_page < 0) {7878+ pr_warn("Failed to get current page\n");7979+ goto err;8080+ }8181+8282+ /* Switch to TR page */8383+ lan88xx_write_page(phydev, LAN88XX_EXT_PAGE_ACCESS_TR);8484+8585+ ret = __phy_write(phydev, LAN88XX_EXT_PAGE_TR_LOW_DATA,8686+ (data & 0xFFFF));8787+ if (ret < 0) {8888+ pr_warn("Failed to write TR low data\n");8989+ goto err;9090+ }9191+9292+ ret = __phy_write(phydev, LAN88XX_EXT_PAGE_TR_HIGH_DATA,9393+ (data & 0x00FF0000) >> 16);9494+ if (ret < 0) {9595+ pr_warn("Failed to write TR high data\n");9696+ goto err;9797+ }9898+9999+ /* Config control bits [15:13] of register */100100+ buf = (regaddr & ~(0x3 << 13));/* Clr [14:13] to write data in reg */101101+ buf |= 0x8000; /* Set [15] to Packet transmit */102102+103103+ ret = __phy_write(phydev, LAN88XX_EXT_PAGE_TR_CR, buf);104104+ if (ret < 0) {105105+ pr_warn("Failed to write data in reg\n");106106+ goto err;107107+ }108108+109109+ usleep_range(1000, 2000);/* Wait for Data to be written */110110+ val = __phy_read(phydev, LAN88XX_EXT_PAGE_TR_CR);111111+ if (!(val & 0x8000))112112+ pr_warn("TR Register[0x%X] configuration failed\n", regaddr);113113+err:114114+ return phy_restore_page(phydev, save_page, ret);115115+}116116+117117+static void lan88xx_config_TR_regs(struct phy_device *phydev)118118+{119119+ int err;120120+121121+ /* Get access to Channel 0x1, Node 0xF , Register 0x01.122122+ * Write 24-bit value 0x12B00A to register. Setting MrvlTrFix1000Kf,123123+ * MrvlTrFix1000Kp, MasterEnableTR bits.124124+ */125125+ err = lan88xx_TR_reg_set(phydev, 0x0F82, 0x12B00A);126126+ if (err < 0)127127+ pr_warn("Failed to Set Register[0x0F82]\n");128128+129129+ /* Get access to Channel b'10, Node b'1101, Register 0x06.130130+ * Write 24-bit value 0xD2C46F to register. Setting SSTrKf1000Slv,131131+ * SSTrKp1000Mas bits.132132+ */133133+ err = lan88xx_TR_reg_set(phydev, 0x168C, 0xD2C46F);134134+ if (err < 0)135135+ pr_warn("Failed to Set Register[0x168C]\n");136136+137137+ /* Get access to Channel b'10, Node b'1111, Register 0x11.138138+ * Write 24-bit value 0x620 to register. Setting rem_upd_done_thresh139139+ * bits140140+ */141141+ err = lan88xx_TR_reg_set(phydev, 0x17A2, 0x620);142142+ if (err < 0)143143+ pr_warn("Failed to Set Register[0x17A2]\n");144144+145145+ /* Get access to Channel b'10, Node b'1101, Register 0x10.146146+ * Write 24-bit value 0xEEFFDD to register. Setting147147+ * eee_TrKp1Long_1000, eee_TrKp2Long_1000, eee_TrKp3Long_1000,148148+ * eee_TrKp1Short_1000,eee_TrKp2Short_1000, eee_TrKp3Short_1000 bits.149149+ */150150+ err = lan88xx_TR_reg_set(phydev, 0x16A0, 0xEEFFDD);151151+ if (err < 0)152152+ pr_warn("Failed to Set Register[0x16A0]\n");153153+154154+ /* Get access to Channel b'10, Node b'1101, Register 0x13.155155+ * Write 24-bit value 0x071448 to register. Setting156156+ * slv_lpi_tr_tmr_val1, slv_lpi_tr_tmr_val2 bits.157157+ */158158+ err = lan88xx_TR_reg_set(phydev, 0x16A6, 0x071448);159159+ if (err < 0)160160+ pr_warn("Failed to Set Register[0x16A6]\n");161161+162162+ /* Get access to Channel b'10, Node b'1101, Register 0x12.163163+ * Write 24-bit value 0x13132F to register. Setting164164+ * slv_sigdet_timer_val1, slv_sigdet_timer_val2 bits.165165+ */166166+ err = lan88xx_TR_reg_set(phydev, 0x16A4, 0x13132F);167167+ if (err < 0)168168+ pr_warn("Failed to Set Register[0x16A4]\n");169169+170170+ /* Get access to Channel b'10, Node b'1101, Register 0x14.171171+ * Write 24-bit value 0x0 to register. Setting eee_3level_delay,172172+ * eee_TrKf_freeze_delay bits.173173+ */174174+ err = lan88xx_TR_reg_set(phydev, 0x16A8, 0x0);175175+ if (err < 0)176176+ pr_warn("Failed to Set Register[0x16A8]\n");177177+178178+ /* Get access to Channel b'01, Node b'1111, Register 0x34.179179+ * Write 24-bit value 0x91B06C to register. Setting180180+ * FastMseSearchThreshLong1000, FastMseSearchThreshShort1000,181181+ * FastMseSearchUpdGain1000 bits.182182+ */183183+ err = lan88xx_TR_reg_set(phydev, 0x0FE8, 0x91B06C);184184+ if (err < 0)185185+ pr_warn("Failed to Set Register[0x0FE8]\n");186186+187187+ /* Get access to Channel b'01, Node b'1111, Register 0x3E.188188+ * Write 24-bit value 0xC0A028 to register. Setting189189+ * FastMseKp2ThreshLong1000, FastMseKp2ThreshShort1000,190190+ * FastMseKp2UpdGain1000, FastMseKp2ExitEn1000 bits.191191+ */192192+ err = lan88xx_TR_reg_set(phydev, 0x0FFC, 0xC0A028);193193+ if (err < 0)194194+ pr_warn("Failed to Set Register[0x0FFC]\n");195195+196196+ /* Get access to Channel b'01, Node b'1111, Register 0x35.197197+ * Write 24-bit value 0x041600 to register. Setting198198+ * FastMseSearchPhShNum1000, FastMseSearchClksPerPh1000,199199+ * FastMsePhChangeDelay1000 bits.200200+ */201201+ err = lan88xx_TR_reg_set(phydev, 0x0FEA, 0x041600);202202+ if (err < 0)203203+ pr_warn("Failed to Set Register[0x0FEA]\n");204204+205205+ /* Get access to Channel b'10, Node b'1101, Register 0x03.206206+ * Write 24-bit value 0x000004 to register. Setting TrFreeze bits.207207+ */208208+ err = lan88xx_TR_reg_set(phydev, 0x1686, 0x000004);209209+ if (err < 0)210210+ pr_warn("Failed to Set Register[0x1686]\n");78211}7921280213static int lan88xx_probe(struct phy_device *phydev)···287132 phy_write(phydev, LAN88XX_EXT_PAGE_ACCESS, LAN88XX_EXT_PAGE_SPACE_0);288133}289134135135+static int lan88xx_config_init(struct phy_device *phydev)136136+{137137+ int val;138138+139139+ genphy_config_init(phydev);140140+ /*Zerodetect delay enable */141141+ val = phy_read_mmd(phydev, MDIO_MMD_PCS,142142+ PHY_ARDENNES_MMD_DEV_3_PHY_CFG);143143+ val |= PHY_ARDENNES_MMD_DEV_3_PHY_CFG_ZD_DLY_EN_;144144+145145+ phy_write_mmd(phydev, MDIO_MMD_PCS, PHY_ARDENNES_MMD_DEV_3_PHY_CFG,146146+ val);147147+148148+ /* Config DSP registers */149149+ lan88xx_config_TR_regs(phydev);150150+151151+ return 0;152152+}153153+290154static int lan88xx_config_aneg(struct phy_device *phydev)291155{292156 lan88xx_set_mdix(phydev);···325151 .probe = lan88xx_probe,326152 .remove = lan88xx_remove,327153328328- .config_init = genphy_config_init,154154+ .config_init = lan88xx_config_init,329155 .config_aneg = lan88xx_config_aneg,330156331157 .ack_interrupt = lan88xx_phy_ack_interrupt,···334160 .suspend = lan88xx_suspend,335161 .resume = genphy_resume,336162 .set_wol = lan88xx_set_wol,163163+ .read_page = lan88xx_read_page,164164+ .write_page = lan88xx_write_page,337165} };338166339167module_phy_driver(microchip_phy_driver);
+19
drivers/net/team/team.c
···261261 }262262}263263264264+static bool __team_option_inst_tmp_find(const struct list_head *opts,265265+ const struct team_option_inst *needle)266266+{267267+ struct team_option_inst *opt_inst;268268+269269+ list_for_each_entry(opt_inst, opts, tmp_list)270270+ if (opt_inst == needle)271271+ return true;272272+ return false;273273+}274274+264275static int __team_options_register(struct team *team,265276 const struct team_option *option,266277 size_t option_count)···25792568 if (err)25802569 goto team_put;25812570 opt_inst->changed = true;25712571+25722572+ /* dumb/evil user-space can send us duplicate opt,25732573+ * keep only the last one25742574+ */25752575+ if (__team_option_inst_tmp_find(&opt_inst_list,25762576+ opt_inst))25772577+ continue;25782578+25822579 list_add(&opt_inst->tmp_list, &opt_inst_list);25832580 }25842581 if (!opt_found) {
+1-6
drivers/net/tun.c
···11021102 goto drop;1103110311041104 len = run_ebpf_filter(tun, skb, len);11051105-11061106- /* Trim extra bytes since we may insert vlan proto & TCI11071107- * in tun_put_user().11081108- */11091109- len -= skb_vlan_tag_present(skb) ? sizeof(struct veth) : 0;11101110- if (len <= 0 || pskb_trim(skb, len))11051105+ if (len == 0 || pskb_trim(skb, len))11111106 goto drop;1112110711131108 if (unlikely(skb_orphan_frags_rx(skb, GFP_ATOMIC)))
···12181218 union {12191219 void *ptr;12201220 struct ethhdr *eth;12211221+ struct vlan_ethhdr *veth;12211222 struct iphdr *ipv4;12221223 struct ipv6hdr *ipv6;12231224 struct tcphdr *tcp;···12291228 if (unlikely(sizeof(struct iphdr) + sizeof(struct tcphdr) > maplen))12301229 return 0;1231123012311231+ if (skb->protocol == cpu_to_be16(ETH_P_8021Q) ||12321232+ skb->protocol == cpu_to_be16(ETH_P_8021AD))12331233+ hlen = sizeof(struct vlan_ethhdr);12341234+ else12351235+ hlen = sizeof(struct ethhdr);12361236+12321237 hdr.eth = eth_hdr(skb);12331238 if (gdesc->rcd.v4) {12341234- BUG_ON(hdr.eth->h_proto != htons(ETH_P_IP));12351235- hdr.ptr += sizeof(struct ethhdr);12391239+ BUG_ON(hdr.eth->h_proto != htons(ETH_P_IP) &&12401240+ hdr.veth->h_vlan_encapsulated_proto != htons(ETH_P_IP));12411241+ hdr.ptr += hlen;12361242 BUG_ON(hdr.ipv4->protocol != IPPROTO_TCP);12371243 hlen = hdr.ipv4->ihl << 2;12381244 hdr.ptr += hdr.ipv4->ihl << 2;12391245 } else if (gdesc->rcd.v6) {12401240- BUG_ON(hdr.eth->h_proto != htons(ETH_P_IPV6));12411241- hdr.ptr += sizeof(struct ethhdr);12461246+ BUG_ON(hdr.eth->h_proto != htons(ETH_P_IPV6) &&12471247+ hdr.veth->h_vlan_encapsulated_proto != htons(ETH_P_IPV6));12481248+ hdr.ptr += hlen;12421249 /* Use an estimated value, since we also need to handle12431250 * TSO case.12441251 */
+2-2
drivers/net/vmxnet3/vmxnet3_int.h
···6969/*7070 * Version numbers7171 */7272-#define VMXNET3_DRIVER_VERSION_STRING "1.4.13.0-k"7272+#define VMXNET3_DRIVER_VERSION_STRING "1.4.14.0-k"73737474/* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */7575-#define VMXNET3_DRIVER_VERSION_NUM 0x01040d007575+#define VMXNET3_DRIVER_VERSION_NUM 0x01040e0076767777#if defined(CONFIG_PCI_MSI)7878 /* RSS only makes sense if MSI-X is supported. */
+1-2
drivers/nvdimm/Kconfig
···103103 Select Y if unsure104104105105config OF_PMEM106106- # FIXME: make tristate once OF_NUMA dependency removed107107- bool "Device-tree support for persistent memory regions"106106+ tristate "Device-tree support for persistent memory regions"108107 depends on OF109108 default LIBNVDIMM110109 help
···1818 * Used to keep track of the size of the event masks. Qemu until version 2.111919 * only supports 4 and needs a workaround.2020 */2121-bool sclp_mask_compat_mode;2121+bool sclp_mask_compat_mode __section(.data);22222323void sclp_early_wait_irq(void)2424{
···299299 if (sch311x_wdt_set_heartbeat(new_timeout))300300 return -EINVAL;301301 sch311x_wdt_keepalive();302302- /* Fall */302302+ /* Fall through */303303 case WDIOC_GETTIMEOUT:304304 return put_user(timeout, p);305305 default:
+1-1
drivers/watchdog/w83977f_wdt.c
···427427 return -EINVAL;428428429429 wdt_keepalive();430430- /* Fall */430430+ /* Fall through */431431432432 case WDIOC_GETTIMEOUT:433433 return put_user(timeout, uarg.i);
+1-1
drivers/watchdog/wafer5823wdt.c
···178178 timeout = new_timeout;179179 wafwdt_stop();180180 wafwdt_start();181181- /* Fall */181181+ /* Fall through */182182 case WDIOC_GETTIMEOUT:183183 return put_user(timeout, p);184184
+1-1
drivers/xen/xen-pciback/conf_space_quirks.c
···9595 struct xen_pcibk_config_quirk *quirk;9696 int ret = 0;97979898- quirk = kzalloc(sizeof(*quirk), GFP_ATOMIC);9898+ quirk = kzalloc(sizeof(*quirk), GFP_KERNEL);9999 if (!quirk) {100100 ret = -ENOMEM;101101 goto out;
+4-4
drivers/xen/xen-pciback/pci_stub.c
···71717272 dev_dbg(&dev->dev, "pcistub_device_alloc\n");73737474- psdev = kzalloc(sizeof(*psdev), GFP_ATOMIC);7474+ psdev = kzalloc(sizeof(*psdev), GFP_KERNEL);7575 if (!psdev)7676 return NULL;7777···364364 * here and then to call kfree(pci_get_drvdata(psdev->dev)).365365 */366366 dev_data = kzalloc(sizeof(*dev_data) + strlen(DRV_NAME "[]")367367- + strlen(pci_name(dev)) + 1, GFP_ATOMIC);367367+ + strlen(pci_name(dev)) + 1, GFP_KERNEL);368368 if (!dev_data) {369369 err = -ENOMEM;370370 goto out;···577577 }578578579579 if (!match) {580580- pci_dev_id = kmalloc(sizeof(*pci_dev_id), GFP_ATOMIC);580580+ pci_dev_id = kmalloc(sizeof(*pci_dev_id), GFP_KERNEL);581581 if (!pci_dev_id) {582582 err = -ENOMEM;583583 goto out;···11491149 }11501150 dev = psdev->dev;1151115111521152- field = kzalloc(sizeof(*field), GFP_ATOMIC);11521152+ field = kzalloc(sizeof(*field), GFP_KERNEL);11531153 if (!field) {11541154 err = -ENOMEM;11551155 goto out;
···428428 }429429 write_sequnlock(&net->fs_lock);430430431431- if (deleted)431431+ if (deleted) {432432+ write_seqlock(&net->fs_addr_lock);433433+ if (!hlist_unhashed(&server->addr4_link))434434+ hlist_del_rcu(&server->addr4_link);435435+ if (!hlist_unhashed(&server->addr6_link))436436+ hlist_del_rcu(&server->addr6_link);437437+ write_sequnlock(&net->fs_addr_lock);432438 afs_destroy_server(net, server);439439+ }433440 }434441}435442
···377377 } else378378 map_addr = vm_mmap(filep, addr, size, prot, type, off);379379380380- if ((type & MAP_FIXED_NOREPLACE) && BAD_ADDR(map_addr))381381- pr_info("%d (%s): Uhuuh, elf segment at %p requested but the memory is mapped already\n",382382- task_pid_nr(current), current->comm,383383- (void *)addr);380380+ if ((type & MAP_FIXED_NOREPLACE) &&381381+ PTR_ERR((void *)map_addr) == -EEXIST)382382+ pr_info("%d (%s): Uhuuh, elf segment at %px requested but the memory is mapped already\n",383383+ task_pid_nr(current), current->comm, (void *)addr);384384385385 return(map_addr);386386}
+25
fs/btrfs/ctree.h
···459459 unsigned short full;460460 unsigned short type;461461 unsigned short failfast;462462+463463+ /*464464+ * Qgroup equivalent for @size @reserved465465+ *466466+ * Unlike normal @size/@reserved for inode rsv, qgroup doesn't care467467+ * about things like csum size nor how many tree blocks it will need to468468+ * reserve.469469+ *470470+ * Qgroup cares more about net change of the extent usage.471471+ *472472+ * So for one newly inserted file extent, in worst case it will cause473473+ * leaf split and level increase, nodesize for each file extent is474474+ * already too much.475475+ *476476+ * In short, qgroup_size/reserved is the upper limit of possible needed477477+ * qgroup metadata reservation.478478+ */479479+ u64 qgroup_rsv_size;480480+ u64 qgroup_rsv_reserved;462481};463482464483/*···732713 * (device replace, resize, device add/delete, balance)733714 */734715#define BTRFS_FS_EXCL_OP 16716716+717717+/*718718+ * To info transaction_kthread we need an immediate commit so it doesn't719719+ * need to wait for commit_interval720720+ */721721+#define BTRFS_FS_NEED_ASYNC_COMMIT 17735722736723struct btrfs_fs_info {737724 u8 fsid[BTRFS_FSID_SIZE];
+16-4
fs/btrfs/delayed-inode.c
···556556 dst_rsv = &fs_info->delayed_block_rsv;557557558558 num_bytes = btrfs_calc_trans_metadata_size(fs_info, 1);559559+560560+ /*561561+ * Here we migrate space rsv from transaction rsv, since have already562562+ * reserved space when starting a transaction. So no need to reserve563563+ * qgroup space here.564564+ */559565 ret = btrfs_block_rsv_migrate(src_rsv, dst_rsv, num_bytes, 1);560566 if (!ret) {561567 trace_btrfs_space_reservation(fs_info, "delayed_item",···583577 return;584578585579 rsv = &fs_info->delayed_block_rsv;586586- btrfs_qgroup_convert_reserved_meta(root, item->bytes_reserved);580580+ /*581581+ * Check btrfs_delayed_item_reserve_metadata() to see why we don't need582582+ * to release/reserve qgroup space.583583+ */587584 trace_btrfs_space_reservation(fs_info, "delayed_item",588585 item->key.objectid, item->bytes_reserved,589586 0);···611602612603 num_bytes = btrfs_calc_trans_metadata_size(fs_info, 1);613604614614- ret = btrfs_qgroup_reserve_meta_prealloc(root, num_bytes, true);615615- if (ret < 0)616616- return ret;617605 /*618606 * btrfs_dirty_inode will update the inode under btrfs_join_transaction619607 * which doesn't reserve space for speed. This is a problem since we···622616 */623617 if (!src_rsv || (!trans->bytes_reserved &&624618 src_rsv->type != BTRFS_BLOCK_RSV_DELALLOC)) {619619+ ret = btrfs_qgroup_reserve_meta_prealloc(root,620620+ fs_info->nodesize, true);621621+ if (ret < 0)622622+ return ret;625623 ret = btrfs_block_rsv_add(root, dst_rsv, num_bytes,626624 BTRFS_RESERVE_NO_FLUSH);627625 /*···644634 "delayed_inode",645635 btrfs_ino(inode),646636 num_bytes, 1);637637+ } else {638638+ btrfs_qgroup_free_meta_prealloc(root, fs_info->nodesize);647639 }648640 return ret;649641 }
+14-5
fs/btrfs/delayed-ref.c
···540540 struct btrfs_delayed_ref_head *head_ref,541541 struct btrfs_qgroup_extent_record *qrecord,542542 u64 bytenr, u64 num_bytes, u64 ref_root, u64 reserved,543543- int action, int is_data, int *qrecord_inserted_ret,543543+ int action, int is_data, int is_system,544544+ int *qrecord_inserted_ret,544545 int *old_ref_mod, int *new_ref_mod)546546+545547{546548 struct btrfs_delayed_ref_head *existing;547549 struct btrfs_delayed_ref_root *delayed_refs;···587585 head_ref->ref_mod = count_mod;588586 head_ref->must_insert_reserved = must_insert_reserved;589587 head_ref->is_data = is_data;588588+ head_ref->is_system = is_system;590589 head_ref->ref_tree = RB_ROOT;591590 INIT_LIST_HEAD(&head_ref->ref_add_list);592591 RB_CLEAR_NODE(&head_ref->href_node);···775772 struct btrfs_delayed_ref_root *delayed_refs;776773 struct btrfs_qgroup_extent_record *record = NULL;777774 int qrecord_inserted;775775+ int is_system = (ref_root == BTRFS_CHUNK_TREE_OBJECTID);778776779777 BUG_ON(extent_op && extent_op->is_data);780778 ref = kmem_cache_alloc(btrfs_delayed_tree_ref_cachep, GFP_NOFS);···804800 */805801 head_ref = add_delayed_ref_head(fs_info, trans, head_ref, record,806802 bytenr, num_bytes, 0, 0, action, 0,807807- &qrecord_inserted, old_ref_mod,808808- new_ref_mod);803803+ is_system, &qrecord_inserted,804804+ old_ref_mod, new_ref_mod);809805810806 add_delayed_tree_ref(fs_info, trans, head_ref, &ref->node, bytenr,811807 num_bytes, parent, ref_root, level, action);···872868 */873869 head_ref = add_delayed_ref_head(fs_info, trans, head_ref, record,874870 bytenr, num_bytes, ref_root, reserved,875875- action, 1, &qrecord_inserted,871871+ action, 1, 0, &qrecord_inserted,876872 old_ref_mod, new_ref_mod);877873878874 add_delayed_data_ref(fs_info, trans, head_ref, &ref->node, bytenr,···902898 delayed_refs = &trans->transaction->delayed_refs;903899 spin_lock(&delayed_refs->lock);904900901901+ /*902902+ * extent_ops just modify the flags of an extent and they don't result903903+ * in ref count changes, hence it's safe to pass false/0 for is_system904904+ * argument905905+ */905906 add_delayed_ref_head(fs_info, trans, head_ref, NULL, bytenr,906907 num_bytes, 0, 0, BTRFS_UPDATE_DELAYED_HEAD,907907- extent_op->is_data, NULL, NULL, NULL);908908+ extent_op->is_data, 0, NULL, NULL, NULL);908909909910 spin_unlock(&delayed_refs->lock);910911 return 0;
+1
fs/btrfs/delayed-ref.h
···127127 */128128 unsigned int must_insert_reserved:1;129129 unsigned int is_data:1;130130+ unsigned int is_system:1;130131 unsigned int processing:1;131132};132133
+1
fs/btrfs/disk-io.c
···1824182418251825 now = get_seconds();18261826 if (cur->state < TRANS_STATE_BLOCKED &&18271827+ !test_bit(BTRFS_FS_NEED_ASYNC_COMMIT, &fs_info->flags) &&18271828 (now < cur->start_time ||18281829 now - cur->start_time < fs_info->commit_interval)) {18291830 spin_unlock(&fs_info->trans_lock);
+57-16
fs/btrfs/extent-tree.c
···26012601 trace_run_delayed_ref_head(fs_info, head, 0);2602260226032603 if (head->total_ref_mod < 0) {26042604- struct btrfs_block_group_cache *cache;26042604+ struct btrfs_space_info *space_info;26052605+ u64 flags;2605260626062606- cache = btrfs_lookup_block_group(fs_info, head->bytenr);26072607- ASSERT(cache);26082608- percpu_counter_add(&cache->space_info->total_bytes_pinned,26072607+ if (head->is_data)26082608+ flags = BTRFS_BLOCK_GROUP_DATA;26092609+ else if (head->is_system)26102610+ flags = BTRFS_BLOCK_GROUP_SYSTEM;26112611+ else26122612+ flags = BTRFS_BLOCK_GROUP_METADATA;26132613+ space_info = __find_space_info(fs_info, flags);26142614+ ASSERT(space_info);26152615+ percpu_counter_add(&space_info->total_bytes_pinned,26092616 -head->num_bytes);26102610- btrfs_put_block_group(cache);2611261726122618 if (head->is_data) {26132619 spin_lock(&delayed_refs->lock);···5565555955665560static u64 block_rsv_release_bytes(struct btrfs_fs_info *fs_info,55675561 struct btrfs_block_rsv *block_rsv,55685568- struct btrfs_block_rsv *dest, u64 num_bytes)55625562+ struct btrfs_block_rsv *dest, u64 num_bytes,55635563+ u64 *qgroup_to_release_ret)55695564{55705565 struct btrfs_space_info *space_info = block_rsv->space_info;55665566+ u64 qgroup_to_release = 0;55715567 u64 ret;5572556855735569 spin_lock(&block_rsv->lock);55745574- if (num_bytes == (u64)-1)55705570+ if (num_bytes == (u64)-1) {55755571 num_bytes = block_rsv->size;55725572+ qgroup_to_release = block_rsv->qgroup_rsv_size;55735573+ }55765574 block_rsv->size -= num_bytes;55775575 if (block_rsv->reserved >= block_rsv->size) {55785576 num_bytes = block_rsv->reserved - block_rsv->size;···55845574 block_rsv->full = 1;55855575 } else {55865576 num_bytes = 0;55775577+ }55785578+ if (block_rsv->qgroup_rsv_reserved >= block_rsv->qgroup_rsv_size) {55795579+ qgroup_to_release = block_rsv->qgroup_rsv_reserved -55805580+ block_rsv->qgroup_rsv_size;55815581+ block_rsv->qgroup_rsv_reserved = block_rsv->qgroup_rsv_size;55825582+ } else {55835583+ qgroup_to_release = 0;55875584 }55885585 spin_unlock(&block_rsv->lock);55895586···56145597 space_info_add_old_bytes(fs_info, space_info,56155598 num_bytes);56165599 }56005600+ if (qgroup_to_release_ret)56015601+ *qgroup_to_release_ret = qgroup_to_release;56175602 return ret;56185603}56195604···57575738 struct btrfs_root *root = inode->root;57585739 struct btrfs_block_rsv *block_rsv = &inode->block_rsv;57595740 u64 num_bytes = 0;57415741+ u64 qgroup_num_bytes = 0;57605742 int ret = -ENOSPC;5761574357625744 spin_lock(&block_rsv->lock);57635745 if (block_rsv->reserved < block_rsv->size)57645746 num_bytes = block_rsv->size - block_rsv->reserved;57475747+ if (block_rsv->qgroup_rsv_reserved < block_rsv->qgroup_rsv_size)57485748+ qgroup_num_bytes = block_rsv->qgroup_rsv_size -57495749+ block_rsv->qgroup_rsv_reserved;57655750 spin_unlock(&block_rsv->lock);5766575157675752 if (num_bytes == 0)57685753 return 0;5769575457705770- ret = btrfs_qgroup_reserve_meta_prealloc(root, num_bytes, true);57555755+ ret = btrfs_qgroup_reserve_meta_prealloc(root, qgroup_num_bytes, true);57715756 if (ret)57725757 return ret;57735758 ret = reserve_metadata_bytes(root, block_rsv, num_bytes, flush);···57795756 block_rsv_add_bytes(block_rsv, num_bytes, 0);57805757 trace_btrfs_space_reservation(root->fs_info, "delalloc",57815758 btrfs_ino(inode), num_bytes, 1);57825782- }57595759+57605760+ /* Don't forget to increase qgroup_rsv_reserved */57615761+ spin_lock(&block_rsv->lock);57625762+ block_rsv->qgroup_rsv_reserved += qgroup_num_bytes;57635763+ spin_unlock(&block_rsv->lock);57645764+ } else57655765+ btrfs_qgroup_free_meta_prealloc(root, qgroup_num_bytes);57835766 return ret;57845767}57855768···58065777 struct btrfs_block_rsv *global_rsv = &fs_info->global_block_rsv;58075778 struct btrfs_block_rsv *block_rsv = &inode->block_rsv;58085779 u64 released = 0;57805780+ u64 qgroup_to_release = 0;5809578158105782 /*58115783 * Since we statically set the block_rsv->size we just want to say we58125784 * are releasing 0 bytes, and then we'll just get the reservation over58135785 * the size free'd.58145786 */58155815- released = block_rsv_release_bytes(fs_info, block_rsv, global_rsv, 0);57875787+ released = block_rsv_release_bytes(fs_info, block_rsv, global_rsv, 0,57885788+ &qgroup_to_release);58165789 if (released > 0)58175790 trace_btrfs_space_reservation(fs_info, "delalloc",58185791 btrfs_ino(inode), released, 0);58195792 if (qgroup_free)58205820- btrfs_qgroup_free_meta_prealloc(inode->root, released);57935793+ btrfs_qgroup_free_meta_prealloc(inode->root, qgroup_to_release);58215794 else58225822- btrfs_qgroup_convert_reserved_meta(inode->root, released);57955795+ btrfs_qgroup_convert_reserved_meta(inode->root,57965796+ qgroup_to_release);58235797}5824579858255799void btrfs_block_rsv_release(struct btrfs_fs_info *fs_info,···58345802 if (global_rsv == block_rsv ||58355803 block_rsv->space_info != global_rsv->space_info)58365804 global_rsv = NULL;58375837- block_rsv_release_bytes(fs_info, block_rsv, global_rsv, num_bytes);58055805+ block_rsv_release_bytes(fs_info, block_rsv, global_rsv, num_bytes, NULL);58385806}5839580758405808static void update_global_block_rsv(struct btrfs_fs_info *fs_info)···59145882static void release_global_block_rsv(struct btrfs_fs_info *fs_info)59155883{59165884 block_rsv_release_bytes(fs_info, &fs_info->global_block_rsv, NULL,59175917- (u64)-1);58855885+ (u64)-1, NULL);59185886 WARN_ON(fs_info->trans_block_rsv.size > 0);59195887 WARN_ON(fs_info->trans_block_rsv.reserved > 0);59205888 WARN_ON(fs_info->chunk_block_rsv.size > 0);···59385906 WARN_ON_ONCE(!list_empty(&trans->new_bgs));5939590759405908 block_rsv_release_bytes(fs_info, &fs_info->chunk_block_rsv, NULL,59415941- trans->chunk_bytes_reserved);59095909+ trans->chunk_bytes_reserved, NULL);59425910 trans->chunk_bytes_reserved = 0;59435911}59445912···60436011{60446012 struct btrfs_block_rsv *block_rsv = &inode->block_rsv;60456013 u64 reserve_size = 0;60146014+ u64 qgroup_rsv_size = 0;60466015 u64 csum_leaves;60476016 unsigned outstanding_extents;60486017···60566023 inode->csum_bytes);60576024 reserve_size += btrfs_calc_trans_metadata_size(fs_info,60586025 csum_leaves);60266026+ /*60276027+ * For qgroup rsv, the calculation is very simple:60286028+ * account one nodesize for each outstanding extent60296029+ *60306030+ * This is overestimating in most cases.60316031+ */60326032+ qgroup_rsv_size = outstanding_extents * fs_info->nodesize;6059603360606034 spin_lock(&block_rsv->lock);60616035 block_rsv->size = reserve_size;60366036+ block_rsv->qgroup_rsv_size = qgroup_rsv_size;60626037 spin_unlock(&block_rsv->lock);60636038}60646039···84448403 struct btrfs_block_rsv *block_rsv, u32 blocksize)84458404{84468405 block_rsv_add_bytes(block_rsv, blocksize, 0);84478447- block_rsv_release_bytes(fs_info, block_rsv, NULL, 0);84068406+ block_rsv_release_bytes(fs_info, block_rsv, NULL, 0, NULL);84488407}8449840884508409/*
···1111#include <linux/slab.h>1212#include <linux/workqueue.h>1313#include <linux/btrfs.h>1414+#include <linux/sizes.h>14151516#include "ctree.h"1617#include "transaction.h"···23762375 return ret;23772376}2378237723792379-static bool qgroup_check_limits(const struct btrfs_qgroup *qg, u64 num_bytes)23782378+/*23792379+ * Two limits to commit transaction in advance.23802380+ *23812381+ * For RATIO, it will be 1/RATIO of the remaining limit23822382+ * (excluding data and prealloc meta) as threshold.23832383+ * For SIZE, it will be in byte unit as threshold.23842384+ */23852385+#define QGROUP_PERTRANS_RATIO 3223862386+#define QGROUP_PERTRANS_SIZE SZ_32M23872387+static bool qgroup_check_limits(struct btrfs_fs_info *fs_info,23882388+ const struct btrfs_qgroup *qg, u64 num_bytes)23802389{23902390+ u64 limit;23912391+ u64 threshold;23922392+23812393 if ((qg->lim_flags & BTRFS_QGROUP_LIMIT_MAX_RFER) &&23822394 qgroup_rsv_total(qg) + (s64)qg->rfer + num_bytes > qg->max_rfer)23832395 return false;···23982384 if ((qg->lim_flags & BTRFS_QGROUP_LIMIT_MAX_EXCL) &&23992385 qgroup_rsv_total(qg) + (s64)qg->excl + num_bytes > qg->max_excl)24002386 return false;23872387+23882388+ /*23892389+ * Even if we passed the check, it's better to check if reservation23902390+ * for meta_pertrans is pushing us near limit.23912391+ * If there is too much pertrans reservation or it's near the limit,23922392+ * let's try commit transaction to free some, using transaction_kthread23932393+ */23942394+ if ((qg->lim_flags & (BTRFS_QGROUP_LIMIT_MAX_RFER |23952395+ BTRFS_QGROUP_LIMIT_MAX_EXCL))) {23962396+ if (qg->lim_flags & BTRFS_QGROUP_LIMIT_MAX_EXCL)23972397+ limit = qg->max_excl;23982398+ else23992399+ limit = qg->max_rfer;24002400+ threshold = (limit - qg->rsv.values[BTRFS_QGROUP_RSV_DATA] -24012401+ qg->rsv.values[BTRFS_QGROUP_RSV_META_PREALLOC]) /24022402+ QGROUP_PERTRANS_RATIO;24032403+ threshold = min_t(u64, threshold, QGROUP_PERTRANS_SIZE);24042404+24052405+ /*24062406+ * Use transaction_kthread to commit transaction, so we no24072407+ * longer need to bother nested transaction nor lock context.24082408+ */24092409+ if (qg->rsv.values[BTRFS_QGROUP_RSV_META_PERTRANS] > threshold)24102410+ btrfs_commit_transaction_locksafe(fs_info);24112411+ }2401241224022413 return true;24032414}···2473243424742435 qg = unode_aux_to_qgroup(unode);2475243624762476- if (enforce && !qgroup_check_limits(qg, num_bytes)) {24372437+ if (enforce && !qgroup_check_limits(fs_info, qg, num_bytes)) {24772438 ret = -EDQUOT;24782439 goto out;24792440 }
···34623462 * If the page is mmap'ed into a process' page tables, then we need to make34633463 * sure that it doesn't change while being written back.34643464 */34653465-static int34653465+static vm_fault_t34663466cifs_page_mkwrite(struct vm_fault *vmf)34673467{34683468 struct page *page = vmf->page;
···10281028 for (i = 0; i < request->num_sge; i++) {10291029 log_rdma_send(INFO,10301030 "rdma_request sge[%d] addr=%llu length=%u\n",10311031- i, request->sge[0].addr, request->sge[0].length);10311031+ i, request->sge[i].addr, request->sge[i].length);10321032 ib_dma_sync_single_for_device(10331033 info->id->device,10341034 request->sge[i].addr,···21392139 goto done;21402140 }2141214121422142+ cifs_dbg(FYI, "Sending smb (RDMA): smb_len=%u\n", buflen);21432143+ for (i = 0; i < rqst->rq_nvec-1; i++)21442144+ dump_smb(iov[i].iov_base, iov[i].iov_len);21452145+21422146 remaining_data_length = buflen;2143214721442148 log_write(INFO, "rqst->rq_nvec=%d rqst->rq_npages=%d rq_pagesz=%d "···21982194 goto done;21992195 }22002196 i++;21972197+ if (i == rqst->rq_nvec)21982198+ break;22012199 }22022200 start = i;22032201 buflen = 0;
+28-13
fs/ecryptfs/crypto.c
···19971997 return rc;19981998}1999199920002000+static bool is_dot_dotdot(const char *name, size_t name_size)20012001+{20022002+ if (name_size == 1 && name[0] == '.')20032003+ return true;20042004+ else if (name_size == 2 && name[0] == '.' && name[1] == '.')20052005+ return true;20062006+20072007+ return false;20082008+}20092009+20002010/**20012011 * ecryptfs_decode_and_decrypt_filename - converts the encoded cipher text name to decoded plaintext20022012 * @plaintext_name: The plaintext name···20312021 size_t packet_size;20322022 int rc = 0;2033202320342034- if ((mount_crypt_stat->flags & ECRYPTFS_GLOBAL_ENCRYPT_FILENAMES)20352035- && !(mount_crypt_stat->flags & ECRYPTFS_ENCRYPTED_VIEW_ENABLED)20362036- && (name_size > ECRYPTFS_FNEK_ENCRYPTED_FILENAME_PREFIX_SIZE)20372037- && (strncmp(name, ECRYPTFS_FNEK_ENCRYPTED_FILENAME_PREFIX,20382038- ECRYPTFS_FNEK_ENCRYPTED_FILENAME_PREFIX_SIZE) == 0)) {20392039- const char *orig_name = name;20402040- size_t orig_name_size = name_size;20242024+ if ((mount_crypt_stat->flags & ECRYPTFS_GLOBAL_ENCRYPT_FILENAMES) &&20252025+ !(mount_crypt_stat->flags & ECRYPTFS_ENCRYPTED_VIEW_ENABLED)) {20262026+ if (is_dot_dotdot(name, name_size)) {20272027+ rc = ecryptfs_copy_filename(plaintext_name,20282028+ plaintext_name_size,20292029+ name, name_size);20302030+ goto out;20312031+ }20322032+20332033+ if (name_size <= ECRYPTFS_FNEK_ENCRYPTED_FILENAME_PREFIX_SIZE ||20342034+ strncmp(name, ECRYPTFS_FNEK_ENCRYPTED_FILENAME_PREFIX,20352035+ ECRYPTFS_FNEK_ENCRYPTED_FILENAME_PREFIX_SIZE)) {20362036+ rc = -EINVAL;20372037+ goto out;20382038+ }2041203920422040 name += ECRYPTFS_FNEK_ENCRYPTED_FILENAME_PREFIX_SIZE;20432041 name_size -= ECRYPTFS_FNEK_ENCRYPTED_FILENAME_PREFIX_SIZE;···20652047 decoded_name,20662048 decoded_name_size);20672049 if (rc) {20682068- printk(KERN_INFO "%s: Could not parse tag 70 packet "20692069- "from filename; copying through filename "20702070- "as-is\n", __func__);20712071- rc = ecryptfs_copy_filename(plaintext_name,20722072- plaintext_name_size,20732073- orig_name, orig_name_size);20502050+ ecryptfs_printk(KERN_DEBUG,20512051+ "%s: Could not parse tag 70 packet from filename\n",20522052+ __func__);20742053 goto out_free;20752054 }20762055 } else {
+16-5
fs/ecryptfs/file.c
···8282 buf->sb, lower_name,8383 lower_namelen);8484 if (rc) {8585- printk(KERN_ERR "%s: Error attempting to decode and decrypt "8686- "filename [%s]; rc = [%d]\n", __func__, lower_name,8787- rc);8888- goto out;8585+ if (rc != -EINVAL) {8686+ ecryptfs_printk(KERN_DEBUG,8787+ "%s: Error attempting to decode and decrypt filename [%s]; rc = [%d]\n",8888+ __func__, lower_name, rc);8989+ return rc;9090+ }9191+9292+ /* Mask -EINVAL errors as these are most likely due a plaintext9393+ * filename present in the lower filesystem despite filename9494+ * encryption being enabled. One unavoidable example would be9595+ * the "lost+found" dentry in the root directory of an Ext49696+ * filesystem.9797+ */9898+ return 0;8999 }100100+90101 buf->caller->pos = buf->ctx.pos;91102 rc = !dir_emit(buf->caller, name, name_size, ino, d_type);92103 kfree(name);93104 if (!rc)94105 buf->entries_written++;9595-out:106106+96107 return rc;97108}98109
···2020#include <linux/init.h>2121#include <linux/bio.h>22222323+#include <linux/slab.h>2324#include <linux/vmalloc.h>2425#include <linux/zlib.h>2526···6059 >> bufshift;6160 int haveblocks;6261 blkcnt_t blocknum;6363- struct buffer_head *bhs[needblocks + 1];6262+ struct buffer_head **bhs;6463 int curbh, curpage;65646665 if (block_size > deflateBound(1UL << zisofs_block_shift)) {···81808281 /* Because zlib is not thread-safe, do all the I/O at the top. */8382 blocknum = block_start >> bufshift;8484- memset(bhs, 0, (needblocks + 1) * sizeof(struct buffer_head *));8383+ bhs = kcalloc(needblocks + 1, sizeof(*bhs), GFP_KERNEL);8484+ if (!bhs) {8585+ *errp = -ENOMEM;8686+ return 0;8787+ }8588 haveblocks = isofs_get_blocks(inode, blocknum, bhs, needblocks);8689 ll_rw_block(REQ_OP_READ, 0, haveblocks, bhs);8790···195190b_eio:196191 for (i = 0; i < haveblocks; i++)197192 brelse(bhs[i]);193193+ kfree(bhs);198194 return stream.total_out;199195}200196···311305 unsigned int zisofs_pages_per_cblock =312306 PAGE_SHIFT <= zisofs_block_shift ?313307 (1 << (zisofs_block_shift - PAGE_SHIFT)) : 0;314314- struct page *pages[max_t(unsigned, zisofs_pages_per_cblock, 1)];308308+ struct page **pages;315309 pgoff_t index = page->index, end_index;316310317311 end_index = (inode->i_size + PAGE_SIZE - 1) >> PAGE_SHIFT;···335329 } else {336330 full_page = 0;337331 pcount = 1;332332+ }333333+ pages = kcalloc(max_t(unsigned int, zisofs_pages_per_cblock, 1),334334+ sizeof(*pages), GFP_KERNEL);335335+ if (!pages) {336336+ unlock_page(page);337337+ return -ENOMEM;338338 }339339 pages[full_page] = page;340340···369357 } 370358371359 /* At this point, err contains 0 or -EIO depending on the "critical" page */360360+ kfree(pages);372361 return err;373362}374363
+3
fs/isofs/inode.c
···394394 break;395395#ifdef CONFIG_JOLIET396396 case Opt_iocharset:397397+ kfree(popt->iocharset);397398 popt->iocharset = match_strdup(&args[0]);399399+ if (!popt->iocharset)400400+ return 0;398401 break;399402#endif400403 case Opt_map_a:
+1-1
fs/jffs2/super.c
···342342static void jffs2_kill_sb(struct super_block *sb)343343{344344 struct jffs2_sb_info *c = JFFS2_SB_INFO(sb);345345- if (!sb_rdonly(sb))345345+ if (c && !sb_rdonly(sb))346346 jffs2_stop_garbage_collect_thread(c);347347 kill_mtd_super(sb);348348 kfree(c);
+3-2
fs/namespace.c
···10891089 goto out_free;10901090 }1091109110921092- mnt->mnt.mnt_flags = old->mnt.mnt_flags & ~(MNT_WRITE_HOLD|MNT_MARKED);10921092+ mnt->mnt.mnt_flags = old->mnt.mnt_flags;10931093+ mnt->mnt.mnt_flags &= ~(MNT_WRITE_HOLD|MNT_MARKED|MNT_INTERNAL);10931094 /* Don't allow unprivileged users to change mount flags */10941095 if (flag & CL_UNPRIVILEGED) {10951096 mnt->mnt.mnt_flags |= MNT_LOCK_ATIME;···28152814 mnt_flags |= MNT_NODIRATIME;28162815 if (flags & MS_STRICTATIME)28172816 mnt_flags &= ~(MNT_RELATIME | MNT_NOATIME);28182818- if (flags & SB_RDONLY)28172817+ if (flags & MS_RDONLY)28192818 mnt_flags |= MNT_READONLY;2820281928212820 /* The default atime for remount is preservation */
+15-19
fs/notify/fanotify/fanotify.c
···9292 u32 event_mask,9393 const void *data, int data_type)9494{9595- __u32 marks_mask, marks_ignored_mask;9595+ __u32 marks_mask = 0, marks_ignored_mask = 0;9696 const struct path *path = data;97979898 pr_debug("%s: inode_mark=%p vfsmnt_mark=%p mask=%x data=%p"···108108 !d_can_lookup(path->dentry))109109 return false;110110111111- if (inode_mark && vfsmnt_mark) {112112- marks_mask = (vfsmnt_mark->mask | inode_mark->mask);113113- marks_ignored_mask = (vfsmnt_mark->ignored_mask | inode_mark->ignored_mask);114114- } else if (inode_mark) {115115- /*116116- * if the event is for a child and this inode doesn't care about117117- * events on the child, don't send it!118118- */119119- if ((event_mask & FS_EVENT_ON_CHILD) &&120120- !(inode_mark->mask & FS_EVENT_ON_CHILD))121121- return false;122122- marks_mask = inode_mark->mask;123123- marks_ignored_mask = inode_mark->ignored_mask;124124- } else if (vfsmnt_mark) {125125- marks_mask = vfsmnt_mark->mask;126126- marks_ignored_mask = vfsmnt_mark->ignored_mask;127127- } else {128128- BUG();111111+ /*112112+ * if the event is for a child and this inode doesn't care about113113+ * events on the child, don't send it!114114+ */115115+ if (inode_mark &&116116+ (!(event_mask & FS_EVENT_ON_CHILD) ||117117+ (inode_mark->mask & FS_EVENT_ON_CHILD))) {118118+ marks_mask |= inode_mark->mask;119119+ marks_ignored_mask |= inode_mark->ignored_mask;120120+ }121121+122122+ if (vfsmnt_mark) {123123+ marks_mask |= vfsmnt_mark->mask;124124+ marks_ignored_mask |= vfsmnt_mark->ignored_mask;129125 }130126131127 if (d_is_dir(path->dentry) &&
+11-14
fs/notify/fsnotify.c
···192192 struct fsnotify_iter_info *iter_info)193193{194194 struct fsnotify_group *group = NULL;195195- __u32 inode_test_mask = 0;196196- __u32 vfsmount_test_mask = 0;195195+ __u32 test_mask = (mask & ~FS_EVENT_ON_CHILD);196196+ __u32 marks_mask = 0;197197+ __u32 marks_ignored_mask = 0;197198198199 if (unlikely(!inode_mark && !vfsmount_mark)) {199200 BUG();···214213 /* does the inode mark tell us to do something? */215214 if (inode_mark) {216215 group = inode_mark->group;217217- inode_test_mask = (mask & ~FS_EVENT_ON_CHILD);218218- inode_test_mask &= inode_mark->mask;219219- inode_test_mask &= ~inode_mark->ignored_mask;216216+ marks_mask |= inode_mark->mask;217217+ marks_ignored_mask |= inode_mark->ignored_mask;220218 }221219222220 /* does the vfsmount_mark tell us to do something? */223221 if (vfsmount_mark) {224224- vfsmount_test_mask = (mask & ~FS_EVENT_ON_CHILD);225222 group = vfsmount_mark->group;226226- vfsmount_test_mask &= vfsmount_mark->mask;227227- vfsmount_test_mask &= ~vfsmount_mark->ignored_mask;228228- if (inode_mark)229229- vfsmount_test_mask &= ~inode_mark->ignored_mask;223223+ marks_mask |= vfsmount_mark->mask;224224+ marks_ignored_mask |= vfsmount_mark->ignored_mask;230225 }231226232227 pr_debug("%s: group=%p to_tell=%p mask=%x inode_mark=%p"233233- " inode_test_mask=%x vfsmount_mark=%p vfsmount_test_mask=%x"228228+ " vfsmount_mark=%p marks_mask=%x marks_ignored_mask=%x"234229 " data=%p data_is=%d cookie=%d\n",235235- __func__, group, to_tell, mask, inode_mark,236236- inode_test_mask, vfsmount_mark, vfsmount_test_mask, data,230230+ __func__, group, to_tell, mask, inode_mark, vfsmount_mark,231231+ marks_mask, marks_ignored_mask, data,237232 data_is, cookie);238233239239- if (!inode_test_mask && !vfsmount_test_mask)234234+ if (!(test_mask & marks_mask & ~marks_ignored_mask))240235 return 0;241236242237 return group->ops->handle_event(group, to_tell, inode_mark,
+5
fs/orangefs/super.c
···579579 /* provided sb cleanup */580580 kill_anon_super(sb);581581582582+ if (!ORANGEFS_SB(sb)) {583583+ mutex_lock(&orangefs_request_mutex);584584+ mutex_unlock(&orangefs_request_mutex);585585+ return;586586+ }582587 /*583588 * issue the unmount to userspace to tell it to remove the584589 * dynamic mount info it has for this superblock
+6
fs/proc/base.c
···16931693 kuid_t uid;16941694 kgid_t gid;1695169516961696+ if (unlikely(task->flags & PF_KTHREAD)) {16971697+ *ruid = GLOBAL_ROOT_UID;16981698+ *rgid = GLOBAL_ROOT_GID;16991699+ return;17001700+ }17011701+16961702 /* Default to the tasks effective ownership */16971703 rcu_read_lock();16981704 cred = __task_cred(task);
···347347/**348348 * unlocked_inode_to_wb_begin - begin unlocked inode wb access transaction349349 * @inode: target inode350350- * @lockedp: temp bool output param, to be passed to the end function350350+ * @cookie: output param, to be passed to the end function351351 *352352 * The caller wants to access the wb associated with @inode but isn't353353 * holding inode->i_lock, the i_pages lock or wb->list_lock. This···355355 * association doesn't change until the transaction is finished with356356 * unlocked_inode_to_wb_end().357357 *358358- * The caller must call unlocked_inode_to_wb_end() with *@lockdep359359- * afterwards and can't sleep during transaction. IRQ may or may not be360360- * disabled on return.358358+ * The caller must call unlocked_inode_to_wb_end() with *@cookie afterwards and359359+ * can't sleep during the transaction. IRQs may or may not be disabled on360360+ * return.361361 */362362static inline struct bdi_writeback *363363-unlocked_inode_to_wb_begin(struct inode *inode, bool *lockedp)363363+unlocked_inode_to_wb_begin(struct inode *inode, struct wb_lock_cookie *cookie)364364{365365 rcu_read_lock();366366···368368 * Paired with store_release in inode_switch_wb_work_fn() and369369 * ensures that we see the new wb if we see cleared I_WB_SWITCH.370370 */371371- *lockedp = smp_load_acquire(&inode->i_state) & I_WB_SWITCH;371371+ cookie->locked = smp_load_acquire(&inode->i_state) & I_WB_SWITCH;372372373373- if (unlikely(*lockedp))374374- xa_lock_irq(&inode->i_mapping->i_pages);373373+ if (unlikely(cookie->locked))374374+ xa_lock_irqsave(&inode->i_mapping->i_pages, cookie->flags);375375376376 /*377377 * Protected by either !I_WB_SWITCH + rcu_read_lock() or the i_pages···383383/**384384 * unlocked_inode_to_wb_end - end inode wb access transaction385385 * @inode: target inode386386- * @locked: *@lockedp from unlocked_inode_to_wb_begin()386386+ * @cookie: @cookie from unlocked_inode_to_wb_begin()387387 */388388-static inline void unlocked_inode_to_wb_end(struct inode *inode, bool locked)388388+static inline void unlocked_inode_to_wb_end(struct inode *inode,389389+ struct wb_lock_cookie *cookie)389390{390390- if (unlikely(locked))391391- xa_unlock_irq(&inode->i_mapping->i_pages);391391+ if (unlikely(cookie->locked))392392+ xa_unlock_irqrestore(&inode->i_mapping->i_pages, cookie->flags);392393393394 rcu_read_unlock();394395}···436435}437436438437static inline struct bdi_writeback *439439-unlocked_inode_to_wb_begin(struct inode *inode, bool *lockedp)438438+unlocked_inode_to_wb_begin(struct inode *inode, struct wb_lock_cookie *cookie)440439{441440 return inode_to_wb(inode);442441}443442444444-static inline void unlocked_inode_to_wb_end(struct inode *inode, bool locked)443443+static inline void unlocked_inode_to_wb_end(struct inode *inode,444444+ struct wb_lock_cookie *cookie)445445{446446}447447
+3
include/linux/compiler-clang.h
···2525#define __SANITIZE_ADDRESS__2626#endif27272828+#undef __no_sanitize_address2929+#define __no_sanitize_address __attribute__((no_sanitize("address")))3030+2831/* Clang doesn't have a way to turn it off per-function, yet. */2932#ifdef __noretpoline3033#undef __noretpoline
+1-12
include/linux/coresight-pmu.h
···11+/* SPDX-License-Identifier: GPL-2.0 */12/*23 * Copyright(C) 2015 Linaro Limited. All rights reserved.34 * Author: Mathieu Poirier <mathieu.poirier@linaro.org>44- *55- * This program is free software; you can redistribute it and/or modify it66- * under the terms of the GNU General Public License version 2 as published by77- * the Free Software Foundation.88- *99- * This program is distributed in the hope that it will be useful, but WITHOUT1010- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or1111- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for1212- * more details.1313- *1414- * You should have received a copy of the GNU General Public License along with1515- * this program. If not, see <http://www.gnu.org/licenses/>.165 */176187#ifndef _LINUX_CORESIGHT_PMU_H
+1-1
include/linux/fsnotify_backend.h
···248248 /* Group this mark is for. Set on mark creation, stable until last ref249249 * is dropped */250250 struct fsnotify_group *group;251251- /* List of marks by group->i_fsnotify_marks. Also reused for queueing251251+ /* List of marks by group->marks_list. Also reused for queueing252252 * mark into destroy_list when it's waiting for the end of SRCU period253253 * before it can be freed. [group->mark_mutex] */254254 struct list_head g_list;
···6262 int flags;63636464 /**6565- * get_next_block - fetch next block of data6565+ * @get_next_block: fetch next block of data6666 * @consumed: number of bytes consumed by the caller6767 * @dst: destination buffer6868 * @conf: search configuration···7979 struct ts_state *state);80808181 /**8282- * finish - finalize/clean a series of get_next_block() calls8282+ * @finish: finalize/clean a series of get_next_block() calls8383 * @conf: search configuration8484 * @state: search state8585 *
···99extern void do_gettimeofday(struct timeval *tv);1010unsigned long get_seconds(void);11111212-/* does not take xtime_lock */1313-struct timespec __current_kernel_time(void);1414-1512static inline struct timespec current_kernel_time(void)1613{1714 struct timespec64 now = current_kernel_time64();
-2
include/linux/timer.h
···88#include <linux/debugobjects.h>99#include <linux/stringify.h>10101111-struct tvec_base;1212-1311struct timer_list {1412 /*1513 * All fields that change during normal runtime grouped to the
···650650#define PERF_RECORD_MISC_COMM_EXEC (1 << 13)651651#define PERF_RECORD_MISC_SWITCH_OUT (1 << 13)652652/*653653- * Indicates that the content of PERF_SAMPLE_IP points to654654- * the actual instruction that triggered the event. See also655655- * perf_event_attr::precise_ip.653653+ * These PERF_RECORD_MISC_* flags below are safely reused654654+ * for the following events:655655+ *656656+ * PERF_RECORD_MISC_EXACT_IP - PERF_RECORD_SAMPLE of precise events657657+ * PERF_RECORD_MISC_SWITCH_OUT_PREEMPT - PERF_RECORD_SWITCH* events658658+ *659659+ *660660+ * PERF_RECORD_MISC_EXACT_IP:661661+ * Indicates that the content of PERF_SAMPLE_IP points to662662+ * the actual instruction that triggered the event. See also663663+ * perf_event_attr::precise_ip.664664+ *665665+ * PERF_RECORD_MISC_SWITCH_OUT_PREEMPT:666666+ * Indicates that thread was preempted in TASK_RUNNING state.656667 */657668#define PERF_RECORD_MISC_EXACT_IP (1 << 14)669669+#define PERF_RECORD_MISC_SWITCH_OUT_PREEMPT (1 << 14)658670/*659671 * Reserve the last bit to indicate some extended misc field660672 */
+3
include/uapi/linux/random.h
···3535/* Clear the entropy pool and associated counters. (Superuser only.) */3636#define RNDCLEARPOOL _IO( 'R', 0x06 )37373838+/* Reseed CRNG. (Superuser only.) */3939+#define RNDRESEEDCRNG _IO( 'R', 0x07 )4040+3841struct rand_pool_info {3942 int entropy_count;4043 int buf_size;
+307-17
include/xen/interface/io/sndif.h
···38383939/*4040 ******************************************************************************4141+ * Protocol version4242+ ******************************************************************************4343+ */4444+#define XENSND_PROTOCOL_VERSION 24545+4646+/*4747+ ******************************************************************************4148 * Feature and Parameter Negotiation4249 ******************************************************************************4350 *···113106 *114107 * /local/domain/1/device/vsnd/0/0/0/ring-ref = "386"115108 * /local/domain/1/device/vsnd/0/0/0/event-channel = "15"109109+ * /local/domain/1/device/vsnd/0/0/0/evt-ring-ref = "1386"110110+ * /local/domain/1/device/vsnd/0/0/0/evt-event-channel = "215"116111 *117112 *------------------------------ Stream 1, capture ----------------------------118113 *···124115 *125116 * /local/domain/1/device/vsnd/0/0/1/ring-ref = "384"126117 * /local/domain/1/device/vsnd/0/0/1/event-channel = "13"118118+ * /local/domain/1/device/vsnd/0/0/1/evt-ring-ref = "1384"119119+ * /local/domain/1/device/vsnd/0/0/1/evt-event-channel = "213"127120 *128121 *------------------------------- PCM device 1 --------------------------------129122 *···139128 *140129 * /local/domain/1/device/vsnd/0/1/0/ring-ref = "387"141130 * /local/domain/1/device/vsnd/0/1/0/event-channel = "151"131131+ * /local/domain/1/device/vsnd/0/1/0/evt-ring-ref = "1387"132132+ * /local/domain/1/device/vsnd/0/1/0/evt-event-channel = "351"142133 *143134 *------------------------------- PCM device 2 --------------------------------144135 *···153140 *154141 * /local/domain/1/device/vsnd/0/2/0/ring-ref = "389"155142 * /local/domain/1/device/vsnd/0/2/0/event-channel = "152"143143+ * /local/domain/1/device/vsnd/0/2/0/evt-ring-ref = "1389"144144+ * /local/domain/1/device/vsnd/0/2/0/evt-event-channel = "452"156145 *157146 ******************************************************************************158147 * Backend XenBus Nodes···295280 * in the ring buffer.296281 *297282 * ring-ref283283+ * Values: <uint32_t>284284+ *285285+ * The Xen grant reference granting permission for the backend to map286286+ * a sole page in a single page sized ring buffer.287287+ *288288+ *--------------------- Stream Event Transport Parameters ---------------------289289+ *290290+ * This communication path is used to deliver asynchronous events from backend291291+ * to frontend, set up per stream.292292+ *293293+ * evt-event-channel294294+ * Values: <uint32_t>295295+ *296296+ * The identifier of the Xen event channel used to signal activity297297+ * in the ring buffer.298298+ *299299+ * evt-ring-ref298300 * Values: <uint32_t>299301 *300302 * The Xen grant reference granting permission for the backend to map···464432#define XENSND_OP_GET_VOLUME 5465433#define XENSND_OP_MUTE 6466434#define XENSND_OP_UNMUTE 7435435+#define XENSND_OP_TRIGGER 8436436+#define XENSND_OP_HW_PARAM_QUERY 9437437+438438+#define XENSND_OP_TRIGGER_START 0439439+#define XENSND_OP_TRIGGER_PAUSE 1440440+#define XENSND_OP_TRIGGER_STOP 2441441+#define XENSND_OP_TRIGGER_RESUME 3442442+443443+/*444444+ ******************************************************************************445445+ * EVENT CODES446446+ ******************************************************************************447447+ */448448+#define XENSND_EVT_CUR_POS 0467449468450/*469451 ******************************************************************************···494448#define XENSND_FIELD_VCARD_LONG_NAME "long-name"495449#define XENSND_FIELD_RING_REF "ring-ref"496450#define XENSND_FIELD_EVT_CHNL "event-channel"451451+#define XENSND_FIELD_EVT_RING_REF "evt-ring-ref"452452+#define XENSND_FIELD_EVT_EVT_CHNL "evt-event-channel"497453#define XENSND_FIELD_DEVICE_NAME "name"498454#define XENSND_FIELD_TYPE "type"499455#define XENSND_FIELD_STREAM_UNIQUE_ID "unique-id"···574526 *575527 *---------------------------------- Requests ---------------------------------576528 *577577- * All request packets have the same length (32 octets)529529+ * All request packets have the same length (64 octets)578530 * All request packets have common header:579531 * 0 1 2 3 octet580532 * +----------------+----------------+----------------+----------------+···607559 * +----------------+----------------+----------------+----------------+608560 * | gref_directory | 24609561 * +----------------+----------------+----------------+----------------+610610- * | reserved | 28562562+ * | period_sz | 28563563+ * +----------------+----------------+----------------+----------------+564564+ * | reserved | 32611565 * +----------------+----------------+----------------+----------------+612566 * |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|613567 * +----------------+----------------+----------------+----------------+614614- * | reserved | 32568568+ * | reserved | 64615569 * +----------------+----------------+----------------+----------------+616570 *617571 * pcm_rate - uint32_t, stream data rate, Hz···621571 * pcm_channels - uint8_t, number of channels of this stream,622572 * [channels-min; channels-max]623573 * buffer_sz - uint32_t, buffer size to be allocated, octets574574+ * period_sz - uint32_t, event period size, octets575575+ * This is the requested value of the period at which frontend would576576+ * like to receive XENSND_EVT_CUR_POS notifications from the backend when577577+ * stream position advances during playback/capture.578578+ * It shows how many octets are expected to be played/captured before579579+ * sending such an event.580580+ * If set to 0 no XENSND_EVT_CUR_POS events are sent by the backend.581581+ *624582 * gref_directory - grant_ref_t, a reference to the first shared page625583 * describing shared buffer references. At least one page exists. If shared626584 * buffer size (buffer_sz) exceeds what can be addressed by this single page,···643585 uint16_t reserved;644586 uint32_t buffer_sz;645587 grant_ref_t gref_directory;588588+ uint32_t period_sz;646589};647590648591/*···691632 * +----------------+----------------+----------------+----------------+692633 * |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|693634 * +----------------+----------------+----------------+----------------+694694- * | reserved | 32635635+ * | reserved | 64695636 * +----------------+----------------+----------------+----------------+696637 *697638 * Request read/write - used for read (for capture) or write (for playback):···709650 * +----------------+----------------+----------------+----------------+710651 * |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|711652 * +----------------+----------------+----------------+----------------+712712- * | reserved | 32653653+ * | reserved | 64713654 * +----------------+----------------+----------------+----------------+714655 *715656 * operation - XENSND_OP_READ for read or XENSND_OP_WRITE for write···732673 * +----------------+----------------+----------------+----------------+733674 * | length | 16734675 * +----------------+----------------+----------------+----------------+676676+ * | reserved | 20677677+ * +----------------+----------------+----------------+----------------+735678 * |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|736679 * +----------------+----------------+----------------+----------------+737737- * | reserved | 32680680+ * | reserved | 64738681 * +----------------+----------------+----------------+----------------+739682 *740683 * operation - XENSND_OP_SET_VOLUME for volume set···774713 * +----------------+----------------+----------------+----------------+775714 * | length | 16776715 * +----------------+----------------+----------------+----------------+716716+ * | reserved | 20717717+ * +----------------+----------------+----------------+----------------+777718 * |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|778719 * +----------------+----------------+----------------+----------------+779779- * | reserved | 32720720+ * | reserved | 64780721 * +----------------+----------------+----------------+----------------+781722 *782723 * operation - XENSND_OP_MUTE for mute or XENSND_OP_UNMUTE for unmute···806743 *807744 * The 'struct xensnd_rw_req' is also used for XENSND_OP_SET_VOLUME,808745 * XENSND_OP_GET_VOLUME, XENSND_OP_MUTE, XENSND_OP_UNMUTE.746746+ *747747+ * Request stream running state change - trigger PCM stream running state748748+ * to start, stop, pause or resume:749749+ *750750+ * 0 1 2 3 octet751751+ * +----------------+----------------+----------------+----------------+752752+ * | id | _OP_TRIGGER | reserved | 4753753+ * +----------------+----------------+----------------+----------------+754754+ * | reserved | 8755755+ * +----------------+----------------+----------------+----------------+756756+ * | type | reserved | 12757757+ * +----------------+----------------+----------------+----------------+758758+ * | reserved | 16759759+ * +----------------+----------------+----------------+----------------+760760+ * |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|761761+ * +----------------+----------------+----------------+----------------+762762+ * | reserved | 64763763+ * +----------------+----------------+----------------+----------------+764764+ *765765+ * type - uint8_t, XENSND_OP_TRIGGER_XXX value809766 */767767+768768+struct xensnd_trigger_req {769769+ uint8_t type;770770+};771771+772772+/*773773+ * Request stream parameter ranges: request intervals and774774+ * masks of supported ranges for stream configuration values.775775+ *776776+ * Sound device configuration for a particular stream is a limited subset777777+ * of the multidimensional configuration available on XenStore, e.g.778778+ * once the frame rate has been selected there is a limited supported range779779+ * for sample rates becomes available (which might be the same set configured780780+ * on XenStore or less). For example, selecting 96kHz sample rate may limit781781+ * number of channels available for such configuration from 4 to 2, etc.782782+ * Thus, each call to XENSND_OP_HW_PARAM_QUERY may reduce configuration783783+ * space making it possible to iteratively get the final stream configuration,784784+ * used in XENSND_OP_OPEN request.785785+ *786786+ * See response format for this request.787787+ *788788+ * 0 1 2 3 octet789789+ * +----------------+----------------+----------------+----------------+790790+ * | id | _HW_PARAM_QUERY| reserved | 4791791+ * +----------------+----------------+----------------+----------------+792792+ * | reserved | 8793793+ * +----------------+----------------+----------------+----------------+794794+ * | formats mask low 32-bit | 12795795+ * +----------------+----------------+----------------+----------------+796796+ * | formats mask high 32-bit | 16797797+ * +----------------+----------------+----------------+----------------+798798+ * | min rate | 20799799+ * +----------------+----------------+----------------+----------------+800800+ * | max rate | 24801801+ * +----------------+----------------+----------------+----------------+802802+ * | min channels | 28803803+ * +----------------+----------------+----------------+----------------+804804+ * | max channels | 32805805+ * +----------------+----------------+----------------+----------------+806806+ * | min buffer frames | 36807807+ * +----------------+----------------+----------------+----------------+808808+ * | max buffer frames | 40809809+ * +----------------+----------------+----------------+----------------+810810+ * | min period frames | 44811811+ * +----------------+----------------+----------------+----------------+812812+ * | max period frames | 48813813+ * +----------------+----------------+----------------+----------------+814814+ * | reserved | 52815815+ * +----------------+----------------+----------------+----------------+816816+ * |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|817817+ * +----------------+----------------+----------------+----------------+818818+ * | reserved | 64819819+ * +----------------+----------------+----------------+----------------+820820+ *821821+ * formats - uint64_t, bit mask representing values of the parameter822822+ * made as bitwise OR of (1 << XENSND_PCM_FORMAT_XXX) values823823+ *824824+ * For interval parameters:825825+ * min - uint32_t, minimum value of the parameter826826+ * max - uint32_t, maximum value of the parameter827827+ *828828+ * Frame is defined as a product of the number of channels by the829829+ * number of octets per one sample.830830+ */831831+832832+struct xensnd_query_hw_param {833833+ uint64_t formats;834834+ struct {835835+ uint32_t min;836836+ uint32_t max;837837+ } rates;838838+ struct {839839+ uint32_t min;840840+ uint32_t max;841841+ } channels;842842+ struct {843843+ uint32_t min;844844+ uint32_t max;845845+ } buffer;846846+ struct {847847+ uint32_t min;848848+ uint32_t max;849849+ } period;850850+};810851811852/*812853 *---------------------------------- Responses --------------------------------813854 *814814- * All response packets have the same length (32 octets)855855+ * All response packets have the same length (64 octets)815856 *816816- * Response for all requests:857857+ * All response packets have common header:817858 * 0 1 2 3 octet818859 * +----------------+----------------+----------------+----------------+819860 * | id | operation | reserved | 4820861 * +----------------+----------------+----------------+----------------+821862 * | status | 8822863 * +----------------+----------------+----------------+----------------+823823- * | reserved | 12824824- * +----------------+----------------+----------------+----------------+825825- * |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|826826- * +----------------+----------------+----------------+----------------+827827- * | reserved | 32828828- * +----------------+----------------+----------------+----------------+829864 *830865 * id - uint16_t, copied from the request831866 * operation - uint8_t, XENSND_OP_* - copied from request832867 * status - int32_t, response status, zero on success and -XEN_EXX on failure868868+ *869869+ *870870+ * HW parameter query response - response for XENSND_OP_HW_PARAM_QUERY:871871+ * 0 1 2 3 octet872872+ * +----------------+----------------+----------------+----------------+873873+ * | id | operation | reserved | 4874874+ * +----------------+----------------+----------------+----------------+875875+ * | status | 8876876+ * +----------------+----------------+----------------+----------------+877877+ * | formats mask low 32-bit | 12878878+ * +----------------+----------------+----------------+----------------+879879+ * | formats mask high 32-bit | 16880880+ * +----------------+----------------+----------------+----------------+881881+ * | min rate | 20882882+ * +----------------+----------------+----------------+----------------+883883+ * | max rate | 24884884+ * +----------------+----------------+----------------+----------------+885885+ * | min channels | 28886886+ * +----------------+----------------+----------------+----------------+887887+ * | max channels | 32888888+ * +----------------+----------------+----------------+----------------+889889+ * | min buffer frames | 36890890+ * +----------------+----------------+----------------+----------------+891891+ * | max buffer frames | 40892892+ * +----------------+----------------+----------------+----------------+893893+ * | min period frames | 44894894+ * +----------------+----------------+----------------+----------------+895895+ * | max period frames | 48896896+ * +----------------+----------------+----------------+----------------+897897+ * | reserved | 52898898+ * +----------------+----------------+----------------+----------------+899899+ * |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|900900+ * +----------------+----------------+----------------+----------------+901901+ * | reserved | 64902902+ * +----------------+----------------+----------------+----------------+903903+ *904904+ * Meaning of the values in this response is the same as for905905+ * XENSND_OP_HW_PARAM_QUERY request.833906 */907907+908908+/*909909+ *----------------------------------- Events ----------------------------------910910+ *911911+ * Events are sent via shared page allocated by the front and propagated by912912+ * evt-event-channel/evt-ring-ref XenStore entries913913+ * All event packets have the same length (64 octets)914914+ * All event packets have common header:915915+ * 0 1 2 3 octet916916+ * +----------------+----------------+----------------+----------------+917917+ * | id | type | reserved | 4918918+ * +----------------+----------------+----------------+----------------+919919+ * | reserved | 8920920+ * +----------------+----------------+----------------+----------------+921921+ *922922+ * id - uint16_t, event id, may be used by front923923+ * type - uint8_t, type of the event924924+ *925925+ *926926+ * Current stream position - event from back to front when stream's927927+ * playback/capture position has advanced:928928+ * 0 1 2 3 octet929929+ * +----------------+----------------+----------------+----------------+930930+ * | id | _EVT_CUR_POS | reserved | 4931931+ * +----------------+----------------+----------------+----------------+932932+ * | reserved | 8933933+ * +----------------+----------------+----------------+----------------+934934+ * | position low 32-bit | 12935935+ * +----------------+----------------+----------------+----------------+936936+ * | position high 32-bit | 16937937+ * +----------------+----------------+----------------+----------------+938938+ * | reserved | 20939939+ * +----------------+----------------+----------------+----------------+940940+ * |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|941941+ * +----------------+----------------+----------------+----------------+942942+ * | reserved | 64943943+ * +----------------+----------------+----------------+----------------+944944+ *945945+ * position - current value of stream's playback/capture position, octets946946+ *947947+ */948948+949949+struct xensnd_cur_pos_evt {950950+ uint64_t position;951951+};834952835953struct xensnd_req {836954 uint16_t id;···1020776 union {1021777 struct xensnd_open_req open;1022778 struct xensnd_rw_req rw;10231023- uint8_t reserved[24];779779+ struct xensnd_trigger_req trigger;780780+ struct xensnd_query_hw_param hw_param;781781+ uint8_t reserved[56];1024782 } op;1025783};1026784···1031785 uint8_t operation;1032786 uint8_t reserved;1033787 int32_t status;10341034- uint8_t reserved1[24];788788+ union {789789+ struct xensnd_query_hw_param hw_param;790790+ uint8_t reserved1[56];791791+ } resp;792792+};793793+794794+struct xensnd_evt {795795+ uint16_t id;796796+ uint8_t type;797797+ uint8_t reserved[5];798798+ union {799799+ struct xensnd_cur_pos_evt cur_pos;800800+ uint8_t reserved[56];801801+ } op;1035802};10368031037804DEFINE_RING_TYPES(xen_sndif, struct xensnd_req, struct xensnd_resp);805805+806806+/*807807+ ******************************************************************************808808+ * Back to front events delivery809809+ ******************************************************************************810810+ * In order to deliver asynchronous events from back to front a shared page is811811+ * allocated by front and its granted reference propagated to back via812812+ * XenStore entries (evt-ring-ref/evt-event-channel).813813+ * This page has a common header used by both front and back to synchronize814814+ * access and control event's ring buffer, while back being a producer of the815815+ * events and front being a consumer. The rest of the page after the header816816+ * is used for event packets.817817+ *818818+ * Upon reception of an event(s) front may confirm its reception819819+ * for either each event, group of events or none.820820+ */821821+822822+struct xensnd_event_page {823823+ uint32_t in_cons;824824+ uint32_t in_prod;825825+ uint8_t reserved[56];826826+};827827+828828+#define XENSND_EVENT_PAGE_SIZE XEN_PAGE_SIZE829829+#define XENSND_IN_RING_OFFS (sizeof(struct xensnd_event_page))830830+#define XENSND_IN_RING_SIZE (XENSND_EVENT_PAGE_SIZE - XENSND_IN_RING_OFFS)831831+#define XENSND_IN_RING_LEN (XENSND_IN_RING_SIZE / sizeof(struct xensnd_evt))832832+#define XENSND_IN_RING(page) \833833+ ((struct xensnd_evt *)((char *)(page) + XENSND_IN_RING_OFFS))834834+#define XENSND_IN_RING_REF(page, idx) \835835+ (XENSND_IN_RING((page))[(idx) % XENSND_IN_RING_LEN])10388361039837#endif /* __XEN_PUBLIC_IO_SNDIF_H__ */
+11-14
kernel/events/callchain.c
···119119 goto exit;120120 }121121122122- if (count > 1) {123123- /* If the allocation failed, give up */124124- if (!callchain_cpus_entries)125125- err = -ENOMEM;126126- /*127127- * If requesting per event more than the global cap,128128- * return a different error to help userspace figure129129- * this out.130130- *131131- * And also do it here so that we have &callchain_mutex held.132132- */133133- if (event_max_stack > sysctl_perf_event_max_stack)134134- err = -EOVERFLOW;122122+ /*123123+ * If requesting per event more than the global cap,124124+ * return a different error to help userspace figure125125+ * this out.126126+ *127127+ * And also do it here so that we have &callchain_mutex held.128128+ */129129+ if (event_max_stack > sysctl_perf_event_max_stack) {130130+ err = -EOVERFLOW;135131 goto exit;136132 }137133138138- err = alloc_callchain_buffers();134134+ if (count == 1)135135+ err = alloc_callchain_buffers();139136exit:140137 if (err)141138 atomic_dec(&nr_callchain_events);
+6-2
kernel/events/core.c
···75877587 },75887588 };7589758975907590+ if (!sched_in && task->state == TASK_RUNNING)75917591+ switch_event.event_id.header.misc |=75927592+ PERF_RECORD_MISC_SWITCH_OUT_PREEMPT;75937593+75907594 perf_iterate_sb(perf_event_switch_output,75917595 &switch_event,75927596 NULL);···1020910205 * __u16 sample size limit.1021010206 */1021110207 if (attr->sample_stack_user >= USHRT_MAX)1021210212- ret = -EINVAL;1020810208+ return -EINVAL;1021310209 else if (!IS_ALIGNED(attr->sample_stack_user, sizeof(u64)))1021410214- ret = -EINVAL;1021010210+ return -EINVAL;1021510211 }10216102121021710213 if (!attr->sample_max_stack)
+1-2
kernel/fork.c
···216216 if (!s)217217 continue;218218219219-#ifdef CONFIG_DEBUG_KMEMLEAK220219 /* Clear stale pointers from reused stack. */221220 memset(s->addr, 0, THREAD_SIZE);222222-#endif221221+223222 tsk->stack_vm_area = s;224223 return s->addr;225224 }
+71-37
kernel/livepatch/shadow.c
···113113}114114EXPORT_SYMBOL_GPL(klp_shadow_get);115115116116-static void *__klp_shadow_get_or_alloc(void *obj, unsigned long id, void *data,117117- size_t size, gfp_t gfp_flags, bool warn_on_exist)116116+static void *__klp_shadow_get_or_alloc(void *obj, unsigned long id,117117+ size_t size, gfp_t gfp_flags,118118+ klp_shadow_ctor_t ctor, void *ctor_data,119119+ bool warn_on_exist)118120{119121 struct klp_shadow *new_shadow;120122 void *shadow_data;···127125 if (shadow_data)128126 goto exists;129127130130- /* Allocate a new shadow variable for use inside the lock below */128128+ /*129129+ * Allocate a new shadow variable. Fill it with zeroes by default.130130+ * More complex setting can be done by @ctor function. But it is131131+ * called only when the buffer is really used (under klp_shadow_lock).132132+ */131133 new_shadow = kzalloc(size + sizeof(*new_shadow), gfp_flags);132134 if (!new_shadow)133135 return NULL;134134-135135- new_shadow->obj = obj;136136- new_shadow->id = id;137137-138138- /* Initialize the shadow variable if data provided */139139- if (data)140140- memcpy(new_shadow->data, data, size);141136142137 /* Look for <obj, id> again under the lock */143138 spin_lock_irqsave(&klp_shadow_lock, flags);···147148 spin_unlock_irqrestore(&klp_shadow_lock, flags);148149 kfree(new_shadow);149150 goto exists;151151+ }152152+153153+ new_shadow->obj = obj;154154+ new_shadow->id = id;155155+156156+ if (ctor) {157157+ int err;158158+159159+ err = ctor(obj, new_shadow->data, ctor_data);160160+ if (err) {161161+ spin_unlock_irqrestore(&klp_shadow_lock, flags);162162+ kfree(new_shadow);163163+ pr_err("Failed to construct shadow variable <%p, %lx> (%d)\n",164164+ obj, id, err);165165+ return NULL;166166+ }150167 }151168152169 /* No <obj, id> found, so attach the newly allocated one */···185170 * klp_shadow_alloc() - allocate and add a new shadow variable186171 * @obj: pointer to parent object187172 * @id: data identifier188188- * @data: pointer to data to attach to parent189173 * @size: size of attached data190174 * @gfp_flags: GFP mask for allocation175175+ * @ctor: custom constructor to initialize the shadow data (optional)176176+ * @ctor_data: pointer to any data needed by @ctor (optional)191177 *192192- * Allocates @size bytes for new shadow variable data using @gfp_flags193193- * and copies @size bytes from @data into the new shadow variable's own194194- * data space. If @data is NULL, @size bytes are still allocated, but195195- * no copy is performed. The new shadow variable is then added to the196196- * global hashtable.178178+ * Allocates @size bytes for new shadow variable data using @gfp_flags.179179+ * The data are zeroed by default. They are further initialized by @ctor180180+ * function if it is not NULL. The new shadow variable is then added181181+ * to the global hashtable.197182 *198198- * If an existing <obj, id> shadow variable can be found, this routine199199- * will issue a WARN, exit early and return NULL.183183+ * If an existing <obj, id> shadow variable can be found, this routine will184184+ * issue a WARN, exit early and return NULL.185185+ *186186+ * This function guarantees that the constructor function is called only when187187+ * the variable did not exist before. The cost is that @ctor is called188188+ * in atomic context under a spin lock.200189 *201190 * Return: the shadow variable data element, NULL on duplicate or202191 * failure.203192 */204204-void *klp_shadow_alloc(void *obj, unsigned long id, void *data,205205- size_t size, gfp_t gfp_flags)193193+void *klp_shadow_alloc(void *obj, unsigned long id,194194+ size_t size, gfp_t gfp_flags,195195+ klp_shadow_ctor_t ctor, void *ctor_data)206196{207207- return __klp_shadow_get_or_alloc(obj, id, data, size, gfp_flags, true);197197+ return __klp_shadow_get_or_alloc(obj, id, size, gfp_flags,198198+ ctor, ctor_data, true);208199}209200EXPORT_SYMBOL_GPL(klp_shadow_alloc);210201···218197 * klp_shadow_get_or_alloc() - get existing or allocate a new shadow variable219198 * @obj: pointer to parent object220199 * @id: data identifier221221- * @data: pointer to data to attach to parent222200 * @size: size of attached data223201 * @gfp_flags: GFP mask for allocation202202+ * @ctor: custom constructor to initialize the shadow data (optional)203203+ * @ctor_data: pointer to any data needed by @ctor (optional)224204 *225205 * Returns a pointer to existing shadow data if an <obj, id> shadow226206 * variable is already present. Otherwise, it creates a new shadow227207 * variable like klp_shadow_alloc().228208 *229229- * This function guarantees that only one shadow variable exists with230230- * the given @id for the given @obj. It also guarantees that the shadow231231- * variable will be initialized by the given @data only when it did not232232- * exist before.209209+ * This function guarantees that only one shadow variable exists with the given210210+ * @id for the given @obj. It also guarantees that the constructor function211211+ * will be called only when the variable did not exist before. The cost is212212+ * that @ctor is called in atomic context under a spin lock.233213 *234214 * Return: the shadow variable data element, NULL on failure.235215 */236236-void *klp_shadow_get_or_alloc(void *obj, unsigned long id, void *data,237237- size_t size, gfp_t gfp_flags)216216+void *klp_shadow_get_or_alloc(void *obj, unsigned long id,217217+ size_t size, gfp_t gfp_flags,218218+ klp_shadow_ctor_t ctor, void *ctor_data)238219{239239- return __klp_shadow_get_or_alloc(obj, id, data, size, gfp_flags, false);220220+ return __klp_shadow_get_or_alloc(obj, id, size, gfp_flags,221221+ ctor, ctor_data, false);240222}241223EXPORT_SYMBOL_GPL(klp_shadow_get_or_alloc);224224+225225+static void klp_shadow_free_struct(struct klp_shadow *shadow,226226+ klp_shadow_dtor_t dtor)227227+{228228+ hash_del_rcu(&shadow->node);229229+ if (dtor)230230+ dtor(shadow->obj, shadow->data);231231+ kfree_rcu(shadow, rcu_head);232232+}242233243234/**244235 * klp_shadow_free() - detach and free a <obj, id> shadow variable245236 * @obj: pointer to parent object246237 * @id: data identifier238238+ * @dtor: custom callback that can be used to unregister the variable239239+ * and/or free data that the shadow variable points to (optional)247240 *248241 * This function releases the memory for this <obj, id> shadow variable249242 * instance, callers should stop referencing it accordingly.250243 */251251-void klp_shadow_free(void *obj, unsigned long id)244244+void klp_shadow_free(void *obj, unsigned long id, klp_shadow_dtor_t dtor)252245{253246 struct klp_shadow *shadow;254247 unsigned long flags;···274239 (unsigned long)obj) {275240276241 if (klp_shadow_match(shadow, obj, id)) {277277- hash_del_rcu(&shadow->node);278278- kfree_rcu(shadow, rcu_head);242242+ klp_shadow_free_struct(shadow, dtor);279243 break;280244 }281245 }···286252/**287253 * klp_shadow_free_all() - detach and free all <*, id> shadow variables288254 * @id: data identifier255255+ * @dtor: custom callback that can be used to unregister the variable256256+ * and/or free data that the shadow variable points to (optional)289257 *290258 * This function releases the memory for all <*, id> shadow variable291259 * instances, callers should stop referencing them accordingly.292260 */293293-void klp_shadow_free_all(unsigned long id)261261+void klp_shadow_free_all(unsigned long id, klp_shadow_dtor_t dtor)294262{295263 struct klp_shadow *shadow;296264 unsigned long flags;···302266303267 /* Delete all <*, id> from hash */304268 hash_for_each(klp_shadow_hash, i, shadow, node) {305305- if (klp_shadow_match(shadow, shadow->obj, id)) {306306- hash_del_rcu(&shadow->node);307307- kfree_rcu(shadow, rcu_head);308308- }269269+ if (klp_shadow_match(shadow, shadow->obj, id))270270+ klp_shadow_free_struct(shadow, dtor);309271 }310272311273 spin_unlock_irqrestore(&klp_shadow_lock, flags);
+3-1
kernel/time/posix-cpu-timers.c
···12051205 u64 *newval, u64 *oldval)12061206{12071207 u64 now;12081208+ int ret;1208120912091210 WARN_ON_ONCE(clock_idx == CPUCLOCK_SCHED);12111211+ ret = cpu_timer_sample_group(clock_idx, tsk, &now);1210121212111211- if (oldval && cpu_timer_sample_group(clock_idx, tsk, &now) != -EINVAL) {12131213+ if (oldval && ret != -EINVAL) {12121214 /*12131215 * We are setting itimer. The *oldval is absolute and we update12141216 * it to be relative, *newval argument is relative and we update
+5-6
kernel/time/tick-oneshot.c
···8282 if (!dev || !(dev->features & CLOCK_EVT_FEAT_ONESHOT) ||8383 !tick_device_is_functional(dev)) {84848585- printk(KERN_INFO "Clockevents: "8686- "could not switch to one-shot mode:");8585+ pr_info("Clockevents: could not switch to one-shot mode:");8786 if (!dev) {8888- printk(" no tick device\n");8787+ pr_cont(" no tick device\n");8988 } else {9089 if (!tick_device_is_functional(dev))9191- printk(" %s is not functional.\n", dev->name);9090+ pr_cont(" %s is not functional.\n", dev->name);9291 else9393- printk(" %s does not support one-shot mode.\n",9494- dev->name);9292+ pr_cont(" %s does not support one-shot mode.\n",9393+ dev->name);9594 }9695 return -EINVAL;9796 }
···512512 if (ret == 0)513513 tk->tp.flags |= TP_FLAG_REGISTERED;514514 else {515515- pr_warn("Could not insert probe at %s+%lu: %d\n",516516- trace_kprobe_symbol(tk), trace_kprobe_offset(tk), ret);517515 if (ret == -ENOENT && trace_kprobe_is_on_module(tk)) {518516 pr_warn("This probe might be able to register after target module is loaded. Continue.\n");519517 ret = 0;
+23-17
lib/textsearch.c
···1010 * Pablo Neira Ayuso <pablo@netfilter.org>1111 *1212 * ==========================================================================1313- *1313+ */1414+1515+/**1616+ * DOC: ts_intro1417 * INTRODUCTION1518 *1619 * The textsearch infrastructure provides text searching facilities for···2219 *2320 * ARCHITECTURE2421 *2525- * User2222+ * .. code-block:: none2323+ *2424+ * User2625 * +----------------+2726 * | finish()|<--------------(6)-----------------+2827 * |get_next_block()|<--------------(5)---------------+ |···3833 * | (3)|----->| find()/next() |-----------+ |3934 * | (7)|----->| destroy() |----------------------+4035 * +----------------+ +---------------+4141- * 4242- * (1) User configures a search by calling _prepare() specifying the4343- * search parameters such as the pattern and algorithm name.3636+ *3737+ * (1) User configures a search by calling textsearch_prepare() specifying3838+ * the search parameters such as the pattern and algorithm name.4439 * (2) Core requests the algorithm to allocate and initialize a search4540 * configuration according to the specified parameters.4646- * (3) User starts the search(es) by calling _find() or _next() to4747- * fetch subsequent occurrences. A state variable is provided4848- * to the algorithm to store persistent variables.4141+ * (3) User starts the search(es) by calling textsearch_find() or4242+ * textsearch_next() to fetch subsequent occurrences. A state variable4343+ * is provided to the algorithm to store persistent variables.4944 * (4) Core eventually resets the search offset and forwards the find()5045 * request to the algorithm.5146 * (5) Algorithm calls get_next_block() provided by the user continuously5247 * to fetch the data to be searched in block by block.5348 * (6) Algorithm invokes finish() after the last call to get_next_block5449 * to clean up any leftovers from get_next_block. (Optional)5555- * (7) User destroys the configuration by calling _destroy().5050+ * (7) User destroys the configuration by calling textsearch_destroy().5651 * (8) Core notifies the algorithm to destroy algorithm specific5752 * allocations. (Optional)5853 *···6762 * amount of times and even in parallel as long as a separate struct6863 * ts_state variable is provided to every instance.6964 *7070- * The actual search is performed by either calling textsearch_find_-7171- * continuous() for linear data or by providing an own get_next_block()7272- * implementation and calling textsearch_find(). Both functions return6565+ * The actual search is performed by either calling6666+ * textsearch_find_continuous() for linear data or by providing6767+ * an own get_next_block() implementation and6868+ * calling textsearch_find(). Both functions return7369 * the position of the first occurrence of the pattern or UINT_MAX if7470 * no match was found. Subsequent occurrences can be found by calling7571 * textsearch_next() regardless of the linearity of the data.···7872 * Once you're done using a configuration it must be given back via7973 * textsearch_destroy.8074 *8181- * EXAMPLE7575+ * EXAMPLE::8276 *8377 * int pos;8478 * struct ts_config *conf;···9387 * goto errout;9488 * }9589 *9696- * pos = textsearch_find_continuous(conf, &state, example, strlen(example));9090+ * pos = textsearch_find_continuous(conf, \&state, example, strlen(example));9791 * if (pos != UINT_MAX)9898- * panic("Oh my god, dancing chickens at %d\n", pos);9292+ * panic("Oh my god, dancing chickens at \%d\n", pos);9993 *10094 * textsearch_destroy(conf);101101- * ==========================================================================10295 */9696+/* ========================================================================== */1039710498#include <linux/module.h>10599#include <linux/types.h>···231225 *232226 * Returns the position of first occurrence of the pattern or233227 * %UINT_MAX if no occurrence was found.234234- */ 228228+ */235229unsigned int textsearch_find_continuous(struct ts_config *conf,236230 struct ts_state *state,237231 const void *data, unsigned int len)
+4-5
mm/filemap.c
···786786 VM_BUG_ON_PAGE(!PageLocked(new), new);787787 VM_BUG_ON_PAGE(new->mapping, new);788788789789- error = radix_tree_preload(gfp_mask & ~__GFP_HIGHMEM);789789+ error = radix_tree_preload(gfp_mask & GFP_RECLAIM_MASK);790790 if (!error) {791791 struct address_space *mapping = old->mapping;792792 void (*freepage)(struct page *);···842842 return error;843843 }844844845845- error = radix_tree_maybe_preload(gfp_mask & ~__GFP_HIGHMEM);845845+ error = radix_tree_maybe_preload(gfp_mask & GFP_RECLAIM_MASK);846846 if (error) {847847 if (!huge)848848 mem_cgroup_cancel_charge(page, memcg, false);···15851585 if (fgp_flags & FGP_ACCESSED)15861586 __SetPageReferenced(page);1587158715881588- err = add_to_page_cache_lru(page, mapping, offset,15891589- gfp_mask & GFP_RECLAIM_MASK);15881588+ err = add_to_page_cache_lru(page, mapping, offset, gfp_mask);15901589 if (unlikely(err)) {15911590 put_page(page);15921591 page = NULL;···23862387 if (!page)23872388 return -ENOMEM;2388238923892389- ret = add_to_page_cache_lru(page, mapping, offset, gfp_mask & GFP_KERNEL);23902390+ ret = add_to_page_cache_lru(page, mapping, offset, gfp_mask);23902391 if (ret == 0)23912392 ret = mapping->a_ops->readpage(file, page);23922393 else if (ret == -EEXIST)
···1551155115521552static void pppol2tp_next_tunnel(struct net *net, struct pppol2tp_seq_data *pd)15531553{15541554+ /* Drop reference taken during previous invocation */15551555+ if (pd->tunnel)15561556+ l2tp_tunnel_dec_refcount(pd->tunnel);15571557+15541558 for (;;) {15551555- pd->tunnel = l2tp_tunnel_find_nth(net, pd->tunnel_idx);15591559+ pd->tunnel = l2tp_tunnel_get_nth(net, pd->tunnel_idx);15561560 pd->tunnel_idx++;1557156115581558- if (pd->tunnel == NULL)15591559- break;15621562+ /* Only accept L2TPv2 tunnels */15631563+ if (!pd->tunnel || pd->tunnel->version == 2)15641564+ return;1560156515611561- /* Ignore L2TPv3 tunnels */15621562- if (pd->tunnel->version < 3)15631563- break;15661566+ l2tp_tunnel_dec_refcount(pd->tunnel);15641567 }15651568}15661569···1612160916131610static void pppol2tp_seq_stop(struct seq_file *p, void *v)16141611{16151615- /* nothing to do */16121612+ struct pppol2tp_seq_data *pd = v;16131613+16141614+ if (!pd || pd == SEQ_START_TOKEN)16151615+ return;16161616+16171617+ /* Drop reference taken by last invocation of pppol2tp_next_tunnel() */16181618+ if (pd->tunnel)16191619+ l2tp_tunnel_dec_refcount(pd->tunnel);16161620}1617162116181622static void pppol2tp_seq_tunnel_show(struct seq_file *m, void *v)
+7
net/llc/af_llc.c
···189189{190190 struct sock *sk = sock->sk;191191 struct llc_sock *llc;192192+ struct llc_sap *sap;192193193194 if (unlikely(sk == NULL))194195 goto out;···200199 llc->laddr.lsap, llc->daddr.lsap);201200 if (!llc_send_disc(sk))202201 llc_ui_wait_for_disc(sk, sk->sk_rcvtimeo);202202+ sap = llc->sap;203203+ /* Hold this for release_sock(), so that llc_backlog_rcv() could still204204+ * use it.205205+ */206206+ llc_sap_hold(sap);203207 if (!sock_flag(sk, SOCK_ZAPPED))204208 llc_sap_remove_socket(llc->sap, sk);205209 release_sock(sk);210210+ llc_sap_put(sap);206211 if (llc->dev)207212 dev_put(llc->dev);208213 sock_put(sk);
+14-9
net/packet/af_packet.c
···3008300830093009 packet_flush_mclist(sk);3010301030113011+ lock_sock(sk);30113012 if (po->rx_ring.pg_vec) {30123013 memset(&req_u, 0, sizeof(req_u));30133014 packet_set_ring(sk, &req_u, 1, 0);···30183017 memset(&req_u, 0, sizeof(req_u));30193018 packet_set_ring(sk, &req_u, 1, 1);30203019 }30203020+ release_sock(sk);3021302130223022 f = fanout_release(sk);30233023···36453643 union tpacket_req_u req_u;36463644 int len;3647364536463646+ lock_sock(sk);36483647 switch (po->tp_version) {36493648 case TPACKET_V1:36503649 case TPACKET_V2:···36563653 len = sizeof(req_u.req3);36573654 break;36583655 }36593659- if (optlen < len)36603660- return -EINVAL;36613661- if (copy_from_user(&req_u.req, optval, len))36623662- return -EFAULT;36633663- return packet_set_ring(sk, &req_u, 0,36643664- optname == PACKET_TX_RING);36563656+ if (optlen < len) {36573657+ ret = -EINVAL;36583658+ } else {36593659+ if (copy_from_user(&req_u.req, optval, len))36603660+ ret = -EFAULT;36613661+ else36623662+ ret = packet_set_ring(sk, &req_u, 0,36633663+ optname == PACKET_TX_RING);36643664+ }36653665+ release_sock(sk);36663666+ return ret;36653667 }36663668 case PACKET_COPY_THRESH:36673669 {···42164208 /* Added to avoid minimal code churn */42174209 struct tpacket_req *req = &req_u->req;4218421042194219- lock_sock(sk);42204220-42214211 rb = tx_ring ? &po->tx_ring : &po->rx_ring;42224212 rb_queue = tx_ring ? &sk->sk_write_queue : &sk->sk_receive_queue;42234213···43534347 if (pg_vec)43544348 free_pg_vec(pg_vec, order, req->tp_block_nr);43554349out:43564356- release_sock(sk);43574350 return err;43584351}43594352
···556556 addr->v6.sin6_scope_id = 0;557557}558558559559+static int __sctp_v6_cmp_addr(const union sctp_addr *addr1,560560+ const union sctp_addr *addr2)561561+{562562+ if (addr1->sa.sa_family != addr2->sa.sa_family) {563563+ if (addr1->sa.sa_family == AF_INET &&564564+ addr2->sa.sa_family == AF_INET6 &&565565+ ipv6_addr_v4mapped(&addr2->v6.sin6_addr) &&566566+ addr2->v6.sin6_addr.s6_addr32[3] ==567567+ addr1->v4.sin_addr.s_addr)568568+ return 1;569569+570570+ if (addr2->sa.sa_family == AF_INET &&571571+ addr1->sa.sa_family == AF_INET6 &&572572+ ipv6_addr_v4mapped(&addr1->v6.sin6_addr) &&573573+ addr1->v6.sin6_addr.s6_addr32[3] ==574574+ addr2->v4.sin_addr.s_addr)575575+ return 1;576576+577577+ return 0;578578+ }579579+580580+ if (!ipv6_addr_equal(&addr1->v6.sin6_addr, &addr2->v6.sin6_addr))581581+ return 0;582582+583583+ /* If this is a linklocal address, compare the scope_id. */584584+ if ((ipv6_addr_type(&addr1->v6.sin6_addr) & IPV6_ADDR_LINKLOCAL) &&585585+ addr1->v6.sin6_scope_id && addr2->v6.sin6_scope_id &&586586+ addr1->v6.sin6_scope_id != addr2->v6.sin6_scope_id)587587+ return 0;588588+589589+ return 1;590590+}591591+559592/* Compare addresses exactly.560593 * v4-mapped-v6 is also in consideration.561594 */562595static int sctp_v6_cmp_addr(const union sctp_addr *addr1,563596 const union sctp_addr *addr2)564597{565565- if (addr1->sa.sa_family != addr2->sa.sa_family) {566566- if (addr1->sa.sa_family == AF_INET &&567567- addr2->sa.sa_family == AF_INET6 &&568568- ipv6_addr_v4mapped(&addr2->v6.sin6_addr)) {569569- if (addr2->v6.sin6_port == addr1->v4.sin_port &&570570- addr2->v6.sin6_addr.s6_addr32[3] ==571571- addr1->v4.sin_addr.s_addr)572572- return 1;573573- }574574- if (addr2->sa.sa_family == AF_INET &&575575- addr1->sa.sa_family == AF_INET6 &&576576- ipv6_addr_v4mapped(&addr1->v6.sin6_addr)) {577577- if (addr1->v6.sin6_port == addr2->v4.sin_port &&578578- addr1->v6.sin6_addr.s6_addr32[3] ==579579- addr2->v4.sin_addr.s_addr)580580- return 1;581581- }582582- return 0;583583- }584584- if (addr1->v6.sin6_port != addr2->v6.sin6_port)585585- return 0;586586- if (!ipv6_addr_equal(&addr1->v6.sin6_addr, &addr2->v6.sin6_addr))587587- return 0;588588- /* If this is a linklocal address, compare the scope_id. */589589- if (ipv6_addr_type(&addr1->v6.sin6_addr) & IPV6_ADDR_LINKLOCAL) {590590- if (addr1->v6.sin6_scope_id && addr2->v6.sin6_scope_id &&591591- (addr1->v6.sin6_scope_id != addr2->v6.sin6_scope_id)) {592592- return 0;593593- }594594- }595595-596596- return 1;598598+ return __sctp_v6_cmp_addr(addr1, addr2) &&599599+ addr1->v6.sin6_port == addr2->v6.sin6_port;597600}598601599602/* Initialize addr struct to INADDR_ANY. */···878875 const union sctp_addr *addr2,879876 struct sctp_sock *opt)880877{881881- struct sctp_af *af1, *af2;882878 struct sock *sk = sctp_opt2sk(opt);879879+ struct sctp_af *af1, *af2;883880884881 af1 = sctp_get_af_specific(addr1->sa.sa_family);885882 af2 = sctp_get_af_specific(addr2->sa.sa_family);···895892 if (sctp_is_any(sk, addr1) || sctp_is_any(sk, addr2))896893 return 1;897894898898- if (addr1->sa.sa_family != addr2->sa.sa_family)899899- return 0;900900-901901- return af1->cmp_addr(addr1, addr2);895895+ return __sctp_v6_cmp_addr(addr1, addr2);902896}903897904898/* Verify that the provided sockaddr looks bindable. Common verification,
+4-6
net/smc/af_smc.c
···12591259 rc = smc_close_shutdown_write(smc);12601260 break;12611261 case SHUT_RD:12621262- if (sk->sk_state == SMC_LISTEN)12631263- rc = smc_close_active(smc);12641264- else12651265- rc = 0;12661266- /* nothing more to do because peer is not involved */12621262+ rc = 0;12631263+ /* nothing more to do because peer is not involved */12671264 break;12681265 }12691269- rc1 = kernel_sock_shutdown(smc->clcsock, how);12661266+ if (smc->clcsock)12671267+ rc1 = kernel_sock_shutdown(smc->clcsock, how);12701268 /* map sock_shutdown_cmd constants to sk_shutdown value range */12711269 sk->sk_shutdown |= how + 1;12721270
+3-4
net/strparser/strparser.c
···296296 strp_start_timer(strp, timeo);297297 }298298299299+ stm->accum_len += cand_len;299300 strp->need_bytes = stm->strp.full_len -300301 stm->accum_len;301301- stm->accum_len += cand_len;302302 stm->early_eaten = cand_len;303303 STRP_STATS_ADD(strp->stats.bytes, cand_len);304304 desc->count = 0; /* Stop reading socket */···321321 /* Hurray, we have a new message! */322322 cancel_delayed_work(&strp->msg_timer_work);323323 strp->skb_head = NULL;324324+ strp->need_bytes = 0;324325 STRP_STATS_INCR(strp->stats.msgs);325326326327 /* Give skb to upper layer */···411410 return;412411413412 if (strp->need_bytes) {414414- if (strp_peek_len(strp) >= strp->need_bytes)415415- strp->need_bytes = 0;416416- else413413+ if (strp_peek_len(strp) < strp->need_bytes)417414 return;418415 }419416
···20182018}20192019EXPORT_SYMBOL_GPL(vsock_core_get_transport);2020202020212021+static void __exit vsock_exit(void)20222022+{20232023+ /* Do nothing. This function makes this module removable. */20242024+}20252025+20212026module_init(vsock_init_tables);20272027+module_exit(vsock_exit);2022202820232029MODULE_AUTHOR("VMware, Inc.");20242030MODULE_DESCRIPTION("VMware Virtual Socket Family");
+32-11
samples/livepatch/livepatch-shadow-fix1.c
···5656 unsigned long jiffies_expire;5757};58585959+/*6060+ * The constructor makes more sense together with klp_shadow_get_or_alloc().6161+ * In this example, it would be safe to assign the pointer also to the shadow6262+ * variable returned by klp_shadow_alloc(). But we wanted to show the more6363+ * complicated use of the API.6464+ */6565+static int shadow_leak_ctor(void *obj, void *shadow_data, void *ctor_data)6666+{6767+ void **shadow_leak = shadow_data;6868+ void *leak = ctor_data;6969+7070+ *shadow_leak = leak;7171+ return 0;7272+}7373+5974struct dummy *livepatch_fix1_dummy_alloc(void)6075{6176 struct dummy *d;···8974 * pointer to handle resource release.9075 */9176 leak = kzalloc(sizeof(int), GFP_KERNEL);9292- klp_shadow_alloc(d, SV_LEAK, &leak, sizeof(leak), GFP_KERNEL);7777+ klp_shadow_alloc(d, SV_LEAK, sizeof(leak), GFP_KERNEL,7878+ shadow_leak_ctor, leak);93799480 pr_info("%s: dummy @ %p, expires @ %lx\n",9581 __func__, d, d->jiffies_expire);···9882 return d;9983}100848585+static void livepatch_fix1_dummy_leak_dtor(void *obj, void *shadow_data)8686+{8787+ void *d = obj;8888+ void **shadow_leak = shadow_data;8989+9090+ kfree(*shadow_leak);9191+ pr_info("%s: dummy @ %p, prevented leak @ %p\n",9292+ __func__, d, *shadow_leak);9393+}9494+10195void livepatch_fix1_dummy_free(struct dummy *d)10296{103103- void **shadow_leak, *leak;9797+ void **shadow_leak;1049810599 /*106100 * Patch: fetch the saved SV_LEAK shadow variable, detach and···11993 * was loaded.)12094 */12195 shadow_leak = klp_shadow_get(d, SV_LEAK);122122- if (shadow_leak) {123123- leak = *shadow_leak;124124- klp_shadow_free(d, SV_LEAK);125125- kfree(leak);126126- pr_info("%s: dummy @ %p, prevented leak @ %p\n",127127- __func__, d, leak);128128- } else {9696+ if (shadow_leak)9797+ klp_shadow_free(d, SV_LEAK, livepatch_fix1_dummy_leak_dtor);9898+ else12999 pr_info("%s: dummy @ %p leaked!\n", __func__, d);130130- }131100132101 kfree(d);133102}···168147static void livepatch_shadow_fix1_exit(void)169148{170149 /* Cleanup any existing SV_LEAK shadow variables */171171- klp_shadow_free_all(SV_LEAK);150150+ klp_shadow_free_all(SV_LEAK, livepatch_fix1_dummy_leak_dtor);172151173152 WARN_ON(klp_unregister_patch(&patch));174153}
+18-15
samples/livepatch/livepatch-shadow-fix2.c
···5353bool livepatch_fix2_dummy_check(struct dummy *d, unsigned long jiffies)5454{5555 int *shadow_count;5656- int count;57565857 /*5958 * Patch: handle in-flight dummy structures, if they do not6059 * already have a SV_COUNTER shadow variable, then attach a6160 * new one.6261 */6363- count = 0;6462 shadow_count = klp_shadow_get_or_alloc(d, SV_COUNTER,6565- &count, sizeof(count),6666- GFP_NOWAIT);6363+ sizeof(*shadow_count), GFP_NOWAIT,6464+ NULL, NULL);6765 if (shadow_count)6866 *shadow_count += 1;69677068 return time_after(jiffies, d->jiffies_expire);7169}72707171+static void livepatch_fix2_dummy_leak_dtor(void *obj, void *shadow_data)7272+{7373+ void *d = obj;7474+ void **shadow_leak = shadow_data;7575+7676+ kfree(*shadow_leak);7777+ pr_info("%s: dummy @ %p, prevented leak @ %p\n",7878+ __func__, d, *shadow_leak);7979+}8080+7381void livepatch_fix2_dummy_free(struct dummy *d)7482{7575- void **shadow_leak, *leak;8383+ void **shadow_leak;7684 int *shadow_count;77857886 /* Patch: copy the memory leak patch from the fix1 module. */7987 shadow_leak = klp_shadow_get(d, SV_LEAK);8080- if (shadow_leak) {8181- leak = *shadow_leak;8282- klp_shadow_free(d, SV_LEAK);8383- kfree(leak);8484- pr_info("%s: dummy @ %p, prevented leak @ %p\n",8585- __func__, d, leak);8686- } else {8888+ if (shadow_leak)8989+ klp_shadow_free(d, SV_LEAK, livepatch_fix2_dummy_leak_dtor);9090+ else8791 pr_info("%s: dummy @ %p leaked!\n", __func__, d);8888- }89929093 /*9194 * Patch: fetch the SV_COUNTER shadow variable and display···9895 if (shadow_count) {9996 pr_info("%s: dummy @ %p, check counter = %d\n",10097 __func__, d, *shadow_count);101101- klp_shadow_free(d, SV_COUNTER);9898+ klp_shadow_free(d, SV_COUNTER, NULL);10299 }103100104101 kfree(d);···145142static void livepatch_shadow_fix2_exit(void)146143{147144 /* Cleanup any existing SV_COUNTER shadow variables */148148- klp_shadow_free_all(SV_COUNTER);145145+ klp_shadow_free_all(SV_COUNTER, NULL);149146150147 WARN_ON(klp_unregister_patch(&patch));151148}
+1-1
sound/core/control.c
···14921492 int op_flag)14931493{14941494 struct snd_ctl_tlv header;14951495- unsigned int *container;14951495+ unsigned int __user *container;14961496 unsigned int container_size;14971497 struct snd_kcontrol *kctl;14981498 struct snd_ctl_elem_id id;
+4-3
sound/core/pcm_compat.c
···2727 s32 __user *src)2828{2929 snd_pcm_sframes_t delay;3030+ int err;30313131- delay = snd_pcm_delay(substream);3232- if (delay < 0)3333- return delay;3232+ err = snd_pcm_delay(substream, &delay);3333+ if (err)3434+ return err;3435 if (put_user(delay, src))3536 return -EFAULT;3637 return 0;
+15-15
sound/core/pcm_native.c
···26542654 return err;26552655}2656265626572657-static snd_pcm_sframes_t snd_pcm_delay(struct snd_pcm_substream *substream)26572657+static int snd_pcm_delay(struct snd_pcm_substream *substream,26582658+ snd_pcm_sframes_t *delay)26582659{26592660 int err;26602661 snd_pcm_sframes_t n = 0;···26652664 if (!err)26662665 n = snd_pcm_calc_delay(substream);26672666 snd_pcm_stream_unlock_irq(substream);26682668- return err < 0 ? err : n;26672667+ if (!err)26682668+ *delay = n;26692669+ return err;26692670}2670267126712672static int snd_pcm_sync_ptr(struct snd_pcm_substream *substream,···27102707 sync_ptr.s.status.hw_ptr = status->hw_ptr;27112708 sync_ptr.s.status.tstamp = status->tstamp;27122709 sync_ptr.s.status.suspended_state = status->suspended_state;27102710+ sync_ptr.s.status.audio_tstamp = status->audio_tstamp;27132711 snd_pcm_stream_unlock_irq(substream);27142712 if (copy_to_user(_sync_ptr, &sync_ptr, sizeof(sync_ptr)))27152713 return -EFAULT;···28702866 return snd_pcm_hwsync(substream);28712867 case SNDRV_PCM_IOCTL_DELAY:28722868 {28732873- snd_pcm_sframes_t delay = snd_pcm_delay(substream);28692869+ snd_pcm_sframes_t delay;28742870 snd_pcm_sframes_t __user *res = arg;28712871+ int err;2875287228762876- if (delay < 0)28772877- return delay;28732873+ err = snd_pcm_delay(substream, &delay);28742874+ if (err)28752875+ return err;28782876 if (put_user(delay, res))28792877 return -EFAULT;28802878 return 0;···29642958 case SNDRV_PCM_IOCTL_DROP:29652959 return snd_pcm_drop(substream);29662960 case SNDRV_PCM_IOCTL_DELAY:29672967- {29682968- result = snd_pcm_delay(substream);29692969- if (result < 0)29702970- return result;29712971- *frames = result;29722972- return 0;29732973- }29612961+ return snd_pcm_delay(substream, frames);29742962 default:29752963 return -EINVAL;29762964 }···31483148/*31493149 * mmap status record31503150 */31513151-static int snd_pcm_mmap_status_fault(struct vm_fault *vmf)31513151+static vm_fault_t snd_pcm_mmap_status_fault(struct vm_fault *vmf)31523152{31533153 struct snd_pcm_substream *substream = vmf->vma->vm_private_data;31543154 struct snd_pcm_runtime *runtime;···31843184/*31853185 * mmap control record31863186 */31873187-static int snd_pcm_mmap_control_fault(struct vm_fault *vmf)31873187+static vm_fault_t snd_pcm_mmap_control_fault(struct vm_fault *vmf)31883188{31893189 struct snd_pcm_substream *substream = vmf->vma->vm_private_data;31903190 struct snd_pcm_runtime *runtime;···32733273/*32743274 * fault callback for mmapping a RAM page32753275 */32763276-static int snd_pcm_mmap_data_fault(struct vm_fault *vmf)32763276+static vm_fault_t snd_pcm_mmap_data_fault(struct vm_fault *vmf)32773277{32783278 struct snd_pcm_substream *substream = vmf->vma->vm_private_data;32793279 struct snd_pcm_runtime *runtime;
+12-6
sound/core/rawmidi_compat.c
···3636 struct snd_rawmidi_params params;3737 unsigned int val;38383939- if (rfile->output == NULL)4040- return -EINVAL;4139 if (get_user(params.stream, &src->stream) ||4240 get_user(params.buffer_size, &src->buffer_size) ||4341 get_user(params.avail_min, &src->avail_min) ||···4446 params.no_active_sensing = val;4547 switch (params.stream) {4648 case SNDRV_RAWMIDI_STREAM_OUTPUT:4949+ if (!rfile->output)5050+ return -EINVAL;4751 return snd_rawmidi_output_params(rfile->output, ¶ms);4852 case SNDRV_RAWMIDI_STREAM_INPUT:5353+ if (!rfile->input)5454+ return -EINVAL;4955 return snd_rawmidi_input_params(rfile->input, ¶ms);5056 }5157 return -EINVAL;···6967 int err;7068 struct snd_rawmidi_status status;71697272- if (rfile->output == NULL)7373- return -EINVAL;7470 if (get_user(status.stream, &src->stream))7571 return -EFAULT;76727773 switch (status.stream) {7874 case SNDRV_RAWMIDI_STREAM_OUTPUT:7575+ if (!rfile->output)7676+ return -EINVAL;7977 err = snd_rawmidi_output_status(rfile->output, &status);8078 break;8179 case SNDRV_RAWMIDI_STREAM_INPUT:8080+ if (!rfile->input)8181+ return -EINVAL;8282 err = snd_rawmidi_input_status(rfile->input, &status);8383 break;8484 default:···116112 int err;117113 struct snd_rawmidi_status status;118114119119- if (rfile->output == NULL)120120- return -EINVAL;121115 if (get_user(status.stream, &src->stream))122116 return -EFAULT;123117124118 switch (status.stream) {125119 case SNDRV_RAWMIDI_STREAM_OUTPUT:120120+ if (!rfile->output)121121+ return -EINVAL;126122 err = snd_rawmidi_output_status(rfile->output, &status);127123 break;128124 case SNDRV_RAWMIDI_STREAM_INPUT:125125+ if (!rfile->input)126126+ return -EINVAL;129127 err = snd_rawmidi_input_status(rfile->input, &status);130128 break;131129 default:
+9-6
sound/core/seq/oss/seq_oss_event.c
···2626#include <sound/seq_oss_legacy.h>2727#include "seq_oss_readq.h"2828#include "seq_oss_writeq.h"2929+#include <linux/nospec.h>293030313132/*···288287{289288 struct seq_oss_synthinfo *info;290289291291- if (!snd_seq_oss_synth_is_valid(dp, dev))290290+ info = snd_seq_oss_synth_info(dp, dev);291291+ if (!info)292292 return -ENXIO;293293294294- info = &dp->synths[dev];295294 switch (info->arg.event_passing) {296295 case SNDRV_SEQ_OSS_PROCESS_EVENTS:297296 if (! info->ch || ch < 0 || ch >= info->nr_voices) {···299298 return set_note_event(dp, dev, SNDRV_SEQ_EVENT_NOTEON, ch, note, vel, ev);300299 }301300301301+ ch = array_index_nospec(ch, info->nr_voices);302302 if (note == 255 && info->ch[ch].note >= 0) {303303 /* volume control */304304 int type;···349347{350348 struct seq_oss_synthinfo *info;351349352352- if (!snd_seq_oss_synth_is_valid(dp, dev))350350+ info = snd_seq_oss_synth_info(dp, dev);351351+ if (!info)353352 return -ENXIO;354353355355- info = &dp->synths[dev];356354 switch (info->arg.event_passing) {357355 case SNDRV_SEQ_OSS_PROCESS_EVENTS:358356 if (! info->ch || ch < 0 || ch >= info->nr_voices) {···360358 return set_note_event(dp, dev, SNDRV_SEQ_EVENT_NOTEON, ch, note, vel, ev);361359 }362360361361+ ch = array_index_nospec(ch, info->nr_voices);363362 if (info->ch[ch].note >= 0) {364363 note = info->ch[ch].note;365364 info->ch[ch].vel = 0;···384381static int385382set_note_event(struct seq_oss_devinfo *dp, int dev, int type, int ch, int note, int vel, struct snd_seq_event *ev)386383{387387- if (! snd_seq_oss_synth_is_valid(dp, dev))384384+ if (!snd_seq_oss_synth_info(dp, dev))388385 return -ENXIO;389386390387 ev->type = type;···402399static int403400set_control_event(struct seq_oss_devinfo *dp, int dev, int type, int ch, int param, int val, struct snd_seq_event *ev)404401{405405- if (! snd_seq_oss_synth_is_valid(dp, dev))402402+ if (!snd_seq_oss_synth_info(dp, dev))406403 return -ENXIO;407404408405 ev->type = type;
+2
sound/core/seq/oss/seq_oss_midi.c
···2929#include "../seq_lock.h"3030#include <linux/init.h>3131#include <linux/slab.h>3232+#include <linux/nospec.h>323333343435/*···316315{317316 if (dev < 0 || dev >= dp->max_mididev)318317 return NULL;318318+ dev = array_index_nospec(dev, dp->max_mididev);319319 return get_mdev(dev);320320}321321
+49-36
sound/core/seq/oss/seq_oss_synth.c
···2626#include <linux/init.h>2727#include <linux/module.h>2828#include <linux/slab.h>2929+#include <linux/nospec.h>29303031/*3132 * constants···340339 dp->max_synthdev = 0;341340}342341343343-/*344344- * check if the specified device is MIDI mapped device345345- */346346-static int347347-is_midi_dev(struct seq_oss_devinfo *dp, int dev)342342+static struct seq_oss_synthinfo *343343+get_synthinfo_nospec(struct seq_oss_devinfo *dp, int dev)348344{349345 if (dev < 0 || dev >= dp->max_synthdev)350350- return 0;351351- if (dp->synths[dev].is_midi)352352- return 1;353353- return 0;346346+ return NULL;347347+ dev = array_index_nospec(dev, SNDRV_SEQ_OSS_MAX_SYNTH_DEVS);348348+ return &dp->synths[dev];354349}355350356351/*···356359get_synthdev(struct seq_oss_devinfo *dp, int dev)357360{358361 struct seq_oss_synth *rec;359359- if (dev < 0 || dev >= dp->max_synthdev)362362+ struct seq_oss_synthinfo *info = get_synthinfo_nospec(dp, dev);363363+364364+ if (!info)360365 return NULL;361361- if (! dp->synths[dev].opened)366366+ if (!info->opened)362367 return NULL;363363- if (dp->synths[dev].is_midi)364364- return &midi_synth_dev;365365- if ((rec = get_sdev(dev)) == NULL)366366- return NULL;368368+ if (info->is_midi) {369369+ rec = &midi_synth_dev;370370+ snd_use_lock_use(&rec->use_lock);371371+ } else {372372+ rec = get_sdev(dev);373373+ if (!rec)374374+ return NULL;375375+ }367376 if (! rec->opened) {368377 snd_use_lock_free(&rec->use_lock);369378 return NULL;···405402 struct seq_oss_synth *rec;406403 struct seq_oss_synthinfo *info;407404408408- if (snd_BUG_ON(dev < 0 || dev >= dp->max_synthdev))409409- return;410410- info = &dp->synths[dev];411411- if (! info->opened)405405+ info = get_synthinfo_nospec(dp, dev);406406+ if (!info || !info->opened)412407 return;413408 if (info->sysex)414409 info->sysex->len = 0; /* reset sysex */···455454 const char __user *buf, int p, int c)456455{457456 struct seq_oss_synth *rec;457457+ struct seq_oss_synthinfo *info;458458 int rc;459459460460- if (dev < 0 || dev >= dp->max_synthdev)460460+ info = get_synthinfo_nospec(dp, dev);461461+ if (!info)461462 return -ENXIO;462463463463- if (is_midi_dev(dp, dev))464464+ if (info->is_midi)464465 return 0;465466 if ((rec = get_synthdev(dp, dev)) == NULL)466467 return -ENXIO;···470467 if (rec->oper.load_patch == NULL)471468 rc = -ENXIO;472469 else473473- rc = rec->oper.load_patch(&dp->synths[dev].arg, fmt, buf, p, c);470470+ rc = rec->oper.load_patch(&info->arg, fmt, buf, p, c);474471 snd_use_lock_free(&rec->use_lock);475472 return rc;476473}477474478475/*479479- * check if the device is valid synth device476476+ * check if the device is valid synth device and return the synth info480477 */481481-int482482-snd_seq_oss_synth_is_valid(struct seq_oss_devinfo *dp, int dev)478478+struct seq_oss_synthinfo *479479+snd_seq_oss_synth_info(struct seq_oss_devinfo *dp, int dev)483480{484481 struct seq_oss_synth *rec;482482+485483 rec = get_synthdev(dp, dev);486484 if (rec) {487485 snd_use_lock_free(&rec->use_lock);488488- return 1;486486+ return get_synthinfo_nospec(dp, dev);489487 }490490- return 0;488488+ return NULL;491489}492490493491···503499 int i, send;504500 unsigned char *dest;505501 struct seq_oss_synth_sysex *sysex;502502+ struct seq_oss_synthinfo *info;506503507507- if (! snd_seq_oss_synth_is_valid(dp, dev))504504+ info = snd_seq_oss_synth_info(dp, dev);505505+ if (!info)508506 return -ENXIO;509507510510- sysex = dp->synths[dev].sysex;508508+ sysex = info->sysex;511509 if (sysex == NULL) {512510 sysex = kzalloc(sizeof(*sysex), GFP_KERNEL);513511 if (sysex == NULL)514512 return -ENOMEM;515515- dp->synths[dev].sysex = sysex;513513+ info->sysex = sysex;516514 }517515518516 send = 0;···559553int560554snd_seq_oss_synth_addr(struct seq_oss_devinfo *dp, int dev, struct snd_seq_event *ev)561555{562562- if (! snd_seq_oss_synth_is_valid(dp, dev))556556+ struct seq_oss_synthinfo *info = snd_seq_oss_synth_info(dp, dev);557557+558558+ if (!info)563559 return -EINVAL;564564- snd_seq_oss_fill_addr(dp, ev, dp->synths[dev].arg.addr.client,565565- dp->synths[dev].arg.addr.port);560560+ snd_seq_oss_fill_addr(dp, ev, info->arg.addr.client,561561+ info->arg.addr.port);566562 return 0;567563}568564···576568snd_seq_oss_synth_ioctl(struct seq_oss_devinfo *dp, int dev, unsigned int cmd, unsigned long addr)577569{578570 struct seq_oss_synth *rec;571571+ struct seq_oss_synthinfo *info;579572 int rc;580573581581- if (is_midi_dev(dp, dev))574574+ info = get_synthinfo_nospec(dp, dev);575575+ if (!info || info->is_midi)582576 return -ENXIO;583577 if ((rec = get_synthdev(dp, dev)) == NULL)584578 return -ENXIO;585579 if (rec->oper.ioctl == NULL)586580 rc = -ENXIO;587581 else588588- rc = rec->oper.ioctl(&dp->synths[dev].arg, cmd, addr);582582+ rc = rec->oper.ioctl(&info->arg, cmd, addr);589583 snd_use_lock_free(&rec->use_lock);590584 return rc;591585}···599589int600590snd_seq_oss_synth_raw_event(struct seq_oss_devinfo *dp, int dev, unsigned char *data, struct snd_seq_event *ev)601591{602602- if (! snd_seq_oss_synth_is_valid(dp, dev) || is_midi_dev(dp, dev))592592+ struct seq_oss_synthinfo *info;593593+594594+ info = snd_seq_oss_synth_info(dp, dev);595595+ if (!info || info->is_midi)603596 return -ENXIO;604597 ev->type = SNDRV_SEQ_EVENT_OSS;605598 memcpy(ev->data.raw8.d, data, 8);
+2-1
sound/core/seq/oss/seq_oss_synth.h
···3737void snd_seq_oss_synth_reset(struct seq_oss_devinfo *dp, int dev);3838int snd_seq_oss_synth_load_patch(struct seq_oss_devinfo *dp, int dev, int fmt,3939 const char __user *buf, int p, int c);4040-int snd_seq_oss_synth_is_valid(struct seq_oss_devinfo *dp, int dev);4040+struct seq_oss_synthinfo *snd_seq_oss_synth_info(struct seq_oss_devinfo *dp,4141+ int dev);4142int snd_seq_oss_synth_sysex(struct seq_oss_devinfo *dp, int dev, unsigned char *buf,4243 struct snd_seq_event *ev);4344int snd_seq_oss_synth_addr(struct seq_oss_devinfo *dp, int dev, struct snd_seq_event *ev);
···8989 {RT5514_PLL3_CALIB_CTRL5, 0x40220012},9090 {RT5514_DELAY_BUF_CTRL1, 0x7fff006a},9191 {RT5514_DELAY_BUF_CTRL3, 0x00000000},9292+ {RT5514_ASRC_IN_CTRL1, 0x00000003},9293 {RT5514_DOWNFILTER0_CTRL1, 0x00020c2f},9394 {RT5514_DOWNFILTER0_CTRL2, 0x00020c2f},9495 {RT5514_DOWNFILTER0_CTRL3, 0x10000362},···182181 case RT5514_PLL3_CALIB_CTRL5:183182 case RT5514_DELAY_BUF_CTRL1:184183 case RT5514_DELAY_BUF_CTRL3:184184+ case RT5514_ASRC_IN_CTRL1:185185 case RT5514_DOWNFILTER0_CTRL1:186186 case RT5514_DOWNFILTER0_CTRL2:187187 case RT5514_DOWNFILTER0_CTRL3:···240238 case RT5514_DSP_MAPPING | RT5514_PLL3_CALIB_CTRL5:241239 case RT5514_DSP_MAPPING | RT5514_DELAY_BUF_CTRL1:242240 case RT5514_DSP_MAPPING | RT5514_DELAY_BUF_CTRL3:241241+ case RT5514_DSP_MAPPING | RT5514_ASRC_IN_CTRL1:243242 case RT5514_DSP_MAPPING | RT5514_DOWNFILTER0_CTRL1:244243 case RT5514_DSP_MAPPING | RT5514_DOWNFILTER0_CTRL2:245244 case RT5514_DSP_MAPPING | RT5514_DOWNFILTER0_CTRL3:
+7
sound/soc/fsl/fsl_esai.c
···144144145145 psr = ratio <= 256 * maxfp ? ESAI_xCCR_xPSR_BYPASS : ESAI_xCCR_xPSR_DIV8;146146147147+ /* Do not loop-search if PM (1 ~ 256) alone can serve the ratio */148148+ if (ratio <= 256) {149149+ pm = ratio;150150+ fp = 1;151151+ goto out;152152+ }153153+147154 /* Set the max fluctuation -- 0.1% of the max devisor */148155 savesub = (psr ? 1 : 8) * 256 * maxfp / 1000;149156
+11-3
sound/soc/fsl/fsl_ssi.c
···217217 * @dai_fmt: DAI configuration this device is currently used with218218 * @streams: Mask of current active streams: BIT(TX) and BIT(RX)219219 * @i2s_net: I2S and Network mode configurations of SCR register220220+ * (this is the initial settings based on the DAI format)220221 * @synchronous: Use synchronous mode - both of TX and RX use STCK and SFCK221222 * @use_dma: DMA is used or FIQ with stream filter222223 * @use_dual_fifo: DMA with support for dual FIFO mode···830829 }831830832831 if (!fsl_ssi_is_ac97(ssi)) {832832+ /*833833+ * Keep the ssi->i2s_net intact while having a local variable834834+ * to override settings for special use cases. Otherwise, the835835+ * ssi->i2s_net will lose the settings for regular use cases.836836+ */837837+ u8 i2s_net = ssi->i2s_net;838838+833839 /* Normal + Network mode to send 16-bit data in 32-bit frames */834840 if (fsl_ssi_is_i2s_cbm_cfs(ssi) && sample_size == 16)835835- ssi->i2s_net = SSI_SCR_I2S_MODE_NORMAL | SSI_SCR_NET;841841+ i2s_net = SSI_SCR_I2S_MODE_NORMAL | SSI_SCR_NET;836842837843 /* Use Normal mode to send mono data at 1st slot of 2 slots */838844 if (channels == 1)839839- ssi->i2s_net = SSI_SCR_I2S_MODE_NORMAL;845845+ i2s_net = SSI_SCR_I2S_MODE_NORMAL;840846841847 regmap_update_bits(regs, REG_SSI_SCR,842842- SSI_SCR_I2S_NET_MASK, ssi->i2s_net);848848+ SSI_SCR_I2S_NET_MASK, i2s_net);843849 }844850845851 /* In synchronous mode, the SSI uses STCCR for capture */
+13-9
sound/soc/intel/Kconfig
···7272 for Baytrail Chromebooks but this option is now deprecated and is7373 not recommended, use SND_SST_ATOM_HIFI2_PLATFORM instead.74747575+config SND_SST_ATOM_HIFI2_PLATFORM7676+ tristate7777+ select SND_SOC_COMPRESS7878+7579config SND_SST_ATOM_HIFI2_PLATFORM_PCI7676- tristate "PCI HiFi2 (Medfield, Merrifield) Platforms"8080+ tristate "PCI HiFi2 (Merrifield) Platforms"7781 depends on X86 && PCI7882 select SND_SST_IPC_PCI7979- select SND_SOC_COMPRESS8383+ select SND_SST_ATOM_HIFI2_PLATFORM8084 help8181- If you have a Intel Medfield or Merrifield/Edison platform, then8585+ If you have a Intel Merrifield/Edison platform, then8286 enable this option by saying Y or m. Distros will typically not8383- enable this option: Medfield devices are not available to8484- developers and while Merrifield/Edison can run a mainline kernel with8585- limited functionality it will require a firmware file which8686- is not in the standard firmware tree8787+ enable this option: while Merrifield/Edison can run a mainline8888+ kernel with limited functionality it will require a firmware file8989+ which is not in the standard firmware tree87908888-config SND_SST_ATOM_HIFI2_PLATFORM9191+config SND_SST_ATOM_HIFI2_PLATFORM_ACPI8992 tristate "ACPI HiFi2 (Baytrail, Cherrytrail) Platforms"9393+ default ACPI9094 depends on X86 && ACPI9195 select SND_SST_IPC_ACPI9292- select SND_SOC_COMPRESS9696+ select SND_SST_ATOM_HIFI2_PLATFORM9397 select SND_SOC_ACPI_INTEL_MATCH9498 select IOSF_MBI9599 help
+11-3
sound/soc/omap/omap-dmic.c
···281281static int omap_dmic_select_fclk(struct omap_dmic *dmic, int clk_id,282282 unsigned int freq)283283{284284- struct clk *parent_clk;284284+ struct clk *parent_clk, *mux;285285 char *parent_clk_name;286286 int ret = 0;287287···329329 return -ENODEV;330330 }331331332332+ mux = clk_get_parent(dmic->fclk);333333+ if (IS_ERR(mux)) {334334+ dev_err(dmic->dev, "can't get fck mux parent\n");335335+ clk_put(parent_clk);336336+ return -ENODEV;337337+ }338338+332339 mutex_lock(&dmic->mutex);333340 if (dmic->active) {334341 /* disable clock while reparenting */335342 pm_runtime_put_sync(dmic->dev);336336- ret = clk_set_parent(dmic->fclk, parent_clk);343343+ ret = clk_set_parent(mux, parent_clk);337344 pm_runtime_get_sync(dmic->dev);338345 } else {339339- ret = clk_set_parent(dmic->fclk, parent_clk);346346+ ret = clk_set_parent(mux, parent_clk);340347 }341348 mutex_unlock(&dmic->mutex);342349···356349 dmic->fclk_freq = freq;357350358351err_busy:352352+ clk_put(mux);359353 clk_put(parent_clk);360354361355 return ret;
+2-2
sound/soc/sh/rcar/core.c
···15361536 return ret;15371537}1538153815391539-static int rsnd_suspend(struct device *dev)15391539+static int __maybe_unused rsnd_suspend(struct device *dev)15401540{15411541 struct rsnd_priv *priv = dev_get_drvdata(dev);15421542···15451545 return 0;15461546}1547154715481548-static int rsnd_resume(struct device *dev)15481548+static int __maybe_unused rsnd_resume(struct device *dev)15491549{15501550 struct rsnd_priv *priv = dev_get_drvdata(dev);15511551
+9-5
sound/soc/soc-topology.c
···513513 */514514 if (dobj->widget.kcontrol_type == SND_SOC_TPLG_TYPE_ENUM) {515515 /* enumerated widget mixer */516516- for (i = 0; i < w->num_kcontrols; i++) {516516+ for (i = 0; w->kcontrols != NULL && i < w->num_kcontrols; i++) {517517 struct snd_kcontrol *kcontrol = w->kcontrols[i];518518 struct soc_enum *se =519519 (struct soc_enum *)kcontrol->private_value;···530530 }531531 } else {532532 /* volume mixer or bytes controls */533533- for (i = 0; i < w->num_kcontrols; i++) {533533+ for (i = 0; w->kcontrols != NULL && i < w->num_kcontrols; i++) {534534 struct snd_kcontrol *kcontrol = w->kcontrols[i];535535536536 if (dobj->widget.kcontrol_type···13251325 ec->hdr.name);1326132613271327 kc[i].name = kstrdup(ec->hdr.name, GFP_KERNEL);13281328- if (kc[i].name == NULL)13281328+ if (kc[i].name == NULL) {13291329+ kfree(se);13291330 goto err_se;13311331+ }13301332 kc[i].private_value = (long)se;13311333 kc[i].iface = SNDRV_CTL_ELEM_IFACE_MIXER;13321334 kc[i].access = ec->hdr.access;···14441442 be->hdr.name, be->hdr.access);1445144314461444 kc[i].name = kstrdup(be->hdr.name, GFP_KERNEL);14471447- if (kc[i].name == NULL)14451445+ if (kc[i].name == NULL) {14461446+ kfree(sbe);14481447 goto err;14481448+ }14491449 kc[i].private_value = (long)sbe;14501450 kc[i].iface = SNDRV_CTL_ELEM_IFACE_MIXER;14511451 kc[i].access = be->hdr.access;···2580257625812577 /* match index */25822578 if (dobj->index != index &&25832583- dobj->index != SND_SOC_TPLG_INDEX_ALL)25792579+ index != SND_SOC_TPLG_INDEX_ALL)25842580 continue;2585258125862582 switch (dobj->type) {
+4-3
sound/usb/mixer.c
···17761776 build_feature_ctl(state, _ftr, ch_bits, control,17771777 &iterm, unitid, ch_read_only);17781778 if (uac_v2v3_control_is_readable(master_bits, control))17791779- build_feature_ctl(state, _ftr, 0, i, &iterm, unitid,17791779+ build_feature_ctl(state, _ftr, 0, control,17801780+ &iterm, unitid,17801781 !uac_v2v3_control_is_writeable(master_bits,17811782 control));17821783 }···18601859 check_input_term(state, d->bTerminalID, &iterm);18611860 if (state->mixer->protocol == UAC_VERSION_2) {18621861 /* Check for jack detection. */18631863- if (uac_v2v3_control_is_readable(d->bmControls,18621862+ if (uac_v2v3_control_is_readable(le16_to_cpu(d->bmControls),18641863 UAC2_TE_CONNECTOR)) {18651864 build_connector_control(state, &iterm, true);18661865 }···25622561 if (err < 0 && err != -EINVAL)25632562 return err;2564256325652565- if (uac_v2v3_control_is_readable(desc->bmControls,25642564+ if (uac_v2v3_control_is_readable(le16_to_cpu(desc->bmControls),25662565 UAC2_TE_CONNECTOR)) {25672566 build_connector_control(&state, &state.oterm,25682567 false);
+3
sound/usb/mixer_maps.c
···353353/*354354 * Dell usb dock with ALC4020 codec had a firmware problem where it got355355 * screwed up when zero volume is passed; just skip it as a workaround356356+ *357357+ * Also the extension unit gives an access error, so skip it as well.356358 */357359static const struct usbmix_name_map dell_alc4020_map[] = {360360+ { 4, NULL }, /* extension unit */358361 { 16, NULL },359362 { 19, NULL },360363 { 0 }
+1-1
sound/usb/stream.c
···349349 * TODO: this conversion is not complete, update it350350 * after adding UAC3 values to asound.h351351 */352352- switch (is->bChPurpose) {352352+ switch (is->bChRelationship) {353353 case UAC3_CH_MONO:354354 map = SNDRV_CHMAP_MONO;355355 break;
+1-1
sound/usb/usx2y/us122l.c
···139139 snd_printdd(KERN_DEBUG "%i\n", atomic_read(&us122l->mmap_count));140140}141141142142-static int usb_stream_hwdep_vm_fault(struct vm_fault *vmf)142142+static vm_fault_t usb_stream_hwdep_vm_fault(struct vm_fault *vmf)143143{144144 unsigned long offset;145145 struct page *page;
+1-1
sound/usb/usx2y/usX2Yhwdep.c
···3131#include "usbusx2y.h"3232#include "usX2Yhwdep.h"33333434-static int snd_us428ctls_vm_fault(struct vm_fault *vmf)3434+static vm_fault_t snd_us428ctls_vm_fault(struct vm_fault *vmf)3535{3636 unsigned long offset;3737 struct page * page;
+1-1
sound/usb/usx2y/usx2yhwdeppcm.c
···652652}653653654654655655-static int snd_usX2Y_hwdep_pcm_vm_fault(struct vm_fault *vmf)655655+static vm_fault_t snd_usX2Y_hwdep_pcm_vm_fault(struct vm_fault *vmf)656656{657657 unsigned long offset;658658 void *vaddr;
+9
tools/arch/arm/include/uapi/asm/kvm.h
···135135#define KVM_REG_ARM_CRM_SHIFT 7136136#define KVM_REG_ARM_32_CRN_MASK 0x0000000000007800137137#define KVM_REG_ARM_32_CRN_SHIFT 11138138+/*139139+ * For KVM currently all guest registers are nonsecure, but we reserve a bit140140+ * in the encoding to distinguish secure from nonsecure for AArch32 system141141+ * registers that are banked by security. This is 1 for the secure banked142142+ * register, and 0 for the nonsecure banked register or if the register is143143+ * not banked by security.144144+ */145145+#define KVM_REG_ARM_SECURE_MASK 0x0000000010000000146146+#define KVM_REG_ARM_SECURE_SHIFT 28138147139148#define ARM_CP15_REG_SHIFT_MASK(x,n) \140149 (((x) << KVM_REG_ARM_ ## n ## _SHIFT) & KVM_REG_ARM_ ## n ## _MASK)
+1-7
tools/arch/x86/include/asm/required-features.h
···5353# define NEED_MOVBE 05454#endif55555656-#ifdef CONFIG_X86_5LEVEL5757-# define NEED_LA57 (1<<(X86_FEATURE_LA57 & 31))5858-#else5959-# define NEED_LA57 06060-#endif6161-6256#ifdef CONFIG_X86_646357#ifdef CONFIG_PARAVIRT6458/* Paravirtualized systems may not have PSE or PGE available */···98104#define REQUIRED_MASK13 099105#define REQUIRED_MASK14 0100106#define REQUIRED_MASK15 0101101-#define REQUIRED_MASK16 (NEED_LA57)107107+#define REQUIRED_MASK16 0102108#define REQUIRED_MASK17 0103109#define REQUIRED_MASK18 0104110#define REQUIRED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 19)
+18-1
tools/arch/x86/include/uapi/asm/kvm.h
···354354 __u64 padding[16];355355};356356357357-/* definition of registers in kvm_run */357357+#define KVM_SYNC_X86_REGS (1UL << 0)358358+#define KVM_SYNC_X86_SREGS (1UL << 1)359359+#define KVM_SYNC_X86_EVENTS (1UL << 2)360360+361361+#define KVM_SYNC_X86_VALID_FIELDS \362362+ (KVM_SYNC_X86_REGS| \363363+ KVM_SYNC_X86_SREGS| \364364+ KVM_SYNC_X86_EVENTS)365365+366366+/* kvm_sync_regs struct included by kvm_run struct */358367struct kvm_sync_regs {368368+ /* Members of this structure are potentially malicious.369369+ * Care must be taken by code reading, esp. interpreting,370370+ * data fields from them inside KVM to prevent TOCTOU and371371+ * double-fetch types of vulnerabilities.372372+ */373373+ struct kvm_regs regs;374374+ struct kvm_sregs sregs;375375+ struct kvm_vcpu_events events;359376};360377361378#define KVM_X86_QUIRK_LINT0_REENABLED (1 << 0)
···11+/* SPDX-License-Identifier: GPL-2.0 */12/*23 * Copyright(C) 2015 Linaro Limited. All rights reserved.34 * Author: Mathieu Poirier <mathieu.poirier@linaro.org>44- *55- * This program is free software; you can redistribute it and/or modify it66- * under the terms of the GNU General Public License version 2 as published by77- * the Free Software Foundation.88- *99- * This program is distributed in the hope that it will be useful, but WITHOUT1010- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or1111- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for1212- * more details.1313- *1414- * You should have received a copy of the GNU General Public License along with1515- * this program. If not, see <http://www.gnu.org/licenses/>.165 */176187#ifndef _LINUX_CORESIGHT_PMU_H
+3
tools/include/uapi/asm-generic/mman-common.h
···2727# define MAP_UNINITIALIZED 0x0 /* Don't support this flag */2828#endif29293030+/* 0x0100 - 0x80000 flags are defined in asm-generic/mman.h */3131+#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED which doesn't unmap underlying mapping */3232+3033/*3134 * Flags for mlock3235 */
···396396 char padding[256];397397 };398398399399+ /* 2048 is the size of the char array used to bound/pad the size400400+ * of the union that holds sync regs.401401+ */402402+ #define SYNC_REGS_SIZE_BYTES 2048399403 /*400404 * shared registers between kvm and userspace.401405 * kvm_valid_regs specifies the register classes set by the host···411407 __u64 kvm_dirty_regs;412408 union {413409 struct kvm_sync_regs regs;414414- char padding[2048];410410+ char padding[SYNC_REGS_SIZE_BYTES];415411 } s;416412};417413···940936#define KVM_CAP_PPC_GET_CPU_CHAR 151941937#define KVM_CAP_S390_BPB 152942938#define KVM_CAP_GET_MSR_FEATURES 153939939+#define KVM_CAP_HYPERV_EVENTFD 154943940944941#ifdef KVM_CAP_IRQ_ROUTING945942···13801375#define KVM_MEMORY_ENCRYPT_REG_REGION _IOR(KVMIO, 0xbb, struct kvm_enc_region)13811376#define KVM_MEMORY_ENCRYPT_UNREG_REGION _IOR(KVMIO, 0xbc, struct kvm_enc_region)1382137713781378+/* Available with KVM_CAP_HYPERV_EVENTFD */13791379+#define KVM_HYPERV_EVENTFD _IOW(KVMIO, 0xbd, struct kvm_hyperv_eventfd)13801380+13811381+13831382/* Secure Encrypted Virtualization command */13841383enum sev_cmd_id {13851384 /* Guest initialization commands */···15231514#define KVM_ARM_DEV_EL1_VTIMER (1 << 0)15241515#define KVM_ARM_DEV_EL1_PTIMER (1 << 1)15251516#define KVM_ARM_DEV_PMU (1 << 2)15171517+15181518+struct kvm_hyperv_eventfd {15191519+ __u32 conn_id;15201520+ __s32 fd;15211521+ __u32 flags;15221522+ __u32 padding[3];15231523+};15241524+15251525+#define KVM_HYPERV_CONN_ID_MASK 0x00ffffff15261526+#define KVM_HYPERV_EVENTFD_DEASSIGN (1 << 0)1526152715271528#endif /* __LINUX_KVM_H */
+15-3
tools/include/uapi/linux/perf_event.h
···650650#define PERF_RECORD_MISC_COMM_EXEC (1 << 13)651651#define PERF_RECORD_MISC_SWITCH_OUT (1 << 13)652652/*653653- * Indicates that the content of PERF_SAMPLE_IP points to654654- * the actual instruction that triggered the event. See also655655- * perf_event_attr::precise_ip.653653+ * These PERF_RECORD_MISC_* flags below are safely reused654654+ * for the following events:655655+ *656656+ * PERF_RECORD_MISC_EXACT_IP - PERF_RECORD_SAMPLE of precise events657657+ * PERF_RECORD_MISC_SWITCH_OUT_PREEMPT - PERF_RECORD_SWITCH* events658658+ *659659+ *660660+ * PERF_RECORD_MISC_EXACT_IP:661661+ * Indicates that the content of PERF_SAMPLE_IP points to662662+ * the actual instruction that triggered the event. See also663663+ * perf_event_attr::precise_ip.664664+ *665665+ * PERF_RECORD_MISC_SWITCH_OUT_PREEMPT:666666+ * Indicates that thread was preempted in TASK_RUNNING state.656667 */657668#define PERF_RECORD_MISC_EXACT_IP (1 << 14)669669+#define PERF_RECORD_MISC_SWITCH_OUT_PREEMPT (1 << 14)658670/*659671 * Reserve the last bit to indicate some extended misc field660672 */
···433433434434 if (ambiguous_option) {435435 fprintf(stderr,436436- " Error: Ambiguous option: %s (could be --%s%s or --%s%s)",436436+ " Error: Ambiguous option: %s (could be --%s%s or --%s%s)\n",437437 arg,438438 (ambiguous_flags & OPT_UNSET) ? "no-" : "",439439 ambiguous_option->long_name,···458458 return;459459460460 if (strstarts(arg, "no-")) {461461- fprintf(stderr, " Error: did you mean `--%s` (with two dashes ?)", arg);461461+ fprintf(stderr, " Error: did you mean `--%s` (with two dashes ?)\n", arg);462462 exit(129);463463 }464464···466466 if (!options->long_name)467467 continue;468468 if (strstarts(options->long_name, arg)) {469469- fprintf(stderr, " Error: did you mean `--%s` (with two dashes ?)", arg);469469+ fprintf(stderr, " Error: did you mean `--%s` (with two dashes ?)\n", arg);470470 exit(129);471471 }472472 }
···334334335335 99.93 │ mov %eax,%eax336336337337+ annotate.offset_level::338338+ Default is '1', meaning just jump targets will have offsets show right beside339339+ the instruction. When set to '2' 'call' instructions will also have its offsets340340+ shown, 3 or higher will show offsets for all instructions.341341+337342hist.*::338343 hist.percentage::339344 This option control the way to calculate overhead of filtered entries -
+3
tools/perf/Documentation/perf-mem.txt
···6767--phys-data::6868 Record/Report sample physical addresses69697070+In addition, for report all perf report options are valid, and for record7171+all perf record options.7272+7073SEE ALSO7174--------7275linkperf:perf-record[1], linkperf:perf-report[1]
+2-2
tools/perf/Documentation/perf-sched.txt
···104104 kallsyms pathname105105106106-g::107107---no-call-graph::108108- Do not display call chains if present.107107+--call-graph::108108+ Display call chains if present (default on).109109110110--max-stack::111111 Maximum number of functions to display in backtrace, default 5.
+9-8
tools/perf/Documentation/perf-script.txt
···228228 For sample events it's possible to display misc field with -F +misc option,229229 following letters are displayed for each bit:230230231231- PERF_RECORD_MISC_KERNEL K232232- PERF_RECORD_MISC_USER U233233- PERF_RECORD_MISC_HYPERVISOR H234234- PERF_RECORD_MISC_GUEST_KERNEL G235235- PERF_RECORD_MISC_GUEST_USER g236236- PERF_RECORD_MISC_MMAP_DATA* M237237- PERF_RECORD_MISC_COMM_EXEC E238238- PERF_RECORD_MISC_SWITCH_OUT S231231+ PERF_RECORD_MISC_KERNEL K232232+ PERF_RECORD_MISC_USER U233233+ PERF_RECORD_MISC_HYPERVISOR H234234+ PERF_RECORD_MISC_GUEST_KERNEL G235235+ PERF_RECORD_MISC_GUEST_USER g236236+ PERF_RECORD_MISC_MMAP_DATA* M237237+ PERF_RECORD_MISC_COMM_EXEC E238238+ PERF_RECORD_MISC_SWITCH_OUT S239239+ PERF_RECORD_MISC_SWITCH_OUT_PREEMPT Sp239240240241 $ perf script -F +misc ...241242 sched-messaging 1414 K 28690.636582: 4590 cycles ...
+1-1
tools/perf/Documentation/perf-stat.txt
···153153154154-I msecs::155155--interval-print msecs::156156-Print count deltas every N milliseconds (minimum: 10ms)156156+Print count deltas every N milliseconds (minimum: 1ms)157157The overhead percentage could be high in some cases, for instance with small, sub 100ms intervals. Use with caution.158158 example: 'perf stat -I 1000 -e cycles -a sleep 5'159159
+2-2
tools/perf/Makefile.config
···6868endif69697070ifneq ($(NO_SYSCALL_TABLE),1)7171- CFLAGS += -DHAVE_SYSCALL_TABLE7171+ CFLAGS += -DHAVE_SYSCALL_TABLE_SUPPORT7272endif73737474# So far there's only x86 and arm libdw unwind support merged in perf.···847847 ifeq ($(feature-jvmti), 1)848848 $(call detected_var,JDIR)849849 else850850- $(warning No openjdk development package found, please install JDK package)850850+ $(warning No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel)851851 NO_JVMTI := 1852852 endif853853endif
···11+// SPDX-License-Identifier: GPL-2.012/*23 * Copyright(C) 2015 Linaro Limited. All rights reserved.34 * Author: Mathieu Poirier <mathieu.poirier@linaro.org>44- *55- * This program is free software; you can redistribute it and/or modify it66- * under the terms of the GNU General Public License version 2 as published by77- * the Free Software Foundation.88- *99- * This program is distributed in the hope that it will be useful, but WITHOUT1010- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or1111- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for1212- * more details.1313- *1414- * You should have received a copy of the GNU General Public License along with1515- * this program. If not, see <http://www.gnu.org/licenses/>.165 */176187#include <stdbool.h>
+1-12
tools/perf/arch/arm/util/cs-etm.c
···11+// SPDX-License-Identifier: GPL-2.012/*23 * Copyright(C) 2015 Linaro Limited. All rights reserved.34 * Author: Mathieu Poirier <mathieu.poirier@linaro.org>44- *55- * This program is free software; you can redistribute it and/or modify it66- * under the terms of the GNU General Public License version 2 as published by77- * the Free Software Foundation.88- *99- * This program is distributed in the hope that it will be useful, but WITHOUT1010- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or1111- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for1212- * more details.1313- *1414- * You should have received a copy of the GNU General Public License along with1515- * this program. If not, see <http://www.gnu.org/licenses/>.165 */176187#include <api/fs/fs.h>
+1-12
tools/perf/arch/arm/util/cs-etm.h
···11+/* SPDX-License-Identifier: GPL-2.0 */12/*23 * Copyright(C) 2015 Linaro Limited. All rights reserved.34 * Author: Mathieu Poirier <mathieu.poirier@linaro.org>44- *55- * This program is free software; you can redistribute it and/or modify it66- * under the terms of the GNU General Public License version 2 as published by77- * the Free Software Foundation.88- *99- * This program is distributed in the hope that it will be useful, but WITHOUT1010- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or1111- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for1212- * more details.1313- *1414- * You should have received a copy of the GNU General Public License along with1515- * this program. If not, see <http://www.gnu.org/licenses/>.165 */176187#ifndef INCLUDE__PERF_CS_ETM_H__
+1-12
tools/perf/arch/arm/util/pmu.c
···11+// SPDX-License-Identifier: GPL-2.012/*23 * Copyright(C) 2015 Linaro Limited. All rights reserved.34 * Author: Mathieu Poirier <mathieu.poirier@linaro.org>44- *55- * This program is free software; you can redistribute it and/or modify it66- * under the terms of the GNU General Public License version 2 as published by77- * the Free Software Foundation.88- *99- * This program is distributed in the hope that it will be useful, but WITHOUT1010- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or1111- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for1212- * more details.1313- *1414- * You should have received a copy of the GNU General Public License along with1515- * this program. If not, see <http://www.gnu.org/licenses/>.165 */176187#include <string.h>
+1-1
tools/perf/arch/x86/Makefile
···2121$(header): $(sys)/syscall_64.tbl $(systbl)2222 @(test -d ../../kernel -a -d ../../tools -a -d ../perf && ( \2323 (diff -B arch/x86/entry/syscalls/syscall_64.tbl ../../arch/x86/entry/syscalls/syscall_64.tbl >/dev/null) \2424- || echo "Warning: Kernel ABI header at 'tools/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl'" >&2 )) || true2424+ || echo "Warning: Kernel ABI header at 'tools/perf/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl'" >&2 )) || true2525 $(Q)$(SHELL) '$(systbl)' $(sys)/syscall_64.tbl 'x86_64' > $@26262727clean::
···44# The format is:55# <number> <abi> <name> <entry point>66#77+# The __x64_sys_*() stubs are created on-the-fly for sys_*() system calls88+#79# The abi is "common", "64" or "x32" for this file.810#99-0 common read sys_read1010-1 common write sys_write1111-2 common open sys_open1212-3 common close sys_close1313-4 common stat sys_newstat1414-5 common fstat sys_newfstat1515-6 common lstat sys_newlstat1616-7 common poll sys_poll1717-8 common lseek sys_lseek1818-9 common mmap sys_mmap1919-10 common mprotect sys_mprotect2020-11 common munmap sys_munmap2121-12 common brk sys_brk2222-13 64 rt_sigaction sys_rt_sigaction2323-14 common rt_sigprocmask sys_rt_sigprocmask2424-15 64 rt_sigreturn sys_rt_sigreturn/ptregs2525-16 64 ioctl sys_ioctl2626-17 common pread64 sys_pread642727-18 common pwrite64 sys_pwrite642828-19 64 readv sys_readv2929-20 64 writev sys_writev3030-21 common access sys_access3131-22 common pipe sys_pipe3232-23 common select sys_select3333-24 common sched_yield sys_sched_yield3434-25 common mremap sys_mremap3535-26 common msync sys_msync3636-27 common mincore sys_mincore3737-28 common madvise sys_madvise3838-29 common shmget sys_shmget3939-30 common shmat sys_shmat4040-31 common shmctl sys_shmctl4141-32 common dup sys_dup4242-33 common dup2 sys_dup24343-34 common pause sys_pause4444-35 common nanosleep sys_nanosleep4545-36 common getitimer sys_getitimer4646-37 common alarm sys_alarm4747-38 common setitimer sys_setitimer4848-39 common getpid sys_getpid4949-40 common sendfile sys_sendfile645050-41 common socket sys_socket5151-42 common connect sys_connect5252-43 common accept sys_accept5353-44 common sendto sys_sendto5454-45 64 recvfrom sys_recvfrom5555-46 64 sendmsg sys_sendmsg5656-47 64 recvmsg sys_recvmsg5757-48 common shutdown sys_shutdown5858-49 common bind sys_bind5959-50 common listen sys_listen6060-51 common getsockname sys_getsockname6161-52 common getpeername sys_getpeername6262-53 common socketpair sys_socketpair6363-54 64 setsockopt sys_setsockopt6464-55 64 getsockopt sys_getsockopt6565-56 common clone sys_clone/ptregs6666-57 common fork sys_fork/ptregs6767-58 common vfork sys_vfork/ptregs6868-59 64 execve sys_execve/ptregs6969-60 common exit sys_exit7070-61 common wait4 sys_wait47171-62 common kill sys_kill7272-63 common uname sys_newuname7373-64 common semget sys_semget7474-65 common semop sys_semop7575-66 common semctl sys_semctl7676-67 common shmdt sys_shmdt7777-68 common msgget sys_msgget7878-69 common msgsnd sys_msgsnd7979-70 common msgrcv sys_msgrcv8080-71 common msgctl sys_msgctl8181-72 common fcntl sys_fcntl8282-73 common flock sys_flock8383-74 common fsync sys_fsync8484-75 common fdatasync sys_fdatasync8585-76 common truncate sys_truncate8686-77 common ftruncate sys_ftruncate8787-78 common getdents sys_getdents8888-79 common getcwd sys_getcwd8989-80 common chdir sys_chdir9090-81 common fchdir sys_fchdir9191-82 common rename sys_rename9292-83 common mkdir sys_mkdir9393-84 common rmdir sys_rmdir9494-85 common creat sys_creat9595-86 common link sys_link9696-87 common unlink sys_unlink9797-88 common symlink sys_symlink9898-89 common readlink sys_readlink9999-90 common chmod sys_chmod100100-91 common fchmod sys_fchmod101101-92 common chown sys_chown102102-93 common fchown sys_fchown103103-94 common lchown sys_lchown104104-95 common umask sys_umask105105-96 common gettimeofday sys_gettimeofday106106-97 common getrlimit sys_getrlimit107107-98 common getrusage sys_getrusage108108-99 common sysinfo sys_sysinfo109109-100 common times sys_times110110-101 64 ptrace sys_ptrace111111-102 common getuid sys_getuid112112-103 common syslog sys_syslog113113-104 common getgid sys_getgid114114-105 common setuid sys_setuid115115-106 common setgid sys_setgid116116-107 common geteuid sys_geteuid117117-108 common getegid sys_getegid118118-109 common setpgid sys_setpgid119119-110 common getppid sys_getppid120120-111 common getpgrp sys_getpgrp121121-112 common setsid sys_setsid122122-113 common setreuid sys_setreuid123123-114 common setregid sys_setregid124124-115 common getgroups sys_getgroups125125-116 common setgroups sys_setgroups126126-117 common setresuid sys_setresuid127127-118 common getresuid sys_getresuid128128-119 common setresgid sys_setresgid129129-120 common getresgid sys_getresgid130130-121 common getpgid sys_getpgid131131-122 common setfsuid sys_setfsuid132132-123 common setfsgid sys_setfsgid133133-124 common getsid sys_getsid134134-125 common capget sys_capget135135-126 common capset sys_capset136136-127 64 rt_sigpending sys_rt_sigpending137137-128 64 rt_sigtimedwait sys_rt_sigtimedwait138138-129 64 rt_sigqueueinfo sys_rt_sigqueueinfo139139-130 common rt_sigsuspend sys_rt_sigsuspend140140-131 64 sigaltstack sys_sigaltstack141141-132 common utime sys_utime142142-133 common mknod sys_mknod1111+0 common read __x64_sys_read1212+1 common write __x64_sys_write1313+2 common open __x64_sys_open1414+3 common close __x64_sys_close1515+4 common stat __x64_sys_newstat1616+5 common fstat __x64_sys_newfstat1717+6 common lstat __x64_sys_newlstat1818+7 common poll __x64_sys_poll1919+8 common lseek __x64_sys_lseek2020+9 common mmap __x64_sys_mmap2121+10 common mprotect __x64_sys_mprotect2222+11 common munmap __x64_sys_munmap2323+12 common brk __x64_sys_brk2424+13 64 rt_sigaction __x64_sys_rt_sigaction2525+14 common rt_sigprocmask __x64_sys_rt_sigprocmask2626+15 64 rt_sigreturn __x64_sys_rt_sigreturn/ptregs2727+16 64 ioctl __x64_sys_ioctl2828+17 common pread64 __x64_sys_pread642929+18 common pwrite64 __x64_sys_pwrite643030+19 64 readv __x64_sys_readv3131+20 64 writev __x64_sys_writev3232+21 common access __x64_sys_access3333+22 common pipe __x64_sys_pipe3434+23 common select __x64_sys_select3535+24 common sched_yield __x64_sys_sched_yield3636+25 common mremap __x64_sys_mremap3737+26 common msync __x64_sys_msync3838+27 common mincore __x64_sys_mincore3939+28 common madvise __x64_sys_madvise4040+29 common shmget __x64_sys_shmget4141+30 common shmat __x64_sys_shmat4242+31 common shmctl __x64_sys_shmctl4343+32 common dup __x64_sys_dup4444+33 common dup2 __x64_sys_dup24545+34 common pause __x64_sys_pause4646+35 common nanosleep __x64_sys_nanosleep4747+36 common getitimer __x64_sys_getitimer4848+37 common alarm __x64_sys_alarm4949+38 common setitimer __x64_sys_setitimer5050+39 common getpid __x64_sys_getpid5151+40 common sendfile __x64_sys_sendfile645252+41 common socket __x64_sys_socket5353+42 common connect __x64_sys_connect5454+43 common accept __x64_sys_accept5555+44 common sendto __x64_sys_sendto5656+45 64 recvfrom __x64_sys_recvfrom5757+46 64 sendmsg __x64_sys_sendmsg5858+47 64 recvmsg __x64_sys_recvmsg5959+48 common shutdown __x64_sys_shutdown6060+49 common bind __x64_sys_bind6161+50 common listen __x64_sys_listen6262+51 common getsockname __x64_sys_getsockname6363+52 common getpeername __x64_sys_getpeername6464+53 common socketpair __x64_sys_socketpair6565+54 64 setsockopt __x64_sys_setsockopt6666+55 64 getsockopt __x64_sys_getsockopt6767+56 common clone __x64_sys_clone/ptregs6868+57 common fork __x64_sys_fork/ptregs6969+58 common vfork __x64_sys_vfork/ptregs7070+59 64 execve __x64_sys_execve/ptregs7171+60 common exit __x64_sys_exit7272+61 common wait4 __x64_sys_wait47373+62 common kill __x64_sys_kill7474+63 common uname __x64_sys_newuname7575+64 common semget __x64_sys_semget7676+65 common semop __x64_sys_semop7777+66 common semctl __x64_sys_semctl7878+67 common shmdt __x64_sys_shmdt7979+68 common msgget __x64_sys_msgget8080+69 common msgsnd __x64_sys_msgsnd8181+70 common msgrcv __x64_sys_msgrcv8282+71 common msgctl __x64_sys_msgctl8383+72 common fcntl __x64_sys_fcntl8484+73 common flock __x64_sys_flock8585+74 common fsync __x64_sys_fsync8686+75 common fdatasync __x64_sys_fdatasync8787+76 common truncate __x64_sys_truncate8888+77 common ftruncate __x64_sys_ftruncate8989+78 common getdents __x64_sys_getdents9090+79 common getcwd __x64_sys_getcwd9191+80 common chdir __x64_sys_chdir9292+81 common fchdir __x64_sys_fchdir9393+82 common rename __x64_sys_rename9494+83 common mkdir __x64_sys_mkdir9595+84 common rmdir __x64_sys_rmdir9696+85 common creat __x64_sys_creat9797+86 common link __x64_sys_link9898+87 common unlink __x64_sys_unlink9999+88 common symlink __x64_sys_symlink100100+89 common readlink __x64_sys_readlink101101+90 common chmod __x64_sys_chmod102102+91 common fchmod __x64_sys_fchmod103103+92 common chown __x64_sys_chown104104+93 common fchown __x64_sys_fchown105105+94 common lchown __x64_sys_lchown106106+95 common umask __x64_sys_umask107107+96 common gettimeofday __x64_sys_gettimeofday108108+97 common getrlimit __x64_sys_getrlimit109109+98 common getrusage __x64_sys_getrusage110110+99 common sysinfo __x64_sys_sysinfo111111+100 common times __x64_sys_times112112+101 64 ptrace __x64_sys_ptrace113113+102 common getuid __x64_sys_getuid114114+103 common syslog __x64_sys_syslog115115+104 common getgid __x64_sys_getgid116116+105 common setuid __x64_sys_setuid117117+106 common setgid __x64_sys_setgid118118+107 common geteuid __x64_sys_geteuid119119+108 common getegid __x64_sys_getegid120120+109 common setpgid __x64_sys_setpgid121121+110 common getppid __x64_sys_getppid122122+111 common getpgrp __x64_sys_getpgrp123123+112 common setsid __x64_sys_setsid124124+113 common setreuid __x64_sys_setreuid125125+114 common setregid __x64_sys_setregid126126+115 common getgroups __x64_sys_getgroups127127+116 common setgroups __x64_sys_setgroups128128+117 common setresuid __x64_sys_setresuid129129+118 common getresuid __x64_sys_getresuid130130+119 common setresgid __x64_sys_setresgid131131+120 common getresgid __x64_sys_getresgid132132+121 common getpgid __x64_sys_getpgid133133+122 common setfsuid __x64_sys_setfsuid134134+123 common setfsgid __x64_sys_setfsgid135135+124 common getsid __x64_sys_getsid136136+125 common capget __x64_sys_capget137137+126 common capset __x64_sys_capset138138+127 64 rt_sigpending __x64_sys_rt_sigpending139139+128 64 rt_sigtimedwait __x64_sys_rt_sigtimedwait140140+129 64 rt_sigqueueinfo __x64_sys_rt_sigqueueinfo141141+130 common rt_sigsuspend __x64_sys_rt_sigsuspend142142+131 64 sigaltstack __x64_sys_sigaltstack143143+132 common utime __x64_sys_utime144144+133 common mknod __x64_sys_mknod143145134 64 uselib144144-135 common personality sys_personality145145-136 common ustat sys_ustat146146-137 common statfs sys_statfs147147-138 common fstatfs sys_fstatfs148148-139 common sysfs sys_sysfs149149-140 common getpriority sys_getpriority150150-141 common setpriority sys_setpriority151151-142 common sched_setparam sys_sched_setparam152152-143 common sched_getparam sys_sched_getparam153153-144 common sched_setscheduler sys_sched_setscheduler154154-145 common sched_getscheduler sys_sched_getscheduler155155-146 common sched_get_priority_max sys_sched_get_priority_max156156-147 common sched_get_priority_min sys_sched_get_priority_min157157-148 common sched_rr_get_interval sys_sched_rr_get_interval158158-149 common mlock sys_mlock159159-150 common munlock sys_munlock160160-151 common mlockall sys_mlockall161161-152 common munlockall sys_munlockall162162-153 common vhangup sys_vhangup163163-154 common modify_ldt sys_modify_ldt164164-155 common pivot_root sys_pivot_root165165-156 64 _sysctl sys_sysctl166166-157 common prctl sys_prctl167167-158 common arch_prctl sys_arch_prctl168168-159 common adjtimex sys_adjtimex169169-160 common setrlimit sys_setrlimit170170-161 common chroot sys_chroot171171-162 common sync sys_sync172172-163 common acct sys_acct173173-164 common settimeofday sys_settimeofday174174-165 common mount sys_mount175175-166 common umount2 sys_umount176176-167 common swapon sys_swapon177177-168 common swapoff sys_swapoff178178-169 common reboot sys_reboot179179-170 common sethostname sys_sethostname180180-171 common setdomainname sys_setdomainname181181-172 common iopl sys_iopl/ptregs182182-173 common ioperm sys_ioperm146146+135 common personality __x64_sys_personality147147+136 common ustat __x64_sys_ustat148148+137 common statfs __x64_sys_statfs149149+138 common fstatfs __x64_sys_fstatfs150150+139 common sysfs __x64_sys_sysfs151151+140 common getpriority __x64_sys_getpriority152152+141 common setpriority __x64_sys_setpriority153153+142 common sched_setparam __x64_sys_sched_setparam154154+143 common sched_getparam __x64_sys_sched_getparam155155+144 common sched_setscheduler __x64_sys_sched_setscheduler156156+145 common sched_getscheduler __x64_sys_sched_getscheduler157157+146 common sched_get_priority_max __x64_sys_sched_get_priority_max158158+147 common sched_get_priority_min __x64_sys_sched_get_priority_min159159+148 common sched_rr_get_interval __x64_sys_sched_rr_get_interval160160+149 common mlock __x64_sys_mlock161161+150 common munlock __x64_sys_munlock162162+151 common mlockall __x64_sys_mlockall163163+152 common munlockall __x64_sys_munlockall164164+153 common vhangup __x64_sys_vhangup165165+154 common modify_ldt __x64_sys_modify_ldt166166+155 common pivot_root __x64_sys_pivot_root167167+156 64 _sysctl __x64_sys_sysctl168168+157 common prctl __x64_sys_prctl169169+158 common arch_prctl __x64_sys_arch_prctl170170+159 common adjtimex __x64_sys_adjtimex171171+160 common setrlimit __x64_sys_setrlimit172172+161 common chroot __x64_sys_chroot173173+162 common sync __x64_sys_sync174174+163 common acct __x64_sys_acct175175+164 common settimeofday __x64_sys_settimeofday176176+165 common mount __x64_sys_mount177177+166 common umount2 __x64_sys_umount178178+167 common swapon __x64_sys_swapon179179+168 common swapoff __x64_sys_swapoff180180+169 common reboot __x64_sys_reboot181181+170 common sethostname __x64_sys_sethostname182182+171 common setdomainname __x64_sys_setdomainname183183+172 common iopl __x64_sys_iopl/ptregs184184+173 common ioperm __x64_sys_ioperm183185174 64 create_module184184-175 common init_module sys_init_module185185-176 common delete_module sys_delete_module186186+175 common init_module __x64_sys_init_module187187+176 common delete_module __x64_sys_delete_module186188177 64 get_kernel_syms187189178 64 query_module188188-179 common quotactl sys_quotactl190190+179 common quotactl __x64_sys_quotactl189191180 64 nfsservctl190192181 common getpmsg191193182 common putpmsg192194183 common afs_syscall193195184 common tuxcall194196185 common security195195-186 common gettid sys_gettid196196-187 common readahead sys_readahead197197-188 common setxattr sys_setxattr198198-189 common lsetxattr sys_lsetxattr199199-190 common fsetxattr sys_fsetxattr200200-191 common getxattr sys_getxattr201201-192 common lgetxattr sys_lgetxattr202202-193 common fgetxattr sys_fgetxattr203203-194 common listxattr sys_listxattr204204-195 common llistxattr sys_llistxattr205205-196 common flistxattr sys_flistxattr206206-197 common removexattr sys_removexattr207207-198 common lremovexattr sys_lremovexattr208208-199 common fremovexattr sys_fremovexattr209209-200 common tkill sys_tkill210210-201 common time sys_time211211-202 common futex sys_futex212212-203 common sched_setaffinity sys_sched_setaffinity213213-204 common sched_getaffinity sys_sched_getaffinity197197+186 common gettid __x64_sys_gettid198198+187 common readahead __x64_sys_readahead199199+188 common setxattr __x64_sys_setxattr200200+189 common lsetxattr __x64_sys_lsetxattr201201+190 common fsetxattr __x64_sys_fsetxattr202202+191 common getxattr __x64_sys_getxattr203203+192 common lgetxattr __x64_sys_lgetxattr204204+193 common fgetxattr __x64_sys_fgetxattr205205+194 common listxattr __x64_sys_listxattr206206+195 common llistxattr __x64_sys_llistxattr207207+196 common flistxattr __x64_sys_flistxattr208208+197 common removexattr __x64_sys_removexattr209209+198 common lremovexattr __x64_sys_lremovexattr210210+199 common fremovexattr __x64_sys_fremovexattr211211+200 common tkill __x64_sys_tkill212212+201 common time __x64_sys_time213213+202 common futex __x64_sys_futex214214+203 common sched_setaffinity __x64_sys_sched_setaffinity215215+204 common sched_getaffinity __x64_sys_sched_getaffinity214216205 64 set_thread_area215215-206 64 io_setup sys_io_setup216216-207 common io_destroy sys_io_destroy217217-208 common io_getevents sys_io_getevents218218-209 64 io_submit sys_io_submit219219-210 common io_cancel sys_io_cancel217217+206 64 io_setup __x64_sys_io_setup218218+207 common io_destroy __x64_sys_io_destroy219219+208 common io_getevents __x64_sys_io_getevents220220+209 64 io_submit __x64_sys_io_submit221221+210 common io_cancel __x64_sys_io_cancel220222211 64 get_thread_area221221-212 common lookup_dcookie sys_lookup_dcookie222222-213 common epoll_create sys_epoll_create223223+212 common lookup_dcookie __x64_sys_lookup_dcookie224224+213 common epoll_create __x64_sys_epoll_create223225214 64 epoll_ctl_old224226215 64 epoll_wait_old225225-216 common remap_file_pages sys_remap_file_pages226226-217 common getdents64 sys_getdents64227227-218 common set_tid_address sys_set_tid_address228228-219 common restart_syscall sys_restart_syscall229229-220 common semtimedop sys_semtimedop230230-221 common fadvise64 sys_fadvise64231231-222 64 timer_create sys_timer_create232232-223 common timer_settime sys_timer_settime233233-224 common timer_gettime sys_timer_gettime234234-225 common timer_getoverrun sys_timer_getoverrun235235-226 common timer_delete sys_timer_delete236236-227 common clock_settime sys_clock_settime237237-228 common clock_gettime sys_clock_gettime238238-229 common clock_getres sys_clock_getres239239-230 common clock_nanosleep sys_clock_nanosleep240240-231 common exit_group sys_exit_group241241-232 common epoll_wait sys_epoll_wait242242-233 common epoll_ctl sys_epoll_ctl243243-234 common tgkill sys_tgkill244244-235 common utimes sys_utimes227227+216 common remap_file_pages __x64_sys_remap_file_pages228228+217 common getdents64 __x64_sys_getdents64229229+218 common set_tid_address __x64_sys_set_tid_address230230+219 common restart_syscall __x64_sys_restart_syscall231231+220 common semtimedop __x64_sys_semtimedop232232+221 common fadvise64 __x64_sys_fadvise64233233+222 64 timer_create __x64_sys_timer_create234234+223 common timer_settime __x64_sys_timer_settime235235+224 common timer_gettime __x64_sys_timer_gettime236236+225 common timer_getoverrun __x64_sys_timer_getoverrun237237+226 common timer_delete __x64_sys_timer_delete238238+227 common clock_settime __x64_sys_clock_settime239239+228 common clock_gettime __x64_sys_clock_gettime240240+229 common clock_getres __x64_sys_clock_getres241241+230 common clock_nanosleep __x64_sys_clock_nanosleep242242+231 common exit_group __x64_sys_exit_group243243+232 common epoll_wait __x64_sys_epoll_wait244244+233 common epoll_ctl __x64_sys_epoll_ctl245245+234 common tgkill __x64_sys_tgkill246246+235 common utimes __x64_sys_utimes245247236 64 vserver246246-237 common mbind sys_mbind247247-238 common set_mempolicy sys_set_mempolicy248248-239 common get_mempolicy sys_get_mempolicy249249-240 common mq_open sys_mq_open250250-241 common mq_unlink sys_mq_unlink251251-242 common mq_timedsend sys_mq_timedsend252252-243 common mq_timedreceive sys_mq_timedreceive253253-244 64 mq_notify sys_mq_notify254254-245 common mq_getsetattr sys_mq_getsetattr255255-246 64 kexec_load sys_kexec_load256256-247 64 waitid sys_waitid257257-248 common add_key sys_add_key258258-249 common request_key sys_request_key259259-250 common keyctl sys_keyctl260260-251 common ioprio_set sys_ioprio_set261261-252 common ioprio_get sys_ioprio_get262262-253 common inotify_init sys_inotify_init263263-254 common inotify_add_watch sys_inotify_add_watch264264-255 common inotify_rm_watch sys_inotify_rm_watch265265-256 common migrate_pages sys_migrate_pages266266-257 common openat sys_openat267267-258 common mkdirat sys_mkdirat268268-259 common mknodat sys_mknodat269269-260 common fchownat sys_fchownat270270-261 common futimesat sys_futimesat271271-262 common newfstatat sys_newfstatat272272-263 common unlinkat sys_unlinkat273273-264 common renameat sys_renameat274274-265 common linkat sys_linkat275275-266 common symlinkat sys_symlinkat276276-267 common readlinkat sys_readlinkat277277-268 common fchmodat sys_fchmodat278278-269 common faccessat sys_faccessat279279-270 common pselect6 sys_pselect6280280-271 common ppoll sys_ppoll281281-272 common unshare sys_unshare282282-273 64 set_robust_list sys_set_robust_list283283-274 64 get_robust_list sys_get_robust_list284284-275 common splice sys_splice285285-276 common tee sys_tee286286-277 common sync_file_range sys_sync_file_range287287-278 64 vmsplice sys_vmsplice288288-279 64 move_pages sys_move_pages289289-280 common utimensat sys_utimensat290290-281 common epoll_pwait sys_epoll_pwait291291-282 common signalfd sys_signalfd292292-283 common timerfd_create sys_timerfd_create293293-284 common eventfd sys_eventfd294294-285 common fallocate sys_fallocate295295-286 common timerfd_settime sys_timerfd_settime296296-287 common timerfd_gettime sys_timerfd_gettime297297-288 common accept4 sys_accept4298298-289 common signalfd4 sys_signalfd4299299-290 common eventfd2 sys_eventfd2300300-291 common epoll_create1 sys_epoll_create1301301-292 common dup3 sys_dup3302302-293 common pipe2 sys_pipe2303303-294 common inotify_init1 sys_inotify_init1304304-295 64 preadv sys_preadv305305-296 64 pwritev sys_pwritev306306-297 64 rt_tgsigqueueinfo sys_rt_tgsigqueueinfo307307-298 common perf_event_open sys_perf_event_open308308-299 64 recvmmsg sys_recvmmsg309309-300 common fanotify_init sys_fanotify_init310310-301 common fanotify_mark sys_fanotify_mark311311-302 common prlimit64 sys_prlimit64312312-303 common name_to_handle_at sys_name_to_handle_at313313-304 common open_by_handle_at sys_open_by_handle_at314314-305 common clock_adjtime sys_clock_adjtime315315-306 common syncfs sys_syncfs316316-307 64 sendmmsg sys_sendmmsg317317-308 common setns sys_setns318318-309 common getcpu sys_getcpu319319-310 64 process_vm_readv sys_process_vm_readv320320-311 64 process_vm_writev sys_process_vm_writev321321-312 common kcmp sys_kcmp322322-313 common finit_module sys_finit_module323323-314 common sched_setattr sys_sched_setattr324324-315 common sched_getattr sys_sched_getattr325325-316 common renameat2 sys_renameat2326326-317 common seccomp sys_seccomp327327-318 common getrandom sys_getrandom328328-319 common memfd_create sys_memfd_create329329-320 common kexec_file_load sys_kexec_file_load330330-321 common bpf sys_bpf331331-322 64 execveat sys_execveat/ptregs332332-323 common userfaultfd sys_userfaultfd333333-324 common membarrier sys_membarrier334334-325 common mlock2 sys_mlock2335335-326 common copy_file_range sys_copy_file_range336336-327 64 preadv2 sys_preadv2337337-328 64 pwritev2 sys_pwritev2338338-329 common pkey_mprotect sys_pkey_mprotect339339-330 common pkey_alloc sys_pkey_alloc340340-331 common pkey_free sys_pkey_free341341-332 common statx sys_statx248248+237 common mbind __x64_sys_mbind249249+238 common set_mempolicy __x64_sys_set_mempolicy250250+239 common get_mempolicy __x64_sys_get_mempolicy251251+240 common mq_open __x64_sys_mq_open252252+241 common mq_unlink __x64_sys_mq_unlink253253+242 common mq_timedsend __x64_sys_mq_timedsend254254+243 common mq_timedreceive __x64_sys_mq_timedreceive255255+244 64 mq_notify __x64_sys_mq_notify256256+245 common mq_getsetattr __x64_sys_mq_getsetattr257257+246 64 kexec_load __x64_sys_kexec_load258258+247 64 waitid __x64_sys_waitid259259+248 common add_key __x64_sys_add_key260260+249 common request_key __x64_sys_request_key261261+250 common keyctl __x64_sys_keyctl262262+251 common ioprio_set __x64_sys_ioprio_set263263+252 common ioprio_get __x64_sys_ioprio_get264264+253 common inotify_init __x64_sys_inotify_init265265+254 common inotify_add_watch __x64_sys_inotify_add_watch266266+255 common inotify_rm_watch __x64_sys_inotify_rm_watch267267+256 common migrate_pages __x64_sys_migrate_pages268268+257 common openat __x64_sys_openat269269+258 common mkdirat __x64_sys_mkdirat270270+259 common mknodat __x64_sys_mknodat271271+260 common fchownat __x64_sys_fchownat272272+261 common futimesat __x64_sys_futimesat273273+262 common newfstatat __x64_sys_newfstatat274274+263 common unlinkat __x64_sys_unlinkat275275+264 common renameat __x64_sys_renameat276276+265 common linkat __x64_sys_linkat277277+266 common symlinkat __x64_sys_symlinkat278278+267 common readlinkat __x64_sys_readlinkat279279+268 common fchmodat __x64_sys_fchmodat280280+269 common faccessat __x64_sys_faccessat281281+270 common pselect6 __x64_sys_pselect6282282+271 common ppoll __x64_sys_ppoll283283+272 common unshare __x64_sys_unshare284284+273 64 set_robust_list __x64_sys_set_robust_list285285+274 64 get_robust_list __x64_sys_get_robust_list286286+275 common splice __x64_sys_splice287287+276 common tee __x64_sys_tee288288+277 common sync_file_range __x64_sys_sync_file_range289289+278 64 vmsplice __x64_sys_vmsplice290290+279 64 move_pages __x64_sys_move_pages291291+280 common utimensat __x64_sys_utimensat292292+281 common epoll_pwait __x64_sys_epoll_pwait293293+282 common signalfd __x64_sys_signalfd294294+283 common timerfd_create __x64_sys_timerfd_create295295+284 common eventfd __x64_sys_eventfd296296+285 common fallocate __x64_sys_fallocate297297+286 common timerfd_settime __x64_sys_timerfd_settime298298+287 common timerfd_gettime __x64_sys_timerfd_gettime299299+288 common accept4 __x64_sys_accept4300300+289 common signalfd4 __x64_sys_signalfd4301301+290 common eventfd2 __x64_sys_eventfd2302302+291 common epoll_create1 __x64_sys_epoll_create1303303+292 common dup3 __x64_sys_dup3304304+293 common pipe2 __x64_sys_pipe2305305+294 common inotify_init1 __x64_sys_inotify_init1306306+295 64 preadv __x64_sys_preadv307307+296 64 pwritev __x64_sys_pwritev308308+297 64 rt_tgsigqueueinfo __x64_sys_rt_tgsigqueueinfo309309+298 common perf_event_open __x64_sys_perf_event_open310310+299 64 recvmmsg __x64_sys_recvmmsg311311+300 common fanotify_init __x64_sys_fanotify_init312312+301 common fanotify_mark __x64_sys_fanotify_mark313313+302 common prlimit64 __x64_sys_prlimit64314314+303 common name_to_handle_at __x64_sys_name_to_handle_at315315+304 common open_by_handle_at __x64_sys_open_by_handle_at316316+305 common clock_adjtime __x64_sys_clock_adjtime317317+306 common syncfs __x64_sys_syncfs318318+307 64 sendmmsg __x64_sys_sendmmsg319319+308 common setns __x64_sys_setns320320+309 common getcpu __x64_sys_getcpu321321+310 64 process_vm_readv __x64_sys_process_vm_readv322322+311 64 process_vm_writev __x64_sys_process_vm_writev323323+312 common kcmp __x64_sys_kcmp324324+313 common finit_module __x64_sys_finit_module325325+314 common sched_setattr __x64_sys_sched_setattr326326+315 common sched_getattr __x64_sys_sched_getattr327327+316 common renameat2 __x64_sys_renameat2328328+317 common seccomp __x64_sys_seccomp329329+318 common getrandom __x64_sys_getrandom330330+319 common memfd_create __x64_sys_memfd_create331331+320 common kexec_file_load __x64_sys_kexec_file_load332332+321 common bpf __x64_sys_bpf333333+322 64 execveat __x64_sys_execveat/ptregs334334+323 common userfaultfd __x64_sys_userfaultfd335335+324 common membarrier __x64_sys_membarrier336336+325 common mlock2 __x64_sys_mlock2337337+326 common copy_file_range __x64_sys_copy_file_range338338+327 64 preadv2 __x64_sys_preadv2339339+328 64 pwritev2 __x64_sys_pwritev2340340+329 common pkey_mprotect __x64_sys_pkey_mprotect341341+330 common pkey_alloc __x64_sys_pkey_alloc342342+331 common pkey_free __x64_sys_pkey_free343343+332 common statx __x64_sys_statx342344343345#344346# x32-specific system call numbers start at 512 to avoid cache impact345345-# for native 64-bit operation.347347+# for native 64-bit operation. The __x32_compat_sys stubs are created348348+# on-the-fly for compat_sys_*() compatibility system calls if X86_X32349349+# is defined.346350#347347-512 x32 rt_sigaction compat_sys_rt_sigaction351351+512 x32 rt_sigaction __x32_compat_sys_rt_sigaction348352513 x32 rt_sigreturn sys32_x32_rt_sigreturn349349-514 x32 ioctl compat_sys_ioctl350350-515 x32 readv compat_sys_readv351351-516 x32 writev compat_sys_writev352352-517 x32 recvfrom compat_sys_recvfrom353353-518 x32 sendmsg compat_sys_sendmsg354354-519 x32 recvmsg compat_sys_recvmsg355355-520 x32 execve compat_sys_execve/ptregs356356-521 x32 ptrace compat_sys_ptrace357357-522 x32 rt_sigpending compat_sys_rt_sigpending358358-523 x32 rt_sigtimedwait compat_sys_rt_sigtimedwait359359-524 x32 rt_sigqueueinfo compat_sys_rt_sigqueueinfo360360-525 x32 sigaltstack compat_sys_sigaltstack361361-526 x32 timer_create compat_sys_timer_create362362-527 x32 mq_notify compat_sys_mq_notify363363-528 x32 kexec_load compat_sys_kexec_load364364-529 x32 waitid compat_sys_waitid365365-530 x32 set_robust_list compat_sys_set_robust_list366366-531 x32 get_robust_list compat_sys_get_robust_list367367-532 x32 vmsplice compat_sys_vmsplice368368-533 x32 move_pages compat_sys_move_pages369369-534 x32 preadv compat_sys_preadv64370370-535 x32 pwritev compat_sys_pwritev64371371-536 x32 rt_tgsigqueueinfo compat_sys_rt_tgsigqueueinfo372372-537 x32 recvmmsg compat_sys_recvmmsg373373-538 x32 sendmmsg compat_sys_sendmmsg374374-539 x32 process_vm_readv compat_sys_process_vm_readv375375-540 x32 process_vm_writev compat_sys_process_vm_writev376376-541 x32 setsockopt compat_sys_setsockopt377377-542 x32 getsockopt compat_sys_getsockopt378378-543 x32 io_setup compat_sys_io_setup379379-544 x32 io_submit compat_sys_io_submit380380-545 x32 execveat compat_sys_execveat/ptregs381381-546 x32 preadv2 compat_sys_preadv64v2382382-547 x32 pwritev2 compat_sys_pwritev64v2353353+514 x32 ioctl __x32_compat_sys_ioctl354354+515 x32 readv __x32_compat_sys_readv355355+516 x32 writev __x32_compat_sys_writev356356+517 x32 recvfrom __x32_compat_sys_recvfrom357357+518 x32 sendmsg __x32_compat_sys_sendmsg358358+519 x32 recvmsg __x32_compat_sys_recvmsg359359+520 x32 execve __x32_compat_sys_execve/ptregs360360+521 x32 ptrace __x32_compat_sys_ptrace361361+522 x32 rt_sigpending __x32_compat_sys_rt_sigpending362362+523 x32 rt_sigtimedwait __x32_compat_sys_rt_sigtimedwait363363+524 x32 rt_sigqueueinfo __x32_compat_sys_rt_sigqueueinfo364364+525 x32 sigaltstack __x32_compat_sys_sigaltstack365365+526 x32 timer_create __x32_compat_sys_timer_create366366+527 x32 mq_notify __x32_compat_sys_mq_notify367367+528 x32 kexec_load __x32_compat_sys_kexec_load368368+529 x32 waitid __x32_compat_sys_waitid369369+530 x32 set_robust_list __x32_compat_sys_set_robust_list370370+531 x32 get_robust_list __x32_compat_sys_get_robust_list371371+532 x32 vmsplice __x32_compat_sys_vmsplice372372+533 x32 move_pages __x32_compat_sys_move_pages373373+534 x32 preadv __x32_compat_sys_preadv64374374+535 x32 pwritev __x32_compat_sys_pwritev64375375+536 x32 rt_tgsigqueueinfo __x32_compat_sys_rt_tgsigqueueinfo376376+537 x32 recvmmsg __x32_compat_sys_recvmmsg377377+538 x32 sendmmsg __x32_compat_sys_sendmmsg378378+539 x32 process_vm_readv __x32_compat_sys_process_vm_readv379379+540 x32 process_vm_writev __x32_compat_sys_process_vm_writev380380+541 x32 setsockopt __x32_compat_sys_setsockopt381381+542 x32 getsockopt __x32_compat_sys_getsockopt382382+543 x32 io_setup __x32_compat_sys_io_setup383383+544 x32 io_submit __x32_compat_sys_io_submit384384+545 x32 execveat __x32_compat_sys_execveat/ptregs385385+546 x32 preadv2 __x32_compat_sys_preadv64v2386386+547 x32 pwritev2 __x32_compat_sys_pwritev64v2
···657657 break;658658 case PERF_RECORD_SWITCH:659659 case PERF_RECORD_SWITCH_CPU_WIDE:660660- if (has(SWITCH_OUT))660660+ if (has(SWITCH_OUT)) {661661 ret += fprintf(fp, "S");662662+ if (sample->misc & PERF_RECORD_MISC_SWITCH_OUT_PREEMPT)663663+ ret += fprintf(fp, "p");664664+ }662665 default:663666 break;664667 }···28042801 for_each_lang(scripts_path, scripts_dir, lang_dirent) {28052802 scnprintf(lang_path, MAXPATHLEN, "%s/%s", scripts_path,28062803 lang_dirent->d_name);28072807-#ifdef NO_LIBPERL28042804+#ifndef HAVE_LIBPERL_SUPPORT28082805 if (strstr(lang_path, "perl"))28092806 continue;28102807#endif28112811-#ifdef NO_LIBPYTHON28082808+#ifndef HAVE_LIBPYTHON_SUPPORT28122809 if (strstr(lang_path, "python"))28132810 continue;28142811#endif
+2-12
tools/perf/builtin-stat.c
···19431943 OPT_STRING(0, "post", &post_cmd, "command",19441944 "command to run after to the measured command"),19451945 OPT_UINTEGER('I', "interval-print", &stat_config.interval,19461946- "print counts at regular interval in ms (>= 10)"),19461946+ "print counts at regular interval in ms "19471947+ "(overhead is possible for values <= 100ms)"),19471948 OPT_INTEGER(0, "interval-count", &stat_config.times,19481949 "print counts for fixed number of times"),19491950 OPT_UINTEGER(0, "timeout", &stat_config.timeout,···29222921 goto out;29232922 }29242923 }29252925- }29262926-29272927- if (interval && interval < 100) {29282928- if (interval < 10) {29292929- pr_err("print interval must be >= 10ms\n");29302930- parse_options_usage(stat_usage, stat_options, "I", 1);29312931- goto out;29322932- } else29332933- pr_warning("print interval < 100ms. "29342934- "The overhead percentage could be high in some cases. "29352935- "Please proceed with caution.\n");29362924 }2937292529382926 if (stat_config.times && interval)
···3131 .max_entries = 1,3232};33333434-SEC("func=SyS_epoll_pwait")3434+SEC("func=do_epoll_wait")3535int bpf_func__SyS_epoll_pwait(void *ctx)3636{3737 int ind =0;
···11+/* SPDX-License-Identifier: GPL-2.0 */12/*23 * Copyright(C) 2015 Linaro Limited. All rights reserved.34 * Author: Mathieu Poirier <mathieu.poirier@linaro.org>44- *55- * This program is free software; you can redistribute it and/or modify it66- * under the terms of the GNU General Public License version 2 as published by77- * the Free Software Foundation.88- *99- * This program is distributed in the hope that it will be useful, but WITHOUT1010- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or1111- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for1212- * more details.1313- *1414- * You should have received a copy of the GNU General Public License along with1515- * this program. If not, see <http://www.gnu.org/licenses/>.165 */176187#ifndef INCLUDE__UTIL_PERF_CS_ETM_H__
+3-1
tools/perf/util/event.c
···14211421size_t perf_event__fprintf_switch(union perf_event *event, FILE *fp)14221422{14231423 bool out = event->header.misc & PERF_RECORD_MISC_SWITCH_OUT;14241424- const char *in_out = out ? "OUT" : "IN ";14241424+ const char *in_out = !out ? "IN " :14251425+ !(event->header.misc & PERF_RECORD_MISC_SWITCH_OUT_PREEMPT) ?14261426+ "OUT " : "OUT preempt";1425142714261428 if (event->header.type == PERF_RECORD_SWITCH)14271429 return fprintf(fp, " %s\n", in_out);
+2-4
tools/perf/util/evsel.c
···28702870#if defined(__i386__) || defined(__x86_64__)28712871 if (evsel->attr.type == PERF_TYPE_HARDWARE)28722872 return scnprintf(msg, size, "%s",28732873- "No hardware sampling interrupt available.\n"28742874- "No APIC? If so then you can boot the kernel with the \"lapic\" boot parameter to force-enable it.");28732873+ "No hardware sampling interrupt available.\n");28752874#endif28762875 break;28772876 case EBUSY:···2893289428942895 return scnprintf(msg, size,28952896 "The sys_perf_event_open() syscall returned with %d (%s) for event (%s).\n"28962896- "/bin/dmesg may provide additional information.\n"28972897- "No CONFIG_PERF_EVENTS=y kernel support configured?",28972897+ "/bin/dmesg | grep -i perf may provide additional information.\n",28982898 err, str_error_r(err, sbuf, sizeof(sbuf)),28992899 perf_evsel__name(evsel));29002900}
···1320132013211321 dir = opendir(path);13221322 if (!dir) {13231323- pr_warning("failed: can't open node sysfs data\n");13231323+ pr_debug2("%s: could't read %s, does this arch have topology information?\n",13241324+ __func__, path);13241325 return -1;13251326 }13261327
+6
tools/perf/util/pmu.c
···562562 if (stat(path, &st) == 0)563563 return 1;564564565565+ /* Look for cpu sysfs (specific to s390) */566566+ scnprintf(path, PATH_MAX, "%s/bus/event_source/devices/%s",567567+ sysfs, name);568568+ if (stat(path, &st) == 0 && !strncmp(name, "cpum_", 5))569569+ return 1;570570+565571 return 0;566572}567573
+3-5
tools/perf/util/symbol.c
···2091209120922092int symbol__annotation_init(void)20932093{20942094+ if (symbol_conf.init_annotation)20952095+ return 0;20962096+20942097 if (symbol_conf.initialized) {20952098 pr_err("Annotation needs to be init before symbol__init()\n");20962099 return -1;20972097- }20982098-20992099- if (symbol_conf.init_annotation) {21002100- pr_warning("Annotation being initialized multiple times\n");21012101- return 0;21022100 }2103210121042102 symbol_conf.priv_size += sizeof(struct annotation);
···378378 * complicated. This function uses a reasonable default length for379379 * the array and performs the appropriate allocation.380380 */381381-struct kvm_cpuid2 *allocate_kvm_cpuid2(void)381381+static struct kvm_cpuid2 *allocate_kvm_cpuid2(void)382382{383383 struct kvm_cpuid2 *cpuid;384384 int nent = 100;···402402 * Input Args: None403403 *404404 * Output Args:405405- * cpuid - The supported KVM CPUID406405 *407407- * Return: void406406+ * Return: The supported KVM CPUID408407 *409408 * Get the guest CPUID supported by KVM.410409 */411411-void kvm_get_supported_cpuid(struct kvm_cpuid2 *cpuid)410410+struct kvm_cpuid2 *kvm_get_supported_cpuid(void)412411{412412+ static struct kvm_cpuid2 *cpuid;413413 int ret;414414 int kvm_fd;415415416416+ if (cpuid)417417+ return cpuid;418418+419419+ cpuid = allocate_kvm_cpuid2();416420 kvm_fd = open(KVM_DEV_PATH, O_RDONLY);417421 TEST_ASSERT(kvm_fd >= 0, "open %s failed, rc: %i errno: %i",418422 KVM_DEV_PATH, kvm_fd, errno);···426422 ret, errno);427423428424 close(kvm_fd);425425+ return cpuid;429426}430427431428/* Locate a cpuid entry.···440435 * Return: A pointer to the cpuid entry. Never returns NULL.441436 */442437struct kvm_cpuid_entry2 *443443-find_cpuid_index_entry(struct kvm_cpuid2 *cpuid, uint32_t function,444444- uint32_t index)438438+kvm_get_supported_cpuid_index(uint32_t function, uint32_t index)445439{440440+ struct kvm_cpuid2 *cpuid;446441 struct kvm_cpuid_entry2 *entry = NULL;447442 int i;448443444444+ cpuid = kvm_get_supported_cpuid();449445 for (i = 0; i < cpuid->nent; i++) {450446 if (cpuid->entries[i].function == function &&451447 cpuid->entries[i].index == index) {···14411435 sparsebit_idx_t pg;1442143614431437 TEST_ASSERT((paddr_min % vm->page_size) == 0, "Min physical address "14441444- "not divisable by page size.\n"14381438+ "not divisible by page size.\n"14451439 " paddr_min: 0x%lx page_size: 0x%x",14461440 paddr_min, vm->page_size);14471441
+2-2
tools/testing/selftests/kvm/lib/sparsebit.c
···121121 * avoided by moving the setting of the nodes mask bits into122122 * the previous nodes num_after setting.123123 *124124- * + Node starting index is evenly divisable by the number of bits124124+ * + Node starting index is evenly divisible by the number of bits125125 * within a nodes mask member.126126 *127127 * + Nodes never represent a range of bits that wrap around the···1741174117421742 /* Validate node index is divisible by the mask size */17431743 if (nodep->idx % MASK_BITS) {17441744- fprintf(stderr, "Node index not divisable by "17441744+ fprintf(stderr, "Node index not divisible by "17451745 "mask size,\n"17461746 " nodep: %p nodep->idx: 0x%lx "17471747 "MASK_BITS: %lu\n",
+243
tools/testing/selftests/kvm/lib/vmx.c
···11+/*22+ * tools/testing/selftests/kvm/lib/x86.c33+ *44+ * Copyright (C) 2018, Google LLC.55+ *66+ * This work is licensed under the terms of the GNU GPL, version 2.77+ */88+99+#define _GNU_SOURCE /* for program_invocation_name */1010+1111+#include "test_util.h"1212+#include "kvm_util.h"1313+#include "x86.h"1414+#include "vmx.h"1515+1616+/* Create a default VM for VMX tests.1717+ *1818+ * Input Args:1919+ * vcpuid - The id of the single VCPU to add to the VM.2020+ * guest_code - The vCPU's entry point2121+ *2222+ * Output Args: None2323+ *2424+ * Return:2525+ * Pointer to opaque structure that describes the created VM.2626+ */2727+struct kvm_vm *2828+vm_create_default_vmx(uint32_t vcpuid, vmx_guest_code_t guest_code)2929+{3030+ struct kvm_cpuid2 *cpuid;3131+ struct kvm_vm *vm;3232+ vm_vaddr_t vmxon_vaddr;3333+ vm_paddr_t vmxon_paddr;3434+ vm_vaddr_t vmcs_vaddr;3535+ vm_paddr_t vmcs_paddr;3636+3737+ vm = vm_create_default(vcpuid, (void *) guest_code);3838+3939+ /* Enable nesting in CPUID */4040+ vcpu_set_cpuid(vm, vcpuid, kvm_get_supported_cpuid());4141+4242+ /* Setup of a region of guest memory for the vmxon region. */4343+ vmxon_vaddr = vm_vaddr_alloc(vm, getpagesize(), 0, 0, 0);4444+ vmxon_paddr = addr_gva2gpa(vm, vmxon_vaddr);4545+4646+ /* Setup of a region of guest memory for a vmcs. */4747+ vmcs_vaddr = vm_vaddr_alloc(vm, getpagesize(), 0, 0, 0);4848+ vmcs_paddr = addr_gva2gpa(vm, vmcs_vaddr);4949+5050+ vcpu_args_set(vm, vcpuid, 4, vmxon_vaddr, vmxon_paddr, vmcs_vaddr,5151+ vmcs_paddr);5252+5353+ return vm;5454+}5555+5656+void prepare_for_vmx_operation(void)5757+{5858+ uint64_t feature_control;5959+ uint64_t required;6060+ unsigned long cr0;6161+ unsigned long cr4;6262+6363+ /*6464+ * Ensure bits in CR0 and CR4 are valid in VMX operation:6565+ * - Bit X is 1 in _FIXED0: bit X is fixed to 1 in CRx.6666+ * - Bit X is 0 in _FIXED1: bit X is fixed to 0 in CRx.6767+ */6868+ __asm__ __volatile__("mov %%cr0, %0" : "=r"(cr0) : : "memory");6969+ cr0 &= rdmsr(MSR_IA32_VMX_CR0_FIXED1);7070+ cr0 |= rdmsr(MSR_IA32_VMX_CR0_FIXED0);7171+ __asm__ __volatile__("mov %0, %%cr0" : : "r"(cr0) : "memory");7272+7373+ __asm__ __volatile__("mov %%cr4, %0" : "=r"(cr4) : : "memory");7474+ cr4 &= rdmsr(MSR_IA32_VMX_CR4_FIXED1);7575+ cr4 |= rdmsr(MSR_IA32_VMX_CR4_FIXED0);7676+ /* Enable VMX operation */7777+ cr4 |= X86_CR4_VMXE;7878+ __asm__ __volatile__("mov %0, %%cr4" : : "r"(cr4) : "memory");7979+8080+ /*8181+ * Configure IA32_FEATURE_CONTROL MSR to allow VMXON:8282+ * Bit 0: Lock bit. If clear, VMXON causes a #GP.8383+ * Bit 2: Enables VMXON outside of SMX operation. If clear, VMXON8484+ * outside of SMX causes a #GP.8585+ */8686+ required = FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX;8787+ required |= FEATURE_CONTROL_LOCKED;8888+ feature_control = rdmsr(MSR_IA32_FEATURE_CONTROL);8989+ if ((feature_control & required) != required)9090+ wrmsr(MSR_IA32_FEATURE_CONTROL, feature_control | required);9191+}9292+9393+/*9494+ * Initialize the control fields to the most basic settings possible.9595+ */9696+static inline void init_vmcs_control_fields(void)9797+{9898+ vmwrite(VIRTUAL_PROCESSOR_ID, 0);9999+ vmwrite(POSTED_INTR_NV, 0);100100+101101+ vmwrite(PIN_BASED_VM_EXEC_CONTROL, rdmsr(MSR_IA32_VMX_PINBASED_CTLS));102102+ vmwrite(CPU_BASED_VM_EXEC_CONTROL, rdmsr(MSR_IA32_VMX_PROCBASED_CTLS));103103+ vmwrite(EXCEPTION_BITMAP, 0);104104+ vmwrite(PAGE_FAULT_ERROR_CODE_MASK, 0);105105+ vmwrite(PAGE_FAULT_ERROR_CODE_MATCH, -1); /* Never match */106106+ vmwrite(CR3_TARGET_COUNT, 0);107107+ vmwrite(VM_EXIT_CONTROLS, rdmsr(MSR_IA32_VMX_EXIT_CTLS) |108108+ VM_EXIT_HOST_ADDR_SPACE_SIZE); /* 64-bit host */109109+ vmwrite(VM_EXIT_MSR_STORE_COUNT, 0);110110+ vmwrite(VM_EXIT_MSR_LOAD_COUNT, 0);111111+ vmwrite(VM_ENTRY_CONTROLS, rdmsr(MSR_IA32_VMX_ENTRY_CTLS) |112112+ VM_ENTRY_IA32E_MODE); /* 64-bit guest */113113+ vmwrite(VM_ENTRY_MSR_LOAD_COUNT, 0);114114+ vmwrite(VM_ENTRY_INTR_INFO_FIELD, 0);115115+ vmwrite(TPR_THRESHOLD, 0);116116+ vmwrite(SECONDARY_VM_EXEC_CONTROL, 0);117117+118118+ vmwrite(CR0_GUEST_HOST_MASK, 0);119119+ vmwrite(CR4_GUEST_HOST_MASK, 0);120120+ vmwrite(CR0_READ_SHADOW, get_cr0());121121+ vmwrite(CR4_READ_SHADOW, get_cr4());122122+}123123+124124+/*125125+ * Initialize the host state fields based on the current host state, with126126+ * the exception of HOST_RSP and HOST_RIP, which should be set by vmlaunch127127+ * or vmresume.128128+ */129129+static inline void init_vmcs_host_state(void)130130+{131131+ uint32_t exit_controls = vmreadz(VM_EXIT_CONTROLS);132132+133133+ vmwrite(HOST_ES_SELECTOR, get_es());134134+ vmwrite(HOST_CS_SELECTOR, get_cs());135135+ vmwrite(HOST_SS_SELECTOR, get_ss());136136+ vmwrite(HOST_DS_SELECTOR, get_ds());137137+ vmwrite(HOST_FS_SELECTOR, get_fs());138138+ vmwrite(HOST_GS_SELECTOR, get_gs());139139+ vmwrite(HOST_TR_SELECTOR, get_tr());140140+141141+ if (exit_controls & VM_EXIT_LOAD_IA32_PAT)142142+ vmwrite(HOST_IA32_PAT, rdmsr(MSR_IA32_CR_PAT));143143+ if (exit_controls & VM_EXIT_LOAD_IA32_EFER)144144+ vmwrite(HOST_IA32_EFER, rdmsr(MSR_EFER));145145+ if (exit_controls & VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL)146146+ vmwrite(HOST_IA32_PERF_GLOBAL_CTRL,147147+ rdmsr(MSR_CORE_PERF_GLOBAL_CTRL));148148+149149+ vmwrite(HOST_IA32_SYSENTER_CS, rdmsr(MSR_IA32_SYSENTER_CS));150150+151151+ vmwrite(HOST_CR0, get_cr0());152152+ vmwrite(HOST_CR3, get_cr3());153153+ vmwrite(HOST_CR4, get_cr4());154154+ vmwrite(HOST_FS_BASE, rdmsr(MSR_FS_BASE));155155+ vmwrite(HOST_GS_BASE, rdmsr(MSR_GS_BASE));156156+ vmwrite(HOST_TR_BASE,157157+ get_desc64_base((struct desc64 *)(get_gdt_base() + get_tr())));158158+ vmwrite(HOST_GDTR_BASE, get_gdt_base());159159+ vmwrite(HOST_IDTR_BASE, get_idt_base());160160+ vmwrite(HOST_IA32_SYSENTER_ESP, rdmsr(MSR_IA32_SYSENTER_ESP));161161+ vmwrite(HOST_IA32_SYSENTER_EIP, rdmsr(MSR_IA32_SYSENTER_EIP));162162+}163163+164164+/*165165+ * Initialize the guest state fields essentially as a clone of166166+ * the host state fields. Some host state fields have fixed167167+ * values, and we set the corresponding guest state fields accordingly.168168+ */169169+static inline void init_vmcs_guest_state(void *rip, void *rsp)170170+{171171+ vmwrite(GUEST_ES_SELECTOR, vmreadz(HOST_ES_SELECTOR));172172+ vmwrite(GUEST_CS_SELECTOR, vmreadz(HOST_CS_SELECTOR));173173+ vmwrite(GUEST_SS_SELECTOR, vmreadz(HOST_SS_SELECTOR));174174+ vmwrite(GUEST_DS_SELECTOR, vmreadz(HOST_DS_SELECTOR));175175+ vmwrite(GUEST_FS_SELECTOR, vmreadz(HOST_FS_SELECTOR));176176+ vmwrite(GUEST_GS_SELECTOR, vmreadz(HOST_GS_SELECTOR));177177+ vmwrite(GUEST_LDTR_SELECTOR, 0);178178+ vmwrite(GUEST_TR_SELECTOR, vmreadz(HOST_TR_SELECTOR));179179+ vmwrite(GUEST_INTR_STATUS, 0);180180+ vmwrite(GUEST_PML_INDEX, 0);181181+182182+ vmwrite(VMCS_LINK_POINTER, -1ll);183183+ vmwrite(GUEST_IA32_DEBUGCTL, 0);184184+ vmwrite(GUEST_IA32_PAT, vmreadz(HOST_IA32_PAT));185185+ vmwrite(GUEST_IA32_EFER, vmreadz(HOST_IA32_EFER));186186+ vmwrite(GUEST_IA32_PERF_GLOBAL_CTRL,187187+ vmreadz(HOST_IA32_PERF_GLOBAL_CTRL));188188+189189+ vmwrite(GUEST_ES_LIMIT, -1);190190+ vmwrite(GUEST_CS_LIMIT, -1);191191+ vmwrite(GUEST_SS_LIMIT, -1);192192+ vmwrite(GUEST_DS_LIMIT, -1);193193+ vmwrite(GUEST_FS_LIMIT, -1);194194+ vmwrite(GUEST_GS_LIMIT, -1);195195+ vmwrite(GUEST_LDTR_LIMIT, -1);196196+ vmwrite(GUEST_TR_LIMIT, 0x67);197197+ vmwrite(GUEST_GDTR_LIMIT, 0xffff);198198+ vmwrite(GUEST_IDTR_LIMIT, 0xffff);199199+ vmwrite(GUEST_ES_AR_BYTES,200200+ vmreadz(GUEST_ES_SELECTOR) == 0 ? 0x10000 : 0xc093);201201+ vmwrite(GUEST_CS_AR_BYTES, 0xa09b);202202+ vmwrite(GUEST_SS_AR_BYTES, 0xc093);203203+ vmwrite(GUEST_DS_AR_BYTES,204204+ vmreadz(GUEST_DS_SELECTOR) == 0 ? 0x10000 : 0xc093);205205+ vmwrite(GUEST_FS_AR_BYTES,206206+ vmreadz(GUEST_FS_SELECTOR) == 0 ? 0x10000 : 0xc093);207207+ vmwrite(GUEST_GS_AR_BYTES,208208+ vmreadz(GUEST_GS_SELECTOR) == 0 ? 0x10000 : 0xc093);209209+ vmwrite(GUEST_LDTR_AR_BYTES, 0x10000);210210+ vmwrite(GUEST_TR_AR_BYTES, 0x8b);211211+ vmwrite(GUEST_INTERRUPTIBILITY_INFO, 0);212212+ vmwrite(GUEST_ACTIVITY_STATE, 0);213213+ vmwrite(GUEST_SYSENTER_CS, vmreadz(HOST_IA32_SYSENTER_CS));214214+ vmwrite(VMX_PREEMPTION_TIMER_VALUE, 0);215215+216216+ vmwrite(GUEST_CR0, vmreadz(HOST_CR0));217217+ vmwrite(GUEST_CR3, vmreadz(HOST_CR3));218218+ vmwrite(GUEST_CR4, vmreadz(HOST_CR4));219219+ vmwrite(GUEST_ES_BASE, 0);220220+ vmwrite(GUEST_CS_BASE, 0);221221+ vmwrite(GUEST_SS_BASE, 0);222222+ vmwrite(GUEST_DS_BASE, 0);223223+ vmwrite(GUEST_FS_BASE, vmreadz(HOST_FS_BASE));224224+ vmwrite(GUEST_GS_BASE, vmreadz(HOST_GS_BASE));225225+ vmwrite(GUEST_LDTR_BASE, 0);226226+ vmwrite(GUEST_TR_BASE, vmreadz(HOST_TR_BASE));227227+ vmwrite(GUEST_GDTR_BASE, vmreadz(HOST_GDTR_BASE));228228+ vmwrite(GUEST_IDTR_BASE, vmreadz(HOST_IDTR_BASE));229229+ vmwrite(GUEST_DR7, 0x400);230230+ vmwrite(GUEST_RSP, (uint64_t)rsp);231231+ vmwrite(GUEST_RIP, (uint64_t)rip);232232+ vmwrite(GUEST_RFLAGS, 2);233233+ vmwrite(GUEST_PENDING_DBG_EXCEPTIONS, 0);234234+ vmwrite(GUEST_SYSENTER_ESP, vmreadz(HOST_IA32_SYSENTER_ESP));235235+ vmwrite(GUEST_SYSENTER_EIP, vmreadz(HOST_IA32_SYSENTER_EIP));236236+}237237+238238+void prepare_vmcs(void *guest_rip, void *guest_rsp)239239+{240240+ init_vmcs_control_fields();241241+ init_vmcs_host_state();242242+ init_vmcs_guest_state(guest_rip, guest_rsp);243243+}
+231
tools/testing/selftests/kvm/vmx_tsc_adjust_test.c
···11+/*22+ * gtests/tests/vmx_tsc_adjust_test.c33+ *44+ * Copyright (C) 2018, Google LLC.55+ *66+ * This work is licensed under the terms of the GNU GPL, version 2.77+ *88+ *99+ * IA32_TSC_ADJUST test1010+ *1111+ * According to the SDM, "if an execution of WRMSR to the1212+ * IA32_TIME_STAMP_COUNTER MSR adds (or subtracts) value X from the TSC,1313+ * the logical processor also adds (or subtracts) value X from the1414+ * IA32_TSC_ADJUST MSR.1515+ *1616+ * Note that when L1 doesn't intercept writes to IA32_TSC, a1717+ * WRMSR(IA32_TSC) from L2 sets L1's TSC value, not L2's perceived TSC1818+ * value.1919+ *2020+ * This test verifies that this unusual case is handled correctly.2121+ */2222+2323+#include "test_util.h"2424+#include "kvm_util.h"2525+#include "x86.h"2626+#include "vmx.h"2727+2828+#include <string.h>2929+#include <sys/ioctl.h>3030+3131+#ifndef MSR_IA32_TSC_ADJUST3232+#define MSR_IA32_TSC_ADJUST 0x3b3333+#endif3434+3535+#define PAGE_SIZE 40963636+#define VCPU_ID 53737+3838+#define TSC_ADJUST_VALUE (1ll << 32)3939+#define TSC_OFFSET_VALUE -(1ll << 48)4040+4141+enum {4242+ PORT_ABORT = 0x1000,4343+ PORT_REPORT,4444+ PORT_DONE,4545+};4646+4747+struct vmx_page {4848+ vm_vaddr_t virt;4949+ vm_paddr_t phys;5050+};5151+5252+enum {5353+ VMXON_PAGE = 0,5454+ VMCS_PAGE,5555+ MSR_BITMAP_PAGE,5656+5757+ NUM_VMX_PAGES,5858+};5959+6060+struct kvm_single_msr {6161+ struct kvm_msrs header;6262+ struct kvm_msr_entry entry;6363+} __attribute__((packed));6464+6565+/* The virtual machine object. */6666+static struct kvm_vm *vm;6767+6868+/* Array of vmx_page descriptors that is shared with the guest. */6969+struct vmx_page *vmx_pages;7070+7171+#define exit_to_l0(_port, _arg) do_exit_to_l0(_port, (unsigned long) (_arg))7272+static void do_exit_to_l0(uint16_t port, unsigned long arg)7373+{7474+ __asm__ __volatile__("in %[port], %%al"7575+ :7676+ : [port]"d"(port), "D"(arg)7777+ : "rax");7878+}7979+8080+8181+#define GUEST_ASSERT(_condition) do { \8282+ if (!(_condition)) \8383+ exit_to_l0(PORT_ABORT, "Failed guest assert: " #_condition); \8484+} while (0)8585+8686+static void check_ia32_tsc_adjust(int64_t max)8787+{8888+ int64_t adjust;8989+9090+ adjust = rdmsr(MSR_IA32_TSC_ADJUST);9191+ exit_to_l0(PORT_REPORT, adjust);9292+ GUEST_ASSERT(adjust <= max);9393+}9494+9595+static void l2_guest_code(void)9696+{9797+ uint64_t l1_tsc = rdtsc() - TSC_OFFSET_VALUE;9898+9999+ wrmsr(MSR_IA32_TSC, l1_tsc - TSC_ADJUST_VALUE);100100+ check_ia32_tsc_adjust(-2 * TSC_ADJUST_VALUE);101101+102102+ /* Exit to L1 */103103+ __asm__ __volatile__("vmcall");104104+}105105+106106+static void l1_guest_code(struct vmx_page *vmx_pages)107107+{108108+#define L2_GUEST_STACK_SIZE 64109109+ unsigned long l2_guest_stack[L2_GUEST_STACK_SIZE];110110+ uint32_t control;111111+ uintptr_t save_cr3;112112+113113+ GUEST_ASSERT(rdtsc() < TSC_ADJUST_VALUE);114114+ wrmsr(MSR_IA32_TSC, rdtsc() - TSC_ADJUST_VALUE);115115+ check_ia32_tsc_adjust(-1 * TSC_ADJUST_VALUE);116116+117117+ prepare_for_vmx_operation();118118+119119+ /* Enter VMX root operation. */120120+ *(uint32_t *)vmx_pages[VMXON_PAGE].virt = vmcs_revision();121121+ GUEST_ASSERT(!vmxon(vmx_pages[VMXON_PAGE].phys));122122+123123+ /* Load a VMCS. */124124+ *(uint32_t *)vmx_pages[VMCS_PAGE].virt = vmcs_revision();125125+ GUEST_ASSERT(!vmclear(vmx_pages[VMCS_PAGE].phys));126126+ GUEST_ASSERT(!vmptrld(vmx_pages[VMCS_PAGE].phys));127127+128128+ /* Prepare the VMCS for L2 execution. */129129+ prepare_vmcs(l2_guest_code, &l2_guest_stack[L2_GUEST_STACK_SIZE]);130130+ control = vmreadz(CPU_BASED_VM_EXEC_CONTROL);131131+ control |= CPU_BASED_USE_MSR_BITMAPS | CPU_BASED_USE_TSC_OFFSETING;132132+ vmwrite(CPU_BASED_VM_EXEC_CONTROL, control);133133+ vmwrite(MSR_BITMAP, vmx_pages[MSR_BITMAP_PAGE].phys);134134+ vmwrite(TSC_OFFSET, TSC_OFFSET_VALUE);135135+136136+ /* Jump into L2. First, test failure to load guest CR3. */137137+ save_cr3 = vmreadz(GUEST_CR3);138138+ vmwrite(GUEST_CR3, -1ull);139139+ GUEST_ASSERT(!vmlaunch());140140+ GUEST_ASSERT(vmreadz(VM_EXIT_REASON) ==141141+ (EXIT_REASON_FAILED_VMENTRY | EXIT_REASON_INVALID_STATE));142142+ check_ia32_tsc_adjust(-1 * TSC_ADJUST_VALUE);143143+ vmwrite(GUEST_CR3, save_cr3);144144+145145+ GUEST_ASSERT(!vmlaunch());146146+ GUEST_ASSERT(vmreadz(VM_EXIT_REASON) == EXIT_REASON_VMCALL);147147+148148+ check_ia32_tsc_adjust(-2 * TSC_ADJUST_VALUE);149149+150150+ exit_to_l0(PORT_DONE, 0);151151+}152152+153153+static void allocate_vmx_page(struct vmx_page *page)154154+{155155+ vm_vaddr_t virt;156156+157157+ virt = vm_vaddr_alloc(vm, PAGE_SIZE, 0, 0, 0);158158+ memset(addr_gva2hva(vm, virt), 0, PAGE_SIZE);159159+160160+ page->virt = virt;161161+ page->phys = addr_gva2gpa(vm, virt);162162+}163163+164164+static vm_vaddr_t allocate_vmx_pages(void)165165+{166166+ vm_vaddr_t vmx_pages_vaddr;167167+ int i;168168+169169+ vmx_pages_vaddr = vm_vaddr_alloc(170170+ vm, sizeof(struct vmx_page) * NUM_VMX_PAGES, 0, 0, 0);171171+172172+ vmx_pages = (void *) addr_gva2hva(vm, vmx_pages_vaddr);173173+174174+ for (i = 0; i < NUM_VMX_PAGES; i++)175175+ allocate_vmx_page(&vmx_pages[i]);176176+177177+ return vmx_pages_vaddr;178178+}179179+180180+void report(int64_t val)181181+{182182+ printf("IA32_TSC_ADJUST is %ld (%lld * TSC_ADJUST_VALUE + %lld).\n",183183+ val, val / TSC_ADJUST_VALUE, val % TSC_ADJUST_VALUE);184184+}185185+186186+int main(int argc, char *argv[])187187+{188188+ vm_vaddr_t vmx_pages_vaddr;189189+ struct kvm_cpuid_entry2 *entry = kvm_get_supported_cpuid_entry(1);190190+191191+ if (!(entry->ecx & CPUID_VMX)) {192192+ printf("nested VMX not enabled, skipping test");193193+ return 0;194194+ }195195+196196+ vm = vm_create_default_vmx(VCPU_ID, (void *) l1_guest_code);197197+198198+ /* Allocate VMX pages and shared descriptors (vmx_pages). */199199+ vmx_pages_vaddr = allocate_vmx_pages();200200+ vcpu_args_set(vm, VCPU_ID, 1, vmx_pages_vaddr);201201+202202+ for (;;) {203203+ volatile struct kvm_run *run = vcpu_state(vm, VCPU_ID);204204+ struct kvm_regs regs;205205+206206+ vcpu_run(vm, VCPU_ID);207207+ TEST_ASSERT(run->exit_reason == KVM_EXIT_IO,208208+ "Got exit_reason other than KVM_EXIT_IO: %u (%s),\n",209209+ run->exit_reason,210210+ exit_reason_str(run->exit_reason));211211+212212+ vcpu_regs_get(vm, VCPU_ID, ®s);213213+214214+ switch (run->io.port) {215215+ case PORT_ABORT:216216+ TEST_ASSERT(false, "%s", (const char *) regs.rdi);217217+ /* NOT REACHED */218218+ case PORT_REPORT:219219+ report(regs.rdi);220220+ break;221221+ case PORT_DONE:222222+ goto done;223223+ default:224224+ TEST_ASSERT(false, "Unknown port 0x%x.", run->io.port);225225+ }226226+ }227227+228228+ kvm_vm_free(vm);229229+done:230230+ return 0;231231+}