Skip to content

Commit

Permalink
Merge remote-tracking branch 'torvalds/master' into perf/core
Browse files Browse the repository at this point in the history
To pick up fixes from perf/urgent to allow perf/core to be used for new
development.

Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
acmel committed Jun 1, 2021
2 parents 79e157b + c2131f7 commit 0ab8009
Show file tree
Hide file tree
Showing 479 changed files with 6,631 additions and 2,529 deletions.
17 changes: 14 additions & 3 deletions Documentation/admin-guide/sysctl/kernel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1458,11 +1458,22 @@ unprivileged_bpf_disabled
=========================

Writing 1 to this entry will disable unprivileged calls to ``bpf()``;
once disabled, calling ``bpf()`` without ``CAP_SYS_ADMIN`` will return
``-EPERM``.
once disabled, calling ``bpf()`` without ``CAP_SYS_ADMIN`` or ``CAP_BPF``
will return ``-EPERM``. Once set to 1, this can't be cleared from the
running kernel anymore.

Once set, this can't be cleared.
Writing 2 to this entry will also disable unprivileged calls to ``bpf()``,
however, an admin can still change this setting later on, if needed, by
writing 0 or 1 to this entry.

If ``BPF_UNPRIV_DEFAULT_OFF`` is enabled in the kernel config, then this
entry will default to 2 instead of 0.

= =============================================================
0 Unprivileged calls to ``bpf()`` are enabled
1 Unprivileged calls to ``bpf()`` are disabled without recovery
2 Unprivileged calls to ``bpf()`` are disabled
= =============================================================

watchdog
========
Expand Down
7 changes: 7 additions & 0 deletions Documentation/devicetree/bindings/i2c/i2c-mpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ properties:
description: |
I2C bus timeout in microseconds
fsl,i2c-erratum-a004447:
$ref: /schemas/types.yaml#/definitions/flag
description: |
Indicates the presence of QorIQ erratum A-004447, which
says that the standard i2c recovery scheme mechanism does
not work and an alternate implementation is needed.
required:
- compatible
- reg
Expand Down
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/net/renesas,ether.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ allOf:
- $ref: ethernet-controller.yaml#

maintainers:
- Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
- Sergei Shtylyov <sergei.shtylyov@gmail.com>

properties:
compatible:
Expand Down
2 changes: 2 additions & 0 deletions Documentation/driver-api/usb/usb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ are in ``drivers/usb/common/common.c``.
In addition, some functions useful for creating debugging output are
defined in ``drivers/usb/common/debug.c``.

.. _usb_header:

Host-Side Data Types and Macros
===============================

