irq/urgent for 5.3-rc3
Subsystems (9)
Linus,
please pull the latest irq-urgent-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq-urgent-for-linus
up to: a5dbba8f443e: Merge tag 'irqchip-fixes-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent
A small bunch of fixes from the irqchip department:
- Fix a couple of UAF on error paths (RZA1, GICv3 ITS)
- Fix iMX GPCv2 trigger setting
- Add missing of_node_put() on error path in MBIGEN
- Add another bunch of /* fall-through */ to silence warnings
Thanks,
tglx
------------------>
Anders Roxell (1):
irqchip/gic-v3: Mark expected switch fall-through
Lucas Stach (1):
irqchip/irq-imx-gpcv2: Forward irq type to parent
Nianyao Tang (1):
irqchip/gic-v3-its: Free unused vpt_page when alloc vpe table fail
Nishka Dasgupta (1):
irqchip/irq-mbigen: Add of_node_put() before return
Wen Yang (1):
irqchip/renesas-rza1: Fix an use-after-free in rza1_irqc_probe()
drivers/irqchip/irq-gic-v3-its.c | 2 +- drivers/irqchip/irq-gic-v3.c | 4 ++++ drivers/irqchip/irq-imx-gpcv2.c | 1 + drivers/irqchip/irq-mbigen.c | 9 +++++++-- 4 files changed, 13 insertions(+), 3 deletions(-)
drivers/irqchip/irq-gic-v3-its.c +1 -1
@@ -3010,7 +3010,7 @@ static int its_vpe_init(struct its_vpe *vpe)if (!its_alloc_vpe_table (vpe_id)) {its_vpe_id_free (vpe_id); -its_free_pending_table (vpe->vpt_page); +its_free_pending_table (vpt_page);return -ENOMEM ; }
drivers/irqchip/irq-gic-v3.c +4 -0
@@ -771,8 +771,10 @@ static void gic_cpu_sys_reg_init(void)case 7 :write_gicreg (0 ,ICC_AP0R3_EL1 );write_gicreg (0 ,ICC_AP0R2_EL1 ); +/* Fall through */ case 6 :write_gicreg (0 ,ICC_AP0R1_EL1 ); +/* Fall through */ case 5 :case 4 :write_gicreg (0 ,ICC_AP0R0_EL1 );
@@ -786,8 +788,10 @@ static void gic_cpu_sys_reg_init(void)case 7 :write_gicreg (0 ,ICC_AP1R3_EL1 );write_gicreg (0 ,ICC_AP1R2_EL1 ); +/* Fall through */ case 6 :write_gicreg (0 ,ICC_AP1R1_EL1 ); +/* Fall through */ case 5 :case 4 :write_gicreg (0 ,ICC_AP1R0_EL1 );
drivers/irqchip/irq-imx-gpcv2.c +1 -0
@@ -131,6 +131,7 @@ static struct irq_chip gpcv2_irqchip_data_chip = { .irq_unmask = imx_gpcv2_irq_unmask, .irq_set_wake = imx_gpcv2_irq_set_wake, .irq_retrigger = irq_chip_retrigger_hierarchy, + .irq_set_type = irq_chip_set_type_parent,#ifdef CONFIG_SMP .irq_set_affinity = irq_chip_set_affinity_parent,#endif
drivers/irqchip/irq-mbigen.c +7 -2
@@ -241,12 +241,15 @@ static int mbigen_of_create_domain(struct platform_device *pdev, parent = platform_bus_type.dev_root; child =of_platform_device_create (np,NULL , parent); -if (!child) +if (!child) { +of_node_put (np);return -ENOMEM ; + }if (of_property_read_u32 (child->dev.of_node,"num-pins" , &num_pins) <0 ) {dev_err (&pdev->dev,"No num-pins property\n" ); +of_node_put (np);return -EINVAL ; }
@@ -254,8 +257,10 @@ static int mbigen_of_create_domain(struct platform_device *pdev, mbigen_write_msg, &mbigen_domain_ops, mgn_chip); -if (!domain) +if (!domain) { +of_node_put (np);return -ENOMEM ; + } }return 0 ;
[GIT pull] timers/urgent for 5.3-rc3
Linus,
please pull the latest timers-urgent-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-urgent-for-linus
up to: 33a58980ff3c: arm64: compat: vdso: Use legacy syscalls as fallback
A series of commits to deal with the regression caused by the generic VDSO implementation. The usage of clock_gettime64() for 32bit compat fallback syscalls, caused seccomp filters to kill innocent processes because they only allow clock_gettime().
Handle the compat syscalls with clock_gettime() as before, which is not a functional problem for the VDSO as the legacy compat application interface is not y2038 safe anyway. It's just extra fallback code which needs to be implemented on every architecture. It's opt in for now so that it does not break the compile of already converted architectures in linux-next. Once these are fixed, the #ifdeffery goes away.
So much for trying to be smart and reuse code...
Thanks,
tglx
------------------>
Thomas Gleixner (5):
lib/vdso/32: Remove inconsistent NULL pointer checks lib/vdso: Move fallback invocation to the callers lib/vdso/32: Provide legacy syscall fallbacks x86/vdso/32: Use 32bit syscall fallback
arm64: compat: vdso: Use legacy syscalls as fallback
arch/arm64/include/asm/vdso/compat_gettimeofday.h | 40 ++++++++++++ arch/x86/include/asm/vdso/gettimeofday.h | 36 +++++++++++ lib/vdso/gettimeofday.c | 79 ++++++++++++++--------- 3 files changed, 123 insertions(+), 32 deletions(-)
arch/arm64/include/asm/vdso/compat_gettimeofday.h +40 -0
@@ -16,6 +16,8 @@#define VDSO_HAS_CLOCK_GETRES 1 +#define VDSO_HAS_32BIT_FALLBACK 1 +static __always_inline int gettimeofday_fallback(struct __kernel_old_timeval *_tv,struct timezone *_tz)
@@ -51,6 +53,23 @@ long clock_gettime_fallback(clockid_t _clkid, struct __kernel_timespec *_ts)return ret; } +static __always_inline +long clock_gettime32_fallback (clockid_t _clkid,struct old_timespec32 *_ts) +{ + register struct old_timespec32 *ts asm("r1") = _ts; + register clockid_t clkid asm("r0") = _clkid; + registerlong ret asm ("r0" ); + register long nr asm("r7") = __NR_compat_clock_gettime; + + asmvolatile ( +" swi #0\n" + :"=r" (ret) + :"r" (clkid),"r" (ts),"r" (nr) + :"memory" ); + +return ret; +} +static __always_inline int clock_getres_fallback(clockid_t _clkid, struct __kernel_timespec *_ts) {
@@ -72,6 +91,27 @@ int clock_getres_fallback(clockid_t _clkid, struct __kernel_timespec *_ts)return ret; } +static __always_inline +int clock_getres32_fallback(clockid_t _clkid, struct old_timespec32 *_ts) +{ + register struct old_timespec32 *ts asm("r1") = _ts; + register clockid_t clkid asm("r0") = _clkid; + registerlong ret asm ("r0" ); + register long nr asm("r7") = __NR_compat_clock_getres; + +/* The checks below are required for ABI consistency with arm */ +if ((_clkid >=MAX_CLOCKS ) && (_ts ==NULL )) +return -EINVAL ; + + asmvolatile ( +" swi #0\n" + :"=r" (ret) + :"r" (clkid),"r" (ts),"r" (nr) + :"memory" ); + +return ret; +} + static __always_inline u64 __arch_get_hw_counter(s32 clock_mode) {u64 res;
arch/x86/include/asm/vdso/gettimeofday.h +36 -0
@@ -96,6 +96,8 @@ long clock_getres_fallback(clockid_t _clkid, struct __kernel_timespec *_ts)#else +#define VDSO_HAS_32BIT_FALLBACK 1 +static __always_inline long clock_gettime_fallback (clockid_t _clkid,struct __kernel_timespec *_ts) {
@@ -113,6 +115,23 @@ long clock_gettime_fallback(clockid_t _clkid, struct __kernel_timespec *_ts)return ret; } +static __always_inline +long clock_gettime32_fallback (clockid_t _clkid,struct old_timespec32 *_ts) +{ +long ret; + + asm ( +"mov %%ebx, %%edx \n" +"mov %[clock], %%ebx \n" +"call __kernel_vsyscall \n" +"mov %%edx, %%ebx \n" + :"=a" (ret),"=m" (*_ts) + :"0" (__NR_clock_gettime), [clock]"g" (_clkid),"c" (_ts) + :"edx" ); + +return ret; +} +static __always_inline long gettimeofday_fallback (struct __kernel_old_timeval *_tv,struct timezone *_tz)
@@ -148,6 +167,23 @@ clock_getres_fallback(clockid_t _clkid, struct __kernel_timespec *_ts) return ret; } +static __always_inline +long clock_getres32_fallback (clockid_t _clkid,struct old_timespec32 *_ts) +{ +long ret; + + asm ( +"mov %%ebx, %%edx \n" +"mov %[clock], %%ebx \n" +"call __kernel_vsyscall \n" +"mov %%edx, %%ebx \n" + :"=a" (ret),"=m" (*_ts) + :"0" (__NR_clock_getres), [clock]"g" (_clkid),"c" (_ts) + :"edx" ); + +return ret; +} +#endif #ifdef CONFIG_PARAVIRT_CLOCK
lib/vdso/gettimeofday.c +47 -32
151 lines not on this page · raw message
Re: [GIT pull] timers/urgent for 5.3-rc3
The pull request you sent on Sat, 03 Aug 2019 16:36:53 -0000:
The pull request you sent on Sat, 03 Aug 2019 16:36:53 -0000:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gittimers-urgent-for-linus
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/0432a0a066b05361b6d4d26522233c3c76c9e5da
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker
[GIT pull] perf/urgent for 5.3-rc3
In reply to Thomas GleixnerLinus,
please pull the latest perf-urgent-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf-urgent-for-linus
up to: b3c303be4c35: Merge tag 'perf-urgent-for-mingo-5.3-20190729' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
A set of updates for perf tools and documentation:
tools:
perf header:
- Prevent a division by zero
- Deal with an uninitialized warning proper
libbpf:
- Fix the missiong __WORDSIZE definition for musl & al
UAPI headers:
- Synchronize kernel headers
Documentation:
- Fix the memory units for perf.data size
Thanks,
tglx
------------------>
Andrii Nakryiko (1):
libbpf: fix missing __WORDSIZE definition
Arnaldo Carvalho de Melo (8):
tools include UAPI: Sync x86's syscalls_64.tbl and generic unistd.h to pick up clone3 and pidfd_open tools headers UAPI: Update tools's copy of kvm.h headers
tools headers UAPI: Update tools's copy of mman.h headers
tools headers UAPI: Update tools's copy of drm.h headers
tools perf beauty: Fix usbdevfs_ioctl table generator to handle _IOC()
tools headers UAPI: Sync usbdevice_fs.h with the kernels to get new ioctl
tools headers UAPI: Sync sched.h with the kernel
tools headers UAPI: Sync if_link.h with the kernel
Numfor Mbiziwo-Tiapo (1):
perf header: Fix use of unitialized value warning
Vince Weaver (2):
perf header: Fix divide by zero error if f_header.attr_size==0 perf tools: Fix perf.data documentation units for memory size
tools/arch/arm/include/uapi/asm/kvm.h | 12 ++ tools/arch/arm64/include/uapi/asm/kvm.h | 10 + tools/arch/powerpc/include/uapi/asm/mman.h | 4 - tools/arch/sparc/include/uapi/asm/mman.h | 4 - tools/arch/x86/include/uapi/asm/kvm.h | 22 ++- tools/arch/x86/include/uapi/asm/vmx.h | 1 - tools/include/uapi/asm-generic/mman-common.h | 15 +- tools/include/uapi/asm-generic/mman.h | 10 +- tools/include/uapi/asm-generic/unistd.h | 8 +- tools/include/uapi/drm/drm.h | 1 + tools/include/uapi/drm/i915_drm.h | 209 ++++++++++++++++++++- tools/include/uapi/linux/if_link.h | 5 + tools/include/uapi/linux/kvm.h | 3 + tools/include/uapi/linux/sched.h | 30 ++- tools/include/uapi/linux/usbdevice_fs.h | 26 +++ tools/lib/bpf/hashmap.h | 5 + tools/perf/Documentation/perf.data-file-format.txt | 2 +- tools/perf/arch/x86/entry/syscalls/syscall_64.tbl | 2 + tools/perf/trace/beauty/usbdevfs_ioctl.sh | 9 +- tools/perf/util/header.c | 9 +- 20 files changed, 352 insertions(+), 35 deletions(-)
tools/arch/arm/include/uapi/asm/kvm.h +12 -0
@@ -214,6 +214,18 @@ struct kvm_vcpu_events {#define KVM_REG_ARM_FW_REG (r) (KVM_REG_ARM | KVM_REG_SIZE_U64 | \ KVM_REG_ARM_FW | ((r) & 0xffff))#define KVM_REG_ARM_PSCI_VERSION KVM_REG_ARM_FW_REG(0) +#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1 KVM_REG_ARM_FW_REG(1) +/* Higher values mean better protection. */ +#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1_NOT_AVAIL 0 +#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1_AVAIL 1 +#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1_NOT_REQUIRED 2 +#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2 KVM_REG_ARM_FW_REG(2) +/* Higher values mean better protection. */ +#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_NOT_AVAIL 0 +#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_UNKNOWN 1 +#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_AVAIL 2 +#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_NOT_REQUIRED 3 +#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_ENABLED (1U << 4)/* Device Control API: ARM VGIC */ #define KVM_DEV_ARM_VGIC_GRP_ADDR 0
tools/arch/arm64/include/uapi/asm/kvm.h +10 -0
@@ -229,6 +229,16 @@ struct kvm_vcpu_events {#define KVM_REG_ARM_FW_REG (r) (KVM_REG_ARM64 | KVM_REG_SIZE_U64 | \ KVM_REG_ARM_FW | ((r) & 0xffff))#define KVM_REG_ARM_PSCI_VERSION KVM_REG_ARM_FW_REG(0) +#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1 KVM_REG_ARM_FW_REG(1) +#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1_NOT_AVAIL 0 +#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1_AVAIL 1 +#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1_NOT_REQUIRED 2 +#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2 KVM_REG_ARM_FW_REG(2) +#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_NOT_AVAIL 0 +#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_UNKNOWN 1 +#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_AVAIL 2 +#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_NOT_REQUIRED 3 +#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_ENABLED (1U << 4)/* SVE registers */ #define KVM_REG_ARM64_SVE (0x15 << KVM_REG_ARM_COPROC_SHIFT)
tools/arch/powerpc/include/uapi/asm/mman.h +0 -4
@@ -4,12 +4,8 @@#define MAP_DENYWRITE 0x0800#define MAP_EXECUTABLE 0x1000#define MAP_GROWSDOWN 0x0100 -#define MAP_HUGETLB 0x40000#define MAP_LOCKED 0x80 -#define MAP_NONBLOCK 0x10000#define MAP_NORESERVE 0x40 -#define MAP_POPULATE 0x8000 -#define MAP_STACK 0x20000#include <uapi/asm-generic/mman-common.h> /* MAP_32BIT is undefined on powerpc, fix it for perf */ #define MAP_32BIT 0
tools/arch/sparc/include/uapi/asm/mman.h +0 -4
@@ -4,12 +4,8 @@#define MAP_DENYWRITE 0x0800#define MAP_EXECUTABLE 0x1000#define MAP_GROWSDOWN 0x0200 -#define MAP_HUGETLB 0x40000#define MAP_LOCKED 0x100 -#define MAP_NONBLOCK 0x10000#define MAP_NORESERVE 0x40 -#define MAP_POPULATE 0x8000 -#define MAP_STACK 0x20000#include <uapi/asm-generic/mman-common.h> /* MAP_32BIT is undefined on sparc, fix it for perf */ #define MAP_32BIT 0
tools/arch/x86/include/uapi/asm/kvm.h +18 -4
@@ -378,10 +378,11 @@ struct kvm_sync_regs {struct kvm_vcpu_events events; }; -#define KVM_X86_QUIRK_LINT0_REENABLED (1 << 0) -#define KVM_X86_QUIRK_CD_NW_CLEARED (1 << 1) -#define KVM_X86_QUIRK_LAPIC_MMIO_HOLE (1 << 2) -#define KVM_X86_QUIRK_OUT_7E_INC_RIP (1 << 3) +#define KVM_X86_QUIRK_LINT0_REENABLED (1 << 0) +#define KVM_X86_QUIRK_CD_NW_CLEARED (1 << 1) +#define KVM_X86_QUIRK_LAPIC_MMIO_HOLE (1 << 2) +#define KVM_X86_QUIRK_OUT_7E_INC_RIP (1 << 3) +#define KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT (1 << 4)#define KVM_STATE_NESTED_FORMAT_VMX 0#define KVM_STATE_NESTED_FORMAT_SVM 1/* unused */
@@ -432,4 +433,17 @@ struct kvm_nested_state { } data; }; +/* for KVM_CAP_PMU_EVENT_FILTER */ +struct kvm_pmu_event_filter { +__u32 action; +__u32 nevents; +__u32 fixed_counter_bitmap; +__u32 flags; +__u32 pad[4 ]; +__u64 events[0 ]; +}; + +#define KVM_PMU_EVENT_ALLOW 0 +#define KVM_PMU_EVENT_DENY 1 +#endif /* _ASM_X86_KVM_H */
tools/arch/x86/include/uapi/asm/vmx.h +0 -1
@@ -146,7 +146,6 @@#define VMX_ABORT_SAVE_GUEST_MSR_FAIL 1#define VMX_ABORT_LOAD_HOST_PDPTE_FAIL 2 -#define VMX_ABORT_VMCS_CORRUPTED 3#define VMX_ABORT_LOAD_HOST_MSR_FAIL 4#endif /* _UAPIVMX_H */
tools/include/uapi/asm-generic/mman-common.h +9 -6
@@ -19,15 +19,18 @@#define MAP_TYPE 0x0f/* Mask for type of mapping */ #define MAP_FIXED 0x10/* Interpret addr exactly */ #define MAP_ANONYMOUS 0x20/* don't use a file */ -#ifdef CONFIG_MMAP_ALLOW_UNINITIALIZED -# define MAP_UNINITIALIZED 0x4000000/* For anonymous mmap, memory could be uninitialized */ -#else -# define MAP_UNINITIALIZED 0x0/* Don't support this flag */ -#endif -/* 0x0100 - 0x80000 flags are defined in asm-generic/mman.h */ +/* 0x0100 - 0x4000 flags are defined in asm-generic/mman.h */ +#define MAP_POPULATE 0x008000/* populate (prefault) pagetables */ +#define MAP_NONBLOCK 0x010000/* do not block on IO */ +#define MAP_STACK 0x020000/* give out an address that is best suited for process/thread stacks */ +#define MAP_HUGETLB 0x040000/* create a huge page mapping */ +#define MAP_SYNC 0x080000/* perform synchronous page faults for the mapping */ #define MAP_FIXED_NOREPLACE 0x100000/* MAP_FIXED which doesn't unmap underlying mapping */ +#define MAP_UNINITIALIZED 0x4000000/* For anonymous mmap, memory could be +* uninitialized */ +/* * Flags for mlock */
tools/include/uapi/asm-generic/mman.h +4 -6
@@ -9,13 +9,11 @@#define MAP_EXECUTABLE 0x1000/* mark it as an executable */ #define MAP_LOCKED 0x2000/* pages are locked */ #define MAP_NORESERVE 0x4000/* don't check for reservations */ -#define MAP_POPULATE 0x8000/* populate (prefault) pagetables */ -#define MAP_NONBLOCK 0x10000/* do not block on IO */ -#define MAP_STACK 0x20000/* give out an address that is best suited for process/thread stacks */ -#define MAP_HUGETLB 0x40000/* create a huge page mapping */ -#define MAP_SYNC 0x80000/* perform synchronous page faults for the mapping */ -/* Bits [26:31] are reserved, see mman-common.h for MAP_HUGETLB usage */ +/* +* Bits [26:31] are reserved, see asm-generic/hugetlb_encode.h +* for MAP_HUGETLB usage +*/ #define MCL_CURRENT 1/* lock all current mappings */ #define MCL_FUTURE 2/* lock all future mappings */
tools/include/uapi/asm-generic/unistd.h +7 -1
@@ -844,9 +844,15 @@ __SYSCALL(__NR_fsconfig, sys_fsconfig) __SYSCALL(__NR_fsmount, sys_fsmount)#define __NR_fspick 433 __SYSCALL(__NR_fspick, sys_fspick) +#define __NR_pidfd_open 434 +__SYSCALL(__NR_pidfd_open, sys_pidfd_open) +#ifdef __ARCH_WANT_SYS_CLONE3 +#define __NR_clone3 435 +__SYSCALL(__NR_clone3, sys_clone3) +#endif #undef __NR_syscalls -#define __NR_syscalls 434 +#define __NR_syscalls 436/* * 32 bit systems traditionally used different
tools/include/uapi/drm/drm.h +1 -0
@@ -50,6 +50,7 @@ typedef unsigned int drm_handle_t;#else /* One of the BSDs */ +#include <stdint.h> #include <sys/ioccom.h> #include <sys/types.h> typedef int8_t __s8 ;
tools/include/uapi/drm/i915_drm.h +206 -3
284 lines not on this page · raw message
tools/include/uapi/linux/if_link.h +5 -0
@@ -695,6 +695,7 @@ enum {IFLA_VF_IB_NODE_GUID ,/* VF Infiniband node GUID */ IFLA_VF_IB_PORT_GUID ,/* VF Infiniband port GUID */ IFLA_VF_VLAN_LIST ,/* nested list of vlans, option for QinQ */ +IFLA_VF_BROADCAST ,/* VF broadcast */ __IFLA_VF_MAX, };
@@ -705,6 +706,10 @@ struct ifla_vf_mac {__u8 mac[32 ];/* MAX_ADDR_LEN */ }; +struct ifla_vf_broadcast { +__u8 broadcast[32 ]; +}; +struct ifla_vf_vlan {__u32 vf;__u32 vlan;/* 0 - 4095, 0 disables VLAN filter */
tools/include/uapi/linux/kvm.h +3 -0
@@ -995,6 +995,7 @@ struct kvm_ppc_resize_hpt {#define KVM_CAP_ARM_SVE 170#define KVM_CAP_ARM_PTRAUTH_ADDRESS 171#define KVM_CAP_ARM_PTRAUTH_GENERIC 172 +#define KVM_CAP_PMU_EVENT_FILTER 173#ifdef KVM_CAP_IRQ_ROUTING
@@ -1329,6 +1330,8 @@ struct kvm_s390_ucas_mapping {#define KVM_PPC_GET_RMMU_INFO _IOW(KVMIO, 0xb0, struct kvm_ppc_rmmu_info)/* Available with KVM_CAP_PPC_GET_CPU_CHAR */ #define KVM_PPC_GET_CPU_CHAR _IOR(KVMIO, 0xb1, struct kvm_ppc_cpu_char) +/* Available with KVM_CAP_PMU_EVENT_FILTER */ +#define KVM_SET_PMU_EVENT_FILTER _IOW(KVMIO, 0xb2, struct kvm_pmu_event_filter)/* ioctl for vm fd */ #define KVM_CREATE_DEVICE _IOWR(KVMIO, 0xe0, struct kvm_create_device)
tools/include/uapi/linux/sched.h +29 -1
@@ -2,6 +2,8 @@#ifndef _UAPI_LINUX_SCHED_H#define _UAPI_LINUX_SCHED_H +#include <linux/types.h> +/* * cloning flags: */
@@ -31,6 +33,20 @@#define CLONE_NEWNET 0x40000000/* New network namespace */ #define CLONE_IO 0x80000000/* Clone io context */ +/* +* Arguments for the clone3 syscall +*/ +struct clone_args { +__aligned_u64 flags; +__aligned_u64 pidfd; +__aligned_u64 child_tid; +__aligned_u64 parent_tid; +__aligned_u64 exit_signal; +__aligned_u64 stack; +__aligned_u64 stack_size; +__aligned_u64 tls; +}; +/* * Scheduling policies */
@@ -51,9 +67,21 @@#define SCHED_FLAG_RESET_ON_FORK 0x01#define SCHED_FLAG_RECLAIM 0x02#define SCHED_FLAG_DL_OVERRUN 0x04 +#define SCHED_FLAG_KEEP_POLICY 0x08 +#define SCHED_FLAG_KEEP_PARAMS 0x10 +#define SCHED_FLAG_UTIL_CLAMP_MIN 0x20 +#define SCHED_FLAG_UTIL_CLAMP_MAX 0x40 + +#define SCHED_FLAG_KEEP_ALL (SCHED_FLAG_KEEP_POLICY | \ + SCHED_FLAG_KEEP_PARAMS) + +#define SCHED_FLAG_UTIL_CLAMP (SCHED_FLAG_UTIL_CLAMP_MIN | \ + SCHED_FLAG_UTIL_CLAMP_MAX)#define SCHED_FLAG_ALL (SCHED_FLAG_RESET_ON_FORK | \ SCHED_FLAG_RECLAIM | \ - SCHED_FLAG_DL_OVERRUN) + SCHED_FLAG_DL_OVERRUN | \ + SCHED_FLAG_KEEP_ALL | \ + SCHED_FLAG_UTIL_CLAMP)#endif /* _UAPI_LINUX_SCHED_H */
tools/include/uapi/linux/usbdevice_fs.h +26 -0
@@ -76,6 +76,26 @@ struct usbdevfs_connectinfo {unsigned char slow; }; +struct usbdevfs_conninfo_ex { +__u32 size;/* Size of the structure from the kernel's */ +/* point of view. Can be used by userspace */ +/* to determine how much data can be */ +/* used/trusted. */ +__u32 busnum;/* USB bus number, as enumerated by the */ +/* kernel, the device is connected to. */ +__u32 devnum;/* Device address on the bus. */ +__u32 speed;/* USB_SPEED_* constants from ch9.h */ +__u8 num_ports;/* Number of ports the device is connected */ +/* to on the way to the root hub. It may */ +/* be bigger than size of 'ports' array so */ +/* userspace can detect overflows. */ +__u8 ports[7 ];/* List of ports on the way from the root */ +/* hub to the device. Current limit in */ +/* USB specification is 7 tiers (root hub, */ +/* 5 intermediate hubs, device), which */ +/* gives at most 6 port entries. */ +}; +#define USBDEVFS_URB_SHORT_NOT_OK 0x01#define USBDEVFS_URB_ISO_ASAP 0x02#define USBDEVFS_URB_BULK_CONTINUATION 0x04
@@ -137,6 +157,7 @@ struct usbdevfs_hub_portinfo {#define USBDEVFS_CAP_REAP_AFTER_DISCONNECT 0x10#define USBDEVFS_CAP_MMAP 0x20#define USBDEVFS_CAP_DROP_PRIVILEGES 0x40 +#define USBDEVFS_CAP_CONNINFO_EX 0x80/* USBDEVFS_DISCONNECT_CLAIM flags & struct */
@@ -197,5 +218,10 @@ struct usbdevfs_streams {#define USBDEVFS_FREE_STREAMS _IOR('U', 29, struct usbdevfs_streams)#define USBDEVFS_DROP_PRIVILEGES _IOW('U', 30, __u32)#define USBDEVFS_GET_SPEED _IO('U', 31) +/* +* Returns struct usbdevfs_conninfo_ex; length is variable to allow +* extending size of the data returned. +*/ +#define USBDEVFS_CONNINFO_EX (len) _IOC(_IOC_READ, 'U', 32, len)#endif /* _UAPI_LINUX_USBDEVICE_FS_H */
tools/lib/bpf/hashmap.h +5 -0
@@ -10,6 +10,11 @@#include <stdbool.h> #include <stddef.h> +#ifdef __GLIBC__ +#include <bits/wordsize.h> +#else +#include <bits/reg.h> +#endif #include "libbpf_internal.h" static inline size_t hash_bits (size_t h,int bits)
tools/perf/Documentation/perf.data-file-format.txt +1 -1
@@ -126,7 +126,7 @@ vendor,family,model,stepping. For example: GenuineIntel,6,69,1 HEADER_TOTAL_MEM = 10, -An uint64_t with the total memory in bytes. +An uint64_t with the total memory in kilobytes. HEADER_CMDLINE = 11,
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl +2 -0
@@ -355,6 +355,8 @@ 431 common fsconfig __x64_sys_fsconfig 432 common fsmount __x64_sys_fsmount 433 common fspick __x64_sys_fspick +434 common pidfd_open __x64_sys_pidfd_open +435 common clone3 __x64_sys_clone3/ptregs # # x32-specific system call numbers start at 512 to avoid cache impact
tools/perf/trace/beauty/usbdevfs_ioctl.sh +6 -3
@@ -3,10 +3,13 @@ [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/ +# also as: +# #define USBDEVFS_CONNINFO_EX(len) _IOC(_IOC_READ, 'U', 32, len) + printf "static const char *usbdevfs_ioctl_cmds[] = {\n" -regex="^#[[:space:]]*define[[:space:]]+USBDEVFS_(\w+)[[:space:]]+_IO[WR]{0,2}\([[:space:]]*'U'[[:space:]]*,[[:space:]]*([[:digit:]]+).*" -egrep $regex ${header_dir}/usbdevice_fs.h | egrep -v 'USBDEVFS_\w+32[[:space:]]' | \ - sed -r "s/$regex/\2 \1/g" | \ +regex="^#[[:space:]]*define[[:space:]]+USBDEVFS_(\w+)(\(\w+\))?[[:space:]]+_IO[CWR]{0,2}\([[:space:]]*(_IOC_\w+,[[:space:]]*)?'U'[[:space:]]*,[[:space:]]*([[:digit:]]+).*" +egrep "$regex" ${header_dir}/usbdevice_fs.h | egrep -v 'USBDEVFS_\w+32[[:space:]]' | \ + sed -r "s/$regex/\4 \1/g" | \ sort | xargs printf "\t[%s] = \"%s\",\n" printf "};\n\n" printf "#if 0\n"
tools/perf/util/header.c +8 -1
@@ -3559,6 +3559,13 @@ int perf_session__read_header(struct perf_session *session) data->file.path); } +if (f_header.attr_size ==0 ) { +pr_err ("ERROR: The %s file's attr size field is 0 which is unexpected.\n" +"Was the 'perf record' command properly terminated?\n" , + data->file.path); +return -EINVAL ; + } + nr_attrs = f_header.attrs.size / f_header.attr_size;lseek (fd, f_header.attrs.offset,SEEK_SET );
@@ -3639,7 +3646,7 @@ int perf_event__synthesize_attr(struct perf_tool *tool, size +=sizeof (struct perf_event_header ); size += ids *sizeof (u64); - ev =malloc (size); + ev =zalloc (size);if (ev ==NULL )return -ENOMEM ;
Re: [GIT pull] perf/urgent for 5.3-rc3
The pull request you sent on Sat, 03 Aug 2019 16:36:53 -0000:
The pull request you sent on Sat, 03 Aug 2019 16:36:53 -0000:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitperf-urgent-for-linus
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/8b7fd679427c571c34f61d9eafed3562c52424ae
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker
The pull request you sent on Sat, 03 Aug 2019 16:36:53 -0000:
The pull request you sent on Sat, 03 Aug 2019 16:36:53 -0000:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitirq-urgent-for-linus
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/af42e7450f4b174a0a3f7611791ba73109997171
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker