Linux 5.8.7
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.8.7 kernel.
All users of the 5.8 kernel series must upgrade.
The updated 5.8.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.8.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt | 32 ++++ Makefile | 2 arch/arm64/boot/dts/nvidia/tegra186.dtsi | 20 +-- arch/arm64/boot/dts/nvidia/tegra194.dtsi | 15 +- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 20 +-- arch/arm64/include/asm/kvm_asm.h | 43 ++++++ arch/arm64/kernel/vmlinux.lds.S | 8 + arch/arm64/kvm/hyp/entry.S | 15 +- arch/arm64/kvm/hyp/hyp-entry.S | 65 ++++++---- arch/arm64/kvm/hyp/switch.c | 39 +++++- drivers/hid/hid-core.c | 15 ++ drivers/hid/hid-input.c | 4 drivers/hid/hid-multitouch.c | 2 drivers/media/v4l2-core/v4l2-ioctl.c | 50 ++++--- drivers/mmc/host/sdhci-tegra.c | 2 drivers/target/target_core_user.c | 11 + include/linux/hid.h | 42 ++++-- mm/gup.c | 2 net/netfilter/nft_set_rbtree.c | 23 ++- net/wireless/nl80211.c | 2 tools/perf/Documentation/perf-record.txt | 4 tools/perf/Documentation/perf-stat.txt | 4 tools/testing/selftests/x86/test_vsyscall.c | 22 +++ 23 files changed, 325 insertions(+), 117 deletions(-)
Andy Lutomirski (1):
selftests/x86/test_vsyscall: Improve the process_vm_readv() test
Bodo Stroesser (1):
scsi: target: tcmu: Optimize use of flush_dcache_page
Dave Hansen (1):
mm: fix pin vs. gup mismatch with gate pages
Greg Kroah-Hartman (1):
Linux 5.8.7
James Morse (2):
KVM: arm64: Add kvm_extable for vaxorcism code
KVM: arm64: Survive synchronous exceptions caused by AT instructions
Johannes Berg (1):
nl80211: fix NL80211_ATTR_HE_6GHZ_CAPABILITY usage
Kim Phillips (1):
perf record/stat: Explicitly call out event modifiers in the documentation
Marc Zyngier (2):
HID: core: Correctly handle ReportSize being zero
HID: core: Sanitize event code and type when mapping input
Peilin Ye (1):
media: media/v4l2-core: Fix kernel-infoleak in video_put_user()
Sowjanya Komatineni (6):
dt-bindings: mmc: tegra: Add tmclk for Tegra210 and later
arm64: tegra: Add missing timeout clock to Tegra194 SDMMC nodes
arm64: tegra: Add missing timeout clock to Tegra186 SDMMC nodes
arm64: tegra: Add missing timeout clock to Tegra210 SDMMC
sdhci: tegra: Remove SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK for Tegra210
sdhci: tegra: Remove SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK for Tegra186
Stefano Brivio (1):
netfilter: nft_set_rbtree: Handle outcomes of tree rotations in overlap detection
Greg Kroah-Hartman
maintainerDocumentation/devicetree/bindings/mmc/nvidia,tegra20-sdhci.txt +29 -3
@@ -15,8 +15,15 @@ Required properties: - "nvidia,tegra210-sdhci": for Tegra210 - "nvidia,tegra186-sdhci": for Tegra186 - "nvidia,tegra194-sdhci": for Tegra194 -- clocks : Must contain one entry, for the module clock. - See ../clocks/clock-bindings.txt for details. +- clocks: For Tegra210, Tegra186 and Tegra194 must contain two entries. + One for the module clock and one for the timeout clock. + For all other Tegra devices, must contain a single entry for + the module clock. See ../clocks/clock-bindings.txt for details. +- clock-names: For Tegra210, Tegra186 and Tegra194 must contain the + strings 'sdhci' and 'tmclk' to represent the module and + the timeout clocks, respectively. + For all other Tegra devices must contain the string 'sdhci' + to represent the module clock. - resets : Must contain an entry for each entry in reset-names. See ../reset/reset.txt for details. - reset-names : Must include the following entries:
@@ -99,7 +106,7 @@ Optional properties for Tegra210, Tegra186 and Tegra194: Example: sdhci@700b0000 { - compatible = "nvidia,tegra210-sdhci", "nvidia,tegra124-sdhci"; + compatible = "nvidia,tegra124-sdhci"; reg = <0x0 0x700b0000 0x0 0x200>; interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; clocks = <&tegra_car TEGRA210_CLK_SDMMC1>;
@@ -115,3 +122,22 @@ sdhci@700b0000 { nvidia,pad-autocal-pull-down-offset-1v8 = <0x7b>; status = "disabled"; }; + +sdhci@700b0000 { + compatible = "nvidia,tegra210-sdhci"; + reg = <0x0 0x700b0000 0x0 0x200>; + interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&tegra_car TEGRA210_CLK_SDMMC1>, + <&tegra_car TEGRA210_CLK_SDMMC_LEGACY>; + clock-names = "sdhci", "tmclk"; + resets = <&tegra_car 14>; + reset-names = "sdhci"; + pinctrl-names = "sdmmc-3v3", "sdmmc-1v8"; + pinctrl-0 = <&sdmmc1_3v3>; + pinctrl-1 = <&sdmmc1_1v8>; + nvidia,pad-autocal-pull-up-offset-3v3 = <0x00>; + nvidia,pad-autocal-pull-down-offset-3v3 = <0x7d>; + nvidia,pad-autocal-pull-up-offset-1v8 = <0x7b>; + nvidia,pad-autocal-pull-down-offset-1v8 = <0x7b>; + status = "disabled"; +};
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 8 -SUBLEVEL = 6 +SUBLEVEL = 7 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/arm64/boot/dts/nvidia/tegra186.dtsi +12 -8
@@ -331,8 +331,9 @@ sdmmc1: sdhci@3400000 { compatible = "nvidia,tegra186-sdhci"; reg = <0x0 0x03400000 0x0 0x10000>; interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&bpmp TEGRA186_CLK_SDMMC1>; - clock-names = "sdhci"; + clocks = <&bpmp TEGRA186_CLK_SDMMC1>, + <&bpmp TEGRA186_CLK_SDMMC_LEGACY_TM>; + clock-names = "sdhci", "tmclk"; resets = <&bpmp TEGRA186_RESET_SDMMC1>; reset-names = "sdhci"; iommus = <&smmu TEGRA186_SID_SDMMC1>;
@@ -357,8 +358,9 @@ sdmmc2: sdhci@3420000 { compatible = "nvidia,tegra186-sdhci"; reg = <0x0 0x03420000 0x0 0x10000>; interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&bpmp TEGRA186_CLK_SDMMC2>; - clock-names = "sdhci"; + clocks = <&bpmp TEGRA186_CLK_SDMMC2>, + <&bpmp TEGRA186_CLK_SDMMC_LEGACY_TM>; + clock-names = "sdhci", "tmclk"; resets = <&bpmp TEGRA186_RESET_SDMMC2>; reset-names = "sdhci"; iommus = <&smmu TEGRA186_SID_SDMMC2>;
@@ -378,8 +380,9 @@ sdmmc3: sdhci@3440000 { compatible = "nvidia,tegra186-sdhci"; reg = <0x0 0x03440000 0x0 0x10000>; interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&bpmp TEGRA186_CLK_SDMMC3>; - clock-names = "sdhci"; + clocks = <&bpmp TEGRA186_CLK_SDMMC3>, + <&bpmp TEGRA186_CLK_SDMMC_LEGACY_TM>; + clock-names = "sdhci", "tmclk"; resets = <&bpmp TEGRA186_RESET_SDMMC3>; reset-names = "sdhci"; iommus = <&smmu TEGRA186_SID_SDMMC3>;
@@ -401,8 +404,9 @@ sdmmc4: sdhci@3460000 { compatible = "nvidia,tegra186-sdhci"; reg = <0x0 0x03460000 0x0 0x10000>; interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&bpmp TEGRA186_CLK_SDMMC4>; - clock-names = "sdhci"; + clocks = <&bpmp TEGRA186_CLK_SDMMC4>, + <&bpmp TEGRA186_CLK_SDMMC_LEGACY_TM>; + clock-names = "sdhci", "tmclk"; assigned-clocks = <&bpmp TEGRA186_CLK_SDMMC4>, <&bpmp TEGRA186_CLK_PLLC4_VCO>; assigned-clock-parents = <&bpmp TEGRA186_CLK_PLLC4_VCO>;
arch/arm64/boot/dts/nvidia/tegra194.dtsi +9 -6
@@ -453,8 +453,9 @@ sdmmc1: sdhci@3400000 { compatible = "nvidia,tegra194-sdhci", "nvidia,tegra186-sdhci"; reg = <0x03400000 0x10000>; interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&bpmp TEGRA194_CLK_SDMMC1>; - clock-names = "sdhci"; + clocks = <&bpmp TEGRA194_CLK_SDMMC1>, + <&bpmp TEGRA194_CLK_SDMMC_LEGACY_TM>; + clock-names = "sdhci", "tmclk"; resets = <&bpmp TEGRA194_RESET_SDMMC1>; reset-names = "sdhci"; nvidia,pad-autocal-pull-up-offset-3v3-timeout =
@@ -475,8 +476,9 @@ sdmmc3: sdhci@3440000 { compatible = "nvidia,tegra194-sdhci", "nvidia,tegra186-sdhci"; reg = <0x03440000 0x10000>; interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&bpmp TEGRA194_CLK_SDMMC3>; - clock-names = "sdhci"; + clocks = <&bpmp TEGRA194_CLK_SDMMC3>, + <&bpmp TEGRA194_CLK_SDMMC_LEGACY_TM>; + clock-names = "sdhci", "tmclk"; resets = <&bpmp TEGRA194_RESET_SDMMC3>; reset-names = "sdhci"; nvidia,pad-autocal-pull-up-offset-1v8 = <0x00>;
@@ -498,8 +500,9 @@ sdmmc4: sdhci@3460000 { compatible = "nvidia,tegra194-sdhci", "nvidia,tegra186-sdhci"; reg = <0x03460000 0x10000>; interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&bpmp TEGRA194_CLK_SDMMC4>; - clock-names = "sdhci"; + clocks = <&bpmp TEGRA194_CLK_SDMMC4>, + <&bpmp TEGRA194_CLK_SDMMC_LEGACY_TM>; + clock-names = "sdhci", "tmclk"; assigned-clocks = <&bpmp TEGRA194_CLK_SDMMC4>, <&bpmp TEGRA194_CLK_PLLC4>; assigned-clock-parents =
arch/arm64/boot/dts/nvidia/tegra210.dtsi +12 -8
@@ -1180,8 +1180,9 @@ sdhci@700b0000 { compatible = "nvidia,tegra210-sdhci", "nvidia,tegra124-sdhci"; reg = <0x0 0x700b0000 0x0 0x200>; interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car TEGRA210_CLK_SDMMC1>; - clock-names = "sdhci"; + clocks = <&tegra_car TEGRA210_CLK_SDMMC1>, + <&tegra_car TEGRA210_CLK_SDMMC_LEGACY>; + clock-names = "sdhci", "tmclk"; resets = <&tegra_car 14>; reset-names = "sdhci"; pinctrl-names = "sdmmc-3v3", "sdmmc-1v8",
@@ -1208,8 +1209,9 @@ sdhci@700b0200 { compatible = "nvidia,tegra210-sdhci", "nvidia,tegra124-sdhci"; reg = <0x0 0x700b0200 0x0 0x200>; interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car TEGRA210_CLK_SDMMC2>; - clock-names = "sdhci"; + clocks = <&tegra_car TEGRA210_CLK_SDMMC2>, + <&tegra_car TEGRA210_CLK_SDMMC_LEGACY>; + clock-names = "sdhci", "tmclk"; resets = <&tegra_car 9>; reset-names = "sdhci"; pinctrl-names = "sdmmc-1v8-drv";
@@ -1225,8 +1227,9 @@ sdhci@700b0400 { compatible = "nvidia,tegra210-sdhci", "nvidia,tegra124-sdhci"; reg = <0x0 0x700b0400 0x0 0x200>; interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car TEGRA210_CLK_SDMMC3>; - clock-names = "sdhci"; + clocks = <&tegra_car TEGRA210_CLK_SDMMC3>, + <&tegra_car TEGRA210_CLK_SDMMC_LEGACY>; + clock-names = "sdhci", "tmclk"; resets = <&tegra_car 69>; reset-names = "sdhci"; pinctrl-names = "sdmmc-3v3", "sdmmc-1v8",
@@ -1248,8 +1251,9 @@ sdhci@700b0600 { compatible = "nvidia,tegra210-sdhci", "nvidia,tegra124-sdhci"; reg = <0x0 0x700b0600 0x0 0x200>; interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&tegra_car TEGRA210_CLK_SDMMC4>; - clock-names = "sdhci"; + clocks = <&tegra_car TEGRA210_CLK_SDMMC4>, + <&tegra_car TEGRA210_CLK_SDMMC_LEGACY>; + clock-names = "sdhci", "tmclk"; resets = <&tegra_car 15>; reset-names = "sdhci"; pinctrl-names = "sdmmc-3v3-drv", "sdmmc-1v8-drv";
arch/arm64/include/asm/kvm_asm.h +43 -0
55 lines not on this page · raw message
arch/arm64/kernel/vmlinux.lds.S +8 -0
@@ -21,6 +21,13 @@ ENTRY(_text) jiffies = jiffies_64; + +#define HYPERVISOR_EXTABLE \ + . = ALIGN(SZ_8); \ + __start___kvm_ex_table = .; \ + *(__kvm_ex_table) \ + __stop___kvm_ex_table = .; + #define HYPERVISOR_TEXT \ /* \ * Align to 4 KB so that \
@@ -36,6 +43,7 @@ jiffies = jiffies_64; __hyp_idmap_text_end = .; \ __hyp_text_start = .; \ *(.hyp.text) \ + HYPERVISOR_EXTABLE \ __hyp_text_end = .; #define IDMAP_TEXT \
arch/arm64/kvm/hyp/entry.S +9 -6
@@ -198,20 +198,23 @@ alternative_endif // This is our single instruction exception window. A pending // SError is guaranteed to occur at the earliest when we unmask // it, and at the latest just after the ISB. - .global abort_guest_exit_start abort_guest_exit_start: isb - .global abort_guest_exit_end abort_guest_exit_end: msr daifset, #4 // Mask aborts + ret + + _kvm_extable abort_guest_exit_start, 9997f + _kvm_extable abort_guest_exit_end, 9997f +9997: + msr daifset, #4 // Mask aborts + mov x0, #(1 << ARM_EXIT_WITH_SERROR_BIT) - // If the exception took place, restore the EL1 exception - // context so that we can report some information. - // Merge the exception code with the SError pending bit. - tbz x0, #ARM_EXIT_WITH_SERROR_BIT, 1f + // restore the EL1 exception context so that we can report some + // information. Merge the exception code with the SError pending bit. msr elr_el2, x2 msr esr_el2, x3 msr spsr_el2, x4
arch/arm64/kvm/hyp/hyp-entry.S +41 -24
87 lines not on this page · raw message
arch/arm64/kvm/hyp/switch.c +35 -4
@@ -14,6 +14,7 @@#include <asm/barrier.h> #include <asm/cpufeature.h> +#include <asm/extable.h> #include <asm/kprobes.h> #include <asm/kvm_asm.h> #include <asm/kvm_emulate.h>
@@ -24,6 +25,9 @@#include <asm/processor.h> #include <asm/thread_info.h> +extern struct exception_table_entry __start___kvm_ex_table; +extern struct exception_table_entry __stop___kvm_ex_table; +/* Check whether the FP regs were dirtied while in the host-side run loop: */ static bool __hyp_text update_fp_enabled(struct kvm_vcpu *vcpu) {
@@ -299,10 +303,10 @@ static bool __hyp_text __translate_far_to_hpfar(u64 far, u64 *hpfar)* saved the guest context yet, and we may return early... */ par =read_sysreg (par_el1); - asmvolatile ("at s1e1r, %0" : :"r" (far)); -isb (); - - tmp =read_sysreg (par_el1); +if (!__kvm_at ("s1e1r" , far)) + tmp =read_sysreg (par_el1); +else + tmp =SYS_PAR_EL1_F ;/* back to the guest */ write_sysreg (par, par_el1);if (unlikely (tmp &SYS_PAR_EL1_F ))
@@ -934,3 +938,30 @@ void __hyp_text __noreturn hyp_panic(struct kvm_cpu_context *host_ctxt)unreachable (); } + +asmlinkage void __hyp_text kvm_unexpected_el2_exception(void) +{ +unsigned long addr, fixup; +struct kvm_cpu_context *host_ctxt; +struct exception_table_entry *entry, *end; +unsigned long elr_el2 =read_sysreg (elr_el2); + + entry =hyp_symbol_addr (__start___kvm_ex_table); + end =hyp_symbol_addr (__stop___kvm_ex_table); + host_ctxt = &__hyp_this_cpu_ptr (kvm_host_data)->host_ctxt; + +while (entry < end) { + addr = (unsigned long )&entry->insn + entry->insn; + fixup = (unsigned long )&entry->fixup + entry->fixup; + +if (addr != elr_el2) { + entry++; +continue ; + } + +write_sysreg (fixup, elr_el2); +return ; + } + +hyp_panic (host_ctxt); +}
drivers/hid/hid-core.c +13 -2
@@ -1597,6 +1597,17 @@ static void hid_output_field(const struct hid_device *hid, } } +/* +* Compute the size of a report. +*/ +static size_t hid_compute_report_size (struct hid_report *report) +{ +if (report->size) +return ((report->size -1 ) >>3 ) +1 ; + +return 0 ; +} +/* * Create a report. 'data' has to be allocated using * hid_alloc_report_buf() so that it has proper size.
@@ -1609,7 +1620,7 @@ void hid_output_report(struct hid_report *report, __u8 *data)if (report->id >0 ) *data++ = report->id; -memset (data,0 , ((report->size -1 ) >>3 ) +1 ); +memset (data,0 ,hid_compute_report_size (report));for (n =0 ; n < report->maxfield; n++)hid_output_field (report->device, report->field[n], data); }
@@ -1739,7 +1750,7 @@ int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, u32 size, csize--; } - rsize = ((report->size -1 ) >>3 ) +1 ; + rsize =hid_compute_report_size (report);if (report_enum->numbered && rsize >=HID_MAX_BUFFER_SIZE ) rsize =HID_MAX_BUFFER_SIZE -1 ;
drivers/hid/hid-input.c +4 -0
@@ -1132,6 +1132,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel } mapped: +/* Mapping failed, bail out */ +if (!bit) +return ; +if (device->driver->input_mapped && device->driver->input_mapped (device, hidinput, field, usage, &bit, &max) <0 ) {
drivers/hid/hid-multitouch.c +2 -0
@@ -856,6 +856,8 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi, code =BTN_0 + ((usage->hid -1 ) &HID_USAGE );hid_map_usage (hi, usage, bit, max,EV_KEY , code); +if (!*bit) +return -1 ;input_set_capability (hi->input,EV_KEY , code);return 1 ;
drivers/media/v4l2-core/v4l2-ioctl.c +27 -23
62 lines not on this page · raw message
drivers/mmc/host/sdhci-tegra.c +0 -2
@@ -1409,7 +1409,6 @@ static const struct sdhci_ops tegra210_sdhci_ops = {static const struct sdhci_pltfm_data sdhci_tegra210_pdata = { .quirks =SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | -SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK |SDHCI_QUIRK_SINGLE_POWER_WRITE |SDHCI_QUIRK_NO_HISPD_BIT | SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC |
@@ -1447,7 +1446,6 @@ static const struct sdhci_ops tegra186_sdhci_ops = {static const struct sdhci_pltfm_data sdhci_tegra186_pdata = { .quirks =SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | -SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK |SDHCI_QUIRK_SINGLE_POWER_WRITE |SDHCI_QUIRK_NO_HISPD_BIT | SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC |
drivers/target/target_core_user.c +7 -4
@@ -676,8 +676,10 @@ static void scatter_data_area(struct tcmu_dev *udev, from =kmap_atomic (sg_page (sg)) + sg->offset;while (sg_remaining >0 ) {if (block_remaining ==0 ) { -if (to) +if (to) { +flush_dcache_page (page);kunmap_atomic (to); + } block_remaining =DATA_BLOCK_SIZE ; dbi =tcmu_cmd_get_dbi (tcmu_cmd);
@@ -722,7 +724,6 @@ static void scatter_data_area(struct tcmu_dev *udev,memcpy (to + offset, from + sg->length - sg_remaining, copy_bytes); -tcmu_flush_dcache_range (to, copy_bytes); } sg_remaining -= copy_bytes;
@@ -731,8 +732,10 @@ static void scatter_data_area(struct tcmu_dev *udev,kunmap_atomic (from - sg->offset); } -if (to) +if (to) { +flush_dcache_page (page);kunmap_atomic (to); + } } static void gather_data_area(struct tcmu_dev *udev, struct tcmu_cmd *cmd,
@@ -778,13 +781,13 @@ static void gather_data_area(struct tcmu_dev *udev, struct tcmu_cmd *cmd, dbi =tcmu_cmd_get_dbi (cmd); page =tcmu_get_block_page (udev, dbi); from =kmap_atomic (page); +flush_dcache_page (page); } copy_bytes =min_t (size_t, sg_remaining, block_remaining);if (read_len < copy_bytes) copy_bytes = read_len; offset =DATA_BLOCK_SIZE - block_remaining; -tcmu_flush_dcache_range (from, copy_bytes);memcpy (to + sg->length - sg_remaining, from + offset, copy_bytes);
include/linux/hid.h +29 -13
70 lines not on this page · raw message
mm/gup.c +1 -1
@@ -843,7 +843,7 @@ static int get_gate_page(struct mm_struct *mm, unsigned long address, goto unmap; *page =pte_page (*pte); } -if (unlikely (!try_get_page (*page))) { +if (unlikely (!try_grab_page (*page, gup_flags))) { ret = -ENOMEM ; goto unmap; }
net/netfilter/nft_set_rbtree.c +14 -9
@@ -238,21 +238,27 @@ static int __nft_rbtree_insert(const struct net *net, const struct nft_set *set,* * b1. _ _ __>| !_ _ __| (insert end before existing start) * b2. _ _ ___| !_ _ _>| (insert end after existing start) -* b3. _ _ ___! >|_ _ __| (insert start after existing end) +* b3. _ _ ___! >|_ _ __| (insert start after existing end, as a leaf) +* '--' no nodes falling in this range +* b4. >|_ _ ! (insert start before existing start) * * Case a3. resolves to b3.: * - if the inserted start element is the leftmost, because the '0' * element in the tree serves as end element -* - otherwise, if an existing end is found. Note that end elements are -* always inserted after corresponding start elements. +* - otherwise, if an existing end is found immediately to the left. If +* there are existing nodes in between, we need to further descend the +* tree before we can conclude the new start isn't causing an overlap +* +* or to b4., which, preceded by a3., means we already traversed one or +* more existing intervals entirely, from the right. * * For a new, rightmost pair of elements, we'll hit cases b3. and b2., * in that order. * * The flag is also cleared in two special cases: * -* b4. |__ _ _!|<_ _ _ (insert start right before existing end) -* b5. |__ _ >|!__ _ _ (insert end right after existing start) +* b5. |__ _ _!|<_ _ _ (insert start right before existing end) +* b6. |__ _ >|!__ _ _ (insert end right after existing start) * * which always happen as last step and imply that no further * overlapping is possible.
@@ -272,7 +278,7 @@ static int __nft_rbtree_insert(const struct net *net, const struct nft_set *set,if (nft_rbtree_interval_start (new)) {if (nft_rbtree_interval_end (rbe) &&nft_set_elem_active (&rbe->ext, genmask) && - !nft_set_elem_expired (&rbe->ext)) + !nft_set_elem_expired (&rbe->ext) && !*p) overlap = false; }else { overlap = nft_rbtree_interval_end(rbe) &&
@@ -288,10 +294,9 @@ static int __nft_rbtree_insert(const struct net *net, const struct nft_set *set,nft_set_elem_active (&rbe->ext, genmask) && !nft_set_elem_expired (&rbe->ext); - }else if (nft_rbtree_interval_end (rbe) && -nft_set_elem_active (&rbe->ext, genmask) && + }else if (nft_set_elem_active (&rbe->ext, genmask) && !nft_set_elem_expired (&rbe->ext)) { - overlap = true; + overlap =nft_rbtree_interval_end (rbe); } }else { if (nft_rbtree_interval_end(rbe) &&
net/wireless/nl80211.c +1 -1
@@ -6010,7 +6010,7 @@ static int nl80211_set_station(struct sk_buff *skb, struct genl_info *info)if (info->attrs[NL80211_ATTR_HE_6GHZ_CAPABILITY ]) params.he_6ghz_capa = -nla_data (info->attrs[NL80211_ATTR_HE_CAPABILITY ]); +nla_data (info->attrs[NL80211_ATTR_HE_6GHZ_CAPABILITY ]);if (info->attrs[NL80211_ATTR_AIRTIME_WEIGHT ]) params.airtime_weight =
tools/perf/Documentation/perf-record.txt +4 -0
@@ -33,6 +33,10 @@ OPTIONS - a raw PMU event (eventsel+umask) in the form of rNNN where NNN is a hexadecimal event descriptor. + - a symbolic or raw PMU event followed by an optional colon + and a list of event modifiers, e.g., cpu-cycles:p. See the + linkperf:perf-list[1] man page for details on event modifiers. + - a symbolically formed PMU event like 'pmu/param1=0x3,param2/' where 'param1', 'param2', etc are defined as formats for the PMU in /sys/bus/event_source/devices/<pmu>/format/*.
tools/perf/Documentation/perf-stat.txt +4 -0
@@ -39,6 +39,10 @@ report:: - a raw PMU event (eventsel+umask) in the form of rNNN where NNN is a hexadecimal event descriptor. + - a symbolic or raw PMU event followed by an optional colon + and a list of event modifiers, e.g., cpu-cycles:p. See the + linkperf:perf-list[1] man page for details on event modifiers. + - a symbolically formed event like 'pmu/param1=0x3,param2/' where param1 and param2 are defined as formats for the PMU in /sys/bus/event_source/devices/<pmu>/format/*
tools/testing/selftests/x86/test_vsyscall.c +20 -2
@@ -462,6 +462,17 @@ static int test_vsys_x(void)return 0 ; } +/* +* Debuggers expect ptrace() to be able to peek at the vsyscall page. +* Use process_vm_readv() as a proxy for ptrace() to test this. We +* want it to work in the vsyscall=emulate case and to fail in the +* vsyscall=xonly case. +* +* It's worth noting that this ABI is a bit nutty. write(2) can't +* read from the vsyscall page on any kernel version or mode. The +* fact that ptrace() ever worked was a nice courtesy of old kernels, +* but the code to support it is fairly gross. +*/ static int test_process_vm_readv (void ) {#ifdef __x86_64__
@@ -477,8 +488,12 @@ static int test_process_vm_readv(void) remote.iov_len =4096 ; ret =process_vm_readv (getpid (), &local,1 , &remote,1 ,0 );if (ret !=4096 ) { -printf ("[OK]\tprocess_vm_readv() failed (ret = %d, errno = %d)\n" , ret, errno); -return 0 ; +/* +* We expect process_vm_readv() to work if and only if the +* vsyscall page is readable. +*/ +printf ("[%s]\tprocess_vm_readv() failed (ret = %d, errno = %d)\n" , vsyscall_map_r ?"FAIL" :"OK" , ret, errno); +return vsyscall_map_r ?1 :0 ; }if (vsyscall_map_r) {
@@ -488,6 +503,9 @@ static int test_process_vm_readv(void)printf ("[FAIL]\tIt worked but returned incorrect data\n" ); return 1; } + }else { +printf ("[FAIL]\tprocess_rm_readv() succeeded, but it should have failed in this configuration\n" ); +return 1 ; }#endif