Expand Down
16 changes: 8 additions & 8 deletions Documentation/userspace-api/seccomp_filter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,14 @@ Users can read via ``ioctl(SECCOMP_IOCTL_NOTIF_RECV)`` (or ``poll()``) on a
seccomp notification fd to receive a ``struct seccomp_notif``, which contains
five members: the input length of the structure, a unique-per-filter ``id``,
the ``pid`` of the task which triggered this request (which may be 0 if the
task is in a pid ns not visible from the listener's pid namespace), a ``flags``
member which for now only has ``SECCOMP_NOTIF_FLAG_SIGNALED``, representing
whether or not the notification is a result of a non-fatal signal, and the
``data`` passed to seccomp. Userspace can then make a decision based on this
information about what to do, and ``ioctl(SECCOMP_IOCTL_NOTIF_SEND)`` a
response, indicating what should be returned to userspace. The ``id`` member of
``struct seccomp_notif_resp`` should be the same ``id`` as in ``struct
seccomp_notif``.
task is in a pid ns not visible from the listener's pid namespace). The
notification also contains the ``data`` passed to seccomp, and a filters flag.
The structure should be zeroed out prior to calling the ioctl.

Userspace can then make a decision based on this information about what to do,
and ``ioctl(SECCOMP_IOCTL_NOTIF_SEND)`` a response, indicating what should be
returned to userspace. The ``id`` member of ``struct seccomp_notif_resp`` should
be the same ``id`` as in ``struct seccomp_notif``.

It is worth noting that ``struct seccomp_data`` contains the values of register
arguments to the syscall, but does not contain pointers to memory. The task's
Expand Down
8 changes: 5 additions & 3 deletions Documentation/virt/kvm/vcpu-requests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,12 @@ KVM_REQ_MMU_RELOAD
necessary to inform each VCPU to completely refresh the tables. This
request is used for that.

KVM_REQ_PENDING_TIMER
KVM_REQ_UNBLOCK

This request may be made from a timer handler run on the host on behalf
of a VCPU. It informs the VCPU thread to inject a timer interrupt.
This request informs the vCPU to exit kvm_vcpu_block. It is used for
example from timer handlers that run on the host on behalf of a vCPU,
or in order to update the interrupt routing and ensure that assigned
devices will wake up the vCPU.

KVM_REQ_UNHALT

Expand Down
27 changes: 19 additions & 8 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -4138,6 +4138,14 @@ S: Odd Fixes
F: Documentation/devicetree/bindings/arm/cavium-thunder2.txt
F: arch/arm64/boot/dts/cavium/thunder2-99xx*

CBS/ETF/TAPRIO QDISCS
M: Vinicius Costa Gomes <[email protected]>
S: Maintained
L: [email protected]
F: net/sched/sch_cbs.c
F: net/sched/sch_etf.c
F: net/sched/sch_taprio.c

CC2520 IEEE-802.15.4 RADIO DRIVER
M: Varka Bhadram <[email protected]>
L: [email protected]
Expand Down Expand Up @@ -5569,7 +5577,6 @@ F: drivers/soc/fsl/dpio

DPAA2 ETHERNET DRIVER
M: Ioana Ciornei <[email protected]>
M: Ioana Radulescu <[email protected]>
L: [email protected]
S: Maintained
F: Documentation/networking/device_drivers/ethernet/freescale/dpaa2/ethernet-driver.rst
Expand Down Expand Up @@ -6938,6 +6945,7 @@ F: net/core/failover.c
FANOTIFY
M: Jan Kara <[email protected]>
R: Amir Goldstein <[email protected]>
R: Matthew Bobrowski <[email protected]>
L: [email protected]
S: Maintained
F: fs/notify/fanotify/
Expand Down Expand Up @@ -12681,9 +12689,9 @@ F: drivers/rtc/rtc-ntxec.c
F: include/linux/mfd/ntxec.h

NETRONOME ETHERNET DRIVERS
M: Simon Horman <simon.horman@netronome.com>
M: Simon Horman <simon.horman@corigine.com>
R: Jakub Kicinski <[email protected]>
L: oss-drivers@netronome.com
L: oss-drivers@corigine.com
S: Maintained
F: drivers/net/ethernet/netronome/

Expand All @@ -12710,7 +12718,6 @@ M: "David S. Miller" <[email protected]>
M: Jakub Kicinski <[email protected]>
L: [email protected]
S: Maintained
W: http://www.linuxfoundation.org/en/Net
Q: https://patchwork.kernel.org/project/netdevbpf/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
Expand Down Expand Up @@ -12755,7 +12762,6 @@ M: "David S. Miller" <[email protected]>
M: Jakub Kicinski <[email protected]>
L: [email protected]
S: Maintained
W: http://www.linuxfoundation.org/en/Net
Q: https://patchwork.kernel.org/project/netdevbpf/list/
B: mailto:[email protected]
T: git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
Expand Down Expand Up @@ -12897,8 +12903,10 @@ F: include/uapi/linux/nexthop.h
F: net/ipv4/nexthop.c

NFC SUBSYSTEM
M: Krzysztof Kozlowski <[email protected]>
L: [email protected] (moderated for non-subscribers)
L: [email protected]
S: Orphan
S: Maintained
F: Documentation/devicetree/bindings/net/nfc/
F: drivers/nfc/
F: include/linux/platform_data/nfcmrvl.h
Expand Down Expand Up @@ -13206,7 +13214,6 @@ F: Documentation/devicetree/bindings/sound/tfa9879.txt
F: sound/soc/codecs/tfa9879*

NXP-NCI NFC DRIVER
M: Clément Perrochaud <[email protected]>
R: Charles Gorand <[email protected]>
L: [email protected] (moderated for non-subscribers)
S: Supported
Expand Down Expand Up @@ -14318,10 +14325,12 @@ PER-CPU MEMORY ALLOCATOR
M: Dennis Zhou <[email protected]>
M: Tejun Heo <[email protected]>
M: Christoph Lameter <[email protected]>
L: [email protected]
S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu.git
F: arch/*/include/asm/percpu.h
F: include/linux/percpu*.h
F: lib/percpu*.c
F: mm/percpu*.c

PER-TASK DELAY ACCOUNTING
Expand Down Expand Up @@ -15945,6 +15954,7 @@ S390 IUCV NETWORK LAYER
M: Julian Wiedmann <[email protected]>
M: Karsten Graul <[email protected]>
L: [email protected]
L: [email protected]
S: Supported
W: http://www.ibm.com/developerworks/linux/linux390/
F: drivers/s390/net/*iucv*
Expand All @@ -15955,6 +15965,7 @@ S390 NETWORK DRIVERS
M: Julian Wiedmann <[email protected]>
M: Karsten Graul <[email protected]>
L: [email protected]
L: [email protected]
S: Supported
W: http://www.ibm.com/developerworks/linux/linux390/
F: drivers/s390/net/
Expand Down Expand Up @@ -17668,7 +17679,6 @@ R: Mika Westerberg <[email protected]>
L: [email protected]
S: Maintained
F: drivers/i2c/busses/i2c-designware-*
F: include/linux/platform_data/i2c-designware.h

SYNOPSYS DESIGNWARE MMC/SD/SDIO DRIVER
M: Jaehoon Chung <[email protected]>
Expand Down Expand Up @@ -20004,6 +20014,7 @@ F: arch/x86/xen/*swiotlb*
F: drivers/xen/*swiotlb*

XFS FILESYSTEM
C: irc://irc.oftc.net/xfs
M: Darrick J. Wong <[email protected]>
M: [email protected]
L: [email protected]
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
VERSION = 5
PATCHLEVEL = 13
SUBLEVEL = 0
EXTRAVERSION = -rc3
EXTRAVERSION = -rc4
NAME = Frozen Wasteland

# *DOCUMENTATION*
Expand Down Expand Up @@ -928,6 +928,11 @@ CC_FLAGS_LTO += -fvisibility=hidden

# Limit inlining across translation units to reduce binary size
KBUILD_LDFLAGS += -mllvm -import-instr-limit=5

# Check for frame size exceeding threshold during prolog/epilog insertion.
ifneq ($(CONFIG_FRAME_WARN),0)
KBUILD_LDFLAGS += -plugin-opt=-warn-stack-size=$(CONFIG_FRAME_WARN)
endif
endif

ifdef CONFIG_LTO
Expand Down
3 changes: 1 addition & 2 deletions arch/arm64/Kbuild
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
obj-y += kernel/ mm/
obj-$(CONFIG_NET) += net/
obj-y += kernel/ mm/ net/
obj-$(CONFIG_KVM) += kvm/
obj-$(CONFIG_XEN) += xen/
obj-$(CONFIG_CRYPTO) += crypto/
2 changes: 1 addition & 1 deletion arch/arm64/include/asm/barrier.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static inline unsigned long array_index_mask_nospec(unsigned long idx,
* This insanity brought to you by speculative system register reads,
* out-of-order memory accesses, sequence locks and Thomas Gleixner.
*
* http://lists.infradead.org/pipermail/linux-arm-kernel/2019-February/631195.html
* https://lore.kernel.org/r/[email protected]/
*/
#define arch_counter_enforce_ordering(val) do { \
u64 tmp, _val = (val); \
Expand Down
3 changes: 3 additions & 0 deletions arch/arm64/include/asm/kvm_asm.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
#define __KVM_HOST_SMCCC_FUNC___pkvm_cpu_set_vector 18
#define __KVM_HOST_SMCCC_FUNC___pkvm_prot_finalize 19
#define __KVM_HOST_SMCCC_FUNC___pkvm_mark_hyp 20
#define __KVM_HOST_SMCCC_FUNC___kvm_adjust_pc 21

#ifndef __ASSEMBLY__

Expand Down Expand Up @@ -201,6 +202,8 @@ extern void __kvm_timer_set_cntvoff(u64 cntvoff);

extern int __kvm_vcpu_run(struct kvm_vcpu *vcpu);

extern void __kvm_adjust_pc(struct kvm_vcpu *vcpu);

extern u64 __vgic_v3_get_gic_config(void);
extern u64 __vgic_v3_read_vmcr(void);
extern void __vgic_v3_write_vmcr(u32 vmcr);
Expand Down
5 changes: 5 additions & 0 deletions arch/arm64/include/asm/kvm_emulate.h
Original file line number Diff line number Diff line change
Expand Up @@ -463,4 +463,9 @@ static __always_inline void kvm_incr_pc(struct kvm_vcpu *vcpu)
vcpu->arch.flags |= KVM_ARM64_INCREMENT_PC;
}

static inline bool vcpu_has_feature(struct kvm_vcpu *vcpu, int feature)
{
return test_bit(feature, vcpu->arch.features);
}

#endif /* __ARM64_KVM_EMULATE_H__ */
20 changes: 17 additions & 3 deletions arch/arm64/kvm/arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,11 +720,13 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu)
return ret;
}

if (run->immediate_exit)
return -EINTR;

vcpu_load(vcpu);

if (run->immediate_exit) {
ret = -EINTR;
goto out;
}

kvm_sigset_activate(vcpu);

ret = 1;
Expand Down Expand Up @@ -897,6 +899,18 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu)

kvm_sigset_deactivate(vcpu);

out:
/*
* In the unlikely event that we are returning to userspace
* with pending exceptions or PC adjustment, commit these
* adjustments in order to give userspace a consistent view of
* the vcpu state. Note that this relies on __kvm_adjust_pc()
* being preempt-safe on VHE.
*/
if (unlikely(vcpu->arch.flags & (KVM_ARM64_PENDING_EXCEPTION |
KVM_ARM64_INCREMENT_PC)))
kvm_call_hyp(__kvm_adjust_pc, vcpu);

vcpu_put(vcpu);
return ret;
}
Expand Down
18 changes: 17 additions & 1 deletion arch/arm64/kvm/hyp/exception.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ static void enter_exception32(struct kvm_vcpu *vcpu, u32 mode, u32 vect_offset)
*vcpu_pc(vcpu) = vect_offset;
}

void kvm_inject_exception(struct kvm_vcpu *vcpu)
static void kvm_inject_exception(struct kvm_vcpu *vcpu)
{
if (vcpu_el1_is_32bit(vcpu)) {
switch (vcpu->arch.flags & KVM_ARM64_EXCEPT_MASK) {
Expand Down Expand Up @@ -329,3 +329,19 @@ void kvm_inject_exception(struct kvm_vcpu *vcpu)
}
}
}

/*
* Adjust the guest PC (and potentially exception state) depending on
* flags provided by the emulation code.
*/
void __kvm_adjust_pc(struct kvm_vcpu *vcpu)
{
if (vcpu->arch.flags & KVM_ARM64_PENDING_EXCEPTION) {
kvm_inject_exception(vcpu);
vcpu->arch.flags &= ~(KVM_ARM64_PENDING_EXCEPTION |
KVM_ARM64_EXCEPT_MASK);
} else if (vcpu->arch.flags & KVM_ARM64_INCREMENT_PC) {
kvm_skip_instr(vcpu);
vcpu->arch.flags &= ~KVM_ARM64_INCREMENT_PC;
}
}
18 changes: 0 additions & 18 deletions arch/arm64/kvm/hyp/include/hyp/adjust_pc.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#include <asm/kvm_emulate.h>
#include <asm/kvm_host.h>

void kvm_inject_exception(struct kvm_vcpu *vcpu);

static inline void kvm_skip_instr(struct kvm_vcpu *vcpu)
{
if (vcpu_mode_is_32bit(vcpu)) {
Expand Down Expand Up @@ -43,22 +41,6 @@ static inline void __kvm_skip_instr(struct kvm_vcpu *vcpu)
write_sysreg_el2(*vcpu_pc(vcpu), SYS_ELR);
}

/*
* Adjust the guest PC on entry, depending on flags provided by EL1
* for the purpose of emulation (MMIO, sysreg) or exception injection.
*/
static inline void __adjust_pc(struct kvm_vcpu *vcpu)
{
if (vcpu->arch.flags & KVM_ARM64_PENDING_EXCEPTION) {
kvm_inject_exception(vcpu);
vcpu->arch.flags &= ~(KVM_ARM64_PENDING_EXCEPTION |
KVM_ARM64_EXCEPT_MASK);
} else if (vcpu->arch.flags & KVM_ARM64_INCREMENT_PC) {
kvm_skip_instr(vcpu);
vcpu->arch.flags &= ~KVM_ARM64_INCREMENT_PC;
}
}

/*
* Skip an instruction while host sysregs are live.
* Assumes host is always 64-bit.
Expand Down
Loading

0 comments on commit 0ab8009

Please sign in to comment.