From 0d03bbfed690ac4a025e90346a673b8607742122 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Sun, 21 Mar 2021 13:18:24 +0100 Subject: kernel 5.11.7 --- ...rm64-Ignore-broken-HPE-moonshot-APEI-supp.patch | 71 - ...rkaround-firmware-issue-on-X-Gene-based-m.patch | 75 - ...et_user_check-in-case-uaccess_-calls-are-.patch | 86 - SOURCES/0001-ARM-tegra-usb-no-reset.patch | 32 - ...tatus_to_str-and-rework-efi_status_to_err.patch | 185 - ...-Add-option-of-13-for-FORCE_MAX_ZONEORDER.patch | 32 - SOURCES/0001-Drop-that-for-now.patch | 24 - ...remove-the-need-for-artificial-IRQ-in-cas.patch | 330 -- ...se-of-platform-keyring-for-module-signatu.patch | 44 - ...rt_list-use-efi_status_to_str-to-print-er.patch | 40 - ...MCFG-quirks-for-Tegra194-host-controllers.patch | 241 -- ...-PCI-bar-fix-for-Broadcom-Vulcan-early-si.patch | 75 - ...-for-gcc-bug-https-gcc.gnu.org-bugzilla-s.patch | 29 - ...i-scan-Fix-regression-related-to-X-Gene-U.patch | 52 - ...rx2-Fix-for-errata-that-affects-stop-engi.patch | 89 - ...-Drop-the-EXPERT-setting-from-ARM64_FORCE.patch | 38 - ...NFIG_HIGHPTE-optional-without-CONFIG_EXPE.patch | 31 - SOURCES/0001-brcm-rpi4-fix-usb-numeration.patch | 25 - ...001-drm-panel-add-Xingbangda-XBD599-panel.patch | 423 -- ...un6i_mipi_dsi-fix-horizontal-timing-calcu.patch | 59 - ...-panel-add-binding-for-Xingbangda-XBD599-.patch | 74 - ...EFI_SECURE_BOOT-flag-to-indicate-secure-b.patch | 161 - ...wn-the-kernel-if-booted-in-secure-boot-mo.patch | 72 - ...iommu-arm-smmu-workaround-DMA-mode-issues.patch | 98 - ...1-ipmi-do-not-configure-ipmi-for-HPE-m400.patch | 123 - ...01-kdump-add-support-for-crashkernel-auto.patch | 189 - ...p-fix-a-grammar-issue-in-a-kernel-message.patch | 43 - ...-up-the-total-memory-size-to-128M-for-cra.patch | 93 - ...emleak-skip-late_init-if-not-skip-disable.patch | 71 - ...own-the-kernel-when-the-IPL-secure-flag-i.patch | 67 - ...01-scsi-smartpqi-add-inspur-advantech-ids.patch | 70 - ...ckdown-expose-a-hook-to-lock-the-kernel-d.patch | 103 - .../0001-update-phy-on-pine64-a64-devices.patch | 26 - SOURCES/Makefile.rhelver | 45 + SOURCES/Patchlist.changelog | 156 + SOURCES/README.rst | 25 + SOURCES/futex2.patch | 4184 +++++++++++++------- SOURCES/generate_all_configs.sh | 24 +- SOURCES/generate_bls_conf.sh | 7 +- SOURCES/kernel-aarch64-debug-fedora.config | 250 +- SOURCES/kernel-aarch64-debug-rhel.config | 409 +- SOURCES/kernel-aarch64-fedora.config | 239 +- SOURCES/kernel-aarch64-rhel.config | 406 +- SOURCES/kernel-armv7hl-debug-fedora.config | 272 +- SOURCES/kernel-armv7hl-fedora.config | 260 +- SOURCES/kernel-armv7hl-lpae-debug-fedora.config | 272 +- SOURCES/kernel-armv7hl-lpae-fedora.config | 260 +- SOURCES/kernel-i686-debug-fedora.config | 222 +- SOURCES/kernel-i686-fedora.config | 215 +- SOURCES/kernel-ppc64le-debug-fedora.config | 265 +- SOURCES/kernel-ppc64le-debug-rhel.config | 393 +- SOURCES/kernel-ppc64le-fedora.config | 254 +- SOURCES/kernel-ppc64le-rhel.config | 392 +- SOURCES/kernel-s390x-debug-fedora.config | 260 +- SOURCES/kernel-s390x-debug-rhel.config | 407 +- SOURCES/kernel-s390x-fedora.config | 247 +- SOURCES/kernel-s390x-rhel.config | 406 +- SOURCES/kernel-s390x-zfcpdump-rhel.config | 404 +- SOURCES/kernel-x86_64-debug-fedora.config | 231 +- SOURCES/kernel-x86_64-debug-rhel.config | 396 +- SOURCES/kernel-x86_64-fedora.config | 220 +- SOURCES/kernel-x86_64-rhel.config | 398 +- SOURCES/linux-kernel-test.patch | 0 SOURCES/mod-blacklist.sh | 164 + SOURCES/mod-extra-blacklist.sh | 56 - SOURCES/mod-extra.list | 1 - SOURCES/mod-extra.list.fedora | 1 - SOURCES/mod-extra.list.rhel | 190 + SOURCES/mod-extra.sh | 86 - SOURCES/mod-internal.list | 11 + SOURCES/mod-sign.sh | 6 +- SOURCES/parallel_xz.sh | 7 +- SOURCES/patch-5.11-redhat.patch | 3437 ++++++++++++++++ SOURCES/process_configs.sh | 89 +- SOURCES/rheldup3.x509 | Bin 0 -> 1198 bytes SOURCES/rhelkpatch1.x509 | Bin 0 -> 1176 bytes SOURCES/update_scripts.sh | 8 +- SPECS/kernel.spec | 3695 +++++++++++------ 78 files changed, 14479 insertions(+), 7962 deletions(-) delete mode 100644 SOURCES/0001-ACPI-APEI-arm64-Ignore-broken-HPE-moonshot-APEI-supp.patch delete mode 100644 SOURCES/0001-ACPI-irq-Workaround-firmware-issue-on-X-Gene-based-m.patch delete mode 100644 SOURCES/0001-ARM-fix-__get_user_check-in-case-uaccess_-calls-are-.patch delete mode 100644 SOURCES/0001-ARM-tegra-usb-no-reset.patch delete mode 100644 SOURCES/0001-Add-efi_status_to_str-and-rework-efi_status_to_err.patch delete mode 100644 SOURCES/0001-Add-option-of-13-for-FORCE_MAX_ZONEORDER.patch delete mode 100644 SOURCES/0001-Drop-that-for-now.patch delete mode 100644 SOURCES/0001-Input-rmi4-remove-the-need-for-artificial-IRQ-in-cas.patch delete mode 100644 SOURCES/0001-KEYS-Make-use-of-platform-keyring-for-module-signatu.patch delete mode 100644 SOURCES/0001-Make-get_cert_list-use-efi_status_to_str-to-print-er.patch delete mode 100644 SOURCES/0001-PCI-Add-MCFG-quirks-for-Tegra194-host-controllers.patch delete mode 100644 SOURCES/0001-Vulcan-AHCI-PCI-bar-fix-for-Broadcom-Vulcan-early-si.patch delete mode 100644 SOURCES/0001-Work-around-for-gcc-bug-https-gcc.gnu.org-bugzilla-s.patch delete mode 100644 SOURCES/0001-aarch64-acpi-scan-Fix-regression-related-to-X-Gene-U.patch delete mode 100644 SOURCES/0001-ahci-thunderx2-Fix-for-errata-that-affects-stop-engi.patch delete mode 100644 SOURCES/0001-arm-aarch64-Drop-the-EXPERT-setting-from-ARM64_FORCE.patch delete mode 100644 SOURCES/0001-arm-make-CONFIG_HIGHPTE-optional-without-CONFIG_EXPE.patch delete mode 100644 SOURCES/0001-brcm-rpi4-fix-usb-numeration.patch delete mode 100644 SOURCES/0001-drm-panel-add-Xingbangda-XBD599-panel.patch delete mode 100644 SOURCES/0001-drm-sun4i-sun6i_mipi_dsi-fix-horizontal-timing-calcu.patch delete mode 100644 SOURCES/0001-dt-bindings-panel-add-binding-for-Xingbangda-XBD599-.patch delete mode 100644 SOURCES/0001-efi-Add-an-EFI_SECURE_BOOT-flag-to-indicate-secure-b.patch delete mode 100644 SOURCES/0001-efi-Lock-down-the-kernel-if-booted-in-secure-boot-mo.patch delete mode 100644 SOURCES/0001-iommu-arm-smmu-workaround-DMA-mode-issues.patch delete mode 100644 SOURCES/0001-ipmi-do-not-configure-ipmi-for-HPE-m400.patch delete mode 100644 SOURCES/0001-kdump-add-support-for-crashkernel-auto.patch delete mode 100644 SOURCES/0001-kdump-fix-a-grammar-issue-in-a-kernel-message.patch delete mode 100644 SOURCES/0001-kdump-round-up-the-total-memory-size-to-128M-for-cra.patch delete mode 100644 SOURCES/0001-mm-kmemleak-skip-late_init-if-not-skip-disable.patch delete mode 100644 SOURCES/0001-s390-Lock-down-the-kernel-when-the-IPL-secure-flag-i.patch delete mode 100644 SOURCES/0001-scsi-smartpqi-add-inspur-advantech-ids.patch delete mode 100644 SOURCES/0001-security-lockdown-expose-a-hook-to-lock-the-kernel-d.patch delete mode 100644 SOURCES/0001-update-phy-on-pine64-a64-devices.patch create mode 100644 SOURCES/Makefile.rhelver create mode 100644 SOURCES/Patchlist.changelog create mode 100644 SOURCES/README.rst create mode 100644 SOURCES/linux-kernel-test.patch create mode 100755 SOURCES/mod-blacklist.sh delete mode 100755 SOURCES/mod-extra-blacklist.sh delete mode 100755 SOURCES/mod-extra.sh create mode 100644 SOURCES/patch-5.11-redhat.patch create mode 100644 SOURCES/rheldup3.x509 create mode 100644 SOURCES/rhelkpatch1.x509 mode change 100644 => 100755 SPECS/kernel.spec diff --git a/SOURCES/0001-ACPI-APEI-arm64-Ignore-broken-HPE-moonshot-APEI-supp.patch b/SOURCES/0001-ACPI-APEI-arm64-Ignore-broken-HPE-moonshot-APEI-supp.patch deleted file mode 100644 index 035f65c..0000000 --- a/SOURCES/0001-ACPI-APEI-arm64-Ignore-broken-HPE-moonshot-APEI-supp.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Al Stone -Date: Tue, 27 Feb 2018 00:21:23 -0500 -Subject: [PATCH] ACPI: APEI: arm64: Ignore broken HPE moonshot APEI support - -Message-id: <20180227002123.21608-1-ahs3@redhat.com> -Patchwork-id: 206052 -O-Subject: [RHEL8 BZ1518076 PATCH] ACPI: APEI: arm64: Ignore broken HPE moonshot APEI support -Bugzilla: 1518076 -RH-Acked-by: Mark Salter -RH-Acked-by: Jeremy McNicoll - -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1518076 -Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=15417197 -Tested: compile-only; several other patches are required for full booting - QE has tested limited boot (see comment#12 of BZ) - -This is a re-post of a RHEL-ALT-7.5 patch specific to aarch64 moonshots -that we use in beaker. It is required for these machines to boot. - - commit 8a663a264863efedf8bb4a9d76ac603920fdd739 - Author: Robert Richter - Date: Wed Aug 16 19:49:30 2017 -0400 - - [acpi] APEI: arm64: Ignore broken HPE moonshot APEI support - - From: Mark Salter - Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1344237 - Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=13768971 - Tested: Booted on moonshot with patched 4.11.0-20 kernel - Upstream: RHEL-only - - The aarch64 HP moonshot platforms we have in beaker and elsewhere have - a firmware bug which causes a spurious fatal memory error via APEI at - boot time. This platform is no longer supported and no further firmware - updates are expected. This is a downstream-only hack to avoid the problem - by bailing out of HEST table probing if we detect a moonshot HEST table. - - Signed-off-by: Mark Salter - Signed-off-by: Robert Richter - Signed-off-by: Herton R. Krzesinski - -Upstream Status: RHEL only -Signed-off-by: Al Stone -Signed-off-by: Herton R. Krzesinski ---- - drivers/acpi/apei/hest.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c -index 6e980fe16772..37bc003e7a83 100644 ---- a/drivers/acpi/apei/hest.c -+++ b/drivers/acpi/apei/hest.c -@@ -88,6 +88,14 @@ int apei_hest_parse(apei_hest_func_t func, void *data) - if (hest_disable || !hest_tab) - return -EINVAL; - -+#ifdef CONFIG_ARM64 -+ /* Ignore broken firmware */ -+ if (!strncmp(hest_tab->header.oem_id, "HPE ", 6) && -+ !strncmp(hest_tab->header.oem_table_id, "ProLiant", 8) && -+ MIDR_IMPLEMENTOR(read_cpuid_id()) == ARM_CPU_IMP_APM) -+ return -EINVAL; -+#endif -+ - hest_hdr = (struct acpi_hest_header *)(hest_tab + 1); - for (i = 0; i < hest_tab->error_source_count; i++) { - len = hest_esrc_len(hest_hdr); --- -2.28.0 - diff --git a/SOURCES/0001-ACPI-irq-Workaround-firmware-issue-on-X-Gene-based-m.patch b/SOURCES/0001-ACPI-irq-Workaround-firmware-issue-on-X-Gene-based-m.patch deleted file mode 100644 index e262728..0000000 --- a/SOURCES/0001-ACPI-irq-Workaround-firmware-issue-on-X-Gene-based-m.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Mark Salter -Date: Thu, 10 May 2018 17:38:43 -0400 -Subject: [PATCH] ACPI / irq: Workaround firmware issue on X-Gene based m400 - -Message-id: <20180510173844.29580-3-msalter@redhat.com> -Patchwork-id: 214383 -O-Subject: [RHEL-8 BZ1519554 2/3] ACPI / irq: Workaround firmware issue on X-Gene based m400 -Bugzilla: 1519554 -RH-Acked-by: Al Stone -RH-Acked-by: Tony Camuso - -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1519554 -Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16144520 - -The ACPI firmware on the xgene-based m400 platorms erroneously -describes its UART interrupt as ACPI_PRODUCER rather than -ACPI_CONSUMER. This leads to the UART driver being unable to -find its interrupt and the kernel unable find a console. -Work around this by avoiding the producer/consumer check -for X-Gene UARTs. - -Upstream Status: RHEL only -Signed-off-by: Mark Salter -Signed-off-by: Herton R. Krzesinski ---- - drivers/acpi/irq.c | 17 +++++++++++++++-- - 1 file changed, 15 insertions(+), 2 deletions(-) - -diff --git a/drivers/acpi/irq.c b/drivers/acpi/irq.c -index e209081d644b..7484bcf59a1b 100644 ---- a/drivers/acpi/irq.c -+++ b/drivers/acpi/irq.c -@@ -126,6 +126,7 @@ struct acpi_irq_parse_one_ctx { - unsigned int index; - unsigned long *res_flags; - struct irq_fwspec *fwspec; -+ bool skip_producer_check; - }; - - /** -@@ -197,7 +198,8 @@ static acpi_status acpi_irq_parse_one_cb(struct acpi_resource *ares, - return AE_CTRL_TERMINATE; - case ACPI_RESOURCE_TYPE_EXTENDED_IRQ: - eirq = &ares->data.extended_irq; -- if (eirq->producer_consumer == ACPI_PRODUCER) -+ if (!ctx->skip_producer_check && -+ eirq->producer_consumer == ACPI_PRODUCER) - return AE_OK; - if (ctx->index >= eirq->interrupt_count) { - ctx->index -= eirq->interrupt_count; -@@ -232,8 +234,19 @@ static acpi_status acpi_irq_parse_one_cb(struct acpi_resource *ares, - static int acpi_irq_parse_one(acpi_handle handle, unsigned int index, - struct irq_fwspec *fwspec, unsigned long *flags) - { -- struct acpi_irq_parse_one_ctx ctx = { -EINVAL, index, flags, fwspec }; -+ struct acpi_irq_parse_one_ctx ctx = { -EINVAL, index, flags, fwspec, false }; - -+ /* -+ * Firmware on arm64-based HPE m400 platform incorrectly marks -+ * its UART interrupt as ACPI_PRODUCER rather than ACPI_CONSUMER. -+ * Don't do the producer/consumer check for that device. -+ */ -+ if (IS_ENABLED(CONFIG_ARM64)) { -+ struct acpi_device *adev = acpi_bus_get_acpi_device(handle); -+ -+ if (adev && !strcmp(acpi_device_hid(adev), "APMC0D08")) -+ ctx.skip_producer_check = true; -+ } - acpi_walk_resources(handle, METHOD_NAME__CRS, acpi_irq_parse_one_cb, &ctx); - return ctx.rc; - } --- -2.28.0 - diff --git a/SOURCES/0001-ARM-fix-__get_user_check-in-case-uaccess_-calls-are-.patch b/SOURCES/0001-ARM-fix-__get_user_check-in-case-uaccess_-calls-are-.patch deleted file mode 100644 index 283ac06..0000000 --- a/SOURCES/0001-ARM-fix-__get_user_check-in-case-uaccess_-calls-are-.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Masahiro Yamada -Date: Mon, 30 Sep 2019 14:59:25 +0900 -Subject: [PATCH] ARM: fix __get_user_check() in case uaccess_* calls are not - inlined - -KernelCI reports that bcm2835_defconfig is no longer booting since -commit ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING -forcibly"): - - https://lkml.org/lkml/2019/9/26/825 - -I also received a regression report from Nicolas Saenz Julienne: - - https://lkml.org/lkml/2019/9/27/263 - -This problem has cropped up on arch/arm/config/bcm2835_defconfig -because it enables CONFIG_CC_OPTIMIZE_FOR_SIZE. The compiler tends -to prefer not inlining functions with -Os. I was able to reproduce -it with other boards and defconfig files by manually enabling -CONFIG_CC_OPTIMIZE_FOR_SIZE. - -The __get_user_check() specifically uses r0, r1, r2 registers. -So, uaccess_save_and_enable() and uaccess_restore() must be inlined -in order to avoid those registers being overwritten in the callees. - -Prior to commit 9012d011660e ("compiler: allow all arches to enable -CONFIG_OPTIMIZE_INLINING"), the 'inline' marker was always enough for -inlining functions, except on x86. - -Since that commit, all architectures can enable CONFIG_OPTIMIZE_INLINING. -So, __always_inline is now the only guaranteed way of forcible inlining. - -I want to keep as much compiler's freedom as possible about the inlining -decision. So, I changed the function call order instead of adding -__always_inline around. - -Call uaccess_save_and_enable() before assigning the __p ("r0"), and -uaccess_restore() after evacuating the __e ("r0"). - -Fixes: 9012d011660e ("compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING") -Reported-by: "kernelci.org bot" -Reported-by: Nicolas Saenz Julienne -Signed-off-by: Masahiro Yamada -Acked-by: Arnd Bergmann -Tested-by: Nicolas Saenz Julienne -Tested-by: Fabrizio Castro -Tested-by: Geert Uytterhoeven ---- - arch/arm/include/asm/uaccess.h | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h -index b5fdd30252f8..d43ceaa78269 100644 ---- a/arch/arm/include/asm/uaccess.h -+++ b/arch/arm/include/asm/uaccess.h -@@ -195,11 +195,12 @@ extern int __get_user_64t_4(void *); - #define __get_user_check(x, p) \ - ({ \ - unsigned long __limit = current_thread_info()->addr_limit - 1; \ -+ unsigned int __ua_flags = uaccess_save_and_enable(); \ - register typeof(*(p)) __user *__p asm("r0") = (p); \ - register __inttype(x) __r2 asm("r2"); \ - register unsigned long __l asm("r1") = __limit; \ - register int __e asm("r0"); \ -- unsigned int __ua_flags = uaccess_save_and_enable(); \ -+ unsigned int __err; \ - switch (sizeof(*(__p))) { \ - case 1: \ - if (sizeof((x)) >= 8) \ -@@ -227,9 +228,10 @@ extern int __get_user_64t_4(void *); - break; \ - default: __e = __get_user_bad(); break; \ - } \ -- uaccess_restore(__ua_flags); \ -+ __err = __e; \ - x = (typeof(*(p))) __r2; \ -- __e; \ -+ uaccess_restore(__ua_flags); \ -+ __err; \ - }) - - #define get_user(x, p) \ --- -2.28.0 - diff --git a/SOURCES/0001-ARM-tegra-usb-no-reset.patch b/SOURCES/0001-ARM-tegra-usb-no-reset.patch deleted file mode 100644 index 9e22a32..0000000 --- a/SOURCES/0001-ARM-tegra-usb-no-reset.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Thu, 3 May 2012 20:27:11 +0100 -Subject: [PATCH] ARM: tegra: usb no reset - -Patch for disconnect issues with storage attached to a - tegra-ehci controller ---- - drivers/usb/core/hub.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c -index 052d5accfe9b..fac58cf619da 100644 ---- a/drivers/usb/core/hub.c -+++ b/drivers/usb/core/hub.c -@@ -5517,6 +5517,13 @@ static void hub_event(struct work_struct *work) - (u16) hub->change_bits[0], - (u16) hub->event_bits[0]); - -+ /* Don't disconnect USB-SATA on TrimSlice */ -+ if (strcmp(dev_name(hdev->bus->controller), "tegra-ehci.0") == 0) { -+ if ((hdev->state == 7) && (hub->change_bits[0] == 0) && -+ (hub->event_bits[0] == 0x2)) -+ hub->event_bits[0] = 0; -+ } -+ - /* Lock the device, then check to see if we were - * disconnected while waiting for the lock to succeed. */ - usb_lock_device(hdev); --- -2.28.0 - diff --git a/SOURCES/0001-Add-efi_status_to_str-and-rework-efi_status_to_err.patch b/SOURCES/0001-Add-efi_status_to_str-and-rework-efi_status_to_err.patch deleted file mode 100644 index 79118e1..0000000 --- a/SOURCES/0001-Add-efi_status_to_str-and-rework-efi_status_to_err.patch +++ /dev/null @@ -1,185 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Peter Jones -Date: Mon, 2 Oct 2017 18:22:13 -0400 -Subject: [PATCH] Add efi_status_to_str() and rework efi_status_to_err(). - -This adds efi_status_to_str() for use when printing efi_status_t -messages, and reworks efi_status_to_err() so that the two use a common -list of errors. - -Upstream Status: RHEL only -Signed-off-by: Peter Jones ---- - drivers/firmware/efi/efi.c | 124 +++++++++++++++++++++++++++---------- - include/linux/efi.h | 3 + - 2 files changed, 96 insertions(+), 31 deletions(-) - -diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c -index fdd1db025dbf..8ef7d1df09dd 100644 ---- a/drivers/firmware/efi/efi.c -+++ b/drivers/firmware/efi/efi.c -@@ -31,6 +31,7 @@ - #include - #include - #include -+#include - - #include - -@@ -831,40 +832,101 @@ int efi_mem_type(unsigned long phys_addr) - } - #endif - -+struct efi_error_code { -+ efi_status_t status; -+ int errno; -+ const char *description; -+}; -+ -+static const struct efi_error_code efi_error_codes[] = { -+ { EFI_SUCCESS, 0, "Success"}, -+#if 0 -+ { EFI_LOAD_ERROR, -EPICK_AN_ERRNO, "Load Error"}, -+#endif -+ { EFI_INVALID_PARAMETER, -EINVAL, "Invalid Parameter"}, -+ { EFI_UNSUPPORTED, -ENOSYS, "Unsupported"}, -+ { EFI_BAD_BUFFER_SIZE, -ENOSPC, "Bad Buffer Size"}, -+ { EFI_BUFFER_TOO_SMALL, -ENOSPC, "Buffer Too Small"}, -+ { EFI_NOT_READY, -EAGAIN, "Not Ready"}, -+ { EFI_DEVICE_ERROR, -EIO, "Device Error"}, -+ { EFI_WRITE_PROTECTED, -EROFS, "Write Protected"}, -+ { EFI_OUT_OF_RESOURCES, -ENOMEM, "Out of Resources"}, -+#if 0 -+ { EFI_VOLUME_CORRUPTED, -EPICK_AN_ERRNO, "Volume Corrupt"}, -+ { EFI_VOLUME_FULL, -EPICK_AN_ERRNO, "Volume Full"}, -+ { EFI_NO_MEDIA, -EPICK_AN_ERRNO, "No Media"}, -+ { EFI_MEDIA_CHANGED, -EPICK_AN_ERRNO, "Media changed"}, -+#endif -+ { EFI_NOT_FOUND, -ENOENT, "Not Found"}, -+#if 0 -+ { EFI_ACCESS_DENIED, -EPICK_AN_ERRNO, "Access Denied"}, -+ { EFI_NO_RESPONSE, -EPICK_AN_ERRNO, "No Response"}, -+ { EFI_NO_MAPPING, -EPICK_AN_ERRNO, "No mapping"}, -+ { EFI_TIMEOUT, -EPICK_AN_ERRNO, "Time out"}, -+ { EFI_NOT_STARTED, -EPICK_AN_ERRNO, "Not started"}, -+ { EFI_ALREADY_STARTED, -EPICK_AN_ERRNO, "Already started"}, -+#endif -+ { EFI_ABORTED, -EINTR, "Aborted"}, -+#if 0 -+ { EFI_ICMP_ERROR, -EPICK_AN_ERRNO, "ICMP Error"}, -+ { EFI_TFTP_ERROR, -EPICK_AN_ERRNO, "TFTP Error"}, -+ { EFI_PROTOCOL_ERROR, -EPICK_AN_ERRNO, "Protocol Error"}, -+ { EFI_INCOMPATIBLE_VERSION, -EPICK_AN_ERRNO, "Incompatible Version"}, -+#endif -+ { EFI_SECURITY_VIOLATION, -EACCES, "Security Policy Violation"}, -+#if 0 -+ { EFI_CRC_ERROR, -EPICK_AN_ERRNO, "CRC Error"}, -+ { EFI_END_OF_MEDIA, -EPICK_AN_ERRNO, "End of Media"}, -+ { EFI_END_OF_FILE, -EPICK_AN_ERRNO, "End of File"}, -+ { EFI_INVALID_LANGUAGE, -EPICK_AN_ERRNO, "Invalid Languages"}, -+ { EFI_COMPROMISED_DATA, -EPICK_AN_ERRNO, "Compromised Data"}, -+ -+ // warnings -+ { EFI_WARN_UNKOWN_GLYPH, -EPICK_AN_ERRNO, "Warning Unknown Glyph"}, -+ { EFI_WARN_DELETE_FAILURE, -EPICK_AN_ERRNO, "Warning Delete Failure"}, -+ { EFI_WARN_WRITE_FAILURE, -EPICK_AN_ERRNO, "Warning Write Failure"}, -+ { EFI_WARN_BUFFER_TOO_SMALL, -EPICK_AN_ERRNO, "Warning Buffer Too Small"}, -+#endif -+}; -+ -+static int -+efi_status_cmp_bsearch(const void *key, const void *item) -+{ -+ u64 status = (u64)(uintptr_t)key; -+ struct efi_error_code *code = (struct efi_error_code *)item; -+ -+ if (status < code->status) -+ return -1; -+ if (status > code->status) -+ return 1; -+ return 0; -+} -+ - int efi_status_to_err(efi_status_t status) - { -- int err; -- -- switch (status) { -- case EFI_SUCCESS: -- err = 0; -- break; -- case EFI_INVALID_PARAMETER: -- err = -EINVAL; -- break; -- case EFI_OUT_OF_RESOURCES: -- err = -ENOSPC; -- break; -- case EFI_DEVICE_ERROR: -- err = -EIO; -- break; -- case EFI_WRITE_PROTECTED: -- err = -EROFS; -- break; -- case EFI_SECURITY_VIOLATION: -- err = -EACCES; -- break; -- case EFI_NOT_FOUND: -- err = -ENOENT; -- break; -- case EFI_ABORTED: -- err = -EINTR; -- break; -- default: -- err = -EINVAL; -- } -+ struct efi_error_code *found; -+ size_t num = sizeof(efi_error_codes) / sizeof(struct efi_error_code); - -- return err; -+ found = bsearch((void *)(uintptr_t)status, efi_error_codes, -+ sizeof(struct efi_error_code), num, -+ efi_status_cmp_bsearch); -+ if (!found) -+ return -EINVAL; -+ return found->errno; -+} -+ -+const char * -+efi_status_to_str(efi_status_t status) -+{ -+ struct efi_error_code *found; -+ size_t num = sizeof(efi_error_codes) / sizeof(struct efi_error_code); -+ -+ found = bsearch((void *)(uintptr_t)status, efi_error_codes, -+ sizeof(struct efi_error_code), num, -+ efi_status_cmp_bsearch); -+ if (!found) -+ return "Unknown error code"; -+ return found->description; - } - - static DEFINE_SPINLOCK(efi_mem_reserve_persistent_lock); -diff --git a/include/linux/efi.h b/include/linux/efi.h -index 73db1ae04cef..92aa4697f558 100644 ---- a/include/linux/efi.h -+++ b/include/linux/efi.h -@@ -43,6 +43,8 @@ - #define EFI_ABORTED (21 | (1UL << (BITS_PER_LONG-1))) - #define EFI_SECURITY_VIOLATION (26 | (1UL << (BITS_PER_LONG-1))) - -+#define EFI_IS_ERROR(x) ((x) & (1UL << (BITS_PER_LONG-1))) -+ - typedef unsigned long efi_status_t; - typedef u8 efi_bool_t; - typedef u16 efi_char16_t; /* UNICODE character */ -@@ -832,6 +834,7 @@ static inline bool efi_rt_services_supported(unsigned int mask) - #endif - - extern int efi_status_to_err(efi_status_t status); -+extern const char *efi_status_to_str(efi_status_t status); - - /* - * Variable Attributes --- -2.28.0 - diff --git a/SOURCES/0001-Add-option-of-13-for-FORCE_MAX_ZONEORDER.patch b/SOURCES/0001-Add-option-of-13-for-FORCE_MAX_ZONEORDER.patch deleted file mode 100644 index fb968c9..0000000 --- a/SOURCES/0001-Add-option-of-13-for-FORCE_MAX_ZONEORDER.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Wed, 26 Feb 2020 13:38:40 -0500 -Subject: [PATCH] Add option of 13 for FORCE_MAX_ZONEORDER - -This is a hack, but it's what the other distros currently use -for aarch64 with 4K pages so we'll do the same while upstream -decides what the best outcome is (which isn't this). - -Upstream Status: RHEL only -Signed-off-by: Peter Robinson -[Add a dependency on RHEL_DIFFERENCES] -Signed-off-by: Jeremy Cline ---- - arch/arm64/Kconfig | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig -index 74c5325108c0..5aa22996be8c 100644 ---- a/arch/arm64/Kconfig -+++ b/arch/arm64/Kconfig -@@ -1133,6 +1133,7 @@ config XEN - config FORCE_MAX_ZONEORDER - int - default "14" if (ARM64_64K_PAGES && TRANSPARENT_HUGEPAGE) -+ default "13" if (ARCH_THUNDER && !ARM64_64K_PAGES && !RHEL_DIFFERENCES) - default "12" if (ARM64_16K_PAGES && TRANSPARENT_HUGEPAGE) - default "11" - help --- -2.28.0 - diff --git a/SOURCES/0001-Drop-that-for-now.patch b/SOURCES/0001-Drop-that-for-now.patch deleted file mode 100644 index 5146b2a..0000000 --- a/SOURCES/0001-Drop-that-for-now.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Laura Abbott -Date: Wed, 23 Jan 2019 14:36:37 +0100 -Subject: [PATCH] Drop that for now - ---- - Makefile | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Makefile b/Makefile -index b70997f7ddf9..680d906eee35 100644 ---- a/Makefile -+++ b/Makefile -@@ -496,6 +496,7 @@ KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \ - -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \ - -Werror=implicit-function-declaration -Werror=implicit-int \ - -Werror=return-type -Wno-format-security \ -+ -Wno-address-of-packed-member \ - -std=gnu89 - KBUILD_CPPFLAGS := -D__KERNEL__ - KBUILD_AFLAGS_KERNEL := --- -2.28.0 - diff --git a/SOURCES/0001-Input-rmi4-remove-the-need-for-artificial-IRQ-in-cas.patch b/SOURCES/0001-Input-rmi4-remove-the-need-for-artificial-IRQ-in-cas.patch deleted file mode 100644 index afdb790..0000000 --- a/SOURCES/0001-Input-rmi4-remove-the-need-for-artificial-IRQ-in-cas.patch +++ /dev/null @@ -1,330 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Benjamin Tissoires -Date: Mon, 3 Apr 2017 18:18:21 +0200 -Subject: [PATCH] Input: rmi4 - remove the need for artificial IRQ in case of - HID - -The IRQ from rmi4 may interfere with the one we currently use on i2c-hid. -Given that there is already a need for an external API from rmi4 to -forward the attention data, we can, in this particular case rely on a -separate workqueue to prevent cursor jumps. - -Reported-by: Cameron Gutman -Reported-by: Thorsten Leemhuis -Reported-by: Jason Ekstrand -Tested-by: Andrew Duggan -Signed-off-by: Benjamin Tissoires -Signed-off-by: Lyude ---- - drivers/hid/hid-rmi.c | 64 ----------------- - drivers/input/rmi4/rmi_driver.c | 124 +++++++++++++++++++------------- - include/linux/rmi.h | 1 + - 3 files changed, 75 insertions(+), 114 deletions(-) - -diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c -index 8cffa84c9650..6c4e3675601a 100644 ---- a/drivers/hid/hid-rmi.c -+++ b/drivers/hid/hid-rmi.c -@@ -322,19 +322,12 @@ static int rmi_input_event(struct hid_device *hdev, u8 *data, int size) - { - struct rmi_data *hdata = hid_get_drvdata(hdev); - struct rmi_device *rmi_dev = hdata->xport.rmi_dev; -- unsigned long flags; - - if (!(test_bit(RMI_STARTED, &hdata->flags))) - return 0; - -- local_irq_save(flags); -- - rmi_set_attn_data(rmi_dev, data[1], &data[2], size - 2); - -- generic_handle_irq(hdata->rmi_irq); -- -- local_irq_restore(flags); -- - return 1; - } - -@@ -592,56 +585,6 @@ static const struct rmi_transport_ops hid_rmi_ops = { - .reset = rmi_hid_reset, - }; - --static void rmi_irq_teardown(void *data) --{ -- struct rmi_data *hdata = data; -- struct irq_domain *domain = hdata->domain; -- -- if (!domain) -- return; -- -- irq_dispose_mapping(irq_find_mapping(domain, 0)); -- -- irq_domain_remove(domain); -- hdata->domain = NULL; -- hdata->rmi_irq = 0; --} -- --static int rmi_irq_map(struct irq_domain *h, unsigned int virq, -- irq_hw_number_t hw_irq_num) --{ -- irq_set_chip_and_handler(virq, &dummy_irq_chip, handle_simple_irq); -- -- return 0; --} -- --static const struct irq_domain_ops rmi_irq_ops = { -- .map = rmi_irq_map, --}; -- --static int rmi_setup_irq_domain(struct hid_device *hdev) --{ -- struct rmi_data *hdata = hid_get_drvdata(hdev); -- int ret; -- -- hdata->domain = irq_domain_create_linear(hdev->dev.fwnode, 1, -- &rmi_irq_ops, hdata); -- if (!hdata->domain) -- return -ENOMEM; -- -- ret = devm_add_action_or_reset(&hdev->dev, &rmi_irq_teardown, hdata); -- if (ret) -- return ret; -- -- hdata->rmi_irq = irq_create_mapping(hdata->domain, 0); -- if (hdata->rmi_irq <= 0) { -- hid_err(hdev, "Can't allocate an IRQ\n"); -- return hdata->rmi_irq < 0 ? hdata->rmi_irq : -ENXIO; -- } -- -- return 0; --} -- - static int rmi_probe(struct hid_device *hdev, const struct hid_device_id *id) - { - struct rmi_data *data = NULL; -@@ -714,18 +657,11 @@ static int rmi_probe(struct hid_device *hdev, const struct hid_device_id *id) - - mutex_init(&data->page_mutex); - -- ret = rmi_setup_irq_domain(hdev); -- if (ret) { -- hid_err(hdev, "failed to allocate IRQ domain\n"); -- return ret; -- } -- - if (data->device_flags & RMI_DEVICE_HAS_PHYS_BUTTONS) - rmi_hid_pdata.gpio_data.disable = true; - - data->xport.dev = hdev->dev.parent; - data->xport.pdata = rmi_hid_pdata; -- data->xport.pdata.irq = data->rmi_irq; - data->xport.proto_name = "hid"; - data->xport.ops = &hid_rmi_ops; - -diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c -index 258d5fe3d395..f7298e3dc8f3 100644 ---- a/drivers/input/rmi4/rmi_driver.c -+++ b/drivers/input/rmi4/rmi_driver.c -@@ -182,34 +182,47 @@ void rmi_set_attn_data(struct rmi_device *rmi_dev, unsigned long irq_status, - attn_data.data = fifo_data; - - kfifo_put(&drvdata->attn_fifo, attn_data); -+ -+ schedule_work(&drvdata->attn_work); - } - EXPORT_SYMBOL_GPL(rmi_set_attn_data); - --static irqreturn_t rmi_irq_fn(int irq, void *dev_id) -+static void attn_callback(struct work_struct *work) - { -- struct rmi_device *rmi_dev = dev_id; -- struct rmi_driver_data *drvdata = dev_get_drvdata(&rmi_dev->dev); -+ struct rmi_driver_data *drvdata = container_of(work, -+ struct rmi_driver_data, -+ attn_work); - struct rmi4_attn_data attn_data = {0}; - int ret, count; - - count = kfifo_get(&drvdata->attn_fifo, &attn_data); -- if (count) { -- *(drvdata->irq_status) = attn_data.irq_status; -- drvdata->attn_data = attn_data; -- } -+ if (!count) -+ return; - -- ret = rmi_process_interrupt_requests(rmi_dev); -+ *(drvdata->irq_status) = attn_data.irq_status; -+ drvdata->attn_data = attn_data; -+ -+ ret = rmi_process_interrupt_requests(drvdata->rmi_dev); - if (ret) -- rmi_dbg(RMI_DEBUG_CORE, &rmi_dev->dev, -+ rmi_dbg(RMI_DEBUG_CORE, &drvdata->rmi_dev->dev, - "Failed to process interrupt request: %d\n", ret); - -- if (count) { -- kfree(attn_data.data); -- drvdata->attn_data.data = NULL; -- } -+ kfree(attn_data.data); -+ drvdata->attn_data.data = NULL; - - if (!kfifo_is_empty(&drvdata->attn_fifo)) -- return rmi_irq_fn(irq, dev_id); -+ schedule_work(&drvdata->attn_work); -+} -+ -+static irqreturn_t rmi_irq_fn(int irq, void *dev_id) -+{ -+ struct rmi_device *rmi_dev = dev_id; -+ int ret; -+ -+ ret = rmi_process_interrupt_requests(rmi_dev); -+ if (ret) -+ rmi_dbg(RMI_DEBUG_CORE, &rmi_dev->dev, -+ "Failed to process interrupt request: %d\n", ret); - - return IRQ_HANDLED; - } -@@ -217,7 +230,6 @@ static irqreturn_t rmi_irq_fn(int irq, void *dev_id) - static int rmi_irq_init(struct rmi_device *rmi_dev) - { - struct rmi_device_platform_data *pdata = rmi_get_platform_data(rmi_dev); -- struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev); - int irq_flags = irq_get_trigger_type(pdata->irq); - int ret; - -@@ -235,8 +247,6 @@ static int rmi_irq_init(struct rmi_device *rmi_dev) - return ret; - } - -- data->enabled = true; -- - return 0; - } - -@@ -886,23 +896,27 @@ void rmi_enable_irq(struct rmi_device *rmi_dev, bool clear_wake) - if (data->enabled) - goto out; - -- enable_irq(irq); -- data->enabled = true; -- if (clear_wake && device_may_wakeup(rmi_dev->xport->dev)) { -- retval = disable_irq_wake(irq); -- if (retval) -- dev_warn(&rmi_dev->dev, -- "Failed to disable irq for wake: %d\n", -- retval); -- } -+ if (irq) { -+ enable_irq(irq); -+ data->enabled = true; -+ if (clear_wake && device_may_wakeup(rmi_dev->xport->dev)) { -+ retval = disable_irq_wake(irq); -+ if (retval) -+ dev_warn(&rmi_dev->dev, -+ "Failed to disable irq for wake: %d\n", -+ retval); -+ } - -- /* -- * Call rmi_process_interrupt_requests() after enabling irq, -- * otherwise we may lose interrupt on edge-triggered systems. -- */ -- irq_flags = irq_get_trigger_type(pdata->irq); -- if (irq_flags & IRQ_TYPE_EDGE_BOTH) -- rmi_process_interrupt_requests(rmi_dev); -+ /* -+ * Call rmi_process_interrupt_requests() after enabling irq, -+ * otherwise we may lose interrupt on edge-triggered systems. -+ */ -+ irq_flags = irq_get_trigger_type(pdata->irq); -+ if (irq_flags & IRQ_TYPE_EDGE_BOTH) -+ rmi_process_interrupt_requests(rmi_dev); -+ } else { -+ data->enabled = true; -+ } - - out: - mutex_unlock(&data->enabled_mutex); -@@ -922,20 +936,22 @@ void rmi_disable_irq(struct rmi_device *rmi_dev, bool enable_wake) - goto out; - - data->enabled = false; -- disable_irq(irq); -- if (enable_wake && device_may_wakeup(rmi_dev->xport->dev)) { -- retval = enable_irq_wake(irq); -- if (retval) -- dev_warn(&rmi_dev->dev, -- "Failed to enable irq for wake: %d\n", -- retval); -- } -- -- /* make sure the fifo is clean */ -- while (!kfifo_is_empty(&data->attn_fifo)) { -- count = kfifo_get(&data->attn_fifo, &attn_data); -- if (count) -- kfree(attn_data.data); -+ if (irq) { -+ disable_irq(irq); -+ if (enable_wake && device_may_wakeup(rmi_dev->xport->dev)) { -+ retval = enable_irq_wake(irq); -+ if (retval) -+ dev_warn(&rmi_dev->dev, -+ "Failed to enable irq for wake: %d\n", -+ retval); -+ } -+ } else { -+ /* make sure the fifo is clean */ -+ while (!kfifo_is_empty(&data->attn_fifo)) { -+ count = kfifo_get(&data->attn_fifo, &attn_data); -+ if (count) -+ kfree(attn_data.data); -+ } - } - - out: -@@ -981,6 +997,8 @@ static int rmi_driver_remove(struct device *dev) - irq_domain_remove(data->irqdomain); - data->irqdomain = NULL; - -+ cancel_work_sync(&data->attn_work); -+ - rmi_f34_remove_sysfs(rmi_dev); - rmi_free_function_list(rmi_dev); - -@@ -1219,9 +1237,15 @@ static int rmi_driver_probe(struct device *dev) - } - } - -- retval = rmi_irq_init(rmi_dev); -- if (retval < 0) -- goto err_destroy_functions; -+ if (pdata->irq) { -+ retval = rmi_irq_init(rmi_dev); -+ if (retval < 0) -+ goto err_destroy_functions; -+ } -+ -+ data->enabled = true; -+ -+ INIT_WORK(&data->attn_work, attn_callback); - - if (data->f01_container->dev.driver) { - /* Driver already bound, so enable ATTN now. */ -diff --git a/include/linux/rmi.h b/include/linux/rmi.h -index 8ed37f93f3c8..d7ad35a15acb 100644 ---- a/include/linux/rmi.h -+++ b/include/linux/rmi.h -@@ -363,6 +363,7 @@ struct rmi_driver_data { - - struct rmi4_attn_data attn_data; - DECLARE_KFIFO(attn_fifo, struct rmi4_attn_data, 16); -+ struct work_struct attn_work; - }; - - int rmi_register_transport_device(struct rmi_transport_dev *xport); --- -2.28.0 - diff --git a/SOURCES/0001-KEYS-Make-use-of-platform-keyring-for-module-signatu.patch b/SOURCES/0001-KEYS-Make-use-of-platform-keyring-for-module-signatu.patch deleted file mode 100644 index c8426f6..0000000 --- a/SOURCES/0001-KEYS-Make-use-of-platform-keyring-for-module-signatu.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Robert Holmes -Date: Tue, 23 Apr 2019 07:39:29 +0000 -Subject: [PATCH] KEYS: Make use of platform keyring for module signature - verify - -This patch completes commit 278311e417be ("kexec, KEYS: Make use of -platform keyring for signature verify") which, while adding the -platform keyring for bzImage verification, neglected to also add -this keyring for module verification. - -As such, kernel modules signed with keys from the MokList variable -were not successfully verified. - -Signed-off-by: Robert Holmes -Signed-off-by: Jeremy Cline ---- - kernel/module_signing.c | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/kernel/module_signing.c b/kernel/module_signing.c -index 9d9fc678c91d..84ad75a53c83 100644 ---- a/kernel/module_signing.c -+++ b/kernel/module_signing.c -@@ -38,8 +38,15 @@ int mod_verify_sig(const void *mod, struct load_info *info) - modlen -= sig_len + sizeof(ms); - info->len = modlen; - -- return verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len, -+ ret = verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len, - VERIFY_USE_SECONDARY_KEYRING, - VERIFYING_MODULE_SIGNATURE, - NULL, NULL); -+ if (ret == -ENOKEY && IS_ENABLED(CONFIG_INTEGRITY_PLATFORM_KEYRING)) { -+ ret = verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len, -+ VERIFY_USE_PLATFORM_KEYRING, -+ VERIFYING_MODULE_SIGNATURE, -+ NULL, NULL); -+ } -+ return ret; - } --- -2.28.0 - diff --git a/SOURCES/0001-Make-get_cert_list-use-efi_status_to_str-to-print-er.patch b/SOURCES/0001-Make-get_cert_list-use-efi_status_to_str-to-print-er.patch deleted file mode 100644 index 65312b3..0000000 --- a/SOURCES/0001-Make-get_cert_list-use-efi_status_to_str-to-print-er.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Peter Jones -Date: Mon, 2 Oct 2017 18:18:30 -0400 -Subject: [PATCH] Make get_cert_list() use efi_status_to_str() to print error - messages. - -Upstream Status: RHEL only -Signed-off-by: Peter Jones -Signed-off-by: Jeremy Cline ---- - security/integrity/platform_certs/load_uefi.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/security/integrity/platform_certs/load_uefi.c b/security/integrity/platform_certs/load_uefi.c -index 253fb9a7fc98..8c95b68d86d4 100644 ---- a/security/integrity/platform_certs/load_uefi.c -+++ b/security/integrity/platform_certs/load_uefi.c -@@ -46,7 +46,8 @@ static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid, - return NULL; - - if (*status != EFI_BUFFER_TOO_SMALL) { -- pr_err("Couldn't get size: 0x%lx\n", *status); -+ pr_err("Couldn't get size: %s (0x%lx)\n", -+ efi_status_to_str(*status), *status); - return NULL; - } - -@@ -57,7 +58,8 @@ static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid, - *status = efi.get_variable(name, guid, NULL, &lsize, db); - if (*status != EFI_SUCCESS) { - kfree(db); -- pr_err("Error reading db var: 0x%lx\n", *status); -+ pr_err("Error reading db var: %s (0x%lx)\n", -+ efi_status_to_str(*status), *status); - return NULL; - } - --- -2.28.0 - diff --git a/SOURCES/0001-PCI-Add-MCFG-quirks-for-Tegra194-host-controllers.patch b/SOURCES/0001-PCI-Add-MCFG-quirks-for-Tegra194-host-controllers.patch deleted file mode 100644 index eedb0ff..0000000 --- a/SOURCES/0001-PCI-Add-MCFG-quirks-for-Tegra194-host-controllers.patch +++ /dev/null @@ -1,241 +0,0 @@ -From ec7b5bf1cc1444d9ad13bcef0f0f8d48ff9c0203 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Sat, 19 Dec 2020 14:10:40 +0000 -Subject: [PATCH] PCI: Add MCFG quirks for Tegra194 host controllers - -The PCIe controller in Tegra194 SoC is not completely ECAM-compliant. -With the current hardware design limitations in place, ECAM can be enabled -only for one controller (C5 controller to be precise) with bus numbers -starting from 160 instead of 0. A different approach is taken to avoid this -abnormal way of enabling ECAM for just one controller but to enable -configuration space access for all the other controllers. In this approach, -ops are added through MCFG quirk mechanism which access the configuration -spaces by dynamically programming iATU (internal AddressTranslation Unit) -to generate respective configuration accesses just like the way it is -done in DesignWare core sub-system. - -Signed-off-by: Vidya Sagar -Acked-by: Thierry Reding -[ Updated by jonathanh@nvidia.com only permit building the Tegra194 - PCIe driver into the kernel and not as a module ] -Signed-off-by: Jon Hunter -Signed-off-by: Peter Robinson ---- - drivers/acpi/pci_mcfg.c | 7 ++ - drivers/pci/controller/dwc/Kconfig | 10 +- - drivers/pci/controller/dwc/Makefile | 2 +- - drivers/pci/controller/dwc/pcie-tegra194.c | 102 +++++++++++++++++++++ - include/linux/pci-ecam.h | 1 + - 5 files changed, 117 insertions(+), 5 deletions(-) - -diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c -index 95f23acd5b80..53cab975f612 100644 ---- a/drivers/acpi/pci_mcfg.c -+++ b/drivers/acpi/pci_mcfg.c -@@ -116,6 +116,13 @@ static struct mcfg_fixup mcfg_quirks[] = { - THUNDER_ECAM_QUIRK(2, 12), - THUNDER_ECAM_QUIRK(2, 13), - -+ { "NVIDIA", "TEGRA194", 1, 0, MCFG_BUS_ANY, &tegra194_pcie_ops}, -+ { "NVIDIA", "TEGRA194", 1, 1, MCFG_BUS_ANY, &tegra194_pcie_ops}, -+ { "NVIDIA", "TEGRA194", 1, 2, MCFG_BUS_ANY, &tegra194_pcie_ops}, -+ { "NVIDIA", "TEGRA194", 1, 3, MCFG_BUS_ANY, &tegra194_pcie_ops}, -+ { "NVIDIA", "TEGRA194", 1, 4, MCFG_BUS_ANY, &tegra194_pcie_ops}, -+ { "NVIDIA", "TEGRA194", 1, 5, MCFG_BUS_ANY, &tegra194_pcie_ops}, -+ - #define XGENE_V1_ECAM_MCFG(rev, seg) \ - {"APM ", "XGENE ", rev, seg, MCFG_BUS_ANY, \ - &xgene_v1_pcie_ecam_ops } -diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig -index bc049865f8e0..c5d40951a6ad 100644 ---- a/drivers/pci/controller/dwc/Kconfig -+++ b/drivers/pci/controller/dwc/Kconfig -@@ -248,25 +248,27 @@ config PCI_MESON - implement the driver. - - config PCIE_TEGRA194 -- tristate -+ bool - - config PCIE_TEGRA194_HOST -- tristate "NVIDIA Tegra194 (and later) PCIe controller - Host Mode" -+ bool "NVIDIA Tegra194 (and later) PCIe controller - Host Mode" - depends on ARCH_TEGRA_194_SOC || COMPILE_TEST - depends on PCI_MSI_IRQ_DOMAIN - select PCIE_DW_HOST - select PHY_TEGRA194_P2U - select PCIE_TEGRA194 -+ default y if ARCH_TEGRA_194_SOC - help - Enables support for the PCIe controller in the NVIDIA Tegra194 SoC to - work in host mode. There are two instances of PCIe controllers in - Tegra194. This controller can work either as EP or RC. In order to - enable host-specific features PCIE_TEGRA194_HOST must be selected and - in order to enable device-specific features PCIE_TEGRA194_EP must be -- selected. This uses the DesignWare core. -+ selected. This uses the DesignWare core. ACPI platforms with Tegra194 -+ don't need to enable this. - - config PCIE_TEGRA194_EP -- tristate "NVIDIA Tegra194 (and later) PCIe controller - Endpoint Mode" -+ bool "NVIDIA Tegra194 (and later) PCIe controller - Endpoint Mode" - depends on ARCH_TEGRA_194_SOC || COMPILE_TEST - depends on PCI_ENDPOINT - select PCIE_DW_EP -diff --git a/drivers/pci/controller/dwc/Makefile b/drivers/pci/controller/dwc/Makefile -index a751553fa0db..dbb981876556 100644 ---- a/drivers/pci/controller/dwc/Makefile -+++ b/drivers/pci/controller/dwc/Makefile -@@ -17,7 +17,6 @@ obj-$(CONFIG_PCIE_INTEL_GW) += pcie-intel-gw.o - obj-$(CONFIG_PCIE_KIRIN) += pcie-kirin.o - obj-$(CONFIG_PCIE_HISI_STB) += pcie-histb.o - obj-$(CONFIG_PCI_MESON) += pci-meson.o --obj-$(CONFIG_PCIE_TEGRA194) += pcie-tegra194.o - obj-$(CONFIG_PCIE_UNIPHIER) += pcie-uniphier.o - obj-$(CONFIG_PCIE_UNIPHIER_EP) += pcie-uniphier-ep.o - -@@ -34,4 +33,5 @@ obj-$(CONFIG_PCIE_UNIPHIER_EP) += pcie-uniphier-ep.o - ifdef CONFIG_PCI - obj-$(CONFIG_ARM64) += pcie-al.o - obj-$(CONFIG_ARM64) += pcie-hisi.o -+obj-$(CONFIG_ARM64) += pcie-tegra194.o - endif -diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c -index f920e7efe118..87c7929db727 100644 ---- a/drivers/pci/controller/dwc/pcie-tegra194.c -+++ b/drivers/pci/controller/dwc/pcie-tegra194.c -@@ -22,6 +22,8 @@ - #include - #include - #include -+#include -+#include - #include - #include - #include -@@ -311,6 +313,103 @@ struct tegra_pcie_dw_of_data { - enum dw_pcie_device_mode mode; - }; - -+#if defined(CONFIG_ACPI) && defined(CONFIG_PCI_QUIRKS) -+struct tegra194_pcie_acpi { -+ void __iomem *config_base; -+ void __iomem *iatu_base; -+ void __iomem *dbi_base; -+}; -+ -+static int tegra194_acpi_init(struct pci_config_window *cfg) -+{ -+ struct device *dev = cfg->parent; -+ struct tegra194_pcie_acpi *pcie; -+ -+ pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL); -+ if (!pcie) -+ return -ENOMEM; -+ -+ pcie->config_base = cfg->win; -+ pcie->iatu_base = cfg->win + SZ_256K; -+ pcie->dbi_base = cfg->win + SZ_512K; -+ cfg->priv = pcie; -+ -+ return 0; -+} -+ -+static inline void atu_reg_write(struct tegra194_pcie_acpi *pcie, int index, -+ u32 val, u32 reg) -+{ -+ u32 offset = PCIE_GET_ATU_OUTB_UNR_REG_OFFSET(index); -+ -+ writel(val, pcie->iatu_base + offset + reg); -+} -+ -+static void program_outbound_atu(struct tegra194_pcie_acpi *pcie, int index, -+ int type, u64 cpu_addr, u64 pci_addr, u64 size) -+{ -+ atu_reg_write(pcie, index, lower_32_bits(cpu_addr), -+ PCIE_ATU_LOWER_BASE); -+ atu_reg_write(pcie, index, upper_32_bits(cpu_addr), -+ PCIE_ATU_UPPER_BASE); -+ atu_reg_write(pcie, index, lower_32_bits(pci_addr), -+ PCIE_ATU_LOWER_TARGET); -+ atu_reg_write(pcie, index, lower_32_bits(cpu_addr + size - 1), -+ PCIE_ATU_LIMIT); -+ atu_reg_write(pcie, index, upper_32_bits(pci_addr), -+ PCIE_ATU_UPPER_TARGET); -+ atu_reg_write(pcie, index, type, PCIE_ATU_CR1); -+ atu_reg_write(pcie, index, PCIE_ATU_ENABLE, PCIE_ATU_CR2); -+} -+ -+static void __iomem *tegra194_map_bus(struct pci_bus *bus, -+ unsigned int devfn, int where) -+{ -+ struct pci_config_window *cfg = bus->sysdata; -+ struct tegra194_pcie_acpi *pcie = cfg->priv; -+ u32 busdev; -+ int type; -+ -+ if (bus->number < cfg->busr.start || bus->number > cfg->busr.end) -+ return NULL; -+ -+ if (bus->number == cfg->busr.start) { -+ if (PCI_SLOT(devfn) == 0) -+ return pcie->dbi_base + where; -+ else -+ return NULL; -+ } -+ -+ busdev = PCIE_ATU_BUS(bus->number) | PCIE_ATU_DEV(PCI_SLOT(devfn)) | -+ PCIE_ATU_FUNC(PCI_FUNC(devfn)); -+ -+ if (bus->parent->number == cfg->busr.start) { -+ if (PCI_SLOT(devfn) == 0) -+ type = PCIE_ATU_TYPE_CFG0; -+ else -+ return NULL; -+ } else { -+ type = PCIE_ATU_TYPE_CFG1; -+ } -+ -+ program_outbound_atu(pcie, PCIE_ATU_REGION_INDEX0, type, -+ cfg->res.start, busdev, SZ_256K); -+ return (void __iomem *)(pcie->config_base + where); -+} -+ -+const struct pci_ecam_ops tegra194_pcie_ops = { -+ .bus_shift = 20, -+ .init = tegra194_acpi_init, -+ .pci_ops = { -+ .map_bus = tegra194_map_bus, -+ .read = pci_generic_config_read, -+ .write = pci_generic_config_write, -+ } -+}; -+#endif /* defined(CONFIG_ACPI) && defined(CONFIG_PCI_QUIRKS) */ -+ -+#ifdef CONFIG_PCIE_TEGRA194 -+ - static inline struct tegra_pcie_dw *to_tegra_pcie(struct dw_pcie *pci) - { - return container_of(pci, struct tegra_pcie_dw, pci); -@@ -2339,3 +2438,6 @@ MODULE_DEVICE_TABLE(of, tegra_pcie_dw_of_match); - MODULE_AUTHOR("Vidya Sagar "); - MODULE_DESCRIPTION("NVIDIA PCIe host controller driver"); - MODULE_LICENSE("GPL v2"); -+ -+#endif /* CONFIG_PCIE_TEGRA194 */ -+ -diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h -index 033ce74f02e8..ccbf3c38c6e6 100644 ---- a/include/linux/pci-ecam.h -+++ b/include/linux/pci-ecam.h -@@ -58,6 +58,7 @@ extern const struct pci_ecam_ops pci_thunder_ecam_ops; /* Cavium ThunderX 1.x */ - extern const struct pci_ecam_ops xgene_v1_pcie_ecam_ops; /* APM X-Gene PCIe v1 */ - extern const struct pci_ecam_ops xgene_v2_pcie_ecam_ops; /* APM X-Gene PCIe v2.x */ - extern const struct pci_ecam_ops al_pcie_ops; /* Amazon Annapurna Labs PCIe */ -+extern const struct pci_ecam_ops tegra194_pcie_ops; /* Tegra194 PCIe */ - #endif - - #if IS_ENABLED(CONFIG_PCI_HOST_COMMON) --- -2.29.2 - diff --git a/SOURCES/0001-Vulcan-AHCI-PCI-bar-fix-for-Broadcom-Vulcan-early-si.patch b/SOURCES/0001-Vulcan-AHCI-PCI-bar-fix-for-Broadcom-Vulcan-early-si.patch deleted file mode 100644 index 7f24958..0000000 --- a/SOURCES/0001-Vulcan-AHCI-PCI-bar-fix-for-Broadcom-Vulcan-early-si.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Robert Richter -Date: Thu, 7 Jun 2018 22:59:32 -0400 -Subject: [PATCH] Vulcan: AHCI PCI bar fix for Broadcom Vulcan early silicon - -Message-id: <1528412373-19128-2-git-send-email-rrichter@redhat.com> -Patchwork-id: 220950 -O-Subject: [RHEL-8.0 BZ 1563590 v2 1/2] PCI: Vulcan: AHCI PCI bar fix for Broadcom Vulcan early silicon -Bugzilla: 1563590 -RH-Acked-by: Dean Nelson -RH-Acked-by: Mark Langsdorf -RH-Acked-by: Mark Salter - -From: Ashok Kumar Sekar - -PCI BAR 5 is not setup correctly for the on-board AHCI -controller on Broadcom's Vulcan processor. Added a quirk to fix BAR 5 -by using BAR 4's resources which are populated correctly but NOT used -by the AHCI controller actually. - -RHEL-only: - -Both patches are in RHEL-7.6 also. Inclusion of the patches into RHEL-8 -was discussed. Since there are partners with Ax system configurations it -was decided to carry them in RHEL8 too. See: - - https://bugzilla.redhat.com/show_bug.cgi?id=1563590#c1 - -Upstream Status: RHEL only -Signed-off-by: Ashok Kumar Sekar -Signed-off-by: Jayachandran C -Signed-off-by: Robert Richter -Signed-off-by: Herton R. Krzesinski ---- - drivers/pci/quirks.c | 24 ++++++++++++++++++++++++ - 1 file changed, 24 insertions(+) - -diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c -index bdf9b52567e0..1e98e20b7cc2 100644 ---- a/drivers/pci/quirks.c -+++ b/drivers/pci/quirks.c -@@ -4196,6 +4196,30 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9000, - DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9084, - quirk_bridge_cavm_thrx2_pcie_root); - -+/* -+ * PCI BAR 5 is not setup correctly for the on-board AHCI controller -+ * on Broadcom's Vulcan processor. Added a quirk to fix BAR 5 by -+ * using BAR 4's resources which are populated correctly and NOT -+ * actually used by the AHCI controller. -+ */ -+static void quirk_fix_vulcan_ahci_bars(struct pci_dev *dev) -+{ -+ struct resource *r = &dev->resource[4]; -+ -+ if (!(r->flags & IORESOURCE_MEM) || (r->start == 0)) -+ return; -+ -+ /* Set BAR5 resource to BAR4 */ -+ dev->resource[5] = *r; -+ -+ /* Update BAR5 in pci config space */ -+ pci_write_config_dword(dev, PCI_BASE_ADDRESS_5, r->start); -+ -+ /* Clear BAR4's resource */ -+ memset(r, 0, sizeof(*r)); -+} -+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9027, quirk_fix_vulcan_ahci_bars); -+ - /* - * Intersil/Techwell TW686[4589]-based video capture cards have an empty (zero) - * class code. Fix it. --- -2.28.0 - diff --git a/SOURCES/0001-Work-around-for-gcc-bug-https-gcc.gnu.org-bugzilla-s.patch b/SOURCES/0001-Work-around-for-gcc-bug-https-gcc.gnu.org-bugzilla-s.patch deleted file mode 100644 index 4c2b0a6..0000000 --- a/SOURCES/0001-Work-around-for-gcc-bug-https-gcc.gnu.org-bugzilla-s.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: "Justin M. Forbes" -Date: Thu, 30 Jul 2020 10:26:11 -0500 -Subject: [PATCH] Work around for gcc bug - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96377 - -Signed-off-by: Justin M. Forbes ---- - crypto/aegis128-neon-inner.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/crypto/aegis128-neon-inner.c b/crypto/aegis128-neon-inner.c -index 2a660ac1bc3a..fa87ff6a2a71 100644 ---- a/crypto/aegis128-neon-inner.c -+++ b/crypto/aegis128-neon-inner.c -@@ -148,8 +148,8 @@ void crypto_aegis128_init_neon(void *state, const void *key, const void *iv) - kiv, - vld1q_u8(const1), - vld1q_u8(const0), -- k ^ vld1q_u8(const0), -- k ^ vld1q_u8(const1), -+ (uint8x16_t) (k ^ vld1q_u8(const0)), -+ (uint8x16_t) (k ^ vld1q_u8(const1)), - }}; - int i; - --- -2.28.0 - diff --git a/SOURCES/0001-aarch64-acpi-scan-Fix-regression-related-to-X-Gene-U.patch b/SOURCES/0001-aarch64-acpi-scan-Fix-regression-related-to-X-Gene-U.patch deleted file mode 100644 index def3fd5..0000000 --- a/SOURCES/0001-aarch64-acpi-scan-Fix-regression-related-to-X-Gene-U.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Mark Salter -Date: Thu, 10 May 2018 17:38:44 -0400 -Subject: [PATCH] aarch64: acpi scan: Fix regression related to X-Gene UARTs - -Message-id: <20180510173844.29580-4-msalter@redhat.com> -Patchwork-id: 214381 -O-Subject: [RHEL-8 BZ1519554 3/3] aarch64: acpi scan: Fix regression related to X-Gene UARTs -Bugzilla: 1519554 -RH-Acked-by: Al Stone -RH-Acked-by: Tony Camuso - -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1519554 -Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16144520 - -Commit e361d1f85855 ("ACPI / scan: Fix enumeration for special UART -devices") caused a regression with some X-Gene based platforms (Mustang -and M400) with invalid DSDT. The DSDT makes it appear that the UART -device is also a slave device attached to itself. With the above commit -the UART won't be enumerated by ACPI scan (slave serial devices shouldn't -be). So check for X-Gene UART device and skip slace device check on it. - -Upstream Status: RHEL only -Signed-off-by: Mark Salter -Signed-off-by: Herton R. Krzesinski ---- - drivers/acpi/scan.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c -index 2142f1554761..f5fdf6f3650c 100644 ---- a/drivers/acpi/scan.c -+++ b/drivers/acpi/scan.c -@@ -1574,6 +1574,15 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device) - if (!acpi_match_device_ids(device, i2c_multi_instantiate_ids)) - return false; - -+ /* -+ * Firmware on some arm64 X-Gene platforms will make the UART -+ * device appear as both a UART and a slave of that UART. Just -+ * bail out here for X-Gene UARTs. -+ */ -+ if (IS_ENABLED(CONFIG_ARM64) && -+ !strcmp(acpi_device_hid(device), "APMC0D08")) -+ return false; -+ - INIT_LIST_HEAD(&resource_list); - acpi_dev_get_resources(device, &resource_list, - acpi_check_serial_bus_slave, --- -2.28.0 - diff --git a/SOURCES/0001-ahci-thunderx2-Fix-for-errata-that-affects-stop-engi.patch b/SOURCES/0001-ahci-thunderx2-Fix-for-errata-that-affects-stop-engi.patch deleted file mode 100644 index 4f00ab7..0000000 --- a/SOURCES/0001-ahci-thunderx2-Fix-for-errata-that-affects-stop-engi.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Robert Richter -Date: Thu, 7 Jun 2018 22:59:33 -0400 -Subject: [PATCH] ahci: thunderx2: Fix for errata that affects stop engine - -Message-id: <1528412373-19128-3-git-send-email-rrichter@redhat.com> -Patchwork-id: 220952 -O-Subject: [RHEL-8.0 BZ 1563590 v2 2/2] ahci: thunderx2: Fix for errata that affects stop engine -Bugzilla: 1563590 -RH-Acked-by: Dean Nelson -RH-Acked-by: Mark Langsdorf -RH-Acked-by: Mark Salter - -From: Jayachandran C - -Apply workaround for this errata: - Synopsis: Resetting PxCMD.ST may hang the SATA device - - Description: An internal ping-pong buffer state is not reset - correctly for an PxCMD.ST=0 command for a SATA channel. This - may cause the SATA interface to hang when a PxCMD.ST=0 command - is received. - - Workaround: A SATA_BIU_CORE_ENABLE.sw_init_bsi must be asserted - by the driver whenever the PxCMD.ST needs to be de-asserted. This - will reset both the ports. So, it may not always work in a 2 - channel SATA system. - - Resolution: Fix in B0. - -Add the code to ahci_stop_engine() to do this. It is not easy to -stop the other "port" since it is associated with a different AHCI -interface. Please note that with this fix, SATA reset does not -hang any more, but it can cause failures on the other interface -if that is in active use. - -Unfortunately, we have nothing other the the CPU ID to check if the -SATA block has this issue. - -RHEL-only: - -Both patches are in RHEL-7.6 also. Inclusion of the patches into RHEL-8 -was discussed. Since there are partners with Ax system configurations it -was decided to carry them in RHEL8 too. See: - - https://bugzilla.redhat.com/show_bug.cgi?id=1563590#c1 - -[v3 with new delays] -Signed-off-by: Jayachandran C - -Upstream Status: RHEL only -Signed-off-by: Robert Richter -Signed-off-by: Herton R. Krzesinski ---- - drivers/ata/libahci.c | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c -index ea5bf5f4cbed..71c55cae27ac 100644 ---- a/drivers/ata/libahci.c -+++ b/drivers/ata/libahci.c -@@ -666,6 +666,24 @@ int ahci_stop_engine(struct ata_port *ap) - tmp &= ~PORT_CMD_START; - writel(tmp, port_mmio + PORT_CMD); - -+#ifdef CONFIG_ARM64 -+ /* Rev Ax of Cavium CN99XX needs a hack for port stop */ -+ if (dev_is_pci(ap->host->dev) && -+ to_pci_dev(ap->host->dev)->vendor == 0x14e4 && -+ to_pci_dev(ap->host->dev)->device == 0x9027 && -+ midr_is_cpu_model_range(read_cpuid_id(), -+ MIDR_CPU_MODEL(ARM_CPU_IMP_BRCM, BRCM_CPU_PART_VULCAN), -+ MIDR_CPU_VAR_REV(0, 0), -+ MIDR_CPU_VAR_REV(0, MIDR_REVISION_MASK))) { -+ tmp = readl(hpriv->mmio + 0x8000); -+ udelay(100); -+ writel(tmp | (1 << 26), hpriv->mmio + 0x8000); -+ udelay(100); -+ writel(tmp & ~(1 << 26), hpriv->mmio + 0x8000); -+ dev_warn(ap->host->dev, "CN99XX SATA reset workaround applied\n"); -+ } -+#endif -+ - /* wait for engine to stop. This could be as long as 500 msec */ - tmp = ata_wait_register(ap, port_mmio + PORT_CMD, - PORT_CMD_LIST_ON, PORT_CMD_LIST_ON, 1, 500); --- -2.28.0 - diff --git a/SOURCES/0001-arm-aarch64-Drop-the-EXPERT-setting-from-ARM64_FORCE.patch b/SOURCES/0001-arm-aarch64-Drop-the-EXPERT-setting-from-ARM64_FORCE.patch deleted file mode 100644 index eb02c33..0000000 --- a/SOURCES/0001-arm-aarch64-Drop-the-EXPERT-setting-from-ARM64_FORCE.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jeremy Cline -Date: Tue, 1 Oct 2019 15:51:23 +0000 -Subject: [PATCH] arm: aarch64: Drop the EXPERT setting from ARM64_FORCE_52BIT - -Message-id: <20191001181256.22935-1-jcline@redhat.com> -Patchwork-id: 275498 -O-Subject: [ARK INTERNAL PATCH] [ARK INTERNAL PATCH] [redhat] Add patch - to drop the EXPERT setting from ARM64_FORCE_52BIT -Bugzilla: -RH-Acked-by: Laura Abbott - -We don't turn on EXPERT as there are few settings we actually want to -mess with. Remove the dependency for ARM64_FORCE_52BIT as we do want -that on in debug builds to help find 52-bit bugs. - -Upstream Status: RHEL only -Signed-off-by: Jeremy Cline ---- - arch/arm64/Kconfig | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig -index e11b4ea06127..74c5325108c0 100644 ---- a/arch/arm64/Kconfig -+++ b/arch/arm64/Kconfig -@@ -861,7 +861,7 @@ endchoice - - config ARM64_FORCE_52BIT - bool "Force 52-bit virtual addresses for userspace" -- depends on ARM64_VA_BITS_52 && EXPERT -+ depends on ARM64_VA_BITS_52 - help - For systems with 52-bit userspace VAs enabled, the kernel will attempt - to maintain compatibility with older software by providing 48-bit VAs --- -2.28.0 - diff --git a/SOURCES/0001-arm-make-CONFIG_HIGHPTE-optional-without-CONFIG_EXPE.patch b/SOURCES/0001-arm-make-CONFIG_HIGHPTE-optional-without-CONFIG_EXPE.patch deleted file mode 100644 index dba9aa7..0000000 --- a/SOURCES/0001-arm-make-CONFIG_HIGHPTE-optional-without-CONFIG_EXPE.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jon Masters -Date: Thu, 18 Jul 2019 15:47:26 -0400 -Subject: [PATCH] arm: make CONFIG_HIGHPTE optional without CONFIG_EXPERT - -We will use this to force CONFIG_HIGHPTE off on LPAE for now - -Signed-off-by: Jon Masters ---- - arch/arm/Kconfig | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index e00d94b16658..4db48405b23a 100644 ---- a/arch/arm/Kconfig -+++ b/arch/arm/Kconfig -@@ -1514,9 +1514,9 @@ config HIGHMEM - If unsure, say n. - - config HIGHPTE -- bool "Allocate 2nd-level pagetables from highmem" if EXPERT -+ bool "Allocate 2nd-level pagetables from highmem" - depends on HIGHMEM -- default y -+ default n - help - The VM uses one page of physical memory for each page table. - For systems with a lot of processes, this can use a lot of --- -2.28.0 - diff --git a/SOURCES/0001-brcm-rpi4-fix-usb-numeration.patch b/SOURCES/0001-brcm-rpi4-fix-usb-numeration.patch deleted file mode 100644 index 810d78d..0000000 --- a/SOURCES/0001-brcm-rpi4-fix-usb-numeration.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 6e318871fac5533bd4dd82677b08ba7be17df55b Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Tue, 12 Jan 2021 23:14:09 +0000 -Subject: [PATCH] brcm: rpi4: fix usb numeration - -Signed-off-by: Peter Robinson ---- - drivers/pci/controller/pcie-brcmstb.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c -index 9c3d2982248d..78ed98e9b099 100644 ---- a/drivers/pci/controller/pcie-brcmstb.c -+++ b/drivers/pci/controller/pcie-brcmstb.c -@@ -869,6 +869,7 @@ static int brcm_pcie_setup(struct brcm_pcie *pcie) - - /* Reset the bridge */ - pcie->bridge_sw_init_set(pcie, 1); -+ pcie->perst_set(pcie, 1); - usleep_range(100, 200); - - /* Take the bridge out of reset */ --- -2.29.2 - diff --git a/SOURCES/0001-drm-panel-add-Xingbangda-XBD599-panel.patch b/SOURCES/0001-drm-panel-add-Xingbangda-XBD599-panel.patch deleted file mode 100644 index 4225611..0000000 --- a/SOURCES/0001-drm-panel-add-Xingbangda-XBD599-panel.patch +++ /dev/null @@ -1,423 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Icenowy Zheng -Date: Mon, 16 Mar 2020 21:35:01 +0800 -Subject: [PATCH] drm: panel: add Xingbangda XBD599 panel - -Xingbangda XBD599 is a 5.99" 720x1440 MIPI-DSI IPS LCD panel made by -Xingbangda, which is used on PinePhone final assembled phones. - -Add support for it. - -Signed-off-by: Icenowy Zheng ---- - drivers/gpu/drm/panel/Kconfig | 9 + - drivers/gpu/drm/panel/Makefile | 1 + - .../gpu/drm/panel/panel-xingbangda-xbd599.c | 366 ++++++++++++++++++ - 3 files changed, 376 insertions(+) - create mode 100644 drivers/gpu/drm/panel/panel-xingbangda-xbd599.c - -diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig -index de2f2a452be5..3ce658de416b 100644 ---- a/drivers/gpu/drm/panel/Kconfig -+++ b/drivers/gpu/drm/panel/Kconfig -@@ -462,6 +462,15 @@ config DRM_PANEL_VISIONOX_RM69299 - Say Y here if you want to enable support for Visionox - RM69299 DSI Video Mode panel. - -+config DRM_PANEL_XINGBANGDA_XBD599 -+ tristate "Xingbangda XBD599 panel" -+ depends on OF -+ depends on DRM_MIPI_DSI -+ depends on BACKLIGHT_CLASS_DEVICE -+ help -+ Say Y here if you want to enable support for the Xingbangda XBD599 -+ MIPI DSI Video Mode panel. -+ - config DRM_PANEL_XINPENG_XPP055C272 - tristate "Xinpeng XPP055C272 panel driver" - depends on OF -diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile -index e45ceac6286f..bd10617430ec 100644 ---- a/drivers/gpu/drm/panel/Makefile -+++ b/drivers/gpu/drm/panel/Makefile -@@ -49,4 +49,5 @@ obj-$(CONFIG_DRM_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o - obj-$(CONFIG_DRM_PANEL_TPO_TPG110) += panel-tpo-tpg110.o - obj-$(CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA) += panel-truly-nt35597.o - obj-$(CONFIG_DRM_PANEL_VISIONOX_RM69299) += panel-visionox-rm69299.o -+obj-$(CONFIG_DRM_PANEL_XINGBANGDA_XBD599) += panel-xingbangda-xbd599.o - obj-$(CONFIG_DRM_PANEL_XINPENG_XPP055C272) += panel-xinpeng-xpp055c272.o -diff --git a/drivers/gpu/drm/panel/panel-xingbangda-xbd599.c b/drivers/gpu/drm/panel/panel-xingbangda-xbd599.c -new file mode 100644 -index 000000000000..b483f96ee1db ---- /dev/null -+++ b/drivers/gpu/drm/panel/panel-xingbangda-xbd599.c -@@ -0,0 +1,366 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Xingbangda XBD599 MIPI-DSI panel driver -+ * -+ * Copyright (C) 2019-2020 Icenowy Zheng -+ * -+ * Based on panel-rocktech-jh057n00900.c, which is: -+ * Copyright (C) Purism SPC 2019 -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+/* Manufacturer specific Commands send via DSI */ -+#define ST7703_CMD_ALL_PIXEL_OFF 0x22 -+#define ST7703_CMD_ALL_PIXEL_ON 0x23 -+#define ST7703_CMD_SETDISP 0xB2 -+#define ST7703_CMD_SETRGBIF 0xB3 -+#define ST7703_CMD_SETCYC 0xB4 -+#define ST7703_CMD_SETBGP 0xB5 -+#define ST7703_CMD_SETVCOM 0xB6 -+#define ST7703_CMD_SETOTP 0xB7 -+#define ST7703_CMD_SETPOWER_EXT 0xB8 -+#define ST7703_CMD_SETEXTC 0xB9 -+#define ST7703_CMD_SETMIPI 0xBA -+#define ST7703_CMD_SETVDC 0xBC -+#define ST7703_CMD_SETSCR 0xC0 -+#define ST7703_CMD_SETPOWER 0xC1 -+#define ST7703_CMD_UNK_C6 0xC6 -+#define ST7703_CMD_SETPANEL 0xCC -+#define ST7703_CMD_SETGAMMA 0xE0 -+#define ST7703_CMD_SETEQ 0xE3 -+#define ST7703_CMD_SETGIP1 0xE9 -+#define ST7703_CMD_SETGIP2 0xEA -+ -+static const char * const regulator_names[] = { -+ "iovcc", -+ "vcc", -+}; -+ -+struct xbd599 { -+ struct device *dev; -+ struct drm_panel panel; -+ struct gpio_desc *reset_gpio; -+ struct regulator_bulk_data supplies[ARRAY_SIZE(regulator_names)]; -+ bool prepared; -+}; -+ -+static inline struct xbd599 *panel_to_xbd599(struct drm_panel *panel) -+{ -+ return container_of(panel, struct xbd599, panel); -+} -+ -+#define dsi_dcs_write_seq(dsi, cmd, seq...) do { \ -+ static const u8 d[] = { seq }; \ -+ int ret; \ -+ ret = mipi_dsi_dcs_write(dsi, cmd, d, ARRAY_SIZE(d)); \ -+ if (ret < 0) \ -+ return ret; \ -+ } while (0) -+ -+static int xbd599_init_sequence(struct xbd599 *ctx) -+{ -+ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); -+ struct device *dev = ctx->dev; -+ int ret; -+ -+ /* -+ * Init sequence was supplied by the panel vendor. -+ */ -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETEXTC, -+ 0xF1, 0x12, 0x83); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, -+ 0x33, 0x81, 0x05, 0xF9, 0x0E, 0x0E, 0x20, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, -+ 0x00, 0x91, 0x0a, 0x00, 0x00, 0x02, 0x4F, 0x11, -+ 0x00, 0x00, 0x37); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, -+ 0x25, 0x22, 0x20, 0x03); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETRGBIF, -+ 0x10, 0x10, 0x05, 0x05, 0x03, 0xFF, 0x00, 0x00, -+ 0x00, 0x00); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETSCR, -+ 0x73, 0x73, 0x50, 0x50, 0x00, 0xC0, 0x08, 0x70, -+ 0x00); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETVDC, 0x4E); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0B); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETDISP, 0xF0, 0x12, 0xF0); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETEQ, -+ 0x00, 0x00, 0x0B, 0x0B, 0x10, 0x10, 0x00, 0x00, -+ 0x00, 0x00, 0xFF, 0x00, 0xC0, 0x10); -+ dsi_dcs_write_seq(dsi, 0xC6, 0x01, 0x00, 0xFF, 0xFF, 0x00); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER, -+ 0x74, 0x00, 0x32, 0x32, 0x77, 0xF1, 0xFF, 0xFF, -+ 0xCC, 0xCC, 0x77, 0x77); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x07, 0x07); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x2C, 0x2C); -+ dsi_dcs_write_seq(dsi, 0xBF, 0x02, 0x11, 0x00); -+ -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP1, -+ 0x82, 0x10, 0x06, 0x05, 0xA2, 0x0A, 0xA5, 0x12, -+ 0x31, 0x23, 0x37, 0x83, 0x04, 0xBC, 0x27, 0x38, -+ 0x0C, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x00, -+ 0x03, 0x00, 0x00, 0x00, 0x75, 0x75, 0x31, 0x88, -+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x13, 0x88, 0x64, -+ 0x64, 0x20, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, -+ 0x02, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP2, -+ 0x02, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x46, 0x02, 0x88, -+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x64, 0x88, 0x13, -+ 0x57, 0x13, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, -+ 0x75, 0x88, 0x23, 0x14, 0x00, 0x00, 0x02, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0A, -+ 0xA5, 0x00, 0x00, 0x00, 0x00); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGAMMA, -+ 0x00, 0x09, 0x0D, 0x23, 0x27, 0x3C, 0x41, 0x35, -+ 0x07, 0x0D, 0x0E, 0x12, 0x13, 0x10, 0x12, 0x12, -+ 0x18, 0x00, 0x09, 0x0D, 0x23, 0x27, 0x3C, 0x41, -+ 0x35, 0x07, 0x0D, 0x0E, 0x12, 0x13, 0x10, 0x12, -+ 0x12, 0x18); -+ msleep(20); -+ -+ ret = mipi_dsi_dcs_exit_sleep_mode(dsi); -+ if (ret < 0) { -+ DRM_DEV_ERROR(dev, "Failed to exit sleep mode\n"); -+ return ret; -+ } -+ msleep(250); -+ -+ ret = mipi_dsi_dcs_set_display_on(dsi); -+ if (ret) -+ return ret; -+ msleep(50); -+ -+ DRM_DEV_DEBUG_DRIVER(dev, "Panel init sequence done\n"); -+ return 0; -+} -+ -+static int xbd599_prepare(struct drm_panel *panel) -+{ -+ struct xbd599 *ctx = panel_to_xbd599(panel); -+ int ret; -+ -+ if (ctx->prepared) -+ return 0; -+ -+ ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies); -+ if (ret) -+ return ret; -+ -+ DRM_DEV_DEBUG_DRIVER(ctx->dev, "Resetting the panel\n"); -+ gpiod_set_value_cansleep(ctx->reset_gpio, 1); -+ usleep_range(20, 40); -+ gpiod_set_value_cansleep(ctx->reset_gpio, 0); -+ msleep(20); -+ -+ ctx->prepared = true; -+ -+ return 0; -+} -+ -+static int xbd599_enable(struct drm_panel *panel) -+{ -+ struct xbd599 *ctx = panel_to_xbd599(panel); -+ int ret; -+ -+ ret = xbd599_init_sequence(ctx); -+ if (ret < 0) { -+ DRM_DEV_ERROR(ctx->dev, "Panel init sequence failed: %d\n", -+ ret); -+ return ret; -+ } -+ -+ return 0; -+} -+ -+static int xbd599_disable(struct drm_panel *panel) -+{ -+ struct xbd599 *ctx = panel_to_xbd599(panel); -+ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); -+ -+ return mipi_dsi_dcs_set_display_off(dsi); -+} -+ -+static int xbd599_unprepare(struct drm_panel *panel) -+{ -+ struct xbd599 *ctx = panel_to_xbd599(panel); -+ -+ if (!ctx->prepared) -+ return 0; -+ -+ gpiod_set_value_cansleep(ctx->reset_gpio, 1); -+ regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); -+ ctx->prepared = false; -+ -+ return 0; -+} -+ -+static const struct drm_display_mode xbd599_default_mode = { -+ .hdisplay = 720, -+ .hsync_start = 720 + 40, -+ .hsync_end = 720 + 40 + 40, -+ .htotal = 720 + 40 + 40 + 40, -+ .vdisplay = 1440, -+ .vsync_start = 1440 + 18, -+ .vsync_end = 1440 + 18 + 10, -+ .vtotal = 1440 + 18 + 10 + 17, -+ .vrefresh = 60, -+ .clock = 69000, -+ .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, -+ -+ .width_mm = 68, -+ .height_mm = 136, -+ .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, -+}; -+ -+static int xbd599_get_modes(struct drm_panel *panel, -+ struct drm_connector *connector) -+{ -+ struct xbd599 *ctx = panel_to_xbd599(panel); -+ struct drm_display_mode *mode; -+ -+ mode = drm_mode_duplicate(connector->dev, &xbd599_default_mode); -+ if (!mode) { -+ DRM_DEV_ERROR(ctx->dev, "Failed to add mode\n"); -+ return -ENOMEM; -+ } -+ -+ drm_mode_set_name(mode); -+ -+ mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; -+ connector->display_info.width_mm = mode->width_mm; -+ connector->display_info.height_mm = mode->height_mm; -+ drm_mode_probed_add(connector, mode); -+ -+ return 1; -+} -+ -+static const struct drm_panel_funcs xbd599_drm_funcs = { -+ .prepare = xbd599_prepare, -+ .enable = xbd599_enable, -+ .disable = xbd599_disable, -+ .unprepare = xbd599_unprepare, -+ .get_modes = xbd599_get_modes, -+}; -+ -+static int xbd599_probe(struct mipi_dsi_device *dsi) -+{ -+ struct device *dev = &dsi->dev; -+ struct xbd599 *ctx; -+ int i, ret; -+ -+ ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); -+ if (!ctx) -+ return -ENOMEM; -+ -+ for (i = 0; i < ARRAY_SIZE(ctx->supplies); i++) -+ ctx->supplies[i].supply = regulator_names[i]; -+ -+ ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), -+ ctx->supplies); -+ if (ret < 0) { -+ DRM_DEV_ERROR(&dsi->dev, "cannot get regulators\n"); -+ return ret; -+ } -+ -+ ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); -+ if (IS_ERR(ctx->reset_gpio)) { -+ DRM_DEV_ERROR(dev, "cannot get reset gpio\n"); -+ return PTR_ERR(ctx->reset_gpio); -+ } -+ -+ mipi_dsi_set_drvdata(dsi, ctx); -+ -+ ctx->dev = dev; -+ -+ dsi->lanes = 4; -+ dsi->format = MIPI_DSI_FMT_RGB888; -+ dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE; -+ -+ drm_panel_init(&ctx->panel, &dsi->dev, &xbd599_drm_funcs, -+ DRM_MODE_CONNECTOR_DSI); -+ -+ ret = drm_panel_of_backlight(&ctx->panel); -+ if (ret) -+ return ret; -+ -+ drm_panel_add(&ctx->panel); -+ -+ ret = mipi_dsi_attach(dsi); -+ if (ret < 0) { -+ DRM_DEV_ERROR(dev, "mipi_dsi_attach failed. Is host ready?\n"); -+ drm_panel_remove(&ctx->panel); -+ return ret; -+ } -+ -+ DRM_DEV_INFO(dev, "%ux%u@%u %ubpp dsi %udl - ready\n", -+ xbd599_default_mode.hdisplay, -+ xbd599_default_mode.vdisplay, -+ xbd599_default_mode.vrefresh, -+ mipi_dsi_pixel_format_to_bpp(dsi->format), dsi->lanes); -+ -+ return 0; -+} -+ -+static void xbd599_shutdown(struct mipi_dsi_device *dsi) -+{ -+ struct xbd599 *ctx = mipi_dsi_get_drvdata(dsi); -+ int ret; -+ -+ ret = drm_panel_unprepare(&ctx->panel); -+ if (ret < 0) -+ DRM_DEV_ERROR(&dsi->dev, "Failed to unprepare panel: %d\n", -+ ret); -+} -+ -+static int xbd599_remove(struct mipi_dsi_device *dsi) -+{ -+ struct xbd599 *ctx = mipi_dsi_get_drvdata(dsi); -+ int ret; -+ -+ xbd599_shutdown(dsi); -+ -+ ret = mipi_dsi_detach(dsi); -+ if (ret < 0) -+ DRM_DEV_ERROR(&dsi->dev, "Failed to detach from DSI host: %d\n", -+ ret); -+ -+ drm_panel_remove(&ctx->panel); -+ -+ return 0; -+} -+ -+static const struct of_device_id xbd599_of_match[] = { -+ { .compatible = "xingbangda,xbd599", }, -+ { /* sentinel */ } -+}; -+MODULE_DEVICE_TABLE(of, xbd599_of_match); -+ -+static struct mipi_dsi_driver xbd599_driver = { -+ .probe = xbd599_probe, -+ .remove = xbd599_remove, -+ .shutdown = xbd599_shutdown, -+ .driver = { -+ .name = "panel-xingbangda-xbd599", -+ .of_match_table = xbd599_of_match, -+ }, -+}; -+module_mipi_dsi_driver(xbd599_driver); -+ -+MODULE_AUTHOR("Icenowy Zheng "); -+MODULE_DESCRIPTION("DRM driver for Xingbangda XBD599 MIPI DSI panel"); -+MODULE_LICENSE("GPL v2"); --- -2.28.0 - diff --git a/SOURCES/0001-drm-sun4i-sun6i_mipi_dsi-fix-horizontal-timing-calcu.patch b/SOURCES/0001-drm-sun4i-sun6i_mipi_dsi-fix-horizontal-timing-calcu.patch deleted file mode 100644 index 6a0e428..0000000 --- a/SOURCES/0001-drm-sun4i-sun6i_mipi_dsi-fix-horizontal-timing-calcu.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Icenowy Zheng -Date: Mon, 16 Mar 2020 21:35:02 +0800 -Subject: [PATCH] drm/sun4i: sun6i_mipi_dsi: fix horizontal timing calculation - -The max() function call in horizontal timing calculation shouldn't pad a -length already subtracted with overhead to overhead, instead it should -only prevent the set timing to underflow. - -Signed-off-by: Icenowy Zheng ---- - drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c -index aa67cb037e9d..52e009dc632b 100644 ---- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c -+++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c -@@ -556,7 +556,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, - */ - #define HSA_PACKET_OVERHEAD 10 - hsa = max((unsigned int)HSA_PACKET_OVERHEAD, -- (mode->hsync_end - mode->hsync_start) * Bpp - HSA_PACKET_OVERHEAD); -+ (mode->hsync_end - mode->hsync_start) * Bpp) - HSA_PACKET_OVERHEAD; - - /* - * The backporch is set using a blanking packet (4 -@@ -565,7 +565,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, - */ - #define HBP_PACKET_OVERHEAD 6 - hbp = max((unsigned int)HBP_PACKET_OVERHEAD, -- (mode->htotal - mode->hsync_end) * Bpp - HBP_PACKET_OVERHEAD); -+ (mode->htotal - mode->hsync_end) * Bpp) - HBP_PACKET_OVERHEAD; - - /* - * The frontporch is set using a sync event (4 bytes) -@@ -575,7 +575,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, - */ - #define HFP_PACKET_OVERHEAD 16 - hfp = max((unsigned int)HFP_PACKET_OVERHEAD, -- (mode->hsync_start - mode->hdisplay) * Bpp - HFP_PACKET_OVERHEAD); -+ (mode->hsync_start - mode->hdisplay) * Bpp) - HFP_PACKET_OVERHEAD; - - /* - * The blanking is set using a sync event (4 bytes) -@@ -584,8 +584,8 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, - */ - #define HBLK_PACKET_OVERHEAD 10 - hblk = max((unsigned int)HBLK_PACKET_OVERHEAD, -- (mode->htotal - (mode->hsync_end - mode->hsync_start)) * Bpp - -- HBLK_PACKET_OVERHEAD); -+ (mode->htotal - (mode->hsync_end - mode->hsync_start)) * Bpp) - -+ HBLK_PACKET_OVERHEAD; - - /* - * And I'm not entirely sure what vblk is about. The driver in --- -2.28.0 - diff --git a/SOURCES/0001-dt-bindings-panel-add-binding-for-Xingbangda-XBD599-.patch b/SOURCES/0001-dt-bindings-panel-add-binding-for-Xingbangda-XBD599-.patch deleted file mode 100644 index 75162e0..0000000 --- a/SOURCES/0001-dt-bindings-panel-add-binding-for-Xingbangda-XBD599-.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Icenowy Zheng -Date: Mon, 16 Mar 2020 21:35:00 +0800 -Subject: [PATCH] dt-bindings: panel: add binding for Xingbangda XBD599 panel - -Xingbangda XBD599 is a 5.99" 720x1440 MIPI-DSI LCD panel. - -Add its device tree binding. - -Signed-off-by: Icenowy Zheng ---- - .../display/panel/xingbangda,xbd599.yaml | 50 +++++++++++++++++++ - 1 file changed, 50 insertions(+) - create mode 100644 Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml - -diff --git a/Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml b/Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml -new file mode 100644 -index 000000000000..b27bcf11198f ---- /dev/null -+++ b/Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml -@@ -0,0 +1,50 @@ -+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) -+%YAML 1.2 -+--- -+$id: http://devicetree.org/schemas/display/panel/xingbangda,xbd599.yaml# -+$schema: http://devicetree.org/meta-schemas/core.yaml# -+ -+title: Xingbangda XBD599 5.99in MIPI-DSI LCD panel -+ -+maintainers: -+ - Icenowy Zheng -+ -+allOf: -+ - $ref: panel-common.yaml# -+ -+properties: -+ compatible: -+ const: xingbangda,xbd599 -+ reg: true -+ backlight: true -+ reset-gpios: true -+ vcc-supply: -+ description: regulator that supplies the VCC voltage -+ iovcc-supply: -+ description: regulator that supplies the IOVCC voltage -+ -+required: -+ - compatible -+ - reg -+ - backlight -+ - vcc-supply -+ - iovcc-supply -+ -+additionalProperties: false -+ -+examples: -+ - | -+ dsi { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ panel@0 { -+ compatible = "xingbangda,xbd599"; -+ reg = <0>; -+ backlight = <&backlight>; -+ iovcc-supply = <®_dldo2>; -+ vcc-supply = <®_ldo_io0>; -+ }; -+ }; -+ -+... --- -2.28.0 - diff --git a/SOURCES/0001-efi-Add-an-EFI_SECURE_BOOT-flag-to-indicate-secure-b.patch b/SOURCES/0001-efi-Add-an-EFI_SECURE_BOOT-flag-to-indicate-secure-b.patch deleted file mode 100644 index c3e0650..0000000 --- a/SOURCES/0001-efi-Add-an-EFI_SECURE_BOOT-flag-to-indicate-secure-b.patch +++ /dev/null @@ -1,161 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: David Howells -Date: Tue, 27 Feb 2018 10:04:55 +0000 -Subject: [PATCH] efi: Add an EFI_SECURE_BOOT flag to indicate secure boot mode - -UEFI machines can be booted in Secure Boot mode. Add an EFI_SECURE_BOOT -flag that can be passed to efi_enabled() to find out whether secure boot is -enabled. - -Move the switch-statement in x86's setup_arch() that inteprets the -secure_boot boot parameter to generic code and set the bit there. - -Upstream Status: RHEL only -Suggested-by: Ard Biesheuvel -Signed-off-by: David Howells -Reviewed-by: Ard Biesheuvel -cc: linux-efi@vger.kernel.org -[Rebased for context; efi_is_table_address was moved to arch/x86] -Signed-off-by: Jeremy Cline ---- - arch/x86/kernel/setup.c | 14 +----------- - drivers/firmware/efi/Makefile | 1 + - drivers/firmware/efi/secureboot.c | 38 +++++++++++++++++++++++++++++++ - include/linux/efi.h | 18 ++++++++++----- - 4 files changed, 52 insertions(+), 19 deletions(-) - create mode 100644 drivers/firmware/efi/secureboot.c - -diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c -index 112efbef3414..c9de4b36ca51 100644 ---- a/arch/x86/kernel/setup.c -+++ b/arch/x86/kernel/setup.c -@@ -1255,19 +1255,7 @@ void __init setup_arch(char **cmdline_p) - /* Allocate bigger log buffer */ - setup_log_buf(1); - -- if (efi_enabled(EFI_BOOT)) { -- switch (boot_params.secure_boot) { -- case efi_secureboot_mode_disabled: -- pr_info("Secure boot disabled\n"); -- break; -- case efi_secureboot_mode_enabled: -- pr_info("Secure boot enabled\n"); -- break; -- default: -- pr_info("Secure boot could not be determined\n"); -- break; -- } -- } -+ efi_set_secure_boot(boot_params.secure_boot); - - reserve_initrd(); - -diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile -index 7a216984552b..f0ef02d733af 100644 ---- a/drivers/firmware/efi/Makefile -+++ b/drivers/firmware/efi/Makefile -@@ -25,6 +25,7 @@ obj-$(CONFIG_EFI_FAKE_MEMMAP) += fake_map.o - obj-$(CONFIG_EFI_BOOTLOADER_CONTROL) += efibc.o - obj-$(CONFIG_EFI_TEST) += test/ - obj-$(CONFIG_EFI_DEV_PATH_PARSER) += dev-path-parser.o -+obj-$(CONFIG_EFI) += secureboot.o - obj-$(CONFIG_APPLE_PROPERTIES) += apple-properties.o - obj-$(CONFIG_EFI_RCI2_TABLE) += rci2-table.o - obj-$(CONFIG_EFI_EMBEDDED_FIRMWARE) += embedded-firmware.o -diff --git a/drivers/firmware/efi/secureboot.c b/drivers/firmware/efi/secureboot.c -new file mode 100644 -index 000000000000..de0a3714a5d4 ---- /dev/null -+++ b/drivers/firmware/efi/secureboot.c -@@ -0,0 +1,38 @@ -+/* Core kernel secure boot support. -+ * -+ * Copyright (C) 2017 Red Hat, Inc. All Rights Reserved. -+ * Written by David Howells (dhowells@redhat.com) -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public Licence -+ * as published by the Free Software Foundation; either version -+ * 2 of the Licence, or (at your option) any later version. -+ */ -+ -+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt -+ -+#include -+#include -+#include -+ -+/* -+ * Decide what to do when UEFI secure boot mode is enabled. -+ */ -+void __init efi_set_secure_boot(enum efi_secureboot_mode mode) -+{ -+ if (efi_enabled(EFI_BOOT)) { -+ switch (mode) { -+ case efi_secureboot_mode_disabled: -+ pr_info("Secure boot disabled\n"); -+ break; -+ case efi_secureboot_mode_enabled: -+ set_bit(EFI_SECURE_BOOT, &efi.flags); -+ pr_info("Secure boot enabled\n"); -+ break; -+ default: -+ pr_warn("Secure boot could not be determined (mode %u)\n", -+ mode); -+ break; -+ } -+ } -+} -diff --git a/include/linux/efi.h b/include/linux/efi.h -index 92aa4697f558..1cdc5d8b6ac3 100644 ---- a/include/linux/efi.h -+++ b/include/linux/efi.h -@@ -785,6 +785,14 @@ extern int __init efi_setup_pcdp_console(char *); - #define EFI_MEM_ATTR 10 /* Did firmware publish an EFI_MEMORY_ATTRIBUTES table? */ - #define EFI_MEM_NO_SOFT_RESERVE 11 /* Is the kernel configured to ignore soft reservations? */ - #define EFI_PRESERVE_BS_REGIONS 12 /* Are EFI boot-services memory segments available? */ -+#define EFI_SECURE_BOOT 13 /* Are we in Secure Boot mode? */ -+ -+enum efi_secureboot_mode { -+ efi_secureboot_mode_unset, -+ efi_secureboot_mode_unknown, -+ efi_secureboot_mode_disabled, -+ efi_secureboot_mode_enabled, -+}; - - #ifdef CONFIG_EFI - /* -@@ -796,6 +804,8 @@ static inline bool efi_enabled(int feature) - } - extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused); - -+extern void __init efi_set_secure_boot(enum efi_secureboot_mode mode); -+ - bool __pure __efi_soft_reserve_enabled(void); - - static inline bool __pure efi_soft_reserve_enabled(void) -@@ -822,6 +832,8 @@ efi_capsule_pending(int *reset_type) - return false; - } - -+static inline void efi_set_secure_boot(enum efi_secureboot_mode mode) {} -+ - static inline bool efi_soft_reserve_enabled(void) - { - return false; -@@ -1094,12 +1106,6 @@ static inline bool efi_runtime_disabled(void) { return true; } - extern void efi_call_virt_check_flags(unsigned long flags, const char *call); - extern unsigned long efi_call_virt_save_flags(void); - --enum efi_secureboot_mode { -- efi_secureboot_mode_unset, -- efi_secureboot_mode_unknown, -- efi_secureboot_mode_disabled, -- efi_secureboot_mode_enabled, --}; - enum efi_secureboot_mode efi_get_secureboot(void); - - #ifdef CONFIG_RESET_ATTACK_MITIGATION --- -2.28.0 - diff --git a/SOURCES/0001-efi-Lock-down-the-kernel-if-booted-in-secure-boot-mo.patch b/SOURCES/0001-efi-Lock-down-the-kernel-if-booted-in-secure-boot-mo.patch deleted file mode 100644 index 0a3099d..0000000 --- a/SOURCES/0001-efi-Lock-down-the-kernel-if-booted-in-secure-boot-mo.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: David Howells -Date: Mon, 30 Sep 2019 21:28:16 +0000 -Subject: [PATCH] efi: Lock down the kernel if booted in secure boot mode - -UEFI Secure Boot provides a mechanism for ensuring that the firmware -will only load signed bootloaders and kernels. Certain use cases may -also require that all kernel modules also be signed. Add a -configuration option that to lock down the kernel - which includes -requiring validly signed modules - if the kernel is secure-booted. - -Upstream Status: RHEL only -Signed-off-by: David Howells -Signed-off-by: Jeremy Cline ---- - arch/x86/kernel/setup.c | 8 ++++++++ - security/lockdown/Kconfig | 13 +++++++++++++ - 2 files changed, 21 insertions(+) - -diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c -index c9de4b36ca51..a1a012702915 100644 ---- a/arch/x86/kernel/setup.c -+++ b/arch/x86/kernel/setup.c -@@ -18,6 +18,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -1104,6 +1105,13 @@ void __init setup_arch(char **cmdline_p) - if (efi_enabled(EFI_BOOT)) - efi_init(); - -+ efi_set_secure_boot(boot_params.secure_boot); -+ -+#ifdef CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT -+ if (efi_enabled(EFI_SECURE_BOOT)) -+ security_lock_kernel_down("EFI Secure Boot mode", LOCKDOWN_INTEGRITY_MAX); -+#endif -+ - dmi_setup(); - - /* -diff --git a/security/lockdown/Kconfig b/security/lockdown/Kconfig -index e84ddf484010..d0501353a4b9 100644 ---- a/security/lockdown/Kconfig -+++ b/security/lockdown/Kconfig -@@ -16,6 +16,19 @@ config SECURITY_LOCKDOWN_LSM_EARLY - subsystem is fully initialised. If enabled, lockdown will - unconditionally be called before any other LSMs. - -+config LOCK_DOWN_IN_EFI_SECURE_BOOT -+ bool "Lock down the kernel in EFI Secure Boot mode" -+ default n -+ depends on EFI && SECURITY_LOCKDOWN_LSM_EARLY -+ help -+ UEFI Secure Boot provides a mechanism for ensuring that the firmware -+ will only load signed bootloaders and kernels. Secure boot mode may -+ be determined from EFI variables provided by the system firmware if -+ not indicated by the boot parameters. -+ -+ Enabling this option results in kernel lockdown being triggered if -+ EFI Secure Boot is set. -+ - choice - prompt "Kernel default lockdown mode" - default LOCK_DOWN_KERNEL_FORCE_NONE --- -2.28.0 - diff --git a/SOURCES/0001-iommu-arm-smmu-workaround-DMA-mode-issues.patch b/SOURCES/0001-iommu-arm-smmu-workaround-DMA-mode-issues.patch deleted file mode 100644 index 743be19..0000000 --- a/SOURCES/0001-iommu-arm-smmu-workaround-DMA-mode-issues.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Laura Abbott -Date: Mon, 20 May 2019 22:21:02 -0400 -Subject: [PATCH] iommu/arm-smmu: workaround DMA mode issues - -Message-id: <20190520222102.19488-1-labbott@redhat.com> -Patchwork-id: 259215 -O-Subject: [ARK INTERNAL PATCH] iommu/arm-smmu: workaround DMA mode issues -Bugzilla: -RH-Acked-by: Mark Langsdorf -RH-Acked-by: Mark Salter - -From: Mark Salter - -Rebased for v5.2-rc1 - - Bugzilla: 1652259 - Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=19244562 - Upstream status: RHEL only. - - rhel8 commit 65feb1ed0ec9a088a63a90d46c0f7563ac96ad0f - Author: Mark Salter - Date: Wed Nov 21 17:15:59 2018 +0100 - - [iommu] iommu/arm-smmu: workaround DMA mode issues - - Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1624077 - Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=18112820 - Testing: Verified iommu.passthrough=1 no longer needed on gigabyte platforms. - Upstream Status: RHEL-only - - In RHEL_ALT 7.5 we carried a RHEL-only patch which forced the arm smmuv2 - into bypass mode due to performance issues on CN88xx. This was intended - to be a temporary hack until the issues were resolved. Another vendor - had issues with the iommu in bypass mode so we reverted the RHEL-only - patch so that iommu is in DMA mode by default (upstream default). - - It turns on that there are remaining SMMU DMA mode issues on Gigabyte - platformws with CN88xx cpus. The problem manifests itself by pcie - card drivers failing to initialize the cards when SMMU is in DMA mode. - The root cause has not been determined yet, but looks likely to be - a hw or firmware issue. This patch forces bypass mode for Gigabyte - platforms. CN88xx isn't officially supported in RHEL but we have a - lot of them being used internally for testing, so I think we want - this to support that use case in RHEL8. - - Signed-off-by: Mark Salter - Signed-off-by: Herton R. Krzesinski - - Acked-by: Mark Salter - Acked-by: Donald Dutile - -Upstream Status: RHEL only -Signed-off-by: Laura Abbott ---- - drivers/iommu/iommu.c | 22 ++++++++++++++++++++++ - 1 file changed, 22 insertions(+) - -diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c -index 609bd25bf154..c701912b13ab 100644 ---- a/drivers/iommu/iommu.c -+++ b/drivers/iommu/iommu.c -@@ -7,6 +7,7 @@ - #define pr_fmt(fmt) "iommu: " fmt - - #include -+#include - #include - #include - #include -@@ -2849,3 +2850,24 @@ int iommu_sva_get_pasid(struct iommu_sva *handle) - return ops->sva_get_pasid(handle); - } - EXPORT_SYMBOL_GPL(iommu_sva_get_pasid); -+ -+#ifdef CONFIG_ARM64 -+static int __init iommu_quirks(void) -+{ -+ const char *vendor, *name; -+ -+ vendor = dmi_get_system_info(DMI_SYS_VENDOR); -+ name = dmi_get_system_info(DMI_PRODUCT_NAME); -+ -+ if (vendor && -+ (strncmp(vendor, "GIGABYTE", 8) == 0 && name && -+ (strncmp(name, "R120", 4) == 0 || -+ strncmp(name, "R270", 4) == 0))) { -+ pr_warn("Gigabyte %s detected, force iommu passthrough mode", name); -+ iommu_def_domain_type = IOMMU_DOMAIN_IDENTITY; -+ } -+ -+ return 0; -+} -+arch_initcall(iommu_quirks); -+#endif --- -2.28.0 - diff --git a/SOURCES/0001-ipmi-do-not-configure-ipmi-for-HPE-m400.patch b/SOURCES/0001-ipmi-do-not-configure-ipmi-for-HPE-m400.patch deleted file mode 100644 index 9322807..0000000 --- a/SOURCES/0001-ipmi-do-not-configure-ipmi-for-HPE-m400.patch +++ /dev/null @@ -1,123 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Laura Abbott -Date: Sun, 10 Feb 2019 01:27:54 +0000 -Subject: [PATCH] ipmi: do not configure ipmi for HPE m400 - -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1670017 -Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=20147017 - -Commit 913a89f009d9 ("ipmi: Don't initialize anything in the core until -something uses it") added new locking which broke context. - - Message-id: <20180713142210.15700-1-tcamuso@redhat.com> - Patchwork-id: 224899 - O-Subject: [RHEL8 BZ 1583537 1/1] ipmi: do not configure ipmi for HPE m400 - Bugzilla: 1583537 - RH-Acked-by: Dean Nelson - RH-Acked-by: Al Stone - RH-Acked-by: Mark Salter - - bugzilla:https://bugzilla.redhat.com/show_bug.cgi?id=1583537 - brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=17150528 - - RHEL-only - - The ARM-based HPE m400 reports host-side ipmi as residing in intel - port-io space, which does not exist in ARM processors. Therefore, when - running on an m400, host-side ipmi configuration code must simply return - zero without trying to configure the host-side ipmi. - - This patch prevents panic on boot by averting attempts to configure - host-side ipmi on this platform. - - Though HPE m400 is not certified with RHEL, and HPE has relegated it to - EOL status, the platform is still used extensively in ARM development - and test for RHEL. - - Testing: - Boot without blacklisting ipmi and check to see that no ipmi modules - are loaded. - - Signed-off-by: Tony Camuso - - cc: Prarit Bhargava - cc: Brendan Conoboy - cc: Jeff Bastian - cc: Scott Herold - Signed-off-by: Herton R. Krzesinski - -Upstream Status: RHEL only -Signed-off-by: Laura Abbott -Acked-by: Tony Camuso -Acked-by: Dean Nelson -Acked-by: Jarod Wilson -Acked-by: Mark Salter ---- - drivers/char/ipmi/ipmi_dmi.c | 15 +++++++++++++++ - drivers/char/ipmi/ipmi_msghandler.c | 16 +++++++++++++++- - 2 files changed, 30 insertions(+), 1 deletion(-) - -diff --git a/drivers/char/ipmi/ipmi_dmi.c b/drivers/char/ipmi/ipmi_dmi.c -index bbf7029e224b..cf7faa970dd6 100644 ---- a/drivers/char/ipmi/ipmi_dmi.c -+++ b/drivers/char/ipmi/ipmi_dmi.c -@@ -215,6 +215,21 @@ static int __init scan_for_dmi_ipmi(void) - { - const struct dmi_device *dev = NULL; - -+#ifdef CONFIG_ARM64 -+ /* RHEL-only -+ * If this is ARM-based HPE m400, return now, because that platform -+ * reports the host-side ipmi address as intel port-io space, which -+ * does not exist in the ARM architecture. -+ */ -+ const char *dmistr = dmi_get_system_info(DMI_PRODUCT_NAME); -+ -+ if (dmistr && (strcmp("ProLiant m400 Server", dmistr) == 0)) { -+ pr_debug("%s does not support host ipmi\n", dmistr); -+ return 0; -+ } -+ /* END RHEL-only */ -+#endif -+ - while ((dev = dmi_find_device(DMI_DEV_TYPE_IPMI, NULL, dev))) - dmi_decode_ipmi((const struct dmi_header *) dev->device_data); - -diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c -index 737c0b6b24ea..7901e780323b 100644 ---- a/drivers/char/ipmi/ipmi_msghandler.c -+++ b/drivers/char/ipmi/ipmi_msghandler.c -@@ -34,6 +34,7 @@ - #include - #include - #include -+#include - - #define IPMI_DRIVER_VERSION "39.2" - -@@ -5153,8 +5154,21 @@ static int __init ipmi_init_msghandler_mod(void) - { - int rv; - -- pr_info("version " IPMI_DRIVER_VERSION "\n"); -+#ifdef CONFIG_ARM64 -+ /* RHEL-only -+ * If this is ARM-based HPE m400, return now, because that platform -+ * reports the host-side ipmi address as intel port-io space, which -+ * does not exist in the ARM architecture. -+ */ -+ const char *dmistr = dmi_get_system_info(DMI_PRODUCT_NAME); - -+ if (dmistr && (strcmp("ProLiant m400 Server", dmistr) == 0)) { -+ pr_debug("%s does not support host ipmi\n", dmistr); -+ return -ENOSYS; -+ } -+ /* END RHEL-only */ -+#endif -+ pr_info("version " IPMI_DRIVER_VERSION "\n"); - mutex_lock(&ipmi_interfaces_mutex); - rv = ipmi_register_driver(); - mutex_unlock(&ipmi_interfaces_mutex); --- -2.28.0 - diff --git a/SOURCES/0001-kdump-add-support-for-crashkernel-auto.patch b/SOURCES/0001-kdump-add-support-for-crashkernel-auto.patch deleted file mode 100644 index 8bb55fd..0000000 --- a/SOURCES/0001-kdump-add-support-for-crashkernel-auto.patch +++ /dev/null @@ -1,189 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jeremy Cline -Date: Tue, 23 Jul 2019 15:24:30 +0000 -Subject: [PATCH] kdump: add support for crashkernel=auto - -Rebased for v5.3-rc1 because the documentation has moved. - - Message-id: <20180604013831.574215750@redhat.com> - Patchwork-id: 8166 - O-Subject: [kernel team] [PATCH RHEL8.0 V2 2/2] kdump: add support for crashkernel=auto - Bugzilla: 1507353 - RH-Acked-by: Don Zickus - RH-Acked-by: Baoquan He - RH-Acked-by: Pingfan Liu - - Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1507353 - Build: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16534135 - Tested: ppc64le, x86_64 with several memory sizes. - kdump qe tested 160M on various x86 machines in lab. - - We continue to provide crashkernel=auto like we did in RHEL6 - and RHEL7, this will simplify the kdump deployment for common - use cases that kdump just works with the auto reserved values. - But this is still a best effort estimation, we can not know the - exact memory requirement because it depends on a lot of different - factors. - - The implementation of crashkernel=auto is simplified as a wrapper - to use below kernel cmdline: - x86_64: crashkernel=1G-64G:160M,64G-1T:256M,1T-:512M - s390x: crashkernel=4G-64G:160M,64G-1T:256M,1T-:512M - arm64: crashkernel=2G-:512M - ppc64: crashkernel=2G-4G:384M,4G-16G:512M,16G-64G:1G,64G-128G:2G,128G-:4G - - The difference between this way and the old implementation in - RHEL6/7 is we do not scale the crash reserved memory size according - to system memory size anymore. - - Latest effort to move upstream is below thread: - https://lkml.org/lkml/2018/5/20/262 - But unfortunately it is still unlikely to be accepted, thus we - will still use a RHEL only patch in RHEL8. - - Copied old patch description about the history reason see below: - ''' - Non-upstream explanations: - Besides "crashkenrel=X@Y" format, upstream also has advanced - "crashkernel=range1:size1[,range2:size2,...][@offset]", and - "crashkernel=X,high{low}" formats, but they need more careful - manual configuration, and have different values for different - architectures. - - Most of the distributions use the standard "crashkernel=X@Y" - upstream format, and use crashkernel range format for advanced - scenarios, heavily relying on the user's involvement. - - While "crashkernel=auto" is redhat's special feature, it exists - and has been used as the default boot cmdline since 2008 rhel6. - It does not require users to figure out how many crash memory - size for their systems, also has been proved to be able to work - pretty well for common scenarios. - - "crashkernel=auto" was tested/based on rhel-related products, as - we have stable kernel configurations which means more or less - stable memory consumption. In 2014 we tried to post them again to - upstream but NACKed by people because they think it's not general - and unnecessary, users can specify their own values or do that by - scripts. However our customers insist on having it added to rhel. - - Also see one previous discussion related to this backport to Pegas: - On 10/17/2016 at 10:15 PM, Don Zickus wrote: - > On Fri, Oct 14, 2016 at 10:57:41AM +0800, Dave Young wrote: - >> Don, agree with you we should evaluate them instead of just inherit - >> them blindly. Below is what I think about kdump auto memory: - >> There are two issues for crashkernel=auto in upstream: - >> 1) It will be seen as a policy which should not go to kernel - >> 2) It is hard to get a good number for the crash reserved size, - >> considering various different kernel config options one can setups. - >> In RHEL we are easier because our supported Kconfig is limited. - >> I digged the upstream mail archive, but I'm not sure I got all the - >> information, at least Michael Ellerman was objecting the series for - >> 1). - > Yes, I know. Vivek and I have argued about this for years. :-) - > - > I had hoped all the changes internally to the makedumpfile would allow - > the memory configuration to stabilize at a number like 192M or 128M and - > only in the rare cases extend beyond that. - > - > So I always treated that as a temporary hack until things were better. - > With the hope of every new RHEL release we get smarter and better. :-) - > Ideally it would be great if we could get the number down to 64M for most - > cases and just turn it on in Fedora. Maybe someday.... ;-) - > - > We can have this conversation when the patch gets reposted/refreshed - > for upstream on rhkl? - > - > Cheers, - > Don - - We had proposed to drop the historic crashkernel=auto code and move - to use crashkernel=range:size format and pass them in anaconda. - - The initial reason is crashkernel=range:size works just fine because - we do not need complex algorithm to scale crashkernel reserved size - any more. The old linear scaling is mainly for old makedumpfile - requirements, now it is not necessary. - - But With the new approach, backward compatibility is potentially at risk. - For e.g. let's consider the following cases: - 1) When we upgrade from an older distribution like rhel-alt-7.4(which - uses crashkernel=auto) to rhel-alt-7.5 (which uses the crashkernel=xY - format) - In this case we can use anaconda scripts for checking - 'crashkernel=auto' in kernel spec and update to the new - 'crashkernel=range:size' format. - 2) When we upgrade from rhel-alt-7.5(which uses crashkernel=xY format) - to rhel-alt-7.6(which uses crashkernel=xY format), but the x and/or Y - values are changed in rhel-alt-7.6. - For example from crashkernel=2G-:160M to crashkernel=2G-:192M, then we have - no way to determine if the X and/or Y values were distribution - provided or user specified ones. - Since it is recommended to give precedence to user-specified values, - so we cannot do an upgrade in such a case." - - Thus turn back to resolve it in kernel, and add a simpler version - which just hacks to use the range:size style in code, and make - rhel-only code easily to maintain. - ''' - - Signed-off-by: Dave Young - Signed-off-by: Herton R. Krzesinski - -Upstream Status: RHEL only -Signed-off-by: Jeremy Cline ---- - Documentation/admin-guide/kdump/kdump.rst | 11 +++++++++++ - kernel/crash_core.c | 14 ++++++++++++++ - 2 files changed, 25 insertions(+) - -diff --git a/Documentation/admin-guide/kdump/kdump.rst b/Documentation/admin-guide/kdump/kdump.rst -index 2da65fef2a1c..d53a524f80f0 100644 ---- a/Documentation/admin-guide/kdump/kdump.rst -+++ b/Documentation/admin-guide/kdump/kdump.rst -@@ -285,6 +285,17 @@ This would mean: - 2) if the RAM size is between 512M and 2G (exclusive), then reserve 64M - 3) if the RAM size is larger than 2G, then reserve 128M - -+Or you can use crashkernel=auto if you have enough memory. The threshold -+is 2G on x86_64, arm64, ppc64 and ppc64le. The threshold is 4G for s390x. -+If your system memory is less than the threshold crashkernel=auto will not -+reserve memory. -+ -+The automatically reserved memory size varies based on architecture. -+The size changes according to system memory size like below: -+ x86_64: 1G-64G:160M,64G-1T:256M,1T-:512M -+ s390x: 4G-64G:160M,64G-1T:256M,1T-:512M -+ arm64: 2G-:512M -+ ppc64: 2G-4G:384M,4G-16G:512M,16G-64G:1G,64G-128G:2G,128G-:4G - - - Boot into System Kernel -diff --git a/kernel/crash_core.c b/kernel/crash_core.c -index e4dfe2a05a31..8c6f59932247 100644 ---- a/kernel/crash_core.c -+++ b/kernel/crash_core.c -@@ -258,6 +258,20 @@ static int __init __parse_crashkernel(char *cmdline, - if (suffix) - return parse_crashkernel_suffix(ck_cmdline, crash_size, - suffix); -+ -+ if (strncmp(ck_cmdline, "auto", 4) == 0) { -+#ifdef CONFIG_X86_64 -+ ck_cmdline = "1G-64G:160M,64G-1T:256M,1T-:512M"; -+#elif defined(CONFIG_S390) -+ ck_cmdline = "4G-64G:160M,64G-1T:256M,1T-:512M"; -+#elif defined(CONFIG_ARM64) -+ ck_cmdline = "2G-:512M"; -+#elif defined(CONFIG_PPC64) -+ ck_cmdline = "2G-4G:384M,4G-16G:512M,16G-64G:1G,64G-128G:2G,128G-:4G"; -+#endif -+ pr_info("Using crashkernel=auto, the size choosed is a best effort estimation.\n"); -+ } -+ - /* - * if the commandline contains a ':', then that's the extended - * syntax -- if not, it must be the classic syntax --- -2.28.0 - diff --git a/SOURCES/0001-kdump-fix-a-grammar-issue-in-a-kernel-message.patch b/SOURCES/0001-kdump-fix-a-grammar-issue-in-a-kernel-message.patch deleted file mode 100644 index 78f3721..0000000 --- a/SOURCES/0001-kdump-fix-a-grammar-issue-in-a-kernel-message.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Dave Young -Date: Tue, 12 Jun 2018 00:54:22 -0400 -Subject: [PATCH] kdump: fix a grammar issue in a kernel message - -Message-id: <20180612005422.GA2568@dhcp-128-65.nay.redhat.com> -Patchwork-id: 8201 -O-Subject: [kernel team] [RHEL8.0 PATCH V2] kdump: fix a grammar issue in a kernel message -Bugzilla: 1507353 -RH-Acked-by: Myron Stowe -RH-Acked-by: Laszlo Ersek -RH-Acked-by: Jiri Benc - -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1507353 -Upstream Status: RHEL-only as crashkernel=auto is not accepted in upstream -Build: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16661950 -Test: verified on a kvm guest - -s/choosed/chosen - -Upstream Status: RHEL only -Signed-off-by: Dave Young -Signed-off-by: Herton R. Krzesinski ---- - kernel/crash_core.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/kernel/crash_core.c b/kernel/crash_core.c -index 8c6f59932247..598d8324f51a 100644 ---- a/kernel/crash_core.c -+++ b/kernel/crash_core.c -@@ -269,7 +269,7 @@ static int __init __parse_crashkernel(char *cmdline, - #elif defined(CONFIG_PPC64) - ck_cmdline = "2G-4G:384M,4G-16G:512M,16G-64G:1G,64G-128G:2G,128G-:4G"; - #endif -- pr_info("Using crashkernel=auto, the size choosed is a best effort estimation.\n"); -+ pr_info("Using crashkernel=auto, the size chosen is a best effort estimation.\n"); - } - - /* --- -2.28.0 - diff --git a/SOURCES/0001-kdump-round-up-the-total-memory-size-to-128M-for-cra.patch b/SOURCES/0001-kdump-round-up-the-total-memory-size-to-128M-for-cra.patch deleted file mode 100644 index 6e32c19..0000000 --- a/SOURCES/0001-kdump-round-up-the-total-memory-size-to-128M-for-cra.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Dave Young -Date: Mon, 4 Jun 2018 01:38:25 -0400 -Subject: [PATCH] kdump: round up the total memory size to 128M for crashkernel - reservation - -Message-id: <20180604013831.523644967@redhat.com> -Patchwork-id: 8165 -O-Subject: [kernel team] [PATCH RHEL8.0 V2 1/2] kdump: round up the total memory size to 128M for crashkernel reservation -Bugzilla: 1507353 -RH-Acked-by: Don Zickus -RH-Acked-by: Baoquan He -RH-Acked-by: Pingfan Liu - -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1507353 -Build: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16534135 -Tested: ppc64le, x86_64 with several memory sizes. - -The total memory size we get in kernel is usually slightly less than 2G with -2G memory module machine. The main reason is bios/firmware reserve some area -it will not export all memory as usable to Linux. - -2G memory X86 kvm guest test result of the total_mem value: -UEFI boot with ovmf: 0x7ef10000 -Legacy boot kvm guest: 0x7ff7cc00 -This is also a problem on arm64 UEFI booted system according to my test. - -Thus for example crashkernel=1G-2G:128M, if we have a 1G memory -machine, we get total size 1023M from firmware then it will not fall -into 1G-2G thus no memory reserved. User will never know that, it is -hard to let user to know the exact total value we get in kernel - -An option is to use dmi/smbios to get physical memory size, but it's not -reliable as well. According to Prarit hardware vendors sometimes screw this up. -Thus round up total size to 128M to workaround this problem. - -Posted below patch in upstream, but no response yet: -http://lists.infradead.org/pipermail/kexec/2018-April/020568.html - -Upstream Status: RHEL only -Signed-off-by: Dave Young -Signed-off-by: Herton R. Krzesinski ---- - kernel/crash_core.c | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -diff --git a/kernel/crash_core.c b/kernel/crash_core.c -index 18175687133a..e4dfe2a05a31 100644 ---- a/kernel/crash_core.c -+++ b/kernel/crash_core.c -@@ -7,6 +7,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -39,6 +40,15 @@ static int __init parse_crashkernel_mem(char *cmdline, - unsigned long long *crash_base) - { - char *cur = cmdline, *tmp; -+ unsigned long long total_mem = system_ram; -+ -+ /* -+ * Firmware sometimes reserves some memory regions for it's own use. -+ * so we get less than actual system memory size. -+ * Workaround this by round up the total size to 128M which is -+ * enough for most test cases. -+ */ -+ total_mem = roundup(total_mem, SZ_128M); - - /* for each entry of the comma-separated list */ - do { -@@ -83,13 +93,13 @@ static int __init parse_crashkernel_mem(char *cmdline, - return -EINVAL; - } - cur = tmp; -- if (size >= system_ram) { -+ if (size >= total_mem) { - pr_warn("crashkernel: invalid size\n"); - return -EINVAL; - } - - /* match ? */ -- if (system_ram >= start && system_ram < end) { -+ if (total_mem >= start && total_mem < end) { - *crash_size = size; - break; - } --- -2.28.0 - diff --git a/SOURCES/0001-mm-kmemleak-skip-late_init-if-not-skip-disable.patch b/SOURCES/0001-mm-kmemleak-skip-late_init-if-not-skip-disable.patch deleted file mode 100644 index a8bf98d..0000000 --- a/SOURCES/0001-mm-kmemleak-skip-late_init-if-not-skip-disable.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Murphy Zhou -Date: Sun, 29 Sep 2019 17:56:59 +0800 -Subject: [PATCH] mm/kmemleak: skip late_init if not skip disable - -Now if DEFAULT_OFF set to y, kmemleak_init will start the cleanup_work -workqueue. Then late_init call will set kmemleak_initialized to 1, the -cleaup workqueue will try to do cleanup, triggering: - -[24.738773] ================================================================== -[24.742784] BUG: KASAN: global-out-of-bounds in __kmemleak_do_cleanup+0x166/0x180 -[24.744144] Key type ._fscrypt registered -[24.745680] Read of size 8 at addr ffffffff88746c90 by task kworker/3:1/171 -[24.745687] -[24.745697] CPU: 3 PID: 171 Comm: kworker/3:1 Not tainted 5.3.0-v5.3-12475-gcbafe18 #1 -[24.745701] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 -[24.745710] Workqueue: events kmemleak_do_cleanup -[24.745717] Call Trace: -[24.745736] dump_stack+0x7c/0xc0 -[24.745755] print_address_description.constprop.4+0x1f/0x300 -[24.751562] Key type .fscrypt registered -[24.754370] __kasan_report.cold.8+0x76/0xb2 -[24.754388] ? __kmemleak_do_cleanup+0x166/0x180 -[24.754407] kasan_report+0xe/0x20 -[24.778543] __kmemleak_do_cleanup+0x166/0x180 -[24.780795] process_one_work+0x919/0x17d0 -[24.782929] ? pwq_dec_nr_in_flight+0x320/0x320 -[24.785092] worker_thread+0x87/0xb40 -[24.786948] ? __kthread_parkme+0xc3/0x190 -[24.789217] ? process_one_work+0x17d0/0x17d0 -[24.791414] kthread+0x333/0x3f0 -[24.793031] ? kthread_create_worker_on_cpu+0xc0/0xc0 -[24.795473] ret_from_fork+0x3a/0x50 -[24.797303] -[24.798091] The buggy address belongs to the variable: -[24.800634] mem_pool_free_count+0x10/0x40 -[24.802656] -[24.803434] Memory state around the buggy address: -[24.805793] ffffffff88746b80: 04 fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 -[24.809177] ffffffff88746c00: 00 fa fa fa fa fa fa fa 00 00 fa fa fa fa fa fa -[24.812407] >ffffffff88746c80: 04 fa fa fa fa fa fa fa 00 00 fa fa fa fa fa fa -[24.815638] ^ -[24.817372] ffffffff88746d00: 00 00 fa fa fa fa fa fa 00 00 00 00 00 00 00 00 -[24.820740] ffffffff88746d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -[24.824021] ================================================================== - -Fixes: c5665868183f ("mm: kmemleak: use the memory pool for early allocations") -Signed-off-by: Murphy Zhou ---- - mm/kmemleak.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/mm/kmemleak.c b/mm/kmemleak.c -index e362dc3d2028..0c3dfb8eef67 100644 ---- a/mm/kmemleak.c -+++ b/mm/kmemleak.c -@@ -1958,6 +1958,11 @@ void __init kmemleak_init(void) - */ - static int __init kmemleak_late_init(void) - { -+ if (!kmemleak_skip_disable) { -+ kmemleak_disable(); -+ return 0; -+ } -+ - kmemleak_initialized = 1; - - debugfs_create_file("kmemleak", 0644, NULL, NULL, &kmemleak_fops); --- -2.28.0 - diff --git a/SOURCES/0001-s390-Lock-down-the-kernel-when-the-IPL-secure-flag-i.patch b/SOURCES/0001-s390-Lock-down-the-kernel-when-the-IPL-secure-flag-i.patch deleted file mode 100644 index 6613f6a..0000000 --- a/SOURCES/0001-s390-Lock-down-the-kernel-when-the-IPL-secure-flag-i.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jeremy Cline -Date: Wed, 30 Oct 2019 14:37:49 +0000 -Subject: [PATCH] s390: Lock down the kernel when the IPL secure flag is set - -Automatically lock down the kernel to LOCKDOWN_CONFIDENTIALITY_MAX if -the IPL secure flag is set. - -Upstream Status: RHEL only -Suggested-by: Philipp Rudo -Signed-off-by: Jeremy Cline ---- - arch/s390/include/asm/ipl.h | 1 + - arch/s390/kernel/ipl.c | 5 +++++ - arch/s390/kernel/setup.c | 4 ++++ - 3 files changed, 10 insertions(+) - -diff --git a/arch/s390/include/asm/ipl.h b/arch/s390/include/asm/ipl.h -index 7d5cfdda5277..be66ee5d0437 100644 ---- a/arch/s390/include/asm/ipl.h -+++ b/arch/s390/include/asm/ipl.h -@@ -120,6 +120,7 @@ int ipl_report_add_component(struct ipl_report *report, struct kexec_buf *kbuf, - unsigned char flags, unsigned short cert); - int ipl_report_add_certificate(struct ipl_report *report, void *key, - unsigned long addr, unsigned long len); -+bool ipl_get_secureboot(void); - - /* - * DIAG 308 support -diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c -index 90a2a17239b0..be3b72c53656 100644 ---- a/arch/s390/kernel/ipl.c -+++ b/arch/s390/kernel/ipl.c -@@ -2110,3 +2110,8 @@ int ipl_report_free(struct ipl_report *report) - } - - #endif -+ -+bool ipl_get_secureboot(void) -+{ -+ return !!ipl_secure_flag; -+} -diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c -index e600f6953d7c..4264e01824b3 100644 ---- a/arch/s390/kernel/setup.c -+++ b/arch/s390/kernel/setup.c -@@ -49,6 +49,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -1085,6 +1086,9 @@ void __init setup_arch(char **cmdline_p) - - log_component_list(); - -+ if (ipl_get_secureboot()) -+ security_lock_kernel_down("Secure IPL mode", LOCKDOWN_INTEGRITY_MAX); -+ - /* Have one command line that is parsed and saved in /proc/cmdline */ - /* boot_command_line has been already set up in early.c */ - *cmdline_p = boot_command_line; --- -2.28.0 - diff --git a/SOURCES/0001-scsi-smartpqi-add-inspur-advantech-ids.patch b/SOURCES/0001-scsi-smartpqi-add-inspur-advantech-ids.patch deleted file mode 100644 index e04ebca..0000000 --- a/SOURCES/0001-scsi-smartpqi-add-inspur-advantech-ids.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Don Brace -Date: Mon, 16 Jul 2018 19:20:41 -0400 -Subject: [PATCH] scsi: smartpqi: add inspur advantech ids - -Message-id: <1531768843-2544-4-git-send-email-dbrace@redhat.com> -Patchwork-id: 224988 -O-Subject: [RHEL 8.0 e-stor V2 PATCH 3/5] scsi: smartpqi: add inspur advantech ids -Bugzilla: 1503736 -RH-Acked-by: Ewan Milne -RH-Acked-by: Tomas Henzl - -From: Kevin Barnett - -Add support for these new device IDs: - - Advantech MIC-8312BridgeB - INSPUR PM8204-2GB - INSPUR PM8204-4GB - INSPUR PM8222-SHBA - -Upstream Status: RHEL only -Reviewed-by: Scott Benesh -Signed-off-by: Kevin Barnett -Signed-off-by: Don Brace -Signed-off-by: Martin K. Petersen -(cherry picked from commit 9f8d05fa98442de78d1ab30235b0cc656ed7aff0) -Signed-off-by: Don Brace -Signed-off-by: Herton R. Krzesinski ---- - drivers/scsi/smartpqi/smartpqi_init.c | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c -index bd38c8cea56e..477eb841d4e5 100644 ---- a/drivers/scsi/smartpqi/smartpqi_init.c -+++ b/drivers/scsi/smartpqi/smartpqi_init.c -@@ -8251,6 +8251,18 @@ static const struct pci_device_id pqi_pci_id_table[] = { - PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, - 0x19e5, 0xd22c) - }, -+ { -+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, -+ 0x1bd4, 0x004a) -+ }, -+ { -+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, -+ 0x1bd4, 0x004b) -+ }, -+ { -+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, -+ 0x1bd4, 0x004c) -+ }, - { - PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, - PCI_VENDOR_ID_ADAPTEC2, 0x0110) -@@ -8387,6 +8399,10 @@ static const struct pci_device_id pqi_pci_id_table[] = { - PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, - PCI_VENDOR_ID_ADVANTECH, 0x8312) - }, -+ { -+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, -+ PCI_VENDOR_ID_ADVANTECH, 0x8312) -+ }, - { - PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, - PCI_VENDOR_ID_DELL, 0x1fe0) --- -2.28.0 - diff --git a/SOURCES/0001-security-lockdown-expose-a-hook-to-lock-the-kernel-d.patch b/SOURCES/0001-security-lockdown-expose-a-hook-to-lock-the-kernel-d.patch deleted file mode 100644 index 856055e..0000000 --- a/SOURCES/0001-security-lockdown-expose-a-hook-to-lock-the-kernel-d.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jeremy Cline -Date: Mon, 30 Sep 2019 21:22:47 +0000 -Subject: [PATCH] security: lockdown: expose a hook to lock the kernel down - -In order to automatically lock down kernels running on UEFI machines -booted in Secure Boot mode, expose the lock_kernel_down() hook. - -Upstream Status: RHEL only -Signed-off-by: Jeremy Cline ---- - include/linux/lsm_hook_defs.h | 2 ++ - include/linux/lsm_hooks.h | 6 ++++++ - include/linux/security.h | 5 +++++ - security/lockdown/lockdown.c | 1 + - security/security.c | 6 ++++++ - 5 files changed, 20 insertions(+) - -diff --git a/include/linux/lsm_hook_defs.h b/include/linux/lsm_hook_defs.h -index 2a8c74d99015..0d3129588b78 100644 ---- a/include/linux/lsm_hook_defs.h -+++ b/include/linux/lsm_hook_defs.h -@@ -383,6 +383,8 @@ LSM_HOOK(void, LSM_RET_VOID, bpf_prog_free_security, struct bpf_prog_aux *aux) - #endif /* CONFIG_BPF_SYSCALL */ - - LSM_HOOK(int, 0, locked_down, enum lockdown_reason what) -+LSM_HOOK(int, 0, lock_kernel_down, const char *where, enum lockdown_reason level) -+ - - #ifdef CONFIG_PERF_EVENTS - LSM_HOOK(int, 0, perf_event_open, struct perf_event_attr *attr, int type) -diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h -index 9e2e3e63719d..317660f68b4f 100644 ---- a/include/linux/lsm_hooks.h -+++ b/include/linux/lsm_hooks.h -@@ -1507,6 +1507,12 @@ - * - * @what: kernel feature being accessed - * -+ * @lock_kernel_down -+ * Put the kernel into lock-down mode. -+ * -+ * @where: Where the lock-down is originating from (e.g. command line option) -+ * @level: The lock-down level (can only increase) -+ * - * Security hooks for perf events - * - * @perf_event_open: -diff --git a/include/linux/security.h b/include/linux/security.h -index 0a0a03b36a3b..26869f44416b 100644 ---- a/include/linux/security.h -+++ b/include/linux/security.h -@@ -451,6 +451,7 @@ int security_inode_notifysecctx(struct inode *inode, void *ctx, u32 ctxlen); - int security_inode_setsecctx(struct dentry *dentry, void *ctx, u32 ctxlen); - int security_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen); - int security_locked_down(enum lockdown_reason what); -+int security_lock_kernel_down(const char *where, enum lockdown_reason level); - #else /* CONFIG_SECURITY */ - - static inline int call_blocking_lsm_notifier(enum lsm_event event, void *data) -@@ -1291,6 +1292,10 @@ static inline int security_locked_down(enum lockdown_reason what) - { - return 0; - } -+static inline int security_lock_kernel_down(const char *where, enum lockdown_reason level) -+{ -+ return 0; -+} - #endif /* CONFIG_SECURITY */ - - #if defined(CONFIG_SECURITY) && defined(CONFIG_WATCH_QUEUE) -diff --git a/security/lockdown/lockdown.c b/security/lockdown/lockdown.c -index 87cbdc64d272..18555cf18da7 100644 ---- a/security/lockdown/lockdown.c -+++ b/security/lockdown/lockdown.c -@@ -73,6 +73,7 @@ static int lockdown_is_locked_down(enum lockdown_reason what) - - static struct security_hook_list lockdown_hooks[] __lsm_ro_after_init = { - LSM_HOOK_INIT(locked_down, lockdown_is_locked_down), -+ LSM_HOOK_INIT(lock_kernel_down, lock_kernel_down), - }; - - static int __init lockdown_lsm_init(void) -diff --git a/security/security.c b/security/security.c -index 70a7ad357bc6..23e16e773bc2 100644 ---- a/security/security.c -+++ b/security/security.c -@@ -2516,6 +2516,12 @@ int security_locked_down(enum lockdown_reason what) - } - EXPORT_SYMBOL(security_locked_down); - -+int security_lock_kernel_down(const char *where, enum lockdown_reason level) -+{ -+ return call_int_hook(lock_kernel_down, 0, where, level); -+} -+EXPORT_SYMBOL(security_lock_kernel_down); -+ - #ifdef CONFIG_PERF_EVENTS - int security_perf_event_open(struct perf_event_attr *attr, int type) - { --- -2.28.0 - diff --git a/SOURCES/0001-update-phy-on-pine64-a64-devices.patch b/SOURCES/0001-update-phy-on-pine64-a64-devices.patch deleted file mode 100644 index e3da87c..0000000 --- a/SOURCES/0001-update-phy-on-pine64-a64-devices.patch +++ /dev/null @@ -1,26 +0,0 @@ -From bb421e23b49e39c117a31f7c07df83cddd0d96dc Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Mon, 26 Oct 2020 17:01:57 +0000 -Subject: [PATCH 1/2] update phy on pine64 a64 devices - ---- - arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 2 +- - arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts -index 2165f238af13..9741fb5caa6f 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts -@@ -81,7 +81,7 @@ &ehci1 { - &emac { - pinctrl-names = "default"; - pinctrl-0 = <&rmii_pins>; -- phy-mode = "rmii"; -+ phy-mode = "rmii-txid"; - phy-handle = <&ext_rmii_phy1>; - phy-supply = <®_dc1sw>; - status = "okay"; --- -2.28.0 - diff --git a/SOURCES/Makefile.rhelver b/SOURCES/Makefile.rhelver new file mode 100644 index 0000000..f74bfc4 --- /dev/null +++ b/SOURCES/Makefile.rhelver @@ -0,0 +1,45 @@ +RHEL_MAJOR = 8 +RHEL_MINOR = 99 + +# +# RHEL_RELEASE +# ------------- +# +# Represents build number in 'release' part of RPM's name-version-release. +# name is , e.g. kernel +# version is upstream kernel version this kernel is based on, e.g. 4.18.0 +# release is .[], e.g. 100.el8 +# +# Use this spot to avoid future merge conflicts. +# Do not trim this comment. +RHEL_RELEASE = 9 + +# +# Early y+1 numbering +# -------------------- +# +# In early y+1 process, RHEL_RELEASE consists of 2 numbers: x.y +# First is RHEL_RELEASE inherited/merged from y as-is, second number +# is incremented with each build starting from 1. After merge from y, +# it resets back to 1. This way y+1 nvr reflects status of last merge. +# +# Example: +# +# rhel8.0 rhel-8.1 +# kernel-4.18.0-58.el8 --> kernel-4.18.0-58.1.el8 +# kernel-4.18.0-58.2.el8 +# kernel-4.18.0-59.el8 kernel-4.18.0-59.1.el8 +# kernel-4.18.0-60.el8 +# kernel-4.18.0-61.el8 --> kernel-4.18.0-61.1.el8 +# +# +# Use this spot to avoid future merge conflicts. +# Do not trim this comment. +EARLY_YSTREAM ?= no +EARLY_YBUILD:= +EARLY_YRELEASE:= +ifneq ("$(ZSTREAM)", "yes") + ifeq ("$(EARLY_YSTREAM)","yes") + RHEL_RELEASE:=$(RHEL_RELEASE).$(EARLY_YRELEASE) + endif +endif diff --git a/SOURCES/Patchlist.changelog b/SOURCES/Patchlist.changelog new file mode 100644 index 0000000..93ec6d1 --- /dev/null +++ b/SOURCES/Patchlist.changelog @@ -0,0 +1,156 @@ +https://gitlab.com/cki-project/kernel-ark/-/commit/58465cf2c68ab118fb14070d90d2c72c15709e50 + 58465cf2c68ab118fb14070d90d2c72c15709e50 mmc: sdhci-iproc: Add ACPI bindings for the rpi + +https://gitlab.com/cki-project/kernel-ark/-/commit/0ed90b02259e5e6a4d6d1ef4618ea2938a5383ed + 0ed90b02259e5e6a4d6d1ef4618ea2938a5383ed ACPI: platform: Hide ACPI_PLATFORM_PROFILE option + +https://gitlab.com/cki-project/kernel-ark/-/commit/8fabe1899259fce8bec528e7c36b22867e84f547 + 8fabe1899259fce8bec528e7c36b22867e84f547 platform/x86: ideapad-laptop: DYTC Platform profile support + +https://gitlab.com/cki-project/kernel-ark/-/commit/bd0cb76666c540268fda8911799069d85cc8b6fa + bd0cb76666c540268fda8911799069d85cc8b6fa platform/x86: thinkpad_acpi: Replace ifdef CONFIG_ACPI_PLATFORM_PROFILE with depends on + +https://gitlab.com/cki-project/kernel-ark/-/commit/d4def5bc5c57ea761797ced20d50e9322a4b0597 + d4def5bc5c57ea761797ced20d50e9322a4b0597 platform/x86: thinkpad_acpi: Add platform profile support + +https://gitlab.com/cki-project/kernel-ark/-/commit/e9bdc7e8eecf0a07ca166a3c7e619ce98e14d786 + e9bdc7e8eecf0a07ca166a3c7e619ce98e14d786 platform/x86: thinkpad_acpi: fixed warning and incorporated review comments + +https://gitlab.com/cki-project/kernel-ark/-/commit/0ac5c5db661092df3444a98526c9fee2e58e5697 + 0ac5c5db661092df3444a98526c9fee2e58e5697 platform/x86: thinkpad_acpi: Don't register keyboard_lang unnecessarily + +https://gitlab.com/cki-project/kernel-ark/-/commit/9dbc769d65b3540573c34fa822c31f0b668095d1 + 9dbc769d65b3540573c34fa822c31f0b668095d1 platform/x86: thinkpad_acpi: set keyboard language + +https://gitlab.com/cki-project/kernel-ark/-/commit/d4e0484e1a9651d54ad67e4bbdab97697d2265c5 + d4e0484e1a9651d54ad67e4bbdab97697d2265c5 ACPI: platform-profile: Fix possible deadlock in platform_profile_remove() + +https://gitlab.com/cki-project/kernel-ark/-/commit/feb7c6157833a89e6d3ab1c730f272c5d8e744de + feb7c6157833a89e6d3ab1c730f272c5d8e744de ACPI: platform-profile: Introduce object pointers to callbacks + +https://gitlab.com/cki-project/kernel-ark/-/commit/912d1c4c2dd3618d75e4f58508bb2453a9619dfa + 912d1c4c2dd3618d75e4f58508bb2453a9619dfa ACPI: platform-profile: Drop const qualifier for cur_profile + +https://gitlab.com/cki-project/kernel-ark/-/commit/8debbcb68fe7e68b93d7b213c143d77df7d400eb + 8debbcb68fe7e68b93d7b213c143d77df7d400eb ACPI: platform: Add platform profile support + +https://gitlab.com/cki-project/kernel-ark/-/commit/0a97b0469ac6126fb9a58cfc25f15c57fa4a6405 + 0a97b0469ac6126fb9a58cfc25f15c57fa4a6405 Documentation: Add documentation for new platform_profile sysfs attribute + +https://gitlab.com/cki-project/kernel-ark/-/commit/8c183d2a65857c77f4cf84cc9821b9b8cc45cfd7 + 8c183d2a65857c77f4cf84cc9821b9b8cc45cfd7 PCI: Add MCFG quirks for Tegra194 host controllers + +https://gitlab.com/cki-project/kernel-ark/-/commit/89525aa6ba3154ad25b133ed683c7701d915a464 + 89525aa6ba3154ad25b133ed683c7701d915a464 Revert "PCI: Add MCFG quirks for Tegra194 host controllers" + +https://gitlab.com/cki-project/kernel-ark/-/commit/6f4d37a3597e3ab80a62a6ab62883151d256de40 + 6f4d37a3597e3ab80a62a6ab62883151d256de40 arm64: dts: rockchip: disable USB type-c DisplayPort + +https://gitlab.com/cki-project/kernel-ark/-/commit/2e70d4b9f02113eaa2d4435f6532922e6484762f + 2e70d4b9f02113eaa2d4435f6532922e6484762f PCI: Add MCFG quirks for Tegra194 host controllers + +https://gitlab.com/cki-project/kernel-ark/-/commit/70615d7e6a262babe4367446e8e2ac398924b014 + 70615d7e6a262babe4367446e8e2ac398924b014 brcm: rpi4: fix usb numeration + +https://gitlab.com/cki-project/kernel-ark/-/commit/371887659b615d8d586eec7f3abe5ac02cb7b9e8 + 371887659b615d8d586eec7f3abe5ac02cb7b9e8 drm/i915/gt: Correct surface base address for renderclear + +https://gitlab.com/cki-project/kernel-ark/-/commit/904e376792c00bfd12e5843e1f7bc3f181561dd9 + 904e376792c00bfd12e5843e1f7bc3f181561dd9 drm/i915/gt: Flush before changing register state + +https://gitlab.com/cki-project/kernel-ark/-/commit/40f01725589329b66717e54b052f3460050c76dd + 40f01725589329b66717e54b052f3460050c76dd drm/i915/gt: One more flush for Baytrail clear residuals + +https://gitlab.com/cki-project/kernel-ark/-/commit/4c24519305eb3cb3eb471582e5c89fa40edf3ea0 + 4c24519305eb3cb3eb471582e5c89fa40edf3ea0 Bluetooth: btusb: Some Qualcomm Bluetooth adapters stop working + +https://gitlab.com/cki-project/kernel-ark/-/commit/0e8e061312fb6d6dd01edea28b852bd652797246 + 0e8e061312fb6d6dd01edea28b852bd652797246 ALSA: hda: intel-dsp-config: Add SND_INTEL_BYT_PREFER_SOF Kconfig option + +https://gitlab.com/cki-project/kernel-ark/-/commit/92c9f3c91b47edbbd3b50d10393a43c54a4881fb + 92c9f3c91b47edbbd3b50d10393a43c54a4881fb drm/sun4i: sun6i_mipi_dsi: fix horizontal timing calculation + +https://gitlab.com/cki-project/kernel-ark/-/commit/15551bd785a681808b2404163d44f6e34f3d61cf + 15551bd785a681808b2404163d44f6e34f3d61cf drm: panel: add Xingbangda XBD599 panel + +https://gitlab.com/cki-project/kernel-ark/-/commit/740bb3c90870b37aa0facbb0017b653094e04220 + 740bb3c90870b37aa0facbb0017b653094e04220 dt-bindings: panel: add binding for Xingbangda XBD599 panel + +https://gitlab.com/cki-project/kernel-ark/-/commit/0c5558c7b1e4e913f21c24d5f3d0ccf9f0bf48b2 + 0c5558c7b1e4e913f21c24d5f3d0ccf9f0bf48b2 ARM: fix __get_user_check() in case uaccess_* calls are not inlined + +https://gitlab.com/cki-project/kernel-ark/-/commit/c4eab489e6b076cd16907a19ccc0bbbee06d87d3 + c4eab489e6b076cd16907a19ccc0bbbee06d87d3 mm/kmemleak: skip late_init if not skip disable + +https://gitlab.com/cki-project/kernel-ark/-/commit/20142ac708d45555ca342fea39bebbeb6979ce5a + 20142ac708d45555ca342fea39bebbeb6979ce5a KEYS: Make use of platform keyring for module signature verify + +https://gitlab.com/cki-project/kernel-ark/-/commit/6dbff498818cceede6a35829a4fb2b9eb019c70b + 6dbff498818cceede6a35829a4fb2b9eb019c70b Drop that for now + +https://gitlab.com/cki-project/kernel-ark/-/commit/d026e4a9a6cddb5c1cf7b5a3668f5662fdcee884 + d026e4a9a6cddb5c1cf7b5a3668f5662fdcee884 Input: rmi4 - remove the need for artificial IRQ in case of HID + +https://gitlab.com/cki-project/kernel-ark/-/commit/7962cb5280fdf3a32eacae0ca2c3dca6c625d1f7 + 7962cb5280fdf3a32eacae0ca2c3dca6c625d1f7 ARM: tegra: usb no reset + +https://gitlab.com/cki-project/kernel-ark/-/commit/d33c62a3487b612a4c61f4c318de2790ed9730af + d33c62a3487b612a4c61f4c318de2790ed9730af arm: make CONFIG_HIGHPTE optional without CONFIG_EXPERT + +https://gitlab.com/cki-project/kernel-ark/-/commit/e1cf2fedb995fbe267c4c3e00dc1bf439c59c748 + e1cf2fedb995fbe267c4c3e00dc1bf439c59c748 Add option of 13 for FORCE_MAX_ZONEORDER + +https://gitlab.com/cki-project/kernel-ark/-/commit/aef981fe45fd22aa25962217f8f0c6fe7399a013 + aef981fe45fd22aa25962217f8f0c6fe7399a013 s390: Lock down the kernel when the IPL secure flag is set + +https://gitlab.com/cki-project/kernel-ark/-/commit/5e328adcf76fe5a01251b68f7361dc162b798efa + 5e328adcf76fe5a01251b68f7361dc162b798efa efi: Lock down the kernel if booted in secure boot mode + +https://gitlab.com/cki-project/kernel-ark/-/commit/14b65c6595b6cb977582cd18b9586d0dee9d48fb + 14b65c6595b6cb977582cd18b9586d0dee9d48fb efi: Add an EFI_SECURE_BOOT flag to indicate secure boot mode + +https://gitlab.com/cki-project/kernel-ark/-/commit/344f56463c3613302558a981b807ca1423f3fb1b + 344f56463c3613302558a981b807ca1423f3fb1b security: lockdown: expose a hook to lock the kernel down + +https://gitlab.com/cki-project/kernel-ark/-/commit/162c5d7fe16619f513e02bf9c909c90a2b68d6cf + 162c5d7fe16619f513e02bf9c909c90a2b68d6cf Make get_cert_list() use efi_status_to_str() to print error messages. + +https://gitlab.com/cki-project/kernel-ark/-/commit/ba6745aad7bdf8cdf6bd239177d98ab2188e3216 + ba6745aad7bdf8cdf6bd239177d98ab2188e3216 Add efi_status_to_str() and rework efi_status_to_err(). + +https://gitlab.com/cki-project/kernel-ark/-/commit/53184be3d07b89bb8c47c6d822ec846165bdc2da + 53184be3d07b89bb8c47c6d822ec846165bdc2da arm: aarch64: Drop the EXPERT setting from ARM64_FORCE_52BIT + +https://gitlab.com/cki-project/kernel-ark/-/commit/e9da8fd1cc5b476c78d27c892955c9ea94f56b43 + e9da8fd1cc5b476c78d27c892955c9ea94f56b43 iommu/arm-smmu: workaround DMA mode issues + +https://gitlab.com/cki-project/kernel-ark/-/commit/75aa23a8bc9d803e628ce0d3948d720ce01b4590 + 75aa23a8bc9d803e628ce0d3948d720ce01b4590 ipmi: do not configure ipmi for HPE m400 + +https://gitlab.com/cki-project/kernel-ark/-/commit/50d5eae7a889ea97a1bd945a8316262da3122eed + 50d5eae7a889ea97a1bd945a8316262da3122eed scsi: smartpqi: add inspur advantech ids + +https://gitlab.com/cki-project/kernel-ark/-/commit/6954a34dc04198619a23a7b7a7a1840ac59a30f2 + 6954a34dc04198619a23a7b7a7a1840ac59a30f2 ahci: thunderx2: Fix for errata that affects stop engine + +https://gitlab.com/cki-project/kernel-ark/-/commit/3cb304dc7a698408c39f9eba892c0dfbeb65b4d7 + 3cb304dc7a698408c39f9eba892c0dfbeb65b4d7 Vulcan: AHCI PCI bar fix for Broadcom Vulcan early silicon + +https://gitlab.com/cki-project/kernel-ark/-/commit/4849bd8037b2d1b8257c75032990cff84e55d5b5 + 4849bd8037b2d1b8257c75032990cff84e55d5b5 kdump: fix a grammar issue in a kernel message + +https://gitlab.com/cki-project/kernel-ark/-/commit/22660c3525b20da79b65c8e98f4476d56d19ffd6 + 22660c3525b20da79b65c8e98f4476d56d19ffd6 kdump: add support for crashkernel=auto + +https://gitlab.com/cki-project/kernel-ark/-/commit/646ba5eeb64390f10940610fc387004847ef1ba3 + 646ba5eeb64390f10940610fc387004847ef1ba3 kdump: round up the total memory size to 128M for crashkernel reservation + +https://gitlab.com/cki-project/kernel-ark/-/commit/67556e7dad64a05b0089fe4a7cebed3bc07f0109 + 67556e7dad64a05b0089fe4a7cebed3bc07f0109 aarch64: acpi scan: Fix regression related to X-Gene UARTs + +https://gitlab.com/cki-project/kernel-ark/-/commit/02d2367674501ed8855a0aecccd27d302904f453 + 02d2367674501ed8855a0aecccd27d302904f453 ACPI / irq: Workaround firmware issue on X-Gene based m400 + +https://gitlab.com/cki-project/kernel-ark/-/commit/bbe1d08ab7d6a28fa64d0c0ac6ec0f9149bea478 + bbe1d08ab7d6a28fa64d0c0ac6ec0f9149bea478 ACPI: APEI: arm64: Ignore broken HPE moonshot APEI support + diff --git a/SOURCES/README.rst b/SOURCES/README.rst new file mode 100644 index 0000000..5de37e5 --- /dev/null +++ b/SOURCES/README.rst @@ -0,0 +1,25 @@ +=================== +The Kernel dist-git +=================== + +The kernel is maintained in a `source tree`_ rather than directly in dist-git. +The specfile is maintained as a `template`_ in the source tree along with a set +of build scripts to generate configurations, (S)RPMs, and to populate the +dist-git repository. + +The `documentation`_ for the source tree covers how to contribute and maintain +the tree. + +If you're looking for the downstream patch set it's available in the source +tree with "git log master..ark-patches" or +`online`_. + +Each release in dist-git is tagged in the source repository so you can easily +check out the source tree for a build. The tags are in the format +name-version-release, but note release doesn't contain the dist tag since the +source can be built in different build roots (Fedora, CentOS, etc.) + +.. _source tree: https://gitlab.com/cki-project/kernel-ark.git +.. _template: https://gitlab.com/cki-project/kernel-ark/-/blob/os-build/redhat/kernel.spec.template +.. _documentation: https://gitlab.com/cki-project/kernel-ark/-/wikis/home +.. _online: https://gitlab.com/cki-project/kernel-ark/-/commits/ark-patches diff --git a/SOURCES/futex2.patch b/SOURCES/futex2.patch index 1bc4486..3604062 100644 --- a/SOURCES/futex2.patch +++ b/SOURCES/futex2.patch @@ -1,37 +1,314 @@ -From 14a106cc87e6d03169ac8c7ea030e3d7fac2dfe4 Mon Sep 17 00:00:00 2001 +From a64bf661d4fc6dbfde640bf002eae2e22884a419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Almeida?= -Date: Wed, 5 Aug 2020 12:40:26 -0300 -Subject: [PATCH 1/9] futex2: Add new futex interface +Date: Fri, 5 Feb 2021 10:34:00 -0300 +Subject: [PATCH 01/13] futex2: Implement wait and wake functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Initial implementation for futex2. Support only private u32 wait/wake, with -timeout (monotonic and realtime clocks). +Create a new set of futex syscalls known as futex2. This new interface +is aimed to implement a more maintainable code, while removing obsolete +features and expanding it with new functionalities. + +Implements wait and wake semantics for futexes, along with the base +infrastructure for future operations. The whole wait path is designed to +be used by N waiters, thus making easier to implement vectorized wait. + +* Syscalls implemented by this patch: + +- futex_wait(void *uaddr, unsigned int val, unsigned int flags, + struct timespec *timo) + + The user thread is put to sleep, waiting for a futex_wake() at uaddr, + if the value at *uaddr is the same as val (otherwise, the syscall + returns immediately with -EAGAIN). timo is an optional timeout value + for the operation. + + Return 0 on success, error code otherwise. + + - futex_wake(void *uaddr, unsigned long nr_wake, unsigned int flags) + + Wake `nr_wake` threads waiting at uaddr. + + Return the number of woken threads on success, error code otherwise. + +** The `flag` argument + + The flag is used to specify the size of the futex word + (FUTEX_[8, 16, 32]). It's mandatory to define one, since there's no + default size. + + By default, the timeout uses a monotonic clock, but can be used as a + realtime one by using the FUTEX_REALTIME_CLOCK flag. + + By default, futexes are of the private type, that means that this user + address will be accessed by threads that shares the same memory region. + This allows for some internal optimizations, so they are faster. + However, if the address needs to be shared with different processes + (like using `mmap()` or `shm()`), they need to be defined as shared and + the flag FUTEX_SHARED_FLAG is used to set that. + + By default, the operation has no NUMA-awareness, meaning that the user + can't choose the memory node where the kernel side futex data will be + stored. The user can choose the node where it wants to operate by + setting the FUTEX_NUMA_FLAG and using the following structure (where X + can be 8, 16, or 32): + + struct futexX_numa { + __uX value; + __sX hint; + }; + + This structure should be passed at the `void *uaddr` of futex + functions. The address of the structure will be used to be waited/waken + on, and the `value` will be compared to `val` as usual. The `hint` + member is used to defined which node the futex will use. When waiting, + the futex will be registered on a kernel-side table stored on that + node; when waking, the futex will be searched for on that given table. + That means that there's no redundancy between tables, and the wrong + `hint` value will led to undesired behavior. Userspace is responsible + for dealing with node migrations issues that may occur. `hint` can + range from [0, MAX_NUMA_NODES], for specifying a node, or -1, to use + the same node the current process is using. + + When not using FUTEX_NUMA_FLAG on a NUMA system, the futex will be + stored on a global table on some node, defined at compilation time. + +** The `timo` argument + +As per the Y2038 work done in the kernel, new interfaces shouldn't add +timeout options known to be buggy. Given that, `timo` should be a 64bit +timeout at all platforms, using an absolute timeout value. Signed-off-by: André Almeida +--- + +[RFC Add futex2 syscall 0/0] + +Hi, + +This patch series introduces the futex2 syscalls. + +* What happened to the current futex()? + +For some years now, developers have been trying to add new features to +futex, but maintainers have been reluctant to accept them, given the +multiplexed interface full of legacy features and tricky to do big +changes. Some problems that people tried to address with patchsets are: +NUMA-awareness[0], smaller sized futexes[1], wait on multiple futexes[2]. +NUMA, for instance, just doesn't fit the current API in a reasonable +way. Considering that, it's not possible to merge new features into the +current futex. + + ** The NUMA problem + + At the current implementation, all futex kernel side infrastructure is + stored on a single node. Given that, all futex() calls issued by + processors that aren't located on that node will have a memory access + penalty when doing it. + + ** The 32bit sized futex problem + + Embedded systems or anything with memory constrains would benefit of + using smaller sizes for the futex userspace integer. Also, a mutex + implementation can be done using just three values, so 8 bits is enough + for various scenarios. + + ** The wait on multiple problem + + The use case lies in the Wine implementation of the Windows NT interface + WaitMultipleObjects. This Windows API function allows a thread to sleep + waiting on the first of a set of event sources (mutexes, timers, signal, + console input, etc) to signal. Considering this is a primitive + synchronization operation for Windows applications, being able to quickly + signal events on the producer side, and quickly go to sleep on the + consumer side is essential for good performance of those running + over Wine. + +[0] https://lore.kernel.org/lkml/20160505204230.932454245@linutronix.de/ +[1] https://lore.kernel.org/lkml/20191221155659.3159-2-malteskarupke@web.de/ +[2] https://lore.kernel.org/lkml/20200213214525.183689-1-andrealmeid@collabora.com/ + +* The solution + +As proposed by Peter Zijlstra and Florian Weimer[3], a new interface +is required to solve this, which must be designed with those features in +mind. futex2() is that interface. As opposed to the current multiplexed +interface, the new one should have one syscall per operation. This will +allow the maintainability of the API if it gets extended, and will help +users with type checking of arguments. + +In particular, the new interface is extended to support the ability to +wait on any of a list of futexes at a time, which could be seen as a +vectored extension of the FUTEX_WAIT semantics. + +[3] https://lore.kernel.org/lkml/20200303120050.GC2596@hirez.programming.kicks-ass.net/ + +* The interface + +The new interface can be seen in details in the following patches, but +this is a high level summary of what the interface can do: + + - Supports wake/wait semantics, as in futex() + - Supports requeue operations, similarly as FUTEX_CMP_REQUEUE, but with + individual flags for each address + - Supports waiting for a vector of futexes, using a new syscall named + futex_waitv() + - Supports variable sized futexes (8bits, 16bits and 32bits) + - Supports NUMA-awareness operations, where the user can specify on + which memory node would like to operate + +* Implementation + +The internal implementation follows a similar design to the original futex. +Given that we want to replicate the same external behavior of current +futex, this should be somewhat expected. For some functions, like the +init and the code to get a shared key, I literally copied code and +comments from kernel/futex.c. I decided to do so instead of exposing the +original function as a public function since in that way we can freely +modify our implementation if required, without any impact on old futex. +Also, the comments precisely describes the details and corner cases of +the implementation. + +Each patch contains a brief description of implementation, but patch 6 +"docs: locking: futex2: Add documentation" adds a more complete document +about it. + +* The patchset + +This patchset can be also found at my git tree: + +https://gitlab.collabora.com/tonyk/linux/-/tree/futex2 + + - Patch 1: Implements wait/wake, and the basics foundations of futex2 + + - Patches 2-4: Implement the remaining features (shared, waitv, requeue). + + - Patch 5: Adds the x86_x32 ABI handling. I kept it in a separated + patch since I'm not sure if x86_x32 is still a thing, or if it should + return -ENOSYS. + + - Patch 6: Add a documentation file which details the interface and + the internal implementation. + + - Patches 7-13: Selftests for all operations along with perf + support for futex2. + + - Patch 14: While working on porting glibc for futex2, I found out + that there's a futex_wake() call at the user thread exit path, if + that thread was created with clone(..., CLONE_CHILD_SETTID, ...). In + order to make pthreads work with futex2, it was required to add + this patch. Note that this is more a proof-of-concept of what we + will need to do in future, rather than part of the interface and + shouldn't be merged as it is. + +* Testing: + +This patchset provides selftests for each operation and their flags. +Along with that, the following work was done: + + ** Stability + + To stress the interface in "real world scenarios": + + - glibc[4]: nptl's low level locking was modified to use futex2 API + (except for robust and PI things). All relevant nptl/ tests passed. + + - Wine[5]: Proton/Wine was modified in order to use futex2() for the + emulation of Windows NT sync mechanisms based on futex, called "fsync". + Triple-A games with huge CPU's loads and tons of parallel jobs worked + as expected when compared with the previous FUTEX_WAIT_MULTIPLE + implementation at futex(). Some games issue 42k futex2() calls + per second. + + - Full GNU/Linux distro: I installed the modified glibc in my host + machine, so all pthread's programs would use futex2(). After tweaking + systemd[6] to allow futex2() calls at seccomp, everything worked as + expected (web browsers do some syscall sandboxing and need some + configuration as well). + + - perf: The perf benchmarks tests can also be used to stress the + interface, and they can be found in this patchset. + + ** Performance + + - For comparing futex() and futex2() performance, I used the artificial + benchmarks implemented at perf (wake, wake-parallel, hash and + requeue). The setup was 200 runs for each test and using 8, 80, 800, + 8000 for the number of threads, Note that for this test, I'm not using + patch 14 ("kernel: Enable waitpid() for futex2") , for reasons explained + at "The patchset" section. + + - For the first three ones, I measured an average of 4% gain in + performance. This is not a big step, but it shows that the new + interface is at least comparable in performance with the current one. + + - For requeue, I measured an average of 21% decrease in performance + compared to the original futex implementation. This is expected given + the new design with individual flags. The performance trade-offs are + explained at patch 4 ("futex2: Implement requeue operation"). + +[4] https://gitlab.collabora.com/tonyk/glibc/-/tree/futex2 +[5] https://gitlab.collabora.com/tonyk/wine/-/tree/proton_5.13 +[6] https://gitlab.collabora.com/tonyk/systemd + +* FAQ + + ** "Where's the code for NUMA and FUTEX_8/16?" + + The current code is already complex enough to take some time for + review, so I believe it's better to split that work out to a future + iteration of this patchset. Besides that, this RFC is the core part of the + infrastructure, and the following features will not pose big design + changes to it, the work will be more about wiring up the flags and + modifying some functions. + + ** "And what's about FUTEX_64?" + + By supporting 64 bit futexes, the kernel structure for futex would + need to have a 64 bit field for the value, and that could defeat one of + the purposes of having different sized futexes in the first place: + supporting smaller ones to decrease memory usage. This might be + something that could be disabled for 32bit archs (and even for + CONFIG_BASE_SMALL). + + Which use case would benefit for FUTEX_64? Does it worth the trade-offs? + + ** "Where's the PI/robust stuff?" + + As said by Peter Zijlstra at [3], all those new features are related to + the "simple" futex interface, that doesn't use PI or robust. Do we want + to have this complexity at futex2() and if so, should it be part of + this patchset or can it be future work? + +Thanks, + André + Signed-off-by: Jan200101 --- MAINTAINERS | 2 +- + arch/arm/tools/syscall.tbl | 2 + + arch/arm64/include/asm/unistd.h | 2 +- + arch/arm64/include/asm/unistd32.h | 4 + arch/x86/entry/syscalls/syscall_32.tbl | 2 + arch/x86/entry/syscalls/syscall_64.tbl | 2 + include/linux/syscalls.h | 7 + include/uapi/asm-generic/unistd.h | 8 +- - include/uapi/linux/futex.h | 40 ++ + include/uapi/linux/futex.h | 56 ++ init/Kconfig | 7 + kernel/Makefile | 1 + - kernel/futex2.c | 484 ++++++++++++++++++ + kernel/futex2.c | 625 ++++++++++++++++++ kernel/sys_ni.c | 4 + - tools/include/uapi/asm-generic/unistd.h | 9 +- + tools/include/uapi/asm-generic/unistd.h | 8 +- .../arch/x86/entry/syscalls/syscall_64.tbl | 2 + - 12 files changed, 565 insertions(+), 3 deletions(-) + 15 files changed, 728 insertions(+), 4 deletions(-) create mode 100644 kernel/futex2.c diff --git a/MAINTAINERS b/MAINTAINERS -index 2daa6ee67..855d38511 100644 +index bfc1b86e3..86ed91b72 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -7259,7 +7259,7 @@ F: Documentation/locking/*futex* +@@ -7332,7 +7332,7 @@ F: Documentation/locking/*futex* F: include/asm-generic/futex.h F: include/linux/futex.h F: include/uapi/linux/futex.h @@ -40,72 +317,110 @@ index 2daa6ee67..855d38511 100644 F: tools/perf/bench/futex* F: tools/testing/selftests/futex/ +diff --git a/arch/arm/tools/syscall.tbl b/arch/arm/tools/syscall.tbl +index 20e1170e2..4eef220cd 100644 +--- a/arch/arm/tools/syscall.tbl ++++ b/arch/arm/tools/syscall.tbl +@@ -455,3 +455,5 @@ + 439 common faccessat2 sys_faccessat2 + 440 common process_madvise sys_process_madvise + 441 common epoll_pwait2 sys_epoll_pwait2 ++442 common futex_wait sys_futex_wait ++443 common futex_wake sys_futex_wake +diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h +index 86a9d7b3e..d1f7d35f9 100644 +--- a/arch/arm64/include/asm/unistd.h ++++ b/arch/arm64/include/asm/unistd.h +@@ -38,7 +38,7 @@ + #define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE + 5) + #define __ARM_NR_COMPAT_END (__ARM_NR_COMPAT_BASE + 0x800) + +-#define __NR_compat_syscalls 442 ++#define __NR_compat_syscalls 444 + #endif + + #define __ARCH_WANT_SYS_CLONE +diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h +index cccfbbefb..2db1529b2 100644 +--- a/arch/arm64/include/asm/unistd32.h ++++ b/arch/arm64/include/asm/unistd32.h +@@ -891,6 +891,10 @@ __SYSCALL(__NR_faccessat2, sys_faccessat2) + __SYSCALL(__NR_process_madvise, sys_process_madvise) + #define __NR_epoll_pwait2 441 + __SYSCALL(__NR_epoll_pwait2, compat_sys_epoll_pwait2) ++#define __NR_futex_wait 442 ++__SYSCALL(__NR_futex_wait, sys_futex_wait) ++#define __NR_futex_wake 443 ++__SYSCALL(__NR_futex_wake, sys_futex_wake) + + /* + * Please add new compat syscalls above this comment and update diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl -index 0d0667a9f..83a75ff39 100644 +index 874aeacde..ece90c8d9 100644 --- a/arch/x86/entry/syscalls/syscall_32.tbl +++ b/arch/x86/entry/syscalls/syscall_32.tbl -@@ -445,3 +445,5 @@ - 438 i386 pidfd_getfd sys_pidfd_getfd +@@ -446,3 +446,5 @@ 439 i386 faccessat2 sys_faccessat2 440 i386 process_madvise sys_process_madvise -+441 i386 futex_wait sys_futex_wait -+442 i386 futex_wake sys_futex_wake + 441 i386 epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 ++442 i386 futex_wait sys_futex_wait ++443 i386 futex_wake sys_futex_wake diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl -index 379819244..6658fd63c 100644 +index 78672124d..72fb65ef9 100644 --- a/arch/x86/entry/syscalls/syscall_64.tbl +++ b/arch/x86/entry/syscalls/syscall_64.tbl -@@ -362,6 +362,8 @@ - 438 common pidfd_getfd sys_pidfd_getfd +@@ -363,6 +363,8 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise -+441 common futex_wait sys_futex_wait -+442 common futex_wake sys_futex_wake + 441 common epoll_pwait2 sys_epoll_pwait2 ++442 common futex_wait sys_futex_wait ++443 common futex_wake sys_futex_wake # # Due to a historical design error, certain syscalls are numbered differently diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h -index 37bea07c1..b6b77cf2b 100644 +index 7688bc983..bf146c2b0 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h -@@ -589,6 +589,13 @@ asmlinkage long sys_get_robust_list(int pid, +@@ -618,6 +618,13 @@ asmlinkage long sys_get_robust_list(int pid, asmlinkage long sys_set_robust_list(struct robust_list_head __user *head, size_t len); +/* kernel/futex2.c */ -+asmlinkage long sys_futex_wait(void __user *uaddr, unsigned long val, -+ unsigned long flags, ++asmlinkage long sys_futex_wait(void __user *uaddr, unsigned int val, ++ unsigned int flags, + struct __kernel_timespec __user __user *timo); -+asmlinkage long sys_futex_wake(void __user *uaddr, unsigned long nr_wake, -+ unsigned long flags); ++asmlinkage long sys_futex_wake(void __user *uaddr, unsigned int nr_wake, ++ unsigned int flags); + /* kernel/hrtimer.c */ asmlinkage long sys_nanosleep(struct __kernel_timespec __user *rqtp, struct __kernel_timespec __user *rmtp); diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h -index 205631898..ae47d6a9e 100644 +index 728752917..57e19200f 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h -@@ -860,8 +860,14 @@ __SYSCALL(__NR_faccessat2, sys_faccessat2) - #define __NR_process_madvise 440 - __SYSCALL(__NR_process_madvise, sys_process_madvise) +@@ -862,8 +862,14 @@ __SYSCALL(__NR_process_madvise, sys_process_madvise) + #define __NR_epoll_pwait2 441 + __SC_COMP(__NR_epoll_pwait2, sys_epoll_pwait2, compat_sys_epoll_pwait2) -+#define __NR_futex_wait 441 ++#define __NR_futex_wait 442 +__SYSCALL(__NR_futex_wait, sys_futex_wait) + -+#define __NR_futex_wake 442 ++#define __NR_futex_wake 443 +__SYSCALL(__NR_futex_wake, sys_futex_wake) + #undef __NR_syscalls --#define __NR_syscalls 441 -+#define __NR_syscalls 443 +-#define __NR_syscalls 442 ++#define __NR_syscalls 444 /* * 32 bit systems traditionally used different diff --git a/include/uapi/linux/futex.h b/include/uapi/linux/futex.h -index a89eb0acc..35a5bf1cd 100644 +index a89eb0acc..9fbdaaf4f 100644 --- a/include/uapi/linux/futex.h +++ b/include/uapi/linux/futex.h -@@ -41,6 +41,46 @@ +@@ -41,6 +41,62 @@ #define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \ FUTEX_PRIVATE_FLAG) @@ -120,7 +435,7 @@ index a89eb0acc..35a5bf1cd 100644 + +#define FUTEX_NUMA_FLAG 16 + -+/* ++/** + * struct futexXX_numa - struct for NUMA-aware futex operation + * @value: futex value + * @hint: node id to operate @@ -128,35 +443,51 @@ index a89eb0acc..35a5bf1cd 100644 + +struct futex8_numa { + __u8 value; -+ __u8 hint; ++ __s8 hint; +}; + +struct futex16_numa { + __u16 value; -+ __u16 hint; ++ __s16 hint; +}; + +struct futex32_numa { + __u32 value; -+ __u32 hint; ++ __s32 hint; +}; + +#define FUTEX_WAITV_MAX 128 + ++/** ++ * struct futex_waitv - A waiter for vectorized wait ++ * @uaddr: User address to wait on ++ * @val: Expected value at uaddr ++ * @flags: Flags for this waiter ++ */ +struct futex_waitv { + void *uaddr; + unsigned int val; + unsigned int flags; +}; ++ ++/** ++ * struct futex_requeue - Define an address and its flags for requeue operation ++ * @uaddr: User address of one of the requeue arguments ++ * @flags: Flags for this address ++ */ ++struct futex_requeue { ++ void *uaddr; ++ unsigned int flags; ++}; + /* * Support for robust futexes: the kernel cleans up held futexes at * thread exit time. diff --git a/init/Kconfig b/init/Kconfig -index 02d13ae27..1264687ea 100644 +index 29ad68325..c3e62e1b1 100644 --- a/init/Kconfig +++ b/init/Kconfig -@@ -1522,6 +1522,13 @@ config FUTEX +@@ -1531,6 +1531,13 @@ config FUTEX support for "fast userspace mutexes". The resulting kernel may not run glibc-based applications correctly. @@ -165,16 +496,16 @@ index 02d13ae27..1264687ea 100644 + depends on FUTEX + default y + help -+ Experimental support for futex2 interface. ++ Support for futex2 interface. + config FUTEX_PI bool depends on FUTEX && RT_MUTEXES diff --git a/kernel/Makefile b/kernel/Makefile -index af601b9bd..bb7f33986 100644 +index aa7368c7e..afbe15e51 100644 --- a/kernel/Makefile +++ b/kernel/Makefile -@@ -54,6 +54,7 @@ obj-$(CONFIG_PROFILING) += profile.o +@@ -57,6 +57,7 @@ obj-$(CONFIG_PROFILING) += profile.o obj-$(CONFIG_STACKTRACE) += stacktrace.o obj-y += time/ obj-$(CONFIG_FUTEX) += futex.o @@ -184,30 +515,49 @@ index af601b9bd..bb7f33986 100644 ifneq ($(CONFIG_SMP),y) diff --git a/kernel/futex2.c b/kernel/futex2.c new file mode 100644 -index 000000000..107b80a46 +index 000000000..802578ad6 --- /dev/null +++ b/kernel/futex2.c -@@ -0,0 +1,484 @@ +@@ -0,0 +1,625 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * futex2 system call interface by André Almeida + * -+ * Copyright 2020 Collabora Ltd. ++ * Copyright 2021 Collabora Ltd. ++ * ++ * Based on original futex implementation by: ++ * (C) 2002 Rusty Russell, IBM ++ * (C) 2003, 2006 Ingo Molnar, Red Hat Inc. ++ * (C) 2003, 2004 Jamie Lokier ++ * (C) 2006 Thomas Gleixner, Timesys Corp. ++ * (C) 2007 Eric Dumazet ++ * (C) 2009 Darren Hart, IBM + */ + +#include +#include ++#include +#include +#include +#include -+#include +#include + +/** ++ * struct futex_key - Components to build unique key for a futex ++ * @pointer: Pointer to current->mm ++ * @index: Start address of the page containing futex ++ * @offset: Address offset of uaddr in a page ++ */ ++struct futex_key { ++ u64 pointer; ++ unsigned long index; ++ unsigned long offset; ++}; ++ ++/** + * struct futex_waiter - List entry for a waiter -+ * @key.address: Memory address of userspace futex -+ * @key.mm: Pointer to memory management struct of this process -+ * @key: Stores information that uniquely identify a futex ++ * @uaddr: Virtual address of userspace futex ++ * @key: Information that uniquely identify a futex + * @list: List node struct + * @val: Expected value for this waiter + * @flags: Flags @@ -215,10 +565,8 @@ index 000000000..107b80a46 + * @index: Index of waiter in futexv list + */ +struct futex_waiter { -+ struct futex_key { -+ uintptr_t address; -+ struct mm_struct *mm; -+ } key; ++ uintptr_t uaddr; ++ struct futex_key key; + struct list_head list; + unsigned int val; + unsigned int flags; @@ -227,6 +575,18 @@ index 000000000..107b80a46 +}; + +/** ++ * struct futexv_head - List of futexes to be waited ++ * @task: Task to be awaken ++ * @hint: Was someone on this list awakened? ++ * @objects: List of futexes ++ */ ++struct futexv_head { ++ struct task_struct *task; ++ bool hint; ++ struct futex_waiter objects[0]; ++}; ++ ++/** + * struct futex_bucket - A bucket of futex's hash table + * @waiters: Number of waiters in the bucket + * @lock: Bucket lock @@ -238,30 +598,28 @@ index 000000000..107b80a46 + struct list_head list; +}; + -+struct futexv { -+ struct task_struct *task; -+ int hint; -+ struct futex_waiter objects[0]; -+}; -+ ++/** ++ * struct futex_single_waiter - Wrapper for a futexv_head of one element ++ * @futexv: Single futexv element ++ * @waiter: Single waiter element ++ */ +struct futex_single_waiter { -+ struct futexv parent; ++ struct futexv_head futexv; + struct futex_waiter waiter; +} __packed; + -+struct futex_bucket *futex_table; -+ -+/* mask for futex2 flag operations */ ++/* Mask for futex2 flag operations */ +#define FUTEX2_MASK (FUTEX_SIZE_MASK | FUTEX_SHARED_FLAG | \ + FUTEX_CLOCK_REALTIME) + -+// mask for sys_futex_waitv ++/* Mask for sys_futex_waitv flag */ +#define FUTEXV_MASK (FUTEX_CLOCK_REALTIME) + -+// mask for each futex in futex_waitv list ++/* Mask for each futex in futex_waitv list */ +#define FUTEXV_WAITER_MASK (FUTEX_SIZE_MASK | FUTEX_SHARED_FLAG) + -+int futex2_hashsize; ++struct futex_bucket *futex_table; ++unsigned int futex2_hashsize; + +/* + * Reflects a new waiter being added to the waitqueue. @@ -271,7 +629,8 @@ index 000000000..107b80a46 +#ifdef CONFIG_SMP + atomic_inc(&bucket->waiters); + /* -+ * Full barrier (A), see the ordering comment above. ++ * Issue a barrier after adding so futex_wake() will see that the ++ * value had increased + */ + smp_mb__after_atomic(); +#endif @@ -295,7 +654,8 @@ index 000000000..107b80a46 +{ +#ifdef CONFIG_SMP + /* -+ * Full barrier (B), see the ordering comment above. ++ * Issue a barrier before reading so we get an updated value from ++ * futex_wait() + */ + smp_mb(); + return atomic_read(&bucket->waiters); @@ -315,7 +675,7 @@ index 000000000..107b80a46 +static struct futex_bucket *futex_get_bucket(void __user *uaddr, + struct futex_key *key) +{ -+ uintptr_t address = (uintptr_t) uaddr; ++ uintptr_t address = (uintptr_t)uaddr; + u32 hash_key; + + /* Checking if uaddr is valid and accessible */ @@ -324,11 +684,13 @@ index 000000000..107b80a46 + if (unlikely(!access_ok(address, sizeof(u32)))) + return ERR_PTR(-EFAULT); + -+ key->address = address; -+ key->mm = current->mm; ++ key->offset = address % PAGE_SIZE; ++ address -= key->offset; ++ key->pointer = (u64)address; ++ key->index = (unsigned long)current->mm; + + /* Generate hash key for this futex using uaddr and current->mm */ -+ hash_key = jhash2((u32 *) key, sizeof(*key) / sizeof(u32), 0); ++ hash_key = jhash2((u32 *)key, sizeof(*key) / sizeof(u32), 0); + + /* Since HASH_SIZE is 2^n, subtracting 1 makes a perfect bit mask */ + return &futex_table[hash_key & (futex2_hashsize - 1)]; @@ -339,9 +701,9 @@ index 000000000..107b80a46 + * @uval: variable to store the value + * @uaddr: userspace address + * -+ * Check the comment at futex_get_user_val for more information. ++ * Check the comment at futex_enqueue() for more information. + */ -+static int futex_get_user(u32 *uval, u32 *uaddr) ++static int futex_get_user(u32 *uval, u32 __user *uaddr) +{ + int ret; + @@ -353,7 +715,7 @@ index 000000000..107b80a46 +} + +/** -+ * futex_setup_time - Prepare the timeout mechanism, without starting it. ++ * futex_setup_time - Prepare the timeout mechanism and start it. + * @timo: Timeout value from userspace + * @timeout: Pointer to hrtimer handler + * @flags: Flags from userspace, to decide which clockid to use @@ -381,220 +743,342 @@ index 000000000..107b80a46 + + hrtimer_set_expires(&timeout->timer, time); + ++ hrtimer_sleeper_start_expires(timeout, HRTIMER_MODE_ABS); ++ + return 0; +} + -+ +/** -+ * futex_get_user_value - Get the value from the userspace address and compares -+ * with the expected one. In success, leaves the function -+ * holding the bucket lock. Else, hold no lock. -+ * @bucket: hash bucket of this address -+ * @uaddr: futex's userspace address -+ * @val: expected value -+ * @multiple: is this call in the wait on multiple path ++ * futex_dequeue_multiple - Remove multiple futexes from hash table ++ * @futexv: list of waiters ++ * @nr: number of futexes to be removed + * -+ * Return: 0 on success, error code otherwise ++ * This function is used if (a) something went wrong while enqueuing, and we ++ * need to undo our work (then nr <= nr_futexes) or (b) we woke up, and thus ++ * need to remove every waiter, check if some was indeed woken and return. ++ * Before removing a waiter, we check if it's on the list, since we have no ++ * clue who have been waken. ++ * ++ * Return: ++ * * -1 - If no futex was woken during the removal ++ * * 0>= - At least one futex was found woken, index of the last one + */ -+static int futex_get_user_value(struct futex_bucket *bucket, u32 __user *uaddr, -+ unsigned int val, bool multiple) ++static int futex_dequeue_multiple(struct futexv_head *futexv, unsigned int nr) +{ -+ u32 uval; -+ int ret; -+ -+ /* -+ * Get the value from user futex address. -+ * -+ * Since we are in a hurry, we use a spin lock and we can't sleep. -+ * Try to get the value with page fault disabled (when enable, we might -+ * sleep). -+ * -+ * If we fail, we aren't sure if the address is invalid or is just a -+ * page fault. Then, release the lock (so we can sleep) and try to get -+ * the value with page fault enabled. In order to trigger a page fault -+ * handling, we just call __get_user() again. -+ * -+ * If get_user succeeds, this mean that the address is valid and we do -+ * the loop again. Since we just handled the page fault, the page is -+ * likely pinned in memory and we should be luckier this time and be -+ * able to get the value. If we fail anyway, we will try again. -+ * -+ * If even with page faults enabled we get and error, this means that -+ * the address is not valid and we return from the syscall. -+ */ -+ do { -+ spin_lock(&bucket->lock); -+ -+ ret = futex_get_user(&uval, uaddr); -+ -+ if (ret) { -+ spin_unlock(&bucket->lock); -+ if (multiple || __get_user(uval, uaddr)) -+ return -EFAULT; ++ int i, ret = -1; + ++ for (i = 0; i < nr; i++) { ++ spin_lock(&futexv->objects[i].bucket->lock); ++ if (!list_empty_careful(&futexv->objects[i].list)) { ++ list_del_init_careful(&futexv->objects[i].list); ++ bucket_dec_waiters(futexv->objects[i].bucket); ++ } else { ++ ret = i; + } -+ } while (ret); -+ -+ if (uval != val) { -+ spin_unlock(&bucket->lock); -+ return -EWOULDBLOCK; ++ spin_unlock(&futexv->objects[i].bucket->lock); + } + -+ return 0; ++ return ret; +} + +/** -+ * futex_dequeue - Remove a futex from a queue -+ * @bucket: current bucket holding the futex -+ * @waiter: futex to be removed ++ * futex_enqueue - Check the value and enqueue a futex on a wait list ++ * ++ * @futexv: List of futexes ++ * @nr_futexes: Number of futexes in the list ++ * @awakened: If a futex was awakened during enqueueing, store the index here ++ * ++ * Get the value from the userspace address and compares with the expected one. ++ * ++ * Getting the value from user futex address: ++ * ++ * Since we are in a hurry, we use a spin lock and we can't sleep. ++ * Try to get the value with page fault disabled (when enable, we might ++ * sleep). ++ * ++ * If we fail, we aren't sure if the address is invalid or is just a ++ * page fault. Then, release the lock (so we can sleep) and try to get ++ * the value with page fault enabled. In order to trigger a page fault ++ * handling, we just call __get_user() again. If we sleep with enqueued ++ * futexes, we might miss a wake, so dequeue everything before sleeping. ++ * ++ * If get_user succeeds, this mean that the address is valid and we do ++ * the work again. Since we just handled the page fault, the page is ++ * likely pinned in memory and we should be luckier this time and be ++ * able to get the value. If we fail anyway, we will try again. ++ * ++ * If even with page faults enabled we get and error, this means that ++ * the address is not valid and we return from the syscall. ++ * ++ * If we got an unexpected value or need to treat a page fault and realized that ++ * a futex was awakened, we can priority this and return success. + * -+ * Return: True if futex was removed by this function, false if another wake -+ * thread removed this futex. ++ * In success, enqueue the futex in the correct bucket + * -+ * This function should be used after we found that this futex was in a queue. -+ * Thus, it needs to be removed before the next step. However, someone could -+ * wake it between the time of the first check and the time to get the lock for -+ * the bucket. Check one more time if the futex is there with the bucket locked. -+ * If it's there, just remove it and return true. Else, mark the removal as -+ * false and do nothing. ++ * Return: ++ * * 1 - We were awake in the process and nothing is enqueued ++ * * 0 - Everything is enqueued and we are ready to sleep ++ * * 0< - Something went wrong, nothing is enqueued, return error code + */ -+static bool futex_dequeue(struct futex_bucket *bucket, struct futex_waiter *waiter) ++static int futex_enqueue(struct futexv_head *futexv, unsigned int nr_futexes, ++ int *awakened) +{ -+ bool removed = true; ++ int i, ret; ++ u32 uval, *uaddr, val; ++ struct futex_bucket *bucket; + -+ spin_lock(&bucket->lock); -+ if (list_empty(&waiter->list)) -+ removed = false; -+ else -+ list_del(&waiter->list); -+ spin_unlock(&bucket->lock); ++retry: ++ set_current_state(TASK_INTERRUPTIBLE); + -+ if (removed) -+ bucket_dec_waiters(bucket); ++ for (i = 0; i < nr_futexes; i++) { ++ uaddr = (u32 * __user)futexv->objects[i].uaddr; ++ val = (u32)futexv->objects[i].val; + -+ return removed; -+} ++ bucket = futexv->objects[i].bucket; + -+/** -+ * sys_futex_wait - Wait on a futex address if (*uaddr) == val -+ * @uaddr: User address of futex -+ * @val: Expected value of futex -+ * @flags: Specify the size of futex and the clockid -+ * @timo: Optional absolute timeout. Supports only 64bit time. -+ */ -+SYSCALL_DEFINE4(futex_wait, void __user *, uaddr, unsigned int, val, -+ unsigned int, flags, struct __kernel_timespec __user *, timo) -+{ -+ unsigned int size = flags & FUTEX_SIZE_MASK; -+ struct hrtimer_sleeper timeout; -+ struct futex_bucket *bucket; -+ struct futex_single_waiter wait_single; -+ struct futex_waiter *waiter; -+ int ret; ++ bucket_inc_waiters(bucket); ++ spin_lock(&bucket->lock); + -+ wait_single.parent.task = current; -+ wait_single.parent.hint = 0; -+ waiter = &wait_single.waiter; -+ waiter->index = 0; ++ ret = futex_get_user(&uval, uaddr); + -+ if (flags & ~FUTEX2_MASK) -+ return -EINVAL; ++ if (unlikely(ret)) { ++ spin_unlock(&bucket->lock); + -+ if (size != FUTEX_32) -+ return -EINVAL; ++ bucket_dec_waiters(bucket); ++ __set_current_state(TASK_RUNNING); ++ *awakened = futex_dequeue_multiple(futexv, i); + -+ if (timo) { -+ ret = futex_setup_time(timo, &timeout, flags); -+ if (ret) -+ return ret; -+ } ++ if (__get_user(uval, uaddr)) ++ return -EFAULT; + -+ /* Get an unlocked hash bucket */ -+ bucket = futex_get_bucket(uaddr, &waiter->key); -+ if (IS_ERR(bucket)) -+ return PTR_ERR(bucket); ++ if (*awakened >= 0) ++ return 1; + -+ if (timo) -+ hrtimer_sleeper_start_expires(&timeout, HRTIMER_MODE_ABS); ++ goto retry; ++ } + -+retry: -+ bucket_inc_waiters(bucket); ++ if (uval != val) { ++ spin_unlock(&bucket->lock); + -+ /* Compare the expected and current value, get the bucket lock */ -+ ret = futex_get_user_value(bucket, uaddr, val, false); -+ if (ret) { -+ bucket_dec_waiters(bucket); -+ goto out; -+ } ++ bucket_dec_waiters(bucket); ++ __set_current_state(TASK_RUNNING); ++ *awakened = futex_dequeue_multiple(futexv, i); + -+ /* Add the waiter to the hash table and sleep */ -+ set_current_state(TASK_INTERRUPTIBLE); -+ list_add_tail(&waiter->list, &bucket->list); -+ spin_unlock(&bucket->lock); ++ if (*awakened >= 0) ++ return 1; + -+ /* Do not sleep if someone woke this futex or if it was timeouted */ -+ if (!list_empty_careful(&waiter->list) && (!timo || timeout.task)) -+ freezable_schedule(); ++ return -EAGAIN; ++ } + -+ __set_current_state(TASK_RUNNING); ++ list_add_tail(&futexv->objects[i].list, &bucket->list); ++ spin_unlock(&bucket->lock); ++ } + -+ /* -+ * One of those things triggered this wake: -+ * -+ * * We have been removed from the bucket. futex_wake() woke us. We just -+ * need to return 0 to userspace. -+ * -+ * However, if we find ourselves in the bucket we must remove ourselves -+ * from the bucket and ... -+ * -+ * * If the there's a timeout and it has expired, return -ETIMEDOUT. -+ * -+ * * If there is a signal pending, something wants to kill our thread. -+ * Return -ERESTARTSYS. -+ * -+ * * If there's no signal pending, it was a spurious wake (scheduler -+ * gave us a change to do some work, even if we don't want to). We -+ * need to remove ourselves from the bucket and add again, to prevent -+ * losing wakeups in the meantime. -+ */ ++ return 0; ++} ++ ++/** ++ * __futex_wait - Enqueue the list of futexes and wait to be woken ++ * @futexv: List of futexes to wait ++ * @nr_futexes: Length of futexv ++ * @timeout: Pointer to timeout handler ++ * ++ * Return: ++ * * 0 >= - Hint of which futex woke us ++ * * 0 < - Error code ++ */ ++static int __futex_wait(struct futexv_head *futexv, unsigned int nr_futexes, ++ struct hrtimer_sleeper *timeout) ++{ ++ int ret; + -+ /* Normal wake */ -+ if (list_empty_careful(&waiter->list)) -+ goto out; ++ while (1) { ++ int awakened = -1; + -+ if (!futex_dequeue(bucket, waiter)) -+ goto out; ++ ret = futex_enqueue(futexv, nr_futexes, &awakened); + -+ /* Timeout */ -+ if (timo && !timeout.task) -+ return -ETIMEDOUT; ++ if (ret) { ++ if (awakened >= 0) ++ return awakened; ++ return ret; ++ } + -+ /* Spurious wakeup */ -+ if (!signal_pending(current)) -+ goto retry; ++ /* Before sleeping, check if someone was woken */ ++ if (!futexv->hint && (!timeout || timeout->task)) ++ freezable_schedule(); ++ ++ __set_current_state(TASK_RUNNING); ++ ++ /* ++ * One of those things triggered this wake: ++ * ++ * * We have been removed from the bucket. futex_wake() woke ++ * us. We just need to dequeue and return 0 to userspace. ++ * ++ * However, if no futex was dequeued by a futex_wake(): ++ * ++ * * If the there's a timeout and it has expired, ++ * return -ETIMEDOUT. ++ * ++ * * If there is a signal pending, something wants to kill our ++ * thread, return -ERESTARTSYS. ++ * ++ * * If there's no signal pending, it was a spurious wake ++ * (scheduler gave us a change to do some work, even if we ++ * don't want to). We need to remove ourselves from the ++ * bucket and add again, to prevent losing wakeups in the ++ * meantime. ++ */ ++ ++ ret = futex_dequeue_multiple(futexv, nr_futexes); ++ ++ /* Normal wake */ ++ if (ret >= 0) ++ return ret; ++ ++ if (timeout && !timeout->task) ++ return -ETIMEDOUT; ++ ++ if (signal_pending(current)) ++ return -ERESTARTSYS; ++ ++ /* Spurious wake, do everything again */ ++ } ++} ++ ++/** ++ * futex_wait - Setup the timer (if there's one) and wait on a list of futexes ++ * @futexv: List of futexes ++ * @nr_futexes: Length of futexv ++ * @timo: Timeout ++ * @flags: Timeout flags ++ * ++ * Return: ++ * * 0 >= - Hint of which futex woke us ++ * * 0 < - Error code ++ */ ++static int futex_set_timer_and_wait(struct futexv_head *futexv, ++ unsigned int nr_futexes, ++ struct __kernel_timespec __user *timo, ++ unsigned int flags) ++{ ++ struct hrtimer_sleeper timeout; ++ int ret; ++ ++ if (timo) { ++ ret = futex_setup_time(timo, &timeout, flags); ++ if (ret) ++ return ret; ++ } ++ ++ ret = __futex_wait(futexv, nr_futexes, timo ? &timeout : NULL); + -+ /* Some signal is pending */ -+ ret = -ERESTARTSYS; -+out: + if (timo) + hrtimer_cancel(&timeout.timer); + + return ret; +} + -+static struct futexv *futex_get_parent(uintptr_t waiter, u8 index) ++/** ++ * sys_futex_wait - Wait on a futex address if (*uaddr) == val ++ * @uaddr: User address of futex ++ * @val: Expected value of futex ++ * @flags: Specify the size of futex and the clockid ++ * @timo: Optional absolute timeout. ++ * ++ * The user thread is put to sleep, waiting for a futex_wake() at uaddr, if the ++ * value at *uaddr is the same as val (otherwise, the syscall returns ++ * immediately with -EAGAIN). ++ * ++ * Returns 0 on success, error code otherwise. ++ */ ++SYSCALL_DEFINE4(futex_wait, void __user *, uaddr, unsigned int, val, ++ unsigned int, flags, struct __kernel_timespec __user *, timo) ++{ ++ unsigned int size = flags & FUTEX_SIZE_MASK; ++ struct futex_single_waiter wait_single = {0}; ++ struct futex_waiter *waiter; ++ struct futexv_head *futexv; ++ ++ if (flags & ~FUTEX2_MASK) ++ return -EINVAL; ++ ++ if (size != FUTEX_32) ++ return -EINVAL; ++ ++ futexv = &wait_single.futexv; ++ futexv->task = current; ++ futexv->hint = false; ++ ++ waiter = &wait_single.waiter; ++ waiter->index = 0; ++ waiter->val = val; ++ waiter->uaddr = (uintptr_t)uaddr; ++ ++ INIT_LIST_HEAD(&waiter->list); ++ ++ /* Get an unlocked hash bucket */ ++ waiter->bucket = futex_get_bucket(uaddr, &waiter->key); ++ if (IS_ERR(waiter->bucket)) ++ return PTR_ERR(waiter->bucket); ++ ++ return futex_set_timer_and_wait(futexv, 1, timo, flags); ++} ++ ++/** ++ * futex_get_parent - For a given futex in a futexv list, get a pointer to the futexv ++ * @waiter: Address of futex in the list ++ * @index: Index of futex in the list ++ * ++ * Return: A pointer to its futexv struct ++ */ ++static inline struct futexv_head *futex_get_parent(uintptr_t waiter, ++ unsigned int index) ++{ ++ uintptr_t parent = waiter - sizeof(struct futexv_head) ++ - (uintptr_t)(index * sizeof(struct futex_waiter)); ++ ++ return (struct futexv_head *)parent; ++} ++ ++/** ++ * futex_mark_wake - Find the task to be wake and add it in wake queue ++ * @waiter: Waiter to be wake ++ * @bucket: Bucket to be decremented ++ * @wake_q: Wake queue to insert the task ++ */ ++static void futex_mark_wake(struct futex_waiter *waiter, ++ struct futex_bucket *bucket, ++ struct wake_q_head *wake_q) +{ -+ uintptr_t parent = waiter - sizeof(struct futexv) -+ - (uintptr_t) (index * sizeof(struct futex_waiter)); ++ struct task_struct *task; ++ struct futexv_head *parent = futex_get_parent((uintptr_t)waiter, ++ waiter->index); ++ ++ parent->hint = true; ++ task = parent->task; ++ get_task_struct(task); ++ list_del_init_careful(&waiter->list); ++ wake_q_add_safe(wake_q, task); ++ bucket_dec_waiters(bucket); ++} + -+ return (struct futexv *) parent; ++static inline bool futex_match(struct futex_key key1, struct futex_key key2) ++{ ++ return (key1.index == key2.index && ++ key1.pointer == key2.pointer && ++ key1.offset == key2.offset); +} + +/** + * sys_futex_wake - Wake a number of futexes waiting on an address + * @uaddr: Address of futex to be woken up -+ * @nr_wake: Number of futexes to be woken up -+ * @flags: TODO ++ * @nr_wake: Number of futexes waiting in uaddr to be woken up ++ * @flags: Flags for size and shared ++ * ++ * Wake `nr_wake` threads waiting at uaddr. ++ * ++ * Returns the number of woken threads on success, error code otherwise. + */ +SYSCALL_DEFINE3(futex_wake, void __user *, uaddr, unsigned int, nr_wake, + unsigned int, flags) @@ -602,7 +1086,6 @@ index 000000000..107b80a46 + unsigned int size = flags & FUTEX_SIZE_MASK; + struct futex_waiter waiter, *aux, *tmp; + struct futex_bucket *bucket; -+ struct task_struct *task; + DEFINE_WAKE_Q(wake_q); + int ret = 0; + @@ -616,26 +1099,15 @@ index 000000000..107b80a46 + if (IS_ERR(bucket)) + return PTR_ERR(bucket); + -+ if (!bucket_get_waiters(bucket)) ++ if (!bucket_get_waiters(bucket) || !nr_wake) + return 0; + + spin_lock(&bucket->lock); + list_for_each_entry_safe(aux, tmp, &bucket->list, list) { -+ if (ret >= nr_wake) -+ break; -+ -+ if (waiter.key.address == aux->key.address && -+ waiter.key.mm == aux->key.mm) { -+ struct futexv *parent = -+ futex_get_parent((uintptr_t) aux, aux->index); -+ -+ parent->hint = 1; -+ task = parent->task; -+ get_task_struct(task); -+ list_del_init_careful(&aux->list); -+ wake_q_add_safe(&wake_q, task); -+ ret++; -+ bucket_dec_waiters(bucket); ++ if (futex_match(waiter.key, aux->key)) { ++ futex_mark_wake(aux, bucket, &wake_q); ++ if (++ret >= nr_wake) ++ break; + } + } + spin_unlock(&bucket->lock); @@ -673,10 +1145,10 @@ index 000000000..107b80a46 +} +core_initcall(futex2_init); diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c -index f27ac94d5..35ff743b1 100644 +index 19aa80689..27ef83ca8 100644 --- a/kernel/sys_ni.c +++ b/kernel/sys_ni.c -@@ -148,6 +148,10 @@ COND_SYSCALL_COMPAT(set_robust_list); +@@ -150,6 +150,10 @@ COND_SYSCALL_COMPAT(set_robust_list); COND_SYSCALL(get_robust_list); COND_SYSCALL_COMPAT(get_robust_list); @@ -688,610 +1160,761 @@ index f27ac94d5..35ff743b1 100644 /* kernel/itimer.c */ diff --git a/tools/include/uapi/asm-generic/unistd.h b/tools/include/uapi/asm-generic/unistd.h -index 205631898..cd79f94e0 100644 +index 728752917..57e19200f 100644 --- a/tools/include/uapi/asm-generic/unistd.h +++ b/tools/include/uapi/asm-generic/unistd.h -@@ -860,8 +860,15 @@ __SYSCALL(__NR_faccessat2, sys_faccessat2) - #define __NR_process_madvise 440 - __SYSCALL(__NR_process_madvise, sys_process_madvise) +@@ -862,8 +862,14 @@ __SYSCALL(__NR_process_madvise, sys_process_madvise) + #define __NR_epoll_pwait2 441 + __SC_COMP(__NR_epoll_pwait2, sys_epoll_pwait2, compat_sys_epoll_pwait2) -+#define __NR_futex_wait 441 ++#define __NR_futex_wait 442 +__SYSCALL(__NR_futex_wait, sys_futex_wait) + -+#define __NR_futex_wake 442 ++#define __NR_futex_wake 443 +__SYSCALL(__NR_futex_wake, sys_futex_wake) + #undef __NR_syscalls --#define __NR_syscalls 441 -+#define __NR_syscalls 443 -+ +-#define __NR_syscalls 442 ++#define __NR_syscalls 444 /* * 32 bit systems traditionally used different diff --git a/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl b/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl -index 379819244..47de3bf93 100644 +index 78672124d..15d2b89b6 100644 --- a/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl +++ b/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl -@@ -362,6 +362,8 @@ - 438 common pidfd_getfd sys_pidfd_getfd +@@ -363,6 +363,8 @@ 439 common faccessat2 sys_faccessat2 440 common process_madvise sys_process_madvise -+441 common futex_wait sys_futex_wait -+442 common futex_wake sys_futex_wake + 441 common epoll_pwait2 sys_epoll_pwait2 ++442 common futex_wait sys_futex_wait ++443 common futex_wake sys_futex_wake # # Due to a historical design error, certain syscalls are numbered differently -- -2.29.2 +2.30.2 -From d71973d99efb1e2fd2542ea4d4b45b0e03e45b9c Mon Sep 17 00:00:00 2001 +From ea4e3d7ee8dc965fbe3cabd753b88ada23cecb39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Almeida?= -Date: Thu, 15 Oct 2020 17:15:57 -0300 -Subject: [PATCH 2/9] futex2: Add suport for vectorized wait +Date: Fri, 5 Feb 2021 10:34:01 -0300 +Subject: [PATCH 02/13] futex2: Add support for shared futexes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Add support to wait on multiple futexes +Add support for shared futexes for cross-process resources. This design +relies on the same approach done in old futex to create an unique id for +file-backed shared memory, by using a counter at struct inode. + +There are two types of futexes: private and shared ones. The private are +futexes meant to be used by threads that shares the same memory space, +are easier to be uniquely identified an thus can have some performance +optimization. The elements for identifying one are: the start address of +the page where the address is, the address offset within the page and +the current->mm pointer. + +Now, for uniquely identifying shared futex: + +- If the page containing the user address is an anonymous page, we can + just use the same data used for private futexes (the start address of + the page, the address offset within the page and the current->mm + pointer) that will be enough for uniquely identifying such futex. We + also set one bit at the key to differentiate if a private futex is + used on the same address (mixing shared and private calls are not + allowed). + +- If the page is file-backed, current->mm maybe isn't the same one for + every user of this futex, so we need to use other data: the + page->index, an UUID for the struct inode and the offset within the + page. + +Note that members of futex_key doesn't have any particular meaning after +they are part of the struct - they are just bytes to identify a futex. +Given that, we don't need to use a particular name or type that matches +the original data, we only need to care about the bitsize of each +component and make both private and shared data fit in the same memory +space. Signed-off-by: André Almeida Signed-off-by: Jan200101 --- - arch/x86/entry/syscalls/syscall_32.tbl | 1 + - arch/x86/entry/syscalls/syscall_64.tbl | 1 + - include/uapi/asm-generic/unistd.h | 5 +- - kernel/futex2.c | 430 ++++++++++++------ - kernel/sys_ni.c | 1 + - tools/include/uapi/asm-generic/unistd.h | 5 +- - .../arch/x86/entry/syscalls/syscall_64.tbl | 1 + - 7 files changed, 309 insertions(+), 135 deletions(-) + fs/inode.c | 1 + + include/linux/fs.h | 1 + + kernel/futex2.c | 220 +++++++++++++++++++++++++++++++++++++++++++-- + 3 files changed, 217 insertions(+), 5 deletions(-) -diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl -index 83a75ff39..65734d5e1 100644 ---- a/arch/x86/entry/syscalls/syscall_32.tbl -+++ b/arch/x86/entry/syscalls/syscall_32.tbl -@@ -447,3 +447,4 @@ - 440 i386 process_madvise sys_process_madvise - 441 i386 futex_wait sys_futex_wait - 442 i386 futex_wake sys_futex_wake -+443 i386 futex_waitv sys_futex_waitv -diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl -index 6658fd63c..f30811b56 100644 ---- a/arch/x86/entry/syscalls/syscall_64.tbl -+++ b/arch/x86/entry/syscalls/syscall_64.tbl -@@ -364,6 +364,7 @@ - 440 common process_madvise sys_process_madvise - 441 common futex_wait sys_futex_wait - 442 common futex_wake sys_futex_wake -+443 common futex_waitv sys_futex_waitv - - # - # Due to a historical design error, certain syscalls are numbered differently -diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h -index ae47d6a9e..81a90b697 100644 ---- a/include/uapi/asm-generic/unistd.h -+++ b/include/uapi/asm-generic/unistd.h -@@ -866,8 +866,11 @@ __SYSCALL(__NR_futex_wait, sys_futex_wait) - #define __NR_futex_wake 442 - __SYSCALL(__NR_futex_wake, sys_futex_wake) - -+#define __NR_futex_waitv 443 -+__SYSCALL(__NR_futex_waitv, sys_futex_waitv) -+ - #undef __NR_syscalls --#define __NR_syscalls 443 -+#define __NR_syscalls 444 - - /* - * 32 bit systems traditionally used different +diff --git a/fs/inode.c b/fs/inode.c +index 6442d97d9..886fe11cc 100644 +--- a/fs/inode.c ++++ b/fs/inode.c +@@ -139,6 +139,7 @@ int inode_init_always(struct super_block *sb, struct inode *inode) + inode->i_blkbits = sb->s_blocksize_bits; + inode->i_flags = 0; + atomic64_set(&inode->i_sequence, 0); ++ atomic64_set(&inode->i_sequence2, 0); + atomic_set(&inode->i_count, 1); + inode->i_op = &empty_iops; + inode->i_fop = &no_open_fops; +diff --git a/include/linux/fs.h b/include/linux/fs.h +index fd47deea7..516bda982 100644 +--- a/include/linux/fs.h ++++ b/include/linux/fs.h +@@ -681,6 +681,7 @@ struct inode { + }; + atomic64_t i_version; + atomic64_t i_sequence; /* see futex */ ++ atomic64_t i_sequence2; /* see futex2 */ + atomic_t i_count; + atomic_t i_dio_count; + atomic_t i_writecount; diff --git a/kernel/futex2.c b/kernel/futex2.c -index 107b80a46..4b782b5ef 100644 +index 802578ad6..27767b2d0 100644 --- a/kernel/futex2.c +++ b/kernel/futex2.c -@@ -48,14 +48,25 @@ struct futex_bucket { - struct list_head list; - }; +@@ -14,8 +14,10 @@ + */ -+/** -+ * struct futexv - List of futexes to be waited -+ * @task: Task to be awaken -+ * @hint: Was someone on this list awaken? -+ * @objects: List of futexes -+ */ - struct futexv { - struct task_struct *task; -- int hint; -+ bool hint; - struct futex_waiter objects[0]; - }; + #include ++#include + #include + #include ++#include + #include + #include + #include +@@ -23,8 +25,8 @@ -+/** -+ * struct futex_single_waiter - Wrapper for a futexv of one element -+ * @futexv: TODO -+ * @waiter: TODO -+ */ - struct futex_single_waiter { -- struct futexv parent; -+ struct futexv futexv; - struct futex_waiter waiter; - } __packed; - -@@ -65,10 +76,10 @@ struct futex_bucket *futex_table; - #define FUTEX2_MASK (FUTEX_SIZE_MASK | FUTEX_SHARED_FLAG | \ - FUTEX_CLOCK_REALTIME) - --// mask for sys_futex_waitv -+/* mask for sys_futex_waitv flag */ - #define FUTEXV_MASK (FUTEX_CLOCK_REALTIME) - --// mask for each futex in futex_waitv list -+/* mask for each futex in futex_waitv list */ + /** + * struct futex_key - Components to build unique key for a futex +- * @pointer: Pointer to current->mm +- * @index: Start address of the page containing futex ++ * @pointer: Pointer to current->mm or inode's UUID for file backed futexes ++ * @index: Start address of the page containing futex or index of the page + * @offset: Address offset of uaddr in a page + */ + struct futex_key { +@@ -97,6 +99,11 @@ struct futex_single_waiter { + /* Mask for each futex in futex_waitv list */ #define FUTEXV_WAITER_MASK (FUTEX_SIZE_MASK | FUTEX_SHARED_FLAG) - int futex2_hashsize; -@@ -151,7 +162,7 @@ static struct futex_bucket *futex_get_bucket(void __user *uaddr, - * - * Check the comment at futex_get_user_val for more information. - */ --static int futex_get_user(u32 *uval, u32 *uaddr) -+static int futex_get_user(u32 *uval, u32 __user *uaddr) - { - int ret; ++#define is_object_shared ((futexv->objects[i].flags & FUTEX_SHARED_FLAG) ? true : false) ++ ++#define FUT_OFF_INODE 1 /* We set bit 0 if key has a reference on inode */ ++#define FUT_OFF_MMSHARED 2 /* We set bit 1 if key has a reference on mm */ ++ + struct futex_bucket *futex_table; + unsigned int futex2_hashsize; -@@ -194,95 +205,227 @@ static int futex_setup_time(struct __kernel_timespec __user *timo, - return 0; +@@ -143,16 +150,200 @@ static inline int bucket_get_waiters(struct futex_bucket *bucket) + #endif } +/** -+ * futex_dequeue_multiple - Remove multiple futexes from hash table -+ * @futexv: list of waiters -+ * @nr: number of futexes to be removed ++ * futex_get_inode_uuid - Gets an UUID for an inode ++ * @inode: inode to get UUID + * -+ * This function should be used after we found that this futex was in a queue. -+ * Thus, it needs to be removed before the next step. However, someone could -+ * wake it between the time of the first check and the time to get the lock for -+ * the bucket. Check one more time if the futex is there with the bucket locked. -+ * If it's there, just remove it and return true. Else, mark the removal as -+ * false and do nothing. ++ * Generate a machine wide unique identifier for this inode. + * -+ * Return: -+ * * -1 if no futex was woken during the removal -+ * * =< 0 at least one futex was found woken, index of the last one ++ * This relies on u64 not wrapping in the life-time of the machine; which with ++ * 1ns resolution means almost 585 years. ++ * ++ * This further relies on the fact that a well formed program will not unmap ++ * the file while it has a (shared) futex waiting on it. This mapping will have ++ * a file reference which pins the mount and inode. ++ * ++ * If for some reason an inode gets evicted and read back in again, it will get ++ * a new sequence number and will _NOT_ match, even though it is the exact same ++ * file. ++ * ++ * It is important that match_futex() will never have a false-positive, esp. ++ * for PI futexes that can mess up the state. The above argues that false-negatives ++ * are only possible for malformed programs. ++ * ++ * Returns: UUID for the given inode + */ -+static int futex_dequeue_multiple(struct futexv *futexv, unsigned int nr) ++static u64 futex_get_inode_uuid(struct inode *inode) +{ -+ int i, ret = -1; ++ static atomic64_t i_seq; ++ u64 old; + -+ for (i = 0; i < nr; i++) { -+ spin_lock(&futexv->objects[i].bucket->lock); -+ if (!list_empty_careful(&futexv->objects[i].list)) { -+ list_del_init_careful(&futexv->objects[i].list); -+ bucket_dec_waiters(futexv->objects[i].bucket); -+ } else { -+ ret = i; -+ } -+ spin_unlock(&futexv->objects[i].bucket->lock); -+ } ++ /* Does the inode already have a sequence number? */ ++ old = atomic64_read(&inode->i_sequence2); + -+ return ret; ++ if (likely(old)) ++ return old; ++ ++ for (;;) { ++ u64 new = atomic64_add_return(1, &i_seq); ++ ++ if (WARN_ON_ONCE(!new)) ++ continue; ++ ++ old = atomic64_cmpxchg_relaxed(&inode->i_sequence2, 0, new); ++ if (old) ++ return old; ++ return new; ++ } +} - - /** -- * futex_get_user_value - Get the value from the userspace address and compares -- * with the expected one. In success, leaves the function -- * holding the bucket lock. Else, hold no lock. -- * @bucket: hash bucket of this address -- * @uaddr: futex's userspace address -- * @val: expected value -- * @multiple: is this call in the wait on multiple path -+ * futex_enqueue - Check the value and enqueue a futex on a wait list -+ * -+ * @futexv: List of futexes -+ * @nr_futexes: Number of futexes in the list -+ * @awaken: If a futex was awaken during enqueueing, store the index here -+ * -+ * Get the value from the userspace address and compares with the expected one. -+ * In success, enqueue the futex in the correct bucket -+ * -+ * Get the value from user futex address. -+ * -+ * Since we are in a hurry, we use a spin lock and we can't sleep. -+ * Try to get the value with page fault disabled (when enable, we might -+ * sleep). -+ * -+ * If we fail, we aren't sure if the address is invalid or is just a -+ * page fault. Then, release the lock (so we can sleep) and try to get -+ * the value with page fault enabled. In order to trigger a page fault -+ * handling, we just call __get_user() again. If we sleep with enqueued -+ * futexes, we might miss a wake, so dequeue everything before sleeping. ++ ++/** ++ * futex_get_shared_key - Get a key for a shared futex ++ * @address: Futex memory address ++ * @mm: Current process mm_struct pointer ++ * @key: Key struct to be filled + * -+ * If get_user succeeds, this mean that the address is valid and we do -+ * the work again. Since we just handled the page fault, the page is -+ * likely pinned in memory and we should be luckier this time and be -+ * able to get the value. If we fail anyway, we will try again. -+ * -+ * If even with page faults enabled we get and error, this means that -+ * the address is not valid and we return from the syscall. -+ * -+ * If we got an unexpected value or need to treat a page fault and realized that -+ * a futex was awaken, we can priority this and return success. - * - * Return: 0 on success, error code otherwise - */ --static int futex_get_user_value(struct futex_bucket *bucket, u32 __user *uaddr, -- unsigned int val, bool multiple) -+static int futex_enqueue(struct futexv *futexv, unsigned int nr_futexes, -+ unsigned int *awaken) - { -- u32 uval; -- int ret; -+ int i, ret; -+ u32 uval, *uaddr, val; -+ struct futex_bucket *bucket; - -- /* -- * Get the value from user futex address. -- * -- * Since we are in a hurry, we use a spin lock and we can't sleep. -- * Try to get the value with page fault disabled (when enable, we might -- * sleep). -- * -- * If we fail, we aren't sure if the address is invalid or is just a -- * page fault. Then, release the lock (so we can sleep) and try to get -- * the value with page fault enabled. In order to trigger a page fault -- * handling, we just call __get_user() again. -- * -- * If get_user succeeds, this mean that the address is valid and we do -- * the loop again. Since we just handled the page fault, the page is -- * likely pinned in memory and we should be luckier this time and be -- * able to get the value. If we fail anyway, we will try again. -- * -- * If even with page faults enabled we get and error, this means that -- * the address is not valid and we return from the syscall. -- */ -- do { -- spin_lock(&bucket->lock); -+retry: -+ set_current_state(TASK_INTERRUPTIBLE); -+ -+ for (i = 0; i < nr_futexes; i++) { -+ uaddr = (u32 * __user) futexv->objects[i].key.address; -+ val = (u32) futexv->objects[i].val; -+ bucket = futexv->objects[i].bucket; -+ -+ bucket_inc_waiters(bucket); -+ spin_lock(&bucket->lock); - -- ret = futex_get_user(&uval, uaddr); -+ ret = futex_get_user(&uval, uaddr); - -- if (ret) { -+ if (unlikely(ret)) { - spin_unlock(&bucket->lock); -- if (multiple || __get_user(uval, uaddr)) -+ -+ bucket_dec_waiters(bucket); -+ __set_current_state(TASK_RUNNING); -+ *awaken = futex_dequeue_multiple(futexv, i); -+ -+ if (__get_user(uval, uaddr)) - return -EFAULT; - -+ if (*awaken >= 0) -+ return 0; -+ -+ goto retry; -+ } -+ -+ if (uval != val) { -+ spin_unlock(&bucket->lock); -+ -+ bucket_dec_waiters(bucket); -+ __set_current_state(TASK_RUNNING); -+ *awaken = futex_dequeue_multiple(futexv, i); -+ -+ if (*awaken >= 0) -+ return 0; -+ -+ return -EWOULDBLOCK; - } -- } while (ret); - -- if (uval != val) { -+ list_add_tail(&futexv->objects[i].list, &bucket->list); - spin_unlock(&bucket->lock); -- return -EWOULDBLOCK; - } - - return 0; - } - -+ -+static int __futex_wait(struct futexv *futexv, -+ unsigned int nr_futexes, -+ struct hrtimer_sleeper *timeout) ++ * Returns: 0 on success, error code otherwise ++ */ ++static int futex_get_shared_key(uintptr_t address, struct mm_struct *mm, ++ struct futex_key *key) +{ + int ret; -+ unsigned int awaken = -1; ++ struct page *page, *tail; ++ struct address_space *mapping; + -+ while (1) { -+ ret = futex_enqueue(futexv, nr_futexes, &awaken); ++again: ++ ret = get_user_pages_fast(address, 1, 0, &page); ++ if (ret < 0) ++ return ret; + -+ if (ret < 0) -+ break; ++ /* ++ * The treatment of mapping from this point on is critical. The page ++ * lock protects many things but in this context the page lock ++ * stabilizes mapping, prevents inode freeing in the shared ++ * file-backed region case and guards against movement to swap cache. ++ * ++ * Strictly speaking the page lock is not needed in all cases being ++ * considered here and page lock forces unnecessarily serialization ++ * From this point on, mapping will be re-verified if necessary and ++ * page lock will be acquired only if it is unavoidable ++ * ++ * Mapping checks require the head page for any compound page so the ++ * head page and mapping is looked up now. For anonymous pages, it ++ * does not matter if the page splits in the future as the key is ++ * based on the address. For filesystem-backed pages, the tail is ++ * required as the index of the page determines the key. For ++ * base pages, there is no tail page and tail == page. ++ */ ++ tail = page; ++ page = compound_head(page); ++ mapping = READ_ONCE(page->mapping); + -+ if (awaken <= 0) { -+ return awaken; -+ } ++ /* ++ * If page->mapping is NULL, then it cannot be a PageAnon ++ * page; but it might be the ZERO_PAGE or in the gate area or ++ * in a special mapping (all cases which we are happy to fail); ++ * or it may have been a good file page when get_user_pages_fast ++ * found it, but truncated or holepunched or subjected to ++ * invalidate_complete_page2 before we got the page lock (also ++ * cases which we are happy to fail). And we hold a reference, ++ * so refcount care in invalidate_complete_page's remove_mapping ++ * prevents drop_caches from setting mapping to NULL beneath us. ++ * ++ * The case we do have to guard against is when memory pressure made ++ * shmem_writepage move it from filecache to swapcache beneath us: ++ * an unlikely race, but we do need to retry for page->mapping. ++ */ ++ if (unlikely(!mapping)) { ++ int shmem_swizzled; + ++ /* ++ * Page lock is required to identify which special case above ++ * applies. If this is really a shmem page then the page lock ++ * will prevent unexpected transitions. ++ */ ++ lock_page(page); ++ shmem_swizzled = PageSwapCache(page) || page->mapping; ++ unlock_page(page); ++ put_page(page); + -+ /* Before sleeping, check if someone was woken */ -+ if (!futexv->hint && (!timeout || timeout->task)) -+ freezable_schedule(); ++ if (shmem_swizzled) ++ goto again; + -+ __set_current_state(TASK_RUNNING); ++ return -EFAULT; ++ } ++ ++ /* ++ * Private mappings are handled in a simple way. ++ * ++ * If the futex key is stored on an anonymous page, then the associated ++ * object is the mm which is implicitly pinned by the calling process. ++ * ++ * NOTE: When userspace waits on a MAP_SHARED mapping, even if ++ * it's a read-only handle, it's expected that futexes attach to ++ * the object not the particular process. ++ */ ++ if (PageAnon(page)) { ++ key->offset |= FUT_OFF_MMSHARED; ++ } else { ++ struct inode *inode; + + /* -+ * One of those things triggered this wake: ++ * The associated futex object in this case is the inode and ++ * the page->mapping must be traversed. Ordinarily this should ++ * be stabilised under page lock but it's not strictly ++ * necessary in this case as we just want to pin the inode, not ++ * update the radix tree or anything like that. + * -+ * * We have been removed from the bucket. futex_wake() woke -+ * us. We just need to dequeue return 0 to userspace. -+ * -+ * However, if no futex was dequeued by a futex_wake(): -+ * -+ * * If the there's a timeout and it has expired, -+ * return -ETIMEDOUT. -+ * -+ * * If there is a signal pending, something wants to kill our -+ * thread, return -ERESTARTSYS. -+ * -+ * * If there's no signal pending, it was a spurious wake -+ * (scheduler gave us a change to do some work, even if we -+ * don't want to). We need to remove ourselves from the -+ * bucket and add again, to prevent losing wakeups in the -+ * meantime. ++ * The RCU read lock is taken as the inode is finally freed ++ * under RCU. If the mapping still matches expectations then the ++ * mapping->host can be safely accessed as being a valid inode. + */ ++ rcu_read_lock(); + -+ ret = futex_dequeue_multiple(futexv, nr_futexes); ++ if (READ_ONCE(page->mapping) != mapping) { ++ rcu_read_unlock(); ++ put_page(page); + -+ /* Normal wake */ -+ if (ret >= 0) -+ break; ++ goto again; ++ } + -+ if (timeout && !timeout->task) -+ return -ETIMEDOUT; ++ inode = READ_ONCE(mapping->host); ++ if (!inode) { ++ rcu_read_unlock(); ++ put_page(page); + -+ /* signal */ -+ if (signal_pending(current)) -+ return -ERESTARTSYS; ++ goto again; ++ } ++ ++ key->pointer = futex_get_inode_uuid(inode); ++ key->index = (unsigned long)basepage_index(tail); ++ key->offset |= FUT_OFF_INODE; + -+ /* spurious wake, do everything again */ ++ rcu_read_unlock(); + } + -+ return ret; ++ put_page(page); ++ ++ return 0; +} + /** -- * futex_dequeue - Remove a futex from a queue -- * @bucket: current bucket holding the futex -- * @waiter: futex to be removed -+ * futex_wait - Setup the timer and wait on a list of futexes -+ * @futexv: List of waiters -+ * @nr_futexes: Number of waiters -+ * @timo: Timeout -+ * @timeout: Timeout -+ * @flags: Timeout flags + * futex_get_bucket - Check if the user address is valid, prepare internal + * data and calculate the hash + * @uaddr: futex user address + * @key: data that uniquely identifies a futex ++ * @shared: is this a shared futex? ++ * ++ * For private futexes, each uaddr will be unique for a given mm_struct, and it ++ * won't be freed for the life time of the process. For shared futexes, check ++ * futex_get_shared_key(). * -- * Return: True if futex was removed by this function, false if another wake -- * thread removed this futex. -- * -- * This function should be used after we found that this futex was in a queue. -- * Thus, it needs to be removed before the next step. However, someone could -- * wake it between the time of the first check and the time to get the lock for -- * the bucket. Check one more time if the futex is there with the bucket locked. -- * If it's there, just remove it and return true. Else, mark the removal as -- * false and do nothing. -+ * Return: error code, or a hint of one of the waiters + * Return: address of bucket on success, error code otherwise */ --static bool futex_dequeue(struct futex_bucket *bucket, struct futex_waiter *waiter) -+static int futex_wait(struct futexv *futexv, unsigned int nr_futexes, -+ struct __kernel_timespec __user *timo, -+ struct hrtimer_sleeper *timeout, unsigned int flags) + static struct futex_bucket *futex_get_bucket(void __user *uaddr, +- struct futex_key *key) ++ struct futex_key *key, ++ bool shared) { -- bool removed = true; -+ int ret; + uintptr_t address = (uintptr_t)uaddr; + u32 hash_key; +@@ -168,6 +359,9 @@ static struct futex_bucket *futex_get_bucket(void __user *uaddr, + key->pointer = (u64)address; + key->index = (unsigned long)current->mm; -- spin_lock(&bucket->lock); -- if (list_empty(&waiter->list)) -- removed = false; -- else -- list_del(&waiter->list); -- spin_unlock(&bucket->lock); -+ if (timo) { -+ ret = futex_setup_time(timo, timeout, flags); -+ if (ret) -+ return ret; ++ if (shared) ++ futex_get_shared_key(address, current->mm, key); ++ + /* Generate hash key for this futex using uaddr and current->mm */ + hash_key = jhash2((u32 *)key, sizeof(*key) / sizeof(u32), 0); -- if (removed) -- bucket_dec_waiters(bucket); -+ hrtimer_sleeper_start_expires(timeout, HRTIMER_MODE_ABS); -+ } +@@ -303,6 +497,7 @@ static int futex_enqueue(struct futexv_head *futexv, unsigned int nr_futexes, + int *awakened) + { + int i, ret; ++ bool retry = false; + u32 uval, *uaddr, val; + struct futex_bucket *bucket; -- return removed; -+ ret = __futex_wait(futexv, nr_futexes, timo ? timeout : NULL); -+ -+ -+ if (timo) -+ hrtimer_cancel(&timeout->timer); +@@ -313,6 +508,18 @@ static int futex_enqueue(struct futexv_head *futexv, unsigned int nr_futexes, + uaddr = (u32 * __user)futexv->objects[i].uaddr; + val = (u32)futexv->objects[i].val; + ++ if (is_object_shared && retry) { ++ struct futex_bucket *tmp = ++ futex_get_bucket((void *)uaddr, ++ &futexv->objects[i].key, true); ++ if (IS_ERR(tmp)) { ++ __set_current_state(TASK_RUNNING); ++ futex_dequeue_multiple(futexv, i); ++ return PTR_ERR(tmp); ++ } ++ futexv->objects[i].bucket = tmp; ++ } + -+ return ret; - } + bucket = futexv->objects[i].bucket; - /** -@@ -297,15 +440,20 @@ SYSCALL_DEFINE4(futex_wait, void __user *, uaddr, unsigned int, val, + bucket_inc_waiters(bucket); +@@ -333,6 +540,7 @@ static int futex_enqueue(struct futexv_head *futexv, unsigned int nr_futexes, + if (*awakened >= 0) + return 1; + ++ retry = true; + goto retry; + } + +@@ -474,6 +682,7 @@ static int futex_set_timer_and_wait(struct futexv_head *futexv, + SYSCALL_DEFINE4(futex_wait, void __user *, uaddr, unsigned int, val, + unsigned int, flags, struct __kernel_timespec __user *, timo) { ++ bool shared = (flags & FUTEX_SHARED_FLAG) ? true : false; unsigned int size = flags & FUTEX_SIZE_MASK; - struct hrtimer_sleeper timeout; -- struct futex_bucket *bucket; - struct futex_single_waiter wait_single; + struct futex_single_waiter wait_single = {0}; struct futex_waiter *waiter; -+ struct futexv *futexv; - int ret; +@@ -497,7 +706,7 @@ SYSCALL_DEFINE4(futex_wait, void __user *, uaddr, unsigned int, val, + INIT_LIST_HEAD(&waiter->list); -- wait_single.parent.task = current; -- wait_single.parent.hint = 0; -+ futexv = &wait_single.futexv; -+ futexv->task = current; -+ futexv->hint = false; -+ - waiter = &wait_single.waiter; - waiter->index = 0; -+ waiter->val = val; -+ -+ INIT_LIST_HEAD(&waiter->list); + /* Get an unlocked hash bucket */ +- waiter->bucket = futex_get_bucket(uaddr, &waiter->key); ++ waiter->bucket = futex_get_bucket(uaddr, &waiter->key, shared); + if (IS_ERR(waiter->bucket)) + return PTR_ERR(waiter->bucket); - if (flags & ~FUTEX2_MASK) - return -EINVAL; -@@ -313,85 +461,101 @@ SYSCALL_DEFINE4(futex_wait, void __user *, uaddr, unsigned int, val, +@@ -562,6 +771,7 @@ static inline bool futex_match(struct futex_key key1, struct futex_key key2) + SYSCALL_DEFINE3(futex_wake, void __user *, uaddr, unsigned int, nr_wake, + unsigned int, flags) + { ++ bool shared = (flags & FUTEX_SHARED_FLAG) ? true : false; + unsigned int size = flags & FUTEX_SIZE_MASK; + struct futex_waiter waiter, *aux, *tmp; + struct futex_bucket *bucket; +@@ -574,7 +784,7 @@ SYSCALL_DEFINE3(futex_wake, void __user *, uaddr, unsigned int, nr_wake, if (size != FUTEX_32) return -EINVAL; -- if (timo) { -- ret = futex_setup_time(timo, &timeout, flags); -- if (ret) -- return ret; -- } -- - /* Get an unlocked hash bucket */ -- bucket = futex_get_bucket(uaddr, &waiter->key); -- if (IS_ERR(bucket)) -- return PTR_ERR(bucket); -+ waiter->bucket = futex_get_bucket(uaddr, &waiter->key); -+ if (IS_ERR(waiter->bucket)) -+ return PTR_ERR(waiter->bucket); +- bucket = futex_get_bucket(uaddr, &waiter.key); ++ bucket = futex_get_bucket(uaddr, &waiter.key, shared); + if (IS_ERR(bucket)) + return PTR_ERR(bucket); + +-- +2.30.2 + + +From bdfdc48ad40d314933c7872f4818172e76bcd350 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Almeida?= +Date: Fri, 5 Feb 2021 10:34:00 -0300 +Subject: [PATCH 03/13] futex2: Implement vectorized wait +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Add support to wait on multiple futexes. This is the interface +implemented by this syscall: + +futex_waitv(struct futex_waitv *waiters, unsigned int nr_futexes, + unsigned int flags, struct timespec *timo) + +struct futex_waitv { + void *uaddr; + unsigned int val; + unsigned int flags; +}; + +Given an array of struct futex_waitv, wait on each uaddr. The thread +wakes if a futex_wake() is performed at any uaddr. The syscall returns +immediately if any waiter has *uaddr != val. *timo is an optional +timeout value for the operation. The flags argument of the syscall +should be used solely for specifying the timeout as realtime, if needed. +Flags for shared futexes, sizes, etc. should be used on the individual +flags of each waiter. + +Returns the array index of one of the awakened futexes. There’s no given +information of how many were awakened, or any particular attribute of it +(if it’s the first awakened, if it is of the smaller index...). + +Signed-off-by: André Almeida +Signed-off-by: Jan200101 +--- + arch/arm/tools/syscall.tbl | 1 + + arch/arm64/include/asm/unistd.h | 2 +- + arch/x86/entry/syscalls/syscall_32.tbl | 1 + + arch/x86/entry/syscalls/syscall_64.tbl | 1 + + include/linux/compat.h | 11 ++ + include/linux/syscalls.h | 4 + + include/uapi/asm-generic/unistd.h | 5 +- + kernel/futex2.c | 171 ++++++++++++++++++ + kernel/sys_ni.c | 1 + + tools/include/uapi/asm-generic/unistd.h | 5 +- + .../arch/x86/entry/syscalls/syscall_64.tbl | 1 + + 11 files changed, 200 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/tools/syscall.tbl b/arch/arm/tools/syscall.tbl +index 4eef220cd..6d0f6626a 100644 +--- a/arch/arm/tools/syscall.tbl ++++ b/arch/arm/tools/syscall.tbl +@@ -457,3 +457,4 @@ + 441 common epoll_pwait2 sys_epoll_pwait2 + 442 common futex_wait sys_futex_wait + 443 common futex_wake sys_futex_wake ++444 common futex_waitv sys_futex_waitv +diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h +index d1f7d35f9..64ebdc1ec 100644 +--- a/arch/arm64/include/asm/unistd.h ++++ b/arch/arm64/include/asm/unistd.h +@@ -38,7 +38,7 @@ + #define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE + 5) + #define __ARM_NR_COMPAT_END (__ARM_NR_COMPAT_BASE + 0x800) + +-#define __NR_compat_syscalls 444 ++#define __NR_compat_syscalls 445 + #endif + + #define __ARCH_WANT_SYS_CLONE +diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl +index ece90c8d9..fe242fa0b 100644 +--- a/arch/x86/entry/syscalls/syscall_32.tbl ++++ b/arch/x86/entry/syscalls/syscall_32.tbl +@@ -448,3 +448,4 @@ + 441 i386 epoll_pwait2 sys_epoll_pwait2 compat_sys_epoll_pwait2 + 442 i386 futex_wait sys_futex_wait + 443 i386 futex_wake sys_futex_wake ++444 i386 futex_waitv sys_futex_waitv compat_sys_futex_waitv +diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl +index 72fb65ef9..9d0f07e05 100644 +--- a/arch/x86/entry/syscalls/syscall_64.tbl ++++ b/arch/x86/entry/syscalls/syscall_64.tbl +@@ -365,6 +365,7 @@ + 441 common epoll_pwait2 sys_epoll_pwait2 + 442 common futex_wait sys_futex_wait + 443 common futex_wake sys_futex_wake ++444 common futex_waitv sys_futex_waitv -- if (timo) -- hrtimer_sleeper_start_expires(&timeout, HRTIMER_MODE_ABS); -+ ret = futex_wait(futexv, 1, timo, &timeout, flags); + # + # Due to a historical design error, certain syscalls are numbered differently +diff --git a/include/linux/compat.h b/include/linux/compat.h +index 6e65be753..041d18174 100644 +--- a/include/linux/compat.h ++++ b/include/linux/compat.h +@@ -365,6 +365,12 @@ struct compat_robust_list_head { + compat_uptr_t list_op_pending; + }; --retry: -- bucket_inc_waiters(bucket); ++struct compat_futex_waitv { ++ compat_uptr_t uaddr; ++ compat_uint_t val; ++ compat_uint_t flags; ++}; ++ + #ifdef CONFIG_COMPAT_OLD_SIGACTION + struct compat_old_sigaction { + compat_uptr_t sa_handler; +@@ -654,6 +660,11 @@ asmlinkage long + compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr, + compat_size_t __user *len_ptr); + ++/* kernel/futex2.c */ ++asmlinkage long compat_sys_futex_waitv(struct compat_futex_waitv *waiters, ++ compat_uint_t nr_futexes, compat_uint_t flags, ++ struct __kernel_timespec __user *timo); ++ + /* kernel/itimer.c */ + asmlinkage long compat_sys_getitimer(int which, + struct old_itimerval32 __user *it); +diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h +index bf146c2b0..7da1ceb36 100644 +--- a/include/linux/syscalls.h ++++ b/include/linux/syscalls.h +@@ -68,6 +68,7 @@ union bpf_attr; + struct io_uring_params; + struct clone_args; + struct open_how; ++struct futex_waitv; + + #include + #include +@@ -624,6 +625,9 @@ asmlinkage long sys_futex_wait(void __user *uaddr, unsigned int val, + struct __kernel_timespec __user __user *timo); + asmlinkage long sys_futex_wake(void __user *uaddr, unsigned int nr_wake, + unsigned int flags); ++asmlinkage long sys_futex_waitv(struct futex_waitv __user *waiters, ++ unsigned int nr_futexes, unsigned int flags, ++ struct __kernel_timespec __user *timo); + + /* kernel/hrtimer.c */ + asmlinkage long sys_nanosleep(struct __kernel_timespec __user *rqtp, +diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h +index 57e19200f..090da8e12 100644 +--- a/include/uapi/asm-generic/unistd.h ++++ b/include/uapi/asm-generic/unistd.h +@@ -868,8 +868,11 @@ __SYSCALL(__NR_futex_wait, sys_futex_wait) + #define __NR_futex_wake 443 + __SYSCALL(__NR_futex_wake, sys_futex_wake) + ++#define __NR_futex_waitv 444 ++__SC_COMP(__NR_futex_waitv, sys_futex_waitv, compat_sys_futex_waitv) ++ + #undef __NR_syscalls +-#define __NR_syscalls 444 ++#define __NR_syscalls 445 + + /* + * 32 bit systems traditionally used different +diff --git a/kernel/futex2.c b/kernel/futex2.c +index 27767b2d0..f3c2379ab 100644 +--- a/kernel/futex2.c ++++ b/kernel/futex2.c +@@ -713,6 +713,177 @@ SYSCALL_DEFINE4(futex_wait, void __user *, uaddr, unsigned int, val, + return futex_set_timer_and_wait(futexv, 1, timo, flags); + } + ++#ifdef CONFIG_COMPAT ++/** ++ * compat_futex_parse_waitv - Parse a waitv array from userspace ++ * @futexv: Kernel side list of waiters to be filled ++ * @uwaitv: Userspace list to be parsed ++ * @nr_futexes: Length of futexv ++ * ++ * Return: Error code on failure, pointer to a prepared futexv otherwise ++ */ ++static int compat_futex_parse_waitv(struct futexv_head *futexv, ++ struct compat_futex_waitv __user *uwaitv, ++ unsigned int nr_futexes) ++{ ++ struct futex_bucket *bucket; ++ struct compat_futex_waitv waitv; ++ unsigned int i; ++ ++ for (i = 0; i < nr_futexes; i++) { ++ if (copy_from_user(&waitv, &uwaitv[i], sizeof(waitv))) ++ return -EFAULT; ++ ++ if ((waitv.flags & ~FUTEXV_WAITER_MASK) || ++ (waitv.flags & FUTEX_SIZE_MASK) != FUTEX_32) ++ return -EINVAL; ++ ++ futexv->objects[i].key.pointer = 0; ++ futexv->objects[i].flags = waitv.flags; ++ futexv->objects[i].uaddr = (uintptr_t)compat_ptr(waitv.uaddr); ++ futexv->objects[i].val = waitv.val; ++ futexv->objects[i].index = i; ++ ++ bucket = futex_get_bucket(compat_ptr(waitv.uaddr), ++ &futexv->objects[i].key, ++ is_object_shared); ++ ++ if (IS_ERR(bucket)) ++ return PTR_ERR(bucket); ++ ++ futexv->objects[i].bucket = bucket; ++ ++ INIT_LIST_HEAD(&futexv->objects[i].list); ++ } ++ ++ return 0; ++} ++ ++COMPAT_SYSCALL_DEFINE4(futex_waitv, struct compat_futex_waitv __user *, waiters, ++ unsigned int, nr_futexes, unsigned int, flags, ++ struct __kernel_timespec __user *, timo) ++{ ++ struct futexv_head *futexv; ++ int ret; ++ ++ if (flags & ~FUTEXV_MASK) ++ return -EINVAL; ++ ++ if (!nr_futexes || nr_futexes > FUTEX_WAITV_MAX || !waiters) ++ return -EINVAL; ++ ++ futexv = kmalloc((sizeof(struct futex_waiter) * nr_futexes) + ++ sizeof(*futexv), GFP_KERNEL); ++ if (!futexv) ++ return -ENOMEM; ++ ++ futexv->hint = false; ++ futexv->task = current; ++ ++ ret = compat_futex_parse_waitv(futexv, waiters, nr_futexes); ++ ++ if (!ret) ++ ret = futex_set_timer_and_wait(futexv, nr_futexes, timo, flags); ++ ++ kfree(futexv); ++ + return ret; +} - -- /* Compare the expected and current value, get the bucket lock */ -- ret = futex_get_user_value(bucket, uaddr, val, false); -- if (ret) { -- bucket_dec_waiters(bucket); -- goto out; -- } ++#endif ++ +/** + * futex_parse_waitv - Parse a waitv array from userspace -+ * @futexv: list of waiters -+ * @uwaitv: userspace list -+ * @nr_futexes: number of waiters in the list ++ * @futexv: Kernel side list of waiters to be filled ++ * @uwaitv: Userspace list to be parsed ++ * @nr_futexes: Length of futexv + * + * Return: Error code on failure, pointer to a prepared futexv otherwise + */ -+static int futex_parse_waitv(struct futexv *futexv, ++static int futex_parse_waitv(struct futexv_head *futexv, + struct futex_waitv __user *uwaitv, + unsigned int nr_futexes) +{ ++ struct futex_bucket *bucket; + struct futex_waitv waitv; + unsigned int i; -+ struct futex_bucket *bucket; - -- /* Add the waiter to the hash table and sleep */ -- set_current_state(TASK_INTERRUPTIBLE); -- list_add_tail(&waiter->list, &bucket->list); -- spin_unlock(&bucket->lock); ++ + for (i = 0; i < nr_futexes; i++) { + if (copy_from_user(&waitv, &uwaitv[i], sizeof(waitv))) + return -EFAULT; - -- /* Do not sleep if someone woke this futex or if it was timeouted */ -- if (!list_empty_careful(&waiter->list) && (!timo || timeout.task)) -- freezable_schedule(); ++ + if ((waitv.flags & ~FUTEXV_WAITER_MASK) || + (waitv.flags & FUTEX_SIZE_MASK) != FUTEX_32) + return -EINVAL; - -- __set_current_state(TASK_RUNNING); -+ bucket = futex_get_bucket(waitv.uaddr, -+ &futexv->objects[i].key); ++ ++ futexv->objects[i].key.pointer = 0; ++ futexv->objects[i].flags = waitv.flags; ++ futexv->objects[i].uaddr = (uintptr_t)waitv.uaddr; ++ futexv->objects[i].val = waitv.val; ++ futexv->objects[i].index = i; ++ ++ bucket = futex_get_bucket(waitv.uaddr, &futexv->objects[i].key, ++ is_object_shared); ++ + if (IS_ERR(bucket)) + return PTR_ERR(bucket); - -- /* -- * One of those things triggered this wake: -- * -- * * We have been removed from the bucket. futex_wake() woke us. We just -- * need to return 0 to userspace. -- * -- * However, if we find ourselves in the bucket we must remove ourselves -- * from the bucket and ... -- * -- * * If the there's a timeout and it has expired, return -ETIMEDOUT. -- * -- * * If there is a signal pending, something wants to kill our thread. -- * Return -ERESTARTSYS. -- * -- * * If there's no signal pending, it was a spurious wake (scheduler -- * gave us a change to do some work, even if we don't want to). We -- * need to remove ourselves from the bucket and add again, to prevent -- * losing wakeups in the meantime. -- */ ++ + futexv->objects[i].bucket = bucket; -+ futexv->objects[i].val = waitv.val; -+ futexv->objects[i].flags = waitv.flags; -+ futexv->objects[i].index = i; ++ + INIT_LIST_HEAD(&futexv->objects[i].list); + } - -- /* Normal wake */ -- if (list_empty_careful(&waiter->list)) -- goto out; ++ + return 0; +} - -- if (!futex_dequeue(bucket, waiter)) -- goto out; ++ +/** -+ * sys_futex_waitv - function -+ * @waiters: TODO -+ * @nr_futexes: TODO -+ * @flags: TODO -+ * @timo: TODO ++ * sys_futex_waitv - Wait on a list of futexes ++ * @waiters: List of futexes to wait on ++ * @nr_futexes: Length of futexv ++ * @flags: Flag for timeout (monotonic/realtime) ++ * @timo: Optional absolute timeout. ++ * ++ * Given an array of `struct futex_waitv`, wait on each uaddr. The thread wakes ++ * if a futex_wake() is performed at any uaddr. The syscall returns immediately ++ * if any waiter has *uaddr != val. *timo is an optional timeout value for the ++ * operation. Each waiter has individual flags. The `flags` argument for the ++ * syscall should be used solely for specifying the timeout as realtime, if ++ * needed. Flags for shared futexes, sizes, etc. should be used on the ++ * individual flags of each waiter. ++ * ++ * Returns the array index of one of the awaken futexes. There's no given ++ * information of how many were awakened, or any particular attribute of it (if ++ * it's the first awakened, if it is of the smaller index...). + */ +SYSCALL_DEFINE4(futex_waitv, struct futex_waitv __user *, waiters, + unsigned int, nr_futexes, unsigned int, flags, + struct __kernel_timespec __user *, timo) +{ -+ struct hrtimer_sleeper timeout; -+ struct futexv *futexv; ++ struct futexv_head *futexv; + int ret; - -- /* Timeout */ -- if (timo && !timeout.task) -- return -ETIMEDOUT; ++ + if (flags & ~FUTEXV_MASK) + return -EINVAL; - -- /* Spurious wakeup */ -- if (!signal_pending(current)) -- goto retry; ++ + if (!nr_futexes || nr_futexes > FUTEX_WAITV_MAX || !waiters) + return -EINVAL; - -- /* Some signal is pending */ -- ret = -ERESTARTSYS; --out: -- if (timo) -- hrtimer_cancel(&timeout.timer); -+ futexv = kmalloc(sizeof(struct futexv) + -+ (sizeof(struct futex_waiter) * nr_futexes), -+ GFP_KERNEL); ++ ++ futexv = kmalloc((sizeof(struct futex_waiter) * nr_futexes) + ++ sizeof(*futexv), GFP_KERNEL); + if (!futexv) + return -ENOMEM; + @@ -1300,37 +1923,21 @@ index 107b80a46..4b782b5ef 100644 + + ret = futex_parse_waitv(futexv, waiters, nr_futexes); + if (!ret) -+ ret = futex_wait(futexv, nr_futexes, timo, &timeout, flags); ++ ret = futex_set_timer_and_wait(futexv, nr_futexes, timo, flags); + + kfree(futexv); - - return ret; - } - -+/** -+ * futex_get_parent - Get parent -+ * @waiter: TODO -+ * @index: TODO -+ * -+ * Return: TODO -+ */ - static struct futexv *futex_get_parent(uintptr_t waiter, u8 index) - { - uintptr_t parent = waiter - sizeof(struct futexv) -@@ -439,7 +603,7 @@ SYSCALL_DEFINE3(futex_wake, void __user *, uaddr, unsigned int, nr_wake, - struct futexv *parent = - futex_get_parent((uintptr_t) aux, aux->index); - -- parent->hint = 1; -+ parent->hint = true; - task = parent->task; - get_task_struct(task); - list_del_init_careful(&aux->list); ++ ++ return ret; ++} ++ + /** + * futex_get_parent - For a given futex in a futexv list, get a pointer to the futexv + * @waiter: Address of futex in the list diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c -index 35ff743b1..1898e7340 100644 +index 27ef83ca8..977890c58 100644 --- a/kernel/sys_ni.c +++ b/kernel/sys_ni.c -@@ -151,6 +151,7 @@ COND_SYSCALL_COMPAT(get_robust_list); +@@ -153,6 +153,7 @@ COND_SYSCALL_COMPAT(get_robust_list); /* kernel/futex2.c */ COND_SYSCALL(futex_wait); COND_SYSCALL(futex_wake); @@ -1339,465 +1946,827 @@ index 35ff743b1..1898e7340 100644 /* kernel/hrtimer.c */ diff --git a/tools/include/uapi/asm-generic/unistd.h b/tools/include/uapi/asm-generic/unistd.h -index cd79f94e0..7de33be59 100644 +index 57e19200f..23febe59e 100644 --- a/tools/include/uapi/asm-generic/unistd.h +++ b/tools/include/uapi/asm-generic/unistd.h -@@ -866,8 +866,11 @@ __SYSCALL(__NR_futex_wait, sys_futex_wait) - #define __NR_futex_wake 442 +@@ -868,8 +868,11 @@ __SYSCALL(__NR_futex_wait, sys_futex_wait) + #define __NR_futex_wake 443 __SYSCALL(__NR_futex_wake, sys_futex_wake) -+#define __NR_futex_waitv 443 -+__SYSCALL(__NR_futex_waitv, sys_futex_waitv) ++#define __NR_futex_waitv 444 ++__SYSCALL(__NR_futex_wait, sys_futex_wait) + #undef __NR_syscalls --#define __NR_syscalls 443 -+#define __NR_syscalls 444 - +-#define __NR_syscalls 444 ++#define __NR_syscalls 445 /* + * 32 bit systems traditionally used different diff --git a/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl b/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl -index 47de3bf93..bd47f368f 100644 +index 15d2b89b6..820c1e4b1 100644 --- a/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl +++ b/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl -@@ -364,6 +364,7 @@ - 440 common process_madvise sys_process_madvise - 441 common futex_wait sys_futex_wait - 442 common futex_wake sys_futex_wake -+443 common futex_waitv sys_futex_waitv +@@ -365,6 +365,7 @@ + 441 common epoll_pwait2 sys_epoll_pwait2 + 442 common futex_wait sys_futex_wait + 443 common futex_wake sys_futex_wake ++444 common futex_waitv sys_futex_waitv # # Due to a historical design error, certain syscalls are numbered differently -- -2.29.2 +2.30.2 -From 24681616a5432f7680f934abf335a9ab9a1eaf1e Mon Sep 17 00:00:00 2001 +From e1198b0e26063ba40993154176b8232f646c3c4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Almeida?= -Date: Thu, 15 Oct 2020 18:06:40 -0300 -Subject: [PATCH 3/9] futex2: Add support for shared futexes +Date: Fri, 5 Feb 2021 10:34:01 -0300 +Subject: [PATCH 04/13] futex2: Implement requeue operation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Add support for shared futexes for cross-process resources. +Implement requeue interface similarly to FUTEX_CMP_REQUEUE operation. +This is the syscall implemented by this patch: + +futex_requeue(struct futex_requeue *uaddr1, struct futex_requeue *uaddr2, + unsigned int nr_wake, unsigned int nr_requeue, + unsigned int cmpval, unsigned int flags) + +struct futex_requeue { + void *uaddr; + unsigned int flags; +}; + +If (uaddr1->uaddr == cmpval), wake at uaddr1->uaddr a nr_wake number of +waiters and then, remove a number of nr_requeue waiters at uaddr1->uaddr +and add them to uaddr2->uaddr list. Each uaddr has its own set of flags, +that must be defined at struct futex_requeue (such as size, shared, NUMA). +The flags argument of the syscall is there just for the sake of +extensibility, and right now it needs to be zero. + +Return the number of the woken futexes + the number of requeued ones on +success, error code otherwise. Signed-off-by: André Almeida +--- + +The original FUTEX_CMP_REQUEUE interfaces is such as follows: + +futex(*uaddr1, FUTEX_CMP_REQUEUE, nr_wake, nr_requeue, *uaddr2, cmpval); + +Given that when this interface was created they was only one type of +futex (as opposed to futex2, where there is shared, sizes, and NUMA), +there was no way to specify individual flags for uaddr1 and 2. When +FUTEX_PRIVATE was implemented, a new opcode was created as well +(FUTEX_CMP_REQUEUE_PRIVATE), but they apply both futexes, so they +should be of the same type regarding private/shared. This imposes a +limitation on the use cases of the operation, and to overcome that at futex2, +`struct futex_requeue` was created, so one can set individual flags for +each futex. This flexibility is a trade-off with performance, given that +now we need to perform two extra copy_from_user(). One alternative would +be to use the upper half of flags bits to the first one, and the bottom +half for the second futex, but this would also impose limitations, given +that we would limit by half the flags possibilities. If equal futexes +are common enough, the following extension could be added to overcome +the current performance: + +- A flag FUTEX_REQUEUE_EQUAL is added to futex2() flags; +- If futex_requeue() see this flag, that means that both futexes uses + the same set of attributes. +- Then, the function parses the flags as of futex_wait/wake(). +- *uaddr1 and *uaddr2 are used as void* (instead of struct + futex_requeue) just like wait/wake(). + +In that way, we could avoid the copy_from_user(). + Signed-off-by: Jan200101 --- - kernel/futex2.c | 187 ++++++++++++++++++++++++++++++++++++++++++------ - 1 file changed, 165 insertions(+), 22 deletions(-) + arch/arm/tools/syscall.tbl | 1 + + arch/arm64/include/asm/unistd.h | 2 +- + arch/x86/entry/syscalls/syscall_32.tbl | 1 + + arch/x86/entry/syscalls/syscall_64.tbl | 1 + + include/linux/compat.h | 12 ++ + include/linux/syscalls.h | 5 + + include/uapi/asm-generic/unistd.h | 5 +- + kernel/futex2.c | 215 +++++++++++++++++++++++++ + kernel/sys_ni.c | 1 + + 9 files changed, 241 insertions(+), 2 deletions(-) +diff --git a/arch/arm/tools/syscall.tbl b/arch/arm/tools/syscall.tbl +index 6d0f6626a..9aa108802 100644 +--- a/arch/arm/tools/syscall.tbl ++++ b/arch/arm/tools/syscall.tbl +@@ -458,3 +458,4 @@ + 442 common futex_wait sys_futex_wait + 443 common futex_wake sys_futex_wake + 444 common futex_waitv sys_futex_waitv ++445 common futex_requeue sys_futex_requeue +diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h +index 64ebdc1ec..d1cc2849d 100644 +--- a/arch/arm64/include/asm/unistd.h ++++ b/arch/arm64/include/asm/unistd.h +@@ -38,7 +38,7 @@ + #define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE + 5) + #define __ARM_NR_COMPAT_END (__ARM_NR_COMPAT_BASE + 0x800) + +-#define __NR_compat_syscalls 445 ++#define __NR_compat_syscalls 446 + #endif + + #define __ARCH_WANT_SYS_CLONE +diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl +index fe242fa0b..0cd1df235 100644 +--- a/arch/x86/entry/syscalls/syscall_32.tbl ++++ b/arch/x86/entry/syscalls/syscall_32.tbl +@@ -449,3 +449,4 @@ + 442 i386 futex_wait sys_futex_wait + 443 i386 futex_wake sys_futex_wake + 444 i386 futex_waitv sys_futex_waitv compat_sys_futex_waitv ++445 i386 futex_requeue sys_futex_requeue compat_sys_futex_requeue +diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl +index 9d0f07e05..abbfddcdb 100644 +--- a/arch/x86/entry/syscalls/syscall_64.tbl ++++ b/arch/x86/entry/syscalls/syscall_64.tbl +@@ -366,6 +366,7 @@ + 442 common futex_wait sys_futex_wait + 443 common futex_wake sys_futex_wake + 444 common futex_waitv sys_futex_waitv ++445 common futex_requeue sys_futex_requeue + + # + # Due to a historical design error, certain syscalls are numbered differently +diff --git a/include/linux/compat.h b/include/linux/compat.h +index 041d18174..d4c1b402b 100644 +--- a/include/linux/compat.h ++++ b/include/linux/compat.h +@@ -371,6 +371,11 @@ struct compat_futex_waitv { + compat_uint_t flags; + }; + ++struct compat_futex_requeue { ++ compat_uptr_t uaddr; ++ compat_uint_t flags; ++}; ++ + #ifdef CONFIG_COMPAT_OLD_SIGACTION + struct compat_old_sigaction { + compat_uptr_t sa_handler; +@@ -665,6 +670,13 @@ asmlinkage long compat_sys_futex_waitv(struct compat_futex_waitv *waiters, + compat_uint_t nr_futexes, compat_uint_t flags, + struct __kernel_timespec __user *timo); + ++asmlinkage long compat_sys_futex_requeue(struct compat_futex_requeue *uaddr1, ++ struct compat_futex_requeue *uaddr2, ++ compat_uint_t nr_wake, ++ compat_uint_t nr_requeue, ++ compat_uint_t cmpval, ++ compat_uint_t flags); ++ + /* kernel/itimer.c */ + asmlinkage long compat_sys_getitimer(int which, + struct old_itimerval32 __user *it); +diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h +index 7da1ceb36..06823bc7e 100644 +--- a/include/linux/syscalls.h ++++ b/include/linux/syscalls.h +@@ -69,6 +69,7 @@ struct io_uring_params; + struct clone_args; + struct open_how; + struct futex_waitv; ++struct futex_requeue; + + #include + #include +@@ -628,6 +629,10 @@ asmlinkage long sys_futex_wake(void __user *uaddr, unsigned int nr_wake, + asmlinkage long sys_futex_waitv(struct futex_waitv __user *waiters, + unsigned int nr_futexes, unsigned int flags, + struct __kernel_timespec __user *timo); ++asmlinkage long sys_futex_requeue(struct futex_requeue __user *uaddr1, ++ struct futex_requeue __user *uaddr2, ++ unsigned int nr_wake, unsigned int nr_requeue, ++ unsigned int cmpval, unsigned int flags); + + /* kernel/hrtimer.c */ + asmlinkage long sys_nanosleep(struct __kernel_timespec __user *rqtp, +diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h +index 090da8e12..095c10a83 100644 +--- a/include/uapi/asm-generic/unistd.h ++++ b/include/uapi/asm-generic/unistd.h +@@ -871,8 +871,11 @@ __SYSCALL(__NR_futex_wake, sys_futex_wake) + #define __NR_futex_waitv 444 + __SC_COMP(__NR_futex_waitv, sys_futex_waitv, compat_sys_futex_waitv) + ++#define __NR_futex_requeue 445 ++__SC_COMP(__NR_futex_requeue, sys_futex_requeue, compat_sys_futex_requeue) ++ + #undef __NR_syscalls +-#define __NR_syscalls 445 ++#define __NR_syscalls 446 + + /* + * 32 bit systems traditionally used different diff --git a/kernel/futex2.c b/kernel/futex2.c -index 4b782b5ef..5ddb9922d 100644 +index f3c2379ab..bad8c183c 100644 --- a/kernel/futex2.c +++ b/kernel/futex2.c -@@ -6,7 +6,9 @@ - */ - - #include -+#include - #include -+#include - #include - #include - #include -@@ -15,6 +17,7 @@ - - /** - * struct futex_waiter - List entry for a waiter -+ * @uaddr: Memory address of userspace futex - * @key.address: Memory address of userspace futex - * @key.mm: Pointer to memory management struct of this process - * @key: Stores information that uniquely identify a futex -@@ -25,9 +28,11 @@ - * @index: Index of waiter in futexv list - */ - struct futex_waiter { -+ uintptr_t uaddr; - struct futex_key { - uintptr_t address; - struct mm_struct *mm; -+ unsigned long int offset; - } key; - struct list_head list; - unsigned int val; -@@ -125,16 +130,116 @@ static inline int bucket_get_waiters(struct futex_bucket *bucket) - #endif +@@ -977,6 +977,221 @@ SYSCALL_DEFINE3(futex_wake, void __user *, uaddr, unsigned int, nr_wake, + return ret; } -+static u64 get_inode_sequence_number(struct inode *inode) ++static void futex_double_unlock(struct futex_bucket *b1, struct futex_bucket *b2) +{ -+ static atomic64_t i_seq; -+ u64 old; ++ spin_unlock(&b1->lock); ++ if (b1 != b2) ++ spin_unlock(&b2->lock); ++} ++ ++static inline int __futex_requeue(struct futex_requeue rq1, ++ struct futex_requeue rq2, unsigned int nr_wake, ++ unsigned int nr_requeue, unsigned int cmpval, ++ bool shared1, bool shared2) ++{ ++ struct futex_waiter w1, w2, *aux, *tmp; ++ bool retry = false; ++ struct futex_bucket *b1, *b2; ++ DEFINE_WAKE_Q(wake_q); ++ u32 uval; ++ int ret; ++ ++ b1 = futex_get_bucket(rq1.uaddr, &w1.key, shared1); ++ if (IS_ERR(b1)) ++ return PTR_ERR(b1); ++ ++ b2 = futex_get_bucket(rq2.uaddr, &w2.key, shared2); ++ if (IS_ERR(b2)) ++ return PTR_ERR(b2); + -+ /* Does the inode already have a sequence number? */ -+ old = atomic64_read(&inode->i_sequence); -+ if (likely(old)) -+ return old; ++retry: ++ if (shared1 && retry) { ++ b1 = futex_get_bucket(rq1.uaddr, &w1.key, shared1); ++ if (IS_ERR(b1)) ++ return PTR_ERR(b1); ++ } + -+ for (;;) { -+ u64 new = atomic64_add_return(1, &i_seq); -+ if (WARN_ON_ONCE(!new)) -+ continue; ++ if (shared2 && retry) { ++ b2 = futex_get_bucket(rq2.uaddr, &w2.key, shared2); ++ if (IS_ERR(b2)) ++ return PTR_ERR(b2); ++ } + -+ old = atomic64_cmpxchg_relaxed(&inode->i_sequence, 0, new); -+ if (old) -+ return old; -+ return new; ++ bucket_inc_waiters(b2); ++ /* ++ * To ensure the locks are taken in the same order for all threads (and ++ * thus avoiding deadlocks), take the "smaller" one first ++ */ ++ if (b1 <= b2) { ++ spin_lock(&b1->lock); ++ if (b1 < b2) ++ spin_lock_nested(&b2->lock, SINGLE_DEPTH_NESTING); ++ } else { ++ spin_lock(&b2->lock); ++ spin_lock_nested(&b1->lock, SINGLE_DEPTH_NESTING); + } -+} + -+#define FUT_OFF_INODE 1 /* We set bit 0 if key has a reference on inode */ -+#define FUT_OFF_MMSHARED 2 /* We set bit 1 if key has a reference on mm */ ++ ret = futex_get_user(&uval, rq1.uaddr); + -+static int futex_get_shared_key(uintptr_t address, struct mm_struct *mm, -+ struct futex_key *key) -+{ -+ int err; -+ struct page *page, *tail; -+ struct address_space *mapping; ++ if (unlikely(ret)) { ++ futex_double_unlock(b1, b2); ++ if (__get_user(uval, (u32 * __user)rq1.uaddr)) ++ return -EFAULT; + -+again: -+ err = get_user_pages_fast(address, 1, 0, &page); ++ bucket_dec_waiters(b2); ++ retry = true; ++ goto retry; ++ } + -+ if (err < 0) -+ return err; -+ else -+ err = 0; ++ if (uval != cmpval) { ++ futex_double_unlock(b1, b2); + ++ bucket_dec_waiters(b2); ++ return -EAGAIN; ++ } + -+ tail = page; -+ page = compound_head(page); -+ mapping = READ_ONCE(page->mapping); ++ list_for_each_entry_safe(aux, tmp, &b1->list, list) { ++ if (futex_match(w1.key, aux->key)) { ++ if (ret < nr_wake) { ++ futex_mark_wake(aux, b1, &wake_q); ++ ret++; ++ continue; ++ } + ++ if (ret >= nr_wake + nr_requeue) ++ break; + -+ if (unlikely(!mapping)) { -+ int shmem_swizzled; ++ aux->key.pointer = w2.key.pointer; ++ aux->key.index = w2.key.index; ++ aux->key.offset = w2.key.offset; + -+ lock_page(page); -+ shmem_swizzled = PageSwapCache(page) || page->mapping; -+ unlock_page(page); -+ put_page(page); ++ if (b1 != b2) { ++ list_del_init_careful(&aux->list); ++ bucket_dec_waiters(b1); + -+ if (shmem_swizzled) -+ goto again; ++ list_add_tail(&aux->list, &b2->list); ++ bucket_inc_waiters(b2); ++ } ++ ret++; ++ } ++ } ++ ++ futex_double_unlock(b1, b2); ++ wake_up_q(&wake_q); ++ bucket_dec_waiters(b2); ++ ++ return ret; ++} + ++#ifdef CONFIG_COMPAT ++static int compat_futex_parse_requeue(struct futex_requeue *rq, ++ struct compat_futex_requeue __user *uaddr, ++ bool *shared) ++{ ++ struct compat_futex_requeue tmp; ++ ++ if (copy_from_user(&tmp, uaddr, sizeof(tmp))) + return -EFAULT; -+ } + -+ if (PageAnon(page)) { ++ if (tmp.flags & ~FUTEXV_WAITER_MASK || ++ (tmp.flags & FUTEX_SIZE_MASK) != FUTEX_32) ++ return -EINVAL; + -+ key->mm = mm; -+ key->address = address; ++ *shared = (tmp.flags & FUTEX_SHARED_FLAG) ? true : false; + -+ key->offset |= FUT_OFF_MMSHARED; ++ rq->uaddr = compat_ptr(tmp.uaddr); ++ rq->flags = tmp.flags; + -+ } else { -+ struct inode *inode; ++ return 0; ++} + -+ rcu_read_lock(); ++COMPAT_SYSCALL_DEFINE6(futex_requeue, struct compat_futex_requeue __user *, uaddr1, ++ struct compat_futex_requeue __user *, uaddr2, ++ unsigned int, nr_wake, unsigned int, nr_requeue, ++ unsigned int, cmpval, unsigned int, flags) ++{ ++ struct futex_requeue rq1, rq2; ++ bool shared1, shared2; ++ int ret; + -+ if (READ_ONCE(page->mapping) != mapping) { -+ rcu_read_unlock(); -+ put_page(page); ++ if (flags) ++ return -EINVAL; + -+ goto again; -+ } ++ ret = compat_futex_parse_requeue(&rq1, uaddr1, &shared1); ++ if (ret) ++ return ret; + -+ inode = READ_ONCE(mapping->host); -+ if (!inode) { -+ rcu_read_unlock(); -+ put_page(page); ++ ret = compat_futex_parse_requeue(&rq2, uaddr2, &shared2); ++ if (ret) ++ return ret; + -+ goto again; -+ } ++ return __futex_requeue(rq1, rq2, nr_wake, nr_requeue, cmpval, shared1, shared2); ++} ++#endif + -+ key->address = get_inode_sequence_number(inode); -+ key->mm = (struct mm_struct *) basepage_index(tail); -+ key->offset |= FUT_OFF_INODE; ++/** ++ * futex_parse_requeue - Copy a user struct futex_requeue and check it's flags ++ * @rq: Kernel struct ++ * @uaddr: Address of user struct ++ * @shared: Out parameter, defines if this is a shared futex ++ * ++ * Return: 0 on success, error code otherwise ++ */ ++static int futex_parse_requeue(struct futex_requeue *rq, ++ struct futex_requeue __user *uaddr, bool *shared) ++{ ++ if (copy_from_user(rq, uaddr, sizeof(*rq))) ++ return -EFAULT; + -+ rcu_read_unlock(); -+ } ++ if (rq->flags & ~FUTEXV_WAITER_MASK || ++ (rq->flags & FUTEX_SIZE_MASK) != FUTEX_32) ++ return -EINVAL; + -+ put_page(page); -+ return err; ++ *shared = (rq->flags & FUTEX_SHARED_FLAG) ? true : false; ++ ++ return 0; +} + - /** - * futex_get_bucket - Check if the user address is valid, prepare internal - * data and calculate the hash - * @uaddr: futex user address - * @key: data that uniquely identifies a futex -+ * @shared: is this a shared futex? - * - * Return: address of bucket on success, error code otherwise - */ - static struct futex_bucket *futex_get_bucket(void __user *uaddr, -- struct futex_key *key) -+ struct futex_key *key, -+ bool shared) - { - uintptr_t address = (uintptr_t) uaddr; - u32 hash_key; -@@ -145,8 +250,15 @@ static struct futex_bucket *futex_get_bucket(void __user *uaddr, - if (unlikely(!access_ok(address, sizeof(u32)))) - return ERR_PTR(-EFAULT); - -- key->address = address; -- key->mm = current->mm; -+ key->offset = address % PAGE_SIZE; -+ address -= key->offset; ++/** ++ * sys_futex_requeue - Wake futexes at uaddr1 and requeue from uaddr1 to uaddr2 ++ * @uaddr1: Address of futexes to be waken/dequeued ++ * @uaddr2: Address for the futexes to be enqueued ++ * @nr_wake: Number of futexes waiting in uaddr1 to be woken up ++ * @nr_requeue: Number of futexes to be requeued from uaddr1 to uaddr2 ++ * @cmpval: Expected value at uaddr1 ++ * @flags: Reserved flags arg for requeue operation expansion. Must be 0. ++ * ++ * If (uaddr1->uaddr == cmpval), wake at uaddr1->uaddr a nr_wake number of ++ * waiters and then, remove a number of nr_requeue waiters at uaddr1->uaddr ++ * and add then to uaddr2->uaddr list. Each uaddr has its own set of flags, ++ * that must be defined at struct futex_requeue (such as size, shared, NUMA). ++ * ++ * Return the number of the woken futexes + the number of requeued ones on ++ * success, error code otherwise. ++ */ ++SYSCALL_DEFINE6(futex_requeue, struct futex_requeue __user *, uaddr1, ++ struct futex_requeue __user *, uaddr2, ++ unsigned int, nr_wake, unsigned int, nr_requeue, ++ unsigned int, cmpval, unsigned int, flags) ++{ ++ struct futex_requeue rq1, rq2; ++ bool shared1, shared2; ++ int ret; + -+ if (!shared) { -+ key->address = address; -+ key->mm = current->mm; -+ } else { -+ futex_get_shared_key(address, current->mm, key); -+ } - - /* Generate hash key for this futex using uaddr and current->mm */ - hash_key = jhash2((u32 *) key, sizeof(*key) / sizeof(u32), 0); -@@ -275,9 +387,10 @@ static int futex_dequeue_multiple(struct futexv *futexv, unsigned int nr) - * Return: 0 on success, error code otherwise - */ - static int futex_enqueue(struct futexv *futexv, unsigned int nr_futexes, -- unsigned int *awaken) -+ int *awaken) - { - int i, ret; -+ bool shared, retry = false; - u32 uval, *uaddr, val; - struct futex_bucket *bucket; - -@@ -285,8 +398,18 @@ static int futex_enqueue(struct futexv *futexv, unsigned int nr_futexes, - set_current_state(TASK_INTERRUPTIBLE); - - for (i = 0; i < nr_futexes; i++) { -- uaddr = (u32 * __user) futexv->objects[i].key.address; -+ uaddr = (u32 * __user) futexv->objects[i].uaddr; - val = (u32) futexv->objects[i].val; -+ shared = (futexv->objects[i].flags & FUTEX_SHARED_FLAG) ? true : false; ++ if (flags) ++ return -EINVAL; + -+ if (shared && retry) { -+ futexv->objects[i].bucket = -+ futex_get_bucket((void *) uaddr, -+ &futexv->objects[i].key, true); -+ if (IS_ERR(futexv->objects[i].bucket)) -+ return PTR_ERR(futexv->objects[i].bucket); -+ } ++ ret = futex_parse_requeue(&rq1, uaddr1, &shared1); ++ if (ret) ++ return ret; + - bucket = futexv->objects[i].bucket; - - bucket_inc_waiters(bucket); -@@ -301,24 +424,32 @@ static int futex_enqueue(struct futexv *futexv, unsigned int nr_futexes, - __set_current_state(TASK_RUNNING); - *awaken = futex_dequeue_multiple(futexv, i); - -+ if (shared) { -+ retry = true; -+ goto retry; -+ } ++ ret = futex_parse_requeue(&rq2, uaddr2, &shared2); ++ if (ret) ++ return ret; + - if (__get_user(uval, uaddr)) - return -EFAULT; - - if (*awaken >= 0) -- return 0; -+ return 1; - -+ retry = true; - goto retry; - } - - if (uval != val) { - spin_unlock(&bucket->lock); - ++ return __futex_requeue(rq1, rq2, nr_wake, nr_requeue, cmpval, shared1, shared2); ++} + - bucket_dec_waiters(bucket); - __set_current_state(TASK_RUNNING); - *awaken = futex_dequeue_multiple(futexv, i); - -- if (*awaken >= 0) -- return 0; -+ if (*awaken >= 0) { -+ return 1; -+ } - - return -EWOULDBLOCK; - } -@@ -336,19 +467,18 @@ static int __futex_wait(struct futexv *futexv, - struct hrtimer_sleeper *timeout) + static int __init futex2_init(void) { - int ret; -- unsigned int awaken = -1; - -- while (1) { -- ret = futex_enqueue(futexv, nr_futexes, &awaken); - -- if (ret < 0) -- break; -+ while (1) { -+ int awaken = -1; + int i; +diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c +index 977890c58..1750dfc41 100644 +--- a/kernel/sys_ni.c ++++ b/kernel/sys_ni.c +@@ -154,6 +154,7 @@ COND_SYSCALL_COMPAT(get_robust_list); + COND_SYSCALL(futex_wait); + COND_SYSCALL(futex_wake); + COND_SYSCALL(futex_waitv); ++COND_SYSCALL(futex_requeue); -- if (awaken <= 0) { -- return awaken; -+ ret = futex_enqueue(futexv, nr_futexes, &awaken); -+ if (ret) { -+ if (awaken >= 0) -+ return awaken; -+ return ret; - } + /* kernel/hrtimer.c */ -- - /* Before sleeping, check if someone was woken */ - if (!futexv->hint && (!timeout || timeout->task)) - freezable_schedule(); -@@ -419,6 +549,7 @@ static int futex_wait(struct futexv *futexv, unsigned int nr_futexes, - hrtimer_sleeper_start_expires(timeout, HRTIMER_MODE_ABS); - } +-- +2.30.2 + + +From 9ef45e80251029ad164b538b20f0d68a9b75865c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Almeida?= +Date: Thu, 11 Feb 2021 10:47:23 -0300 +Subject: [PATCH 05/13] futex2: Add compatibility entry point for x86_x32 ABI +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +New syscalls should use the same entry point for x86_64 and x86_x32 +paths. Add a wrapper for x32 calls to use parse functions that assumes +32bit pointers. + +Signed-off-by: André Almeida +Signed-off-by: Jan200101 +--- + kernel/futex2.c | 42 +++++++++++++++++++++++++++++++++++------- + 1 file changed, 35 insertions(+), 7 deletions(-) + +diff --git a/kernel/futex2.c b/kernel/futex2.c +index bad8c183c..8a8b45f98 100644 +--- a/kernel/futex2.c ++++ b/kernel/futex2.c +@@ -23,6 +23,10 @@ + #include + #include ++#ifdef CONFIG_X86_64 ++#include ++#endif + - ret = __futex_wait(futexv, nr_futexes, timo ? timeout : NULL); - - -@@ -438,9 +569,10 @@ static int futex_wait(struct futexv *futexv, unsigned int nr_futexes, - SYSCALL_DEFINE4(futex_wait, void __user *, uaddr, unsigned int, val, - unsigned int, flags, struct __kernel_timespec __user *, timo) - { -+ bool shared = (flags & FUTEX_SHARED_FLAG) ? true : false; - unsigned int size = flags & FUTEX_SIZE_MASK; -- struct hrtimer_sleeper timeout; - struct futex_single_waiter wait_single; -+ struct hrtimer_sleeper timeout; - struct futex_waiter *waiter; - struct futexv *futexv; - int ret; -@@ -452,6 +584,7 @@ SYSCALL_DEFINE4(futex_wait, void __user *, uaddr, unsigned int, val, - waiter = &wait_single.waiter; - waiter->index = 0; - waiter->val = val; -+ waiter->uaddr = (uintptr_t) uaddr; - - INIT_LIST_HEAD(&waiter->list); - -@@ -462,11 +595,14 @@ SYSCALL_DEFINE4(futex_wait, void __user *, uaddr, unsigned int, val, - return -EINVAL; - - /* Get an unlocked hash bucket */ -- waiter->bucket = futex_get_bucket(uaddr, &waiter->key); -- if (IS_ERR(waiter->bucket)) -+ waiter->bucket = futex_get_bucket(uaddr, &waiter->key, shared); -+ if (IS_ERR(waiter->bucket)) { - return PTR_ERR(waiter->bucket); + /** + * struct futex_key - Components to build unique key for a futex + * @pointer: Pointer to current->mm or inode's UUID for file backed futexes +@@ -875,7 +879,16 @@ SYSCALL_DEFINE4(futex_waitv, struct futex_waitv __user *, waiters, + futexv->hint = false; + futexv->task = current; + +- ret = futex_parse_waitv(futexv, waiters, nr_futexes); ++#ifdef CONFIG_X86_X32_ABI ++ if (in_x32_syscall()) { ++ ret = compat_futex_parse_waitv(futexv, (struct compat_futex_waitv *)waiters, ++ nr_futexes); ++ } else ++#endif ++ { ++ ret = futex_parse_waitv(futexv, waiters, nr_futexes); + } - - ret = futex_wait(futexv, 1, timo, &timeout, flags); -+ if (ret > 0) -+ ret = 0; - - return ret; - } -@@ -486,8 +622,10 @@ static int futex_parse_waitv(struct futexv *futexv, - struct futex_waitv waitv; - unsigned int i; - struct futex_bucket *bucket; -+ bool shared; - - for (i = 0; i < nr_futexes; i++) { -+ - if (copy_from_user(&waitv, &uwaitv[i], sizeof(waitv))) - return -EFAULT; - -@@ -495,8 +633,10 @@ static int futex_parse_waitv(struct futexv *futexv, - (waitv.flags & FUTEX_SIZE_MASK) != FUTEX_32) - return -EINVAL; - -+ shared = (waitv.flags & FUTEX_SHARED_FLAG) ? true : false; + - bucket = futex_get_bucket(waitv.uaddr, -- &futexv->objects[i].key); -+ &futexv->objects[i].key, shared); - if (IS_ERR(bucket)) - return PTR_ERR(bucket); - -@@ -505,6 +645,7 @@ static int futex_parse_waitv(struct futexv *futexv, - futexv->objects[i].flags = waitv.flags; - futexv->objects[i].index = i; - INIT_LIST_HEAD(&futexv->objects[i].list); -+ futexv->objects[i].uaddr = (uintptr_t) waitv.uaddr; - } + if (!ret) + ret = futex_set_timer_and_wait(futexv, nr_futexes, timo, flags); - return 0; -@@ -573,6 +714,7 @@ static struct futexv *futex_get_parent(uintptr_t waiter, u8 index) - SYSCALL_DEFINE3(futex_wake, void __user *, uaddr, unsigned int, nr_wake, - unsigned int, flags) - { -+ bool shared = (flags & FUTEX_SHARED_FLAG) ? true : false; - unsigned int size = flags & FUTEX_SIZE_MASK; - struct futex_waiter waiter, *aux, *tmp; - struct futex_bucket *bucket; -@@ -586,7 +728,7 @@ SYSCALL_DEFINE3(futex_wake, void __user *, uaddr, unsigned int, nr_wake, - if (size != FUTEX_32) +@@ -1181,13 +1194,28 @@ SYSCALL_DEFINE6(futex_requeue, struct futex_requeue __user *, uaddr1, + if (flags) return -EINVAL; -- bucket = futex_get_bucket(uaddr, &waiter.key); -+ bucket = futex_get_bucket(uaddr, &waiter.key, shared); - if (IS_ERR(bucket)) - return PTR_ERR(bucket); +- ret = futex_parse_requeue(&rq1, uaddr1, &shared1); +- if (ret) +- return ret; ++#ifdef CONFIG_X86_X32_ABI ++ if (in_x32_syscall()) { ++ ret = compat_futex_parse_requeue(&rq1, (struct compat_futex_requeue *)uaddr1, ++ &shared1); ++ if (ret) ++ return ret; -@@ -599,7 +741,8 @@ SYSCALL_DEFINE3(futex_wake, void __user *, uaddr, unsigned int, nr_wake, - break; +- ret = futex_parse_requeue(&rq2, uaddr2, &shared2); +- if (ret) +- return ret; ++ ret = compat_futex_parse_requeue(&rq2, (struct compat_futex_requeue *)uaddr2, ++ &shared2); ++ if (ret) ++ return ret; ++ } else ++#endif ++ { ++ ret = futex_parse_requeue(&rq1, uaddr1, &shared1); ++ if (ret) ++ return ret; ++ ++ ret = futex_parse_requeue(&rq2, uaddr2, &shared2); ++ if (ret) ++ return ret; ++ } - if (waiter.key.address == aux->key.address && -- waiter.key.mm == aux->key.mm) { -+ waiter.key.mm == aux->key.mm && -+ waiter.key.offset == aux->key.offset) { - struct futexv *parent = - futex_get_parent((uintptr_t) aux, aux->index); + return __futex_requeue(rq1, rq2, nr_wake, nr_requeue, cmpval, shared1, shared2); + } +-- +2.30.2 + + +From 80944da5db0f1e00d0bf174d85f74ae4df2444aa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Almeida?= +Date: Tue, 9 Feb 2021 13:59:00 -0300 +Subject: [PATCH 06/13] docs: locking: futex2: Add documentation +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Add a new documentation file specifying both userspace API and internal +implementation details of futex2 syscalls. + +Signed-off-by: André Almeida +Signed-off-by: Jan200101 +--- + Documentation/locking/futex2.rst | 198 +++++++++++++++++++++++++++++++ + Documentation/locking/index.rst | 1 + + 2 files changed, 199 insertions(+) + create mode 100644 Documentation/locking/futex2.rst + +diff --git a/Documentation/locking/futex2.rst b/Documentation/locking/futex2.rst +new file mode 100644 +index 000000000..edd47c22f +--- /dev/null ++++ b/Documentation/locking/futex2.rst +@@ -0,0 +1,198 @@ ++.. SPDX-License-Identifier: GPL-2.0 ++ ++====== ++futex2 ++====== ++ ++:Author: André Almeida ++ ++futex, or fast user mutex, is a set of syscalls to allow the userspace to create ++performant synchronization mechanisms, such as mutexes, semaphores and ++conditional variables in userspace. C standard libraries, like glibc, uses it ++as means to implements more high level interfaces like pthreads. ++ ++The interface ++============= ++ ++uAPI functions ++-------------- ++ ++.. kernel-doc:: kernel/futex2.c ++ :identifiers: sys_futex_wait sys_futex_wake sys_futex_waitv sys_futex_requeue ++ ++uAPI structures ++--------------- ++ ++.. kernel-doc:: include/uapi/linux/futex.h ++ ++The ``flag`` argument ++--------------------- ++ ++The flag is used to specify the size of the futex word ++(FUTEX_[8, 16, 32]). It's mandatory to define one, since there's no ++default size. ++ ++By default, the timeout uses a monotonic clock, but can be used as a realtime ++one by using the FUTEX_REALTIME_CLOCK flag. ++ ++By default, futexes are of the private type, that means that this user address ++will be accessed by threads that shares the same memory region. This allows for ++some internal optimizations, so they are faster. However, if the address needs ++to be shared with different processes (like using ``mmap()`` or ``shm()``), they ++need to be defined as shared and the flag FUTEX_SHARED_FLAG is used to set that. ++ ++By default, the operation has no NUMA-awareness, meaning that the user can't ++choose the memory node where the kernel side futex data will be stored. The ++user can choose the node where it wants to operate by setting the ++FUTEX_NUMA_FLAG and using the following structure (where X can be 8, 16, or ++32):: ++ ++ struct futexX_numa { ++ __uX value; ++ __sX hint; ++ }; ++ ++This structure should be passed at the ``void *uaddr`` of futex functions. The ++address of the structure will be used to be waited on/waken on, and the ++``value`` will be compared to ``val`` as usual. The ``hint`` member is used to ++defined which node the futex will use. When waiting, the futex will be ++registered on a kernel-side table stored on that node; when waking, the futex ++will be searched for on that given table. That means that there's no redundancy ++between tables, and the wrong ``hint`` value will led to undesired behavior. ++Userspace is responsible for dealing with node migrations issues that may ++occur. ``hint`` can range from [0, MAX_NUMA_NODES], for specifying a node, or ++-1, to use the same node the current process is using. ++ ++When not using FUTEX_NUMA_FLAG on a NUMA system, the futex will be stored on a ++global table on some node, defined at compilation time. ++ ++The ``timo`` argument ++--------------------- ++ ++As per the Y2038 work done in the kernel, new interfaces shouldn't add timeout ++options known to be buggy. Given that, ``timo`` should be a 64bit timeout at ++all platforms, using an absolute timeout value. ++ ++Implementation ++============== ++ ++The internal implementation follows a similar design to the original futex. ++Given that we want to replicate the same external behavior of current futex, ++this should be somewhat expected. ++ ++Waiting ++------- ++ ++For the wait operations, they are all treated as if you want to wait on N ++futexes, so the path for futex_wait and futex_waitv is the basically the same. ++For both syscalls, the first step is to prepare an internal list for the list ++of futexes to wait for (using struct futexv_head). For futex_wait() calls, this ++list will have a single object. ++ ++We have a hash table, were waiters register themselves before sleeping. Then, ++the wake function checks this table looking for waiters at uaddr. The hash ++bucket to be used is determined by a struct futex_key, that stores information ++to uniquely identify an address from a given process. Given the huge address ++space, there'll be hash collisions, so we store information to be later used on ++collision treatment. ++ ++First, for every futex we want to wait on, we check if (``*uaddr == val``). ++This check is done holding the bucket lock, so we are correctly serialized with ++any futex_wake() calls. If any waiter fails the check above, we dequeue all ++futexes. The check (``*uaddr == val``) can fail for two reasons: ++ ++- The values are different, and we return -EAGAIN. However, if while ++ dequeueing we found that some futex were awakened, we prioritize this ++ and return success. ++ ++- When trying to access the user address, we do so with page faults ++ disabled because we are holding a bucket's spin lock (and can't sleep ++ while holding a spin lock). If there's an error, it might be a page ++ fault, or an invalid address. We release the lock, dequeue everyone ++ (because it's illegal to sleep while there are futexes enqueued, we ++ could lose wakeups) and try again with page fault enabled. If we ++ succeeded, this means that the address is valid, but we need to do ++ all the work again. For serialization reasons, we need to have the ++ spin lock when getting the user value. Additionally, for shared ++ futexes, we also need to recalculate the hash, since the underlying ++ mapping mechanisms could have changed when dealing with page fault. ++ If, even with page fault enabled, we can't access the address, it ++ means it's an invalid user address, and we return -EFAULT. For this ++ case, we prioritize the error, even if some futex were awaken. ++ ++If the check is OK, they are enqueued on a linked list in our bucket, and ++proceed to the next one. If all waiters succeed, we put the thread to sleep ++until a futex_wake() call, timeout expires or we get a signal. After waking up, ++we dequeue everyone, and check if some futex was awaken. This dequeue is done by ++iteratively walking at each element of struct futex_head list. ++ ++All enqueuing/dequeuing operations requires to hold the bucket lock, to avoid ++racing while modifying the list. ++ ++Waking ++------ ++ ++We get the bucket that's storing the waiters at uaddr, and wake the required ++number of waiters, checking for hash collision. ++ ++There's an optimization that makes futex_wake() not taking the bucket lock if ++there's no one to be wake on that bucket. It checks an atomic counter that each ++bucket has, if it says 0, than the syscall exits. In order to this work, the ++waiter thread increases it before taking the lock, so the wake thread will ++correctly see that there's someone waiting and will continue the path to take ++the bucket lock. To get the correct serialization, the waiter issues a memory ++barrier after increasing the bucket counter and the waker issues a memory ++barrier before checking it. ++ ++Requeuing ++--------- ++ ++The requeue path first checks for each struct futex_requeue and their flags. ++Then, it will compare the excepted value with the one at uaddr1::uaddr. ++Following the same serialization explained at Waking_, we increase the atomic ++counter for the bucket of uaddr2 before taking the lock. We need to have both ++buckets locks at same time so we don't race with others futexes operations. To ++ensure the locks are taken in the same order for all threads (and thus avoiding ++deadlocks), every requeue operation takes the "smaller" bucket first, when ++comparing both addresses. ++ ++If the compare with user value succeeds, we proceed by waking ``nr_wake`` ++futexes, and then requeuing ``nr_requeue`` from bucket of uaddr1 to the uaddr2. ++This consists in a simple list deletion/addition and replacing the old futex key ++for the new one. ++ ++Futex keys ++---------- ++ ++There are two types of futexes: private and shared ones. The private are futexes ++meant to be used by threads that shares the same memory space, are easier to be ++uniquely identified an thus can have some performance optimization. The elements ++for identifying one are: the start address of the page where the address is, ++the address offset within the page and the current->mm pointer. ++ ++Now, for uniquely identifying shared futex: ++ ++- If the page containing the user address is an anonymous page, we can ++ just use the same data used for private futexes (the start address of ++ the page, the address offset within the page and the current->mm ++ pointer) that will be enough for uniquely identifying such futex. We ++ also set one bit at the key to differentiate if a private futex is ++ used on the same address (mixing shared and private calls do not ++ work). ++ ++- If the page is file-backed, current->mm maybe isn't the same one for ++ every user of this futex, so we need to use other data: the ++ page->index, an UUID for the struct inode and the offset within the ++ page. ++ ++Note that members of futex_key doesn't have any particular meaning after they ++are part of the struct - they are just bytes to identify a futex. Given that, ++we don't need to use a particular name or type that matches the original data, ++we only need to care about the bitsize of each component and make both private ++and shared fit in the same memory space. ++ ++Source code documentation ++========================= ++ ++.. kernel-doc:: kernel/futex2.c ++ :no-identifiers: sys_futex_wait sys_futex_wake sys_futex_waitv sys_futex_requeue +diff --git a/Documentation/locking/index.rst b/Documentation/locking/index.rst +index 7003bd5ae..9bf03c7fa 100644 +--- a/Documentation/locking/index.rst ++++ b/Documentation/locking/index.rst +@@ -24,6 +24,7 @@ locking + percpu-rw-semaphore + robust-futexes + robust-futex-ABI ++ futex2 + + .. only:: subproject and html -- -2.29.2 +2.30.2 -From ce3ae4bd9f98763fda07f315c1f239c4aaef4b5e Mon Sep 17 00:00:00 2001 +From 807830198558476757c3e1b77fcfad2129fe29fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Almeida?= -Date: Thu, 9 Jul 2020 11:34:40 -0300 -Subject: [PATCH 4/9] selftests: futex: Add futex2 wake/wait test +Date: Fri, 5 Feb 2021 10:34:01 -0300 +Subject: [PATCH 07/13] selftests: futex2: Add wake/wait test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Add a simple test to test wake/wait mechanism using futex2 interface. +Add a simple file to test wake/wait mechanism using futex2 interface. +Test three scenarios: using a common local int variable as private +futex, a shm futex as shared futex and a file-backed shared memory as a +shared futex. This should test all branches of futex_get_key(). + Create helper files so more tests can evaluate futex2. While 32bit ABIs -from glibc aren't able to use 64 bit sized time variables, add a +from glibc aren't yet able to use 64 bit sized time variables, add a temporary workaround that implements the required types and calls the appropriated syscalls, since futex2 doesn't supports 32 bit sized time. Signed-off-by: André Almeida Signed-off-by: Jan200101 --- - tools/include/uapi/asm-generic/unistd.h | 1 - .../selftests/futex/functional/.gitignore | 1 + - .../selftests/futex/functional/Makefile | 4 +- - .../selftests/futex/functional/futex2_wait.c | 148 ++++++++++++++++++ + .../selftests/futex/functional/Makefile | 6 +- + .../selftests/futex/functional/futex2_wait.c | 209 ++++++++++++++++++ .../testing/selftests/futex/functional/run.sh | 3 + - .../selftests/futex/include/futex2test.h | 77 +++++++++ - 6 files changed, 232 insertions(+), 2 deletions(-) + .../selftests/futex/include/futex2test.h | 79 +++++++ + 5 files changed, 296 insertions(+), 2 deletions(-) create mode 100644 tools/testing/selftests/futex/functional/futex2_wait.c create mode 100644 tools/testing/selftests/futex/include/futex2test.h -diff --git a/tools/include/uapi/asm-generic/unistd.h b/tools/include/uapi/asm-generic/unistd.h -index 7de33be59..81a90b697 100644 ---- a/tools/include/uapi/asm-generic/unistd.h -+++ b/tools/include/uapi/asm-generic/unistd.h -@@ -872,7 +872,6 @@ __SYSCALL(__NR_futex_waitv, sys_futex_waitv) - #undef __NR_syscalls - #define __NR_syscalls 444 - -- - /* - * 32 bit systems traditionally used different - * syscalls for off_t and loff_t arguments, while diff --git a/tools/testing/selftests/futex/functional/.gitignore b/tools/testing/selftests/futex/functional/.gitignore index 0efcd494d..d61f1df94 100644 --- a/tools/testing/selftests/futex/functional/.gitignore @@ -1808,10 +2777,15 @@ index 0efcd494d..d61f1df94 100644 futex_wait_wouldblock +futex2_wait diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile -index 23207829e..7142a94a7 100644 +index 23207829e..9b334f190 100644 --- a/tools/testing/selftests/futex/functional/Makefile +++ b/tools/testing/selftests/futex/functional/Makefile -@@ -5,6 +5,7 @@ LDLIBS := -lpthread -lrt +@@ -1,10 +1,11 @@ + # SPDX-License-Identifier: GPL-2.0 +-INCLUDES := -I../include -I../../ ++INCLUDES := -I../include -I../../ -I../../../../../usr/include/ + CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES) + LDLIBS := -lpthread -lrt HEADERS := \ ../include/futextest.h \ @@ -1831,14 +2805,14 @@ index 23207829e..7142a94a7 100644 diff --git a/tools/testing/selftests/futex/functional/futex2_wait.c b/tools/testing/selftests/futex/functional/futex2_wait.c new file mode 100644 -index 000000000..0646a24b7 +index 000000000..4b5416585 --- /dev/null +++ b/tools/testing/selftests/futex/functional/futex2_wait.c -@@ -0,0 +1,148 @@ +@@ -0,0 +1,209 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/****************************************************************************** + * -+ * Copyright Collabora Ltd., 2020 ++ * Copyright Collabora Ltd., 2021 + * + * DESCRIPTION + * Test wait/wake mechanism of futex2, using 32bit sized futexes. @@ -1847,7 +2821,7 @@ index 000000000..0646a24b7 + * André Almeida + * + * HISTORY -+ * 2020-Jul-9: Initial version by André ++ * 2021-Feb-5: Initial version by André + * + *****************************************************************************/ + @@ -1860,12 +2834,16 @@ index 000000000..0646a24b7 +#include +#include +#include ++#include ++#include ++#include +#include "futex2test.h" +#include "logging.h" + +#define TEST_NAME "futex2-wait" +#define timeout_ns 30000000 +#define WAKE_WAIT_US 10000 ++#define SHM_PATH "futex2_shm_file" +futex_t *f1; + +void usage(char *prog) @@ -1881,6 +2859,7 @@ index 000000000..0646a24b7 +{ + struct timespec64 to64; + unsigned int flags = 0; ++ + if (arg) + flags = *((unsigned int *) arg); + @@ -1901,6 +2880,13 @@ index 000000000..0646a24b7 + return NULL; +} + ++void *waitershm(void *arg) ++{ ++ futex2_wait(arg, 0, FUTEX_32 | FUTEX_SHARED_FLAG, NULL); ++ ++ return NULL; ++} ++ +int main(int argc, char *argv[]) +{ + pthread_t waiter; @@ -1908,6 +2894,7 @@ index 000000000..0646a24b7 + int res, ret = RET_PASS; + int c; + futex_t f_private = 0; ++ + f1 = &f_private; + + while ((c = getopt(argc, argv, "cht:v:")) != -1) { @@ -1928,10 +2915,11 @@ index 000000000..0646a24b7 + } + + ksft_print_header(); -+ ksft_set_plan(2); ++ ksft_set_plan(3); + ksft_print_msg("%s: Test FUTEX2_WAIT\n", + basename(argv[0])); + ++ /* Testing a private futex */ + info("Calling private futex2_wait on f1: %u @ %p with val=%u\n", *f1, f1, *f1); + + if (pthread_create(&waiter, NULL, waiterfn, NULL)) @@ -1951,12 +2939,15 @@ index 000000000..0646a24b7 + } + + int shm_id = shmget(IPC_PRIVATE, 4096, IPC_CREAT | 0666); ++ + if (shm_id < 0) { + perror("shmget"); + exit(1); + } + ++ /* Testing an anon page shared memory */ + unsigned int *shared_data = shmat(shm_id, NULL, 0); ++ + *shared_data = 0; + f1 = shared_data; + @@ -1970,16 +2961,60 @@ index 000000000..0646a24b7 + info("Calling shared futex2_wake on f1: %u @ %p with val=%u\n", *f1, f1, *f1); + res = futex2_wake(f1, 1, FUTEX_32 | FUTEX_SHARED_FLAG); + if (res != 1) { -+ ksft_test_result_fail("futex2_wake shared returned: %d %s\n", ++ ksft_test_result_fail("futex2_wake shared (shmget) returned: %d %s\n", + res ? errno : res, + res ? strerror(errno) : ""); + ret = RET_FAIL; + } else { -+ ksft_test_result_pass("futex2_wake shared succeeds\n"); ++ ksft_test_result_pass("futex2_wake shared (shmget) succeeds\n"); + } + + shmdt(shared_data); + ++ /* Testing a file backed shared memory */ ++ void *shm; ++ int fd, pid; ++ ++ f_private = 0; ++ ++ fd = open(SHM_PATH, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); ++ if (fd < 0) { ++ perror("open"); ++ exit(1); ++ } ++ ++ res = ftruncate(fd, sizeof(f_private)); ++ if (res) { ++ perror("ftruncate"); ++ exit(1); ++ } ++ ++ shm = mmap(NULL, sizeof(f_private), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); ++ if (shm == MAP_FAILED) { ++ perror("mmap"); ++ exit(1); ++ } ++ ++ memcpy(shm, &f_private, sizeof(f_private)); ++ ++ pthread_create(&waiter, NULL, waitershm, shm); ++ ++ usleep(WAKE_WAIT_US); ++ ++ res = futex2_wake(shm, 1, FUTEX_32 | FUTEX_SHARED_FLAG); ++ if (res != 1) { ++ ksft_test_result_fail("futex2_wake shared (mmap) returned: %d %s\n", ++ res ? errno : res, ++ res ? strerror(errno) : ""); ++ ret = RET_FAIL; ++ } else { ++ ksft_test_result_pass("futex2_wake shared (mmap) succeeds\n"); ++ } ++ ++ munmap(shm, sizeof(f_private)); ++ ++ remove(SHM_PATH); ++ + ksft_print_cnts(); + return ret; +} @@ -1996,14 +3031,14 @@ index 1acb6ace1..3730159c8 100755 +./futex2_wait $COLOR diff --git a/tools/testing/selftests/futex/include/futex2test.h b/tools/testing/selftests/futex/include/futex2test.h new file mode 100644 -index 000000000..807b8b57f +index 000000000..e724d56b9 --- /dev/null +++ b/tools/testing/selftests/futex/include/futex2test.h -@@ -0,0 +1,77 @@ +@@ -0,0 +1,79 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/****************************************************************************** + * -+ * Copyright Collabora Ltd., 2020 ++ * Copyright Collabora Ltd., 2021 + * + * DESCRIPTION + * Futex2 library addons for old futex library @@ -2012,7 +3047,7 @@ index 000000000..807b8b57f + * André Almeida + * + * HISTORY -+ * 2020-Jul-9: Initial version by André ++ * 2021-Feb-5: Initial version by André + * + *****************************************************************************/ +#include "futextest.h" @@ -2027,12 +3062,7 @@ index 000000000..807b8b57f +# define FUTEX_16 1 +#endif +#ifndef FUTEX_32 -+#define FUTEX_32 2 -+#endif -+#ifdef __x86_64__ -+# ifndef FUTEX_64 -+# define FUTEX_64 3 -+# endif ++# define FUTEX_32 2 +#endif + +/* @@ -2061,8 +3091,12 @@ index 000000000..807b8b57f + * - End of Y2038 section - + */ + -+/* -+ * wait for uaddr if (*uaddr == val) ++/** ++ * futex2_wait - If (*uaddr == val), wait at uaddr until timo ++ * @uaddr: User address to wait on ++ * @val: Expected value at uaddr, return if is not equal ++ * @flags: Operation flags ++ * @timo: Optional timeout for operation + */ +static inline int futex2_wait(volatile void *uaddr, unsigned long val, + unsigned long flags, struct timespec64 *timo) @@ -2070,27 +3104,31 @@ index 000000000..807b8b57f + return syscall(__NR_futex_wait, uaddr, val, flags, timo); +} + -+/* -+ * wake nr futexes waiting for uaddr ++/** ++ * futex2_wake - Wake a number of waiters at uaddr ++ * @uaddr: Address to wake ++ * @nr: Number of waiters to wake ++ * @flags: Operation flags + */ +static inline int futex2_wake(volatile void *uaddr, unsigned int nr, unsigned long flags) +{ + return syscall(__NR_futex_wake, uaddr, nr, flags); +} -- -2.29.2 +2.30.2 -From 1e0349f5a81a43cdb50d9a97812194df6d937b69 Mon Sep 17 00:00:00 2001 +From 382ed2cfcea3ed7e77d07e3e12b3769a081001ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Almeida?= -Date: Thu, 9 Jul 2020 11:36:14 -0300 -Subject: [PATCH 5/9] selftests: futex: Add futex2 timeout test +Date: Fri, 5 Feb 2021 10:34:01 -0300 +Subject: [PATCH 08/13] selftests: futex2: Add timeout test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adapt existing futex wait timeout file to test the same mechanism for -futex2. +futex2. futex2 accepts only absolute 64bit timers, but supports both +monotonic and realtime clocks. Signed-off-by: André Almeida Signed-off-by: Jan200101 @@ -2099,14 +3137,14 @@ Signed-off-by: Jan200101 1 file changed, 49 insertions(+), 9 deletions(-) diff --git a/tools/testing/selftests/futex/functional/futex_wait_timeout.c b/tools/testing/selftests/futex/functional/futex_wait_timeout.c -index ee55e6d38..245670e44 100644 +index ee55e6d38..b4dffe9e3 100644 --- a/tools/testing/selftests/futex/functional/futex_wait_timeout.c +++ b/tools/testing/selftests/futex/functional/futex_wait_timeout.c @@ -11,6 +11,7 @@ * * HISTORY * 2009-Nov-6: Initial version by Darren Hart -+ * 2020-Jul-9: Add futex2 test by André ++ * 2021-Feb-5: Add futex2 test by André * *****************************************************************************/ @@ -2198,13 +3236,13 @@ index ee55e6d38..245670e44 100644 return ret; } -- -2.29.2 +2.30.2 -From 298120f6e3a758cd03e26a104f5ce60a88501b7f Mon Sep 17 00:00:00 2001 +From 27d37b4e24805d9dc5478c296ee680a8a4db8a6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Almeida?= -Date: Thu, 9 Jul 2020 11:37:42 -0300 -Subject: [PATCH 6/9] selftests: futex: Add futex2 wouldblock test +Date: Fri, 5 Feb 2021 10:34:01 -0300 +Subject: [PATCH 09/13] selftests: futex2: Add wouldblock test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2219,14 +3257,14 @@ Signed-off-by: Jan200101 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/futex/functional/futex_wait_wouldblock.c b/tools/testing/selftests/futex/functional/futex_wait_wouldblock.c -index 0ae390ff8..1f72e5928 100644 +index 0ae390ff8..ed3660090 100644 --- a/tools/testing/selftests/futex/functional/futex_wait_wouldblock.c +++ b/tools/testing/selftests/futex/functional/futex_wait_wouldblock.c @@ -12,6 +12,7 @@ * * HISTORY * 2009-Nov-14: Initial version by Gowrishankar -+ * 2020-Jul-9: Add futex2 test by André ++ * 2021-Feb-5: Add futex2 test by André * *****************************************************************************/ @@ -2293,26 +3331,30 @@ index 0ae390ff8..1f72e5928 100644 return ret; } -- -2.29.2 +2.30.2 -From 05c697a239aad5e8608c6acf0da9239cac5f7a2e Mon Sep 17 00:00:00 2001 +From 2b2f4e71b3bb09c0d45f9eae4c1986155d3a1235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Almeida?= -Date: Tue, 8 Dec 2020 18:47:31 -0300 -Subject: [PATCH 7/9] selftests: futex: Add futex2 waitv test +Date: Fri, 5 Feb 2021 10:34:02 -0300 +Subject: [PATCH 10/13] selftests: futex2: Add waitv test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +Create a new file to test the waitv mechanism. Test both private and +shared futexes. Wake the last futex in the array, and check if the +return value from futex_waitv() is the right index. + Signed-off-by: André Almeida Signed-off-by: Jan200101 --- .../selftests/futex/functional/.gitignore | 1 + .../selftests/futex/functional/Makefile | 3 +- - .../selftests/futex/functional/futex2_waitv.c | 156 ++++++++++++++++++ + .../selftests/futex/functional/futex2_waitv.c | 157 ++++++++++++++++++ .../testing/selftests/futex/functional/run.sh | 3 + - .../selftests/futex/include/futex2test.h | 25 ++- - 5 files changed, 183 insertions(+), 5 deletions(-) + .../selftests/futex/include/futex2test.h | 26 +++ + 5 files changed, 189 insertions(+), 1 deletion(-) create mode 100644 tools/testing/selftests/futex/functional/futex2_waitv.c diff --git a/tools/testing/selftests/futex/functional/.gitignore b/tools/testing/selftests/futex/functional/.gitignore @@ -2325,7 +3367,7 @@ index d61f1df94..d0b8f637b 100644 futex2_wait +futex2_waitv diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile -index 7142a94a7..b857b9450 100644 +index 9b334f190..09c08ccde 100644 --- a/tools/testing/selftests/futex/functional/Makefile +++ b/tools/testing/selftests/futex/functional/Makefile @@ -16,7 +16,8 @@ TEST_GEN_FILES := \ @@ -2340,14 +3382,14 @@ index 7142a94a7..b857b9450 100644 diff --git a/tools/testing/selftests/futex/functional/futex2_waitv.c b/tools/testing/selftests/futex/functional/futex2_waitv.c new file mode 100644 -index 000000000..d4b116651 +index 000000000..2f81d296d --- /dev/null +++ b/tools/testing/selftests/futex/functional/futex2_waitv.c -@@ -0,0 +1,156 @@ +@@ -0,0 +1,157 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/****************************************************************************** + * -+ * Copyright Collabora Ltd., 2020 ++ * Copyright Collabora Ltd., 2021 + * + * DESCRIPTION + * Test waitv/wake mechanism of futex2, using 32bit sized futexes. @@ -2356,7 +3398,7 @@ index 000000000..d4b116651 + * André Almeida + * + * HISTORY -+ * 2020-Jul-9: Initial version by André ++ * 2021-Feb-5: Initial version by André + * + *****************************************************************************/ + @@ -2401,7 +3443,11 @@ index 000000000..d4b116651 + + res = futex2_waitv(waitv, NR_FUTEXES, 0, &to64); + if (res < 0) { -+ printf("waiter failed errno %d %s\n", ++ ksft_test_result_fail("futex2_waitv private returned: %d %s\n", ++ res ? errno : res, ++ res ? strerror(errno) : ""); ++ } else if (res != NR_FUTEXES - 1) { ++ ksft_test_result_fail("futex2_waitv private returned: %d %s\n", + res ? errno : res, + res ? strerror(errno) : ""); + } @@ -2437,23 +3483,21 @@ index 000000000..d4b116651 + ksft_print_msg("%s: Test FUTEX2_WAITV\n", + basename(argv[0])); + -+ //info("Calling private futex2_wait on f1: %u @ %p with val=%u\n", *f1, f1, *f1); -+ + for (i = 0; i < NR_FUTEXES; i++) { -+ waitv[i].uaddr = &futexes[i]; ++ waitv[i].uaddr = &futexes[i]; + waitv[i].flags = FUTEX_32; + waitv[i].val = 0; + } + ++ /* Private waitv */ + if (pthread_create(&waiter, NULL, waiterfn, NULL)) + error("pthread_create failed\n", errno); + + usleep(WAKE_WAIT_US); + -+ // info("Calling private futex2_wake on f1: %u @ %p with val=%u\n", *f1, f1, *f1); + res = futex2_wake(waitv[NR_FUTEXES - 1].uaddr, 1, FUTEX_32); + if (res != 1) { -+ ksft_test_result_fail("futex2_wake private returned: %d %s\n", ++ ksft_test_result_fail("futex2_waitv private returned: %d %s\n", + res ? errno : res, + res ? strerror(errno) : ""); + ret = RET_FAIL; @@ -2461,214 +3505,395 @@ index 000000000..d4b116651 + ksft_test_result_pass("futex2_waitv private succeeds\n"); + } + ++ /* Shared waitv */ + for (i = 0; i < NR_FUTEXES; i++) { + int shm_id = shmget(IPC_PRIVATE, 4096, IPC_CREAT | 0666); ++ + if (shm_id < 0) { + perror("shmget"); + exit(1); + } + + unsigned int *shared_data = shmat(shm_id, NULL, 0); -+ *shared_data = 0; + -+ waitv[i].uaddr = shared_data; ++ *shared_data = 0; ++ waitv[i].uaddr = shared_data; + waitv[i].flags = FUTEX_32 | FUTEX_SHARED_FLAG; + waitv[i].val = 0; + } + -+ //info("Calling shared futex2_wait on f1: %u @ %p with val=%u\n", *f1, f1, *f1); ++ if (pthread_create(&waiter, NULL, waiterfn, NULL)) ++ error("pthread_create failed\n", errno); ++ ++ usleep(WAKE_WAIT_US); ++ ++ res = futex2_wake(waitv[NR_FUTEXES - 1].uaddr, 1, FUTEX_32 | FUTEX_SHARED_FLAG); ++ if (res != 1) { ++ ksft_test_result_fail("futex2_waitv shared returned: %d %s\n", ++ res ? errno : res, ++ res ? strerror(errno) : ""); ++ ret = RET_FAIL; ++ } else { ++ ksft_test_result_pass("futex2_waitv shared succeeds\n"); ++ } ++ ++ for (i = 0; i < NR_FUTEXES; i++) ++ shmdt(waitv[i].uaddr); ++ ++ ksft_print_cnts(); ++ return ret; ++} +diff --git a/tools/testing/selftests/futex/functional/run.sh b/tools/testing/selftests/futex/functional/run.sh +index 3730159c8..18b3883d7 100755 +--- a/tools/testing/selftests/futex/functional/run.sh ++++ b/tools/testing/selftests/futex/functional/run.sh +@@ -76,3 +76,6 @@ echo + + echo + ./futex2_wait $COLOR ++ ++echo ++./futex2_waitv $COLOR +diff --git a/tools/testing/selftests/futex/include/futex2test.h b/tools/testing/selftests/futex/include/futex2test.h +index e724d56b9..31979afc4 100644 +--- a/tools/testing/selftests/futex/include/futex2test.h ++++ b/tools/testing/selftests/futex/include/futex2test.h +@@ -28,6 +28,19 @@ + # define FUTEX_32 2 + #endif + ++#ifndef FUTEX_SHARED_FLAG ++#define FUTEX_SHARED_FLAG 8 ++#endif ++ ++#ifndef FUTEX_WAITV_MAX ++#define FUTEX_WAITV_MAX 128 ++struct futex_waitv { ++ void *uaddr; ++ unsigned int val; ++ unsigned int flags; ++}; ++#endif ++ + /* + * - Y2038 section for 32-bit applications - + * +@@ -77,3 +90,16 @@ static inline int futex2_wake(volatile void *uaddr, unsigned int nr, unsigned lo + { + return syscall(__NR_futex_wake, uaddr, nr, flags); + } ++ ++/** ++ * futex2_waitv - Wait at multiple futexes, wake on any ++ * @waiters: Array of waiters ++ * @nr_waiters: Length of waiters array ++ * @flags: Operation flags ++ * @timo: Optional timeout for operation ++ */ ++static inline int futex2_waitv(volatile struct futex_waitv *waiters, unsigned long nr_waiters, ++ unsigned long flags, struct timespec64 *timo) ++{ ++ return syscall(__NR_futex_waitv, waiters, nr_waiters, flags, timo); ++} +-- +2.30.2 + + +From 18a89fdf17baa9595b09bb98cc545ecba4ce93fb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Almeida?= +Date: Fri, 5 Feb 2021 10:34:02 -0300 +Subject: [PATCH 11/13] selftests: futex2: Add requeue test +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Add testing for futex_requeue(). The first test just requeue from one +waiter to another one, and wake it. The second performs both wake and +requeue, and we check return values to see if the operation +woke/requeued the expected number of waiters. + +Signed-off-by: André Almeida +Signed-off-by: Jan200101 +--- + .../selftests/futex/functional/.gitignore | 1 + + .../selftests/futex/functional/Makefile | 3 +- + .../futex/functional/futex2_requeue.c | 164 ++++++++++++++++++ + .../selftests/futex/include/futex2test.h | 16 ++ + 4 files changed, 183 insertions(+), 1 deletion(-) + create mode 100644 tools/testing/selftests/futex/functional/futex2_requeue.c + +diff --git a/tools/testing/selftests/futex/functional/.gitignore b/tools/testing/selftests/futex/functional/.gitignore +index d0b8f637b..af7557e82 100644 +--- a/tools/testing/selftests/futex/functional/.gitignore ++++ b/tools/testing/selftests/futex/functional/.gitignore +@@ -8,3 +8,4 @@ futex_wait_uninitialized_heap + futex_wait_wouldblock + futex2_wait + futex2_waitv ++futex2_requeue +diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile +index 09c08ccde..3ccb9ea58 100644 +--- a/tools/testing/selftests/futex/functional/Makefile ++++ b/tools/testing/selftests/futex/functional/Makefile +@@ -17,7 +17,8 @@ TEST_GEN_FILES := \ + futex_wait_uninitialized_heap \ + futex_wait_private_mapped_file \ + futex2_wait \ +- futex2_waitv ++ futex2_waitv \ ++ futex2_requeue + + TEST_PROGS := run.sh + +diff --git a/tools/testing/selftests/futex/functional/futex2_requeue.c b/tools/testing/selftests/futex/functional/futex2_requeue.c +new file mode 100644 +index 000000000..1bc3704dc +--- /dev/null ++++ b/tools/testing/selftests/futex/functional/futex2_requeue.c +@@ -0,0 +1,164 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++/****************************************************************************** ++ * ++ * Copyright Collabora Ltd., 2021 ++ * ++ * DESCRIPTION ++ * Test requeue mechanism of futex2, using 32bit sized futexes. ++ * ++ * AUTHOR ++ * André Almeida ++ * ++ * HISTORY ++ * 2021-Feb-5: Initial version by André ++ * ++ *****************************************************************************/ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "futex2test.h" ++#include "logging.h" ++ ++#define TEST_NAME "futex2-wait" ++#define timeout_ns 30000000 ++#define WAKE_WAIT_US 10000 ++volatile futex_t *f1; ++ ++void usage(char *prog) ++{ ++ printf("Usage: %s\n", prog); ++ printf(" -c Use color\n"); ++ printf(" -h Display this help message\n"); ++ printf(" -v L Verbosity level: %d=QUIET %d=CRITICAL %d=INFO\n", ++ VQUIET, VCRITICAL, VINFO); ++} ++ ++void *waiterfn(void *arg) ++{ ++ struct timespec64 to64; ++ ++ /* setting absolute timeout for futex2 */ ++ if (gettime64(CLOCK_MONOTONIC, &to64)) ++ error("gettime64 failed\n", errno); ++ ++ to64.tv_nsec += timeout_ns; ++ ++ if (to64.tv_nsec >= 1000000000) { ++ to64.tv_sec++; ++ to64.tv_nsec -= 1000000000; ++ } ++ ++ if (futex2_wait(f1, *f1, FUTEX_32, &to64)) ++ printf("waiter failed errno %d\n", errno); ++ ++ return NULL; ++} ++ ++int main(int argc, char *argv[]) ++{ ++ pthread_t waiter[10]; ++ int res, ret = RET_PASS; ++ int c, i; ++ volatile futex_t _f1 = 0; ++ volatile futex_t f2 = 0; ++ struct futex_requeue r1, r2; ++ ++ f1 = &_f1; ++ ++ r1.flags = FUTEX_32; ++ r2.flags = FUTEX_32; ++ ++ r1.uaddr = f1; ++ r2.uaddr = &f2; ++ ++ while ((c = getopt(argc, argv, "cht:v:")) != -1) { ++ switch (c) { ++ case 'c': ++ log_color(1); ++ break; ++ case 'h': ++ usage(basename(argv[0])); ++ exit(0); ++ case 'v': ++ log_verbosity(atoi(optarg)); ++ break; ++ default: ++ usage(basename(argv[0])); ++ exit(1); ++ } ++ } ++ ++ ksft_print_header(); ++ ksft_set_plan(2); ++ ksft_print_msg("%s: Test FUTEX2_REQUEUE\n", ++ basename(argv[0])); ++ ++ /* ++ * Requeue a waiter from f1 to f2, and wake f2. ++ */ ++ if (pthread_create(&waiter[0], NULL, waiterfn, NULL)) ++ error("pthread_create failed\n", errno); ++ ++ usleep(WAKE_WAIT_US); ++ ++ res = futex2_requeue(&r1, &r2, 0, 1, 0, 0); ++ if (res != 1) { ++ ksft_test_result_fail("futex2_requeue private returned: %d %s\n", ++ res ? errno : res, ++ res ? strerror(errno) : ""); ++ ret = RET_FAIL; ++ } ++ ++ ++ info("Calling private futex2_wake on f2: %u @ %p with val=%u\n", f2, &f2, f2); ++ res = futex2_wake(&f2, 1, FUTEX_32); ++ if (res != 1) { ++ ksft_test_result_fail("futex2_requeue private returned: %d %s\n", ++ res ? errno : res, ++ res ? strerror(errno) : ""); ++ ret = RET_FAIL; ++ } else { ++ ksft_test_result_pass("futex2_requeue simple succeeds\n"); ++ } ++ + -+ if (pthread_create(&waiter, NULL, waiterfn, NULL)) -+ error("pthread_create failed\n", errno); ++ /* ++ * Create 10 waiters at f1. At futex_requeue, wake 3 and requeue 7. ++ * At futex_wake, wake INT_MAX (should be exaclty 7). ++ */ ++ for (i = 0; i < 10; i++) { ++ if (pthread_create(&waiter[i], NULL, waiterfn, NULL)) ++ error("pthread_create failed\n", errno); ++ } + + usleep(WAKE_WAIT_US); + -+ // info("Calling shared futex2_wake on f1: %u @ %p with val=%u\n", *f1, f1, *f1); -+ res = futex2_wake(waitv[NR_FUTEXES - 1].uaddr, 1, FUTEX_32 | FUTEX_SHARED_FLAG); -+ if (res != 1) { -+ ksft_test_result_fail("futex2_wake shared returned: %d %s\n", ++ res = futex2_requeue(&r1, &r2, 3, 7, 0, 0); ++ if (res != 10) { ++ ksft_test_result_fail("futex2_requeue private returned: %d %s\n", + res ? errno : res, + res ? strerror(errno) : ""); + ret = RET_FAIL; -+ } else { -+ ksft_test_result_pass("futex2_wake shared succeeds\n"); + } + -+ for (i = 0; i < NR_FUTEXES; i++) -+ shmdt(waitv[i].uaddr); ++ res = futex2_wake(&f2, INT_MAX, FUTEX_32); ++ if (res != 7) { ++ ksft_test_result_fail("futex2_requeue private returned: %d %s\n", ++ res ? errno : res, ++ res ? strerror(errno) : ""); ++ ret = RET_FAIL; ++ } else { ++ ksft_test_result_pass("futex2_requeue succeeds\n"); ++ } + + ksft_print_cnts(); + return ret; +} -diff --git a/tools/testing/selftests/futex/functional/run.sh b/tools/testing/selftests/futex/functional/run.sh -index 3730159c8..18b3883d7 100755 ---- a/tools/testing/selftests/futex/functional/run.sh -+++ b/tools/testing/selftests/futex/functional/run.sh -@@ -76,3 +76,6 @@ echo - - echo - ./futex2_wait $COLOR -+ -+echo -+./futex2_waitv $COLOR diff --git a/tools/testing/selftests/futex/include/futex2test.h b/tools/testing/selftests/futex/include/futex2test.h -index 807b8b57f..10be0c504 100644 +index 31979afc4..e2635006b 100644 --- a/tools/testing/selftests/futex/include/futex2test.h +++ b/tools/testing/selftests/futex/include/futex2test.h -@@ -27,10 +27,18 @@ - #ifndef FUTEX_32 - #define FUTEX_32 2 - #endif --#ifdef __x86_64__ --# ifndef FUTEX_64 --# define FUTEX_64 3 --# endif -+ -+#ifndef FUTEX_SHARED_FLAG -+#define FUTEX_SHARED_FLAG 8 -+#endif -+ -+#ifndef FUTEX_WAITV_MAX -+#define FUTEX_WAITV_MAX 128 -+struct futex_waitv { -+ void *uaddr; -+ unsigned int val; -+ unsigned int flags; -+}; - #endif - - /* -@@ -75,3 +83,12 @@ static inline int futex2_wake(volatile void *uaddr, unsigned int nr, unsigned lo +@@ -103,3 +103,19 @@ static inline int futex2_waitv(volatile struct futex_waitv *waiters, unsigned lo { - return syscall(__NR_futex_wake, uaddr, nr, flags); + return syscall(__NR_futex_waitv, waiters, nr_waiters, flags, timo); } + -+/* -+ * wait for uaddr if (*uaddr == val) ++/** ++ * futex2_requeue - Wake futexes at uaddr1 and requeue from uaddr1 to uaddr2 ++ * @uaddr1: Original address to wake and requeue from ++ * @uaddr2: Address to requeue to ++ * @nr_wake: Number of futexes to wake at uaddr1 before requeuing ++ * @nr_requeue: Number of futexes to requeue from uaddr1 to uaddr2 ++ * @cmpval: If (uaddr1->uaddr != cmpval), return immediatally ++ * @flgas: Operation flags + */ -+static inline int futex2_waitv(volatile struct futex_waitv *waiters, unsigned long nr_waiters, -+ unsigned long flags, struct timespec64 *timo) -+{ -+ return syscall(__NR_futex_waitv, waiters, nr_waiters, flags, timo); -+} --- -2.29.2 - - -From 9358bbdf929a90bc144d13e002fed8f4223d3178 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andr=C3=A9=20Almeida?= -Date: Fri, 4 Dec 2020 19:12:23 -0300 -Subject: [PATCH 8/9] futex2: Add sysfs entry for syscall numbers -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: André Almeida -Signed-off-by: Jan200101 ---- - kernel/futex2.c | 42 ++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 42 insertions(+) - -diff --git a/kernel/futex2.c b/kernel/futex2.c -index 5ddb9922d..58cd8a868 100644 ---- a/kernel/futex2.c -+++ b/kernel/futex2.c -@@ -762,6 +762,48 @@ SYSCALL_DEFINE3(futex_wake, void __user *, uaddr, unsigned int, nr_wake, - return ret; - } - -+static ssize_t wait_show(struct kobject *kobj, struct kobj_attribute *attr, -+ char *buf) -+{ -+ return sprintf(buf, "%u\n", __NR_futex_wait); -+ -+} -+static struct kobj_attribute futex2_wait_attr = __ATTR_RO(wait); -+ -+static ssize_t wake_show(struct kobject *kobj, struct kobj_attribute *attr, -+ char *buf) -+{ -+ return sprintf(buf, "%u\n", __NR_futex_wake); -+ -+} -+static struct kobj_attribute futex2_wake_attr = __ATTR_RO(wake); -+ -+static ssize_t waitv_show(struct kobject *kobj, struct kobj_attribute *attr, -+ char *buf) -+{ -+ return sprintf(buf, "%u\n", __NR_futex_waitv); -+ -+} -+static struct kobj_attribute futex2_waitv_attr = __ATTR_RO(waitv); -+ -+static struct attribute *futex2_sysfs_attrs[] = { -+ &futex2_wait_attr.attr, -+ &futex2_wake_attr.attr, -+ &futex2_waitv_attr.attr, -+ NULL, -+}; -+ -+static const struct attribute_group futex2_sysfs_attr_group = { -+ .attrs = futex2_sysfs_attrs, -+ .name = "futex2", -+}; -+ -+static int __init futex2_sysfs_init(void) ++static inline int futex2_requeue(struct futex_requeue *uaddr1, struct futex_requeue *uaddr2, ++ unsigned int nr_wake, unsigned int nr_requeue, ++ unsigned int cmpval, unsigned long flags) +{ -+ return sysfs_create_group(kernel_kobj, &futex2_sysfs_attr_group); ++ return syscall(__NR_futex_requeue, uaddr1, uaddr2, nr_wake, nr_requeue, cmpval, flags); +} -+subsys_initcall(futex2_sysfs_init); -+ - static int __init futex2_init(void) - { - int i; -- -2.29.2 +2.30.2 -From f7b1c9a2ad05933e559ef78bc7753b2fac1698fd Mon Sep 17 00:00:00 2001 +From 799e24f7b39e114107b36c4cc4ece4825a9fa6a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Almeida?= -Date: Tue, 5 Jan 2021 15:44:02 -0300 -Subject: [PATCH 9/9] perf bench: Add futex2 benchmark tests +Date: Fri, 5 Feb 2021 10:34:02 -0300 +Subject: [PATCH 12/13] perf bench: Add futex2 benchmark tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Port existing futex infrastructure to use futex2 calls. +Add support at the existing futex benchmarking code base to enable +futex2 calls. `perf bench` tests can be used not only as a way to +measure the performance of implementation, but also as stress testing +for the kernel infrastructure. Signed-off-by: André Almeida Signed-off-by: Jan200101 --- - tools/arch/x86/include/asm/unistd_64.h | 8 +++++ - tools/perf/bench/bench.h | 3 ++ - tools/perf/bench/futex-hash.c | 24 ++++++++++++--- - tools/perf/bench/futex-wake-parallel.c | 41 ++++++++++++++++++++++---- - tools/perf/bench/futex-wake.c | 36 ++++++++++++++++++---- - tools/perf/bench/futex.h | 17 +++++++++++ - tools/perf/builtin-bench.c | 17 ++++++++--- - 7 files changed, 127 insertions(+), 19 deletions(-) + tools/arch/x86/include/asm/unistd_64.h | 12 ++++++ + tools/perf/bench/bench.h | 4 ++ + tools/perf/bench/futex-hash.c | 24 +++++++++-- + tools/perf/bench/futex-requeue.c | 57 ++++++++++++++++++++------ + tools/perf/bench/futex-wake-parallel.c | 41 +++++++++++++++--- + tools/perf/bench/futex-wake.c | 37 +++++++++++++---- + tools/perf/bench/futex.h | 47 +++++++++++++++++++++ + tools/perf/builtin-bench.c | 18 ++++++-- + 8 files changed, 206 insertions(+), 34 deletions(-) diff --git a/tools/arch/x86/include/asm/unistd_64.h b/tools/arch/x86/include/asm/unistd_64.h -index 4205ed415..151a41ceb 100644 +index 4205ed415..cf5ad4ea1 100644 --- a/tools/arch/x86/include/asm/unistd_64.h +++ b/tools/arch/x86/include/asm/unistd_64.h -@@ -17,3 +17,11 @@ +@@ -17,3 +17,15 @@ #ifndef __NR_setns #define __NR_setns 308 #endif + +#ifndef __NR_futex_wait -+# define __NR_futex_wait 441 ++# define __NR_futex_wait 442 +#endif + +#ifndef __NR_futex_wake -+# define __NR_futex_wake 442 ++# define __NR_futex_wake 443 ++#endif ++ ++#ifndef __NR_futex_requeue ++# define __NR_futex_requeue 445 +#endif diff --git a/tools/perf/bench/bench.h b/tools/perf/bench/bench.h -index eac36afab..f6f881a05 100644 +index eac36afab..12346844b 100644 --- a/tools/perf/bench/bench.h +++ b/tools/perf/bench/bench.h -@@ -38,8 +38,11 @@ int bench_mem_memcpy(int argc, const char **argv); +@@ -38,9 +38,13 @@ int bench_mem_memcpy(int argc, const char **argv); int bench_mem_memset(int argc, const char **argv); int bench_mem_find_bit(int argc, const char **argv); int bench_futex_hash(int argc, const char **argv); @@ -2678,10 +3903,12 @@ index eac36afab..f6f881a05 100644 int bench_futex_wake_parallel(int argc, const char **argv); +int bench_futex2_wake_parallel(int argc, const char **argv); int bench_futex_requeue(int argc, const char **argv); ++int bench_futex2_requeue(int argc, const char **argv); /* pi futexes */ int bench_futex_lock_pi(int argc, const char **argv); + int bench_epoll_wait(int argc, const char **argv); diff --git a/tools/perf/bench/futex-hash.c b/tools/perf/bench/futex-hash.c -index 915bf3da7..72921c22b 100644 +index 915bf3da7..6e62e7708 100644 --- a/tools/perf/bench/futex-hash.c +++ b/tools/perf/bench/futex-hash.c @@ -34,7 +34,7 @@ static unsigned int nthreads = 0; @@ -2710,7 +3937,7 @@ index 915bf3da7..72921c22b 100644 } -int bench_futex_hash(int argc, const char **argv) -+static int bench_futex_hash_common(int argc, const char **argv) ++static int __bench_futex_hash(int argc, const char **argv) { int ret = 0; cpu_set_t cpuset; @@ -2732,16 +3959,146 @@ index 915bf3da7..72921c22b 100644 + +int bench_futex_hash(int argc, const char **argv) +{ -+ return bench_futex_hash_common(argc, argv); ++ return __bench_futex_hash(argc, argv); +} + +int bench_futex2_hash(int argc, const char **argv) +{ + futex2 = true; -+ return bench_futex_hash_common(argc, argv); ++ return __bench_futex_hash(argc, argv); ++} +diff --git a/tools/perf/bench/futex-requeue.c b/tools/perf/bench/futex-requeue.c +index 7a15c2e61..4c7486fbe 100644 +--- a/tools/perf/bench/futex-requeue.c ++++ b/tools/perf/bench/futex-requeue.c +@@ -2,8 +2,8 @@ + /* + * Copyright (C) 2013 Davidlohr Bueso + * +- * futex-requeue: Block a bunch of threads on futex1 and requeue them +- * on futex2, N at a time. ++ * futex-requeue: Block a bunch of threads on addr1 and requeue them ++ * on addr2, N at a time. + * + * This program is particularly useful to measure the latency of nthread + * requeues without waking up any tasks -- thus mimicking a regular futex_wait. +@@ -29,7 +29,10 @@ + #include + #include + +-static u_int32_t futex1 = 0, futex2 = 0; ++static u_int32_t addr1 = 0, addr2 = 0; ++ ++static struct futex_requeue rq1 = { .uaddr = &addr1, .flags = FUTEX_32 }; ++static struct futex_requeue rq2 = { .uaddr = &addr2, .flags = FUTEX_32 }; + + /* + * How many tasks to requeue at a time. +@@ -38,7 +41,7 @@ static u_int32_t futex1 = 0, futex2 = 0; + static unsigned int nrequeue = 1; + + static pthread_t *worker; +-static bool done = false, silent = false, fshared = false; ++static bool done = false, silent = false, fshared = false, futex2 = false; + static pthread_mutex_t thread_lock; + static pthread_cond_t thread_parent, thread_worker; + static struct stats requeuetime_stats, requeued_stats; +@@ -80,7 +83,11 @@ static void *workerfn(void *arg __maybe_unused) + pthread_cond_wait(&thread_worker, &thread_lock); + pthread_mutex_unlock(&thread_lock); + +- futex_wait(&futex1, 0, NULL, futex_flag); ++ if (!futex2) ++ futex_wait(&addr1, 0, NULL, futex_flag); ++ else ++ futex2_wait(&addr1, 0, futex_flag, NULL); ++ + return NULL; + } + +@@ -112,7 +119,7 @@ static void toggle_done(int sig __maybe_unused, + done = true; + } + +-int bench_futex_requeue(int argc, const char **argv) ++static int __bench_futex_requeue(int argc, const char **argv) + { + int ret = 0; + unsigned int i, j; +@@ -140,15 +147,20 @@ int bench_futex_requeue(int argc, const char **argv) + if (!worker) + err(EXIT_FAILURE, "calloc"); + +- if (!fshared) ++ if (futex2) { ++ futex_flag = FUTEX_32 | (fshared * FUTEX_SHARED_FLAG); ++ rq1.flags |= FUTEX_SHARED_FLAG * fshared; ++ rq2.flags |= FUTEX_SHARED_FLAG * fshared; ++ } else if (!fshared) { + futex_flag = FUTEX_PRIVATE_FLAG; ++ } + + if (nrequeue > nthreads) + nrequeue = nthreads; + + printf("Run summary [PID %d]: Requeuing %d threads (from [%s] %p to %p), " + "%d at a time.\n\n", getpid(), nthreads, +- fshared ? "shared":"private", &futex1, &futex2, nrequeue); ++ fshared ? "shared":"private", &addr1, &addr2, nrequeue); + + init_stats(&requeued_stats); + init_stats(&requeuetime_stats); +@@ -177,11 +189,15 @@ int bench_futex_requeue(int argc, const char **argv) + gettimeofday(&start, NULL); + while (nrequeued < nthreads) { + /* +- * Do not wakeup any tasks blocked on futex1, allowing ++ * Do not wakeup any tasks blocked on addr1, allowing + * us to really measure futex_wait functionality. + */ +- nrequeued += futex_cmp_requeue(&futex1, 0, &futex2, 0, +- nrequeue, futex_flag); ++ if (!futex2) ++ nrequeued += futex_cmp_requeue(&addr1, 0, &addr2, ++ 0, nrequeue, futex_flag); ++ else ++ nrequeued += futex2_requeue(&rq1, &rq2, ++ 0, nrequeue, 0, 0); + } + + gettimeofday(&end, NULL); +@@ -195,8 +211,12 @@ int bench_futex_requeue(int argc, const char **argv) + j + 1, nrequeued, nthreads, runtime.tv_usec / (double)USEC_PER_MSEC); + } + +- /* everybody should be blocked on futex2, wake'em up */ +- nrequeued = futex_wake(&futex2, nrequeued, futex_flag); ++ /* everybody should be blocked on addr2, wake'em up */ ++ if (!futex2) ++ nrequeued = futex_wake(&addr2, nrequeued, futex_flag); ++ else ++ nrequeued = futex2_wake(&addr2, nrequeued, futex_flag); ++ + if (nthreads != nrequeued) + warnx("couldn't wakeup all tasks (%d/%d)", nrequeued, nthreads); + +@@ -221,3 +241,14 @@ int bench_futex_requeue(int argc, const char **argv) + usage_with_options(bench_futex_requeue_usage, options); + exit(EXIT_FAILURE); + } ++ ++int bench_futex_requeue(int argc, const char **argv) ++{ ++ return __bench_futex_requeue(argc, argv); ++} ++ ++int bench_futex2_requeue(int argc, const char **argv) ++{ ++ futex2 = true; ++ return __bench_futex_requeue(argc, argv); +} diff --git a/tools/perf/bench/futex-wake-parallel.c b/tools/perf/bench/futex-wake-parallel.c -index cd2b81a84..540104538 100644 +index cd2b81a84..8a89c6ab9 100644 --- a/tools/perf/bench/futex-wake-parallel.c +++ b/tools/perf/bench/futex-wake-parallel.c @@ -17,6 +17,12 @@ int bench_futex_wake_parallel(int argc __maybe_unused, const char **argv __maybe @@ -2800,7 +4157,7 @@ index cd2b81a84..540104538 100644 } -int bench_futex_wake_parallel(int argc, const char **argv) -+static int bench_futex_wake_parallel_common(int argc, const char **argv) ++static int __bench_futex_wake_parallel(int argc, const char **argv) { int ret = 0; unsigned int i, j; @@ -2822,31 +4179,30 @@ index cd2b81a84..540104538 100644 + +int bench_futex_wake_parallel(int argc, const char **argv) +{ -+ return bench_futex_wake_parallel_common(argc, argv); ++ return __bench_futex_wake_parallel(argc, argv); +} + +int bench_futex2_wake_parallel(int argc, const char **argv) +{ + futex2 = true; -+ return bench_futex_wake_parallel_common(argc, argv); ++ return __bench_futex_wake_parallel(argc, argv); +} + #endif /* HAVE_PTHREAD_BARRIER */ diff --git a/tools/perf/bench/futex-wake.c b/tools/perf/bench/futex-wake.c -index 2dfcef3e3..b98b84e7b 100644 +index 2dfcef3e3..be4481f5e 100644 --- a/tools/perf/bench/futex-wake.c +++ b/tools/perf/bench/futex-wake.c -@@ -46,6 +46,9 @@ static struct stats waketime_stats, wakeup_stats; - static unsigned int threads_starting, nthreads = 0; - static int futex_flag = 0; +@@ -39,7 +39,7 @@ static u_int32_t futex1 = 0; + static unsigned int nwakes = 1; -+/* Should we use futex2 API? */ -+static bool futex2 = false; -+ - static const struct option options[] = { - OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"), - OPT_UINTEGER('w', "nwakes", &nwakes, "Specify amount of threads to wake at once"), -@@ -69,8 +72,13 @@ static void *workerfn(void *arg __maybe_unused) + pthread_t *worker; +-static bool done = false, silent = false, fshared = false; ++static bool done = false, silent = false, fshared = false, futex2 = false; + static pthread_mutex_t thread_lock; + static pthread_cond_t thread_parent, thread_worker; + static struct stats waketime_stats, wakeup_stats; +@@ -69,8 +69,13 @@ static void *workerfn(void *arg __maybe_unused) pthread_mutex_unlock(&thread_lock); while (1) { @@ -2862,16 +4218,16 @@ index 2dfcef3e3..b98b84e7b 100644 } pthread_exit(NULL); -@@ -118,7 +126,7 @@ static void toggle_done(int sig __maybe_unused, +@@ -118,7 +123,7 @@ static void toggle_done(int sig __maybe_unused, done = true; } -int bench_futex_wake(int argc, const char **argv) -+static int bench_futex_wake_common(int argc, const char **argv) ++static int __bench_futex_wake(int argc, const char **argv) { int ret = 0; unsigned int i, j; -@@ -148,7 +156,9 @@ int bench_futex_wake(int argc, const char **argv) +@@ -148,7 +153,9 @@ int bench_futex_wake(int argc, const char **argv) if (!worker) err(EXIT_FAILURE, "calloc"); @@ -2882,14 +4238,16 @@ index 2dfcef3e3..b98b84e7b 100644 futex_flag = FUTEX_PRIVATE_FLAG; printf("Run summary [PID %d]: blocking on %d threads (at [%s] futex %p), " -@@ -181,8 +191,13 @@ int bench_futex_wake(int argc, const char **argv) +@@ -180,9 +187,14 @@ int bench_futex_wake(int argc, const char **argv) + /* Ok, all threads are patiently blocked, start waking folks up */ gettimeofday(&start, NULL); - while (nwoken != nthreads) +- while (nwoken != nthreads) - nwoken += futex_wake(&futex1, nwakes, futex_flag); -+ if (!futex2) { ++ while (nwoken != nthreads) { ++ if (!futex2) + nwoken += futex_wake(&futex1, nwakes, futex_flag); -+ } else { ++ else + nwoken += futex2_wake(&futex1, nwakes, futex_flag); + } gettimeofday(&end, NULL); @@ -2897,32 +4255,38 @@ index 2dfcef3e3..b98b84e7b 100644 timersub(&end, &start, &runtime); update_stats(&wakeup_stats, nwoken); -@@ -212,3 +227,14 @@ int bench_futex_wake(int argc, const char **argv) +@@ -212,3 +224,14 @@ int bench_futex_wake(int argc, const char **argv) free(worker); return ret; } + +int bench_futex_wake(int argc, const char **argv) +{ -+ return bench_futex_wake_common(argc, argv); ++ return __bench_futex_wake(argc, argv); +} + +int bench_futex2_wake(int argc, const char **argv) +{ + futex2 = true; -+ return bench_futex_wake_common(argc, argv); ++ return __bench_futex_wake(argc, argv); +} diff --git a/tools/perf/bench/futex.h b/tools/perf/bench/futex.h -index 31b53cc7d..5111799b5 100644 +index 31b53cc7d..6b2213cf3 100644 --- a/tools/perf/bench/futex.h +++ b/tools/perf/bench/futex.h -@@ -86,4 +86,21 @@ futex_cmp_requeue(u_int32_t *uaddr, u_int32_t val, u_int32_t *uaddr2, int nr_wak +@@ -86,4 +86,51 @@ futex_cmp_requeue(u_int32_t *uaddr, u_int32_t val, u_int32_t *uaddr2, int nr_wak return futex(uaddr, FUTEX_CMP_REQUEUE, nr_wake, nr_requeue, uaddr2, val, opflags); } + -+/* -+ * wait for uaddr if (*uaddr == val) ++/** ++ * futex2_wait - Wait at uaddr if *uaddr == val, until timo. ++ * @uaddr: User address to wait for ++ * @val: Expected value at uaddr ++ * @flags: Operation options ++ * @timo: Optional timeout ++ * ++ * Return: 0 on success, error code otherwise + */ +static inline int futex2_wait(volatile void *uaddr, unsigned long val, + unsigned long flags, struct timespec *timo) @@ -2930,16 +4294,40 @@ index 31b53cc7d..5111799b5 100644 + return syscall(__NR_futex_wait, uaddr, val, flags, timo); +} + -+/* -+ * wake nr futexes waiting for uaddr ++/** ++ * futex2_wake - Wake a number of waiters waiting at uaddr ++ * @uaddr: Address to wake ++ * @nr: Number of waiters to wake ++ * @flags: Operation options ++ * ++ * Return: number of waked futexes + */ +static inline int futex2_wake(volatile void *uaddr, unsigned int nr, unsigned long flags) +{ + return syscall(__NR_futex_wake, uaddr, nr, flags); ++} ++ ++/** ++ * futex2_requeue - Requeue waiters from an address to another one ++ * @uaddr1: Address where waiters are currently waiting on ++ * @uaddr2: New address to wait ++ * @nr_wake: Number of waiters at uaddr1 to be wake ++ * @nr_requeue: After waking nr_wake, number of waiters to be requeued ++ * @cmpval: Expected value at uaddr1 ++ * @flags: Operation options ++ * ++ * Return: waked futexes + requeued futexes at uaddr1 ++ */ ++static inline int futex2_requeue(volatile struct futex_requeue *uaddr1, ++ volatile struct futex_requeue *uaddr2, ++ unsigned int nr_wake, unsigned int nr_requeue, ++ unsigned int cmpval, unsigned long flags) ++{ ++ return syscall(__NR_futex_requeue, uaddr1, uaddr2, nr_wake, nr_requeue, cmpval, flags); +} #endif /* _FUTEX_H */ diff --git a/tools/perf/builtin-bench.c b/tools/perf/builtin-bench.c -index 62a7b7420..200ecacad 100644 +index 62a7b7420..e41a95ad2 100644 --- a/tools/perf/builtin-bench.c +++ b/tools/perf/builtin-bench.c @@ -12,10 +12,11 @@ @@ -2958,7 +4346,7 @@ index 62a7b7420..200ecacad 100644 */ #include #include "builtin.h" -@@ -75,6 +76,13 @@ static struct bench futex_benchmarks[] = { +@@ -75,6 +76,14 @@ static struct bench futex_benchmarks[] = { { NULL, NULL, NULL } }; @@ -2966,13 +4354,14 @@ index 62a7b7420..200ecacad 100644 + { "hash", "Benchmark for futex2 hash table", bench_futex2_hash }, + { "wake", "Benchmark for futex2 wake calls", bench_futex2_wake }, + { "wake-parallel", "Benchmark for parallel futex2 wake calls", bench_futex2_wake_parallel }, ++ { "requeue", "Benchmark for futex2 requeue calls", bench_futex2_requeue }, + { NULL, NULL, NULL } +}; + #ifdef HAVE_EVENTFD_SUPPORT static struct bench epoll_benchmarks[] = { { "wait", "Benchmark epoll concurrent epoll_waits", bench_epoll_wait }, -@@ -105,6 +113,7 @@ static struct collection collections[] = { +@@ -105,6 +114,7 @@ static struct collection collections[] = { { "numa", "NUMA scheduling and MM benchmarks", numa_benchmarks }, #endif {"futex", "Futex stressing benchmarks", futex_benchmarks }, @@ -2981,5 +4370,82 @@ index 62a7b7420..200ecacad 100644 {"epoll", "Epoll stressing benchmarks", epoll_benchmarks }, #endif -- -2.29.2 +2.30.2 + + +From ea9a7956b5f6f44f3ee70d82542c64fcb7c86c5e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Almeida?= +Date: Fri, 5 Feb 2021 10:34:02 -0300 +Subject: [PATCH 13/13] futex2: Add sysfs entry for syscall numbers +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +In the course of futex2 development, it will be rebased on top of +different kernel releases, and the syscall number can change in this +process. Expose futex2 syscall number via sysfs so tools that are +experimenting with futex2 (like Proton/Wine) can test it and set the +syscall number at runtime, rather than setting it at compilation time. + +Signed-off-by: André Almeida +Signed-off-by: Jan200101 +--- + kernel/futex2.c | 42 ++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 42 insertions(+) + +diff --git a/kernel/futex2.c b/kernel/futex2.c +index 8a8b45f98..1eb20410d 100644 +--- a/kernel/futex2.c ++++ b/kernel/futex2.c +@@ -1220,6 +1220,48 @@ SYSCALL_DEFINE6(futex_requeue, struct futex_requeue __user *, uaddr1, + return __futex_requeue(rq1, rq2, nr_wake, nr_requeue, cmpval, shared1, shared2); + } + ++static ssize_t wait_show(struct kobject *kobj, struct kobj_attribute *attr, ++ char *buf) ++{ ++ return sprintf(buf, "%u\n", __NR_futex_wait); ++ ++} ++static struct kobj_attribute futex2_wait_attr = __ATTR_RO(wait); ++ ++static ssize_t wake_show(struct kobject *kobj, struct kobj_attribute *attr, ++ char *buf) ++{ ++ return sprintf(buf, "%u\n", __NR_futex_wake); ++ ++} ++static struct kobj_attribute futex2_wake_attr = __ATTR_RO(wake); ++ ++static ssize_t waitv_show(struct kobject *kobj, struct kobj_attribute *attr, ++ char *buf) ++{ ++ return sprintf(buf, "%u\n", __NR_futex_waitv); ++ ++} ++static struct kobj_attribute futex2_waitv_attr = __ATTR_RO(waitv); ++ ++static struct attribute *futex2_sysfs_attrs[] = { ++ &futex2_wait_attr.attr, ++ &futex2_wake_attr.attr, ++ &futex2_waitv_attr.attr, ++ NULL, ++}; ++ ++static const struct attribute_group futex2_sysfs_attr_group = { ++ .attrs = futex2_sysfs_attrs, ++ .name = "futex2", ++}; ++ ++static int __init futex2_sysfs_init(void) ++{ ++ return sysfs_create_group(kernel_kobj, &futex2_sysfs_attr_group); ++} ++subsys_initcall(futex2_sysfs_init); ++ + static int __init futex2_init(void) + { + int i; +-- +2.30.2 diff --git a/SOURCES/generate_all_configs.sh b/SOURCES/generate_all_configs.sh index 14f0f3a..9e3d5ec 100755 --- a/SOURCES/generate_all_configs.sh +++ b/SOURCES/generate_all_configs.sh @@ -9,28 +9,32 @@ PRIMARY=$1 DEBUGBUILDSENABLED=$2 -if [ -z $2 ]; then +if [ -z "$2" ]; then exit 1 fi -if [ $PRIMARY == "fedora" ]; then +if [ -z "$PRIMARY" ]; then + PRIMARY=rhel +fi + +if [ "$PRIMARY" = "fedora" ]; then SECONDARY=rhel else SECONDARY=fedora fi -for i in kernel-*-$PRIMARY.config; do - NEW=kernel-$VERSION-`echo $i | cut -d - -f2- | sed s/-$PRIMARY//` +for i in kernel-*-"$PRIMARY".config; do + NEW=kernel-"$VERSION"-$(echo "$i" | cut -d - -f2- | sed s/-"$PRIMARY"//) #echo $NEW - mv $i $NEW + mv "$i" "$NEW" done -rm kernel-*-$SECONDARY.config +rm -f kernel-*-"$SECONDARY".config -if [ $DEBUGBUILDSENABLED -eq 0 ]; then +if [ "$DEBUGBUILDSENABLED" -eq 0 ]; then for i in kernel-*debug*.config; do - base=`echo $i | sed -r s/-?debug//g` - NEW=kernel-`echo $base | cut -d - -f2-` - mv $i $NEW + base=$(echo "$i" | sed -r s/-?debug//g) + NEW=kernel-$(echo "$base" | cut -d - -f2-) + mv "$i" "$NEW" done fi diff --git a/SOURCES/generate_bls_conf.sh b/SOURCES/generate_bls_conf.sh index fc3f0e8..03b2182 100755 --- a/SOURCES/generate_bls_conf.sh +++ b/SOURCES/generate_bls_conf.sh @@ -1,6 +1,7 @@ #!/bin/bash set -e +# shellcheck disable=SC1091 . /etc/os-release kernelver=$1 && shift @@ -18,12 +19,16 @@ else debugid="" fi -cat >${output} < "$output" < "$RpmDir/etc/modprobe.d/$1-blacklist.conf" <<-__EOF__ + # This kernel module can be automatically loaded by non-root users. To + # enhance system security, the module is blacklisted by default to ensure + # system administrators make the module available for use as needed. + # See https://access.redhat.com/articles/3760101 for more details. + # + # Remove the blacklist by adding a comment # at the start of the line. + blacklist $1 +__EOF__ +} + +check_blacklist() +{ + mod=$(find "$RpmDir/$ModDir" -name "$1") + [ ! "$mod" ] && return 0 + if modinfo "$mod" | grep -q '^alias:\s\+net-'; then + mod="${1##*/}" + mod="${mod%.ko*}" + echo "$mod has an alias that allows auto-loading. Blacklisting." + blacklist "$mod" + fi +} + +find_depends() +{ + dep=$1 + depends=$(modinfo "$dep" | sed -n -e "/^depends/ s/^depends:[ \t]*//p") + [ -z "$depends" ] && exit + for mod in ${depends//,/ } + do + match=$(grep "^$mod.ko" "$ListName") + [ -z "$match" ] && continue + # check if the module we are looking at is in mod-* too. + # if so we do not need to mark the dep as required. + mod2=${dep##*/} # same as $(basename $dep), but faster + match2=$(grep "^$mod2" "$ListName") + if [ -n "$match2" ] + then + #echo $mod2 >> notreq.list + continue + fi + echo "$mod".ko >> req.list + done +} + +foreachp() +{ + P=$(nproc) + bgcount=0 + while read -r mod; do + $1 "$mod" & + + bgcount=$((bgcount + 1)) + if [ $bgcount -eq "$P" ]; then + wait -n + bgcount=$((bgcount - 1)) + fi + done + + wait +} + +# Destination was specified on the command line +test -n "$4" && echo "$0: Override Destination $Dest has been specified." + +pushd "$Dir" + +OverrideDir=$(basename "$List") +OverrideDir=${OverrideDir%.*} +OverrideDir=${OverrideDir#*-} +mkdir -p "$OverrideDir" + +rm -rf modnames +find . -name "*.ko" -type f > modnames +# Look through all of the modules, and throw any that have a dependency in +# our list into the list as well. +rm -rf dep.list dep2.list +rm -rf req.list req2.list +touch dep.list req.list +cp "$List" . + +# This variable needs to be exported because it is used in sub-script +# executed by xargs +ListName=$(basename "$List") +export ListName + +foreachp find_depends < modnames + +sort -u req.list > req2.list +sort -u "$ListName" > modules2.list +join -v 1 modules2.list req2.list > modules3.list + +while IFS= read -r mod +do + # get the path for the module + modpath=$(grep /"$mod" modnames) + [ -z "$modpath" ] && continue + echo "$modpath" >> dep.list +done < modules3.list + +sort -u dep.list > dep2.list + +if [ -n "$Dest" ]; then + # now move the modules into the $Dest directory + while IFS= read -r mod + do + newpath=$(dirname "$mod" | sed -e "s/kernel\\//$Dest\//") + mkdir -p "$newpath" + mv "$mod" "$newpath" + echo "$mod" | sed -e "s/kernel\\//$Dest\//" | sed -e "s|^.|${ModDir}|g" >> "$RpmDir"/"$ListName" + done < dep2.list +fi + +popd + +# If we're signing modules, we can't leave the .mod files for the .ko files +# we've moved in .tmp_versions/. Remove them so the Kbuild 'modules_sign' +# target doesn't try to sign a non-existent file. This is kinda ugly, but +# so are the modules-* packages. + +while IFS= read -r mod +do + modfile=$(basename "$mod" | sed -e 's/.ko/.mod/') + rm .tmp_versions/"$modfile" +done < "$Dir"/dep2.list + +if [ -z "$Dest" ]; then + sed -e "s|^.|${ModDir}|g" "$Dir"/dep2.list > "$RpmDir/$ListName" + echo "./$RpmDir/$ListName created." + [ -d "$RpmDir/etc/modprobe.d/" ] || mkdir -p "$RpmDir/etc/modprobe.d/" + foreachp check_blacklist < "$List" +fi + +# Many BIOS-es export a PNP-id which causes the floppy driver to autoload +# even though most modern systems don't have a 3.5" floppy driver anymore +# this replaces the old die_floppy_die.patch which removed the PNP-id from +# the module + +floppylist=("$RpmDir"/"$ModDir"/extra/drivers/block/floppy.ko*) +if [[ -n ${floppylist[0]} && -f ${floppylist[0]} ]]; then + blacklist "floppy" +fi + +# avoid an empty kernel-extra package +echo "$ModDir/$OverrideDir" >> "$RpmDir/$ListName" + +pushd "$Dir" +rm modnames dep.list dep2.list req.list req2.list +rm "$ListName" modules2.list modules3.list +popd diff --git a/SOURCES/mod-extra-blacklist.sh b/SOURCES/mod-extra-blacklist.sh deleted file mode 100755 index c4c4f8f..0000000 --- a/SOURCES/mod-extra-blacklist.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash - -buildroot="$1" -kernel_base="$2" - -blacklist() -{ - cat > "$buildroot/etc/modprobe.d/$1-blacklist.conf" <<-__EOF__ - # This kernel module can be automatically loaded by non-root users. To - # enhance system security, the module is blacklisted by default to ensure - # system administrators make the module available for use as needed. - # See https://access.redhat.com/articles/3760101 for more details. - # - # Remove the blacklist by adding a comment # at the start of the line. - blacklist $1 -__EOF__ -} - -check_blacklist() -{ - if modinfo "$1" | grep -q '^alias:\s\+net-'; then - mod="${1##*/}" - mod="${mod%.ko*}" - echo "$mod has an alias that allows auto-loading. Blacklisting." - blacklist "$mod" - fi -} - -foreachp() -{ - P=$(nproc) - bgcount=0 - while read mod; do - $1 "$mod" & - - bgcount=$((bgcount + 1)) - if [ $bgcount -eq $P ]; then - wait -n - bgcount=$((bgcount - 1)) - fi - done - - wait -} - -[ -d "$buildroot/etc/modprobe.d/" ] || mkdir -p "$buildroot/etc/modprobe.d/" -find "$buildroot/$kernel_base/extra" -name "*.ko*" | \ - foreachp check_blacklist - -# Many BIOS-es export a PNP-id which causes the floppy driver to autoload -# even though most modern systems don't have a 3.5" floppy driver anymore -# this replaces the old die_floppy_die.patch which removed the PNP-id from -# the module -if [ -f $buildroot/$kernel_base/extra/drivers/block/floppy.ko* ]; then - blacklist "floppy" -fi diff --git a/SOURCES/mod-extra.list b/SOURCES/mod-extra.list index 8140f5c..c83fc33 100644 --- a/SOURCES/mod-extra.list +++ b/SOURCES/mod-extra.list @@ -191,6 +191,5 @@ wanrouter.ko warrior.ko whci.ko wire.ko -xpad.ko yam.ko zhenhua.ko diff --git a/SOURCES/mod-extra.list.fedora b/SOURCES/mod-extra.list.fedora index 8140f5c..c83fc33 100644 --- a/SOURCES/mod-extra.list.fedora +++ b/SOURCES/mod-extra.list.fedora @@ -191,6 +191,5 @@ wanrouter.ko warrior.ko whci.ko wire.ko -xpad.ko yam.ko zhenhua.ko diff --git a/SOURCES/mod-extra.list.rhel b/SOURCES/mod-extra.list.rhel index e69de29..ce8f889 100644 --- a/SOURCES/mod-extra.list.rhel +++ b/SOURCES/mod-extra.list.rhel @@ -0,0 +1,190 @@ +6pack.ko +a3d.ko +act200l-sir.ko +actisys-sir.ko +adi.ko +aer_inject.ko +af_802154.ko +affs.ko +ali-ircc.ko +analog.ko +appletalk.ko +atm.ko +avma1_cs.ko +avm_cs.ko +avmfritz.ko +ax25.ko +b1.ko +bas_gigaset.ko +batman-adv.ko +baycom_par.ko +baycom_ser_fdx.ko +baycom_ser_hdx.ko +befs.ko +bpqether.ko +br2684.ko +capi.ko +c_can.ko +c_can_platform.ko +clip.ko +cobra.ko +coda.ko +cuse.ko +db9.ko +dccp_diag.ko +dccp_ipv4.ko +dccp_ipv6.ko +dccp.ko +dccp_probe.ko +diva_idi.ko +divas.ko +ds1wm.ko +ds2482.ko +ds2490.ko +dss1_divert.ko +elsa_cs.ko +ems_pci.ko +ems_usb.ko +esd_usb2.ko +esi-sir.ko +gamecon.ko +gf2k.ko +gigaset.ko +girbil-sir.ko +grip.ko +grip_mp.ko +guillemot.ko +hdlcdrv.ko +hfc4s8s_l1.ko +hfcmulti.ko +hfcpci.ko +hisax.ko +hwa-rc.ko +hysdn.ko +i2400m.ko +i2400m-sdio.ko +i2400m-usb.ko +ieee802154.ko +iforce.ko +interact.ko +ipddp.ko +ipx.ko +isdn.ko +joydump.ko +kingsun-sir.ko +ks959-sir.ko +ksdazzle-sir.ko +kvaser_pci.ko +l2tp_core.ko +l2tp_debugfs.ko +l2tp_eth.ko +l2tp_ip.ko +l2tp_netlink.ko +l2tp_ppp.ko +lec.ko +ma600-sir.ko +magellan.ko +mcp2120-sir.ko +mISDN_core.ko +mISDN_dsp.ko +mkiss.ko +mptbase.ko +mptctl.ko +mptfc.ko +nci.ko +ncpfs.ko +netjet.ko +netrom.ko +nfc.ko +nilfs2.ko +ocfs2_dlmfs.ko +ocfs2_dlm.ko +ocfs2.ko +ocfs2_nodemanager.ko +ocfs2_stackglue.ko +ocfs2_stack_o2cb.ko +ocfs2_stack_user.ko +old_belkin-sir.ko +orinoco_cs.ko +orinoco.ko +orinoco_nortel.ko +orinoco_pci.ko +orinoco_plx.ko +orinoco_usb.ko +plx_pci.ko +pn_pep.ko +pppoatm.ko +rds.ko +rds_rdma.ko +rds_tcp.ko +rose.ko +sch_atm.ko +sch_cbq.ko +sch_choke.ko +sch_drr.ko +sch_dsmark.ko +sch_gred.ko +sch_mqprio.ko +sch_multiq.ko +sch_netem.ko +sch_qfq.ko +sch_red.ko +sch_sfb.ko +sch_teql.ko +sctp.ko +sctp_probe.ko +sidewinder.ko +sja1000.ko +sja1000_platform.ko +slcan.ko +slip.ko +softing_cs.ko +softing.ko +spaceball.ko +spaceorb.ko +stinger.ko +sysv.ko +tcp_bic.ko +tcp_highspeed.ko +tcp_htcp.ko +tcp_hybla.ko +tcp_illinois.ko +tcp_lp.ko +tcp_scalable.ko +tcp_vegas.ko +tcp_veno.ko +tcp_westwood.ko +tcp_yeah.ko +tekram-sir.ko +tmdc.ko +toim3232-sir.ko +trancevibrator.ko +turbografx.ko +twidjoy.ko +ubifs.ko +ufs.ko +umc.ko +usbip-core.ko +usbip-host.ko +uwb.ko +vcan.ko +vhci-hcd.ko +w1_bq27000.ko +w1_ds2408.ko +w1_ds2423.ko +w1_ds2431.ko +w1_ds2433.ko +w1_ds2760.ko +w1_ds2780.ko +w1_ds2781.ko +w1_ds28e04.ko +w1_smem.ko +w1_therm.ko +w6692.ko +walkera0701.ko +wanrouter.ko +warrior.ko +whci.ko +wire.ko +yam.ko +zhenhua.ko diff --git a/SOURCES/mod-extra.sh b/SOURCES/mod-extra.sh deleted file mode 100755 index 7dc075b..0000000 --- a/SOURCES/mod-extra.sh +++ /dev/null @@ -1,86 +0,0 @@ -#! /bin/bash - -Dir=$1 -List=$2 -Dest="extra" - -# Destination was specified on the command line -test -n "$3" && Dest="$3" - -pushd $Dir -rm -rf modnames -find . -name "*.ko" -type f > modnames -# Look through all of the modules, and throw any that have a dependency in -# our list into the list as well. -rm -rf dep.list dep2.list -rm -rf req.list req2.list -touch dep.list req.list -cp "$List" . - -# This variable needs to be exported because it is used in sub-script -# executed by xargs -export ListName=$(basename "$List") - -# NB: this loop runs 2000+ iterations. Try to be fast. -NPROC=`nproc` -[ -z "$NPROC" ] && NPROC=1 -cat modnames | xargs -r -n1 -P $NPROC sh -c ' - dep=$1 - depends=`modinfo $dep | sed -n -e "/^depends/ s/^depends:[ \t]*//p"` - [ -z "$depends" ] && exit - for mod in ${depends//,/ } - do - match=$(grep "^$mod.ko" "$ListName") - [ -z "$match" ] && continue - # check if the module we are looking at is in mod-extra too. - # if so we do not need to mark the dep as required. - mod2=${dep##*/} # same as `basename $dep`, but faster - match2=$(grep "^$mod2" "$ListName") - if [ -n "$match2" ] - then - #echo $mod2 >> notreq.list - continue - fi - echo $mod.ko >> req.list - done -' DUMMYARG0 # xargs appends MODNAME, which becomes $dep in the script above - -sort -u req.list > req2.list -sort -u "$ListName" > modules2.list -join -v 1 modules2.list req2.list > modules3.list - -for mod in $(cat modules3.list) -do - # get the path for the module - modpath=`grep /$mod modnames` - [ -z "$modpath" ] && continue - echo $modpath >> dep.list -done - -sort -u dep.list > dep2.list - -# now move the modules into the extra/ directory -for mod in `cat dep2.list` -do - newpath=`dirname $mod | sed -e "s/kernel\\//$Dest\//"` - mkdir -p $newpath - mv $mod $newpath -done - -popd - -# If we're signing modules, we can't leave the .mod files for the .ko files -# we've moved in .tmp_versions/. Remove them so the Kbuild 'modules_sign' -# target doesn't try to sign a non-existent file. This is kinda ugly, but -# so is modules-extra. - -for mod in `cat ${Dir}/dep2.list` -do - modfile=`basename $mod | sed -e 's/.ko/.mod/'` - rm .tmp_versions/$modfile -done - -pushd $Dir -rm modnames dep.list dep2.list req.list req2.list -rm "$ListName" modules2.list modules3.list -popd diff --git a/SOURCES/mod-internal.list b/SOURCES/mod-internal.list index 9270dcc..c96abf9 100644 --- a/SOURCES/mod-internal.list +++ b/SOURCES/mod-internal.list @@ -1,4 +1,15 @@ +dmatest mac80211_hwsim netdevsim pktgen rocker +test_klp_atomic_replace +test_klp_callbacks_demo +test_klp_callbacks_demo2 +test_klp_callbacks_busy +test_klp_callbacks_mod +test_klp_livepatch +test_klp_shadow_vars +test_klp_state +test_klp_state2 +test_klp_state3 diff --git a/SOURCES/mod-sign.sh b/SOURCES/mod-sign.sh index ed2bd62..1afe136 100755 --- a/SOURCES/mod-sign.sh +++ b/SOURCES/mod-sign.sh @@ -13,9 +13,9 @@ MODSECKEY=$1 MODPUBKEY=$2 moddir=$3 -modules=`find $moddir -type f -name '*.ko'` +modules=$(find "$moddir" -type f -name '*.ko') -NPROC=`nproc` +NPROC=$(nproc) [ -z "$NPROC" ] && NPROC=1 # NB: this loop runs 2000+ iterations. Try to be fast. @@ -27,7 +27,7 @@ done " DUMMYARG0 # xargs appends ARG1 ARG2..., which go into $mod in for loop. RANDOMMOD=$(echo "$modules" | sort -R | head -n 1) -if [ "~Module signature appended~" != "$(tail -c 28 $RANDOMMOD)" ]; then +if [ "~Module signature appended~" != "$(tail -c 28 "$RANDOMMOD")" ]; then echo "*****************************" echo "*** Modules are unsigned! ***" echo "*****************************" diff --git a/SOURCES/parallel_xz.sh b/SOURCES/parallel_xz.sh index 0d98ead..f1b6cdd 100755 --- a/SOURCES/parallel_xz.sh +++ b/SOURCES/parallel_xz.sh @@ -16,11 +16,6 @@ while test "$#" != 0; do shift done -#This seems to cause problems with large numbers -if (( $procgroup > 6 )); then - procgroup=6 -fi - # If told to use only one cpu: test "$procgroup" || exec xargs -r xz test "$procgroup" = 1 && exec xargs -r xz @@ -28,4 +23,4 @@ test "$procgroup" = 1 && exec xargs -r xz # xz has some startup cost. If files are really small, # this cost might be significant. To combat this, # process several files (in sequence) by each xz process via -n 16: -exec xargs -r -n 16 -P $procgroup xz +exec xargs -r -n 16 -P "$procgroup" xz diff --git a/SOURCES/patch-5.11-redhat.patch b/SOURCES/patch-5.11-redhat.patch new file mode 100644 index 0000000..d5ebaa2 --- /dev/null +++ b/SOURCES/patch-5.11-redhat.patch @@ -0,0 +1,3437 @@ + Documentation/ABI/testing/sysfs-platform_profile | 24 ++ + Documentation/admin-guide/kdump/kdump.rst | 11 + + .../admin-guide/laptops/thinkpad-acpi.rst | 25 ++ + .../bindings/display/panel/xingbangda,xbd599.yaml | 50 +++ + Documentation/userspace-api/index.rst | 1 + + .../userspace-api/sysfs-platform_profile.rst | 42 ++ + Makefile | 1 + + arch/arm/Kconfig | 4 +- + arch/arm/include/asm/uaccess.h | 8 +- + arch/arm64/Kconfig | 3 +- + .../boot/dts/rockchip/rk3399-pinebook-pro.dts | 2 +- + arch/s390/include/asm/ipl.h | 1 + + arch/s390/kernel/ipl.c | 5 + + arch/s390/kernel/setup.c | 4 + + arch/x86/kernel/setup.c | 22 +- + drivers/acpi/Kconfig | 3 + + drivers/acpi/Makefile | 1 + + drivers/acpi/apei/hest.c | 8 + + drivers/acpi/irq.c | 17 +- + drivers/acpi/pci_mcfg.c | 7 + + drivers/acpi/platform_profile.c | 177 ++++++++ + drivers/acpi/scan.c | 9 + + drivers/ata/libahci.c | 18 + + drivers/char/ipmi/ipmi_dmi.c | 15 + + drivers/char/ipmi/ipmi_msghandler.c | 16 +- + drivers/firmware/efi/Makefile | 1 + + drivers/firmware/efi/efi.c | 124 ++++-- + drivers/firmware/efi/secureboot.c | 38 ++ + drivers/gpu/drm/panel/Kconfig | 9 + + drivers/gpu/drm/panel/Makefile | 1 + + drivers/gpu/drm/panel/panel-xingbangda-xbd599.c | 366 ++++++++++++++++ + drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 10 +- + drivers/hid/hid-rmi.c | 64 --- + drivers/input/rmi4/rmi_driver.c | 124 +++--- + drivers/iommu/iommu.c | 22 + + drivers/pci/controller/dwc/Kconfig | 10 +- + drivers/pci/controller/dwc/Makefile | 2 +- + drivers/pci/controller/dwc/pcie-tegra194.c | 102 +++++ + drivers/pci/controller/pcie-brcmstb.c | 1 + + drivers/pci/quirks.c | 24 ++ + drivers/platform/x86/Kconfig | 2 + + drivers/platform/x86/ideapad-laptop.c | 289 +++++++++++++ + drivers/platform/x86/thinkpad_acpi.c | 464 ++++++++++++++++++++- + drivers/scsi/smartpqi/smartpqi_init.c | 16 + + drivers/usb/core/hub.c | 7 + + include/linux/efi.h | 22 +- + include/linux/lsm_hook_defs.h | 2 + + include/linux/lsm_hooks.h | 6 + + include/linux/pci-ecam.h | 1 + + include/linux/platform_profile.h | 41 ++ + include/linux/rmi.h | 1 + + include/linux/security.h | 5 + + kernel/crash_core.c | 28 +- + kernel/module_signing.c | 9 +- + mm/kmemleak.c | 5 + + security/integrity/platform_certs/load_uefi.c | 6 +- + security/lockdown/Kconfig | 13 + + security/lockdown/lockdown.c | 1 + + security/security.c | 6 + + sound/hda/Kconfig | 14 + + sound/hda/intel-dsp-config.c | 29 +- + 61 files changed, 2126 insertions(+), 213 deletions(-) + +diff --git a/Documentation/ABI/testing/sysfs-platform_profile b/Documentation/ABI/testing/sysfs-platform_profile +new file mode 100644 +index 000000000000..9d6b89b66cca +--- /dev/null ++++ b/Documentation/ABI/testing/sysfs-platform_profile +@@ -0,0 +1,24 @@ ++What: /sys/firmware/acpi/platform_profile_choices ++Date: October 2020 ++Contact: Hans de Goede ++Description: This file contains a space-separated list of profiles supported for this device. ++ ++ Drivers must use the following standard profile-names: ++ ++ ============ ============================================ ++ low-power Low power consumption ++ cool Cooler operation ++ quiet Quieter operation ++ balanced Balance between low power consumption and performance ++ performance High performance operation ++ ============ ============================================ ++ ++ Userspace may expect drivers to offer more than one of these ++ standard profile names. ++ ++What: /sys/firmware/acpi/platform_profile ++Date: October 2020 ++Contact: Hans de Goede ++Description: Reading this file gives the current selected profile for this ++ device. Writing this file with one of the strings from ++ platform_profile_choices changes the profile to the new value. +diff --git a/Documentation/admin-guide/kdump/kdump.rst b/Documentation/admin-guide/kdump/kdump.rst +index 75a9dd98e76e..3ff3291551f9 100644 +--- a/Documentation/admin-guide/kdump/kdump.rst ++++ b/Documentation/admin-guide/kdump/kdump.rst +@@ -285,6 +285,17 @@ This would mean: + 2) if the RAM size is between 512M and 2G (exclusive), then reserve 64M + 3) if the RAM size is larger than 2G, then reserve 128M + ++Or you can use crashkernel=auto if you have enough memory. The threshold ++is 2G on x86_64, arm64, ppc64 and ppc64le. The threshold is 4G for s390x. ++If your system memory is less than the threshold crashkernel=auto will not ++reserve memory. ++ ++The automatically reserved memory size varies based on architecture. ++The size changes according to system memory size like below: ++ x86_64: 1G-64G:160M,64G-1T:256M,1T-:512M ++ s390x: 4G-64G:160M,64G-1T:256M,1T-:512M ++ arm64: 2G-:512M ++ ppc64: 2G-4G:384M,4G-16G:512M,16G-64G:1G,64G-128G:2G,128G-:4G + + + Boot into System Kernel +diff --git a/Documentation/admin-guide/laptops/thinkpad-acpi.rst b/Documentation/admin-guide/laptops/thinkpad-acpi.rst +index 5fe1ade88c17..3b225ae47f1a 100644 +--- a/Documentation/admin-guide/laptops/thinkpad-acpi.rst ++++ b/Documentation/admin-guide/laptops/thinkpad-acpi.rst +@@ -51,6 +51,7 @@ detailed description): + - UWB enable and disable + - LCD Shadow (PrivacyGuard) enable and disable + - Lap mode sensor ++ - Setting keyboard language + + A compatibility table by model and feature is maintained on the web + site, http://ibm-acpi.sf.net/. I appreciate any success or failure +@@ -1466,6 +1467,30 @@ Sysfs notes + rfkill controller switch "tpacpi_uwb_sw": refer to + Documentation/driver-api/rfkill.rst for details. + ++ ++Setting keyboard language ++------------------- ++ ++sysfs: keyboard_lang ++ ++This feature is used to set keyboard language to ECFW using ASL interface. ++Fewer thinkpads models like T580 , T590 , T15 Gen 1 etc.. has "=", "(', ++")" numeric keys, which are not displaying correctly, when keyboard language ++is other than "english". This is because the default keyboard language in ECFW ++is set as "english". Hence using this sysfs, user can set the correct keyboard ++language to ECFW and then these key's will work correctly. ++ ++Example of command to set keyboard language is mentioned below:: ++ ++ echo jp > /sys/devices/platform/thinkpad_acpi/keyboard_lang ++ ++Text corresponding to keyboard layout to be set in sysfs are: be(Belgian), ++cz(Czech), da(Danish), de(German), en(English), es(Spain), et(Estonian), ++fr(French), fr-ch(French(Switzerland)), hu(Hungarian), it(Italy), jp (Japan), ++nl(Dutch), nn(Norway), pl(Polish), pt(portugese), sl(Slovenian), sv(Sweden), ++tr(Turkey) ++ ++ + Adaptive keyboard + ----------------- + +diff --git a/Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml b/Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml +new file mode 100644 +index 000000000000..b27bcf11198f +--- /dev/null ++++ b/Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml +@@ -0,0 +1,50 @@ ++# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) ++%YAML 1.2 ++--- ++$id: http://devicetree.org/schemas/display/panel/xingbangda,xbd599.yaml# ++$schema: http://devicetree.org/meta-schemas/core.yaml# ++ ++title: Xingbangda XBD599 5.99in MIPI-DSI LCD panel ++ ++maintainers: ++ - Icenowy Zheng ++ ++allOf: ++ - $ref: panel-common.yaml# ++ ++properties: ++ compatible: ++ const: xingbangda,xbd599 ++ reg: true ++ backlight: true ++ reset-gpios: true ++ vcc-supply: ++ description: regulator that supplies the VCC voltage ++ iovcc-supply: ++ description: regulator that supplies the IOVCC voltage ++ ++required: ++ - compatible ++ - reg ++ - backlight ++ - vcc-supply ++ - iovcc-supply ++ ++additionalProperties: false ++ ++examples: ++ - | ++ dsi { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ panel@0 { ++ compatible = "xingbangda,xbd599"; ++ reg = <0>; ++ backlight = <&backlight>; ++ iovcc-supply = <®_dldo2>; ++ vcc-supply = <®_ldo_io0>; ++ }; ++ }; ++ ++... +diff --git a/Documentation/userspace-api/index.rst b/Documentation/userspace-api/index.rst +index acd2cc2a538d..d29b020e5622 100644 +--- a/Documentation/userspace-api/index.rst ++++ b/Documentation/userspace-api/index.rst +@@ -24,6 +24,7 @@ place where this information is gathered. + ioctl/index + iommu + media/index ++ sysfs-platform_profile + + .. only:: subproject and html + +diff --git a/Documentation/userspace-api/sysfs-platform_profile.rst b/Documentation/userspace-api/sysfs-platform_profile.rst +new file mode 100644 +index 000000000000..c33a71263d9e +--- /dev/null ++++ b/Documentation/userspace-api/sysfs-platform_profile.rst +@@ -0,0 +1,42 @@ ++===================================================================== ++Platform Profile Selection (e.g. /sys/firmware/acpi/platform_profile) ++===================================================================== ++ ++On modern systems the platform performance, temperature, fan and other ++hardware related characteristics are often dynamically configurable. The ++platform configuration is often automatically adjusted to the current ++conditions by some automatic mechanism (which may very well live outside ++the kernel). ++ ++These auto platform adjustment mechanisms often can be configured with ++one of several platform profiles, with either a bias towards low power ++operation or towards performance. ++ ++The purpose of the platform_profile attribute is to offer a generic sysfs ++API for selecting the platform profile of these automatic mechanisms. ++ ++Note that this API is only for selecting the platform profile, it is ++NOT a goal of this API to allow monitoring the resulting performance ++characteristics. Monitoring performance is best done with device/vendor ++specific tools such as e.g. turbostat. ++ ++Specifically when selecting a high performance profile the actual achieved ++performance may be limited by various factors such as: the heat generated ++by other components, room temperature, free air flow at the bottom of a ++laptop, etc. It is explicitly NOT a goal of this API to let userspace know ++about any sub-optimal conditions which are impeding reaching the requested ++performance level. ++ ++Since numbers on their own cannot represent the multiple variables that a ++profile will adjust (power consumption, heat generation, etc) this API ++uses strings to describe the various profiles. To make sure that userspace ++gets a consistent experience the sysfs-platform_profile ABI document defines ++a fixed set of profile names. Drivers *must* map their internal profile ++representation onto this fixed set. ++ ++If there is no good match when mapping then a new profile name may be ++added. Drivers which wish to introduce new profile names must: ++ ++ 1. Explain why the existing profile names canot be used. ++ 2. Add the new profile name, along with a clear description of the ++ expected behaviour, to the sysfs-platform_profile ABI documentation. +diff --git a/Makefile b/Makefile +index 6ba32b82c480..20d2cb6a8bad 100644 +--- a/Makefile ++++ b/Makefile +@@ -494,6 +494,7 @@ KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE + KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \ + -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \ + -Werror=implicit-function-declaration -Werror=implicit-int \ ++ -Wno-address-of-packed-member \ + -Werror=return-type -Wno-format-security \ + -std=gnu89 + KBUILD_CPPFLAGS := -D__KERNEL__ +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index 138248999df7..b962482a442e 100644 +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -1492,9 +1492,9 @@ config HIGHMEM + If unsure, say n. + + config HIGHPTE +- bool "Allocate 2nd-level pagetables from highmem" if EXPERT ++ bool "Allocate 2nd-level pagetables from highmem" + depends on HIGHMEM +- default y ++ default n + help + The VM uses one page of physical memory for each page table. + For systems with a lot of processes, this can use a lot of +diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h +index a13d90206472..6a6aae01755b 100644 +--- a/arch/arm/include/asm/uaccess.h ++++ b/arch/arm/include/asm/uaccess.h +@@ -195,11 +195,12 @@ extern int __get_user_64t_4(void *); + #define __get_user_check(x, p) \ + ({ \ + unsigned long __limit = current_thread_info()->addr_limit - 1; \ ++ unsigned int __ua_flags = uaccess_save_and_enable(); \ + register typeof(*(p)) __user *__p asm("r0") = (p); \ + register __inttype(x) __r2 asm("r2"); \ + register unsigned long __l asm("r1") = __limit; \ + register int __e asm("r0"); \ +- unsigned int __ua_flags = uaccess_save_and_enable(); \ ++ unsigned int __err; \ + switch (sizeof(*(__p))) { \ + case 1: \ + if (sizeof((x)) >= 8) \ +@@ -227,9 +228,10 @@ extern int __get_user_64t_4(void *); + break; \ + default: __e = __get_user_bad(); break; \ + } \ +- uaccess_restore(__ua_flags); \ ++ __err = __e; \ + x = (typeof(*(p))) __r2; \ +- __e; \ ++ uaccess_restore(__ua_flags); \ ++ __err; \ + }) + + #define get_user(x, p) \ +diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig +index e42da99db91f..383d80dd03c7 100644 +--- a/arch/arm64/Kconfig ++++ b/arch/arm64/Kconfig +@@ -894,7 +894,7 @@ endchoice + + config ARM64_FORCE_52BIT + bool "Force 52-bit virtual addresses for userspace" +- depends on ARM64_VA_BITS_52 && EXPERT ++ depends on ARM64_VA_BITS_52 + help + For systems with 52-bit userspace VAs enabled, the kernel will attempt + to maintain compatibility with older software by providing 48-bit VAs +@@ -1148,6 +1148,7 @@ config XEN + config FORCE_MAX_ZONEORDER + int + default "14" if (ARM64_64K_PAGES && TRANSPARENT_HUGEPAGE) ++ default "13" if (ARCH_THUNDER && !ARM64_64K_PAGES && !RHEL_DIFFERENCES) + default "12" if (ARM64_16K_PAGES && TRANSPARENT_HUGEPAGE) + default "11" + help +diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts +index 219b7507a10f..45769764425d 100644 +--- a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts ++++ b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts +@@ -380,7 +380,7 @@ mains_charger: dc-charger { + }; + + &cdn_dp { +- status = "okay"; ++ status = "disabled"; + }; + + &cpu_b0 { +diff --git a/arch/s390/include/asm/ipl.h b/arch/s390/include/asm/ipl.h +index a9e2c7295b35..6ff11f3a2d47 100644 +--- a/arch/s390/include/asm/ipl.h ++++ b/arch/s390/include/asm/ipl.h +@@ -127,6 +127,7 @@ int ipl_report_add_component(struct ipl_report *report, struct kexec_buf *kbuf, + unsigned char flags, unsigned short cert); + int ipl_report_add_certificate(struct ipl_report *report, void *key, + unsigned long addr, unsigned long len); ++bool ipl_get_secureboot(void); + + /* + * DIAG 308 support +diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c +index 7a21eca498aa..565f143c9858 100644 +--- a/arch/s390/kernel/ipl.c ++++ b/arch/s390/kernel/ipl.c +@@ -2215,3 +2215,8 @@ int ipl_report_free(struct ipl_report *report) + } + + #endif ++ ++bool ipl_get_secureboot(void) ++{ ++ return !!ipl_secure_flag; ++} +diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c +index 1fbed91c73bc..73f5724342b1 100644 +--- a/arch/s390/kernel/setup.c ++++ b/arch/s390/kernel/setup.c +@@ -49,6 +49,7 @@ + #include + #include + #include ++#include + #include + + #include +@@ -1100,6 +1101,9 @@ void __init setup_arch(char **cmdline_p) + + log_component_list(); + ++ if (ipl_get_secureboot()) ++ security_lock_kernel_down("Secure IPL mode", LOCKDOWN_INTEGRITY_MAX); ++ + /* Have one command line that is parsed and saved in /proc/cmdline */ + /* boot_command_line has been already set up in early.c */ + *cmdline_p = boot_command_line; +diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c +index 740f3bdb3f61..db04c427e35c 100644 +--- a/arch/x86/kernel/setup.c ++++ b/arch/x86/kernel/setup.c +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -955,6 +956,13 @@ void __init setup_arch(char **cmdline_p) + if (efi_enabled(EFI_BOOT)) + efi_init(); + ++ efi_set_secure_boot(boot_params.secure_boot); ++ ++#ifdef CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT ++ if (efi_enabled(EFI_SECURE_BOOT)) ++ security_lock_kernel_down("EFI Secure Boot mode", LOCKDOWN_INTEGRITY_MAX); ++#endif ++ + dmi_setup(); + + /* +@@ -1113,19 +1121,7 @@ void __init setup_arch(char **cmdline_p) + /* Allocate bigger log buffer */ + setup_log_buf(1); + +- if (efi_enabled(EFI_BOOT)) { +- switch (boot_params.secure_boot) { +- case efi_secureboot_mode_disabled: +- pr_info("Secure boot disabled\n"); +- break; +- case efi_secureboot_mode_enabled: +- pr_info("Secure boot enabled\n"); +- break; +- default: +- pr_info("Secure boot could not be determined\n"); +- break; +- } +- } ++ efi_set_secure_boot(boot_params.secure_boot); + + reserve_initrd(); + +diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig +index ebcf534514be..7265173689ce 100644 +--- a/drivers/acpi/Kconfig ++++ b/drivers/acpi/Kconfig +@@ -326,6 +326,9 @@ config ACPI_THERMAL + To compile this driver as a module, choose M here: + the module will be called thermal. + ++config ACPI_PLATFORM_PROFILE ++ tristate ++ + config ACPI_CUSTOM_DSDT_FILE + string "Custom DSDT Table file to include" + default "" +diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile +index 076894a3330f..52b627c7f977 100644 +--- a/drivers/acpi/Makefile ++++ b/drivers/acpi/Makefile +@@ -79,6 +79,7 @@ obj-$(CONFIG_ACPI_PCI_SLOT) += pci_slot.o + obj-$(CONFIG_ACPI_PROCESSOR) += processor.o + obj-$(CONFIG_ACPI) += container.o + obj-$(CONFIG_ACPI_THERMAL) += thermal.o ++obj-$(CONFIG_ACPI_PLATFORM_PROFILE) += platform_profile.o + obj-$(CONFIG_ACPI_NFIT) += nfit/ + obj-$(CONFIG_ACPI_NUMA) += numa/ + obj-$(CONFIG_ACPI) += acpi_memhotplug.o +diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c +index 6e980fe16772..37bc003e7a83 100644 +--- a/drivers/acpi/apei/hest.c ++++ b/drivers/acpi/apei/hest.c +@@ -88,6 +88,14 @@ int apei_hest_parse(apei_hest_func_t func, void *data) + if (hest_disable || !hest_tab) + return -EINVAL; + ++#ifdef CONFIG_ARM64 ++ /* Ignore broken firmware */ ++ if (!strncmp(hest_tab->header.oem_id, "HPE ", 6) && ++ !strncmp(hest_tab->header.oem_table_id, "ProLiant", 8) && ++ MIDR_IMPLEMENTOR(read_cpuid_id()) == ARM_CPU_IMP_APM) ++ return -EINVAL; ++#endif ++ + hest_hdr = (struct acpi_hest_header *)(hest_tab + 1); + for (i = 0; i < hest_tab->error_source_count; i++) { + len = hest_esrc_len(hest_hdr); +diff --git a/drivers/acpi/irq.c b/drivers/acpi/irq.c +index e209081d644b..7484bcf59a1b 100644 +--- a/drivers/acpi/irq.c ++++ b/drivers/acpi/irq.c +@@ -126,6 +126,7 @@ struct acpi_irq_parse_one_ctx { + unsigned int index; + unsigned long *res_flags; + struct irq_fwspec *fwspec; ++ bool skip_producer_check; + }; + + /** +@@ -197,7 +198,8 @@ static acpi_status acpi_irq_parse_one_cb(struct acpi_resource *ares, + return AE_CTRL_TERMINATE; + case ACPI_RESOURCE_TYPE_EXTENDED_IRQ: + eirq = &ares->data.extended_irq; +- if (eirq->producer_consumer == ACPI_PRODUCER) ++ if (!ctx->skip_producer_check && ++ eirq->producer_consumer == ACPI_PRODUCER) + return AE_OK; + if (ctx->index >= eirq->interrupt_count) { + ctx->index -= eirq->interrupt_count; +@@ -232,8 +234,19 @@ static acpi_status acpi_irq_parse_one_cb(struct acpi_resource *ares, + static int acpi_irq_parse_one(acpi_handle handle, unsigned int index, + struct irq_fwspec *fwspec, unsigned long *flags) + { +- struct acpi_irq_parse_one_ctx ctx = { -EINVAL, index, flags, fwspec }; ++ struct acpi_irq_parse_one_ctx ctx = { -EINVAL, index, flags, fwspec, false }; + ++ /* ++ * Firmware on arm64-based HPE m400 platform incorrectly marks ++ * its UART interrupt as ACPI_PRODUCER rather than ACPI_CONSUMER. ++ * Don't do the producer/consumer check for that device. ++ */ ++ if (IS_ENABLED(CONFIG_ARM64)) { ++ struct acpi_device *adev = acpi_bus_get_acpi_device(handle); ++ ++ if (adev && !strcmp(acpi_device_hid(adev), "APMC0D08")) ++ ctx.skip_producer_check = true; ++ } + acpi_walk_resources(handle, METHOD_NAME__CRS, acpi_irq_parse_one_cb, &ctx); + return ctx.rc; + } +diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c +index 95f23acd5b80..53cab975f612 100644 +--- a/drivers/acpi/pci_mcfg.c ++++ b/drivers/acpi/pci_mcfg.c +@@ -116,6 +116,13 @@ static struct mcfg_fixup mcfg_quirks[] = { + THUNDER_ECAM_QUIRK(2, 12), + THUNDER_ECAM_QUIRK(2, 13), + ++ { "NVIDIA", "TEGRA194", 1, 0, MCFG_BUS_ANY, &tegra194_pcie_ops}, ++ { "NVIDIA", "TEGRA194", 1, 1, MCFG_BUS_ANY, &tegra194_pcie_ops}, ++ { "NVIDIA", "TEGRA194", 1, 2, MCFG_BUS_ANY, &tegra194_pcie_ops}, ++ { "NVIDIA", "TEGRA194", 1, 3, MCFG_BUS_ANY, &tegra194_pcie_ops}, ++ { "NVIDIA", "TEGRA194", 1, 4, MCFG_BUS_ANY, &tegra194_pcie_ops}, ++ { "NVIDIA", "TEGRA194", 1, 5, MCFG_BUS_ANY, &tegra194_pcie_ops}, ++ + #define XGENE_V1_ECAM_MCFG(rev, seg) \ + {"APM ", "XGENE ", rev, seg, MCFG_BUS_ANY, \ + &xgene_v1_pcie_ecam_ops } +diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c +new file mode 100644 +index 000000000000..4a59c5993bde +--- /dev/null ++++ b/drivers/acpi/platform_profile.c +@@ -0,0 +1,177 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++ ++/* Platform profile sysfs interface */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static struct platform_profile_handler *cur_profile; ++static DEFINE_MUTEX(profile_lock); ++ ++static const char * const profile_names[] = { ++ [PLATFORM_PROFILE_LOW_POWER] = "low-power", ++ [PLATFORM_PROFILE_COOL] = "cool", ++ [PLATFORM_PROFILE_QUIET] = "quiet", ++ [PLATFORM_PROFILE_BALANCED] = "balanced", ++ [PLATFORM_PROFILE_PERFORMANCE] = "performance", ++}; ++static_assert(ARRAY_SIZE(profile_names) == PLATFORM_PROFILE_LAST); ++ ++static ssize_t platform_profile_choices_show(struct device *dev, ++ struct device_attribute *attr, ++ char *buf) ++{ ++ int len = 0; ++ int err, i; ++ ++ err = mutex_lock_interruptible(&profile_lock); ++ if (err) ++ return err; ++ ++ if (!cur_profile) { ++ mutex_unlock(&profile_lock); ++ return -ENODEV; ++ } ++ ++ for_each_set_bit(i, cur_profile->choices, PLATFORM_PROFILE_LAST) { ++ if (len == 0) ++ len += sysfs_emit_at(buf, len, "%s", profile_names[i]); ++ else ++ len += sysfs_emit_at(buf, len, " %s", profile_names[i]); ++ } ++ len += sysfs_emit_at(buf, len, "\n"); ++ mutex_unlock(&profile_lock); ++ return len; ++} ++ ++static ssize_t platform_profile_show(struct device *dev, ++ struct device_attribute *attr, ++ char *buf) ++{ ++ enum platform_profile_option profile = PLATFORM_PROFILE_BALANCED; ++ int err; ++ ++ err = mutex_lock_interruptible(&profile_lock); ++ if (err) ++ return err; ++ ++ if (!cur_profile) { ++ mutex_unlock(&profile_lock); ++ return -ENODEV; ++ } ++ ++ err = cur_profile->profile_get(cur_profile, &profile); ++ mutex_unlock(&profile_lock); ++ if (err) ++ return err; ++ ++ /* Check that profile is valid index */ ++ if (WARN_ON((profile < 0) || (profile >= ARRAY_SIZE(profile_names)))) ++ return -EIO; ++ ++ return sysfs_emit(buf, "%s\n", profile_names[profile]); ++} ++ ++static ssize_t platform_profile_store(struct device *dev, ++ struct device_attribute *attr, ++ const char *buf, size_t count) ++{ ++ int err, i; ++ ++ err = mutex_lock_interruptible(&profile_lock); ++ if (err) ++ return err; ++ ++ if (!cur_profile) { ++ mutex_unlock(&profile_lock); ++ return -ENODEV; ++ } ++ ++ /* Scan for a matching profile */ ++ i = sysfs_match_string(profile_names, buf); ++ if (i < 0) { ++ mutex_unlock(&profile_lock); ++ return -EINVAL; ++ } ++ ++ /* Check that platform supports this profile choice */ ++ if (!test_bit(i, cur_profile->choices)) { ++ mutex_unlock(&profile_lock); ++ return -EOPNOTSUPP; ++ } ++ ++ err = cur_profile->profile_set(cur_profile, i); ++ mutex_unlock(&profile_lock); ++ if (err) ++ return err; ++ return count; ++} ++ ++static DEVICE_ATTR_RO(platform_profile_choices); ++static DEVICE_ATTR_RW(platform_profile); ++ ++static struct attribute *platform_profile_attrs[] = { ++ &dev_attr_platform_profile_choices.attr, ++ &dev_attr_platform_profile.attr, ++ NULL ++}; ++ ++static const struct attribute_group platform_profile_group = { ++ .attrs = platform_profile_attrs ++}; ++ ++void platform_profile_notify(void) ++{ ++ if (!cur_profile) ++ return; ++ sysfs_notify(acpi_kobj, NULL, "platform_profile"); ++} ++EXPORT_SYMBOL_GPL(platform_profile_notify); ++ ++int platform_profile_register(struct platform_profile_handler *pprof) ++{ ++ int err; ++ ++ mutex_lock(&profile_lock); ++ /* We can only have one active profile */ ++ if (cur_profile) { ++ mutex_unlock(&profile_lock); ++ return -EEXIST; ++ } ++ ++ /* Sanity check the profile handler field are set */ ++ if (!pprof || bitmap_empty(pprof->choices, PLATFORM_PROFILE_LAST) || ++ !pprof->profile_set || !pprof->profile_get) { ++ mutex_unlock(&profile_lock); ++ return -EINVAL; ++ } ++ ++ err = sysfs_create_group(acpi_kobj, &platform_profile_group); ++ if (err) { ++ mutex_unlock(&profile_lock); ++ return err; ++ } ++ ++ cur_profile = pprof; ++ mutex_unlock(&profile_lock); ++ return 0; ++} ++EXPORT_SYMBOL_GPL(platform_profile_register); ++ ++int platform_profile_remove(void) ++{ ++ sysfs_remove_group(acpi_kobj, &platform_profile_group); ++ ++ mutex_lock(&profile_lock); ++ cur_profile = NULL; ++ mutex_unlock(&profile_lock); ++ return 0; ++} ++EXPORT_SYMBOL_GPL(platform_profile_remove); ++ ++MODULE_AUTHOR("Mark Pearson "); ++MODULE_LICENSE("GPL"); +diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c +index 22566b4b3150..4c2294593928 100644 +--- a/drivers/acpi/scan.c ++++ b/drivers/acpi/scan.c +@@ -1620,6 +1620,15 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device) + if (!acpi_match_device_ids(device, i2c_multi_instantiate_ids)) + return false; + ++ /* ++ * Firmware on some arm64 X-Gene platforms will make the UART ++ * device appear as both a UART and a slave of that UART. Just ++ * bail out here for X-Gene UARTs. ++ */ ++ if (IS_ENABLED(CONFIG_ARM64) && ++ !strcmp(acpi_device_hid(device), "APMC0D08")) ++ return false; ++ + INIT_LIST_HEAD(&resource_list); + acpi_dev_get_resources(device, &resource_list, + acpi_check_serial_bus_slave, +diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c +index ea5bf5f4cbed..71c55cae27ac 100644 +--- a/drivers/ata/libahci.c ++++ b/drivers/ata/libahci.c +@@ -666,6 +666,24 @@ int ahci_stop_engine(struct ata_port *ap) + tmp &= ~PORT_CMD_START; + writel(tmp, port_mmio + PORT_CMD); + ++#ifdef CONFIG_ARM64 ++ /* Rev Ax of Cavium CN99XX needs a hack for port stop */ ++ if (dev_is_pci(ap->host->dev) && ++ to_pci_dev(ap->host->dev)->vendor == 0x14e4 && ++ to_pci_dev(ap->host->dev)->device == 0x9027 && ++ midr_is_cpu_model_range(read_cpuid_id(), ++ MIDR_CPU_MODEL(ARM_CPU_IMP_BRCM, BRCM_CPU_PART_VULCAN), ++ MIDR_CPU_VAR_REV(0, 0), ++ MIDR_CPU_VAR_REV(0, MIDR_REVISION_MASK))) { ++ tmp = readl(hpriv->mmio + 0x8000); ++ udelay(100); ++ writel(tmp | (1 << 26), hpriv->mmio + 0x8000); ++ udelay(100); ++ writel(tmp & ~(1 << 26), hpriv->mmio + 0x8000); ++ dev_warn(ap->host->dev, "CN99XX SATA reset workaround applied\n"); ++ } ++#endif ++ + /* wait for engine to stop. This could be as long as 500 msec */ + tmp = ata_wait_register(ap, port_mmio + PORT_CMD, + PORT_CMD_LIST_ON, PORT_CMD_LIST_ON, 1, 500); +diff --git a/drivers/char/ipmi/ipmi_dmi.c b/drivers/char/ipmi/ipmi_dmi.c +index bbf7029e224b..cf7faa970dd6 100644 +--- a/drivers/char/ipmi/ipmi_dmi.c ++++ b/drivers/char/ipmi/ipmi_dmi.c +@@ -215,6 +215,21 @@ static int __init scan_for_dmi_ipmi(void) + { + const struct dmi_device *dev = NULL; + ++#ifdef CONFIG_ARM64 ++ /* RHEL-only ++ * If this is ARM-based HPE m400, return now, because that platform ++ * reports the host-side ipmi address as intel port-io space, which ++ * does not exist in the ARM architecture. ++ */ ++ const char *dmistr = dmi_get_system_info(DMI_PRODUCT_NAME); ++ ++ if (dmistr && (strcmp("ProLiant m400 Server", dmistr) == 0)) { ++ pr_debug("%s does not support host ipmi\n", dmistr); ++ return 0; ++ } ++ /* END RHEL-only */ ++#endif ++ + while ((dev = dmi_find_device(DMI_DEV_TYPE_IPMI, NULL, dev))) + dmi_decode_ipmi((const struct dmi_header *) dev->device_data); + +diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c +index c44ad18464f1..3ec1db4cbbc3 100644 +--- a/drivers/char/ipmi/ipmi_msghandler.c ++++ b/drivers/char/ipmi/ipmi_msghandler.c +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + #include + + #define IPMI_DRIVER_VERSION "39.2" +@@ -5174,8 +5175,21 @@ static int __init ipmi_init_msghandler_mod(void) + { + int rv; + +- pr_info("version " IPMI_DRIVER_VERSION "\n"); ++#ifdef CONFIG_ARM64 ++ /* RHEL-only ++ * If this is ARM-based HPE m400, return now, because that platform ++ * reports the host-side ipmi address as intel port-io space, which ++ * does not exist in the ARM architecture. ++ */ ++ const char *dmistr = dmi_get_system_info(DMI_PRODUCT_NAME); + ++ if (dmistr && (strcmp("ProLiant m400 Server", dmistr) == 0)) { ++ pr_debug("%s does not support host ipmi\n", dmistr); ++ return -ENOSYS; ++ } ++ /* END RHEL-only */ ++#endif ++ pr_info("version " IPMI_DRIVER_VERSION "\n"); + mutex_lock(&ipmi_interfaces_mutex); + rv = ipmi_register_driver(); + mutex_unlock(&ipmi_interfaces_mutex); +diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile +index 467e94259679..9b6f5b8e5397 100644 +--- a/drivers/firmware/efi/Makefile ++++ b/drivers/firmware/efi/Makefile +@@ -28,6 +28,7 @@ obj-$(CONFIG_EFI_FAKE_MEMMAP) += fake_map.o + obj-$(CONFIG_EFI_BOOTLOADER_CONTROL) += efibc.o + obj-$(CONFIG_EFI_TEST) += test/ + obj-$(CONFIG_EFI_DEV_PATH_PARSER) += dev-path-parser.o ++obj-$(CONFIG_EFI) += secureboot.o + obj-$(CONFIG_APPLE_PROPERTIES) += apple-properties.o + obj-$(CONFIG_EFI_RCI2_TABLE) += rci2-table.o + obj-$(CONFIG_EFI_EMBEDDED_FIRMWARE) += embedded-firmware.o +diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c +index df3f9bcab581..8d5b6eb36467 100644 +--- a/drivers/firmware/efi/efi.c ++++ b/drivers/firmware/efi/efi.c +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + + #include + +@@ -841,40 +842,101 @@ int efi_mem_type(unsigned long phys_addr) + } + #endif + ++struct efi_error_code { ++ efi_status_t status; ++ int errno; ++ const char *description; ++}; ++ ++static const struct efi_error_code efi_error_codes[] = { ++ { EFI_SUCCESS, 0, "Success"}, ++#if 0 ++ { EFI_LOAD_ERROR, -EPICK_AN_ERRNO, "Load Error"}, ++#endif ++ { EFI_INVALID_PARAMETER, -EINVAL, "Invalid Parameter"}, ++ { EFI_UNSUPPORTED, -ENOSYS, "Unsupported"}, ++ { EFI_BAD_BUFFER_SIZE, -ENOSPC, "Bad Buffer Size"}, ++ { EFI_BUFFER_TOO_SMALL, -ENOSPC, "Buffer Too Small"}, ++ { EFI_NOT_READY, -EAGAIN, "Not Ready"}, ++ { EFI_DEVICE_ERROR, -EIO, "Device Error"}, ++ { EFI_WRITE_PROTECTED, -EROFS, "Write Protected"}, ++ { EFI_OUT_OF_RESOURCES, -ENOMEM, "Out of Resources"}, ++#if 0 ++ { EFI_VOLUME_CORRUPTED, -EPICK_AN_ERRNO, "Volume Corrupt"}, ++ { EFI_VOLUME_FULL, -EPICK_AN_ERRNO, "Volume Full"}, ++ { EFI_NO_MEDIA, -EPICK_AN_ERRNO, "No Media"}, ++ { EFI_MEDIA_CHANGED, -EPICK_AN_ERRNO, "Media changed"}, ++#endif ++ { EFI_NOT_FOUND, -ENOENT, "Not Found"}, ++#if 0 ++ { EFI_ACCESS_DENIED, -EPICK_AN_ERRNO, "Access Denied"}, ++ { EFI_NO_RESPONSE, -EPICK_AN_ERRNO, "No Response"}, ++ { EFI_NO_MAPPING, -EPICK_AN_ERRNO, "No mapping"}, ++ { EFI_TIMEOUT, -EPICK_AN_ERRNO, "Time out"}, ++ { EFI_NOT_STARTED, -EPICK_AN_ERRNO, "Not started"}, ++ { EFI_ALREADY_STARTED, -EPICK_AN_ERRNO, "Already started"}, ++#endif ++ { EFI_ABORTED, -EINTR, "Aborted"}, ++#if 0 ++ { EFI_ICMP_ERROR, -EPICK_AN_ERRNO, "ICMP Error"}, ++ { EFI_TFTP_ERROR, -EPICK_AN_ERRNO, "TFTP Error"}, ++ { EFI_PROTOCOL_ERROR, -EPICK_AN_ERRNO, "Protocol Error"}, ++ { EFI_INCOMPATIBLE_VERSION, -EPICK_AN_ERRNO, "Incompatible Version"}, ++#endif ++ { EFI_SECURITY_VIOLATION, -EACCES, "Security Policy Violation"}, ++#if 0 ++ { EFI_CRC_ERROR, -EPICK_AN_ERRNO, "CRC Error"}, ++ { EFI_END_OF_MEDIA, -EPICK_AN_ERRNO, "End of Media"}, ++ { EFI_END_OF_FILE, -EPICK_AN_ERRNO, "End of File"}, ++ { EFI_INVALID_LANGUAGE, -EPICK_AN_ERRNO, "Invalid Languages"}, ++ { EFI_COMPROMISED_DATA, -EPICK_AN_ERRNO, "Compromised Data"}, ++ ++ // warnings ++ { EFI_WARN_UNKOWN_GLYPH, -EPICK_AN_ERRNO, "Warning Unknown Glyph"}, ++ { EFI_WARN_DELETE_FAILURE, -EPICK_AN_ERRNO, "Warning Delete Failure"}, ++ { EFI_WARN_WRITE_FAILURE, -EPICK_AN_ERRNO, "Warning Write Failure"}, ++ { EFI_WARN_BUFFER_TOO_SMALL, -EPICK_AN_ERRNO, "Warning Buffer Too Small"}, ++#endif ++}; ++ ++static int ++efi_status_cmp_bsearch(const void *key, const void *item) ++{ ++ u64 status = (u64)(uintptr_t)key; ++ struct efi_error_code *code = (struct efi_error_code *)item; ++ ++ if (status < code->status) ++ return -1; ++ if (status > code->status) ++ return 1; ++ return 0; ++} ++ + int efi_status_to_err(efi_status_t status) + { +- int err; +- +- switch (status) { +- case EFI_SUCCESS: +- err = 0; +- break; +- case EFI_INVALID_PARAMETER: +- err = -EINVAL; +- break; +- case EFI_OUT_OF_RESOURCES: +- err = -ENOSPC; +- break; +- case EFI_DEVICE_ERROR: +- err = -EIO; +- break; +- case EFI_WRITE_PROTECTED: +- err = -EROFS; +- break; +- case EFI_SECURITY_VIOLATION: +- err = -EACCES; +- break; +- case EFI_NOT_FOUND: +- err = -ENOENT; +- break; +- case EFI_ABORTED: +- err = -EINTR; +- break; +- default: +- err = -EINVAL; +- } ++ struct efi_error_code *found; ++ size_t num = sizeof(efi_error_codes) / sizeof(struct efi_error_code); + +- return err; ++ found = bsearch((void *)(uintptr_t)status, efi_error_codes, ++ sizeof(struct efi_error_code), num, ++ efi_status_cmp_bsearch); ++ if (!found) ++ return -EINVAL; ++ return found->errno; ++} ++ ++const char * ++efi_status_to_str(efi_status_t status) ++{ ++ struct efi_error_code *found; ++ size_t num = sizeof(efi_error_codes) / sizeof(struct efi_error_code); ++ ++ found = bsearch((void *)(uintptr_t)status, efi_error_codes, ++ sizeof(struct efi_error_code), num, ++ efi_status_cmp_bsearch); ++ if (!found) ++ return "Unknown error code"; ++ return found->description; + } + + static DEFINE_SPINLOCK(efi_mem_reserve_persistent_lock); +diff --git a/drivers/firmware/efi/secureboot.c b/drivers/firmware/efi/secureboot.c +new file mode 100644 +index 000000000000..de0a3714a5d4 +--- /dev/null ++++ b/drivers/firmware/efi/secureboot.c +@@ -0,0 +1,38 @@ ++/* Core kernel secure boot support. ++ * ++ * Copyright (C) 2017 Red Hat, Inc. All Rights Reserved. ++ * Written by David Howells (dhowells@redhat.com) ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public Licence ++ * as published by the Free Software Foundation; either version ++ * 2 of the Licence, or (at your option) any later version. ++ */ ++ ++#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt ++ ++#include ++#include ++#include ++ ++/* ++ * Decide what to do when UEFI secure boot mode is enabled. ++ */ ++void __init efi_set_secure_boot(enum efi_secureboot_mode mode) ++{ ++ if (efi_enabled(EFI_BOOT)) { ++ switch (mode) { ++ case efi_secureboot_mode_disabled: ++ pr_info("Secure boot disabled\n"); ++ break; ++ case efi_secureboot_mode_enabled: ++ set_bit(EFI_SECURE_BOOT, &efi.flags); ++ pr_info("Secure boot enabled\n"); ++ break; ++ default: ++ pr_warn("Secure boot could not be determined (mode %u)\n", ++ mode); ++ break; ++ } ++ } ++} +diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig +index b4e021ea30f9..5687b745ebe2 100644 +--- a/drivers/gpu/drm/panel/Kconfig ++++ b/drivers/gpu/drm/panel/Kconfig +@@ -532,6 +532,15 @@ config DRM_PANEL_VISIONOX_RM69299 + Say Y here if you want to enable support for Visionox + RM69299 DSI Video Mode panel. + ++config DRM_PANEL_XINGBANGDA_XBD599 ++ tristate "Xingbangda XBD599 panel" ++ depends on OF ++ depends on DRM_MIPI_DSI ++ depends on BACKLIGHT_CLASS_DEVICE ++ help ++ Say Y here if you want to enable support for the Xingbangda XBD599 ++ MIPI DSI Video Mode panel. ++ + config DRM_PANEL_XINPENG_XPP055C272 + tristate "Xinpeng XPP055C272 panel driver" + depends on OF +diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile +index ebbf488c7eac..cc539a167f40 100644 +--- a/drivers/gpu/drm/panel/Makefile ++++ b/drivers/gpu/drm/panel/Makefile +@@ -56,4 +56,5 @@ obj-$(CONFIG_DRM_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o + obj-$(CONFIG_DRM_PANEL_TPO_TPG110) += panel-tpo-tpg110.o + obj-$(CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA) += panel-truly-nt35597.o + obj-$(CONFIG_DRM_PANEL_VISIONOX_RM69299) += panel-visionox-rm69299.o ++obj-$(CONFIG_DRM_PANEL_XINGBANGDA_XBD599) += panel-xingbangda-xbd599.o + obj-$(CONFIG_DRM_PANEL_XINPENG_XPP055C272) += panel-xinpeng-xpp055c272.o +diff --git a/drivers/gpu/drm/panel/panel-xingbangda-xbd599.c b/drivers/gpu/drm/panel/panel-xingbangda-xbd599.c +new file mode 100644 +index 000000000000..b483f96ee1db +--- /dev/null ++++ b/drivers/gpu/drm/panel/panel-xingbangda-xbd599.c +@@ -0,0 +1,366 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* ++ * Xingbangda XBD599 MIPI-DSI panel driver ++ * ++ * Copyright (C) 2019-2020 Icenowy Zheng ++ * ++ * Based on panel-rocktech-jh057n00900.c, which is: ++ * Copyright (C) Purism SPC 2019 ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++/* Manufacturer specific Commands send via DSI */ ++#define ST7703_CMD_ALL_PIXEL_OFF 0x22 ++#define ST7703_CMD_ALL_PIXEL_ON 0x23 ++#define ST7703_CMD_SETDISP 0xB2 ++#define ST7703_CMD_SETRGBIF 0xB3 ++#define ST7703_CMD_SETCYC 0xB4 ++#define ST7703_CMD_SETBGP 0xB5 ++#define ST7703_CMD_SETVCOM 0xB6 ++#define ST7703_CMD_SETOTP 0xB7 ++#define ST7703_CMD_SETPOWER_EXT 0xB8 ++#define ST7703_CMD_SETEXTC 0xB9 ++#define ST7703_CMD_SETMIPI 0xBA ++#define ST7703_CMD_SETVDC 0xBC ++#define ST7703_CMD_SETSCR 0xC0 ++#define ST7703_CMD_SETPOWER 0xC1 ++#define ST7703_CMD_UNK_C6 0xC6 ++#define ST7703_CMD_SETPANEL 0xCC ++#define ST7703_CMD_SETGAMMA 0xE0 ++#define ST7703_CMD_SETEQ 0xE3 ++#define ST7703_CMD_SETGIP1 0xE9 ++#define ST7703_CMD_SETGIP2 0xEA ++ ++static const char * const regulator_names[] = { ++ "iovcc", ++ "vcc", ++}; ++ ++struct xbd599 { ++ struct device *dev; ++ struct drm_panel panel; ++ struct gpio_desc *reset_gpio; ++ struct regulator_bulk_data supplies[ARRAY_SIZE(regulator_names)]; ++ bool prepared; ++}; ++ ++static inline struct xbd599 *panel_to_xbd599(struct drm_panel *panel) ++{ ++ return container_of(panel, struct xbd599, panel); ++} ++ ++#define dsi_dcs_write_seq(dsi, cmd, seq...) do { \ ++ static const u8 d[] = { seq }; \ ++ int ret; \ ++ ret = mipi_dsi_dcs_write(dsi, cmd, d, ARRAY_SIZE(d)); \ ++ if (ret < 0) \ ++ return ret; \ ++ } while (0) ++ ++static int xbd599_init_sequence(struct xbd599 *ctx) ++{ ++ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); ++ struct device *dev = ctx->dev; ++ int ret; ++ ++ /* ++ * Init sequence was supplied by the panel vendor. ++ */ ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETEXTC, ++ 0xF1, 0x12, 0x83); ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, ++ 0x33, 0x81, 0x05, 0xF9, 0x0E, 0x0E, 0x20, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, ++ 0x00, 0x91, 0x0a, 0x00, 0x00, 0x02, 0x4F, 0x11, ++ 0x00, 0x00, 0x37); ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, ++ 0x25, 0x22, 0x20, 0x03); ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETRGBIF, ++ 0x10, 0x10, 0x05, 0x05, 0x03, 0xFF, 0x00, 0x00, ++ 0x00, 0x00); ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETSCR, ++ 0x73, 0x73, 0x50, 0x50, 0x00, 0xC0, 0x08, 0x70, ++ 0x00); ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETVDC, 0x4E); ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0B); ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80); ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETDISP, 0xF0, 0x12, 0xF0); ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETEQ, ++ 0x00, 0x00, 0x0B, 0x0B, 0x10, 0x10, 0x00, 0x00, ++ 0x00, 0x00, 0xFF, 0x00, 0xC0, 0x10); ++ dsi_dcs_write_seq(dsi, 0xC6, 0x01, 0x00, 0xFF, 0xFF, 0x00); ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER, ++ 0x74, 0x00, 0x32, 0x32, 0x77, 0xF1, 0xFF, 0xFF, ++ 0xCC, 0xCC, 0x77, 0x77); ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x07, 0x07); ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x2C, 0x2C); ++ dsi_dcs_write_seq(dsi, 0xBF, 0x02, 0x11, 0x00); ++ ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP1, ++ 0x82, 0x10, 0x06, 0x05, 0xA2, 0x0A, 0xA5, 0x12, ++ 0x31, 0x23, 0x37, 0x83, 0x04, 0xBC, 0x27, 0x38, ++ 0x0C, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x00, ++ 0x03, 0x00, 0x00, 0x00, 0x75, 0x75, 0x31, 0x88, ++ 0x88, 0x88, 0x88, 0x88, 0x88, 0x13, 0x88, 0x64, ++ 0x64, 0x20, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, ++ 0x02, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP2, ++ 0x02, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x02, 0x46, 0x02, 0x88, ++ 0x88, 0x88, 0x88, 0x88, 0x88, 0x64, 0x88, 0x13, ++ 0x57, 0x13, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, ++ 0x75, 0x88, 0x23, 0x14, 0x00, 0x00, 0x02, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0A, ++ 0xA5, 0x00, 0x00, 0x00, 0x00); ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGAMMA, ++ 0x00, 0x09, 0x0D, 0x23, 0x27, 0x3C, 0x41, 0x35, ++ 0x07, 0x0D, 0x0E, 0x12, 0x13, 0x10, 0x12, 0x12, ++ 0x18, 0x00, 0x09, 0x0D, 0x23, 0x27, 0x3C, 0x41, ++ 0x35, 0x07, 0x0D, 0x0E, 0x12, 0x13, 0x10, 0x12, ++ 0x12, 0x18); ++ msleep(20); ++ ++ ret = mipi_dsi_dcs_exit_sleep_mode(dsi); ++ if (ret < 0) { ++ DRM_DEV_ERROR(dev, "Failed to exit sleep mode\n"); ++ return ret; ++ } ++ msleep(250); ++ ++ ret = mipi_dsi_dcs_set_display_on(dsi); ++ if (ret) ++ return ret; ++ msleep(50); ++ ++ DRM_DEV_DEBUG_DRIVER(dev, "Panel init sequence done\n"); ++ return 0; ++} ++ ++static int xbd599_prepare(struct drm_panel *panel) ++{ ++ struct xbd599 *ctx = panel_to_xbd599(panel); ++ int ret; ++ ++ if (ctx->prepared) ++ return 0; ++ ++ ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies); ++ if (ret) ++ return ret; ++ ++ DRM_DEV_DEBUG_DRIVER(ctx->dev, "Resetting the panel\n"); ++ gpiod_set_value_cansleep(ctx->reset_gpio, 1); ++ usleep_range(20, 40); ++ gpiod_set_value_cansleep(ctx->reset_gpio, 0); ++ msleep(20); ++ ++ ctx->prepared = true; ++ ++ return 0; ++} ++ ++static int xbd599_enable(struct drm_panel *panel) ++{ ++ struct xbd599 *ctx = panel_to_xbd599(panel); ++ int ret; ++ ++ ret = xbd599_init_sequence(ctx); ++ if (ret < 0) { ++ DRM_DEV_ERROR(ctx->dev, "Panel init sequence failed: %d\n", ++ ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int xbd599_disable(struct drm_panel *panel) ++{ ++ struct xbd599 *ctx = panel_to_xbd599(panel); ++ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); ++ ++ return mipi_dsi_dcs_set_display_off(dsi); ++} ++ ++static int xbd599_unprepare(struct drm_panel *panel) ++{ ++ struct xbd599 *ctx = panel_to_xbd599(panel); ++ ++ if (!ctx->prepared) ++ return 0; ++ ++ gpiod_set_value_cansleep(ctx->reset_gpio, 1); ++ regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); ++ ctx->prepared = false; ++ ++ return 0; ++} ++ ++static const struct drm_display_mode xbd599_default_mode = { ++ .hdisplay = 720, ++ .hsync_start = 720 + 40, ++ .hsync_end = 720 + 40 + 40, ++ .htotal = 720 + 40 + 40 + 40, ++ .vdisplay = 1440, ++ .vsync_start = 1440 + 18, ++ .vsync_end = 1440 + 18 + 10, ++ .vtotal = 1440 + 18 + 10 + 17, ++ .vrefresh = 60, ++ .clock = 69000, ++ .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, ++ ++ .width_mm = 68, ++ .height_mm = 136, ++ .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, ++}; ++ ++static int xbd599_get_modes(struct drm_panel *panel, ++ struct drm_connector *connector) ++{ ++ struct xbd599 *ctx = panel_to_xbd599(panel); ++ struct drm_display_mode *mode; ++ ++ mode = drm_mode_duplicate(connector->dev, &xbd599_default_mode); ++ if (!mode) { ++ DRM_DEV_ERROR(ctx->dev, "Failed to add mode\n"); ++ return -ENOMEM; ++ } ++ ++ drm_mode_set_name(mode); ++ ++ mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; ++ connector->display_info.width_mm = mode->width_mm; ++ connector->display_info.height_mm = mode->height_mm; ++ drm_mode_probed_add(connector, mode); ++ ++ return 1; ++} ++ ++static const struct drm_panel_funcs xbd599_drm_funcs = { ++ .prepare = xbd599_prepare, ++ .enable = xbd599_enable, ++ .disable = xbd599_disable, ++ .unprepare = xbd599_unprepare, ++ .get_modes = xbd599_get_modes, ++}; ++ ++static int xbd599_probe(struct mipi_dsi_device *dsi) ++{ ++ struct device *dev = &dsi->dev; ++ struct xbd599 *ctx; ++ int i, ret; ++ ++ ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); ++ if (!ctx) ++ return -ENOMEM; ++ ++ for (i = 0; i < ARRAY_SIZE(ctx->supplies); i++) ++ ctx->supplies[i].supply = regulator_names[i]; ++ ++ ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), ++ ctx->supplies); ++ if (ret < 0) { ++ DRM_DEV_ERROR(&dsi->dev, "cannot get regulators\n"); ++ return ret; ++ } ++ ++ ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); ++ if (IS_ERR(ctx->reset_gpio)) { ++ DRM_DEV_ERROR(dev, "cannot get reset gpio\n"); ++ return PTR_ERR(ctx->reset_gpio); ++ } ++ ++ mipi_dsi_set_drvdata(dsi, ctx); ++ ++ ctx->dev = dev; ++ ++ dsi->lanes = 4; ++ dsi->format = MIPI_DSI_FMT_RGB888; ++ dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE; ++ ++ drm_panel_init(&ctx->panel, &dsi->dev, &xbd599_drm_funcs, ++ DRM_MODE_CONNECTOR_DSI); ++ ++ ret = drm_panel_of_backlight(&ctx->panel); ++ if (ret) ++ return ret; ++ ++ drm_panel_add(&ctx->panel); ++ ++ ret = mipi_dsi_attach(dsi); ++ if (ret < 0) { ++ DRM_DEV_ERROR(dev, "mipi_dsi_attach failed. Is host ready?\n"); ++ drm_panel_remove(&ctx->panel); ++ return ret; ++ } ++ ++ DRM_DEV_INFO(dev, "%ux%u@%u %ubpp dsi %udl - ready\n", ++ xbd599_default_mode.hdisplay, ++ xbd599_default_mode.vdisplay, ++ xbd599_default_mode.vrefresh, ++ mipi_dsi_pixel_format_to_bpp(dsi->format), dsi->lanes); ++ ++ return 0; ++} ++ ++static void xbd599_shutdown(struct mipi_dsi_device *dsi) ++{ ++ struct xbd599 *ctx = mipi_dsi_get_drvdata(dsi); ++ int ret; ++ ++ ret = drm_panel_unprepare(&ctx->panel); ++ if (ret < 0) ++ DRM_DEV_ERROR(&dsi->dev, "Failed to unprepare panel: %d\n", ++ ret); ++} ++ ++static int xbd599_remove(struct mipi_dsi_device *dsi) ++{ ++ struct xbd599 *ctx = mipi_dsi_get_drvdata(dsi); ++ int ret; ++ ++ xbd599_shutdown(dsi); ++ ++ ret = mipi_dsi_detach(dsi); ++ if (ret < 0) ++ DRM_DEV_ERROR(&dsi->dev, "Failed to detach from DSI host: %d\n", ++ ret); ++ ++ drm_panel_remove(&ctx->panel); ++ ++ return 0; ++} ++ ++static const struct of_device_id xbd599_of_match[] = { ++ { .compatible = "xingbangda,xbd599", }, ++ { /* sentinel */ } ++}; ++MODULE_DEVICE_TABLE(of, xbd599_of_match); ++ ++static struct mipi_dsi_driver xbd599_driver = { ++ .probe = xbd599_probe, ++ .remove = xbd599_remove, ++ .shutdown = xbd599_shutdown, ++ .driver = { ++ .name = "panel-xingbangda-xbd599", ++ .of_match_table = xbd599_of_match, ++ }, ++}; ++module_mipi_dsi_driver(xbd599_driver); ++ ++MODULE_AUTHOR("Icenowy Zheng "); ++MODULE_DESCRIPTION("DRM driver for Xingbangda XBD599 MIPI DSI panel"); ++MODULE_LICENSE("GPL v2"); +diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +index 4f5efcace68e..5af808078efd 100644 +--- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c ++++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +@@ -556,7 +556,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, + */ + #define HSA_PACKET_OVERHEAD 10 + hsa = max((unsigned int)HSA_PACKET_OVERHEAD, +- (mode->hsync_end - mode->hsync_start) * Bpp - HSA_PACKET_OVERHEAD); ++ (mode->hsync_end - mode->hsync_start) * Bpp) - HSA_PACKET_OVERHEAD; + + /* + * The backporch is set using a blanking packet (4 +@@ -565,7 +565,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, + */ + #define HBP_PACKET_OVERHEAD 6 + hbp = max((unsigned int)HBP_PACKET_OVERHEAD, +- (mode->htotal - mode->hsync_end) * Bpp - HBP_PACKET_OVERHEAD); ++ (mode->htotal - mode->hsync_end) * Bpp) - HBP_PACKET_OVERHEAD; + + /* + * The frontporch is set using a sync event (4 bytes) +@@ -575,7 +575,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, + */ + #define HFP_PACKET_OVERHEAD 16 + hfp = max((unsigned int)HFP_PACKET_OVERHEAD, +- (mode->hsync_start - mode->hdisplay) * Bpp - HFP_PACKET_OVERHEAD); ++ (mode->hsync_start - mode->hdisplay) * Bpp) - HFP_PACKET_OVERHEAD; + + /* + * The blanking is set using a sync event (4 bytes) +@@ -584,8 +584,8 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, + */ + #define HBLK_PACKET_OVERHEAD 10 + hblk = max((unsigned int)HBLK_PACKET_OVERHEAD, +- (mode->htotal - (mode->hsync_end - mode->hsync_start)) * Bpp - +- HBLK_PACKET_OVERHEAD); ++ (mode->htotal - (mode->hsync_end - mode->hsync_start)) * Bpp) - ++ HBLK_PACKET_OVERHEAD; + + /* + * And I'm not entirely sure what vblk is about. The driver in +diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c +index 311eee599ce9..2460c6bd46f8 100644 +--- a/drivers/hid/hid-rmi.c ++++ b/drivers/hid/hid-rmi.c +@@ -322,19 +322,12 @@ static int rmi_input_event(struct hid_device *hdev, u8 *data, int size) + { + struct rmi_data *hdata = hid_get_drvdata(hdev); + struct rmi_device *rmi_dev = hdata->xport.rmi_dev; +- unsigned long flags; + + if (!(test_bit(RMI_STARTED, &hdata->flags))) + return 0; + +- local_irq_save(flags); +- + rmi_set_attn_data(rmi_dev, data[1], &data[2], size - 2); + +- generic_handle_irq(hdata->rmi_irq); +- +- local_irq_restore(flags); +- + return 1; + } + +@@ -591,56 +584,6 @@ static const struct rmi_transport_ops hid_rmi_ops = { + .reset = rmi_hid_reset, + }; + +-static void rmi_irq_teardown(void *data) +-{ +- struct rmi_data *hdata = data; +- struct irq_domain *domain = hdata->domain; +- +- if (!domain) +- return; +- +- irq_dispose_mapping(irq_find_mapping(domain, 0)); +- +- irq_domain_remove(domain); +- hdata->domain = NULL; +- hdata->rmi_irq = 0; +-} +- +-static int rmi_irq_map(struct irq_domain *h, unsigned int virq, +- irq_hw_number_t hw_irq_num) +-{ +- irq_set_chip_and_handler(virq, &dummy_irq_chip, handle_simple_irq); +- +- return 0; +-} +- +-static const struct irq_domain_ops rmi_irq_ops = { +- .map = rmi_irq_map, +-}; +- +-static int rmi_setup_irq_domain(struct hid_device *hdev) +-{ +- struct rmi_data *hdata = hid_get_drvdata(hdev); +- int ret; +- +- hdata->domain = irq_domain_create_linear(hdev->dev.fwnode, 1, +- &rmi_irq_ops, hdata); +- if (!hdata->domain) +- return -ENOMEM; +- +- ret = devm_add_action_or_reset(&hdev->dev, &rmi_irq_teardown, hdata); +- if (ret) +- return ret; +- +- hdata->rmi_irq = irq_create_mapping(hdata->domain, 0); +- if (hdata->rmi_irq <= 0) { +- hid_err(hdev, "Can't allocate an IRQ\n"); +- return hdata->rmi_irq < 0 ? hdata->rmi_irq : -ENXIO; +- } +- +- return 0; +-} +- + static int rmi_probe(struct hid_device *hdev, const struct hid_device_id *id) + { + struct rmi_data *data = NULL; +@@ -713,18 +656,11 @@ static int rmi_probe(struct hid_device *hdev, const struct hid_device_id *id) + + mutex_init(&data->page_mutex); + +- ret = rmi_setup_irq_domain(hdev); +- if (ret) { +- hid_err(hdev, "failed to allocate IRQ domain\n"); +- return ret; +- } +- + if (data->device_flags & RMI_DEVICE_HAS_PHYS_BUTTONS) + rmi_hid_pdata.gpio_data.disable = true; + + data->xport.dev = hdev->dev.parent; + data->xport.pdata = rmi_hid_pdata; +- data->xport.pdata.irq = data->rmi_irq; + data->xport.proto_name = "hid"; + data->xport.ops = &hid_rmi_ops; + +diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c +index 258d5fe3d395..f7298e3dc8f3 100644 +--- a/drivers/input/rmi4/rmi_driver.c ++++ b/drivers/input/rmi4/rmi_driver.c +@@ -182,34 +182,47 @@ void rmi_set_attn_data(struct rmi_device *rmi_dev, unsigned long irq_status, + attn_data.data = fifo_data; + + kfifo_put(&drvdata->attn_fifo, attn_data); ++ ++ schedule_work(&drvdata->attn_work); + } + EXPORT_SYMBOL_GPL(rmi_set_attn_data); + +-static irqreturn_t rmi_irq_fn(int irq, void *dev_id) ++static void attn_callback(struct work_struct *work) + { +- struct rmi_device *rmi_dev = dev_id; +- struct rmi_driver_data *drvdata = dev_get_drvdata(&rmi_dev->dev); ++ struct rmi_driver_data *drvdata = container_of(work, ++ struct rmi_driver_data, ++ attn_work); + struct rmi4_attn_data attn_data = {0}; + int ret, count; + + count = kfifo_get(&drvdata->attn_fifo, &attn_data); +- if (count) { +- *(drvdata->irq_status) = attn_data.irq_status; +- drvdata->attn_data = attn_data; +- } ++ if (!count) ++ return; + +- ret = rmi_process_interrupt_requests(rmi_dev); ++ *(drvdata->irq_status) = attn_data.irq_status; ++ drvdata->attn_data = attn_data; ++ ++ ret = rmi_process_interrupt_requests(drvdata->rmi_dev); + if (ret) +- rmi_dbg(RMI_DEBUG_CORE, &rmi_dev->dev, ++ rmi_dbg(RMI_DEBUG_CORE, &drvdata->rmi_dev->dev, + "Failed to process interrupt request: %d\n", ret); + +- if (count) { +- kfree(attn_data.data); +- drvdata->attn_data.data = NULL; +- } ++ kfree(attn_data.data); ++ drvdata->attn_data.data = NULL; + + if (!kfifo_is_empty(&drvdata->attn_fifo)) +- return rmi_irq_fn(irq, dev_id); ++ schedule_work(&drvdata->attn_work); ++} ++ ++static irqreturn_t rmi_irq_fn(int irq, void *dev_id) ++{ ++ struct rmi_device *rmi_dev = dev_id; ++ int ret; ++ ++ ret = rmi_process_interrupt_requests(rmi_dev); ++ if (ret) ++ rmi_dbg(RMI_DEBUG_CORE, &rmi_dev->dev, ++ "Failed to process interrupt request: %d\n", ret); + + return IRQ_HANDLED; + } +@@ -217,7 +230,6 @@ static irqreturn_t rmi_irq_fn(int irq, void *dev_id) + static int rmi_irq_init(struct rmi_device *rmi_dev) + { + struct rmi_device_platform_data *pdata = rmi_get_platform_data(rmi_dev); +- struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev); + int irq_flags = irq_get_trigger_type(pdata->irq); + int ret; + +@@ -235,8 +247,6 @@ static int rmi_irq_init(struct rmi_device *rmi_dev) + return ret; + } + +- data->enabled = true; +- + return 0; + } + +@@ -886,23 +896,27 @@ void rmi_enable_irq(struct rmi_device *rmi_dev, bool clear_wake) + if (data->enabled) + goto out; + +- enable_irq(irq); +- data->enabled = true; +- if (clear_wake && device_may_wakeup(rmi_dev->xport->dev)) { +- retval = disable_irq_wake(irq); +- if (retval) +- dev_warn(&rmi_dev->dev, +- "Failed to disable irq for wake: %d\n", +- retval); +- } ++ if (irq) { ++ enable_irq(irq); ++ data->enabled = true; ++ if (clear_wake && device_may_wakeup(rmi_dev->xport->dev)) { ++ retval = disable_irq_wake(irq); ++ if (retval) ++ dev_warn(&rmi_dev->dev, ++ "Failed to disable irq for wake: %d\n", ++ retval); ++ } + +- /* +- * Call rmi_process_interrupt_requests() after enabling irq, +- * otherwise we may lose interrupt on edge-triggered systems. +- */ +- irq_flags = irq_get_trigger_type(pdata->irq); +- if (irq_flags & IRQ_TYPE_EDGE_BOTH) +- rmi_process_interrupt_requests(rmi_dev); ++ /* ++ * Call rmi_process_interrupt_requests() after enabling irq, ++ * otherwise we may lose interrupt on edge-triggered systems. ++ */ ++ irq_flags = irq_get_trigger_type(pdata->irq); ++ if (irq_flags & IRQ_TYPE_EDGE_BOTH) ++ rmi_process_interrupt_requests(rmi_dev); ++ } else { ++ data->enabled = true; ++ } + + out: + mutex_unlock(&data->enabled_mutex); +@@ -922,20 +936,22 @@ void rmi_disable_irq(struct rmi_device *rmi_dev, bool enable_wake) + goto out; + + data->enabled = false; +- disable_irq(irq); +- if (enable_wake && device_may_wakeup(rmi_dev->xport->dev)) { +- retval = enable_irq_wake(irq); +- if (retval) +- dev_warn(&rmi_dev->dev, +- "Failed to enable irq for wake: %d\n", +- retval); +- } +- +- /* make sure the fifo is clean */ +- while (!kfifo_is_empty(&data->attn_fifo)) { +- count = kfifo_get(&data->attn_fifo, &attn_data); +- if (count) +- kfree(attn_data.data); ++ if (irq) { ++ disable_irq(irq); ++ if (enable_wake && device_may_wakeup(rmi_dev->xport->dev)) { ++ retval = enable_irq_wake(irq); ++ if (retval) ++ dev_warn(&rmi_dev->dev, ++ "Failed to enable irq for wake: %d\n", ++ retval); ++ } ++ } else { ++ /* make sure the fifo is clean */ ++ while (!kfifo_is_empty(&data->attn_fifo)) { ++ count = kfifo_get(&data->attn_fifo, &attn_data); ++ if (count) ++ kfree(attn_data.data); ++ } + } + + out: +@@ -981,6 +997,8 @@ static int rmi_driver_remove(struct device *dev) + irq_domain_remove(data->irqdomain); + data->irqdomain = NULL; + ++ cancel_work_sync(&data->attn_work); ++ + rmi_f34_remove_sysfs(rmi_dev); + rmi_free_function_list(rmi_dev); + +@@ -1219,9 +1237,15 @@ static int rmi_driver_probe(struct device *dev) + } + } + +- retval = rmi_irq_init(rmi_dev); +- if (retval < 0) +- goto err_destroy_functions; ++ if (pdata->irq) { ++ retval = rmi_irq_init(rmi_dev); ++ if (retval < 0) ++ goto err_destroy_functions; ++ } ++ ++ data->enabled = true; ++ ++ INIT_WORK(&data->attn_work, attn_callback); + + if (data->f01_container->dev.driver) { + /* Driver already bound, so enable ATTN now. */ +diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c +index fd5f59373fc6..8a11aa9e0318 100644 +--- a/drivers/iommu/iommu.c ++++ b/drivers/iommu/iommu.c +@@ -7,6 +7,7 @@ + #define pr_fmt(fmt) "iommu: " fmt + + #include ++#include + #include + #include + #include +@@ -3060,6 +3061,27 @@ u32 iommu_sva_get_pasid(struct iommu_sva *handle) + } + EXPORT_SYMBOL_GPL(iommu_sva_get_pasid); + ++#ifdef CONFIG_ARM64 ++static int __init iommu_quirks(void) ++{ ++ const char *vendor, *name; ++ ++ vendor = dmi_get_system_info(DMI_SYS_VENDOR); ++ name = dmi_get_system_info(DMI_PRODUCT_NAME); ++ ++ if (vendor && ++ (strncmp(vendor, "GIGABYTE", 8) == 0 && name && ++ (strncmp(name, "R120", 4) == 0 || ++ strncmp(name, "R270", 4) == 0))) { ++ pr_warn("Gigabyte %s detected, force iommu passthrough mode", name); ++ iommu_def_domain_type = IOMMU_DOMAIN_IDENTITY; ++ } ++ ++ return 0; ++} ++arch_initcall(iommu_quirks); ++#endif ++ + /* + * Changes the default domain of an iommu group that has *only* one device + * +diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig +index 22c5529e9a65..259ff5ff3f24 100644 +--- a/drivers/pci/controller/dwc/Kconfig ++++ b/drivers/pci/controller/dwc/Kconfig +@@ -254,25 +254,27 @@ config PCI_MESON + implement the driver. + + config PCIE_TEGRA194 +- tristate ++ bool + + config PCIE_TEGRA194_HOST +- tristate "NVIDIA Tegra194 (and later) PCIe controller - Host Mode" ++ bool "NVIDIA Tegra194 (and later) PCIe controller - Host Mode" + depends on ARCH_TEGRA_194_SOC || COMPILE_TEST + depends on PCI_MSI_IRQ_DOMAIN + select PCIE_DW_HOST + select PHY_TEGRA194_P2U + select PCIE_TEGRA194 ++ default y if ARCH_TEGRA_194_SOC + help + Enables support for the PCIe controller in the NVIDIA Tegra194 SoC to + work in host mode. There are two instances of PCIe controllers in + Tegra194. This controller can work either as EP or RC. In order to + enable host-specific features PCIE_TEGRA194_HOST must be selected and + in order to enable device-specific features PCIE_TEGRA194_EP must be +- selected. This uses the DesignWare core. ++ selected. This uses the DesignWare core. ACPI platforms with Tegra194 ++ don't need to enable this. + + config PCIE_TEGRA194_EP +- tristate "NVIDIA Tegra194 (and later) PCIe controller - Endpoint Mode" ++ bool "NVIDIA Tegra194 (and later) PCIe controller - Endpoint Mode" + depends on ARCH_TEGRA_194_SOC || COMPILE_TEST + depends on PCI_ENDPOINT + select PCIE_DW_EP +diff --git a/drivers/pci/controller/dwc/Makefile b/drivers/pci/controller/dwc/Makefile +index a751553fa0db..dbb981876556 100644 +--- a/drivers/pci/controller/dwc/Makefile ++++ b/drivers/pci/controller/dwc/Makefile +@@ -17,7 +17,6 @@ obj-$(CONFIG_PCIE_INTEL_GW) += pcie-intel-gw.o + obj-$(CONFIG_PCIE_KIRIN) += pcie-kirin.o + obj-$(CONFIG_PCIE_HISI_STB) += pcie-histb.o + obj-$(CONFIG_PCI_MESON) += pci-meson.o +-obj-$(CONFIG_PCIE_TEGRA194) += pcie-tegra194.o + obj-$(CONFIG_PCIE_UNIPHIER) += pcie-uniphier.o + obj-$(CONFIG_PCIE_UNIPHIER_EP) += pcie-uniphier-ep.o + +@@ -34,4 +33,5 @@ obj-$(CONFIG_PCIE_UNIPHIER_EP) += pcie-uniphier-ep.o + ifdef CONFIG_PCI + obj-$(CONFIG_ARM64) += pcie-al.o + obj-$(CONFIG_ARM64) += pcie-hisi.o ++obj-$(CONFIG_ARM64) += pcie-tegra194.o + endif +diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c +index 6fa216e52d14..1090a9cfe4f0 100644 +--- a/drivers/pci/controller/dwc/pcie-tegra194.c ++++ b/drivers/pci/controller/dwc/pcie-tegra194.c +@@ -22,6 +22,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include +@@ -311,6 +313,103 @@ struct tegra_pcie_dw_of_data { + enum dw_pcie_device_mode mode; + }; + ++#if defined(CONFIG_ACPI) && defined(CONFIG_PCI_QUIRKS) ++struct tegra194_pcie_acpi { ++ void __iomem *config_base; ++ void __iomem *iatu_base; ++ void __iomem *dbi_base; ++}; ++ ++static int tegra194_acpi_init(struct pci_config_window *cfg) ++{ ++ struct device *dev = cfg->parent; ++ struct tegra194_pcie_acpi *pcie; ++ ++ pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL); ++ if (!pcie) ++ return -ENOMEM; ++ ++ pcie->config_base = cfg->win; ++ pcie->iatu_base = cfg->win + SZ_256K; ++ pcie->dbi_base = cfg->win + SZ_512K; ++ cfg->priv = pcie; ++ ++ return 0; ++} ++ ++static inline void atu_reg_write(struct tegra194_pcie_acpi *pcie, int index, ++ u32 val, u32 reg) ++{ ++ u32 offset = PCIE_GET_ATU_OUTB_UNR_REG_OFFSET(index); ++ ++ writel(val, pcie->iatu_base + offset + reg); ++} ++ ++static void program_outbound_atu(struct tegra194_pcie_acpi *pcie, int index, ++ int type, u64 cpu_addr, u64 pci_addr, u64 size) ++{ ++ atu_reg_write(pcie, index, lower_32_bits(cpu_addr), ++ PCIE_ATU_LOWER_BASE); ++ atu_reg_write(pcie, index, upper_32_bits(cpu_addr), ++ PCIE_ATU_UPPER_BASE); ++ atu_reg_write(pcie, index, lower_32_bits(pci_addr), ++ PCIE_ATU_LOWER_TARGET); ++ atu_reg_write(pcie, index, lower_32_bits(cpu_addr + size - 1), ++ PCIE_ATU_LIMIT); ++ atu_reg_write(pcie, index, upper_32_bits(pci_addr), ++ PCIE_ATU_UPPER_TARGET); ++ atu_reg_write(pcie, index, type, PCIE_ATU_CR1); ++ atu_reg_write(pcie, index, PCIE_ATU_ENABLE, PCIE_ATU_CR2); ++} ++ ++static void __iomem *tegra194_map_bus(struct pci_bus *bus, ++ unsigned int devfn, int where) ++{ ++ struct pci_config_window *cfg = bus->sysdata; ++ struct tegra194_pcie_acpi *pcie = cfg->priv; ++ u32 busdev; ++ int type; ++ ++ if (bus->number < cfg->busr.start || bus->number > cfg->busr.end) ++ return NULL; ++ ++ if (bus->number == cfg->busr.start) { ++ if (PCI_SLOT(devfn) == 0) ++ return pcie->dbi_base + where; ++ else ++ return NULL; ++ } ++ ++ busdev = PCIE_ATU_BUS(bus->number) | PCIE_ATU_DEV(PCI_SLOT(devfn)) | ++ PCIE_ATU_FUNC(PCI_FUNC(devfn)); ++ ++ if (bus->parent->number == cfg->busr.start) { ++ if (PCI_SLOT(devfn) == 0) ++ type = PCIE_ATU_TYPE_CFG0; ++ else ++ return NULL; ++ } else { ++ type = PCIE_ATU_TYPE_CFG1; ++ } ++ ++ program_outbound_atu(pcie, 0, type, cfg->res.start, busdev, SZ_256K); ++ ++ return (void __iomem *)(pcie->config_base + where); ++} ++ ++const struct pci_ecam_ops tegra194_pcie_ops = { ++ .bus_shift = 20, ++ .init = tegra194_acpi_init, ++ .pci_ops = { ++ .map_bus = tegra194_map_bus, ++ .read = pci_generic_config_read, ++ .write = pci_generic_config_write, ++ } ++}; ++#endif /* defined(CONFIG_ACPI) && defined(CONFIG_PCI_QUIRKS) */ ++ ++#ifdef CONFIG_PCIE_TEGRA194 ++ + static inline struct tegra_pcie_dw *to_tegra_pcie(struct dw_pcie *pci) + { + return container_of(pci, struct tegra_pcie_dw, pci); +@@ -2311,3 +2410,6 @@ MODULE_DEVICE_TABLE(of, tegra_pcie_dw_of_match); + MODULE_AUTHOR("Vidya Sagar "); + MODULE_DESCRIPTION("NVIDIA PCIe host controller driver"); + MODULE_LICENSE("GPL v2"); ++ ++#endif /* CONFIG_PCIE_TEGRA194 */ ++ +diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c +index d41257f43a8f..e3456b058106 100644 +--- a/drivers/pci/controller/pcie-brcmstb.c ++++ b/drivers/pci/controller/pcie-brcmstb.c +@@ -857,6 +857,7 @@ static int brcm_pcie_setup(struct brcm_pcie *pcie) + + /* Reset the bridge */ + pcie->bridge_sw_init_set(pcie, 1); ++ pcie->perst_set(pcie, 1); + usleep_range(100, 200); + + /* Take the bridge out of reset */ +diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c +index 653660e3ba9e..98851d00dc4d 100644 +--- a/drivers/pci/quirks.c ++++ b/drivers/pci/quirks.c +@@ -4143,6 +4143,30 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9000, + DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9084, + quirk_bridge_cavm_thrx2_pcie_root); + ++/* ++ * PCI BAR 5 is not setup correctly for the on-board AHCI controller ++ * on Broadcom's Vulcan processor. Added a quirk to fix BAR 5 by ++ * using BAR 4's resources which are populated correctly and NOT ++ * actually used by the AHCI controller. ++ */ ++static void quirk_fix_vulcan_ahci_bars(struct pci_dev *dev) ++{ ++ struct resource *r = &dev->resource[4]; ++ ++ if (!(r->flags & IORESOURCE_MEM) || (r->start == 0)) ++ return; ++ ++ /* Set BAR5 resource to BAR4 */ ++ dev->resource[5] = *r; ++ ++ /* Update BAR5 in pci config space */ ++ pci_write_config_dword(dev, PCI_BASE_ADDRESS_5, r->start); ++ ++ /* Clear BAR4's resource */ ++ memset(r, 0, sizeof(*r)); ++} ++DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9027, quirk_fix_vulcan_ahci_bars); ++ + /* + * Intersil/Techwell TW686[4589]-based video capture cards have an empty (zero) + * class code. Fix it. +diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig +index ac4125ec0660..3a8ade8bb073 100644 +--- a/drivers/platform/x86/Kconfig ++++ b/drivers/platform/x86/Kconfig +@@ -624,6 +624,7 @@ config IDEAPAD_LAPTOP + depends on BACKLIGHT_CLASS_DEVICE + depends on ACPI_VIDEO || ACPI_VIDEO = n + depends on ACPI_WMI || ACPI_WMI = n ++ select ACPI_PLATFORM_PROFILE + select INPUT_SPARSEKMAP + help + This is a driver for Lenovo IdeaPad netbooks contains drivers for +@@ -655,6 +656,7 @@ config THINKPAD_ACPI + depends on RFKILL || RFKILL = n + depends on ACPI_VIDEO || ACPI_VIDEO = n + depends on BACKLIGHT_CLASS_DEVICE ++ select ACPI_PLATFORM_PROFILE + select HWMON + select NVRAM + select NEW_LEDS +diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c +index 5b81bafa5c16..cc42af2a0a98 100644 +--- a/drivers/platform/x86/ideapad-laptop.c ++++ b/drivers/platform/x86/ideapad-laptop.c +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -77,6 +78,13 @@ enum { + VPCCMD_W_BL_POWER = 0x33, + }; + ++struct ideapad_dytc_priv { ++ enum platform_profile_option current_profile; ++ struct platform_profile_handler pprof; ++ struct mutex mutex; ++ struct ideapad_private *priv; ++}; ++ + struct ideapad_rfk_priv { + int dev; + struct ideapad_private *priv; +@@ -89,6 +97,7 @@ struct ideapad_private { + struct platform_device *platform_device; + struct input_dev *inputdev; + struct backlight_device *blightdev; ++ struct ideapad_dytc_priv *dytc; + struct dentry *debug; + unsigned long cfg; + bool has_hw_rfkill_switch; +@@ -137,6 +146,28 @@ static int method_int1(acpi_handle handle, char *method, int cmd) + return ACPI_FAILURE(status) ? -1 : 0; + } + ++static int method_dytc(acpi_handle handle, int cmd, int *ret) ++{ ++ acpi_status status; ++ unsigned long long result; ++ struct acpi_object_list params; ++ union acpi_object in_obj; ++ ++ params.count = 1; ++ params.pointer = &in_obj; ++ in_obj.type = ACPI_TYPE_INTEGER; ++ in_obj.integer.value = cmd; ++ ++ status = acpi_evaluate_integer(handle, "DYTC", ¶ms, &result); ++ ++ if (ACPI_FAILURE(status)) { ++ *ret = -1; ++ return -1; ++ } ++ *ret = result; ++ return 0; ++} ++ + static int method_vpcr(acpi_handle handle, int cmd, int *ret) + { + acpi_status status; +@@ -549,6 +580,257 @@ static const struct attribute_group ideapad_attribute_group = { + .attrs = ideapad_attributes + }; + ++/* ++ * DYTC Platform profile ++ */ ++#define DYTC_CMD_QUERY 0 /* To get DYTC status - enable/revision */ ++#define DYTC_CMD_SET 1 /* To enable/disable IC function mode */ ++#define DYTC_CMD_GET 2 /* To get current IC function and mode */ ++#define DYTC_CMD_RESET 0x1ff /* To reset back to default */ ++ ++#define DYTC_QUERY_ENABLE_BIT 8 /* Bit 8 - 0 = disabled, 1 = enabled */ ++#define DYTC_QUERY_SUBREV_BIT 16 /* Bits 16 - 27 - sub revision */ ++#define DYTC_QUERY_REV_BIT 28 /* Bits 28 - 31 - revision */ ++ ++#define DYTC_GET_FUNCTION_BIT 8 /* Bits 8-11 - function setting */ ++#define DYTC_GET_MODE_BIT 12 /* Bits 12-15 - mode setting */ ++ ++#define DYTC_SET_FUNCTION_BIT 12 /* Bits 12-15 - function setting */ ++#define DYTC_SET_MODE_BIT 16 /* Bits 16-19 - mode setting */ ++#define DYTC_SET_VALID_BIT 20 /* Bit 20 - 1 = on, 0 = off */ ++ ++#define DYTC_FUNCTION_STD 0 /* Function = 0, standard mode */ ++#define DYTC_FUNCTION_CQL 1 /* Function = 1, lap mode */ ++#define DYTC_FUNCTION_MMC 11 /* Function = 11, desk mode */ ++ ++#define DYTC_MODE_PERFORM 2 /* High power mode aka performance */ ++#define DYTC_MODE_LOW_POWER 3 /* Low power mode aka quiet */ ++#define DYTC_MODE_BALANCE 0xF /* Default mode aka balanced */ ++ ++#define DYTC_SET_COMMAND(function, mode, on) \ ++ (DYTC_CMD_SET | (function) << DYTC_SET_FUNCTION_BIT | \ ++ (mode) << DYTC_SET_MODE_BIT | \ ++ (on) << DYTC_SET_VALID_BIT) ++ ++#define DYTC_DISABLE_CQL DYTC_SET_COMMAND(DYTC_FUNCTION_CQL, DYTC_MODE_BALANCE, 0) ++ ++#define DYTC_ENABLE_CQL DYTC_SET_COMMAND(DYTC_FUNCTION_CQL, DYTC_MODE_BALANCE, 1) ++ ++static int convert_dytc_to_profile(int dytcmode, enum platform_profile_option *profile) ++{ ++ switch (dytcmode) { ++ case DYTC_MODE_LOW_POWER: ++ *profile = PLATFORM_PROFILE_LOW_POWER; ++ break; ++ case DYTC_MODE_BALANCE: ++ *profile = PLATFORM_PROFILE_BALANCED; ++ break; ++ case DYTC_MODE_PERFORM: ++ *profile = PLATFORM_PROFILE_PERFORMANCE; ++ break; ++ default: /* Unknown mode */ ++ return -EINVAL; ++ } ++ return 0; ++} ++ ++static int convert_profile_to_dytc(enum platform_profile_option profile, int *perfmode) ++{ ++ switch (profile) { ++ case PLATFORM_PROFILE_LOW_POWER: ++ *perfmode = DYTC_MODE_LOW_POWER; ++ break; ++ case PLATFORM_PROFILE_BALANCED: ++ *perfmode = DYTC_MODE_BALANCE; ++ break; ++ case PLATFORM_PROFILE_PERFORMANCE: ++ *perfmode = DYTC_MODE_PERFORM; ++ break; ++ default: /* Unknown profile */ ++ return -EOPNOTSUPP; ++ } ++ return 0; ++} ++ ++/* ++ * dytc_profile_get: Function to register with platform_profile ++ * handler. Returns current platform profile. ++ */ ++int dytc_profile_get(struct platform_profile_handler *pprof, ++ enum platform_profile_option *profile) ++{ ++ struct ideapad_dytc_priv *dytc; ++ ++ dytc = container_of(pprof, struct ideapad_dytc_priv, pprof); ++ *profile = dytc->current_profile; ++ return 0; ++} ++ ++/* ++ * Helper function - check if we are in CQL mode and if we are ++ * - disable CQL, ++ * - run the command ++ * - enable CQL ++ * If not in CQL mode, just run the command ++ */ ++int dytc_cql_command(struct ideapad_private *priv, int command, int *output) ++{ ++ int err, cmd_err, dummy; ++ int cur_funcmode; ++ ++ /* Determine if we are in CQL mode. This alters the commands we do */ ++ err = method_dytc(priv->adev->handle, DYTC_CMD_GET, output); ++ if (err) ++ return err; ++ ++ cur_funcmode = (*output >> DYTC_GET_FUNCTION_BIT) & 0xF; ++ /* Check if we're OK to return immediately */ ++ if ((command == DYTC_CMD_GET) && (cur_funcmode != DYTC_FUNCTION_CQL)) ++ return 0; ++ ++ if (cur_funcmode == DYTC_FUNCTION_CQL) { ++ err = method_dytc(priv->adev->handle, DYTC_DISABLE_CQL, &dummy); ++ if (err) ++ return err; ++ } ++ ++ cmd_err = method_dytc(priv->adev->handle, command, output); ++ /* Check return condition after we've restored CQL state */ ++ ++ if (cur_funcmode == DYTC_FUNCTION_CQL) { ++ err = method_dytc(priv->adev->handle, DYTC_ENABLE_CQL, &dummy); ++ if (err) ++ return err; ++ } ++ ++ return cmd_err; ++} ++ ++/* ++ * dytc_profile_set: Function to register with platform_profile ++ * handler. Sets current platform profile. ++ */ ++int dytc_profile_set(struct platform_profile_handler *pprof, ++ enum platform_profile_option profile) ++{ ++ struct ideapad_dytc_priv *dytc; ++ struct ideapad_private *priv; ++ int output; ++ int err; ++ ++ dytc = container_of(pprof, struct ideapad_dytc_priv, pprof); ++ priv = dytc->priv; ++ ++ err = mutex_lock_interruptible(&dytc->mutex); ++ if (err) ++ return err; ++ ++ if (profile == PLATFORM_PROFILE_BALANCED) { ++ /* To get back to balanced mode we just issue a reset command */ ++ err = method_dytc(priv->adev->handle, DYTC_CMD_RESET, &output); ++ if (err) ++ goto unlock; ++ } else { ++ int perfmode; ++ ++ err = convert_profile_to_dytc(profile, &perfmode); ++ if (err) ++ goto unlock; ++ ++ /* Determine if we are in CQL mode. This alters the commands we do */ ++ err = dytc_cql_command(priv, ++ DYTC_SET_COMMAND(DYTC_FUNCTION_MMC, perfmode, 1), ++ &output); ++ if (err) ++ goto unlock; ++ } ++ /* Success - update current profile */ ++ dytc->current_profile = profile; ++unlock: ++ mutex_unlock(&dytc->mutex); ++ return err; ++} ++ ++static void dytc_profile_refresh(struct ideapad_private *priv) ++{ ++ enum platform_profile_option profile; ++ int output, err; ++ int perfmode; ++ ++ mutex_lock(&priv->dytc->mutex); ++ err = dytc_cql_command(priv, DYTC_CMD_GET, &output); ++ mutex_unlock(&priv->dytc->mutex); ++ if (err) ++ return; ++ ++ perfmode = (output >> DYTC_GET_MODE_BIT) & 0xF; ++ convert_dytc_to_profile(perfmode, &profile); ++ if (profile != priv->dytc->current_profile) { ++ priv->dytc->current_profile = profile; ++ platform_profile_notify(); ++ } ++} ++ ++static int ideapad_dytc_profile_init(struct ideapad_private *priv) ++{ ++ int err, output, dytc_version; ++ ++ err = method_dytc(priv->adev->handle, DYTC_CMD_QUERY, &output); ++ /* For all other errors we can flag the failure */ ++ if (err) ++ return err; ++ ++ /* Check DYTC is enabled and supports mode setting */ ++ if (!(output & BIT(DYTC_QUERY_ENABLE_BIT))) ++ return -ENODEV; ++ ++ dytc_version = (output >> DYTC_QUERY_REV_BIT) & 0xF; ++ if (dytc_version < 5) ++ return -ENODEV; ++ ++ priv->dytc = kzalloc(sizeof(struct ideapad_dytc_priv), GFP_KERNEL); ++ if (!priv->dytc) ++ return -ENOMEM; ++ ++ mutex_init(&priv->dytc->mutex); ++ ++ priv->dytc->priv = priv; ++ priv->dytc->pprof.profile_get = dytc_profile_get; ++ priv->dytc->pprof.profile_set = dytc_profile_set; ++ ++ /* Setup supported modes */ ++ set_bit(PLATFORM_PROFILE_LOW_POWER, priv->dytc->pprof.choices); ++ set_bit(PLATFORM_PROFILE_BALANCED, priv->dytc->pprof.choices); ++ set_bit(PLATFORM_PROFILE_PERFORMANCE, priv->dytc->pprof.choices); ++ ++ /* Create platform_profile structure and register */ ++ err = platform_profile_register(&priv->dytc->pprof); ++ if (err) ++ goto mutex_destroy; ++ ++ /* Ensure initial values are correct */ ++ dytc_profile_refresh(priv); ++ ++ return 0; ++ ++mutex_destroy: ++ mutex_destroy(&priv->dytc->mutex); ++ kfree(priv->dytc); ++ priv->dytc = NULL; ++ return err; ++} ++ ++static void ideapad_dytc_profile_exit(struct ideapad_private *priv) ++{ ++ if (!priv->dytc) ++ return; ++ ++ platform_profile_remove(); ++ mutex_destroy(&priv->dytc->mutex); ++ kfree(priv->dytc); ++ priv->dytc = NULL; ++} ++ + /* + * Rfkill + */ +@@ -1026,6 +1308,8 @@ static int ideapad_acpi_add(struct platform_device *pdev) + ideapad_sync_rfk_state(priv); + ideapad_sync_touchpad_state(priv); + ++ ideapad_dytc_profile_init(priv); ++ + if (acpi_video_get_backlight_type() == acpi_backlight_vendor) { + ret = ideapad_backlight_init(priv); + if (ret && ret != -ENODEV) +@@ -1079,6 +1363,7 @@ static int ideapad_acpi_remove(struct platform_device *pdev) + acpi_remove_notify_handler(priv->adev->handle, + ACPI_DEVICE_NOTIFY, ideapad_acpi_notify); + ideapad_backlight_exit(priv); ++ ideapad_dytc_profile_exit(priv); + for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++) + ideapad_unregister_rfkill(priv, i); + ideapad_input_exit(priv); +@@ -1100,6 +1385,10 @@ static int ideapad_acpi_resume(struct device *device) + + ideapad_sync_rfk_state(priv); + ideapad_sync_touchpad_state(priv); ++ ++ if (priv->dytc) ++ dytc_profile_refresh(priv); ++ + return 0; + } + #endif +diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c +index f3e8eca8d86d..5b596a825b24 100644 +--- a/drivers/platform/x86/thinkpad_acpi.c ++++ b/drivers/platform/x86/thinkpad_acpi.c +@@ -66,6 +66,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -9855,16 +9856,27 @@ static bool has_lapsensor; + static bool palm_state; + static bool lap_state; + +-static int lapsensor_get(bool *present, bool *state) ++static int dytc_command(int command, int *output) + { + acpi_handle dytc_handle; +- int output; + +- *present = false; +- if (ACPI_FAILURE(acpi_get_handle(hkey_handle, "DYTC", &dytc_handle))) ++ if (ACPI_FAILURE(acpi_get_handle(hkey_handle, "DYTC", &dytc_handle))) { ++ /* Platform doesn't support DYTC */ + return -ENODEV; +- if (!acpi_evalf(dytc_handle, &output, NULL, "dd", DYTC_CMD_GET)) ++ } ++ if (!acpi_evalf(dytc_handle, output, NULL, "dd", command)) + return -EIO; ++ return 0; ++} ++ ++static int lapsensor_get(bool *present, bool *state) ++{ ++ int output, err; ++ ++ *present = false; ++ err = dytc_command(DYTC_CMD_GET, &output); ++ if (err) ++ return err; + + *present = true; /*If we get his far, we have lapmode support*/ + *state = output & BIT(DYTC_GET_LAPMODE_BIT) ? true : false; +@@ -9983,6 +9995,434 @@ static struct ibm_struct proxsensor_driver_data = { + .exit = proxsensor_exit, + }; + ++/************************************************************************* ++ * DYTC Platform Profile interface ++ */ ++ ++#define DYTC_CMD_QUERY 0 /* To get DYTC status - enable/revision */ ++#define DYTC_CMD_SET 1 /* To enable/disable IC function mode */ ++#define DYTC_CMD_RESET 0x1ff /* To reset back to default */ ++ ++#define DYTC_QUERY_ENABLE_BIT 8 /* Bit 8 - 0 = disabled, 1 = enabled */ ++#define DYTC_QUERY_SUBREV_BIT 16 /* Bits 16 - 27 - sub revision */ ++#define DYTC_QUERY_REV_BIT 28 /* Bits 28 - 31 - revision */ ++ ++#define DYTC_GET_FUNCTION_BIT 8 /* Bits 8-11 - function setting */ ++#define DYTC_GET_MODE_BIT 12 /* Bits 12-15 - mode setting */ ++ ++#define DYTC_SET_FUNCTION_BIT 12 /* Bits 12-15 - function setting */ ++#define DYTC_SET_MODE_BIT 16 /* Bits 16-19 - mode setting */ ++#define DYTC_SET_VALID_BIT 20 /* Bit 20 - 1 = on, 0 = off */ ++ ++#define DYTC_FUNCTION_STD 0 /* Function = 0, standard mode */ ++#define DYTC_FUNCTION_CQL 1 /* Function = 1, lap mode */ ++#define DYTC_FUNCTION_MMC 11 /* Function = 11, desk mode */ ++ ++#define DYTC_MODE_PERFORM 2 /* High power mode aka performance */ ++#define DYTC_MODE_LOWPOWER 3 /* Low power mode */ ++#define DYTC_MODE_BALANCE 0xF /* Default mode aka balanced */ ++ ++#define DYTC_SET_COMMAND(function, mode, on) \ ++ (DYTC_CMD_SET | (function) << DYTC_SET_FUNCTION_BIT | \ ++ (mode) << DYTC_SET_MODE_BIT | \ ++ (on) << DYTC_SET_VALID_BIT) ++ ++#define DYTC_DISABLE_CQL DYTC_SET_COMMAND(DYTC_FUNCTION_CQL, DYTC_MODE_BALANCE, 0) ++ ++#define DYTC_ENABLE_CQL DYTC_SET_COMMAND(DYTC_FUNCTION_CQL, DYTC_MODE_BALANCE, 1) ++ ++static bool dytc_profile_available; ++static enum platform_profile_option dytc_current_profile; ++static atomic_t dytc_ignore_event = ATOMIC_INIT(0); ++static DEFINE_MUTEX(dytc_mutex); ++ ++static int convert_dytc_to_profile(int dytcmode, enum platform_profile_option *profile) ++{ ++ switch (dytcmode) { ++ case DYTC_MODE_LOWPOWER: ++ *profile = PLATFORM_PROFILE_LOW_POWER; ++ break; ++ case DYTC_MODE_BALANCE: ++ *profile = PLATFORM_PROFILE_BALANCED; ++ break; ++ case DYTC_MODE_PERFORM: ++ *profile = PLATFORM_PROFILE_PERFORMANCE; ++ break; ++ default: /* Unknown mode */ ++ return -EINVAL; ++ } ++ return 0; ++} ++ ++static int convert_profile_to_dytc(enum platform_profile_option profile, int *perfmode) ++{ ++ switch (profile) { ++ case PLATFORM_PROFILE_LOW_POWER: ++ *perfmode = DYTC_MODE_LOWPOWER; ++ break; ++ case PLATFORM_PROFILE_BALANCED: ++ *perfmode = DYTC_MODE_BALANCE; ++ break; ++ case PLATFORM_PROFILE_PERFORMANCE: ++ *perfmode = DYTC_MODE_PERFORM; ++ break; ++ default: /* Unknown profile */ ++ return -EOPNOTSUPP; ++ } ++ return 0; ++} ++ ++/* ++ * dytc_profile_get: Function to register with platform_profile ++ * handler. Returns current platform profile. ++ */ ++int dytc_profile_get(struct platform_profile_handler *pprof, ++ enum platform_profile_option *profile) ++{ ++ *profile = dytc_current_profile; ++ return 0; ++} ++ ++/* ++ * Helper function - check if we are in CQL mode and if we are ++ * - disable CQL, ++ * - run the command ++ * - enable CQL ++ * If not in CQL mode, just run the command ++ */ ++int dytc_cql_command(int command, int *output) ++{ ++ int err, cmd_err, dummy; ++ int cur_funcmode; ++ ++ /* Determine if we are in CQL mode. This alters the commands we do */ ++ err = dytc_command(DYTC_CMD_GET, output); ++ if (err) ++ return err; ++ ++ cur_funcmode = (*output >> DYTC_GET_FUNCTION_BIT) & 0xF; ++ /* Check if we're OK to return immediately */ ++ if ((command == DYTC_CMD_GET) && (cur_funcmode != DYTC_FUNCTION_CQL)) ++ return 0; ++ ++ if (cur_funcmode == DYTC_FUNCTION_CQL) { ++ atomic_inc(&dytc_ignore_event); ++ err = dytc_command(DYTC_DISABLE_CQL, &dummy); ++ if (err) ++ return err; ++ } ++ ++ cmd_err = dytc_command(command, output); ++ /* Check return condition after we've restored CQL state */ ++ ++ if (cur_funcmode == DYTC_FUNCTION_CQL) { ++ err = dytc_command(DYTC_ENABLE_CQL, &dummy); ++ if (err) ++ return err; ++ } ++ ++ return cmd_err; ++} ++ ++/* ++ * dytc_profile_set: Function to register with platform_profile ++ * handler. Sets current platform profile. ++ */ ++int dytc_profile_set(struct platform_profile_handler *pprof, ++ enum platform_profile_option profile) ++{ ++ int output; ++ int err; ++ ++ if (!dytc_profile_available) ++ return -ENODEV; ++ ++ err = mutex_lock_interruptible(&dytc_mutex); ++ if (err) ++ return err; ++ ++ if (profile == PLATFORM_PROFILE_BALANCED) { ++ /* To get back to balanced mode we just issue a reset command */ ++ err = dytc_command(DYTC_CMD_RESET, &output); ++ if (err) ++ goto unlock; ++ } else { ++ int perfmode; ++ ++ err = convert_profile_to_dytc(profile, &perfmode); ++ if (err) ++ goto unlock; ++ ++ /* Determine if we are in CQL mode. This alters the commands we do */ ++ err = dytc_cql_command(DYTC_SET_COMMAND(DYTC_FUNCTION_MMC, perfmode, 1), &output); ++ if (err) ++ goto unlock; ++ } ++ /* Success - update current profile */ ++ dytc_current_profile = profile; ++unlock: ++ mutex_unlock(&dytc_mutex); ++ return err; ++} ++ ++static void dytc_profile_refresh(void) ++{ ++ enum platform_profile_option profile; ++ int output, err; ++ int perfmode; ++ ++ mutex_lock(&dytc_mutex); ++ err = dytc_cql_command(DYTC_CMD_GET, &output); ++ mutex_unlock(&dytc_mutex); ++ if (err) ++ return; ++ ++ perfmode = (output >> DYTC_GET_MODE_BIT) & 0xF; ++ convert_dytc_to_profile(perfmode, &profile); ++ if (profile != dytc_current_profile) { ++ dytc_current_profile = profile; ++ platform_profile_notify(); ++ } ++} ++ ++static struct platform_profile_handler dytc_profile = { ++ .profile_get = dytc_profile_get, ++ .profile_set = dytc_profile_set, ++}; ++ ++static int tpacpi_dytc_profile_init(struct ibm_init_struct *iibm) ++{ ++ int err, output; ++ ++ /* Setup supported modes */ ++ set_bit(PLATFORM_PROFILE_LOW_POWER, dytc_profile.choices); ++ set_bit(PLATFORM_PROFILE_BALANCED, dytc_profile.choices); ++ set_bit(PLATFORM_PROFILE_PERFORMANCE, dytc_profile.choices); ++ ++ dytc_profile_available = false; ++ err = dytc_command(DYTC_CMD_QUERY, &output); ++ /* ++ * If support isn't available (ENODEV) then don't return an error ++ * and don't create the sysfs group ++ */ ++ if (err == -ENODEV) ++ return 0; ++ /* For all other errors we can flag the failure */ ++ if (err) ++ return err; ++ ++ /* Check DYTC is enabled and supports mode setting */ ++ if (output & BIT(DYTC_QUERY_ENABLE_BIT)) { ++ /* Only DYTC v5.0 and later has this feature. */ ++ int dytc_version; ++ ++ dytc_version = (output >> DYTC_QUERY_REV_BIT) & 0xF; ++ if (dytc_version >= 5) { ++ dbg_printk(TPACPI_DBG_INIT, ++ "DYTC version %d: thermal mode available\n", dytc_version); ++ /* Create platform_profile structure and register */ ++ err = platform_profile_register(&dytc_profile); ++ /* ++ * If for some reason platform_profiles aren't enabled ++ * don't quit terminally. ++ */ ++ if (err) ++ return 0; ++ ++ dytc_profile_available = true; ++ /* Ensure initial values are correct */ ++ dytc_profile_refresh(); ++ } ++ } ++ return 0; ++} ++ ++static void dytc_profile_exit(void) ++{ ++ if (dytc_profile_available) { ++ dytc_profile_available = false; ++ platform_profile_remove(); ++ } ++} ++ ++static struct ibm_struct dytc_profile_driver_data = { ++ .name = "dytc-profile", ++ .exit = dytc_profile_exit, ++}; ++ ++/************************************************************************* ++ * Keyboard language interface ++ */ ++ ++struct keyboard_lang_data { ++ const char *lang_str; ++ int lang_code; ++}; ++ ++static const struct keyboard_lang_data keyboard_lang_data[] = { ++ {"be", 0x080c}, ++ {"cz", 0x0405}, ++ {"da", 0x0406}, ++ {"de", 0x0c07}, ++ {"en", 0x0000}, ++ {"es", 0x2c0a}, ++ {"et", 0x0425}, ++ {"fr", 0x040c}, ++ {"fr-ch", 0x100c}, ++ {"hu", 0x040e}, ++ {"it", 0x0410}, ++ {"jp", 0x0411}, ++ {"nl", 0x0413}, ++ {"nn", 0x0414}, ++ {"pl", 0x0415}, ++ {"pt", 0x0816}, ++ {"sl", 0x041b}, ++ {"sv", 0x081d}, ++ {"tr", 0x041f}, ++}; ++ ++static int set_keyboard_lang_command(int command) ++{ ++ acpi_handle sskl_handle; ++ int output; ++ ++ if (ACPI_FAILURE(acpi_get_handle(hkey_handle, "SSKL", &sskl_handle))) { ++ /* Platform doesn't support SSKL */ ++ return -ENODEV; ++ } ++ ++ if (!acpi_evalf(sskl_handle, &output, NULL, "dd", command)) ++ return -EIO; ++ ++ return 0; ++} ++ ++static int get_keyboard_lang(int *output) ++{ ++ acpi_handle gskl_handle; ++ int kbd_lang; ++ ++ if (ACPI_FAILURE(acpi_get_handle(hkey_handle, "GSKL", &gskl_handle))) { ++ /* Platform doesn't support GSKL */ ++ return -ENODEV; ++ } ++ ++ if (!acpi_evalf(gskl_handle, &kbd_lang, NULL, "dd", 0x02000000)) ++ return -EIO; ++ ++ /* ++ * METHOD_ERR gets returned on devices where there are no special (e.g. '=', ++ * '(' and ')') keys which use layout dependent key-press emulation. ++ */ ++ if (kbd_lang & METHOD_ERR) ++ return -ENODEV; ++ ++ *output = kbd_lang; ++ ++ return 0; ++} ++ ++/* sysfs keyboard language entry */ ++static ssize_t keyboard_lang_show(struct device *dev, ++ struct device_attribute *attr, ++ char *buf) ++{ ++ int output, err, i, len = 0; ++ ++ err = get_keyboard_lang(&output); ++ if (err) ++ return err; ++ ++ for (i = 0; i < ARRAY_SIZE(keyboard_lang_data); i++) { ++ if (i) ++ len += sysfs_emit_at(buf, len, "%s", " "); ++ ++ if (output == keyboard_lang_data[i].lang_code) { ++ len += sysfs_emit_at(buf, len, "[%s]", keyboard_lang_data[i].lang_str); ++ } else { ++ len += sysfs_emit_at(buf, len, "%s", keyboard_lang_data[i].lang_str); ++ } ++ } ++ len += sysfs_emit_at(buf, len, "\n"); ++ ++ return len; ++} ++ ++static ssize_t keyboard_lang_store(struct device *dev, ++ struct device_attribute *attr, ++ const char *buf, size_t count) ++{ ++ int err, i; ++ bool lang_found = false; ++ int lang_code = 0; ++ ++ for (i = 0; i < ARRAY_SIZE(keyboard_lang_data); i++) { ++ if (sysfs_streq(buf, keyboard_lang_data[i].lang_str)) { ++ lang_code = keyboard_lang_data[i].lang_code; ++ lang_found = true; ++ break; ++ } ++ } ++ ++ if (lang_found) { ++ lang_code = lang_code | 1 << 24; ++ ++ /* Set language code */ ++ err = set_keyboard_lang_command(lang_code); ++ if (err) ++ return err; ++ } else { ++ dev_err(&tpacpi_pdev->dev, "Unknown Keyboard language. Ignoring\n"); ++ return -EINVAL; ++ } ++ ++ tpacpi_disclose_usertask(attr->attr.name, ++ "keyboard language is set to %s\n", buf); ++ ++ sysfs_notify(&tpacpi_pdev->dev.kobj, NULL, "keyboard_lang"); ++ ++ return count; ++} ++static DEVICE_ATTR_RW(keyboard_lang); ++ ++static struct attribute *kbdlang_attributes[] = { ++ &dev_attr_keyboard_lang.attr, ++ NULL ++}; ++ ++static const struct attribute_group kbdlang_attr_group = { ++ .attrs = kbdlang_attributes, ++}; ++ ++static int tpacpi_kbdlang_init(struct ibm_init_struct *iibm) ++{ ++ int err, output; ++ ++ err = get_keyboard_lang(&output); ++ /* ++ * If support isn't available (ENODEV) then don't return an error ++ * just don't create the sysfs group. ++ */ ++ if (err == -ENODEV) ++ return 0; ++ ++ if (err) ++ return err; ++ ++ /* Platform supports this feature - create the sysfs file */ ++ return sysfs_create_group(&tpacpi_pdev->dev.kobj, &kbdlang_attr_group); ++} ++ ++static void kbdlang_exit(void) ++{ ++ sysfs_remove_group(&tpacpi_pdev->dev.kobj, &kbdlang_attr_group); ++} ++ ++static struct ibm_struct kbdlang_driver_data = { ++ .name = "kbdlang", ++ .exit = kbdlang_exit, ++}; ++ + /**************************************************************************** + **************************************************************************** + * +@@ -10031,8 +10471,12 @@ static void tpacpi_driver_event(const unsigned int hkey_event) + mutex_unlock(&kbdlight_mutex); + } + +- if (hkey_event == TP_HKEY_EV_THM_CSM_COMPLETED) ++ if (hkey_event == TP_HKEY_EV_THM_CSM_COMPLETED) { + lapsensor_refresh(); ++ /* If we are already accessing DYTC then skip dytc update */ ++ if (!atomic_add_unless(&dytc_ignore_event, -1, 0)) ++ dytc_profile_refresh(); ++ } + } + + static void hotkey_driver_event(const unsigned int scancode) +@@ -10475,6 +10919,14 @@ static struct ibm_init_struct ibms_init[] __initdata = { + .init = tpacpi_proxsensor_init, + .data = &proxsensor_driver_data, + }, ++ { ++ .init = tpacpi_dytc_profile_init, ++ .data = &dytc_profile_driver_data, ++ }, ++ { ++ .init = tpacpi_kbdlang_init, ++ .data = &kbdlang_driver_data, ++ }, + }; + + static int __init set_ibm_param(const char *val, const struct kernel_param *kp) +diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c +index c53f456fbd09..ea190660c86e 100644 +--- a/drivers/scsi/smartpqi/smartpqi_init.c ++++ b/drivers/scsi/smartpqi/smartpqi_init.c +@@ -8313,6 +8313,18 @@ static const struct pci_device_id pqi_pci_id_table[] = { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + 0x19e5, 0xd22c) + }, ++ { ++ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, ++ 0x1bd4, 0x004a) ++ }, ++ { ++ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, ++ 0x1bd4, 0x004b) ++ }, ++ { ++ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, ++ 0x1bd4, 0x004c) ++ }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + PCI_VENDOR_ID_ADAPTEC2, 0x0110) +@@ -8453,6 +8465,10 @@ static const struct pci_device_id pqi_pci_id_table[] = { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + PCI_VENDOR_ID_ADVANTECH, 0x8312) + }, ++ { ++ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, ++ PCI_VENDOR_ID_ADVANTECH, 0x8312) ++ }, + { + PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f, + PCI_VENDOR_ID_DELL, 0x1fe0) +diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c +index 7f71218cc1e5..283fc0f41cd2 100644 +--- a/drivers/usb/core/hub.c ++++ b/drivers/usb/core/hub.c +@@ -5532,6 +5532,13 @@ static void hub_event(struct work_struct *work) + (u16) hub->change_bits[0], + (u16) hub->event_bits[0]); + ++ /* Don't disconnect USB-SATA on TrimSlice */ ++ if (strcmp(dev_name(hdev->bus->controller), "tegra-ehci.0") == 0) { ++ if ((hdev->state == 7) && (hub->change_bits[0] == 0) && ++ (hub->event_bits[0] == 0x2)) ++ hub->event_bits[0] = 0; ++ } ++ + /* Lock the device, then check to see if we were + * disconnected while waiting for the lock to succeed. */ + usb_lock_device(hdev); +diff --git a/include/linux/efi.h b/include/linux/efi.h +index 763b816ba19c..4c55e3aa7e95 100644 +--- a/include/linux/efi.h ++++ b/include/linux/efi.h +@@ -43,6 +43,8 @@ + #define EFI_ABORTED (21 | (1UL << (BITS_PER_LONG-1))) + #define EFI_SECURITY_VIOLATION (26 | (1UL << (BITS_PER_LONG-1))) + ++#define EFI_IS_ERROR(x) ((x) & (1UL << (BITS_PER_LONG-1))) ++ + typedef unsigned long efi_status_t; + typedef u8 efi_bool_t; + typedef u16 efi_char16_t; /* UNICODE character */ +@@ -786,6 +788,14 @@ extern int __init efi_setup_pcdp_console(char *); + #define EFI_MEM_ATTR 10 /* Did firmware publish an EFI_MEMORY_ATTRIBUTES table? */ + #define EFI_MEM_NO_SOFT_RESERVE 11 /* Is the kernel configured to ignore soft reservations? */ + #define EFI_PRESERVE_BS_REGIONS 12 /* Are EFI boot-services memory segments available? */ ++#define EFI_SECURE_BOOT 13 /* Are we in Secure Boot mode? */ ++ ++enum efi_secureboot_mode { ++ efi_secureboot_mode_unset, ++ efi_secureboot_mode_unknown, ++ efi_secureboot_mode_disabled, ++ efi_secureboot_mode_enabled, ++}; + + #ifdef CONFIG_EFI + /* +@@ -797,6 +807,8 @@ static inline bool efi_enabled(int feature) + } + extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused); + ++extern void __init efi_set_secure_boot(enum efi_secureboot_mode mode); ++ + bool __pure __efi_soft_reserve_enabled(void); + + static inline bool __pure efi_soft_reserve_enabled(void) +@@ -817,6 +829,8 @@ static inline bool efi_enabled(int feature) + static inline void + efi_reboot(enum reboot_mode reboot_mode, const char *__unused) {} + ++static inline void efi_set_secure_boot(enum efi_secureboot_mode mode) {} ++ + static inline bool efi_soft_reserve_enabled(void) + { + return false; +@@ -829,6 +843,7 @@ static inline bool efi_rt_services_supported(unsigned int mask) + #endif + + extern int efi_status_to_err(efi_status_t status); ++extern const char *efi_status_to_str(efi_status_t status); + + /* + * Variable Attributes +@@ -1081,13 +1096,6 @@ static inline bool efi_runtime_disabled(void) { return true; } + extern void efi_call_virt_check_flags(unsigned long flags, const char *call); + extern unsigned long efi_call_virt_save_flags(void); + +-enum efi_secureboot_mode { +- efi_secureboot_mode_unset, +- efi_secureboot_mode_unknown, +- efi_secureboot_mode_disabled, +- efi_secureboot_mode_enabled, +-}; +- + static inline + enum efi_secureboot_mode efi_get_secureboot_mode(efi_get_variable_t *get_var) + { +diff --git a/include/linux/lsm_hook_defs.h b/include/linux/lsm_hook_defs.h +index 7aaa753b8608..8e164db118c3 100644 +--- a/include/linux/lsm_hook_defs.h ++++ b/include/linux/lsm_hook_defs.h +@@ -385,6 +385,8 @@ LSM_HOOK(void, LSM_RET_VOID, bpf_prog_free_security, struct bpf_prog_aux *aux) + #endif /* CONFIG_BPF_SYSCALL */ + + LSM_HOOK(int, 0, locked_down, enum lockdown_reason what) ++LSM_HOOK(int, 0, lock_kernel_down, const char *where, enum lockdown_reason level) ++ + + #ifdef CONFIG_PERF_EVENTS + LSM_HOOK(int, 0, perf_event_open, struct perf_event_attr *attr, int type) +diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h +index a19adef1f088..57cce0d5c347 100644 +--- a/include/linux/lsm_hooks.h ++++ b/include/linux/lsm_hooks.h +@@ -1520,6 +1520,12 @@ + * + * @what: kernel feature being accessed + * ++ * @lock_kernel_down ++ * Put the kernel into lock-down mode. ++ * ++ * @where: Where the lock-down is originating from (e.g. command line option) ++ * @level: The lock-down level (can only increase) ++ * + * Security hooks for perf events + * + * @perf_event_open: +diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h +index 65d3d83015c3..fbdadd4d8377 100644 +--- a/include/linux/pci-ecam.h ++++ b/include/linux/pci-ecam.h +@@ -85,6 +85,7 @@ extern const struct pci_ecam_ops pci_thunder_ecam_ops; /* Cavium ThunderX 1.x */ + extern const struct pci_ecam_ops xgene_v1_pcie_ecam_ops; /* APM X-Gene PCIe v1 */ + extern const struct pci_ecam_ops xgene_v2_pcie_ecam_ops; /* APM X-Gene PCIe v2.x */ + extern const struct pci_ecam_ops al_pcie_ops; /* Amazon Annapurna Labs PCIe */ ++extern const struct pci_ecam_ops tegra194_pcie_ops; /* Tegra194 PCIe */ + #endif + + #if IS_ENABLED(CONFIG_PCI_HOST_COMMON) +diff --git a/include/linux/platform_profile.h b/include/linux/platform_profile.h +new file mode 100644 +index 000000000000..a26542d53058 +--- /dev/null ++++ b/include/linux/platform_profile.h +@@ -0,0 +1,41 @@ ++/* SPDX-License-Identifier: GPL-2.0-or-later */ ++/* ++ * Platform profile sysfs interface ++ * ++ * See Documentation/ABI/testing/sysfs-platform_profile.rst for more ++ * information. ++ */ ++ ++#ifndef _PLATFORM_PROFILE_H_ ++#define _PLATFORM_PROFILE_H_ ++ ++#include ++ ++/* ++ * If more options are added please update profile_names ++ * array in platform-profile.c and sysfs-platform-profile.rst ++ * documentation. ++ */ ++ ++enum platform_profile_option { ++ PLATFORM_PROFILE_LOW_POWER, ++ PLATFORM_PROFILE_COOL, ++ PLATFORM_PROFILE_QUIET, ++ PLATFORM_PROFILE_BALANCED, ++ PLATFORM_PROFILE_PERFORMANCE, ++ PLATFORM_PROFILE_LAST, /*must always be last */ ++}; ++ ++struct platform_profile_handler { ++ unsigned long choices[BITS_TO_LONGS(PLATFORM_PROFILE_LAST)]; ++ int (*profile_get)(struct platform_profile_handler *pprof, ++ enum platform_profile_option *profile); ++ int (*profile_set)(struct platform_profile_handler *pprof, ++ enum platform_profile_option profile); ++}; ++ ++int platform_profile_register(struct platform_profile_handler *pprof); ++int platform_profile_remove(void); ++void platform_profile_notify(void); ++ ++#endif /*_PLATFORM_PROFILE_H_*/ +diff --git a/include/linux/rmi.h b/include/linux/rmi.h +index ab7eea01ab42..fff7c5f737fc 100644 +--- a/include/linux/rmi.h ++++ b/include/linux/rmi.h +@@ -364,6 +364,7 @@ struct rmi_driver_data { + + struct rmi4_attn_data attn_data; + DECLARE_KFIFO(attn_fifo, struct rmi4_attn_data, 16); ++ struct work_struct attn_work; + }; + + int rmi_register_transport_device(struct rmi_transport_dev *xport); +diff --git a/include/linux/security.h b/include/linux/security.h +index c35ea0ffccd9..342d4579bf5c 100644 +--- a/include/linux/security.h ++++ b/include/linux/security.h +@@ -457,6 +457,7 @@ int security_inode_notifysecctx(struct inode *inode, void *ctx, u32 ctxlen); + int security_inode_setsecctx(struct dentry *dentry, void *ctx, u32 ctxlen); + int security_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen); + int security_locked_down(enum lockdown_reason what); ++int security_lock_kernel_down(const char *where, enum lockdown_reason level); + #else /* CONFIG_SECURITY */ + + static inline int call_blocking_lsm_notifier(enum lsm_event event, void *data) +@@ -1305,6 +1306,10 @@ static inline int security_locked_down(enum lockdown_reason what) + { + return 0; + } ++static inline int security_lock_kernel_down(const char *where, enum lockdown_reason level) ++{ ++ return 0; ++} + #endif /* CONFIG_SECURITY */ + + #if defined(CONFIG_SECURITY) && defined(CONFIG_WATCH_QUEUE) +diff --git a/kernel/crash_core.c b/kernel/crash_core.c +index 825284baaf46..0b2b3f510b16 100644 +--- a/kernel/crash_core.c ++++ b/kernel/crash_core.c +@@ -7,6 +7,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -41,6 +42,15 @@ static int __init parse_crashkernel_mem(char *cmdline, + unsigned long long *crash_base) + { + char *cur = cmdline, *tmp; ++ unsigned long long total_mem = system_ram; ++ ++ /* ++ * Firmware sometimes reserves some memory regions for it's own use. ++ * so we get less than actual system memory size. ++ * Workaround this by round up the total size to 128M which is ++ * enough for most test cases. ++ */ ++ total_mem = roundup(total_mem, SZ_128M); + + /* for each entry of the comma-separated list */ + do { +@@ -85,13 +95,13 @@ static int __init parse_crashkernel_mem(char *cmdline, + return -EINVAL; + } + cur = tmp; +- if (size >= system_ram) { ++ if (size >= total_mem) { + pr_warn("crashkernel: invalid size\n"); + return -EINVAL; + } + + /* match ? */ +- if (system_ram >= start && system_ram < end) { ++ if (total_mem >= start && total_mem < end) { + *crash_size = size; + break; + } +@@ -250,6 +260,20 @@ static int __init __parse_crashkernel(char *cmdline, + if (suffix) + return parse_crashkernel_suffix(ck_cmdline, crash_size, + suffix); ++ ++ if (strncmp(ck_cmdline, "auto", 4) == 0) { ++#ifdef CONFIG_X86_64 ++ ck_cmdline = "1G-64G:160M,64G-1T:256M,1T-:512M"; ++#elif defined(CONFIG_S390) ++ ck_cmdline = "4G-64G:160M,64G-1T:256M,1T-:512M"; ++#elif defined(CONFIG_ARM64) ++ ck_cmdline = "2G-:512M"; ++#elif defined(CONFIG_PPC64) ++ ck_cmdline = "2G-4G:384M,4G-16G:512M,16G-64G:1G,64G-128G:2G,128G-:4G"; ++#endif ++ pr_info("Using crashkernel=auto, the size chosen is a best effort estimation.\n"); ++ } ++ + /* + * if the commandline contains a ':', then that's the extended + * syntax -- if not, it must be the classic syntax +diff --git a/kernel/module_signing.c b/kernel/module_signing.c +index 8723ae70ea1f..fb2d773498c2 100644 +--- a/kernel/module_signing.c ++++ b/kernel/module_signing.c +@@ -38,8 +38,15 @@ int mod_verify_sig(const void *mod, struct load_info *info) + modlen -= sig_len + sizeof(ms); + info->len = modlen; + +- return verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len, ++ ret = verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len, + VERIFY_USE_SECONDARY_KEYRING, + VERIFYING_MODULE_SIGNATURE, + NULL, NULL); ++ if (ret == -ENOKEY && IS_ENABLED(CONFIG_INTEGRITY_PLATFORM_KEYRING)) { ++ ret = verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len, ++ VERIFY_USE_PLATFORM_KEYRING, ++ VERIFYING_MODULE_SIGNATURE, ++ NULL, NULL); ++ } ++ return ret; + } +diff --git a/mm/kmemleak.c b/mm/kmemleak.c +index c0014d3b91c1..c00e9820412a 100644 +--- a/mm/kmemleak.c ++++ b/mm/kmemleak.c +@@ -1960,6 +1960,11 @@ void __init kmemleak_init(void) + */ + static int __init kmemleak_late_init(void) + { ++ if (!kmemleak_skip_disable) { ++ kmemleak_disable(); ++ return 0; ++ } ++ + kmemleak_initialized = 1; + + debugfs_create_file("kmemleak", 0644, NULL, NULL, &kmemleak_fops); +diff --git a/security/integrity/platform_certs/load_uefi.c b/security/integrity/platform_certs/load_uefi.c +index ee4b4c666854..eff9ff593405 100644 +--- a/security/integrity/platform_certs/load_uefi.c ++++ b/security/integrity/platform_certs/load_uefi.c +@@ -46,7 +46,8 @@ static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid, + return NULL; + + if (*status != EFI_BUFFER_TOO_SMALL) { +- pr_err("Couldn't get size: 0x%lx\n", *status); ++ pr_err("Couldn't get size: %s (0x%lx)\n", ++ efi_status_to_str(*status), *status); + return NULL; + } + +@@ -57,7 +58,8 @@ static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid, + *status = efi.get_variable(name, guid, NULL, &lsize, db); + if (*status != EFI_SUCCESS) { + kfree(db); +- pr_err("Error reading db var: 0x%lx\n", *status); ++ pr_err("Error reading db var: %s (0x%lx)\n", ++ efi_status_to_str(*status), *status); + return NULL; + } + +diff --git a/security/lockdown/Kconfig b/security/lockdown/Kconfig +index e84ddf484010..d0501353a4b9 100644 +--- a/security/lockdown/Kconfig ++++ b/security/lockdown/Kconfig +@@ -16,6 +16,19 @@ config SECURITY_LOCKDOWN_LSM_EARLY + subsystem is fully initialised. If enabled, lockdown will + unconditionally be called before any other LSMs. + ++config LOCK_DOWN_IN_EFI_SECURE_BOOT ++ bool "Lock down the kernel in EFI Secure Boot mode" ++ default n ++ depends on EFI && SECURITY_LOCKDOWN_LSM_EARLY ++ help ++ UEFI Secure Boot provides a mechanism for ensuring that the firmware ++ will only load signed bootloaders and kernels. Secure boot mode may ++ be determined from EFI variables provided by the system firmware if ++ not indicated by the boot parameters. ++ ++ Enabling this option results in kernel lockdown being triggered if ++ EFI Secure Boot is set. ++ + choice + prompt "Kernel default lockdown mode" + default LOCK_DOWN_KERNEL_FORCE_NONE +diff --git a/security/lockdown/lockdown.c b/security/lockdown/lockdown.c +index 87cbdc64d272..18555cf18da7 100644 +--- a/security/lockdown/lockdown.c ++++ b/security/lockdown/lockdown.c +@@ -73,6 +73,7 @@ static int lockdown_is_locked_down(enum lockdown_reason what) + + static struct security_hook_list lockdown_hooks[] __lsm_ro_after_init = { + LSM_HOOK_INIT(locked_down, lockdown_is_locked_down), ++ LSM_HOOK_INIT(lock_kernel_down, lock_kernel_down), + }; + + static int __init lockdown_lsm_init(void) +diff --git a/security/security.c b/security/security.c +index 7b09cfbae94f..e1c7bda4de13 100644 +--- a/security/security.c ++++ b/security/security.c +@@ -2534,6 +2534,12 @@ int security_locked_down(enum lockdown_reason what) + } + EXPORT_SYMBOL(security_locked_down); + ++int security_lock_kernel_down(const char *where, enum lockdown_reason level) ++{ ++ return call_int_hook(lock_kernel_down, 0, where, level); ++} ++EXPORT_SYMBOL(security_lock_kernel_down); ++ + #ifdef CONFIG_PERF_EVENTS + int security_perf_event_open(struct perf_event_attr *attr, int type) + { +diff --git a/sound/hda/Kconfig b/sound/hda/Kconfig +index 3bc9224d5e4f..9ed5cfa3c18c 100644 +--- a/sound/hda/Kconfig ++++ b/sound/hda/Kconfig +@@ -46,3 +46,17 @@ config SND_INTEL_DSP_CONFIG + select SND_INTEL_NHLT if ACPI + # this config should be selected only for Intel DSP platforms. + # A fallback is provided so that the code compiles in all cases. ++ ++config SND_INTEL_BYT_PREFER_SOF ++ bool "Prefer SOF driver over SST on BY/CHT platforms" ++ depends on SND_SST_ATOM_HIFI2_PLATFORM_ACPI && SND_SOC_SOF_BAYTRAIL ++ default n ++ help ++ The kernel has 2 drivers for the Low Power Engine audio-block on ++ Bay- and Cherry-Trail SoCs. The old SST driver and the new SOF ++ driver. If both drivers are enabled then the kernel will default ++ to using the old SST driver, unless told otherwise through the ++ snd_intel_dspcfg.dsp_driver module-parameter. ++ ++ Set this option to Y to make the kernel default to the new SOF ++ driver instead. +diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c +index c45686172517..68bb977c6a37 100644 +--- a/sound/hda/intel-dsp-config.c ++++ b/sound/hda/intel-dsp-config.c +@@ -452,35 +452,30 @@ int snd_intel_dsp_driver_probe(struct pci_dev *pci) + } + EXPORT_SYMBOL_GPL(snd_intel_dsp_driver_probe); + ++/* Should we default to SOF or SST for BYT/CHT ? */ ++#if IS_ENABLED(CONFIG_SND_INTEL_BYT_PREFER_SOF) || \ ++ !IS_ENABLED(CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_ACPI) ++#define FLAG_SST_OR_SOF_BYT FLAG_SOF ++#else ++#define FLAG_SST_OR_SOF_BYT FLAG_SST ++#endif ++ + /* + * configuration table + * - the order of similar ACPI ID entries is important! + * - the first successful match will win + */ + static const struct config_entry acpi_config_table[] = { ++#if IS_ENABLED(CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_ACPI) || \ ++ IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL) + /* BayTrail */ +-#if IS_ENABLED(CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_ACPI) +- { +- .flags = FLAG_SST, +- .acpi_hid = "80860F28", +- }, +-#endif +-#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL) + { +- .flags = FLAG_SOF, ++ .flags = FLAG_SST_OR_SOF_BYT, + .acpi_hid = "80860F28", + }, +-#endif + /* CherryTrail */ +-#if IS_ENABLED(CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_ACPI) +- { +- .flags = FLAG_SST, +- .acpi_hid = "808622A8", +- }, +-#endif +-#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL) + { +- .flags = FLAG_SOF, ++ .flags = FLAG_SST_OR_SOF_BYT, + .acpi_hid = "808622A8", + }, + #endif diff --git a/SOURCES/process_configs.sh b/SOURCES/process_configs.sh index 14773fe..166d476 100755 --- a/SOURCES/process_configs.sh +++ b/SOURCES/process_configs.sh @@ -3,6 +3,8 @@ # This script takes the merged config files and processes them through oldconfig # and listnewconfig # +# Globally disable suggestion of appending '|| exit' or '|| return' to cd/pushd/popd commands +# shellcheck disable=SC2164 usage() { @@ -15,6 +17,11 @@ usage() echo " -t: test run, do not overwrite original config" echo " -w: error on misconfigured config options" echo " -z: commit new configs to pending directory" + echo "" + echo " A special CONFIG file tag, process_configs_known_broken can be added as a" + echo " comment to any CONFIG file. This tag indicates that there is no way to " + echo " fix a CONFIG's entry. This tag should only be used in extreme cases" + echo " and is not to be used as a workaround to solve CONFIG problems." exit 1 } @@ -30,11 +37,11 @@ switch_to_toplevel() path="$(pwd)" while test -n "$path" do - test -e $path/MAINTAINERS && \ - test -d $path/drivers && \ + test -e "$path"/MAINTAINERS && \ + test -d "$path"/drivers && \ break - path="$(dirname $path)" + path=$(dirname "$path") done test -n "$path" || die "Can't find toplevel" @@ -65,10 +72,25 @@ checkoptions() print "Found "a[1]"="a[2]" after generation, had " a[1]"="configs[a[1]]" in Source tree"; } } - ' $1 $2 > .mismatches + ' "$1" "$2" > .mismatches + checkoptions_error=false if test -s .mismatches then + while read -r LINE + do + if find ./ -name "$(echo "$LINE" | awk -F "=" ' { print $1 } ' | awk ' { print $2 }')" -print0 | xargs -0 grep ^ | grep -q "process_configs_known_broken"; then + # This is a known broken config. + # See script help warning. + checkoptions_error=false + else + checkoptions_error=true + break + fi + done < .mismatches + + ! $checkoptions_error && return + echo "Error: Mismatches found in configuration files" cat .mismatches RETURNCODE=1 @@ -84,7 +106,7 @@ parsenewconfigs() # and puts it into CONFIG_FOO files. Using the output of # listnewconfig is much easier to ensure we get the default # output. - /usr/bin/awk -v BASE=$tmpdir ' + /usr/bin/awk -v BASE="$tmpdir" ' /is not set/ { split ($0, a, "#"); split(a[2], b); @@ -109,7 +131,7 @@ parsenewconfigs() # each CONFIG_FOO file. Because of how awk works # there's a lot of moving files around and catting to # get what we need. - /usr/bin/awk -v BASE=$tmpdir ' + /usr/bin/awk -v BASE="$tmpdir" ' BEGIN { inpatch=0; outfile="none"; symbol="none"; } @@ -141,28 +163,28 @@ parsenewconfigs() ' .helpnewconfig - pushd $tmpdir &> /dev/null + pushd "$tmpdir" &> /dev/null rm fake_* popd &> /dev/null - for f in `ls $tmpdir`; do - [[ -e "$tmpdir/$f" ]] || break - cp $tmpdir/$f $SCRIPT_DIR/pending"$FLAVOR"/generic/ + for f in "$tmpdir"/*; do + [[ -e "$f" ]] || break + cp "$f" "$SCRIPT_DIR/pending$FLAVOR/generic/" done - rm -rf $tmpdir + rm -rf "$tmpdir" } function commit_new_configs() { # assume we are in $source_tree/configs, need to get to top level - pushd $(switch_to_toplevel) &>/dev/null + pushd "$(switch_to_toplevel)" &>/dev/null - for cfg in $SCRIPT_DIR/${PACKAGE_NAME}${KVERREL}${SUBARCH}*.config + for cfg in "$SCRIPT_DIR/${PACKAGE_NAME}${KVERREL}${SUBARCH}"*.config do - arch=$(head -1 $cfg | cut -b 3-) + arch=$(head -1 "$cfg" | cut -b 3-) cfgtmp="${cfg}.tmp" cfgorig="${cfg}.orig" - cat $cfg > $cfgorig + cat "$cfg" > "$cfgorig" if [ "$arch" = "EMPTY" ] then @@ -171,32 +193,32 @@ function commit_new_configs() fi echo -n "Checking for new configs in $cfg ... " - make ARCH=$arch KCONFIG_CONFIG=$cfgorig listnewconfig >& .listnewconfig + make ARCH="$arch" KCONFIG_CONFIG="$cfgorig" listnewconfig >& .listnewconfig grep -E 'CONFIG_' .listnewconfig > .newoptions if test -s .newoptions then - make ARCH=$arch KCONFIG_CONFIG=$cfgorig helpnewconfig >& .helpnewconfig + make ARCH="$arch" KCONFIG_CONFIG="$cfgorig" helpnewconfig >& .helpnewconfig parsenewconfigs fi rm .newoptions echo "done" done - git add $SCRIPT_DIR/pending"$FLAVOR" + git add "$SCRIPT_DIR/pending$FLAVOR" git commit -m "[redhat] AUTOMATIC: New configs" } function process_configs() { # assume we are in $source_tree/configs, need to get to top level - pushd $(switch_to_toplevel) &>/dev/null + pushd "$(switch_to_toplevel)" &>/dev/null - for cfg in $SCRIPT_DIR/${PACKAGE_NAME}${KVERREL}${SUBARCH}*.config + for cfg in "$SCRIPT_DIR/${PACKAGE_NAME}${KVERREL}${SUBARCH}"*.config do - arch=$(head -1 $cfg | cut -b 3-) + arch=$(head -1 "$cfg" | cut -b 3-) cfgtmp="${cfg}.tmp" cfgorig="${cfg}.orig" - cat $cfg > $cfgorig + cat "$cfg" > "$cfgorig" if [ "$arch" = "EMPTY" ] then @@ -205,7 +227,7 @@ function process_configs() fi echo -n "Processing $cfg ... " - make ARCH=$arch KCONFIG_CONFIG=$cfgorig listnewconfig >& .listnewconfig + make ARCH="$arch" KCONFIG_CONFIG="$cfgorig" listnewconfig >& .listnewconfig grep -E 'CONFIG_' .listnewconfig > .newoptions if test -n "$NEWOPTIONS" && test -s .newoptions then @@ -230,21 +252,21 @@ function process_configs() rm .listnewconfig - make ARCH=$arch KCONFIG_CONFIG=$cfgorig olddefconfig > /dev/null || exit 1 - echo "# $arch" > ${cfgtmp} - cat "${cfgorig}" >> ${cfgtmp} + make ARCH="$arch" KCONFIG_CONFIG="$cfgorig" olddefconfig > /dev/null || exit 1 + echo "# $arch" > "$cfgtmp" + cat "$cfgorig" >> "$cfgtmp" if test -n "$CHECKOPTIONS" then - checkoptions $cfg $cfgtmp + checkoptions "$cfg" "$cfgtmp" fi # if test run, don't overwrite original if test -n "$TESTRUN" then - rm ${cfgtmp} + rm -f "$cfgtmp" else - mv ${cfgtmp} ${cfg} + mv "$cfgtmp" "$cfg" fi - rm ${cfgorig} + rm -f "$cfgorig" echo "done" done rm "$SCRIPT_DIR"/*.config*.old @@ -302,9 +324,8 @@ PACKAGE_NAME="${1:-kernel}" # defines the package name used KVERREL="$(test -n "$2" && echo "-$2" || echo "")" SUBARCH="$(test -n "$3" && echo "-$3" || echo "")" FLAVOR="$(test -n "$4" && echo "-$4" || echo "-common")" -SCRIPT="$(readlink -f $0)" -OUTPUT_DIR="$PWD" -SCRIPT_DIR="$(dirname $SCRIPT)" +SCRIPT=$(readlink -f "$0") +SCRIPT_DIR=$(dirname "$SCRIPT") # Most RHEL options are options we want in Fedora so RHEL pending settings head # to common/ @@ -314,7 +335,7 @@ then fi # to handle this script being a symlink -cd $SCRIPT_DIR +cd "$SCRIPT_DIR" if test -n "$COMMITNEWCONFIGS"; then commit_new_configs diff --git a/SOURCES/rheldup3.x509 b/SOURCES/rheldup3.x509 new file mode 100644 index 0000000..5df3b4f Binary files /dev/null and b/SOURCES/rheldup3.x509 differ diff --git a/SOURCES/rhelkpatch1.x509 b/SOURCES/rhelkpatch1.x509 new file mode 100644 index 0000000..0c774ba Binary files /dev/null and b/SOURCES/rhelkpatch1.x509 differ diff --git a/SOURCES/update_scripts.sh b/SOURCES/update_scripts.sh index 5c3dbae..9196e79 100755 --- a/SOURCES/update_scripts.sh +++ b/SOURCES/update_scripts.sh @@ -1,12 +1,12 @@ #!/bin/sh -if [ -z $1 ]; then +if [ -z "$1" ]; then exit 1 fi -TARGET=$1 +TARGET="$1" -for i in $RPM_SOURCE_DIR/*.$TARGET; do +for i in "$RPM_SOURCE_DIR"/*."$TARGET"; do NEW=${i%.$TARGET} - cp $i $NEW + cp "$i" "$NEW" done diff --git a/SPECS/kernel.spec b/SPECS/kernel.spec old mode 100644 new mode 100755 index b1f606e..92b0bd0 --- a/SPECS/kernel.spec +++ b/SPECS/kernel.spec @@ -1,7 +1,42 @@ -# We have to override the new %%install behavior because, well... the kernel is special. +# All Global changes to build and install go here. +# Per the below section about __spec_install_pre, any rpm +# environment changes that affect %%install need to go +# here before the %%install macro is pre-built. + +# Disable LTO in userspace packages. +%global _lto_cflags %{nil} + + +# Cross compile on copr for arm +# See https://bugzilla.redhat.com/1879599 +%if 0%{?_with_cross_arm:1} +%global _target_cpu armv7hl +%global _arch arm +%global _build_arch arm +%global _with_cross 1 +%endif + +# The kernel's %%install section is special +# Normally the %%install section starts by cleaning up the BUILD_ROOT +# like so: +# +# %%__spec_install_pre %%{___build_pre}\ +# [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "${RPM_BUILD_ROOT}"\ +# mkdir -p `dirname "$RPM_BUILD_ROOT"`\ +# mkdir "$RPM_BUILD_ROOT"\ +# %%{nil} +# +# But because of kernel variants, the %%build section, specifically +# BuildKernel(), moves each variant to its final destination as the +# variant is built. This violates the expectation of the %%install +# section. As a result we snapshot the current env variables and +# purposely leave out the removal section. All global wide changes +# should be added above this line otherwise the %%install section +# will not see them. %global __spec_install_pre %{___build_pre} -# this should go away soon +# Short-term fix so the package builds with GCC 10. +# This should go away soon. %define _legacy_common_support 1 # At the time of this writing (2019-03), RHEL8 packages use w2.xzdio @@ -29,6 +64,8 @@ Summary: The Linux kernel # For a stable, released kernel, released_kernel should be 1. %global released_kernel 1 +%global distro_build 200 + %if 0%{?fedora} %define secure_boot_arch x86_64 %else @@ -60,65 +97,28 @@ Summary: The Linux kernel %define buildid .fsync + %if 0%{?fedora} %define primary_target fedora %else %define primary_target rhel %endif -# baserelease defines which build revision of this kernel version we're -# building. We used to call this fedora_build, but the magical name -# baserelease is matched by the rpmdev-bumpspec tool, which you should use. -# -# We used to have some extra magic weirdness to bump this automatically, -# but now we don't. Just use: rpmdev-bumpspec -c 'comment for changelog' -# When changing base_sublevel below or going from rc to a final kernel, -# reset this by hand to 1 (or to 0 and then use rpmdev-bumpspec). -# scripts/rebase.sh should be made to do that for you, actually. -# -# NOTE: baserelease must be > 0 or bad things will happen if you switch -# to a released kernel (released version will be < rc version) -# -# For non-released -rc kernels, this will be appended after the rcX and -# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3" -# -%global baserelease 201 -%global fedora_build %{baserelease} +%define rpmversion 5.11.7 +%define stableversion 5.11 +%define pkgrelease 201 -# base_sublevel is the kernel version we're starting with and patching -# on top of -- for example, 3.1-rc7-git1 starts with a 3.0 base, -# which yields a base_sublevel of 0. -%define base_sublevel 10 +# This is needed to do merge window version magic +%define patchlevel 11 -## If this is a released kernel ## -%if 0%{?released_kernel} +# allow pkg_release to have configurable %%{?dist} tag +%define specrelease 201%{?buildid}%{?dist} -# Do we have a -stable update to apply? -%define stable_update 23 -# Set rpm version accordingly -%if 0%{?stable_update} -%define stablerev %{stable_update} -%define stable_base %{stable_update} -%endif -%define rpmversion 5.%{base_sublevel}.%{stable_update} +%define pkg_release %{specrelease} -## The not-released-kernel case ## -%else -# The next upstream release sublevel (base_sublevel+1) -%define upstream_sublevel %(echo $((%{base_sublevel} + 1))) -# The rc snapshot level -%global rcrev 0 -# The git snapshot level -%define gitrev 0 -# Set rpm version accordingly -%define rpmversion 5.%{upstream_sublevel}.0 -%endif -# Nb: The above rcrev and gitrev values automagically define Patch00 and Patch01 below. - -# What parts do we want to build? We must build at least one kernel. -# These are the kernels that are built IF the architecture allows it. -# All should default to 1 (enabled) and be flipped to 0 (disabled) -# by later arch-specific checks. +# What parts do we want to build? These are the kernels that are built IF the +# architecture allows it. All should default to 1 (enabled) and be flipped to +# 0 (disabled) by later arch-specific checks. # The following build options are enabled by default. # Use either --without in your rpmbuild command or force values @@ -204,6 +204,9 @@ Summary: The Linux kernel # See also 'make debug' and 'make release'. %define debugbuildsenabled 1 +# The kernel tarball/base version +%define kversion 5.11 + %if 0%{?fedora} # Kernel headers are being split out into a separate package %define with_headers 1 @@ -226,32 +229,6 @@ Summary: The Linux kernel %define make_opts -s %endif -# pkg_release is what we'll fill in for the rpm Release: field -%if 0%{?released_kernel} - -%define pkg_release %{fedora_build}%{?buildid}%{?dist} - -%else - -# non-released_kernel -%if 0%{?rcrev} -%define rctag .rc%rcrev -%else -%define rctag .rc0 -%endif -%if 0%{?gitrev} -%define gittag .git%gitrev -%else -%define gittag .git0 -%endif -%define pkg_release 0%{?rctag}%{?gittag}.%{fedora_build}%{?buildid}%{?dist} - -%endif - -# The kernel tarball/base version -%define kversion 5.%{base_sublevel} - - # turn off debug kernel and kabichk for gcov builds %if %{with_gcov} %define with_debug 0 @@ -326,10 +303,7 @@ Summary: The Linux kernel # if requested, only build debug kernel %if %{with_dbgonly} -%if %{debugbuildsenabled} %define with_up 0 -%endif -%define with_pae 0 %define with_tools 0 %define with_perf 0 %define with_bpftool 0 @@ -414,8 +388,8 @@ Summary: The Linux kernel %define make_target vmlinux %define kernel_image vmlinux %define kernel_image_elf 1 +%define use_vdso 0 %define all_arch_configs kernel-%{version}-ppc64le*.config -%define kcflags -O3 %endif %ifarch s390x @@ -423,6 +397,7 @@ Summary: The Linux kernel %define hdrarch s390 %define all_arch_configs kernel-%{version}-s390x.config %define kernel_image arch/s390/boot/bzImage +%define vmlinux_decompressor arch/s390/boot/compressed/vmlinux %endif %ifarch %{arm} @@ -468,18 +443,21 @@ Summary: The Linux kernel %if 0%{?fedora} %define nobuildarches i386 %else -%define nobuildarches i386 i686 +%define nobuildarches i386 i686 %{arm} %endif %ifarch %nobuildarches +# disable BuildKernel commands %define with_up 0 %define with_debug 0 +%define with_pae 0 +%define with_zfcpdump 0 + %define with_debuginfo 0 %define with_perf 0 %define with_tools 0 %define with_bpftool 0 %define with_selftests 0 -%define with_pae 0 %define _enable_debug_packages 0 %endif @@ -490,7 +468,7 @@ Summary: The Linux kernel %define cpupowerarchs i686 x86_64 ppc64le aarch64 %endif -%if %{use_vdso} +%if 0%{?use_vdso} %if 0%{?skip_nonpae_vdso} %define _use_vdso 0 @@ -534,18 +512,16 @@ Requires: kernel-modules-uname-r = %{KVERREL}%{?variant} # BuildRequires: kmod, patch, bash, tar, git-core BuildRequires: bzip2, xz, findutils, gzip, m4, perl-interpreter, perl-Carp, perl-devel, perl-generators, make, diffutils, gawk -BuildRequires: gcc, binutils, redhat-rpm-config, hmaccalc, bison, flex +BuildRequires: gcc, binutils, redhat-rpm-config, hmaccalc, bison, flex, gcc-c++ BuildRequires: net-tools, hostname, bc, elfutils-devel -%if 0%{?fedora} BuildRequires: dwarves -%endif -# Used to mangle unversioned shebangs to be Python 3 BuildRequires: python3-devel +BuildRequires: gcc-plugin-devel %if %{with_headers} BuildRequires: rsync %endif %if %{with_doc} -BuildRequires: xmlto, asciidoc, python3-sphinx +BuildRequires: xmlto, asciidoc, python3-sphinx, python3-sphinx_rtd_theme %endif %if %{with_sparse} BuildRequires: sparse @@ -560,6 +536,7 @@ BuildRequires: numactl-devel %endif %if %{with_tools} BuildRequires: gettext ncurses-devel +BuildRequires: libcap-devel libcap-ng-devel %ifnarch s390x BuildRequires: pciutils-devel %endif @@ -569,11 +546,7 @@ BuildRequires: python3-docutils BuildRequires: zlib-devel binutils-devel %endif %if %{with_selftests} -%if 0%{?fedora} BuildRequires: clang llvm -%else -BuildRequires: llvm-toolset -%endif %ifnarch %{arm} BuildRequires: numactl-devel %endif @@ -583,9 +556,7 @@ BuildConflicts: rhbuildsys(DiskFree) < 500Mb %if %{with_debuginfo} BuildRequires: rpm-build, elfutils BuildConflicts: rpm < 4.13.0.1-19 -%if 0%{?fedora} BuildConflicts: dwarves < 1.13 -%endif # Most of these should be enabled after more investigation %undefine _include_minidebuginfo %undefine _find_debuginfo_dwz_opts @@ -615,6 +586,7 @@ BuildRequires: pesign >= 0.10-4 %if %{with_cross} BuildRequires: binutils-%{_build_arch}-linux-gnu, gcc-%{_build_arch}-linux-gnu %define cross_opts CROSS_COMPILE=%{_build_arch}-linux-gnu- +%define __strip %{_build_arch}-linux-gnu-strip %endif # These below are required to build man pages @@ -625,7 +597,16 @@ BuildRequires: xmlto BuildRequires: asciidoc %endif -Source0: https://www.kernel.org/pub/linux/kernel/v5.x/linux-%{kversion}.tar.xz +# Because this is the kernel, it's hard to get a single upstream URL +# to represent the base without needing to do a bunch of patching. This +# tarball is generated from a src-git tree. If you want to see the +# exact git commit you can run +# +# xzcat -qq ${TARBALL} | git get-tar-commit-id +Source0: linux-5.11.7.tar.xz + +Source1: Makefile.rhelver + # Name of the packaged file containing signing key %ifarch ppc64le @@ -635,57 +616,57 @@ Source0: https://www.kernel.org/pub/linux/kernel/v5.x/linux-%{kversion}.tar.xz %define signing_key_filename kernel-signing-s390.cer %endif -Source10: x509.genkey.rhel -Source11: x509.genkey.fedora +Source8: x509.genkey.rhel +Source9: x509.genkey.fedora + %if %{?released_kernel} -Source12: redhatsecurebootca5.cer -Source13: redhatsecurebootca1.cer -Source14: redhatsecureboot501.cer -Source15: redhatsecureboot301.cer -Source16: secureboot_s390.cer -Source17: secureboot_ppc.cer +Source10: redhatsecurebootca5.cer +Source11: redhatsecurebootca1.cer +Source12: redhatsecureboot501.cer +Source13: redhatsecureboot301.cer +Source14: secureboot_s390.cer +Source15: secureboot_ppc.cer -%define secureboot_ca_1 %{SOURCE12} -%define secureboot_ca_0 %{SOURCE13} +%define secureboot_ca_1 %{SOURCE10} +%define secureboot_ca_0 %{SOURCE11} %ifarch x86_64 aarch64 -%define secureboot_key_1 %{SOURCE14} +%define secureboot_key_1 %{SOURCE12} %define pesign_name_1 redhatsecureboot501 -%define secureboot_key_0 %{SOURCE15} +%define secureboot_key_0 %{SOURCE13} %define pesign_name_0 redhatsecureboot301 %endif %ifarch s390x -%define secureboot_key_0 %{SOURCE16} +%define secureboot_key_0 %{SOURCE14} %define pesign_name_0 redhatsecureboot302 %endif %ifarch ppc64le -%define secureboot_key_0 %{SOURCE17} +%define secureboot_key_0 %{SOURCE15} %define pesign_name_0 redhatsecureboot303 %endif # released_kernel %else -Source12: redhatsecurebootca4.cer -Source13: redhatsecurebootca2.cer -Source14: redhatsecureboot401.cer -Source15: redhatsecureboot003.cer +Source10: redhatsecurebootca4.cer +Source11: redhatsecurebootca2.cer +Source12: redhatsecureboot401.cer +Source13: redhatsecureboot003.cer -%define secureboot_ca_1 %{SOURCE12} -%define secureboot_ca_0 %{SOURCE13} -%define secureboot_key_1 %{SOURCE14} +%define secureboot_ca_1 %{SOURCE10} +%define secureboot_ca_0 %{SOURCE11} +%define secureboot_key_1 %{SOURCE12} %define pesign_name_1 redhatsecureboot401 -%define secureboot_key_0 %{SOURCE15} +%define secureboot_key_0 %{SOURCE13} %define pesign_name_0 redhatsecureboot003 # released_kernel %endif Source22: mod-extra.list.rhel -Source23: mod-extra.list.fedora -Source24: mod-extra.sh +Source16: mod-extra.list.fedora +Source17: mod-blacklist.sh Source18: mod-sign.sh -Source19: mod-extra-blacklist.sh Source79: parallel_xz.sh Source80: filter-x86_64.sh.fedora @@ -739,7 +720,9 @@ Source53: generate_bls_conf.sh Source56: update_scripts.sh Source54: mod-internal.list -Source55: merge.pl + +Source100: rheldup3.x509 +Source101: rhelkpatch1.x509 Source200: check-kabi @@ -753,113 +736,37 @@ Source211: Module.kabi_dup_ppc64le Source212: Module.kabi_dup_s390x Source213: Module.kabi_dup_x86_64 -# Source300: kernel-abi-whitelists-%{rpmversion}-%{distro_build}.tar.bz2 -# Source301: kernel-kabi-dw-%{rpmversion}-%{distro_build}.tar.bz2 +Source300: kernel-abi-whitelists-%{rpmversion}-%{distro_build}.tar.bz2 +Source301: kernel-kabi-dw-%{rpmversion}-%{distro_build}.tar.bz2 # Sources for kernel-tools Source2000: cpupower.service Source2001: cpupower.config -## Patches needed for building this package - -# Patch1: patch-%{rpmversion}-redhat.patch - -# empty final patch to facilitate testing of kernel patches -# Patch999999: linux-kernel-test.patch - -# This file is intentionally left empty in the stock kernel. Its a nicety -# added for those wanting to do custom rebuilds with altered config opts. -Source1000: kernel-local - -# Here should be only the patches up to the upstream canonical Linus tree. - -# For a stable release kernel -%if 0%{?stable_update} -%if 0%{?stable_base} -%define stable_patch_00 patch-5.%{base_sublevel}.%{stable_base}.xz -Source5000: %{stable_patch_00} -%endif +# Some people enjoy building customized kernels from the dist-git in Fedora and +# use this to override configuration options. One day they may all use the +# source tree, but in the mean time we carry this to support the legacy workflow +Source3000: merge.pl +Source3001: kernel-local +Source3003: Patchlist.changelog -# non-released_kernel case -# These are automagically defined by the rcrev and gitrev values set up -# near the top of this spec file. -%else -%if 0%{?rcrev} -Source5000: patch-5.%{upstream_sublevel}-rc%{rcrev}.xz -%if 0%{?gitrev} -Source5001: patch-5.%{upstream_sublevel}-rc%{rcrev}-git%{gitrev}.xz -%endif -%else -# pre-{base_sublevel+1}-rc1 case -%if 0%{?gitrev} -Source5000: patch-5.%{base_sublevel}-git%{gitrev}.xz -%endif -%endif -%endif +Source4000: README.rst ## Patches needed for building this package -## compile fixes - %if !%{nopatches} -Patch6: 0001-ACPI-APEI-arm64-Ignore-broken-HPE-moonshot-APEI-supp.patch -Patch8: 0001-ACPI-irq-Workaround-firmware-issue-on-X-Gene-based-m.patch -Patch9: 0001-aarch64-acpi-scan-Fix-regression-related-to-X-Gene-U.patch -Patch11: 0001-kdump-round-up-the-total-memory-size-to-128M-for-cra.patch -Patch12: 0001-kdump-add-support-for-crashkernel-auto.patch -Patch15: 0001-kdump-fix-a-grammar-issue-in-a-kernel-message.patch -Patch19: 0001-Vulcan-AHCI-PCI-bar-fix-for-Broadcom-Vulcan-early-si.patch -Patch20: 0001-ahci-thunderx2-Fix-for-errata-that-affects-stop-engi.patch -Patch24: 0001-scsi-smartpqi-add-inspur-advantech-ids.patch -Patch26: 0001-ipmi-do-not-configure-ipmi-for-HPE-m400.patch -Patch28: 0001-iommu-arm-smmu-workaround-DMA-mode-issues.patch -Patch29: 0001-arm-aarch64-Drop-the-EXPERT-setting-from-ARM64_FORCE.patch -Patch31: 0001-Add-efi_status_to_str-and-rework-efi_status_to_err.patch -Patch32: 0001-Make-get_cert_list-use-efi_status_to_str-to-print-er.patch -Patch33: 0001-security-lockdown-expose-a-hook-to-lock-the-kernel-d.patch -Patch34: 0001-efi-Add-an-EFI_SECURE_BOOT-flag-to-indicate-secure-b.patch -Patch35: 0001-efi-Lock-down-the-kernel-if-booted-in-secure-boot-mo.patch -Patch36: 0001-s390-Lock-down-the-kernel-when-the-IPL-secure-flag-i.patch -Patch37: 0001-Add-option-of-13-for-FORCE_MAX_ZONEORDER.patch -Patch58: 0001-arm-make-CONFIG_HIGHPTE-optional-without-CONFIG_EXPE.patch -Patch59: 0001-ARM-tegra-usb-no-reset.patch -Patch61: 0001-Input-rmi4-remove-the-need-for-artificial-IRQ-in-cas.patch -Patch62: 0001-Drop-that-for-now.patch -Patch63: 0001-KEYS-Make-use-of-platform-keyring-for-module-signatu.patch -Patch64: 0001-mm-kmemleak-skip-late_init-if-not-skip-disable.patch -Patch65: 0001-ARM-fix-__get_user_check-in-case-uaccess_-calls-are-.patch -Patch66: 0001-dt-bindings-panel-add-binding-for-Xingbangda-XBD599-.patch -Patch67: 0001-drm-panel-add-Xingbangda-XBD599-panel.patch -Patch68: 0001-drm-sun4i-sun6i_mipi_dsi-fix-horizontal-timing-calcu.patch -Patch72: 0001-Work-around-for-gcc-bug-https-gcc.gnu.org-bugzilla-s.patch - -# https://patchwork.kernel.org/patch/11796255/ -Patch100: arm64-dts-rockchip-disable-USB-type-c-DisplayPort.patch - -# Tegra fixes -Patch101: 0001-PCI-Add-MCFG-quirks-for-Tegra194-host-controllers.patch - -# A patch to fix some undocumented things broke a bunch of Allwinner networks due to wrong assumptions -Patch102: 0001-update-phy-on-pine64-a64-devices.patch - -# OMAP Pandaboard fix -Patch103: arm-pandaboard-fix-add-bluetooth.patch - -# Fix for USB on some newer RPi4 / firmware combinations -Patch104: 0001-brcm-rpi4-fix-usb-numeration.patch - -# RPi-4 and wifi issues -Patch105: arm-dts-rpi-4-disable-wifi-frequencies.patch +Patch1: patch-%{stableversion}-redhat.patch # linux-fsync patches Patch200: zen.patch Patch201: futex2.patch - -# END OF PATCH DEFINITIONS - %endif +# empty final patch to facilitate testing of kernel patches +Patch999999: linux-kernel-test.patch + +# END OF PATCH DEFINITIONS %description The kernel meta package @@ -1028,7 +935,7 @@ This package provides debug information for package kernel-tools. # symlinks because of the trailing nonmatching alternation and # the leading .*, because of find-debuginfo.sh's buggy handling # of matching the pattern against the symlinks file. -%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_bindir}/centrino-decode(\.debug)?|.*%%{_bindir}/powernow-k8-decode(\.debug)?|.*%%{_bindir}/cpupower(\.debug)?|.*%%{_libdir}/libcpupower.*|.*%%{_bindir}/turbostat(\.debug)?|.*%%{_bindir}/x86_energy_perf_policy(\.debug)?|.*%%{_bindir}/tmon(\.debug)?|.*%%{_bindir}/lsgpio(\.debug)?|.*%%{_bindir}/gpio-hammer(\.debug)?|.*%%{_bindir}/gpio-event-mon(\.debug)?|.*%%{_bindir}/iio_event_monitor(\.debug)?|.*%%{_bindir}/iio_generic_buffer(\.debug)?|.*%%{_bindir}/lsiio(\.debug)?|XXX' -o kernel-tools-debuginfo.list} +%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_bindir}/centrino-decode(\.debug)?|.*%%{_bindir}/powernow-k8-decode(\.debug)?|.*%%{_bindir}/cpupower(\.debug)?|.*%%{_libdir}/libcpupower.*|.*%%{_bindir}/turbostat(\.debug)?|.*%%{_bindir}/x86_energy_perf_policy(\.debug)?|.*%%{_bindir}/tmon(\.debug)?|.*%%{_bindir}/lsgpio(\.debug)?|.*%%{_bindir}/gpio-hammer(\.debug)?|.*%%{_bindir}/gpio-event-mon(\.debug)?|.*%%{_bindir}/iio_event_monitor(\.debug)?|.*%%{_bindir}/iio_generic_buffer(\.debug)?|.*%%{_bindir}/lsiio(\.debug)?|.*%%{_bindir}/intel-speed-select(\.debug)?|XXX' -o kernel-tools-debuginfo.list} # with_tools %endif @@ -1119,8 +1026,6 @@ AutoReqProv: no\ This package provides debug information for package %{name}%{?1:-%{1}}.\ This is required to use SystemTap with %{name}%{?1:-%{1}}-%{KVERREL}.\ %{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*\/usr\/src\/kernels/.*|XXX' -o ignored-debuginfo.list -p '/.*/%%{KVERREL_RE}%{?1:[+]%{1}}/.*|/.*%%{KVERREL_RE}%{?1:\+%{1}}(\.debug)?' -o debuginfo%{?1}.list}\ - - %{nil} # @@ -1209,7 +1114,6 @@ Provides: kernel-modules = %{version}-%{release}%{?1:+%{1}}\ Provides: installonlypkg(kernel-module)\ Provides: kernel%{?1:-%{1}}-modules-uname-r = %{KVERREL}%{?variant}%{?1:+%{1}}\ Requires: kernel-uname-r = %{KVERREL}%{?variant}%{?1:+%{1}}\ -Recommends: alsa-sof-firmware\ AutoReq: no\ AutoProv: yes\ %description %{?1:%{1}-}modules\ @@ -1240,9 +1144,6 @@ The meta-package for the %{1} kernel\ Summary: %{variant_summary}\ Provides: kernel-%{?1:%{1}-}core-uname-r = %{KVERREL}%{?variant}%{?1:+%{1}}\ Provides: installonlypkg(kernel)\ -%ifarch ppc64le\ -Obsoletes: kernel-bootwrapper\ -%endif\ %{expand:%%kernel_reqprovconf}\ %if %{?1:1} %{!?1:0} \ %{expand:%%kernel_meta_package %{?1:%{1}}}\ @@ -1302,17 +1203,12 @@ input and output, etc. %prep # do a few sanity-checks for --with *only builds %if %{with_baseonly} -%if !%{with_up}%{with_pae} +%if !%{with_up} echo "Cannot build --with baseonly, up build is disabled" exit 1 %endif %endif -%if "%{baserelease}" == "0" -echo "baserelease must be greater than zero" -exit 1 -%endif - # more sanity checking; do it quietly if [ "%{patches}" != "%%{patches}" ] ; then for patch in %{patches} ; do @@ -1359,166 +1255,22 @@ ApplyOptionalPatch() fi } -# First we unpack the kernel tarball. -# If this isn't the first make prep, we use links to the existing clean tarball -# which speeds things up quite a bit. - -# Update to latest upstream. -%if 0%{?released_kernel} -%define vanillaversion 5.%{base_sublevel} -# non-released_kernel case -%else -%if 0%{?rcrev} -%define vanillaversion 5.%{upstream_sublevel}-rc%{rcrev} -%if 0%{?gitrev} -%define vanillaversion 5.%{upstream_sublevel}-rc%{rcrev}-git%{gitrev} -%endif -%else -# pre-{base_sublevel+1}-rc1 case -%if 0%{?gitrev} -%define vanillaversion 5.%{base_sublevel}-git%{gitrev} -%else -%define vanillaversion 5.%{base_sublevel} -%endif -%endif -%endif - -# %%{vanillaversion} : the full version name, e.g. 2.6.35-rc6-git3 -# %%{kversion} : the base version, e.g. 2.6.34 - -# Use kernel-%%{kversion}%%{?dist} as the top-level directory name -# so we can prep different trees within a single git directory. - -# Build a list of the other top-level kernel tree directories. -# This will be used to hardlink identical vanilla subdirs. -sharedirs=$(find "$PWD" -maxdepth 1 -type d -name 'kernel-5.*' \ - | grep -x -v "$PWD"/kernel-%{kversion}%{?dist}) ||: - -# Delete all old stale trees. -if [ -d kernel-%{kversion}%{?dist} ]; then - cd kernel-%{kversion}%{?dist} - for i in linux-* - do - if [ -d $i ]; then - # Just in case we ctrl-c'd a prep already - rm -rf deleteme.%{_target_cpu} - # Move away the stale away, and delete in background. - mv $i deleteme-$i - rm -rf deleteme* & - fi - done - cd .. -fi - -# Generate new tree -if [ ! -d kernel-%{kversion}%{?dist}/vanilla-%{vanillaversion} ]; then - - if [ -d kernel-%{kversion}%{?dist}/vanilla-%{kversion} ]; then - - # The base vanilla version already exists. - cd kernel-%{kversion}%{?dist} - - # Any vanilla-* directories other than the base one are stale. - for dir in vanilla-*; do - [ "$dir" = vanilla-%{kversion} ] || rm -rf $dir & - done - - else - - rm -f pax_global_header - # Look for an identical base vanilla dir that can be hardlinked. - for sharedir in $sharedirs ; do - if [[ ! -z $sharedir && -d $sharedir/vanilla-%{kversion} ]] ; then - break - fi - done - if [[ ! -z $sharedir && -d $sharedir/vanilla-%{kversion} ]] ; then -%setup -q -n kernel-%{kversion}%{?dist} -c -T - cp -al $sharedir/vanilla-%{kversion} . - else -%setup -q -n kernel-%{kversion}%{?dist} -c - mv linux-%{kversion} vanilla-%{kversion} - fi - - fi - -%if "%{kversion}" != "%{vanillaversion}" - - for sharedir in $sharedirs ; do - if [[ ! -z $sharedir && -d $sharedir/vanilla-%{vanillaversion} ]] ; then - break - fi - done - if [[ ! -z $sharedir && -d $sharedir/vanilla-%{vanillaversion} ]] ; then - - cp -al $sharedir/vanilla-%{vanillaversion} . - - else - - # Need to apply patches to the base vanilla version. - cp -al vanilla-%{kversion} vanilla-%{vanillaversion} - cd vanilla-%{vanillaversion} - -cp %{SOURCE12} . - -# Update vanilla to the latest upstream. -# (non-released_kernel case only) -%if 0%{?rcrev} - xzcat %{SOURCE5000} | patch -p1 -F1 -s -%if 0%{?gitrev} - xzcat %{SOURCE5001} | patch -p1 -F1 -s -%endif -%else -# pre-{base_sublevel+1}-rc1 case -%if 0%{?gitrev} - xzcat %{SOURCE5000} | patch -p1 -F1 -s -%endif -%endif - git init - git config user.email "kernel-team@fedoraproject.org" - git config user.name "Fedora Kernel Team" - git config gc.auto 0 - git add . - git commit -a -q -m "baseline" - - cd .. - - fi - -%endif - -else - - # We already have all vanilla dirs, just change to the top-level directory. - cd kernel-%{kversion}%{?dist} - -fi - -# Now build the fedora kernel tree. -cp -al vanilla-%{vanillaversion} linux-%{KVERREL} +%setup -q -n kernel-5.11.7 -c +mv linux-5.11.7 linux-%{KVERREL} cd linux-%{KVERREL} -if [ ! -d .git ]; then - git init - git config user.email "kernel-team@fedoraproject.org" - git config user.name "Fedora Kernel Team" - git config gc.auto 0 - git add . - git commit -a -q -m "baseline" -fi +cp -a %{SOURCE1} . +%if !%{nopatches} -# released_kernel with possible stable updates -%if 0%{?stable_base} -# This is special because the kernel spec is hell and nothing is consistent -xzcat %{SOURCE5000} | patch -p1 -F1 -s -git commit -a -m "Stable update" -%endif +ApplyOptionalPatch patch-%{stableversion}-redhat.patch -# Note: Even in the "nopatches" path some patches (build tweaks and compile -# fixes) will always get applied; see patch defition above for details +# linux-fsync patches +ApplyOptionalPatch zen.patch +ApplyOptionalPatch futex2.patch +%endif -git am %{patches} +ApplyOptionalPatch linux-kernel-test.patch # END OF PATCH APPLICATIONS @@ -1544,9 +1296,7 @@ pathfix.py -i "%{__python3} %{py3_shbang_opts}" -p -n \ scripts/diffconfig \ scripts/bloat-o-meter \ scripts/jobserver-exec \ - tools/perf/tests/attr.py \ - tools/perf/scripts/python/stat-cpi.py \ - tools/perf/scripts/python/sched-migration.py \ + tools \ Documentation \ scripts/clang-tools @@ -1556,32 +1306,28 @@ pathfix.py -i "%{__python3} %{py3_shbang_opts}" -p -n \ if [ -L configs ]; then rm -f configs fi -# Deal with configs stuff mkdir configs cd configs # Drop some necessary files from the source dir into the buildroot cp $RPM_SOURCE_DIR/kernel-*.config . -cp %{SOURCE1000} . -cp %{SOURCE55} . cp %{SOURCE51} . +# merge.pl +cp %{SOURCE3000} . +# kernel-local +cp %{SOURCE3001} . VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled} - # Merge in any user-provided local config option changes %ifnarch %nobuildarches for i in %{all_arch_configs} do mv $i $i.tmp - ./merge.pl %{SOURCE1000} $i.tmp > $i + ./merge.pl %{SOURCE3001} $i.tmp > $i rm $i.tmp done %endif -%if !%{debugbuildsenabled} -rm -f kernel-%{version}-*debug.config -%endif - # enable GCOV kernel config options if gcov is on %if %{with_gcov} for i in *.config @@ -1590,6 +1336,18 @@ do done %endif +# Add DUP and kpatch certificates to system trusted keys for RHEL +%if 0%{?rhel} +%if %{signkernel}%{signmodules} +openssl x509 -inform der -in %{SOURCE100} -out rheldup3.pem +openssl x509 -inform der -in %{SOURCE101} -out rhelkpatch1.pem +cat rheldup3.pem rhelkpatch1.pem > ../certs/rhel.pem +for i in *.config; do + sed -i 's@CONFIG_SYSTEM_TRUSTED_KEYS=""@CONFIG_SYSTEM_TRUSTED_KEYS="certs/rhel.pem"@' $i +done +%endif +%endif + cp %{SOURCE52} . OPTS="" %if %{with_configchecks} @@ -1628,19 +1386,6 @@ cp_vmlinux() eu-strip --remove-comment -o "$2" "$1" } -# These are for host programs that get built as part of the kernel and -# are required to be packaged in kernel-devel for building external modules. -# Since they are userspace binaries, they are required to pickup the hardening -# flags defined in the macros. The --build-id=uuid is a trick to get around -# debuginfo limitations: Typically, find-debuginfo.sh will update the build -# id of all binaries to allow for parllel debuginfo installs. The kernel -# can't use this because it breaks debuginfo for the vDSO so we have to -# use a special mechanism for kernel and modules to be unique. Unfortunately, -# we still have userspace binaries which need unique debuginfo and because -# they come from the kernel package, we can't just use find-debuginfo.sh to -# rewrite only those binaries. The easiest option right now is just to have -# the build id be a uuid for the host programs. -# # Note we need to disable these flags for cross builds because the flags # from redhat-rpm-config assume that host == target so target arch # flags cause issues with the host compiler. @@ -1649,52 +1394,29 @@ cp_vmlinux() %define build_hostldflags %{?build_ldflags} %endif -%define make make %{?cross_opts} %{?make_opts} HOSTCFLAGS="%{?build_hostcflags}" HOSTLDFLAGS="%{?build_hostldflags}" +%define make %{__make} %{?cross_opts} %{?make_opts} HOSTCFLAGS="%{?build_hostcflags}" HOSTLDFLAGS="%{?build_hostldflags}" -BuildKernel() { - MakeTarget=$1 - KernelImage=$2 - Flavour=$4 - DoVDSO=$3 - Flav=${Flavour:++${Flavour}} - InstallName=${5:-vmlinuz} +InitBuildVars() { + # Initialize the kernel .config file and create some variables that are + # needed for the actual build process. - DoModules=1 - if [ "$Flavour" = "zfcpdump" ]; then - DoModules=0 - fi + Flavour=$1 + Flav=${Flavour:++${Flavour}} - # Pick the right config file for the kernel we're building + # Pick the right kernel config file Config=kernel-%{version}-%{_target_cpu}${Flavour:+-${Flavour}}.config DevelDir=/usr/src/kernels/%{KVERREL}${Flav} - # When the bootable image is just the ELF kernel, strip it. - # We already copy the unstripped file into the debuginfo package. - if [ "$KernelImage" = vmlinux ]; then - CopyKernel=cp_vmlinux - else - CopyKernel=cp - fi - KernelVer=%{version}-%{release}.%{_target_cpu}${Flav} - echo BUILDING A KERNEL FOR ${Flavour} %{_target_cpu}... - - %if 0%{?stable_update} - # make sure SUBLEVEL is incremented on a stable release. Sigh 3.x. - perl -p -i -e "s/^SUBLEVEL.*/SUBLEVEL = %{?stablerev}/" Makefile - %endif # make sure EXTRAVERSION says what we want it to say - perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}.%{_target_cpu}${Flav}/" Makefile + # Trim the release if this is a CI build, since KERNELVERSION is limited to 64 characters + ShortRel=$(perl -e "print \"%{release}\" =~ s/\.pr\.[0-9A-Fa-f]{32}//r") + perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -${ShortRel}.%{_target_cpu}${Flav}/" Makefile # if pre-rc1 devel kernel, must fix up PATCHLEVEL for our versioning scheme - %if !0%{?rcrev} - %if 0%{?gitrev} - perl -p -i -e 's/^PATCHLEVEL.*/PATCHLEVEL = %{upstream_sublevel}/' Makefile - %endif - %endif - - # and now to start the build process + # if we are post rc1 this should match anyway so this won't matter + perl -p -i -e 's/^PATCHLEVEL.*/PATCHLEVEL = %{patchlevel}/' Makefile %{make} %{?_smp_mflags} mrproper cp configs/$Config .config @@ -1712,6 +1434,32 @@ BuildKernel() { if [ "$Flavour" == "" ]; then KCFLAGS="$KCFLAGS %{?kpatch_kcflags}" fi +} + +BuildKernel() { + MakeTarget=$1 + KernelImage=$2 + Flavour=$4 + DoVDSO=$3 + Flav=${Flavour:++${Flavour}} + InstallName=${5:-vmlinuz} + + DoModules=1 + if [ "$Flavour" = "zfcpdump" ]; then + DoModules=0 + fi + + # When the bootable image is just the ELF kernel, strip it. + # We already copy the unstripped file into the debuginfo package. + if [ "$KernelImage" = vmlinux ]; then + CopyKernel=cp_vmlinux + else + CopyKernel=cp + fi + + InitBuildVars $Flavour + + echo BUILDING A KERNEL FOR ${Flavour} %{_target_cpu}... %{make} ARCH=$Arch olddefconfig >/dev/null @@ -1846,17 +1594,16 @@ BuildKernel() { mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build (cd $RPM_BUILD_ROOT/lib/modules/$KernelVer ; ln -s build source) # dirs for additional modules per module-init-tools, kbuild/modules.txt - mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/extra - mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/internal mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/updates -%if 0%{!?fedora:1} mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/weak-updates -%endif # CONFIG_KERNEL_HEADER_TEST generates some extra files in the process of # testing so just delete find . -name *.h.s -delete # first copy everything cp --parents `find -type f -name "Makefile*" -o -name "Kconfig*"` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + if [ ! -e Module.symvers ]; then + touch Module.symvers + fi cp Module.symvers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build cp System.map $RPM_BUILD_ROOT/lib/modules/$KernelVer/build if [ -s Module.markers ]; then @@ -1962,9 +1709,38 @@ BuildKernel() { cp -a --parents tools/include/tools/be_byteshift.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build cp -a --parents tools/include/tools/le_byteshift.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + # Files for 'make prepare' to succeed with kernel-devel. + cp -a --parents tools/include/linux/compiler* $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp -a --parents tools/include/linux/types.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp -a --parents tools/build/Build.include $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp --parents tools/build/Build $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp --parents tools/build/fixdep.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp --parents tools/objtool/sync-check.sh $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp -a --parents tools/bpf/resolve_btfids $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + + cp --parents security/selinux/include/policycap_names.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp --parents security/selinux/include/policycap.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + + cp -a --parents tools/include/asm-generic $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp -a --parents tools/include/linux $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp -a --parents tools/include/uapi/asm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp -a --parents tools/include/uapi/asm-generic $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp -a --parents tools/include/uapi/linux $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp -a --parents tools/include/vdso $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp --parents tools/scripts/utilities.mak $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp -a --parents tools/lib/subcmd $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp --parents tools/lib/*.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp --parents tools/objtool/*.[ch] $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp --parents tools/objtool/Build $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp -a --parents tools/lib/bpf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp --parents tools/lib/bpf/Build $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + if [ -f tools/objtool/objtool ]; then cp -a tools/objtool/objtool $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/tools/objtool/ || : fi + if [ -f tools/objtool/fixdep ]; then + cp -a tools/objtool/fixdep $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/tools/objtool/ || : + fi if [ -d arch/$Arch/scripts ]; then cp -a arch/$Arch/scripts $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/%{_arch} || : fi @@ -2010,7 +1786,6 @@ BuildKernel() { cp -a --parents arch/x86/tools/relocs.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ cp -a --parents arch/x86/tools/relocs_common.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ cp -a --parents arch/x86/tools/relocs.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ - cp -a --parents tools/include/tools/le_byteshift.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ cp -a --parents arch/x86/purgatory/purgatory.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ cp -a --parents arch/x86/purgatory/stack.S $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ cp -a --parents arch/x86/purgatory/setup-x86_64.S $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ @@ -2018,7 +1793,18 @@ BuildKernel() { cp -a --parents arch/x86/boot/string.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ cp -a --parents arch/x86/boot/string.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ cp -a --parents arch/x86/boot/ctype.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ + + cp -a --parents tools/arch/x86/include/asm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp -a --parents tools/arch/x86/include/uapi/asm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp -a --parents tools/objtool/arch/x86/lib $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp -a --parents tools/arch/x86/lib/ $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp -a --parents tools/arch/x86/tools/gen-insn-attr-x86.awk $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + cp -a --parents tools/objtool/arch/x86/ $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + %endif + # Clean up intermediate tools files + find $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/tools \( -iname "*.o" -o -iname "*.cmd" \) -exec rm -f {} + + # Make sure the Makefile and version.h have a matching timestamp so that # external modules can be built touch -r $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/Makefile $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/generated/uapi/linux/version.h @@ -2035,6 +1821,16 @@ BuildKernel() { # mkdir -p $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer cp vmlinux $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer + if [ -n "%{vmlinux_decompressor}" ]; then + eu-readelf -n %{vmlinux_decompressor} | grep "Build ID" | awk '{print $NF}' > vmlinux.decompressor.id + # Without build-id the build will fail. But for s390 the build-id + # wasn't added before 5.11. In case it is missing prefer not + # packaging the debuginfo over a build failure. + if [ -s vmlinux.decompressor.id ]; then + cp vmlinux.decompressor.id $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/vmlinux.decompressor.id + cp %{vmlinux_decompressor} $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer/vmlinux.decompressor + fi + fi %endif find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" -type f >modnames @@ -2074,12 +1870,10 @@ BuildKernel() { rm -f modules.{alias*,builtin.bin,dep*,*map,symbols*,devname,softdep} popd - # Call the modules-extra script to move things around - %{SOURCE24} $RPM_BUILD_ROOT/lib/modules/$KernelVer $RPM_SOURCE_DIR/mod-extra.list - # Blacklist net autoloadable modules in modules-extra - %{SOURCE19} $RPM_BUILD_ROOT lib/modules/$KernelVer - # Call the modules-extra script for internal modules - %{SOURCE24} $RPM_BUILD_ROOT/lib/modules/$KernelVer %{SOURCE54} internal + # Identify modules in the kernel-modules-extras package + %{SOURCE17} $RPM_BUILD_ROOT lib/modules/$KernelVer $RPM_SOURCE_DIR/mod-extra.list + # Identify modules in the kernel-modules-extras package + %{SOURCE17} $RPM_BUILD_ROOT lib/modules/$KernelVer %{SOURCE54} internal # # Generate the kernel-core and kernel-modules files lists @@ -2092,8 +1886,10 @@ BuildKernel() { mkdir restore cp -r lib/modules/$KernelVer/* restore/. - # don't include anything going into k-m-e and k-m-i in the file lists - rm -rf lib/modules/$KernelVer/{extra,internal} + # don't include anything going into kernel-modules-extra in the file lists + xargs rm -rf < mod-extra.list + # don't include anything going int kernel-modules-internal in the file lists + xargs rm -rf < mod-internal.list if [ $DoModules -eq 1 ]; then # Find all the module files and filter them out into the core and @@ -2144,11 +1940,15 @@ BuildKernel() { sed -e 's/^lib*/\/lib/' %{?zipsed} $RPM_BUILD_ROOT/k-d.list > ../kernel${Flavour:+-${Flavour}}-modules.list sed -e 's/^lib*/%dir \/lib/' %{?zipsed} $RPM_BUILD_ROOT/module-dirs.list > ../kernel${Flavour:+-${Flavour}}-core.list sed -e 's/^lib*/\/lib/' %{?zipsed} $RPM_BUILD_ROOT/modules.list >> ../kernel${Flavour:+-${Flavour}}-core.list + sed -e 's/^lib*/\/lib/' %{?zipsed} $RPM_BUILD_ROOT/mod-extra.list >> ../kernel${Flavour:+-${Flavour}}-modules-extra.list + sed -e 's/^lib*/\/lib/' %{?zipsed} $RPM_BUILD_ROOT/mod-internal.list >> ../kernel${Flavour:+-${Flavour}}-modules-internal.list # Cleanup rm -f $RPM_BUILD_ROOT/k-d.list rm -f $RPM_BUILD_ROOT/modules.list rm -f $RPM_BUILD_ROOT/module-dirs.list + rm -f $RPM_BUILD_ROOT/mod-extra.list + rm -f $RPM_BUILD_ROOT/mod-internal.list %if %{signmodules} if [ $DoModules -eq 1 ]; then @@ -2236,8 +2036,16 @@ BuildKernel %make_target %kernel_image %{use_vdso} lpae BuildKernel %make_target %kernel_image %{_use_vdso} %endif +%ifnarch noarch i686 +%if !%{with_debug} && !%{with_zfcpdump} && !%{with_up} +# If only building the user space tools, then initialize the build environment +# and some variables so that the various userspace tools can be built. +InitBuildVars +%endif +%endif + %global perf_make \ - make -s EXTRA_CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" %{?cross_opts} -C tools/perf V=1 NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 prefix=%{_prefix} PYTHON=%{__python3} + %{__make} -s EXTRA_CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" %{?cross_opts} -C tools/perf V=1 NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 prefix=%{_prefix} PYTHON=%{__python3} %if %{with_perf} # perf # make sure check-headers.sh is executable @@ -2275,15 +2083,17 @@ pushd tools/thermal/tmon/ %{tools_make} popd pushd tools/iio/ -%{make} +# Needs to be fixed to pick up CFLAGS +%{__make} popd pushd tools/gpio/ -%{make} +# Needs to be fixed to pick up CFLAGS +%{__make} popd %endif %global bpftool_make \ - make EXTRA_CFLAGS="${RPM_OPT_FLAGS}" EXTRA_LDFLAGS="%{__global_ldflags}" DESTDIR=$RPM_BUILD_ROOT V=1 + %{__make} EXTRA_CFLAGS="${RPM_OPT_FLAGS}" EXTRA_LDFLAGS="%{__global_ldflags}" DESTDIR=$RPM_BUILD_ROOT V=1 %if %{with_bpftool} pushd tools/bpf/bpftool %{bpftool_make} @@ -2291,17 +2101,17 @@ popd %endif %if %{with_selftests} -%{make} -s ARCH=$Arch V=1 samples/bpf/ +%{make} -s %{?_smp_mflags} ARCH=$Arch V=1 samples/bpf/ pushd tools/testing/selftests # We need to install here because we need to call make with ARCH set which # doesn't seem possible to do in the install section. -%{make} -s ARCH=$Arch V=1 TARGETS="bpf livepatch net" INSTALL_PATH=%{buildroot}%{_libexecdir}/kselftests install +%{make} -s %{?_smp_mflags} ARCH=$Arch V=1 TARGETS="bpf livepatch net" INSTALL_PATH=%{buildroot}%{_libexecdir}/kselftests install popd %endif %if %{with_doc} # Make the HTML pages. -make PYTHON=/usr/bin/python3 htmldocs || %{doc_build_fail} +%{__make} PYTHON=/usr/bin/python3 htmldocs || %{doc_build_fail} # sometimes non-world-readable files sneak into the kernel source tree chmod -R a=rX Documentation @@ -2357,7 +2167,7 @@ find Documentation -type d | xargs chmod u+w # We don't want to package debuginfo for self-tests and samples but # we have to delete them to avoid an error messages about unpackaged # files. -# Delete the debuginfo for for kernel-devel files +# Delete the debuginfo for kernel-devel files %define __remove_unwanted_dbginfo_install_post \ if [ "%{with_selftests}" -ne "0" ]; then \ rm -rf $RPM_BUILD_ROOT/usr/lib/debug/usr/libexec/ksamples; \ @@ -2402,7 +2212,7 @@ tar -h -f - --exclude=man --exclude='.*' -c Documentation | tar xf - -C $docdir %if %{with_headers} # Install kernel headers -make ARCH=%{hdrarch} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr headers_install +%{__make} ARCH=%{hdrarch} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr headers_install find $RPM_BUILD_ROOT/usr/include \ \( -name .install -o -name .check -o \ @@ -2420,7 +2230,7 @@ mkdir -p $RPM_BUILD_ROOT/usr/tmp-headers for arch in $HDR_ARCH_LIST; do mkdir $RPM_BUILD_ROOT/usr/tmp-headers/arch-${arch} - make ARCH=${arch} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr/tmp-headers/arch-${arch} headers_install + %{__make} ARCH=${arch} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr/tmp-headers/arch-${arch} headers_install done find $RPM_BUILD_ROOT/usr/tmp-headers \ @@ -2506,14 +2316,14 @@ pushd tools/thermal/tmon %{tools_make} INSTALL_ROOT=%{buildroot} install popd pushd tools/iio -make DESTDIR=%{buildroot} install +%{__make} DESTDIR=%{buildroot} install popd pushd tools/gpio -make DESTDIR=%{buildroot} install +%{__make} DESTDIR=%{buildroot} install popd pushd tools/kvm/kvm_stat -make INSTALL_ROOT=%{buildroot} install-tools -make INSTALL_ROOT=%{buildroot} install-man +%{__make} INSTALL_ROOT=%{buildroot} install-tools +%{__make} INSTALL_ROOT=%{buildroot} install-man popd %endif @@ -2521,6 +2331,8 @@ popd pushd tools/bpf/bpftool %{bpftool_make} prefix=%{_prefix} bash_compdir=%{_sysconfdir}/bash_completion.d/ mandir=%{_mandir} install doc-install popd +# man-pages packages this (rhbz #1686954, #1918707) +rm %{buildroot}%{_mandir}/man7/bpf-helpers.7 %endif %if %{with_selftests} @@ -2699,12 +2511,10 @@ fi}\ %define kernel_variant_preun() \ %{expand:%%preun %{?1:%{1}-}core}\ /bin/kernel-install remove %{KVERREL}%{?1:+%{1}} /lib/modules/%{KVERREL}%{?1:+%{1}}/vmlinuz || exit $?\ -%if 0%{!?fedora:1}\ if [ -x %{_sbindir}/weak-modules ]\ then\ %{_sbindir}/weak-modules --remove-kernel %{KVERREL}%{?1:+%{1}} || exit $?\ fi\ -%endif\ %{nil} %kernel_variant_preun @@ -2819,6 +2629,7 @@ fi %{_bindir}/lsgpio %{_bindir}/gpio-hammer %{_bindir}/gpio-event-mon +%{_bindir}/gpio-watch %{_mandir}/man1/kvm_stat* %{_bindir}/kvm_stat @@ -2844,14 +2655,16 @@ fi %{_sysconfdir}/bash_completion.d/bpftool %{_mandir}/man8/bpftool-cgroup.8.gz %{_mandir}/man8/bpftool-gen.8.gz +%{_mandir}/man8/bpftool-iter.8.gz +%{_mandir}/man8/bpftool-link.8.gz %{_mandir}/man8/bpftool-map.8.gz %{_mandir}/man8/bpftool-prog.8.gz %{_mandir}/man8/bpftool-perf.8.gz %{_mandir}/man8/bpftool.8.gz -%{_mandir}/man7/bpf-helpers.7.gz %{_mandir}/man8/bpftool-net.8.gz %{_mandir}/man8/bpftool-feature.8.gz %{_mandir}/man8/bpftool-btf.8.gz +%{_mandir}/man8/bpftool-struct_ops.8.gz %if %{with_debuginfo} %files -f bpftool-debuginfo.list -n bpftool-debuginfo @@ -2913,15 +2726,8 @@ fi /lib/modules/%{KVERREL}%{?3:+%{3}}/source\ /lib/modules/%{KVERREL}%{?3:+%{3}}/updates\ /lib/modules/%{KVERREL}%{?3:+%{3}}/bls.conf\ -%if 0%{!?fedora:1}\ /lib/modules/%{KVERREL}%{?3:+%{3}}/weak-updates\ -%endif\ -%{_datadir}/doc/kernel-keys/%{KVERREL}%{?3:+%{3}}/kernel-signing-ca*.cer\ -%ifarch s390x ppc64le\ -%if 0%{!?4:1}\ -%{_datadir}/doc/kernel-keys/%{KVERREL}%{?3:+%{3}}/%{signing_key_filename} \ -%endif\ -%endif\ +%{_datadir}/doc/kernel-keys/%{KVERREL}%{?3:+%{3}}\ %if %{1}\ /lib/modules/%{KVERREL}%{?3:+%{3}}/vdso\ %endif\ @@ -2930,11 +2736,9 @@ fi %{expand:%%files %{?3:%{3}-}devel}\ %defverify(not mtime)\ /usr/src/kernels/%{KVERREL}%{?3:+%{3}}\ -%{expand:%%files %{?3:%{3}-}modules-extra}\ +%{expand:%%files -f kernel-%{?3:%{3}-}modules-extra.list %{?3:%{3}-}modules-extra}\ %config(noreplace) /etc/modprobe.d/*-blacklist.conf\ -/lib/modules/%{KVERREL}%{?3:+%{3}}/extra\ -%{expand:%%files %{?3:%{3}-}modules-internal}\ -/lib/modules/%{KVERREL}%{?3:+%{3}}/internal\ +%{expand:%%files -f kernel-%{?3:%{3}-}modules-internal.list %{?3:%{3}-}modules-internal}\ %if %{with_debuginfo}\ %ifnarch noarch\ %{expand:%%files -f debuginfo%{?3}.list %{?3:%{3}-}debuginfo}\ @@ -2969,801 +2773,2202 @@ fi # # %changelog -* Thu Mar 18 2021 Jan Drögehoff - 5.10.23-201.fsync -- Linux v5.10.23 futex2 zen - -* Thu Mar 11 2021 Justin M. Forbes - 5.10.23-200 -- Linux v5.10.23 - -* Tue Mar 09 2021 Justin M. Forbes - 5.10.22-200 -- Linux v5.10.22 - -* Sun Mar 07 2021 Justin M. Forbes - 5.10.21-200 -- Linux v5.10.21 - -* Thu Mar 04 2021 Hans de Goede -- Fix broadwell-rt286 sound (rhbz#1933229) - -* Thu Mar 04 2021 Justin M. Forbes - 5.10.20-200 -- Linux v5.10.20 - -* Fri Feb 26 2021 Justin M. Forbes - 5.10.19-200 -- Linux v5.10.19 - -* Thu Feb 25 2021 Justin M. Forbes -- Some i915 fixes for 5.10 (rhbz 1925346) - -* Tue Feb 23 2021 Justin M. Forbes - 5.10.18-200 -- Linux v5.10.18 - -* Thu Feb 18 2021 Hans de Goede -- Fix various QCA bluetooth devices no longer working (rhbz#1916104) - -* Wed Feb 17 2021 Justin M. Forbes - 5.10.17-200 -- Linux v5.10.17 - -* Sat Feb 13 2021 Justin M. Forbes - 5.10.16-200 -- Linux v5.10.16 - -* Wed Feb 10 2021 Justin M. Forbes - 5.10.15-200 -- Linux v5.10.15 -- Fixes CVE-2021-20194 (rhbz 1912683 1926781) -- Fixes rhbz 1916674 - -* Sun Feb 07 2021 Justin M. Forbes - 5.10.14-200 -- Linux v5.10.14 - -* Thu Feb 04 2021 Justin M. Forbes - 5.10.13-200 -- Linux v5.10.13 - -* Mon Feb 01 2021 Justin M. Forbes - 5.10.12-200 -- Linux v5.10.12 - -* Wed Jan 27 08:07:48 CST 2021 Justin M. Forbes - 5.10.11-200 -- Linux v5.10.11 -- Fix URB buffer allocation of pwc driver (rhbz 1918778) -- Fix wacom touchscreens (rhbz 1918486) - -* Sun Jan 24 11:28:41 CST 2021 Justin M. Forbes - 5.10.10-200 -- Linux v5.10.10 -- Fixes CVE-2021-3178 (rhbz 1918179 1918181) - -* Wed Jan 20 2021 Peter Robinson - 5.10.9-201 -- Fix for ARMv7 builder pause issue - -* Tue Jan 19 15:00:17 CST 2021 Justin M. Forbes - 5.10.9-200 -- Linux v5.10.9 - -* Sun Jan 17 13:09:31 CST 2021 Justin M. Forbes - 5.10.8-200 -- Linux v5.10.8 - -* Tue Jan 12 13:41:35 CST 2021 Justin M. Forbes - 5.10.7-200 -- Linux v5.10.7 - -* Mon Jan 11 06:51:13 CST 2021 Justin M. Forbes - 5.10.6-200 -- Linux v5.10.6 rebase -- Fix bluetooth controller initialization (rhbz 1898495) -- Fix CVE-2020-36158 (rhbz 1913348 1913349) - -* Mon Dec 21 07:41:08 CST 2020 Justin M. Forbes - 5.9.16-200 -- Linux v5.9.16 - -* Wed Dec 16 08:06:21 CST 2020 Justin M. Forbes - 5.9.15-200 -- Linux v5.9.15 - -* Fri Dec 11 07:14:10 CST 2020 Justin M. Forbes - 5.9.14-200 -- Linux v5.9.14 -- Fixes CVE-2020-29660 (rhbz 1906522 1906523) -- Fixes CVE-2020-29661 (rhbz 1906525 1906526) - -* Tue Dec 8 08:04:29 CST 2020 Justin M. Forbes - 5.9.13-200 -- Linux v5.9.13 - -* Wed Dec 2 07:55:34 CST 2020 Justin M. Forbes - 5.9.12-200 -- Linux v5.9.12 - -* Tue Nov 24 11:22:38 CST 2020 Justin M. Forbes - 5.9.11-200 -- Linux v5.9.11 - -* Mon Nov 23 09:58:15 CST 2020 Justin M. Forbes - 5.9.10-200 -- Linux v5.9.10 -- Fix CVE-2020-28941 (rhbz 1899985 1899986) -- Fix CVE-2020-4788 (rhbz 1888433 1900437) - -* Thu Nov 19 07:09:26 CST 2020 Justin M. Forbes - 5.9.9-200 -- Linux v5.9.9 -- Enable NANDSIM (rhbz 1898638) - -* Thu Nov 12 2020 Justin M. Forbes -- Fix bluetooth device disconnect issues. (rhbz 1897038) - -* Tue Nov 10 15:34:25 CST 2020 Justin M. Forbes - 5.9.8-200 -- Linux v5.9.8 -- Fixes CVE-2020-8694 (rhbz 1828580 1896525) - -* Tue Nov 10 2020 - 5.9.7-200 -- Linux v5.9.7 rebase -- Fixes CVE-2020-25668 (rhbz 1893287 1893288) -- Fixes CVE-2020-27673 (rhbz 1891110 1891112) -- Fixes CVE-2020-25704 (rhbz 1895951 1895963) - -* Mon Nov 2 10:50:39 CST 2020 Justin M. Forbes - 5.8.18-300 -- Linux v5.8.18 - -* Thu Oct 29 07:55:15 CDT 2020 Justin M. Forbes - 5.8.17-300 -- Linux v5.8.17 -- Fix CVE-2020-27675 (rhbz 1891114 1891115) - -* Wed Oct 28 2020 Peter Robinson -- Fixes for AllWinner wired network issues due to Realtek PHY driver change (rhbz 1889090) - -* Mon Oct 19 07:15:01 CDT 2020 Justin M. Forbes - 5.8.16-300 -- Linux v5.8.16 - -* Fri Oct 16 2020 Hans de Goede -- Fix Micrsoft Surface Go series boot regression (rhbz 1886249) - -* Thu Oct 15 2020 Justin M. Forbes - 5.8.15-301 -- Fix BleedingTooth CVE-2020-12351 CVE-2020-12352 (rhbz 1886521 1888439 1886529 1888440) - -* Wed Oct 14 11:29:34 CDT 2020 Justin M. Forbes - 5.8.15-300 -- Linux v5.8.15 -- Fix CVE-2020-16119 (rhbz 1886374 1888083) - -* Wed Oct 7 07:21:34 CDT 2020 Justin M. Forbes - 5.8.14-300 -- Linux v5.8.14 - -* Wed Oct 7 2020 Peter Robinson -- Fix aarch64 boot crash on BTI capable systems -- Fix boot crash on aarch64 Ampere eMAG systems (rhbz #1874117) - -* Thu Oct 1 12:09:16 CDT 2020 Justin M. Forbes - 5.8.13-300 -- Linux v5.8.13 - -* Mon Sep 28 06:48:48 CDT 2020 Justin M. Forbes - 5.8.12-300 -- Linux v5.8.12 - -* Wed Sep 23 06:58:55 CDT 2020 Justin M. Forbes - 5.8.11-300 -- Linux v5.8.11 -- Fix (rhbz 1821946) - -* Thu Sep 17 08:47:40 CDT 2020 Justin M. Forbes - 5.8.10-300 -- Linux v5.8.10 -- Fix (rhbz 1873720 1876997) - -* Mon Sep 14 2020 Justin M. Forbes - 5.8.9-301 -- Fix error code in bdev_del_part (rhbz 1878858) - -* Mon Sep 14 08:51:55 CDT 2020 Justin M. Forbes - 5.8.9-300 -- Linux v5.8.9 - -* Sat Sep 12 2020 Peter Robinson -- Fix for SDIO speed issue -- Fix for certain mSD cards on Raspberry Pi 4 -- Fix for older brcm sdio WiFi modules - -* Thu Sep 10 2020 Justin M. Forbes -- Fix CVE-2020-25211 (rhbz 1877571 1877572) - -* Wed Sep 9 13:39:47 CDT 2020 Justin M. Forbes - 5.8.8-300 -- Linux v5.8.8 - -* Mon Sep 07 2020 Justin M. Forbes - 5.8.7-300 -- Linux v5.8.7 -- Fix CVE-2020-14386 (rhbz 1875699 1876349) - -* Thu Sep 03 2020 Justin M. Forbes - 5.8.6-301 -- Linux v5.8.6 -- Fix CVE-2020-14385 (rhbz 1874800 1874811) -- Move CONFIG_USB_XHCI_PCI_RENESAS to inline (rhbz 1874300) - -* Thu Aug 27 2020 Justin M. Forbes - 5.8.5-300 -- Linux v5.8.5 - -* Wed Aug 26 2020 Justin M. Forbes - 5.8.4-300 -- Linux v5.8.4 - -* Fri Aug 21 2020 Justin M. Forbes - 5.8.3-300 -- Linux v5.8.3 - -* Wed Aug 19 2020 Justin M. Forbes - 5.8.2-300.rpi1 -- Linux v5.8.2 - -* Wed Aug 12 2020 Justin M. Forbes - 5.8.0-1.1 -- Linux v5.8.1 - -* Mon Aug 03 2020 Fedora Kernel Team [5.8.0-1] -- v5.8 rebase -- Updated changelog for the release based on ac3a0c847296 (Fedora Kernel Team) - -* Sun Aug 02 2020 Fedora Kernel Team [5.8.0-0.rc7.20200802gitac3a0c847296.1] -- ac3a0c847296 rebase -- Updated changelog for the release based on 7dc6fd0f3b84 (Fedora Kernel Team) - -* Sat Aug 01 2020 Fedora Kernel Team [5.8.0-0.rc7.20200801git7dc6fd0f3b84.1] -- 7dc6fd0f3b84 rebase -- Updated changelog for the release based on 417385c47ef7 (Fedora Kernel Team) +* Sat Mar 20 2021 Jan Drögehoff - 5.11.7-201.fsync +- Linux v5.11.7 futex2 zen + +* Wed Mar 17 2021 Justin M. Forbes [5.11.7-200] +- This is a released kernel branch (Justin M. Forbes) + +* Wed Mar 17 2021 Justin M. Forbes [5.11.7-9] +- Disable weak-modules again rhbz 1828455 (Justin M. Forbes) +- More config updates for gcc-plugin turn off (Justin M. Forbes) +- fedora: the PCH_CAN driver is x86-32 only (Peter Robinson) +- common: disable legacy CAN device support (Peter Robinson) +- common: Enable Microchip MCP251x/MCP251xFD CAN controllers (Peter Robinson) +- common: Bosch MCAN support for Intel Elkhart Lake (Peter Robinson) +- common: enable CAN_PEAK_PCIEFD PCI-E driver (Peter Robinson) +- common: disable CAN_PEAK_PCIEC PCAN-ExpressCard (Peter Robinson) +- common: enable common CAN layer 2 protocols (Peter Robinson) +- ark: disable CAN_LEDS option (Peter Robinson) + +* Thu Mar 11 2021 Justin M. Forbes [5.11.6-8] +- Forgot to turn this back on when disabling gcc plugins (Justin M. Forbes) +- Fedora: Turn on SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC option (Hans de Goede) +- common: enable RTC_SYSTOHC to supplement update_persistent_clock64 (Peter Robinson) +- Disable structleak gcc-plugins until a solution is upstream (Justin M. Forbes) +- mmc: sdhci-iproc: Add ACPI bindings for the rpi (Jeremy Linton) +- ACPI: platform: Hide ACPI_PLATFORM_PROFILE option (Maximilian Luz) +- platform/x86: ideapad-laptop: DYTC Platform profile support (Jiaxun Yang) +- platform/x86: thinkpad_acpi: Replace ifdef CONFIG_ACPI_PLATFORM_PROFILE with depends on (Hans de Goede) +- platform/x86: thinkpad_acpi: Add platform profile support (Mark Pearson) +- platform/x86: thinkpad_acpi: fixed warning and incorporated review comments (Nitin Joshi) +- platform/x86: thinkpad_acpi: Don't register keyboard_lang unnecessarily (Hans de Goede) +- platform/x86: thinkpad_acpi: set keyboard language (Nitin Joshi) +- ACPI: platform-profile: Fix possible deadlock in platform_profile_remove() (Hans de Goede) +- ACPI: platform-profile: Introduce object pointers to callbacks (Jiaxun Yang) +- ACPI: platform-profile: Drop const qualifier for cur_profile (Jiaxun Yang) +- ACPI: platform: Add platform profile support (Mark Pearson) +- Documentation: Add documentation for new platform_profile sysfs attribute (Mark Pearson) + +* Tue Mar 09 2021 Justin M. Forbes [5.11.5-7] +- Turn on SND_SOC_INTEL_SOUNDWIRE_SOF_MACH for Fedora again (Justin M. Forbes) + +* Sun Mar 07 2021 Justin M. Forbes [5.11.4-6] +- PCI: Add MCFG quirks for Tegra194 host controllers (Vidya Sagar) +- Revert "PCI: Add MCFG quirks for Tegra194 host controllers" (Peter Robinson) +- forgot to push this one earlier (Justin M. Forbes) +- Reference the patch as version.patchlevel to more easily see diffs between stable releases (Justin M. Forbes) + +* Thu Mar 04 2021 Justin M. Forbes [5.11.3-5] +- arm64: dts: rockchip: disable USB type-c DisplayPort (Jian-Hong Pan) +- Build PHY_TEGRA194_P2U and PCIE_TEGRA194_HOST in, not as modules (Peter Robinson) +- PCI: Add MCFG quirks for Tegra194 host controllers (Peter Robinson) +- brcm: rpi4: fix usb numeration (Peter Robinson) +- Config updates (Justin M. Forbes) +- drm/i915/gt: Correct surface base address for renderclear (Chris Wilson) +- drm/i915/gt: Flush before changing register state (Chris Wilson) +- drm/i915/gt: One more flush for Baytrail clear residuals (Chris Wilson) +- MARKER needs SUBLEVEL for stable, I need to think of a better longterm solution (Justin M. Forbes) +- Config updates for 5.11.1 (Justin M. Forbes) +- Set CONFIG_DEBUG_HIGHMEM as off for non debug kernels (Justin M. Forbes) +- CONFIG_DEBUG_HIGHMEM should be debug only (Justin M. Forbes) +- Added redhat/fedora-dist-git-test.sh for a quick and easy script to test changes (Justin M. Forbes) +- Changes for building stable Fedora (Justin M. Forbes) +- Clean up redhat/configs/pending-common/generic/CONFIG_USB_RTL8153_ECM as it messes with scripts (Justin M. Forbes) +- Bluetooth: btusb: Some Qualcomm Bluetooth adapters stop working (Hui Wang) +- process_configs.sh: fix find/xargs data flow (Ondrej Mosnacek) +- Fedora config update (Justin M. Forbes) +- fedora: minor arm sound config updates (Peter Robinson) +- Fix trailing white space in redhat/configs/fedora/generic/CONFIG_SND_INTEL_BYT_PREFER_SOF (Justin M. Forbes) +- Add a redhat/rebase-notes.txt file (Hans de Goede) +- Turn on SND_INTEL_BYT_PREFER_SOF for Fedora (Hans de Goede) +- ALSA: hda: intel-dsp-config: Add SND_INTEL_BYT_PREFER_SOF Kconfig option (Hans de Goede) [1924101] +- CI: Drop MR ID from the name variable (Veronika Kabatova) +- redhat: add DUP and kpatch certificates to system trusted keys for RHEL build (Herton R. Krzesinski) +- The comments in CONFIG_USB_RTL8153_ECM actually turn off CONFIG_USB_RTL8152 (Justin M. Forbes) +- Update CKI pipeline project (Veronika Kabatova) +- Turn off additional KASAN options for Fedora (Justin M. Forbes) +- Rename the master branch to rawhide for Fedora (Justin M. Forbes) +- Makefile targets for packit integration (Ben Crocker) +- Turn off KASAN for rawhide debug builds (Justin M. Forbes) +- New configs in arch/arm64 (Justin Forbes) +- Remove deprecated Intel MIC config options (Peter Robinson) +- redhat: replace inline awk script with genlog.py call (Herton R. Krzesinski) +- redhat: add genlog.py script (Herton R. Krzesinski) +- kernel.spec.template - fix use_vdso usage (Ben Crocker) +- Turn off vdso_install for ppc (Justin M. Forbes) +- Remove bpf-helpers.7 from bpftool package (Jiri Olsa) +- New configs in lib/Kconfig.debug (Fedora Kernel Team) +- Turn off CONFIG_VIRTIO_CONSOLE for s390x zfcpdump (Justin M. Forbes) +- New configs in drivers/clk (Justin M. Forbes) +- Keep VIRTIO_CONSOLE on s390x available. (Jakub Čajka) +- New configs in lib/Kconfig.debug (Jeremy Cline) +- Fedora 5.11 config updates part 4 (Justin M. Forbes) +- Fedora 5.11 config updates part 3 (Justin M. Forbes) +- Fedora 5.11 config updates part 2 (Justin M. Forbes) +- Update internal (test) module list from RHEL-8 (Joe Lawrence) [1915073] +- Fix USB_XHCI_PCI regression (Justin M. Forbes) +- fedora: fixes for ARMv7 build issue by disabling HIGHPTE (Peter Robinson) +- all: s390x: Increase CONFIG_PCI_NR_FUNCTIONS to 512 (#1888735) (Dan Horák) +- Fedora 5.11 configs pt 1 (Justin M. Forbes) +- redhat: avoid conflict with mod-blacklist.sh and released_kernel defined (Herton R. Krzesinski) +- redhat: handle certificate files conditionally as done for src.rpm (Herton R. Krzesinski) +- specfile: add {?_smp_mflags} to "make headers_install" in tools/testing/selftests (Denys Vlasenko) +- specfile: add {?_smp_mflags} to "make samples/bpf/" (Denys Vlasenko) +- Run MR testing in CKI pipeline (Veronika Kabatova) +- Reword comment (Nicolas Chauvet) +- Add with_cross_arm conditional (Nicolas Chauvet) +- Redefines __strip if with_cross (Nicolas Chauvet) +- fedora: only enable ACPI_CONFIGFS, ACPI_CUSTOM_METHOD in debug kernels (Peter Robinson) +- fedora: User the same EFI_CUSTOM_SSDT_OVERLAYS as ARK (Peter Robinson) +- all: all arches/kernels enable the same DMI options (Peter Robinson) +- all: move SENSORS_ACPI_POWER to common/generic (Peter Robinson) +- fedora: PCIE_HISI_ERR is already in common (Peter Robinson) +- all: all ACPI platforms enable ATA_ACPI so move it to common (Peter Robinson) +- all: x86: move shared x86 acpi config options to generic (Peter Robinson) +- All: x86: Move ACPI_VIDEO to common/x86 (Peter Robinson) +- All: x86: Enable ACPI_DPTF (Intel DPTF) (Peter Robinson) +- All: enable ACPI_BGRT for all ACPI platforms. (Peter Robinson) +- All: Only build ACPI_EC_DEBUGFS for debug kernels (Peter Robinson) +- All: Disable Intel Classmate PC ACPI_CMPC option (Peter Robinson) +- cleanup: ACPI_PROCFS_POWER was removed upstream (Peter Robinson) +- All: ACPI: De-dupe the ACPI options that are the same across ark/fedora on x86/arm (Peter Robinson) +- Enable the vkms module in Fedora (Jeremy Cline) +- Fedora: arm updates for 5.11 and general cross Fedora cleanups (Peter Robinson) +- Add gcc-c++ to BuildRequires (Justin M. Forbes) +- Update CONFIG_KASAN_HW_TAGS (Justin M. Forbes) +- fedora: arm: move generic power off/reset to all arm (Peter Robinson) +- fedora: ARMv7: build in DEVFREQ_GOV_SIMPLE_ONDEMAND until I work out why it's changed (Peter Robinson) +- fedora: cleanup joystick_adc (Peter Robinson) +- fedora: update some display options (Peter Robinson) +- fedora: arm: enable TI PRU options (Peter Robinson) +- fedora: arm: minor exynos plaform updates (Peter Robinson) +- arm: SoC: disable Toshiba Visconti SoC (Peter Robinson) +- common: disable ARCH_BCM4908 (NFC) (Peter Robinson) +- fedora: minor arm config updates (Peter Robinson) +- fedora: enable Tegra 234 SoC (Peter Robinson) +- fedora: arm: enable new Hikey 3xx options (Peter Robinson) +- Fedora: USB updates (Peter Robinson) +- fedora: enable the GNSS receiver subsystem (Peter Robinson) +- Remove POWER_AVS as no longer upstream (Peter Robinson) +- Cleanup RESET_RASPBERRYPI (Peter Robinson) +- Cleanup GPIO_CDEV_V1 options. (Peter Robinson) +- fedora: arm crypto updates (Peter Robinson) +- CONFIG_KASAN_HW_TAGS for aarch64 (Justin M. Forbes) +- Fedora: cleanup PCMCIA configs, move to x86 (Peter Robinson) +- New configs in drivers/rtc (Fedora Kernel Team) +- redhat/configs: Enable CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL (Josh Poimboeuf) [1856176] +- redhat/configs: Enable CONFIG_GCC_PLUGIN_STRUCTLEAK (Josh Poimboeuf) [1856176] +- redhat/configs: Enable CONFIG_GCC_PLUGINS on ARK (Josh Poimboeuf) [1856176] +- redhat/configs: Enable CONFIG_KASAN on Fedora (Josh Poimboeuf) [1856176] +- New configs in init/Kconfig (Fedora Kernel Team) +- build_configs.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- genspec.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- mod-blacklist.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- Enable Speakup accessibility driver (Justin M. Forbes) +- New configs in init/Kconfig (Fedora Kernel Team) +- Fix fedora config mismatch due to dep changes (Justin M. Forbes) +- New configs in drivers/crypto (Jeremy Cline) +- Remove duplicate ENERGY_MODEL configs (Peter Robinson) +- This is selected by PCIE_QCOM so must match (Justin M. Forbes) +- drop unused BACKLIGHT_GENERIC (Peter Robinson) +- Remove cp instruction already handled in instruction below. (Paulo E. Castro) +- Add all the dependencies gleaned from running `make prepare` on a bloated devel kernel. (Paulo E. Castro) +- Add tools to path mangling script. (Paulo E. Castro) +- Remove duplicate cp statement which is also not specific to x86. (Paulo E. Castro) +- Correct orc_types failure whilst running `make prepare` https://bugzilla.redhat.com/show_bug.cgi?id=1882854 (Paulo E. Castro) +- redhat: ark: enable CONFIG_IKHEADERS (Jiri Olsa) +- Add missing '$' sign to (GIT) in redhat/Makefile (Augusto Caringi) +- Remove filterdiff and use native git instead (Don Zickus) +- New configs in net/sched (Justin M. Forbes) +- New configs in drivers/mfd (CKI@GitLab) +- New configs in drivers/mfd (Fedora Kernel Team) +- New configs in drivers/firmware (Fedora Kernel Team) +- Temporarily backout parallel xz script (Justin M. Forbes) +- redhat: explicitly disable CONFIG_IMA_APPRAISE_SIGNED_INIT (Bruno Meneguele) +- redhat: enable CONFIG_EVM_LOAD_X509 on ARK (Bruno Meneguele) +- redhat: enable CONFIG_EVM_ATTR_FSUUID on ARK (Bruno Meneguele) +- redhat: enable CONFIG_EVM in all arches and flavors (Bruno Meneguele) +- redhat: enable CONFIG_IMA_LOAD_X509 on ARK (Bruno Meneguele) +- redhat: set CONFIG_IMA_DEFAULT_HASH to SHA256 (Bruno Meneguele) +- redhat: enable CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT (Bruno Meneguele) +- redhat: enable CONFIG_IMA_READ_POLICY on ARK (Bruno Meneguele) +- redhat: set default IMA template for all ARK arches (Bruno Meneguele) +- redhat: enable CONFIG_IMA_DEFAULT_HASH_SHA256 for all flavors (Bruno Meneguele) +- redhat: disable CONFIG_IMA_DEFAULT_HASH_SHA1 (Bruno Meneguele) +- redhat: enable CONFIG_IMA_ARCH_POLICY for ppc and x86 (Bruno Meneguele) +- redhat: enable CONFIG_IMA_APPRAISE_MODSIG (Bruno Meneguele) +- redhat: enable CONFIG_IMA_APPRAISE_BOOTPARAM (Bruno Meneguele) +- redhat: enable CONFIG_IMA_APPRAISE (Bruno Meneguele) +- redhat: enable CONFIG_INTEGRITY for aarch64 (Bruno Meneguele) +- kernel: Update some missing KASAN/KCSAN options (Jeremy Linton) +- kernel: Enable coresight on aarch64 (Jeremy Linton) +- Update CONFIG_INET6_ESPINTCP (Justin Forbes) +- New configs in net/ipv6 (Justin M. Forbes) +- fedora: move CONFIG_RTC_NVMEM options from ark to common (Peter Robinson) +- configs: Enable CONFIG_DEBUG_INFO_BTF (Don Zickus) +- fedora: some minor arm audio config tweaks (Peter Robinson) +- Ship xpad with default modules on Fedora and RHEL (Bastien Nocera) +- Fedora: Only enable legacy serial/game port joysticks on x86 (Peter Robinson) +- Fedora: Enable the options required for the Librem 5 Phone (Peter Robinson) +- Fedora config update (Justin M. Forbes) +- Fedora config change because CONFIG_FSL_DPAA2_ETH now selects CONFIG_FSL_XGMAC_MDIO (Justin M. Forbes) +- redhat: generic enable CONFIG_INET_MPTCP_DIAG (Davide Caratti) +- Fedora config update (Justin M. Forbes) +- Enable NANDSIM for Fedora (Justin M. Forbes) +- Re-enable CONFIG_ACPI_TABLE_UPGRADE for Fedora since upstream disables this if secureboot is active (Justin M. Forbes) +- Ath11k related config updates (Justin M. Forbes) +- Fedora config updates for ath11k (Justin M. Forbes) +- Turn on ATH11K for Fedora (Justin M. Forbes) +- redhat: enable CONFIG_INTEL_IOMMU_SVM (Jerry Snitselaar) +- More Fedora config fixes (Justin M. Forbes) +- Fedora 5.10 config updates (Justin M. Forbes) +- Fedora 5.10 configs round 1 (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Allow kernel-tools to build without selftests (Don Zickus) +- Allow building of kernel-tools standalone (Don Zickus) +- redhat: ark: disable CONFIG_NET_ACT_CTINFO (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_TEQL (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_SFB (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_QFQ (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_PLUG (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_PIE (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_MULTIQ (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_HHF (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_DSMARK (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_DRR (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_CODEL (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_CHOKE (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_CBQ (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_ATM (Davide Caratti) +- redhat: ark: disable CONFIG_NET_EMATCH and sub-targets (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_TCINDEX (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_RSVP6 (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_RSVP (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_ROUTE4 (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_BASIC (Davide Caratti) +- redhat: ark: disable CONFIG_NET_ACT_SKBMOD (Davide Caratti) +- redhat: ark: disable CONFIG_NET_ACT_SIMP (Davide Caratti) +- redhat: ark: disable CONFIG_NET_ACT_NAT (Davide Caratti) +- arm64/defconfig: Enable CONFIG_KEXEC_FILE (Bhupesh Sharma) [1821565] +- redhat/configs: Cleanup CONFIG_CRYPTO_SHA512 (Prarit Bhargava) +- New configs in drivers/mfd (Fedora Kernel Team) +- Fix LTO issues with kernel-tools (Don Zickus) +- Point pathfix to the new location for gen_compile_commands.py (Justin M. Forbes) +- configs: Disable CONFIG_SECURITY_SELINUX_DISABLE (Ondrej Mosnacek) +- [Automatic] Handle config dependency changes (Don Zickus) +- configs/iommu: Add config comment to empty CONFIG_SUN50I_IOMMU file (Jerry Snitselaar) +- New configs in kernel/trace (Fedora Kernel Team) +- Fix Fedora config locations (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- configs: enable CONFIG_CRYPTO_CTS=y so cts(cbc(aes)) is available in FIPS mode (Vladis Dronov) [1855161] +- Partial revert: Add master merge check (Don Zickus) +- Update Maintainers doc to reflect workflow changes (Don Zickus) +- WIP: redhat/docs: Update documentation for single branch workflow (Prarit Bhargava) +- Add CONFIG_ARM64_MTE which is not picked up by the config scripts for some reason (Justin M. Forbes) +- Disable Speakup synth DECEXT (Justin M. Forbes) +- Enable Speakup for Fedora since it is out of staging (Justin M. Forbes) +- Modify patchlist changelog output (Don Zickus) +- process_configs.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- generate_all_configs.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- redhat/self-test: Initial commit (Ben Crocker) +- drm/sun4i: sun6i_mipi_dsi: fix horizontal timing calculation (Icenowy Zheng) +- drm: panel: add Xingbangda XBD599 panel (Icenowy Zheng) +- dt-bindings: panel: add binding for Xingbangda XBD599 panel (Icenowy Zheng) +- ARM: fix __get_user_check() in case uaccess_* calls are not inlined (Masahiro Yamada) +- mm/kmemleak: skip late_init if not skip disable (Murphy Zhou) +- KEYS: Make use of platform keyring for module signature verify (Robert Holmes) +- Drop that for now (Laura Abbott) +- Input: rmi4 - remove the need for artificial IRQ in case of HID (Benjamin Tissoires) +- ARM: tegra: usb no reset (Peter Robinson) +- arm: make CONFIG_HIGHPTE optional without CONFIG_EXPERT (Jon Masters) +- Add option of 13 for FORCE_MAX_ZONEORDER (Peter Robinson) +- s390: Lock down the kernel when the IPL secure flag is set (Jeremy Cline) +- efi: Lock down the kernel if booted in secure boot mode (David Howells) +- efi: Add an EFI_SECURE_BOOT flag to indicate secure boot mode (David Howells) +- security: lockdown: expose a hook to lock the kernel down (Jeremy Cline) +- Make get_cert_list() use efi_status_to_str() to print error messages. (Peter Jones) +- Add efi_status_to_str() and rework efi_status_to_err(). (Peter Jones) +- arm: aarch64: Drop the EXPERT setting from ARM64_FORCE_52BIT (Jeremy Cline) +- iommu/arm-smmu: workaround DMA mode issues (Laura Abbott) +- ipmi: do not configure ipmi for HPE m400 (Laura Abbott) [1670017] +- scsi: smartpqi: add inspur advantech ids (Don Brace) +- ahci: thunderx2: Fix for errata that affects stop engine (Robert Richter) +- Vulcan: AHCI PCI bar fix for Broadcom Vulcan early silicon (Robert Richter) +- kdump: fix a grammar issue in a kernel message (Dave Young) [1507353] +- kdump: add support for crashkernel=auto (Jeremy Cline) +- kdump: round up the total memory size to 128M for crashkernel reservation (Dave Young) [1507353] +- aarch64: acpi scan: Fix regression related to X-Gene UARTs (Mark Salter) [1519554] +- ACPI / irq: Workaround firmware issue on X-Gene based m400 (Mark Salter) [1519554] +- ACPI: APEI: arm64: Ignore broken HPE moonshot APEI support (Al Stone) [1518076] +- Stop merging ark-patches for release (Don Zickus) +- Fix path location for ark-update-configs.sh (Don Zickus) +- Combine Red Hat patches into single patch (Don Zickus) +- New configs in drivers/misc (Jeremy Cline) +- New configs in drivers/net/wireless (Justin M. Forbes) +- New configs in drivers/phy (Fedora Kernel Team) +- New configs in drivers/tty (Fedora Kernel Team) +- Set SquashFS decompression options for all flavors to match RHEL (Bohdan Khomutskyi) +- configs: Enable CONFIG_ENERGY_MODEL (Phil Auld) +- New configs in drivers/pinctrl (Fedora Kernel Team) +- Update CONFIG_THERMAL_NETLINK (Justin Forbes) +- Separate merge-upstream and release stages (Don Zickus) +- Re-enable CONFIG_IR_SERIAL on Fedora (Prarit Bhargava) +- Create Patchlist.changelog file (Don Zickus) +- Filter out upstream commits from changelog (Don Zickus) +- Merge Upstream script fixes (Don Zickus) +- kernel.spec: Remove kernel-keys directory on rpm erase (Prarit Bhargava) +- Add mlx5_vdpa to module filter for Fedora (Justin M. Forbes) +- Add python3-sphinx_rtd_theme buildreq for docs (Justin M. Forbes) +- redhat/configs/process_configs.sh: Remove *.config.orig files (Prarit Bhargava) +- redhat/configs/process_configs.sh: Add process_configs_known_broken flag (Prarit Bhargava) +- redhat/Makefile: Fix '*-configs' targets (Prarit Bhargava) +- dist-merge-upstream: Checkout known branch for ci scripts (Don Zickus) +- kernel.spec: don't override upstream compiler flags for ppc64le (Dan Horák) +- Fedora config updates (Justin M. Forbes) +- Fedora confi gupdate (Justin M. Forbes) +- mod-sign.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- Swap how ark-latest is built (Don Zickus) +- Add extra version bump to os-build branch (Don Zickus) +- dist-release: Avoid needless version bump. (Don Zickus) +- Add dist-fedora-release target (Don Zickus) +- Remove redundant code in dist-release (Don Zickus) +- Makefile.common rename TAG to _TAG (Don Zickus) +- Fedora config change (Justin M. Forbes) +- Fedora filter update (Justin M. Forbes) +- Config update for Fedora (Justin M. Forbes) +- enable PROTECTED_VIRTUALIZATION_GUEST for all s390x kernels (Dan Horák) +- redhat: ark: enable CONFIG_NET_SCH_TAPRIO (Davide Caratti) +- redhat: ark: enable CONFIG_NET_SCH_ETF (Davide Caratti) +- More Fedora config updates (Justin M. Forbes) +- New config deps (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- First half of config updates for Fedora (Justin M. Forbes) +- Updates for Fedora arm architectures for the 5.9 window (Peter Robinson) +- Merge 5.9 config changes from Peter Robinson (Justin M. Forbes) +- Add config options that only show up when we prep on arm (Justin M. Forbes) +- Config updates for Fedora (Justin M. Forbes) +- fedora: enable enery model (Peter Robinson) +- Use the configs/generic config for SND_HDA_INTEL everywhere (Peter Robinson) +- Enable ZSTD compression algorithm on all kernels (Peter Robinson) +- Enable ARM_SMCCC_SOC_ID on all aarch64 kernels (Peter Robinson) +- iio: enable LTR-559 light and proximity sensor (Peter Robinson) +- iio: chemical: enable some popular chemical and partical sensors (Peter Robinson) +- More mismatches (Justin M. Forbes) +- Fedora config change due to deps (Justin M. Forbes) +- CONFIG_SND_SOC_MAX98390 is now selected by SND_SOC_INTEL_DA7219_MAX98357A_GENERIC (Justin M. Forbes) +- Config change required for build part 2 (Justin M. Forbes) +- Config change required for build (Justin M. Forbes) +- Fedora config update (Justin M. Forbes) +- Add ability to sync upstream through Makefile (Don Zickus) +- Add master merge check (Don Zickus) +- Replace hardcoded values 'os-build' and project id with variables (Don Zickus) +- redhat/Makefile.common: Fix MARKER (Prarit Bhargava) +- gitattributes: Remove unnecesary export restrictions (Prarit Bhargava) +- Add new certs for dual signing with boothole (Justin M. Forbes) +- Update secureboot signing for dual keys (Justin M. Forbes) +- fedora: enable LEDS_SGM3140 for arm configs (Peter Robinson) +- Enable CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG (Justin M. Forbes) +- redhat/configs: Fix common CONFIGs (Prarit Bhargava) +- redhat/configs: General CONFIG cleanups (Prarit Bhargava) +- redhat/configs: Update & generalize evaluate_configs (Prarit Bhargava) +- fedora: arm: Update some meson config options (Peter Robinson) +- redhat/docs: Add Fedora RPM tagging date (Prarit Bhargava) +- Update config for renamed panel driver. (Peter Robinson) +- Enable SERIAL_SC16IS7XX for SPI interfaces (Peter Robinson) +- s390x-zfcpdump: Handle missing Module.symvers file (Don Zickus) +- Fedora config updates (Justin M. Forbes) +- redhat/configs: Add .tmp files to .gitignore (Prarit Bhargava) +- disable uncommon TCP congestion control algorithms (Davide Caratti) +- Add new bpf man pages (Justin M. Forbes) +- Add default option for CONFIG_ARM64_BTI_KERNEL to pending-common so that eln kernels build (Justin M. Forbes) +- redhat/Makefile: Add fedora-configs and rh-configs make targets (Prarit Bhargava) +- redhat/configs: Use SHA512 for module signing (Prarit Bhargava) +- genspec.sh: 'touch' empty Patchlist file for single tarball (Don Zickus) +- Fedora config update for rc1 (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- redhat/Makefile.common: fix RPMKSUBLEVEL condition (Ondrej Mosnacek) +- redhat/Makefile: silence KABI tar output (Ondrej Mosnacek) +- One more Fedora config update (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fix PATCHLEVEL for merge window (Justin M. Forbes) +- Change ark CONFIG_COMMON_CLK to yes, it is selected already by other options (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- More module filtering for Fedora (Justin M. Forbes) +- Update filters for rnbd in Fedora (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fix up module filtering for 5.8 (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- More Fedora config work (Justin M. Forbes) +- RTW88BE and CE have been extracted to their own modules (Justin M. Forbes) +- Set CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK for Fedora (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Arm64 Use Branch Target Identification for kernel (Justin M. Forbes) +- Change value of CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fix configs for Fedora (Justin M. Forbes) +- Add zero-commit to format-patch options (Justin M. Forbes) +- Copy Makefile.rhelver as a source file rather than a patch (Jeremy Cline) +- Move the sed to clear the patch templating outside of conditionals (Justin M. Forbes) +- Match template format in kernel.spec.template (Justin M. Forbes) +- Break out the Patches into individual files for dist-git (Justin M. Forbes) +- Break the Red Hat patch into individual commits (Jeremy Cline) +- Fix update_scripts.sh unselective pattern sub (David Howells) +- Add cec to the filter overrides (Justin M. Forbes) +- Add overrides to filter-modules.sh (Justin M. Forbes) +- redhat/configs: Enable CONFIG_SMC91X and disable CONFIG_SMC911X (Prarit Bhargava) [1722136] +- Include bpftool-struct_ops man page in the bpftool package (Jeremy Cline) +- Add sharedbuffer_configuration.py to the pathfix.py script (Jeremy Cline) +- Use __make macro instead of make (Tom Stellard) +- Sign off generated configuration patches (Jeremy Cline) +- Drop the static path configuration for the Sphinx docs (Jeremy Cline) +- redhat: Add dummy-module kernel module (Prarit Bhargava) +- redhat: enable CONFIG_LWTUNNEL_BPF (Jiri Benc) +- Remove typoed config file aarch64CONFIG_SM_GCC_8150 (Justin M. Forbes) +- Add Documentation back to kernel-devel as it has Kconfig now (Justin M. Forbes) +- Copy distro files rather than moving them (Jeremy Cline) +- kernel.spec: fix 'make scripts' for kernel-devel package (Brian Masney) +- Makefile: correct help text for dist-cross--rpms (Brian Masney) +- redhat/Makefile: Fix RHEL8 python warning (Prarit Bhargava) +- redhat: Change Makefile target names to dist- (Prarit Bhargava) +- configs: Disable Serial IR driver (Prarit Bhargava) +- Fix "multiple files for package kernel-tools" (Pablo Greco) +- Introduce a Sphinx documentation project (Jeremy Cline) +- Build ARK against ELN (Don Zickus) +- Drop the requirement to have a remote called linus (Jeremy Cline) +- Rename 'internal' branch to 'os-build' (Don Zickus) +- Only include open merge requests with "Include in Releases" label (Jeremy Cline) +- Package gpio-watch in kernel-tools (Jeremy Cline) +- Exit non-zero if the tag already exists for a release (Jeremy Cline) +- Adjust the changelog update script to not push anything (Jeremy Cline) +- Drop --target noarch from the rh-rpms make target (Jeremy Cline) +- Add a script to generate release tags and branches (Jeremy Cline) +- Set CONFIG_VDPA for fedora (Justin M. Forbes) +- Add a README to the dist-git repository (Jeremy Cline) +- Provide defaults in ark-rebase-patches.sh (Jeremy Cline) +- Default ark-rebase-patches.sh to not report issues (Jeremy Cline) +- Drop DIST from release commits and tags (Jeremy Cline) +- Place the buildid before the dist in the release (Jeremy Cline) +- Sync up with Fedora arm configuration prior to merging (Jeremy Cline) +- Disable CONFIG_PROTECTED_VIRTUALIZATION_GUEST for zfcpdump (Jeremy Cline) +- Add RHMAINTAINERS file and supporting conf (Don Zickus) +- Add a script to test if all commits are signed off (Jeremy Cline) +- Fix make rh-configs-arch (Don Zickus) +- Drop RH_FEDORA in favor of the now-merged RHEL_DIFFERENCES (Jeremy Cline) +- Sync up Fedora configs from the first week of the merge window (Jeremy Cline) +- Migrate blacklisting floppy.ko to mod-blacklist.sh (Don Zickus) +- kernel packaging: Combine mod-blacklist.sh and mod-extra-blacklist.sh (Don Zickus) +- kernel packaging: Fix extra namespace collision (Don Zickus) +- mod-extra.sh: Rename to mod-blacklist.sh (Don Zickus) +- mod-extra.sh: Make file generic (Don Zickus) +- Fix a painfully obvious YAML syntax error in .gitlab-ci.yml (Jeremy Cline) +- Add in armv7hl kernel header support (Don Zickus) +- Disable all BuildKernel commands when only building headers (Don Zickus) +- Drop any gitlab-ci patches from ark-patches (Jeremy Cline) +- Build the srpm for internal branch CI using the vanilla tree (Jeremy Cline) +- Pull in the latest ARM configurations for Fedora (Jeremy Cline) +- Fix xz memory usage issue (Neil Horman) +- Use ark-latest instead of master for update script (Jeremy Cline) +- Move the CI jobs back into the ARK repository (Jeremy Cline) +- Sync up ARK's Fedora config with the dist-git repository (Jeremy Cline) +- Pull in the latest configuration changes from Fedora (Jeremy Cline) +- configs: enable CONFIG_NET_SCH_CBS (Marcelo Ricardo Leitner) +- Drop configuration options in fedora/ that no longer exist (Jeremy Cline) +- Set RH_FEDORA for ARK and Fedora (Jeremy Cline) +- redhat/kernel.spec: Include the release in the kernel COPYING file (Jeremy Cline) +- redhat/kernel.spec: add scripts/jobserver-exec to py3_shbang_opts list (Jeremy Cline) +- redhat/kernel.spec: package bpftool-gen man page (Jeremy Cline) +- distgit-changelog: handle multiple y-stream BZ numbers (Bruno Meneguele) +- redhat/kernel.spec: remove all inline comments (Bruno Meneguele) +- redhat/genspec: awk unknown whitespace regex pattern (Bruno Meneguele) +- Improve the readability of gen_config_patches.sh (Jeremy Cline) +- Fix some awkward edge cases in gen_config_patches.sh (Jeremy Cline) +- Update the CI environment to use Fedora 31 (Jeremy Cline) +- redhat: drop whitespace from with_gcov macro (Jan Stancek) +- configs: Enable CONFIG_KEY_DH_OPERATIONS on ARK (Ondrej Mosnacek) +- configs: Adjust CONFIG_MPLS_ROUTING and CONFIG_MPLS_IPTUNNEL (Laura Abbott) +- New configs in lib/crypto (Jeremy Cline) +- New configs in drivers/char (Jeremy Cline) +- Turn on BLAKE2B for Fedora (Jeremy Cline) +- kernel.spec.template: Clean up stray *.h.s files (Laura Abbott) +- Build the SRPM in the CI job (Jeremy Cline) +- New configs in net/tls (Jeremy Cline) +- New configs in net/tipc (Jeremy Cline) +- New configs in lib/kunit (Jeremy Cline) +- Fix up released_kernel case (Laura Abbott) +- New configs in lib/Kconfig.debug (Jeremy Cline) +- New configs in drivers/ptp (Jeremy Cline) +- New configs in drivers/nvme (Jeremy Cline) +- New configs in drivers/net/phy (Jeremy Cline) +- New configs in arch/arm64 (Jeremy Cline) +- New configs in drivers/crypto (Jeremy Cline) +- New configs in crypto/Kconfig (Jeremy Cline) +- Add label so the Gitlab to email bridge ignores the changelog (Jeremy Cline) +- Temporarily switch TUNE_DEFAULT to y (Jeremy Cline) +- Run config test for merge requests and internal (Jeremy Cline) +- Add missing licensedir line (Laura Abbott) +- redhat/scripts: Remove redhat/scripts/rh_get_maintainer.pl (Prarit Bhargava) +- configs: Take CONFIG_DEFAULT_MMAP_MIN_ADDR from Fedra (Laura Abbott) +- configs: Turn off ISDN (Laura Abbott) +- Add a script to generate configuration patches (Laura Abbott) +- Introduce rh-configs-commit (Laura Abbott) +- kernel-packaging: Remove kernel files from kernel-modules-extra package (Prarit Bhargava) +- configs: Enable CONFIG_DEBUG_WX (Laura Abbott) +- configs: Disable wireless USB (Laura Abbott) +- Clean up some temporary config files (Laura Abbott) +- configs: New config in drivers/gpu for v5.4-rc1 (Jeremy Cline) +- configs: New config in arch/powerpc for v5.4-rc1 (Jeremy Cline) +- configs: New config in crypto for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/usb for v5.4-rc1 (Jeremy Cline) +- AUTOMATIC: New configs (Jeremy Cline) +- Skip ksamples for bpf, they are broken (Jeremy Cline) +- configs: New config in fs/erofs for v5.4-rc1 (Jeremy Cline) +- configs: New config in mm for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/md for v5.4-rc1 (Jeremy Cline) +- configs: New config in init for v5.4-rc1 (Jeremy Cline) +- configs: New config in fs/fuse for v5.4-rc1 (Jeremy Cline) +- merge.pl: Avoid comments but do not skip them (Don Zickus) +- configs: New config in drivers/net/ethernet/pensando for v5.4-rc1 (Jeremy Cline) +- Update a comment about what released kernel means (Laura Abbott) +- Provide both Fedora and RHEL files in the SRPM (Laura Abbott) +- kernel.spec.template: Trim EXTRAVERSION in the Makefile (Laura Abbott) +- kernel.spec.template: Add macros for building with nopatches (Laura Abbott) +- kernel.spec.template: Add some macros for Fedora differences (Laura Abbott) +- kernel.spec.template: Consolodate the options (Laura Abbott) +- configs: Add pending direcory to Fedora (Laura Abbott) +- kernel.spec.template: Don't run hardlink if rpm-ostree is in use (Laura Abbott) +- configs: New config in net/can for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/net/phy for v5.4-rc1 (Jeremy Cline) +- configs: Increase x86_64 NR_UARTS to 64 (Prarit Bhargava) [1730649] +- configs: turn on ARM64_FORCE_52BIT for debug builds (Jeremy Cline) +- kernel.spec.template: Tweak the python3 mangling (Laura Abbott) +- kernel.spec.template: Add --with verbose option (Laura Abbott) +- kernel.spec.template: Switch to using install instead of __install (Laura Abbott) +- kernel.spec.template: Make the kernel.org URL https (Laura Abbott) +- kernel.spec.template: Update message about secure boot signing (Laura Abbott) +- kernel.spec.template: Move some with flags definitions up (Laura Abbott) +- kernel.spec.template: Update some BuildRequires (Laura Abbott) +- kernel.spec.template: Get rid of clean (Laura Abbott) +- configs: New config in drivers/char for v5.4-rc1 (Jeremy Cline) +- configs: New config in net/sched for v5.4-rc1 (Jeremy Cline) +- configs: New config in lib for v5.4-rc1 (Jeremy Cline) +- configs: New config in fs/verity for v5.4-rc1 (Jeremy Cline) +- configs: New config in arch/aarch64 for v5.4-rc4 (Jeremy Cline) +- configs: New config in arch/arm64 for v5.4-rc1 (Jeremy Cline) +- Flip off CONFIG_ARM64_VA_BITS_52 so the bundle that turns it on applies (Jeremy Cline) +- New configuration options for v5.4-rc4 (Jeremy Cline) +- Correctly name tarball for single tarball builds (Laura Abbott) +- configs: New config in drivers/pci for v5.4-rc1 (Jeremy Cline) +- Allow overriding the dist tag on the command line (Laura Abbott) +- Allow scratch branch target to be overridden (Laura Abbott) +- Remove long dead BUILD_DEFAULT_TARGET (Laura Abbott) +- Amend the changelog when rebasing (Laura Abbott) +- configs: New config in drivers/platform for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/pinctrl for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/net/wireless for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/net/ethernet/mellanox for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/net/can for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/hid for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/dma-buf for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/crypto for v5.4-rc1 (Jeremy Cline) +- configs: New config in arch/s390 for v5.4-rc1 (Jeremy Cline) +- configs: New config in block for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/cpuidle for v5.4-rc1 (Jeremy Cline) +- redhat: configs: Split CONFIG_CRYPTO_SHA512 (Laura Abbott) +- redhat: Set Fedora options (Laura Abbott) +- Set CRYPTO_SHA3_*_S390 to builtin on zfcpdump (Jeremy Cline) +- configs: New config in drivers/edac for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/firmware for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/hwmon for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/iio for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/mmc for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/tty for v5.4-rc1 (Jeremy Cline) +- configs: New config in arch/s390 for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/bus for v5.4-rc1 (Jeremy Cline) +- Add option to allow mismatched configs on the command line (Laura Abbott) +- configs: New config in drivers/crypto for v5.4-rc1 (Jeremy Cline) +- configs: New config in sound/pci for v5.4-rc1 (Jeremy Cline) +- configs: New config in sound/soc for v5.4-rc1 (Jeremy Cline) +- gitlab: Add CI job for packaging scripts (Major Hayden) +- Speed up CI with CKI image (Major Hayden) +- Disable e1000 driver in ARK (Neil Horman) +- configs: Fix the pending default for CONFIG_ARM64_VA_BITS_52 (Jeremy Cline) +- configs: Turn on OPTIMIZE_INLINING for everything (Jeremy Cline) +- configs: Set valid pending defaults for CRYPTO_ESSIV (Jeremy Cline) +- Add an initial CI configuration for the internal branch (Jeremy Cline) +- New drop of configuration options for v5.4-rc1 (Jeremy Cline) +- New drop of configuration options for v5.4-rc1 (Jeremy Cline) +- Sync up the ARK build scripts (Jeremy Cline) +- Sync up the Fedora Rawhide configs (Jeremy Cline) +- Sync up the ARK config files (Jeremy Cline) +- configs: Adjust CONFIG_FORCE_MAX_ZONEORDER for Fedora (Laura Abbott) +- configs: Add README for some other arches (Laura Abbott) +- configs: Sync up Fedora configs (Laura Abbott) +- [initial commit] Add structure for building with git (Laura Abbott) +- [initial commit] Red Hat gitignore and attributes (Laura Abbott) +- [initial commit] Add changelog (Laura Abbott) +- [initial commit] Add makefile (Laura Abbott) +- [initial commit] Add files for generating the kernel.spec (Laura Abbott) +- [initial commit] Add rpm directory (Laura Abbott) +- [initial commit] Add files for packaging (Laura Abbott) +- [initial commit] Add kabi files (Laura Abbott) +- [initial commit] Add scripts (Laura Abbott) +- [initial commit] Add configs (Laura Abbott) +- [initial commit] Add Makefiles (Laura Abbott) -* Fri Jul 31 2020 Fedora Kernel Team [5.8.0-0.rc7.20200731git417385c47ef7.1] -- 417385c47ef7 rebase -- Add new certs for dual signing with boothole ("Justin M. Forbes") -- Update secureboot signing for dual keys ("Justin M. Forbes") -- Updated changelog for the release based on d3590ebf6f91 (Fedora Kernel Team) +* Fri Feb 26 2021 Justin M. Forbes [5.11.2-4] +- drm/i915/gt: Correct surface base address for renderclear (Chris Wilson) +- drm/i915/gt: Flush before changing register state (Chris Wilson) +- drm/i915/gt: One more flush for Baytrail clear residuals (Chris Wilson) + +* Fri Feb 26 2021 Justin M. Forbes [5.11.2-3] +- MARKER needs SUBLEVEL for stable, I need to think of a better longterm solution (Justin M. Forbes) +- Config updates for 5.11.1 (Justin M. Forbes) +- Set CONFIG_DEBUG_HIGHMEM as off for non debug kernels (Justin M. Forbes) +- CONFIG_DEBUG_HIGHMEM should be debug only (Justin M. Forbes) +- Added redhat/fedora-dist-git-test.sh for a quick and easy script to test changes (Justin M. Forbes) +- Changes for building stable Fedora (Justin M. Forbes) +- Clean up redhat/configs/pending-common/generic/CONFIG_USB_RTL8153_ECM as it messes with scripts (Justin M. Forbes) +- Bluetooth: btusb: Some Qualcomm Bluetooth adapters stop working (Hui Wang) +- process_configs.sh: fix find/xargs data flow (Ondrej Mosnacek) +- Fedora config update (Justin M. Forbes) +- fedora: minor arm sound config updates (Peter Robinson) +- Fix trailing white space in redhat/configs/fedora/generic/CONFIG_SND_INTEL_BYT_PREFER_SOF (Justin M. Forbes) +- Add a redhat/rebase-notes.txt file (Hans de Goede) +- Turn on SND_INTEL_BYT_PREFER_SOF for Fedora (Hans de Goede) +- ALSA: hda: intel-dsp-config: Add SND_INTEL_BYT_PREFER_SOF Kconfig option (Hans de Goede) [1924101] +- CI: Drop MR ID from the name variable (Veronika Kabatova) +- redhat: add DUP and kpatch certificates to system trusted keys for RHEL build (Herton R. Krzesinski) +- The comments in CONFIG_USB_RTL8153_ECM actually turn off CONFIG_USB_RTL8152 (Justin M. Forbes) +- Update CKI pipeline project (Veronika Kabatova) +- Turn off additional KASAN options for Fedora (Justin M. Forbes) +- Rename the master branch to rawhide for Fedora (Justin M. Forbes) +- Makefile targets for packit integration (Ben Crocker) +- Turn off KASAN for rawhide debug builds (Justin M. Forbes) +- New configs in arch/arm64 (Justin Forbes) +- Remove deprecated Intel MIC config options (Peter Robinson) +- redhat: replace inline awk script with genlog.py call (Herton R. Krzesinski) +- redhat: add genlog.py script (Herton R. Krzesinski) +- kernel.spec.template - fix use_vdso usage (Ben Crocker) +- Turn off vdso_install for ppc (Justin M. Forbes) +- Remove bpf-helpers.7 from bpftool package (Jiri Olsa) +- New configs in lib/Kconfig.debug (Fedora Kernel Team) +- Turn off CONFIG_VIRTIO_CONSOLE for s390x zfcpdump (Justin M. Forbes) +- New configs in drivers/clk (Justin M. Forbes) +- Keep VIRTIO_CONSOLE on s390x available. (Jakub Čajka) +- New configs in lib/Kconfig.debug (Jeremy Cline) +- Fedora 5.11 config updates part 4 (Justin M. Forbes) +- Fedora 5.11 config updates part 3 (Justin M. Forbes) +- Fedora 5.11 config updates part 2 (Justin M. Forbes) +- Update internal (test) module list from RHEL-8 (Joe Lawrence) [1915073] +- Fix USB_XHCI_PCI regression (Justin M. Forbes) +- fedora: fixes for ARMv7 build issue by disabling HIGHPTE (Peter Robinson) +- all: s390x: Increase CONFIG_PCI_NR_FUNCTIONS to 512 (#1888735) (Dan Horák) +- Fedora 5.11 configs pt 1 (Justin M. Forbes) +- redhat: avoid conflict with mod-blacklist.sh and released_kernel defined (Herton R. Krzesinski) +- redhat: handle certificate files conditionally as done for src.rpm (Herton R. Krzesinski) +- specfile: add {?_smp_mflags} to "make headers_install" in tools/testing/selftests (Denys Vlasenko) +- specfile: add {?_smp_mflags} to "make samples/bpf/" (Denys Vlasenko) +- Run MR testing in CKI pipeline (Veronika Kabatova) +- Reword comment (Nicolas Chauvet) +- Add with_cross_arm conditional (Nicolas Chauvet) +- Redefines __strip if with_cross (Nicolas Chauvet) +- fedora: only enable ACPI_CONFIGFS, ACPI_CUSTOM_METHOD in debug kernels (Peter Robinson) +- fedora: User the same EFI_CUSTOM_SSDT_OVERLAYS as ARK (Peter Robinson) +- all: all arches/kernels enable the same DMI options (Peter Robinson) +- all: move SENSORS_ACPI_POWER to common/generic (Peter Robinson) +- fedora: PCIE_HISI_ERR is already in common (Peter Robinson) +- all: all ACPI platforms enable ATA_ACPI so move it to common (Peter Robinson) +- all: x86: move shared x86 acpi config options to generic (Peter Robinson) +- All: x86: Move ACPI_VIDEO to common/x86 (Peter Robinson) +- All: x86: Enable ACPI_DPTF (Intel DPTF) (Peter Robinson) +- All: enable ACPI_BGRT for all ACPI platforms. (Peter Robinson) +- All: Only build ACPI_EC_DEBUGFS for debug kernels (Peter Robinson) +- All: Disable Intel Classmate PC ACPI_CMPC option (Peter Robinson) +- cleanup: ACPI_PROCFS_POWER was removed upstream (Peter Robinson) +- All: ACPI: De-dupe the ACPI options that are the same across ark/fedora on x86/arm (Peter Robinson) +- Enable the vkms module in Fedora (Jeremy Cline) +- Fedora: arm updates for 5.11 and general cross Fedora cleanups (Peter Robinson) +- Add gcc-c++ to BuildRequires (Justin M. Forbes) +- Update CONFIG_KASAN_HW_TAGS (Justin M. Forbes) +- fedora: arm: move generic power off/reset to all arm (Peter Robinson) +- fedora: ARMv7: build in DEVFREQ_GOV_SIMPLE_ONDEMAND until I work out why it's changed (Peter Robinson) +- fedora: cleanup joystick_adc (Peter Robinson) +- fedora: update some display options (Peter Robinson) +- fedora: arm: enable TI PRU options (Peter Robinson) +- fedora: arm: minor exynos plaform updates (Peter Robinson) +- arm: SoC: disable Toshiba Visconti SoC (Peter Robinson) +- common: disable ARCH_BCM4908 (NFC) (Peter Robinson) +- fedora: minor arm config updates (Peter Robinson) +- fedora: enable Tegra 234 SoC (Peter Robinson) +- fedora: arm: enable new Hikey 3xx options (Peter Robinson) +- Fedora: USB updates (Peter Robinson) +- fedora: enable the GNSS receiver subsystem (Peter Robinson) +- Remove POWER_AVS as no longer upstream (Peter Robinson) +- Cleanup RESET_RASPBERRYPI (Peter Robinson) +- Cleanup GPIO_CDEV_V1 options. (Peter Robinson) +- fedora: arm crypto updates (Peter Robinson) +- CONFIG_KASAN_HW_TAGS for aarch64 (Justin M. Forbes) +- Fedora: cleanup PCMCIA configs, move to x86 (Peter Robinson) +- New configs in drivers/rtc (Fedora Kernel Team) +- redhat/configs: Enable CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL (Josh Poimboeuf) [1856176] +- redhat/configs: Enable CONFIG_GCC_PLUGIN_STRUCTLEAK (Josh Poimboeuf) [1856176] +- redhat/configs: Enable CONFIG_GCC_PLUGINS on ARK (Josh Poimboeuf) [1856176] +- redhat/configs: Enable CONFIG_KASAN on Fedora (Josh Poimboeuf) [1856176] +- New configs in init/Kconfig (Fedora Kernel Team) +- build_configs.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- genspec.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- mod-blacklist.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- Enable Speakup accessibility driver (Justin M. Forbes) +- New configs in init/Kconfig (Fedora Kernel Team) +- Fix fedora config mismatch due to dep changes (Justin M. Forbes) +- New configs in drivers/crypto (Jeremy Cline) +- Remove duplicate ENERGY_MODEL configs (Peter Robinson) +- This is selected by PCIE_QCOM so must match (Justin M. Forbes) +- drop unused BACKLIGHT_GENERIC (Peter Robinson) +- Remove cp instruction already handled in instruction below. (Paulo E. Castro) +- Add all the dependencies gleaned from running `make prepare` on a bloated devel kernel. (Paulo E. Castro) +- Add tools to path mangling script. (Paulo E. Castro) +- Remove duplicate cp statement which is also not specific to x86. (Paulo E. Castro) +- Correct orc_types failure whilst running `make prepare` https://bugzilla.redhat.com/show_bug.cgi?id=1882854 (Paulo E. Castro) +- redhat: ark: enable CONFIG_IKHEADERS (Jiri Olsa) +- Add missing '$' sign to (GIT) in redhat/Makefile (Augusto Caringi) +- Remove filterdiff and use native git instead (Don Zickus) +- New configs in net/sched (Justin M. Forbes) +- New configs in drivers/mfd (CKI@GitLab) +- New configs in drivers/mfd (Fedora Kernel Team) +- New configs in drivers/firmware (Fedora Kernel Team) +- Temporarily backout parallel xz script (Justin M. Forbes) +- redhat: explicitly disable CONFIG_IMA_APPRAISE_SIGNED_INIT (Bruno Meneguele) +- redhat: enable CONFIG_EVM_LOAD_X509 on ARK (Bruno Meneguele) +- redhat: enable CONFIG_EVM_ATTR_FSUUID on ARK (Bruno Meneguele) +- redhat: enable CONFIG_EVM in all arches and flavors (Bruno Meneguele) +- redhat: enable CONFIG_IMA_LOAD_X509 on ARK (Bruno Meneguele) +- redhat: set CONFIG_IMA_DEFAULT_HASH to SHA256 (Bruno Meneguele) +- redhat: enable CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT (Bruno Meneguele) +- redhat: enable CONFIG_IMA_READ_POLICY on ARK (Bruno Meneguele) +- redhat: set default IMA template for all ARK arches (Bruno Meneguele) +- redhat: enable CONFIG_IMA_DEFAULT_HASH_SHA256 for all flavors (Bruno Meneguele) +- redhat: disable CONFIG_IMA_DEFAULT_HASH_SHA1 (Bruno Meneguele) +- redhat: enable CONFIG_IMA_ARCH_POLICY for ppc and x86 (Bruno Meneguele) +- redhat: enable CONFIG_IMA_APPRAISE_MODSIG (Bruno Meneguele) +- redhat: enable CONFIG_IMA_APPRAISE_BOOTPARAM (Bruno Meneguele) +- redhat: enable CONFIG_IMA_APPRAISE (Bruno Meneguele) +- redhat: enable CONFIG_INTEGRITY for aarch64 (Bruno Meneguele) +- kernel: Update some missing KASAN/KCSAN options (Jeremy Linton) +- kernel: Enable coresight on aarch64 (Jeremy Linton) +- Update CONFIG_INET6_ESPINTCP (Justin Forbes) +- New configs in net/ipv6 (Justin M. Forbes) +- fedora: move CONFIG_RTC_NVMEM options from ark to common (Peter Robinson) +- configs: Enable CONFIG_DEBUG_INFO_BTF (Don Zickus) +- fedora: some minor arm audio config tweaks (Peter Robinson) +- Ship xpad with default modules on Fedora and RHEL (Bastien Nocera) +- Fedora: Only enable legacy serial/game port joysticks on x86 (Peter Robinson) +- Fedora: Enable the options required for the Librem 5 Phone (Peter Robinson) +- Fedora config update (Justin M. Forbes) +- Fedora config change because CONFIG_FSL_DPAA2_ETH now selects CONFIG_FSL_XGMAC_MDIO (Justin M. Forbes) +- redhat: generic enable CONFIG_INET_MPTCP_DIAG (Davide Caratti) +- Fedora config update (Justin M. Forbes) +- Enable NANDSIM for Fedora (Justin M. Forbes) +- Re-enable CONFIG_ACPI_TABLE_UPGRADE for Fedora since upstream disables this if secureboot is active (Justin M. Forbes) +- Ath11k related config updates (Justin M. Forbes) +- Fedora config updates for ath11k (Justin M. Forbes) +- Turn on ATH11K for Fedora (Justin M. Forbes) +- redhat: enable CONFIG_INTEL_IOMMU_SVM (Jerry Snitselaar) +- More Fedora config fixes (Justin M. Forbes) +- Fedora 5.10 config updates (Justin M. Forbes) +- Fedora 5.10 configs round 1 (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Allow kernel-tools to build without selftests (Don Zickus) +- Allow building of kernel-tools standalone (Don Zickus) +- redhat: ark: disable CONFIG_NET_ACT_CTINFO (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_TEQL (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_SFB (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_QFQ (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_PLUG (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_PIE (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_MULTIQ (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_HHF (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_DSMARK (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_DRR (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_CODEL (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_CHOKE (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_CBQ (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_ATM (Davide Caratti) +- redhat: ark: disable CONFIG_NET_EMATCH and sub-targets (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_TCINDEX (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_RSVP6 (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_RSVP (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_ROUTE4 (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_BASIC (Davide Caratti) +- redhat: ark: disable CONFIG_NET_ACT_SKBMOD (Davide Caratti) +- redhat: ark: disable CONFIG_NET_ACT_SIMP (Davide Caratti) +- redhat: ark: disable CONFIG_NET_ACT_NAT (Davide Caratti) +- arm64/defconfig: Enable CONFIG_KEXEC_FILE (Bhupesh Sharma) [1821565] +- redhat/configs: Cleanup CONFIG_CRYPTO_SHA512 (Prarit Bhargava) +- New configs in drivers/mfd (Fedora Kernel Team) +- Fix LTO issues with kernel-tools (Don Zickus) +- Point pathfix to the new location for gen_compile_commands.py (Justin M. Forbes) +- configs: Disable CONFIG_SECURITY_SELINUX_DISABLE (Ondrej Mosnacek) +- [Automatic] Handle config dependency changes (Don Zickus) +- configs/iommu: Add config comment to empty CONFIG_SUN50I_IOMMU file (Jerry Snitselaar) +- New configs in kernel/trace (Fedora Kernel Team) +- Fix Fedora config locations (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- configs: enable CONFIG_CRYPTO_CTS=y so cts(cbc(aes)) is available in FIPS mode (Vladis Dronov) [1855161] +- Partial revert: Add master merge check (Don Zickus) +- Update Maintainers doc to reflect workflow changes (Don Zickus) +- WIP: redhat/docs: Update documentation for single branch workflow (Prarit Bhargava) +- Add CONFIG_ARM64_MTE which is not picked up by the config scripts for some reason (Justin M. Forbes) +- Disable Speakup synth DECEXT (Justin M. Forbes) +- Enable Speakup for Fedora since it is out of staging (Justin M. Forbes) +- Modify patchlist changelog output (Don Zickus) +- process_configs.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- generate_all_configs.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- redhat/self-test: Initial commit (Ben Crocker) +- drm/sun4i: sun6i_mipi_dsi: fix horizontal timing calculation (Icenowy Zheng) +- drm: panel: add Xingbangda XBD599 panel (Icenowy Zheng) +- dt-bindings: panel: add binding for Xingbangda XBD599 panel (Icenowy Zheng) +- ARM: fix __get_user_check() in case uaccess_* calls are not inlined (Masahiro Yamada) +- mm/kmemleak: skip late_init if not skip disable (Murphy Zhou) +- KEYS: Make use of platform keyring for module signature verify (Robert Holmes) +- Drop that for now (Laura Abbott) +- Input: rmi4 - remove the need for artificial IRQ in case of HID (Benjamin Tissoires) +- ARM: tegra: usb no reset (Peter Robinson) +- arm: make CONFIG_HIGHPTE optional without CONFIG_EXPERT (Jon Masters) +- Add option of 13 for FORCE_MAX_ZONEORDER (Peter Robinson) +- s390: Lock down the kernel when the IPL secure flag is set (Jeremy Cline) +- efi: Lock down the kernel if booted in secure boot mode (David Howells) +- efi: Add an EFI_SECURE_BOOT flag to indicate secure boot mode (David Howells) +- security: lockdown: expose a hook to lock the kernel down (Jeremy Cline) +- Make get_cert_list() use efi_status_to_str() to print error messages. (Peter Jones) +- Add efi_status_to_str() and rework efi_status_to_err(). (Peter Jones) +- arm: aarch64: Drop the EXPERT setting from ARM64_FORCE_52BIT (Jeremy Cline) +- iommu/arm-smmu: workaround DMA mode issues (Laura Abbott) +- ipmi: do not configure ipmi for HPE m400 (Laura Abbott) [1670017] +- scsi: smartpqi: add inspur advantech ids (Don Brace) +- ahci: thunderx2: Fix for errata that affects stop engine (Robert Richter) +- Vulcan: AHCI PCI bar fix for Broadcom Vulcan early silicon (Robert Richter) +- kdump: fix a grammar issue in a kernel message (Dave Young) [1507353] +- kdump: add support for crashkernel=auto (Jeremy Cline) +- kdump: round up the total memory size to 128M for crashkernel reservation (Dave Young) [1507353] +- aarch64: acpi scan: Fix regression related to X-Gene UARTs (Mark Salter) [1519554] +- ACPI / irq: Workaround firmware issue on X-Gene based m400 (Mark Salter) [1519554] +- ACPI: APEI: arm64: Ignore broken HPE moonshot APEI support (Al Stone) [1518076] +- Stop merging ark-patches for release (Don Zickus) +- Fix path location for ark-update-configs.sh (Don Zickus) +- Combine Red Hat patches into single patch (Don Zickus) +- New configs in drivers/misc (Jeremy Cline) +- New configs in drivers/net/wireless (Justin M. Forbes) +- New configs in drivers/phy (Fedora Kernel Team) +- New configs in drivers/tty (Fedora Kernel Team) +- Set SquashFS decompression options for all flavors to match RHEL (Bohdan Khomutskyi) +- configs: Enable CONFIG_ENERGY_MODEL (Phil Auld) +- New configs in drivers/pinctrl (Fedora Kernel Team) +- Update CONFIG_THERMAL_NETLINK (Justin Forbes) +- Separate merge-upstream and release stages (Don Zickus) +- Re-enable CONFIG_IR_SERIAL on Fedora (Prarit Bhargava) +- Create Patchlist.changelog file (Don Zickus) +- Filter out upstream commits from changelog (Don Zickus) +- Merge Upstream script fixes (Don Zickus) +- kernel.spec: Remove kernel-keys directory on rpm erase (Prarit Bhargava) +- Add mlx5_vdpa to module filter for Fedora (Justin M. Forbes) +- Add python3-sphinx_rtd_theme buildreq for docs (Justin M. Forbes) +- redhat/configs/process_configs.sh: Remove *.config.orig files (Prarit Bhargava) +- redhat/configs/process_configs.sh: Add process_configs_known_broken flag (Prarit Bhargava) +- redhat/Makefile: Fix '*-configs' targets (Prarit Bhargava) +- dist-merge-upstream: Checkout known branch for ci scripts (Don Zickus) +- kernel.spec: don't override upstream compiler flags for ppc64le (Dan Horák) +- Fedora config updates (Justin M. Forbes) +- Fedora confi gupdate (Justin M. Forbes) +- mod-sign.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- Swap how ark-latest is built (Don Zickus) +- Add extra version bump to os-build branch (Don Zickus) +- dist-release: Avoid needless version bump. (Don Zickus) +- Add dist-fedora-release target (Don Zickus) +- Remove redundant code in dist-release (Don Zickus) +- Makefile.common rename TAG to _TAG (Don Zickus) +- Fedora config change (Justin M. Forbes) +- Fedora filter update (Justin M. Forbes) +- Config update for Fedora (Justin M. Forbes) +- enable PROTECTED_VIRTUALIZATION_GUEST for all s390x kernels (Dan Horák) +- redhat: ark: enable CONFIG_NET_SCH_TAPRIO (Davide Caratti) +- redhat: ark: enable CONFIG_NET_SCH_ETF (Davide Caratti) +- More Fedora config updates (Justin M. Forbes) +- New config deps (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- First half of config updates for Fedora (Justin M. Forbes) +- Updates for Fedora arm architectures for the 5.9 window (Peter Robinson) +- Merge 5.9 config changes from Peter Robinson (Justin M. Forbes) +- Add config options that only show up when we prep on arm (Justin M. Forbes) +- Config updates for Fedora (Justin M. Forbes) +- fedora: enable enery model (Peter Robinson) +- Use the configs/generic config for SND_HDA_INTEL everywhere (Peter Robinson) +- Enable ZSTD compression algorithm on all kernels (Peter Robinson) +- Enable ARM_SMCCC_SOC_ID on all aarch64 kernels (Peter Robinson) +- iio: enable LTR-559 light and proximity sensor (Peter Robinson) +- iio: chemical: enable some popular chemical and partical sensors (Peter Robinson) +- More mismatches (Justin M. Forbes) +- Fedora config change due to deps (Justin M. Forbes) +- CONFIG_SND_SOC_MAX98390 is now selected by SND_SOC_INTEL_DA7219_MAX98357A_GENERIC (Justin M. Forbes) +- Config change required for build part 2 (Justin M. Forbes) +- Config change required for build (Justin M. Forbes) +- Fedora config update (Justin M. Forbes) +- Add ability to sync upstream through Makefile (Don Zickus) +- Add master merge check (Don Zickus) +- Replace hardcoded values 'os-build' and project id with variables (Don Zickus) +- redhat/Makefile.common: Fix MARKER (Prarit Bhargava) +- gitattributes: Remove unnecesary export restrictions (Prarit Bhargava) +- Add new certs for dual signing with boothole (Justin M. Forbes) +- Update secureboot signing for dual keys (Justin M. Forbes) +- fedora: enable LEDS_SGM3140 for arm configs (Peter Robinson) +- Enable CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG (Justin M. Forbes) +- redhat/configs: Fix common CONFIGs (Prarit Bhargava) +- redhat/configs: General CONFIG cleanups (Prarit Bhargava) +- redhat/configs: Update & generalize evaluate_configs (Prarit Bhargava) +- fedora: arm: Update some meson config options (Peter Robinson) +- redhat/docs: Add Fedora RPM tagging date (Prarit Bhargava) +- Update config for renamed panel driver. (Peter Robinson) +- Enable SERIAL_SC16IS7XX for SPI interfaces (Peter Robinson) +- s390x-zfcpdump: Handle missing Module.symvers file (Don Zickus) +- Fedora config updates (Justin M. Forbes) +- redhat/configs: Add .tmp files to .gitignore (Prarit Bhargava) +- disable uncommon TCP congestion control algorithms (Davide Caratti) +- Add new bpf man pages (Justin M. Forbes) +- Add default option for CONFIG_ARM64_BTI_KERNEL to pending-common so that eln kernels build (Justin M. Forbes) +- redhat/Makefile: Add fedora-configs and rh-configs make targets (Prarit Bhargava) +- redhat/configs: Use SHA512 for module signing (Prarit Bhargava) +- genspec.sh: 'touch' empty Patchlist file for single tarball (Don Zickus) +- Fedora config update for rc1 (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- redhat/Makefile.common: fix RPMKSUBLEVEL condition (Ondrej Mosnacek) +- redhat/Makefile: silence KABI tar output (Ondrej Mosnacek) +- One more Fedora config update (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fix PATCHLEVEL for merge window (Justin M. Forbes) +- Change ark CONFIG_COMMON_CLK to yes, it is selected already by other options (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- More module filtering for Fedora (Justin M. Forbes) +- Update filters for rnbd in Fedora (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fix up module filtering for 5.8 (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- More Fedora config work (Justin M. Forbes) +- RTW88BE and CE have been extracted to their own modules (Justin M. Forbes) +- Set CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK for Fedora (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Arm64 Use Branch Target Identification for kernel (Justin M. Forbes) +- Change value of CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fix configs for Fedora (Justin M. Forbes) +- Add zero-commit to format-patch options (Justin M. Forbes) +- Copy Makefile.rhelver as a source file rather than a patch (Jeremy Cline) +- Move the sed to clear the patch templating outside of conditionals (Justin M. Forbes) +- Match template format in kernel.spec.template (Justin M. Forbes) +- Break out the Patches into individual files for dist-git (Justin M. Forbes) +- Break the Red Hat patch into individual commits (Jeremy Cline) +- Fix update_scripts.sh unselective pattern sub (David Howells) +- Add cec to the filter overrides (Justin M. Forbes) +- Add overrides to filter-modules.sh (Justin M. Forbes) +- redhat/configs: Enable CONFIG_SMC91X and disable CONFIG_SMC911X (Prarit Bhargava) [1722136] +- Include bpftool-struct_ops man page in the bpftool package (Jeremy Cline) +- Add sharedbuffer_configuration.py to the pathfix.py script (Jeremy Cline) +- Use __make macro instead of make (Tom Stellard) +- Sign off generated configuration patches (Jeremy Cline) +- Drop the static path configuration for the Sphinx docs (Jeremy Cline) +- redhat: Add dummy-module kernel module (Prarit Bhargava) +- redhat: enable CONFIG_LWTUNNEL_BPF (Jiri Benc) +- Remove typoed config file aarch64CONFIG_SM_GCC_8150 (Justin M. Forbes) +- Add Documentation back to kernel-devel as it has Kconfig now (Justin M. Forbes) +- Copy distro files rather than moving them (Jeremy Cline) +- kernel.spec: fix 'make scripts' for kernel-devel package (Brian Masney) +- Makefile: correct help text for dist-cross--rpms (Brian Masney) +- redhat/Makefile: Fix RHEL8 python warning (Prarit Bhargava) +- redhat: Change Makefile target names to dist- (Prarit Bhargava) +- configs: Disable Serial IR driver (Prarit Bhargava) +- Fix "multiple files for package kernel-tools" (Pablo Greco) +- Introduce a Sphinx documentation project (Jeremy Cline) +- Build ARK against ELN (Don Zickus) +- Drop the requirement to have a remote called linus (Jeremy Cline) +- Rename 'internal' branch to 'os-build' (Don Zickus) +- Only include open merge requests with "Include in Releases" label (Jeremy Cline) +- Package gpio-watch in kernel-tools (Jeremy Cline) +- Exit non-zero if the tag already exists for a release (Jeremy Cline) +- Adjust the changelog update script to not push anything (Jeremy Cline) +- Drop --target noarch from the rh-rpms make target (Jeremy Cline) +- Add a script to generate release tags and branches (Jeremy Cline) +- Set CONFIG_VDPA for fedora (Justin M. Forbes) +- Add a README to the dist-git repository (Jeremy Cline) +- Provide defaults in ark-rebase-patches.sh (Jeremy Cline) +- Default ark-rebase-patches.sh to not report issues (Jeremy Cline) +- Drop DIST from release commits and tags (Jeremy Cline) +- Place the buildid before the dist in the release (Jeremy Cline) +- Sync up with Fedora arm configuration prior to merging (Jeremy Cline) +- Disable CONFIG_PROTECTED_VIRTUALIZATION_GUEST for zfcpdump (Jeremy Cline) +- Add RHMAINTAINERS file and supporting conf (Don Zickus) +- Add a script to test if all commits are signed off (Jeremy Cline) +- Fix make rh-configs-arch (Don Zickus) +- Drop RH_FEDORA in favor of the now-merged RHEL_DIFFERENCES (Jeremy Cline) +- Sync up Fedora configs from the first week of the merge window (Jeremy Cline) +- Migrate blacklisting floppy.ko to mod-blacklist.sh (Don Zickus) +- kernel packaging: Combine mod-blacklist.sh and mod-extra-blacklist.sh (Don Zickus) +- kernel packaging: Fix extra namespace collision (Don Zickus) +- mod-extra.sh: Rename to mod-blacklist.sh (Don Zickus) +- mod-extra.sh: Make file generic (Don Zickus) +- Fix a painfully obvious YAML syntax error in .gitlab-ci.yml (Jeremy Cline) +- Add in armv7hl kernel header support (Don Zickus) +- Disable all BuildKernel commands when only building headers (Don Zickus) +- Drop any gitlab-ci patches from ark-patches (Jeremy Cline) +- Build the srpm for internal branch CI using the vanilla tree (Jeremy Cline) +- Pull in the latest ARM configurations for Fedora (Jeremy Cline) +- Fix xz memory usage issue (Neil Horman) +- Use ark-latest instead of master for update script (Jeremy Cline) +- Move the CI jobs back into the ARK repository (Jeremy Cline) +- Sync up ARK's Fedora config with the dist-git repository (Jeremy Cline) +- Pull in the latest configuration changes from Fedora (Jeremy Cline) +- configs: enable CONFIG_NET_SCH_CBS (Marcelo Ricardo Leitner) +- Drop configuration options in fedora/ that no longer exist (Jeremy Cline) +- Set RH_FEDORA for ARK and Fedora (Jeremy Cline) +- redhat/kernel.spec: Include the release in the kernel COPYING file (Jeremy Cline) +- redhat/kernel.spec: add scripts/jobserver-exec to py3_shbang_opts list (Jeremy Cline) +- redhat/kernel.spec: package bpftool-gen man page (Jeremy Cline) +- distgit-changelog: handle multiple y-stream BZ numbers (Bruno Meneguele) +- redhat/kernel.spec: remove all inline comments (Bruno Meneguele) +- redhat/genspec: awk unknown whitespace regex pattern (Bruno Meneguele) +- Improve the readability of gen_config_patches.sh (Jeremy Cline) +- Fix some awkward edge cases in gen_config_patches.sh (Jeremy Cline) +- Update the CI environment to use Fedora 31 (Jeremy Cline) +- redhat: drop whitespace from with_gcov macro (Jan Stancek) +- configs: Enable CONFIG_KEY_DH_OPERATIONS on ARK (Ondrej Mosnacek) +- configs: Adjust CONFIG_MPLS_ROUTING and CONFIG_MPLS_IPTUNNEL (Laura Abbott) +- New configs in lib/crypto (Jeremy Cline) +- New configs in drivers/char (Jeremy Cline) +- Turn on BLAKE2B for Fedora (Jeremy Cline) +- kernel.spec.template: Clean up stray *.h.s files (Laura Abbott) +- Build the SRPM in the CI job (Jeremy Cline) +- New configs in net/tls (Jeremy Cline) +- New configs in net/tipc (Jeremy Cline) +- New configs in lib/kunit (Jeremy Cline) +- Fix up released_kernel case (Laura Abbott) +- New configs in lib/Kconfig.debug (Jeremy Cline) +- New configs in drivers/ptp (Jeremy Cline) +- New configs in drivers/nvme (Jeremy Cline) +- New configs in drivers/net/phy (Jeremy Cline) +- New configs in arch/arm64 (Jeremy Cline) +- New configs in drivers/crypto (Jeremy Cline) +- New configs in crypto/Kconfig (Jeremy Cline) +- Add label so the Gitlab to email bridge ignores the changelog (Jeremy Cline) +- Temporarily switch TUNE_DEFAULT to y (Jeremy Cline) +- Run config test for merge requests and internal (Jeremy Cline) +- Add missing licensedir line (Laura Abbott) +- redhat/scripts: Remove redhat/scripts/rh_get_maintainer.pl (Prarit Bhargava) +- configs: Take CONFIG_DEFAULT_MMAP_MIN_ADDR from Fedra (Laura Abbott) +- configs: Turn off ISDN (Laura Abbott) +- Add a script to generate configuration patches (Laura Abbott) +- Introduce rh-configs-commit (Laura Abbott) +- kernel-packaging: Remove kernel files from kernel-modules-extra package (Prarit Bhargava) +- configs: Enable CONFIG_DEBUG_WX (Laura Abbott) +- configs: Disable wireless USB (Laura Abbott) +- Clean up some temporary config files (Laura Abbott) +- configs: New config in drivers/gpu for v5.4-rc1 (Jeremy Cline) +- configs: New config in arch/powerpc for v5.4-rc1 (Jeremy Cline) +- configs: New config in crypto for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/usb for v5.4-rc1 (Jeremy Cline) +- AUTOMATIC: New configs (Jeremy Cline) +- Skip ksamples for bpf, they are broken (Jeremy Cline) +- configs: New config in fs/erofs for v5.4-rc1 (Jeremy Cline) +- configs: New config in mm for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/md for v5.4-rc1 (Jeremy Cline) +- configs: New config in init for v5.4-rc1 (Jeremy Cline) +- configs: New config in fs/fuse for v5.4-rc1 (Jeremy Cline) +- merge.pl: Avoid comments but do not skip them (Don Zickus) +- configs: New config in drivers/net/ethernet/pensando for v5.4-rc1 (Jeremy Cline) +- Update a comment about what released kernel means (Laura Abbott) +- Provide both Fedora and RHEL files in the SRPM (Laura Abbott) +- kernel.spec.template: Trim EXTRAVERSION in the Makefile (Laura Abbott) +- kernel.spec.template: Add macros for building with nopatches (Laura Abbott) +- kernel.spec.template: Add some macros for Fedora differences (Laura Abbott) +- kernel.spec.template: Consolodate the options (Laura Abbott) +- configs: Add pending direcory to Fedora (Laura Abbott) +- kernel.spec.template: Don't run hardlink if rpm-ostree is in use (Laura Abbott) +- configs: New config in net/can for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/net/phy for v5.4-rc1 (Jeremy Cline) +- configs: Increase x86_64 NR_UARTS to 64 (Prarit Bhargava) [1730649] +- configs: turn on ARM64_FORCE_52BIT for debug builds (Jeremy Cline) +- kernel.spec.template: Tweak the python3 mangling (Laura Abbott) +- kernel.spec.template: Add --with verbose option (Laura Abbott) +- kernel.spec.template: Switch to using install instead of __install (Laura Abbott) +- kernel.spec.template: Make the kernel.org URL https (Laura Abbott) +- kernel.spec.template: Update message about secure boot signing (Laura Abbott) +- kernel.spec.template: Move some with flags definitions up (Laura Abbott) +- kernel.spec.template: Update some BuildRequires (Laura Abbott) +- kernel.spec.template: Get rid of clean (Laura Abbott) +- configs: New config in drivers/char for v5.4-rc1 (Jeremy Cline) +- configs: New config in net/sched for v5.4-rc1 (Jeremy Cline) +- configs: New config in lib for v5.4-rc1 (Jeremy Cline) +- configs: New config in fs/verity for v5.4-rc1 (Jeremy Cline) +- configs: New config in arch/aarch64 for v5.4-rc4 (Jeremy Cline) +- configs: New config in arch/arm64 for v5.4-rc1 (Jeremy Cline) +- Flip off CONFIG_ARM64_VA_BITS_52 so the bundle that turns it on applies (Jeremy Cline) +- New configuration options for v5.4-rc4 (Jeremy Cline) +- Correctly name tarball for single tarball builds (Laura Abbott) +- configs: New config in drivers/pci for v5.4-rc1 (Jeremy Cline) +- Allow overriding the dist tag on the command line (Laura Abbott) +- Allow scratch branch target to be overridden (Laura Abbott) +- Remove long dead BUILD_DEFAULT_TARGET (Laura Abbott) +- Amend the changelog when rebasing (Laura Abbott) +- configs: New config in drivers/platform for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/pinctrl for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/net/wireless for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/net/ethernet/mellanox for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/net/can for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/hid for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/dma-buf for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/crypto for v5.4-rc1 (Jeremy Cline) +- configs: New config in arch/s390 for v5.4-rc1 (Jeremy Cline) +- configs: New config in block for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/cpuidle for v5.4-rc1 (Jeremy Cline) +- redhat: configs: Split CONFIG_CRYPTO_SHA512 (Laura Abbott) +- redhat: Set Fedora options (Laura Abbott) +- Set CRYPTO_SHA3_*_S390 to builtin on zfcpdump (Jeremy Cline) +- configs: New config in drivers/edac for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/firmware for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/hwmon for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/iio for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/mmc for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/tty for v5.4-rc1 (Jeremy Cline) +- configs: New config in arch/s390 for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/bus for v5.4-rc1 (Jeremy Cline) +- Add option to allow mismatched configs on the command line (Laura Abbott) +- configs: New config in drivers/crypto for v5.4-rc1 (Jeremy Cline) +- configs: New config in sound/pci for v5.4-rc1 (Jeremy Cline) +- configs: New config in sound/soc for v5.4-rc1 (Jeremy Cline) +- gitlab: Add CI job for packaging scripts (Major Hayden) +- Speed up CI with CKI image (Major Hayden) +- Disable e1000 driver in ARK (Neil Horman) +- configs: Fix the pending default for CONFIG_ARM64_VA_BITS_52 (Jeremy Cline) +- configs: Turn on OPTIMIZE_INLINING for everything (Jeremy Cline) +- configs: Set valid pending defaults for CRYPTO_ESSIV (Jeremy Cline) +- Add an initial CI configuration for the internal branch (Jeremy Cline) +- New drop of configuration options for v5.4-rc1 (Jeremy Cline) +- New drop of configuration options for v5.4-rc1 (Jeremy Cline) +- Sync up the ARK build scripts (Jeremy Cline) +- Sync up the Fedora Rawhide configs (Jeremy Cline) +- Sync up the ARK config files (Jeremy Cline) +- configs: Adjust CONFIG_FORCE_MAX_ZONEORDER for Fedora (Laura Abbott) +- configs: Add README for some other arches (Laura Abbott) +- configs: Sync up Fedora configs (Laura Abbott) +- [initial commit] Add structure for building with git (Laura Abbott) +- [initial commit] Red Hat gitignore and attributes (Laura Abbott) +- [initial commit] Add changelog (Laura Abbott) +- [initial commit] Add makefile (Laura Abbott) +- [initial commit] Add files for generating the kernel.spec (Laura Abbott) +- [initial commit] Add rpm directory (Laura Abbott) +- [initial commit] Add files for packaging (Laura Abbott) +- [initial commit] Add kabi files (Laura Abbott) +- [initial commit] Add scripts (Laura Abbott) +- [initial commit] Add configs (Laura Abbott) +- [initial commit] Add Makefiles (Laura Abbott) -* Thu Jul 30 2020 Fedora Kernel Team [5.8.0-0.rc7.20200730gitd3590ebf6f91.1] -- d3590ebf6f91 rebase -- Updated changelog for the release based on 6ba1b005ffc3 (Fedora Kernel Team) +* Fri Feb 26 2021 Justin M. Forbes [5.11.1-2] +- MARKER needs SUBLEVEL for stable, I need to think of a better longterm solution (Justin M. Forbes) +- Config updates for 5.11.1 (Justin M. Forbes) +- Set CONFIG_DEBUG_HIGHMEM as off for non debug kernels (Justin M. Forbes) +- CONFIG_DEBUG_HIGHMEM should be debug only (Justin M. Forbes) +- Added redhat/fedora-dist-git-test.sh for a quick and easy script to test changes (Justin M. Forbes) +- Changes for building stable Fedora (Justin M. Forbes) +- Clean up redhat/configs/pending-common/generic/CONFIG_USB_RTL8153_ECM as it messes with scripts (Justin M. Forbes) +- Bluetooth: btusb: Some Qualcomm Bluetooth adapters stop working (Hui Wang) +- process_configs.sh: fix find/xargs data flow (Ondrej Mosnacek) +- Fedora config update (Justin M. Forbes) +- fedora: minor arm sound config updates (Peter Robinson) +- Fix trailing white space in redhat/configs/fedora/generic/CONFIG_SND_INTEL_BYT_PREFER_SOF (Justin M. Forbes) +- Add a redhat/rebase-notes.txt file (Hans de Goede) +- Turn on SND_INTEL_BYT_PREFER_SOF for Fedora (Hans de Goede) +- ALSA: hda: intel-dsp-config: Add SND_INTEL_BYT_PREFER_SOF Kconfig option (Hans de Goede) [1924101] +- CI: Drop MR ID from the name variable (Veronika Kabatova) +- redhat: add DUP and kpatch certificates to system trusted keys for RHEL build (Herton R. Krzesinski) +- The comments in CONFIG_USB_RTL8153_ECM actually turn off CONFIG_USB_RTL8152 (Justin M. Forbes) +- Update CKI pipeline project (Veronika Kabatova) +- Turn off additional KASAN options for Fedora (Justin M. Forbes) +- Rename the master branch to rawhide for Fedora (Justin M. Forbes) +- Makefile targets for packit integration (Ben Crocker) +- Turn off KASAN for rawhide debug builds (Justin M. Forbes) +- New configs in arch/arm64 (Justin Forbes) +- Remove deprecated Intel MIC config options (Peter Robinson) +- redhat: replace inline awk script with genlog.py call (Herton R. Krzesinski) +- redhat: add genlog.py script (Herton R. Krzesinski) +- kernel.spec.template - fix use_vdso usage (Ben Crocker) +- Turn off vdso_install for ppc (Justin M. Forbes) +- Remove bpf-helpers.7 from bpftool package (Jiri Olsa) +- New configs in lib/Kconfig.debug (Fedora Kernel Team) +- Turn off CONFIG_VIRTIO_CONSOLE for s390x zfcpdump (Justin M. Forbes) +- New configs in drivers/clk (Justin M. Forbes) +- Keep VIRTIO_CONSOLE on s390x available. (Jakub Čajka) +- New configs in lib/Kconfig.debug (Jeremy Cline) +- Fedora 5.11 config updates part 4 (Justin M. Forbes) +- Fedora 5.11 config updates part 3 (Justin M. Forbes) +- Fedora 5.11 config updates part 2 (Justin M. Forbes) +- Update internal (test) module list from RHEL-8 (Joe Lawrence) [1915073] +- Fix USB_XHCI_PCI regression (Justin M. Forbes) +- fedora: fixes for ARMv7 build issue by disabling HIGHPTE (Peter Robinson) +- all: s390x: Increase CONFIG_PCI_NR_FUNCTIONS to 512 (#1888735) (Dan Horák) +- Fedora 5.11 configs pt 1 (Justin M. Forbes) +- redhat: avoid conflict with mod-blacklist.sh and released_kernel defined (Herton R. Krzesinski) +- redhat: handle certificate files conditionally as done for src.rpm (Herton R. Krzesinski) +- specfile: add {?_smp_mflags} to "make headers_install" in tools/testing/selftests (Denys Vlasenko) +- specfile: add {?_smp_mflags} to "make samples/bpf/" (Denys Vlasenko) +- Run MR testing in CKI pipeline (Veronika Kabatova) +- Reword comment (Nicolas Chauvet) +- Add with_cross_arm conditional (Nicolas Chauvet) +- Redefines __strip if with_cross (Nicolas Chauvet) +- fedora: only enable ACPI_CONFIGFS, ACPI_CUSTOM_METHOD in debug kernels (Peter Robinson) +- fedora: User the same EFI_CUSTOM_SSDT_OVERLAYS as ARK (Peter Robinson) +- all: all arches/kernels enable the same DMI options (Peter Robinson) +- all: move SENSORS_ACPI_POWER to common/generic (Peter Robinson) +- fedora: PCIE_HISI_ERR is already in common (Peter Robinson) +- all: all ACPI platforms enable ATA_ACPI so move it to common (Peter Robinson) +- all: x86: move shared x86 acpi config options to generic (Peter Robinson) +- All: x86: Move ACPI_VIDEO to common/x86 (Peter Robinson) +- All: x86: Enable ACPI_DPTF (Intel DPTF) (Peter Robinson) +- All: enable ACPI_BGRT for all ACPI platforms. (Peter Robinson) +- All: Only build ACPI_EC_DEBUGFS for debug kernels (Peter Robinson) +- All: Disable Intel Classmate PC ACPI_CMPC option (Peter Robinson) +- cleanup: ACPI_PROCFS_POWER was removed upstream (Peter Robinson) +- All: ACPI: De-dupe the ACPI options that are the same across ark/fedora on x86/arm (Peter Robinson) +- Enable the vkms module in Fedora (Jeremy Cline) +- Fedora: arm updates for 5.11 and general cross Fedora cleanups (Peter Robinson) +- Add gcc-c++ to BuildRequires (Justin M. Forbes) +- Update CONFIG_KASAN_HW_TAGS (Justin M. Forbes) +- fedora: arm: move generic power off/reset to all arm (Peter Robinson) +- fedora: ARMv7: build in DEVFREQ_GOV_SIMPLE_ONDEMAND until I work out why it's changed (Peter Robinson) +- fedora: cleanup joystick_adc (Peter Robinson) +- fedora: update some display options (Peter Robinson) +- fedora: arm: enable TI PRU options (Peter Robinson) +- fedora: arm: minor exynos plaform updates (Peter Robinson) +- arm: SoC: disable Toshiba Visconti SoC (Peter Robinson) +- common: disable ARCH_BCM4908 (NFC) (Peter Robinson) +- fedora: minor arm config updates (Peter Robinson) +- fedora: enable Tegra 234 SoC (Peter Robinson) +- fedora: arm: enable new Hikey 3xx options (Peter Robinson) +- Fedora: USB updates (Peter Robinson) +- fedora: enable the GNSS receiver subsystem (Peter Robinson) +- Remove POWER_AVS as no longer upstream (Peter Robinson) +- Cleanup RESET_RASPBERRYPI (Peter Robinson) +- Cleanup GPIO_CDEV_V1 options. (Peter Robinson) +- fedora: arm crypto updates (Peter Robinson) +- CONFIG_KASAN_HW_TAGS for aarch64 (Justin M. Forbes) +- Fedora: cleanup PCMCIA configs, move to x86 (Peter Robinson) +- New configs in drivers/rtc (Fedora Kernel Team) +- redhat/configs: Enable CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL (Josh Poimboeuf) [1856176] +- redhat/configs: Enable CONFIG_GCC_PLUGIN_STRUCTLEAK (Josh Poimboeuf) [1856176] +- redhat/configs: Enable CONFIG_GCC_PLUGINS on ARK (Josh Poimboeuf) [1856176] +- redhat/configs: Enable CONFIG_KASAN on Fedora (Josh Poimboeuf) [1856176] +- New configs in init/Kconfig (Fedora Kernel Team) +- build_configs.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- genspec.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- mod-blacklist.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- Enable Speakup accessibility driver (Justin M. Forbes) +- New configs in init/Kconfig (Fedora Kernel Team) +- Fix fedora config mismatch due to dep changes (Justin M. Forbes) +- New configs in drivers/crypto (Jeremy Cline) +- Remove duplicate ENERGY_MODEL configs (Peter Robinson) +- This is selected by PCIE_QCOM so must match (Justin M. Forbes) +- drop unused BACKLIGHT_GENERIC (Peter Robinson) +- Remove cp instruction already handled in instruction below. (Paulo E. Castro) +- Add all the dependencies gleaned from running `make prepare` on a bloated devel kernel. (Paulo E. Castro) +- Add tools to path mangling script. (Paulo E. Castro) +- Remove duplicate cp statement which is also not specific to x86. (Paulo E. Castro) +- Correct orc_types failure whilst running `make prepare` https://bugzilla.redhat.com/show_bug.cgi?id=1882854 (Paulo E. Castro) +- redhat: ark: enable CONFIG_IKHEADERS (Jiri Olsa) +- Add missing '$' sign to (GIT) in redhat/Makefile (Augusto Caringi) +- Remove filterdiff and use native git instead (Don Zickus) +- New configs in net/sched (Justin M. Forbes) +- New configs in drivers/mfd (CKI@GitLab) +- New configs in drivers/mfd (Fedora Kernel Team) +- New configs in drivers/firmware (Fedora Kernel Team) +- Temporarily backout parallel xz script (Justin M. Forbes) +- redhat: explicitly disable CONFIG_IMA_APPRAISE_SIGNED_INIT (Bruno Meneguele) +- redhat: enable CONFIG_EVM_LOAD_X509 on ARK (Bruno Meneguele) +- redhat: enable CONFIG_EVM_ATTR_FSUUID on ARK (Bruno Meneguele) +- redhat: enable CONFIG_EVM in all arches and flavors (Bruno Meneguele) +- redhat: enable CONFIG_IMA_LOAD_X509 on ARK (Bruno Meneguele) +- redhat: set CONFIG_IMA_DEFAULT_HASH to SHA256 (Bruno Meneguele) +- redhat: enable CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT (Bruno Meneguele) +- redhat: enable CONFIG_IMA_READ_POLICY on ARK (Bruno Meneguele) +- redhat: set default IMA template for all ARK arches (Bruno Meneguele) +- redhat: enable CONFIG_IMA_DEFAULT_HASH_SHA256 for all flavors (Bruno Meneguele) +- redhat: disable CONFIG_IMA_DEFAULT_HASH_SHA1 (Bruno Meneguele) +- redhat: enable CONFIG_IMA_ARCH_POLICY for ppc and x86 (Bruno Meneguele) +- redhat: enable CONFIG_IMA_APPRAISE_MODSIG (Bruno Meneguele) +- redhat: enable CONFIG_IMA_APPRAISE_BOOTPARAM (Bruno Meneguele) +- redhat: enable CONFIG_IMA_APPRAISE (Bruno Meneguele) +- redhat: enable CONFIG_INTEGRITY for aarch64 (Bruno Meneguele) +- kernel: Update some missing KASAN/KCSAN options (Jeremy Linton) +- kernel: Enable coresight on aarch64 (Jeremy Linton) +- Update CONFIG_INET6_ESPINTCP (Justin Forbes) +- New configs in net/ipv6 (Justin M. Forbes) +- fedora: move CONFIG_RTC_NVMEM options from ark to common (Peter Robinson) +- configs: Enable CONFIG_DEBUG_INFO_BTF (Don Zickus) +- fedora: some minor arm audio config tweaks (Peter Robinson) +- Ship xpad with default modules on Fedora and RHEL (Bastien Nocera) +- Fedora: Only enable legacy serial/game port joysticks on x86 (Peter Robinson) +- Fedora: Enable the options required for the Librem 5 Phone (Peter Robinson) +- Fedora config update (Justin M. Forbes) +- Fedora config change because CONFIG_FSL_DPAA2_ETH now selects CONFIG_FSL_XGMAC_MDIO (Justin M. Forbes) +- redhat: generic enable CONFIG_INET_MPTCP_DIAG (Davide Caratti) +- Fedora config update (Justin M. Forbes) +- Enable NANDSIM for Fedora (Justin M. Forbes) +- Re-enable CONFIG_ACPI_TABLE_UPGRADE for Fedora since upstream disables this if secureboot is active (Justin M. Forbes) +- Ath11k related config updates (Justin M. Forbes) +- Fedora config updates for ath11k (Justin M. Forbes) +- Turn on ATH11K for Fedora (Justin M. Forbes) +- redhat: enable CONFIG_INTEL_IOMMU_SVM (Jerry Snitselaar) +- More Fedora config fixes (Justin M. Forbes) +- Fedora 5.10 config updates (Justin M. Forbes) +- Fedora 5.10 configs round 1 (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Allow kernel-tools to build without selftests (Don Zickus) +- Allow building of kernel-tools standalone (Don Zickus) +- redhat: ark: disable CONFIG_NET_ACT_CTINFO (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_TEQL (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_SFB (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_QFQ (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_PLUG (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_PIE (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_MULTIQ (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_HHF (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_DSMARK (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_DRR (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_CODEL (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_CHOKE (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_CBQ (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_ATM (Davide Caratti) +- redhat: ark: disable CONFIG_NET_EMATCH and sub-targets (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_TCINDEX (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_RSVP6 (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_RSVP (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_ROUTE4 (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_BASIC (Davide Caratti) +- redhat: ark: disable CONFIG_NET_ACT_SKBMOD (Davide Caratti) +- redhat: ark: disable CONFIG_NET_ACT_SIMP (Davide Caratti) +- redhat: ark: disable CONFIG_NET_ACT_NAT (Davide Caratti) +- arm64/defconfig: Enable CONFIG_KEXEC_FILE (Bhupesh Sharma) [1821565] +- redhat/configs: Cleanup CONFIG_CRYPTO_SHA512 (Prarit Bhargava) +- New configs in drivers/mfd (Fedora Kernel Team) +- Fix LTO issues with kernel-tools (Don Zickus) +- Point pathfix to the new location for gen_compile_commands.py (Justin M. Forbes) +- configs: Disable CONFIG_SECURITY_SELINUX_DISABLE (Ondrej Mosnacek) +- [Automatic] Handle config dependency changes (Don Zickus) +- configs/iommu: Add config comment to empty CONFIG_SUN50I_IOMMU file (Jerry Snitselaar) +- New configs in kernel/trace (Fedora Kernel Team) +- Fix Fedora config locations (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- configs: enable CONFIG_CRYPTO_CTS=y so cts(cbc(aes)) is available in FIPS mode (Vladis Dronov) [1855161] +- Partial revert: Add master merge check (Don Zickus) +- Update Maintainers doc to reflect workflow changes (Don Zickus) +- WIP: redhat/docs: Update documentation for single branch workflow (Prarit Bhargava) +- Add CONFIG_ARM64_MTE which is not picked up by the config scripts for some reason (Justin M. Forbes) +- Disable Speakup synth DECEXT (Justin M. Forbes) +- Enable Speakup for Fedora since it is out of staging (Justin M. Forbes) +- Modify patchlist changelog output (Don Zickus) +- process_configs.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- generate_all_configs.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- redhat/self-test: Initial commit (Ben Crocker) +- drm/sun4i: sun6i_mipi_dsi: fix horizontal timing calculation (Icenowy Zheng) +- drm: panel: add Xingbangda XBD599 panel (Icenowy Zheng) +- dt-bindings: panel: add binding for Xingbangda XBD599 panel (Icenowy Zheng) +- ARM: fix __get_user_check() in case uaccess_* calls are not inlined (Masahiro Yamada) +- mm/kmemleak: skip late_init if not skip disable (Murphy Zhou) +- KEYS: Make use of platform keyring for module signature verify (Robert Holmes) +- Drop that for now (Laura Abbott) +- Input: rmi4 - remove the need for artificial IRQ in case of HID (Benjamin Tissoires) +- ARM: tegra: usb no reset (Peter Robinson) +- arm: make CONFIG_HIGHPTE optional without CONFIG_EXPERT (Jon Masters) +- Add option of 13 for FORCE_MAX_ZONEORDER (Peter Robinson) +- s390: Lock down the kernel when the IPL secure flag is set (Jeremy Cline) +- efi: Lock down the kernel if booted in secure boot mode (David Howells) +- efi: Add an EFI_SECURE_BOOT flag to indicate secure boot mode (David Howells) +- security: lockdown: expose a hook to lock the kernel down (Jeremy Cline) +- Make get_cert_list() use efi_status_to_str() to print error messages. (Peter Jones) +- Add efi_status_to_str() and rework efi_status_to_err(). (Peter Jones) +- arm: aarch64: Drop the EXPERT setting from ARM64_FORCE_52BIT (Jeremy Cline) +- iommu/arm-smmu: workaround DMA mode issues (Laura Abbott) +- ipmi: do not configure ipmi for HPE m400 (Laura Abbott) [1670017] +- scsi: smartpqi: add inspur advantech ids (Don Brace) +- ahci: thunderx2: Fix for errata that affects stop engine (Robert Richter) +- Vulcan: AHCI PCI bar fix for Broadcom Vulcan early silicon (Robert Richter) +- kdump: fix a grammar issue in a kernel message (Dave Young) [1507353] +- kdump: add support for crashkernel=auto (Jeremy Cline) +- kdump: round up the total memory size to 128M for crashkernel reservation (Dave Young) [1507353] +- aarch64: acpi scan: Fix regression related to X-Gene UARTs (Mark Salter) [1519554] +- ACPI / irq: Workaround firmware issue on X-Gene based m400 (Mark Salter) [1519554] +- ACPI: APEI: arm64: Ignore broken HPE moonshot APEI support (Al Stone) [1518076] +- Stop merging ark-patches for release (Don Zickus) +- Fix path location for ark-update-configs.sh (Don Zickus) +- Combine Red Hat patches into single patch (Don Zickus) +- New configs in drivers/misc (Jeremy Cline) +- New configs in drivers/net/wireless (Justin M. Forbes) +- New configs in drivers/phy (Fedora Kernel Team) +- New configs in drivers/tty (Fedora Kernel Team) +- Set SquashFS decompression options for all flavors to match RHEL (Bohdan Khomutskyi) +- configs: Enable CONFIG_ENERGY_MODEL (Phil Auld) +- New configs in drivers/pinctrl (Fedora Kernel Team) +- Update CONFIG_THERMAL_NETLINK (Justin Forbes) +- Separate merge-upstream and release stages (Don Zickus) +- Re-enable CONFIG_IR_SERIAL on Fedora (Prarit Bhargava) +- Create Patchlist.changelog file (Don Zickus) +- Filter out upstream commits from changelog (Don Zickus) +- Merge Upstream script fixes (Don Zickus) +- kernel.spec: Remove kernel-keys directory on rpm erase (Prarit Bhargava) +- Add mlx5_vdpa to module filter for Fedora (Justin M. Forbes) +- Add python3-sphinx_rtd_theme buildreq for docs (Justin M. Forbes) +- redhat/configs/process_configs.sh: Remove *.config.orig files (Prarit Bhargava) +- redhat/configs/process_configs.sh: Add process_configs_known_broken flag (Prarit Bhargava) +- redhat/Makefile: Fix '*-configs' targets (Prarit Bhargava) +- dist-merge-upstream: Checkout known branch for ci scripts (Don Zickus) +- kernel.spec: don't override upstream compiler flags for ppc64le (Dan Horák) +- Fedora config updates (Justin M. Forbes) +- Fedora confi gupdate (Justin M. Forbes) +- mod-sign.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- Swap how ark-latest is built (Don Zickus) +- Add extra version bump to os-build branch (Don Zickus) +- dist-release: Avoid needless version bump. (Don Zickus) +- Add dist-fedora-release target (Don Zickus) +- Remove redundant code in dist-release (Don Zickus) +- Makefile.common rename TAG to _TAG (Don Zickus) +- Fedora config change (Justin M. Forbes) +- Fedora filter update (Justin M. Forbes) +- Config update for Fedora (Justin M. Forbes) +- enable PROTECTED_VIRTUALIZATION_GUEST for all s390x kernels (Dan Horák) +- redhat: ark: enable CONFIG_NET_SCH_TAPRIO (Davide Caratti) +- redhat: ark: enable CONFIG_NET_SCH_ETF (Davide Caratti) +- More Fedora config updates (Justin M. Forbes) +- New config deps (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- First half of config updates for Fedora (Justin M. Forbes) +- Updates for Fedora arm architectures for the 5.9 window (Peter Robinson) +- Merge 5.9 config changes from Peter Robinson (Justin M. Forbes) +- Add config options that only show up when we prep on arm (Justin M. Forbes) +- Config updates for Fedora (Justin M. Forbes) +- fedora: enable enery model (Peter Robinson) +- Use the configs/generic config for SND_HDA_INTEL everywhere (Peter Robinson) +- Enable ZSTD compression algorithm on all kernels (Peter Robinson) +- Enable ARM_SMCCC_SOC_ID on all aarch64 kernels (Peter Robinson) +- iio: enable LTR-559 light and proximity sensor (Peter Robinson) +- iio: chemical: enable some popular chemical and partical sensors (Peter Robinson) +- More mismatches (Justin M. Forbes) +- Fedora config change due to deps (Justin M. Forbes) +- CONFIG_SND_SOC_MAX98390 is now selected by SND_SOC_INTEL_DA7219_MAX98357A_GENERIC (Justin M. Forbes) +- Config change required for build part 2 (Justin M. Forbes) +- Config change required for build (Justin M. Forbes) +- Fedora config update (Justin M. Forbes) +- Add ability to sync upstream through Makefile (Don Zickus) +- Add master merge check (Don Zickus) +- Replace hardcoded values 'os-build' and project id with variables (Don Zickus) +- redhat/Makefile.common: Fix MARKER (Prarit Bhargava) +- gitattributes: Remove unnecesary export restrictions (Prarit Bhargava) +- Add new certs for dual signing with boothole (Justin M. Forbes) +- Update secureboot signing for dual keys (Justin M. Forbes) +- fedora: enable LEDS_SGM3140 for arm configs (Peter Robinson) +- Enable CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG (Justin M. Forbes) +- redhat/configs: Fix common CONFIGs (Prarit Bhargava) +- redhat/configs: General CONFIG cleanups (Prarit Bhargava) +- redhat/configs: Update & generalize evaluate_configs (Prarit Bhargava) +- fedora: arm: Update some meson config options (Peter Robinson) +- redhat/docs: Add Fedora RPM tagging date (Prarit Bhargava) +- Update config for renamed panel driver. (Peter Robinson) +- Enable SERIAL_SC16IS7XX for SPI interfaces (Peter Robinson) +- s390x-zfcpdump: Handle missing Module.symvers file (Don Zickus) +- Fedora config updates (Justin M. Forbes) +- redhat/configs: Add .tmp files to .gitignore (Prarit Bhargava) +- disable uncommon TCP congestion control algorithms (Davide Caratti) +- Add new bpf man pages (Justin M. Forbes) +- Add default option for CONFIG_ARM64_BTI_KERNEL to pending-common so that eln kernels build (Justin M. Forbes) +- redhat/Makefile: Add fedora-configs and rh-configs make targets (Prarit Bhargava) +- redhat/configs: Use SHA512 for module signing (Prarit Bhargava) +- genspec.sh: 'touch' empty Patchlist file for single tarball (Don Zickus) +- Fedora config update for rc1 (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- redhat/Makefile.common: fix RPMKSUBLEVEL condition (Ondrej Mosnacek) +- redhat/Makefile: silence KABI tar output (Ondrej Mosnacek) +- One more Fedora config update (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fix PATCHLEVEL for merge window (Justin M. Forbes) +- Change ark CONFIG_COMMON_CLK to yes, it is selected already by other options (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- More module filtering for Fedora (Justin M. Forbes) +- Update filters for rnbd in Fedora (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fix up module filtering for 5.8 (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- More Fedora config work (Justin M. Forbes) +- RTW88BE and CE have been extracted to their own modules (Justin M. Forbes) +- Set CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK for Fedora (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Arm64 Use Branch Target Identification for kernel (Justin M. Forbes) +- Change value of CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fix configs for Fedora (Justin M. Forbes) +- Add zero-commit to format-patch options (Justin M. Forbes) +- Copy Makefile.rhelver as a source file rather than a patch (Jeremy Cline) +- Move the sed to clear the patch templating outside of conditionals (Justin M. Forbes) +- Match template format in kernel.spec.template (Justin M. Forbes) +- Break out the Patches into individual files for dist-git (Justin M. Forbes) +- Break the Red Hat patch into individual commits (Jeremy Cline) +- Fix update_scripts.sh unselective pattern sub (David Howells) +- Add cec to the filter overrides (Justin M. Forbes) +- Add overrides to filter-modules.sh (Justin M. Forbes) +- redhat/configs: Enable CONFIG_SMC91X and disable CONFIG_SMC911X (Prarit Bhargava) [1722136] +- Include bpftool-struct_ops man page in the bpftool package (Jeremy Cline) +- Add sharedbuffer_configuration.py to the pathfix.py script (Jeremy Cline) +- Use __make macro instead of make (Tom Stellard) +- Sign off generated configuration patches (Jeremy Cline) +- Drop the static path configuration for the Sphinx docs (Jeremy Cline) +- redhat: Add dummy-module kernel module (Prarit Bhargava) +- redhat: enable CONFIG_LWTUNNEL_BPF (Jiri Benc) +- Remove typoed config file aarch64CONFIG_SM_GCC_8150 (Justin M. Forbes) +- Add Documentation back to kernel-devel as it has Kconfig now (Justin M. Forbes) +- Copy distro files rather than moving them (Jeremy Cline) +- kernel.spec: fix 'make scripts' for kernel-devel package (Brian Masney) +- Makefile: correct help text for dist-cross--rpms (Brian Masney) +- redhat/Makefile: Fix RHEL8 python warning (Prarit Bhargava) +- redhat: Change Makefile target names to dist- (Prarit Bhargava) +- configs: Disable Serial IR driver (Prarit Bhargava) +- Fix "multiple files for package kernel-tools" (Pablo Greco) +- Introduce a Sphinx documentation project (Jeremy Cline) +- Build ARK against ELN (Don Zickus) +- Drop the requirement to have a remote called linus (Jeremy Cline) +- Rename 'internal' branch to 'os-build' (Don Zickus) +- Only include open merge requests with "Include in Releases" label (Jeremy Cline) +- Package gpio-watch in kernel-tools (Jeremy Cline) +- Exit non-zero if the tag already exists for a release (Jeremy Cline) +- Adjust the changelog update script to not push anything (Jeremy Cline) +- Drop --target noarch from the rh-rpms make target (Jeremy Cline) +- Add a script to generate release tags and branches (Jeremy Cline) +- Set CONFIG_VDPA for fedora (Justin M. Forbes) +- Add a README to the dist-git repository (Jeremy Cline) +- Provide defaults in ark-rebase-patches.sh (Jeremy Cline) +- Default ark-rebase-patches.sh to not report issues (Jeremy Cline) +- Drop DIST from release commits and tags (Jeremy Cline) +- Place the buildid before the dist in the release (Jeremy Cline) +- Sync up with Fedora arm configuration prior to merging (Jeremy Cline) +- Disable CONFIG_PROTECTED_VIRTUALIZATION_GUEST for zfcpdump (Jeremy Cline) +- Add RHMAINTAINERS file and supporting conf (Don Zickus) +- Add a script to test if all commits are signed off (Jeremy Cline) +- Fix make rh-configs-arch (Don Zickus) +- Drop RH_FEDORA in favor of the now-merged RHEL_DIFFERENCES (Jeremy Cline) +- Sync up Fedora configs from the first week of the merge window (Jeremy Cline) +- Migrate blacklisting floppy.ko to mod-blacklist.sh (Don Zickus) +- kernel packaging: Combine mod-blacklist.sh and mod-extra-blacklist.sh (Don Zickus) +- kernel packaging: Fix extra namespace collision (Don Zickus) +- mod-extra.sh: Rename to mod-blacklist.sh (Don Zickus) +- mod-extra.sh: Make file generic (Don Zickus) +- Fix a painfully obvious YAML syntax error in .gitlab-ci.yml (Jeremy Cline) +- Add in armv7hl kernel header support (Don Zickus) +- Disable all BuildKernel commands when only building headers (Don Zickus) +- Drop any gitlab-ci patches from ark-patches (Jeremy Cline) +- Build the srpm for internal branch CI using the vanilla tree (Jeremy Cline) +- Pull in the latest ARM configurations for Fedora (Jeremy Cline) +- Fix xz memory usage issue (Neil Horman) +- Use ark-latest instead of master for update script (Jeremy Cline) +- Move the CI jobs back into the ARK repository (Jeremy Cline) +- Sync up ARK's Fedora config with the dist-git repository (Jeremy Cline) +- Pull in the latest configuration changes from Fedora (Jeremy Cline) +- configs: enable CONFIG_NET_SCH_CBS (Marcelo Ricardo Leitner) +- Drop configuration options in fedora/ that no longer exist (Jeremy Cline) +- Set RH_FEDORA for ARK and Fedora (Jeremy Cline) +- redhat/kernel.spec: Include the release in the kernel COPYING file (Jeremy Cline) +- redhat/kernel.spec: add scripts/jobserver-exec to py3_shbang_opts list (Jeremy Cline) +- redhat/kernel.spec: package bpftool-gen man page (Jeremy Cline) +- distgit-changelog: handle multiple y-stream BZ numbers (Bruno Meneguele) +- redhat/kernel.spec: remove all inline comments (Bruno Meneguele) +- redhat/genspec: awk unknown whitespace regex pattern (Bruno Meneguele) +- Improve the readability of gen_config_patches.sh (Jeremy Cline) +- Fix some awkward edge cases in gen_config_patches.sh (Jeremy Cline) +- Update the CI environment to use Fedora 31 (Jeremy Cline) +- redhat: drop whitespace from with_gcov macro (Jan Stancek) +- configs: Enable CONFIG_KEY_DH_OPERATIONS on ARK (Ondrej Mosnacek) +- configs: Adjust CONFIG_MPLS_ROUTING and CONFIG_MPLS_IPTUNNEL (Laura Abbott) +- New configs in lib/crypto (Jeremy Cline) +- New configs in drivers/char (Jeremy Cline) +- Turn on BLAKE2B for Fedora (Jeremy Cline) +- kernel.spec.template: Clean up stray *.h.s files (Laura Abbott) +- Build the SRPM in the CI job (Jeremy Cline) +- New configs in net/tls (Jeremy Cline) +- New configs in net/tipc (Jeremy Cline) +- New configs in lib/kunit (Jeremy Cline) +- Fix up released_kernel case (Laura Abbott) +- New configs in lib/Kconfig.debug (Jeremy Cline) +- New configs in drivers/ptp (Jeremy Cline) +- New configs in drivers/nvme (Jeremy Cline) +- New configs in drivers/net/phy (Jeremy Cline) +- New configs in arch/arm64 (Jeremy Cline) +- New configs in drivers/crypto (Jeremy Cline) +- New configs in crypto/Kconfig (Jeremy Cline) +- Add label so the Gitlab to email bridge ignores the changelog (Jeremy Cline) +- Temporarily switch TUNE_DEFAULT to y (Jeremy Cline) +- Run config test for merge requests and internal (Jeremy Cline) +- Add missing licensedir line (Laura Abbott) +- redhat/scripts: Remove redhat/scripts/rh_get_maintainer.pl (Prarit Bhargava) +- configs: Take CONFIG_DEFAULT_MMAP_MIN_ADDR from Fedra (Laura Abbott) +- configs: Turn off ISDN (Laura Abbott) +- Add a script to generate configuration patches (Laura Abbott) +- Introduce rh-configs-commit (Laura Abbott) +- kernel-packaging: Remove kernel files from kernel-modules-extra package (Prarit Bhargava) +- configs: Enable CONFIG_DEBUG_WX (Laura Abbott) +- configs: Disable wireless USB (Laura Abbott) +- Clean up some temporary config files (Laura Abbott) +- configs: New config in drivers/gpu for v5.4-rc1 (Jeremy Cline) +- configs: New config in arch/powerpc for v5.4-rc1 (Jeremy Cline) +- configs: New config in crypto for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/usb for v5.4-rc1 (Jeremy Cline) +- AUTOMATIC: New configs (Jeremy Cline) +- Skip ksamples for bpf, they are broken (Jeremy Cline) +- configs: New config in fs/erofs for v5.4-rc1 (Jeremy Cline) +- configs: New config in mm for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/md for v5.4-rc1 (Jeremy Cline) +- configs: New config in init for v5.4-rc1 (Jeremy Cline) +- configs: New config in fs/fuse for v5.4-rc1 (Jeremy Cline) +- merge.pl: Avoid comments but do not skip them (Don Zickus) +- configs: New config in drivers/net/ethernet/pensando for v5.4-rc1 (Jeremy Cline) +- Update a comment about what released kernel means (Laura Abbott) +- Provide both Fedora and RHEL files in the SRPM (Laura Abbott) +- kernel.spec.template: Trim EXTRAVERSION in the Makefile (Laura Abbott) +- kernel.spec.template: Add macros for building with nopatches (Laura Abbott) +- kernel.spec.template: Add some macros for Fedora differences (Laura Abbott) +- kernel.spec.template: Consolodate the options (Laura Abbott) +- configs: Add pending direcory to Fedora (Laura Abbott) +- kernel.spec.template: Don't run hardlink if rpm-ostree is in use (Laura Abbott) +- configs: New config in net/can for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/net/phy for v5.4-rc1 (Jeremy Cline) +- configs: Increase x86_64 NR_UARTS to 64 (Prarit Bhargava) [1730649] +- configs: turn on ARM64_FORCE_52BIT for debug builds (Jeremy Cline) +- kernel.spec.template: Tweak the python3 mangling (Laura Abbott) +- kernel.spec.template: Add --with verbose option (Laura Abbott) +- kernel.spec.template: Switch to using install instead of __install (Laura Abbott) +- kernel.spec.template: Make the kernel.org URL https (Laura Abbott) +- kernel.spec.template: Update message about secure boot signing (Laura Abbott) +- kernel.spec.template: Move some with flags definitions up (Laura Abbott) +- kernel.spec.template: Update some BuildRequires (Laura Abbott) +- kernel.spec.template: Get rid of clean (Laura Abbott) +- configs: New config in drivers/char for v5.4-rc1 (Jeremy Cline) +- configs: New config in net/sched for v5.4-rc1 (Jeremy Cline) +- configs: New config in lib for v5.4-rc1 (Jeremy Cline) +- configs: New config in fs/verity for v5.4-rc1 (Jeremy Cline) +- configs: New config in arch/aarch64 for v5.4-rc4 (Jeremy Cline) +- configs: New config in arch/arm64 for v5.4-rc1 (Jeremy Cline) +- Flip off CONFIG_ARM64_VA_BITS_52 so the bundle that turns it on applies (Jeremy Cline) +- New configuration options for v5.4-rc4 (Jeremy Cline) +- Correctly name tarball for single tarball builds (Laura Abbott) +- configs: New config in drivers/pci for v5.4-rc1 (Jeremy Cline) +- Allow overriding the dist tag on the command line (Laura Abbott) +- Allow scratch branch target to be overridden (Laura Abbott) +- Remove long dead BUILD_DEFAULT_TARGET (Laura Abbott) +- Amend the changelog when rebasing (Laura Abbott) +- configs: New config in drivers/platform for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/pinctrl for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/net/wireless for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/net/ethernet/mellanox for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/net/can for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/hid for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/dma-buf for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/crypto for v5.4-rc1 (Jeremy Cline) +- configs: New config in arch/s390 for v5.4-rc1 (Jeremy Cline) +- configs: New config in block for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/cpuidle for v5.4-rc1 (Jeremy Cline) +- redhat: configs: Split CONFIG_CRYPTO_SHA512 (Laura Abbott) +- redhat: Set Fedora options (Laura Abbott) +- Set CRYPTO_SHA3_*_S390 to builtin on zfcpdump (Jeremy Cline) +- configs: New config in drivers/edac for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/firmware for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/hwmon for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/iio for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/mmc for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/tty for v5.4-rc1 (Jeremy Cline) +- configs: New config in arch/s390 for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/bus for v5.4-rc1 (Jeremy Cline) +- Add option to allow mismatched configs on the command line (Laura Abbott) +- configs: New config in drivers/crypto for v5.4-rc1 (Jeremy Cline) +- configs: New config in sound/pci for v5.4-rc1 (Jeremy Cline) +- configs: New config in sound/soc for v5.4-rc1 (Jeremy Cline) +- gitlab: Add CI job for packaging scripts (Major Hayden) +- Speed up CI with CKI image (Major Hayden) +- Disable e1000 driver in ARK (Neil Horman) +- configs: Fix the pending default for CONFIG_ARM64_VA_BITS_52 (Jeremy Cline) +- configs: Turn on OPTIMIZE_INLINING for everything (Jeremy Cline) +- configs: Set valid pending defaults for CRYPTO_ESSIV (Jeremy Cline) +- Add an initial CI configuration for the internal branch (Jeremy Cline) +- New drop of configuration options for v5.4-rc1 (Jeremy Cline) +- New drop of configuration options for v5.4-rc1 (Jeremy Cline) +- Sync up the ARK build scripts (Jeremy Cline) +- Sync up the Fedora Rawhide configs (Jeremy Cline) +- Sync up the ARK config files (Jeremy Cline) +- configs: Adjust CONFIG_FORCE_MAX_ZONEORDER for Fedora (Laura Abbott) +- configs: Add README for some other arches (Laura Abbott) +- configs: Sync up Fedora configs (Laura Abbott) +- [initial commit] Add structure for building with git (Laura Abbott) +- [initial commit] Red Hat gitignore and attributes (Laura Abbott) +- [initial commit] Add changelog (Laura Abbott) +- [initial commit] Add makefile (Laura Abbott) +- [initial commit] Add files for generating the kernel.spec (Laura Abbott) +- [initial commit] Add rpm directory (Laura Abbott) +- [initial commit] Add files for packaging (Laura Abbott) +- [initial commit] Add kabi files (Laura Abbott) +- [initial commit] Add scripts (Laura Abbott) +- [initial commit] Add configs (Laura Abbott) +- [initial commit] Add Makefiles (Laura Abbott) -* Wed Jul 29 2020 Fedora Kernel Team [5.8.0-0.rc7.20200729git6ba1b005ffc3.1] -- 6ba1b005ffc3 rebase -- Revert "dt-bindings: Add doc for Pine64 Pinebook Pro" (Peter Robinson) +* Mon Feb 15 2021 Herton R. Krzesinski [5.11.0-1] +- process_configs.sh: fix find/xargs data flow (Ondrej Mosnacek) +- Fedora config update (Justin M. Forbes) +- fedora: minor arm sound config updates (Peter Robinson) +- Fix trailing white space in redhat/configs/fedora/generic/CONFIG_SND_INTEL_BYT_PREFER_SOF (Justin M. Forbes) +- Add a redhat/rebase-notes.txt file (Hans de Goede) +- Turn on SND_INTEL_BYT_PREFER_SOF for Fedora (Hans de Goede) +- ALSA: hda: intel-dsp-config: Add SND_INTEL_BYT_PREFER_SOF Kconfig option (Hans de Goede) [1924101] +- CI: Drop MR ID from the name variable (Veronika Kabatova) +- redhat: add DUP and kpatch certificates to system trusted keys for RHEL build (Herton R. Krzesinski) +- The comments in CONFIG_USB_RTL8153_ECM actually turn off CONFIG_USB_RTL8152 (Justin M. Forbes) +- Update CKI pipeline project (Veronika Kabatova) +- Turn off additional KASAN options for Fedora (Justin M. Forbes) +- Rename the master branch to rawhide for Fedora (Justin M. Forbes) +- Makefile targets for packit integration (Ben Crocker) +- Turn off KASAN for rawhide debug builds (Justin M. Forbes) +- New configs in arch/arm64 (Justin Forbes) +- Remove deprecated Intel MIC config options (Peter Robinson) +- redhat: replace inline awk script with genlog.py call (Herton R. Krzesinski) +- redhat: add genlog.py script (Herton R. Krzesinski) +- kernel.spec.template - fix use_vdso usage (Ben Crocker) +- redhat: remove remaining references of CONFIG_RH_DISABLE_DEPRECATED (Herton R. Krzesinski) +- Turn off vdso_install for ppc (Justin M. Forbes) +- Remove bpf-helpers.7 from bpftool package (Jiri Olsa) +- New configs in lib/Kconfig.debug (Fedora Kernel Team) +- Turn off CONFIG_VIRTIO_CONSOLE for s390x zfcpdump (Justin M. Forbes) +- New configs in drivers/clk (Justin M. Forbes) +- Keep VIRTIO_CONSOLE on s390x available. (Jakub Čajka) +- New configs in lib/Kconfig.debug (Jeremy Cline) +- Fedora 5.11 config updates part 4 (Justin M. Forbes) +- Fedora 5.11 config updates part 3 (Justin M. Forbes) +- Fedora 5.11 config updates part 2 (Justin M. Forbes) +- Update internal (test) module list from RHEL-8 (Joe Lawrence) [1915073] +- Fix USB_XHCI_PCI regression (Justin M. Forbes) +- fedora: fixes for ARMv7 build issue by disabling HIGHPTE (Peter Robinson) +- all: s390x: Increase CONFIG_PCI_NR_FUNCTIONS to 512 (#1888735) (Dan Horák) +- Fedora 5.11 configs pt 1 (Justin M. Forbes) +- redhat: avoid conflict with mod-blacklist.sh and released_kernel defined (Herton R. Krzesinski) +- redhat: handle certificate files conditionally as done for src.rpm (Herton R. Krzesinski) +- specfile: add {?_smp_mflags} to "make headers_install" in tools/testing/selftests (Denys Vlasenko) +- specfile: add {?_smp_mflags} to "make samples/bpf/" (Denys Vlasenko) +- Run MR testing in CKI pipeline (Veronika Kabatova) +- Reword comment (Nicolas Chauvet) +- Add with_cross_arm conditional (Nicolas Chauvet) +- Redefines __strip if with_cross (Nicolas Chauvet) +- fedora: only enable ACPI_CONFIGFS, ACPI_CUSTOM_METHOD in debug kernels (Peter Robinson) +- fedora: User the same EFI_CUSTOM_SSDT_OVERLAYS as ARK (Peter Robinson) +- all: all arches/kernels enable the same DMI options (Peter Robinson) +- all: move SENSORS_ACPI_POWER to common/generic (Peter Robinson) +- fedora: PCIE_HISI_ERR is already in common (Peter Robinson) +- all: all ACPI platforms enable ATA_ACPI so move it to common (Peter Robinson) +- all: x86: move shared x86 acpi config options to generic (Peter Robinson) +- All: x86: Move ACPI_VIDEO to common/x86 (Peter Robinson) +- All: x86: Enable ACPI_DPTF (Intel DPTF) (Peter Robinson) +- All: enable ACPI_BGRT for all ACPI platforms. (Peter Robinson) +- All: Only build ACPI_EC_DEBUGFS for debug kernels (Peter Robinson) +- All: Disable Intel Classmate PC ACPI_CMPC option (Peter Robinson) +- cleanup: ACPI_PROCFS_POWER was removed upstream (Peter Robinson) +- All: ACPI: De-dupe the ACPI options that are the same across ark/fedora on x86/arm (Peter Robinson) +- Enable the vkms module in Fedora (Jeremy Cline) +- Fedora: arm updates for 5.11 and general cross Fedora cleanups (Peter Robinson) +- Add gcc-c++ to BuildRequires (Justin M. Forbes) +- Update CONFIG_KASAN_HW_TAGS (Justin M. Forbes) +- fedora: arm: move generic power off/reset to all arm (Peter Robinson) +- fedora: ARMv7: build in DEVFREQ_GOV_SIMPLE_ONDEMAND until I work out why it's changed (Peter Robinson) +- fedora: cleanup joystick_adc (Peter Robinson) +- fedora: update some display options (Peter Robinson) +- fedora: arm: enable TI PRU options (Peter Robinson) +- fedora: arm: minor exynos plaform updates (Peter Robinson) +- arm: SoC: disable Toshiba Visconti SoC (Peter Robinson) +- common: disable ARCH_BCM4908 (NFC) (Peter Robinson) +- fedora: minor arm config updates (Peter Robinson) +- fedora: enable Tegra 234 SoC (Peter Robinson) +- fedora: arm: enable new Hikey 3xx options (Peter Robinson) +- Fedora: USB updates (Peter Robinson) +- fedora: enable the GNSS receiver subsystem (Peter Robinson) +- Remove POWER_AVS as no longer upstream (Peter Robinson) +- Cleanup RESET_RASPBERRYPI (Peter Robinson) +- Cleanup GPIO_CDEV_V1 options. (Peter Robinson) +- fedora: arm crypto updates (Peter Robinson) +- CONFIG_KASAN_HW_TAGS for aarch64 (Justin M. Forbes) +- Fedora: cleanup PCMCIA configs, move to x86 (Peter Robinson) +- New configs in drivers/rtc (Fedora Kernel Team) +- redhat/configs: Enable CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL (Josh Poimboeuf) [1856176] +- redhat/configs: Enable CONFIG_GCC_PLUGIN_STRUCTLEAK (Josh Poimboeuf) [1856176] +- redhat/configs: Enable CONFIG_GCC_PLUGINS on ARK (Josh Poimboeuf) [1856176] +- redhat/configs: Enable CONFIG_KASAN on Fedora (Josh Poimboeuf) [1856176] +- New configs in init/Kconfig (Fedora Kernel Team) +- build_configs.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- genspec.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- mod-blacklist.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- Enable Speakup accessibility driver (Justin M. Forbes) +- New configs in init/Kconfig (Fedora Kernel Team) +- Fix fedora config mismatch due to dep changes (Justin M. Forbes) +- New configs in drivers/crypto (Jeremy Cline) +- Remove duplicate ENERGY_MODEL configs (Peter Robinson) +- This is selected by PCIE_QCOM so must match (Justin M. Forbes) +- drop unused BACKLIGHT_GENERIC (Peter Robinson) +- Remove cp instruction already handled in instruction below. (Paulo E. Castro) +- Add all the dependencies gleaned from running `make prepare` on a bloated devel kernel. (Paulo E. Castro) +- Add tools to path mangling script. (Paulo E. Castro) +- Remove duplicate cp statement which is also not specific to x86. (Paulo E. Castro) +- Correct orc_types failure whilst running `make prepare` https://bugzilla.redhat.com/show_bug.cgi?id=1882854 (Paulo E. Castro) +- redhat: ark: enable CONFIG_IKHEADERS (Jiri Olsa) +- Add missing '$' sign to (GIT) in redhat/Makefile (Augusto Caringi) +- Remove filterdiff and use native git instead (Don Zickus) +- New configs in net/sched (Justin M. Forbes) +- New configs in drivers/mfd (CKI@GitLab) +- New configs in drivers/mfd (Fedora Kernel Team) +- New configs in drivers/firmware (Fedora Kernel Team) +- Temporarily backout parallel xz script (Justin M. Forbes) +- redhat: explicitly disable CONFIG_IMA_APPRAISE_SIGNED_INIT (Bruno Meneguele) +- redhat: enable CONFIG_EVM_LOAD_X509 on ARK (Bruno Meneguele) +- redhat: enable CONFIG_EVM_ATTR_FSUUID on ARK (Bruno Meneguele) +- redhat: enable CONFIG_EVM in all arches and flavors (Bruno Meneguele) +- redhat: enable CONFIG_IMA_LOAD_X509 on ARK (Bruno Meneguele) +- redhat: set CONFIG_IMA_DEFAULT_HASH to SHA256 (Bruno Meneguele) +- redhat: enable CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT (Bruno Meneguele) +- redhat: enable CONFIG_IMA_READ_POLICY on ARK (Bruno Meneguele) +- redhat: set default IMA template for all ARK arches (Bruno Meneguele) +- redhat: enable CONFIG_IMA_DEFAULT_HASH_SHA256 for all flavors (Bruno Meneguele) +- redhat: disable CONFIG_IMA_DEFAULT_HASH_SHA1 (Bruno Meneguele) +- redhat: enable CONFIG_IMA_ARCH_POLICY for ppc and x86 (Bruno Meneguele) +- redhat: enable CONFIG_IMA_APPRAISE_MODSIG (Bruno Meneguele) +- redhat: enable CONFIG_IMA_APPRAISE_BOOTPARAM (Bruno Meneguele) +- redhat: enable CONFIG_IMA_APPRAISE (Bruno Meneguele) +- redhat: enable CONFIG_INTEGRITY for aarch64 (Bruno Meneguele) +- kernel: Update some missing KASAN/KCSAN options (Jeremy Linton) +- kernel: Enable coresight on aarch64 (Jeremy Linton) +- Update CONFIG_INET6_ESPINTCP (Justin Forbes) +- New configs in net/ipv6 (Justin M. Forbes) +- fedora: move CONFIG_RTC_NVMEM options from ark to common (Peter Robinson) +- configs: Enable CONFIG_DEBUG_INFO_BTF (Don Zickus) +- fedora: some minor arm audio config tweaks (Peter Robinson) +- Ship xpad with default modules on Fedora and RHEL (Bastien Nocera) +- Fedora: Only enable legacy serial/game port joysticks on x86 (Peter Robinson) +- Fedora: Enable the options required for the Librem 5 Phone (Peter Robinson) +- Fedora config update (Justin M. Forbes) +- Fedora config change because CONFIG_FSL_DPAA2_ETH now selects CONFIG_FSL_XGMAC_MDIO (Justin M. Forbes) +- redhat: generic enable CONFIG_INET_MPTCP_DIAG (Davide Caratti) +- Fedora config update (Justin M. Forbes) +- Enable NANDSIM for Fedora (Justin M. Forbes) +- Re-enable CONFIG_ACPI_TABLE_UPGRADE for Fedora since upstream disables this if secureboot is active (Justin M. Forbes) +- Ath11k related config updates (Justin M. Forbes) +- Fedora config updates for ath11k (Justin M. Forbes) +- Turn on ATH11K for Fedora (Justin M. Forbes) +- redhat: enable CONFIG_INTEL_IOMMU_SVM (Jerry Snitselaar) +- More Fedora config fixes (Justin M. Forbes) +- Fedora 5.10 config updates (Justin M. Forbes) +- Fedora 5.10 configs round 1 (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Allow kernel-tools to build without selftests (Don Zickus) +- Allow building of kernel-tools standalone (Don Zickus) +- redhat: ark: disable CONFIG_NET_ACT_CTINFO (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_TEQL (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_SFB (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_QFQ (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_PLUG (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_PIE (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_MULTIQ (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_HHF (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_DSMARK (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_DRR (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_CODEL (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_CHOKE (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_CBQ (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_ATM (Davide Caratti) +- redhat: ark: disable CONFIG_NET_EMATCH and sub-targets (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_TCINDEX (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_RSVP6 (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_RSVP (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_ROUTE4 (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_BASIC (Davide Caratti) +- redhat: ark: disable CONFIG_NET_ACT_SKBMOD (Davide Caratti) +- redhat: ark: disable CONFIG_NET_ACT_SIMP (Davide Caratti) +- redhat: ark: disable CONFIG_NET_ACT_NAT (Davide Caratti) +- arm64/defconfig: Enable CONFIG_KEXEC_FILE (Bhupesh Sharma) [1821565] +- redhat/configs: Cleanup CONFIG_CRYPTO_SHA512 (Prarit Bhargava) +- New configs in drivers/mfd (Fedora Kernel Team) +- Fix LTO issues with kernel-tools (Don Zickus) +- Point pathfix to the new location for gen_compile_commands.py (Justin M. Forbes) +- configs: Disable CONFIG_SECURITY_SELINUX_DISABLE (Ondrej Mosnacek) +- [Automatic] Handle config dependency changes (Don Zickus) +- configs/iommu: Add config comment to empty CONFIG_SUN50I_IOMMU file (Jerry Snitselaar) +- New configs in kernel/trace (Fedora Kernel Team) +- Fix Fedora config locations (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- configs: enable CONFIG_CRYPTO_CTS=y so cts(cbc(aes)) is available in FIPS mode (Vladis Dronov) [1855161] +- Partial revert: Add master merge check (Don Zickus) +- Update Maintainers doc to reflect workflow changes (Don Zickus) +- WIP: redhat/docs: Update documentation for single branch workflow (Prarit Bhargava) +- Add CONFIG_ARM64_MTE which is not picked up by the config scripts for some reason (Justin M. Forbes) +- Disable Speakup synth DECEXT (Justin M. Forbes) +- Enable Speakup for Fedora since it is out of staging (Justin M. Forbes) +- Modify patchlist changelog output (Don Zickus) +- process_configs.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- generate_all_configs.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- redhat/self-test: Initial commit (Ben Crocker) +- Fixes "acpi: prefer booting with ACPI over DTS" to be RHEL only (Peter Robinson) +- arch/x86: Remove vendor specific CPU ID checks (Prarit Bhargava) +- redhat: Replace hardware.redhat.com link in Unsupported message (Prarit Bhargava) [1810301] +- x86: Fix compile issues with rh_check_supported() (Don Zickus) +- drm/sun4i: sun6i_mipi_dsi: fix horizontal timing calculation (Icenowy Zheng) +- drm: panel: add Xingbangda XBD599 panel (Icenowy Zheng) +- dt-bindings: panel: add binding for Xingbangda XBD599 panel (Icenowy Zheng) +- ARM: fix __get_user_check() in case uaccess_* calls are not inlined (Masahiro Yamada) +- mm/kmemleak: skip late_init if not skip disable (Murphy Zhou) +- KEYS: Make use of platform keyring for module signature verify (Robert Holmes) +- Drop that for now (Laura Abbott) +- Input: rmi4 - remove the need for artificial IRQ in case of HID (Benjamin Tissoires) +- ARM: tegra: usb no reset (Peter Robinson) +- arm: make CONFIG_HIGHPTE optional without CONFIG_EXPERT (Jon Masters) +- redhat: rh_kabi: deduplication friendly structs (Jiri Benc) +- redhat: rh_kabi add a comment with warning about RH_KABI_EXCLUDE usage (Jiri Benc) +- redhat: rh_kabi: introduce RH_KABI_EXTEND_WITH_SIZE (Jiri Benc) +- redhat: rh_kabi: Indirect EXTEND macros so nesting of other macros will resolve. (Don Dutile) +- redhat: rh_kabi: Fix RH_KABI_SET_SIZE to use dereference operator (Tony Camuso) +- redhat: rh_kabi: Add macros to size and extend structs (Prarit Bhargava) +- Removing Obsolete hba pci-ids from rhel8 (Dick Kennedy) +- mptsas: pci-id table changes (Laura Abbott) +- mptsas: Taint kernel if mptsas is loaded (Laura Abbott) +- mptspi: pci-id table changes (Laura Abbott) +- qla2xxx: Remove PCI IDs of deprecated adapter (Jeremy Cline) +- be2iscsi: remove unsupported device IDs (Chris Leech) +- mptspi: Taint kernel if mptspi is loaded (Laura Abbott) +- hpsa: remove old cciss-based smartarray pci ids (Joseph Szczypek) +- qla4xxx: Remove deprecated PCI IDs from RHEL 8 (Chad Dupuis) +- aacraid: Remove depreciated device and vendor PCI id's (Raghava Aditya Renukunta) +- megaraid_sas: remove deprecated pci-ids (Tomas Henzl) +- mpt*: remove certain deprecated pci-ids (Jeremy Cline) +- kernel: add SUPPORT_REMOVED kernel taint (Tomas Henzl) +- Rename RH_DISABLE_DEPRECATED to RHEL_DIFFERENCES (Don Zickus) +- Add option of 13 for FORCE_MAX_ZONEORDER (Peter Robinson) +- s390: Lock down the kernel when the IPL secure flag is set (Jeremy Cline) +- efi: Lock down the kernel if booted in secure boot mode (David Howells) +- efi: Add an EFI_SECURE_BOOT flag to indicate secure boot mode (David Howells) +- security: lockdown: expose a hook to lock the kernel down (Jeremy Cline) +- Make get_cert_list() use efi_status_to_str() to print error messages. (Peter Jones) +- Add efi_status_to_str() and rework efi_status_to_err(). (Peter Jones) +- Add support for deprecating processors (Laura Abbott) [1565717 1595918 1609604 1610493] +- arm: aarch64: Drop the EXPERT setting from ARM64_FORCE_52BIT (Jeremy Cline) +- iommu/arm-smmu: workaround DMA mode issues (Laura Abbott) +- rh_kabi: introduce RH_KABI_EXCLUDE (Jakub Racek) +- ipmi: do not configure ipmi for HPE m400 (Laura Abbott) [1670017] +- IB/rxe: Mark Soft-RoCE Transport driver as tech-preview (Don Dutile) [1605216] +- scsi: smartpqi: add inspur advantech ids (Don Brace) +- ice: mark driver as tech-preview (Jonathan Toppins) +- kABI: Add generic kABI macros to use for kABI workarounds (Myron Stowe) [1546831] +- add pci_hw_vendor_status() (Maurizio Lombardi) +- ahci: thunderx2: Fix for errata that affects stop engine (Robert Richter) +- Vulcan: AHCI PCI bar fix for Broadcom Vulcan early silicon (Robert Richter) +- bpf: Add tech preview taint for syscall (Eugene Syromiatnikov) [1559877] +- bpf: set unprivileged_bpf_disabled to 1 by default, add a boot parameter (Eugene Syromiatnikov) [1561171] +- add Red Hat-specific taint flags (Eugene Syromiatnikov) [1559877] +- kdump: fix a grammar issue in a kernel message (Dave Young) [1507353] +- tags.sh: Ignore redhat/rpm (Jeremy Cline) +- put RHEL info into generated headers (Laura Abbott) [1663728] +- kdump: add support for crashkernel=auto (Jeremy Cline) +- kdump: round up the total memory size to 128M for crashkernel reservation (Dave Young) [1507353] +- acpi: prefer booting with ACPI over DTS (Mark Salter) [1576869] +- aarch64: acpi scan: Fix regression related to X-Gene UARTs (Mark Salter) [1519554] +- ACPI / irq: Workaround firmware issue on X-Gene based m400 (Mark Salter) [1519554] +- modules: add rhelversion MODULE_INFO tag (Laura Abbott) +- ACPI: APEI: arm64: Ignore broken HPE moonshot APEI support (Al Stone) [1518076] +- Add Red Hat tainting (Laura Abbott) [1565704] +- Introduce CONFIG_RH_DISABLE_DEPRECATED (Laura Abbott) +- Stop merging ark-patches for release (Don Zickus) +- Fix path location for ark-update-configs.sh (Don Zickus) +- Combine Red Hat patches into single patch (Don Zickus) +- New configs in drivers/misc (Jeremy Cline) +- New configs in drivers/net/wireless (Justin M. Forbes) +- New configs in drivers/phy (Fedora Kernel Team) +- New configs in drivers/tty (Fedora Kernel Team) +- Set SquashFS decompression options for all flavors to match RHEL (Bohdan Khomutskyi) +- configs: Enable CONFIG_ENERGY_MODEL (Phil Auld) +- New configs in drivers/pinctrl (Fedora Kernel Team) +- Update CONFIG_THERMAL_NETLINK (Justin Forbes) +- Separate merge-upstream and release stages (Don Zickus) +- Re-enable CONFIG_IR_SERIAL on Fedora (Prarit Bhargava) +- Create Patchlist.changelog file (Don Zickus) +- Filter out upstream commits from changelog (Don Zickus) +- Merge Upstream script fixes (Don Zickus) +- kernel.spec: Remove kernel-keys directory on rpm erase (Prarit Bhargava) +- Add mlx5_vdpa to module filter for Fedora (Justin M. Forbes) +- Add python3-sphinx_rtd_theme buildreq for docs (Justin M. Forbes) +- redhat/configs/process_configs.sh: Remove *.config.orig files (Prarit Bhargava) +- redhat/configs/process_configs.sh: Add process_configs_known_broken flag (Prarit Bhargava) +- redhat/Makefile: Fix '*-configs' targets (Prarit Bhargava) +- dist-merge-upstream: Checkout known branch for ci scripts (Don Zickus) +- kernel.spec: don't override upstream compiler flags for ppc64le (Dan Horák) +- Fedora config updates (Justin M. Forbes) +- Fedora confi gupdate (Justin M. Forbes) +- mod-sign.sh: Fix syntax flagged by shellcheck (Ben Crocker) +- Swap how ark-latest is built (Don Zickus) +- Add extra version bump to os-build branch (Don Zickus) +- dist-release: Avoid needless version bump. (Don Zickus) +- Add dist-fedora-release target (Don Zickus) +- Remove redundant code in dist-release (Don Zickus) +- Makefile.common rename TAG to _TAG (Don Zickus) +- Fedora config change (Justin M. Forbes) +- Fedora filter update (Justin M. Forbes) +- Config update for Fedora (Justin M. Forbes) +- enable PROTECTED_VIRTUALIZATION_GUEST for all s390x kernels (Dan Horák) +- redhat: ark: enable CONFIG_NET_SCH_TAPRIO (Davide Caratti) +- redhat: ark: enable CONFIG_NET_SCH_ETF (Davide Caratti) +- More Fedora config updates (Justin M. Forbes) +- New config deps (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- First half of config updates for Fedora (Justin M. Forbes) +- Updates for Fedora arm architectures for the 5.9 window (Peter Robinson) +- Merge 5.9 config changes from Peter Robinson (Justin M. Forbes) +- Add config options that only show up when we prep on arm (Justin M. Forbes) +- Config updates for Fedora (Justin M. Forbes) +- fedora: enable enery model (Peter Robinson) +- Use the configs/generic config for SND_HDA_INTEL everywhere (Peter Robinson) +- Enable ZSTD compression algorithm on all kernels (Peter Robinson) +- Enable ARM_SMCCC_SOC_ID on all aarch64 kernels (Peter Robinson) +- iio: enable LTR-559 light and proximity sensor (Peter Robinson) +- iio: chemical: enable some popular chemical and partical sensors (Peter Robinson) +- More mismatches (Justin M. Forbes) +- Fedora config change due to deps (Justin M. Forbes) +- CONFIG_SND_SOC_MAX98390 is now selected by SND_SOC_INTEL_DA7219_MAX98357A_GENERIC (Justin M. Forbes) +- Config change required for build part 2 (Justin M. Forbes) +- Config change required for build (Justin M. Forbes) +- Fedora config update (Justin M. Forbes) +- Add ability to sync upstream through Makefile (Don Zickus) +- Add master merge check (Don Zickus) +- Replace hardcoded values 'os-build' and project id with variables (Don Zickus) +- redhat/Makefile.common: Fix MARKER (Prarit Bhargava) +- gitattributes: Remove unnecesary export restrictions (Prarit Bhargava) +- Add new certs for dual signing with boothole (Justin M. Forbes) +- Update secureboot signing for dual keys (Justin M. Forbes) - fedora: enable LEDS_SGM3140 for arm configs (Peter Robinson) -- Updated changelog for the release based on v5.8-rc7 (Fedora Kernel Team) - -* Mon Jul 27 2020 Fedora Kernel Team [5.8.0-0.rc7.1] -- v5.8-rc7 rebase -- Updated changelog for the release based on 04300d66f0a0 (Fedora Kernel Team) - -* Sun Jul 26 2020 Fedora Kernel Team [5.8.0-0.rc6.20200726git04300d66f0a0.1] -- 04300d66f0a0 rebase -- Updated changelog for the release based on 23ee3e4e5bd2 (Fedora Kernel Team) - -* Sat Jul 25 2020 Fedora Kernel Team [5.8.0-0.rc6.20200725git23ee3e4e5bd2.1] -- 23ee3e4e5bd2 rebase -- Enable CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG ("Justin M. Forbes") -- Updated changelog for the release based on f37e99aca03f (Fedora Kernel Team) - -* Fri Jul 24 2020 Fedora Kernel Team [5.8.0-0.rc6.20200724gitf37e99aca03f.1] -- f37e99aca03f rebase -- Updated changelog for the release based on d15be546031c (Fedora Kernel Team) - -* Thu Jul 23 2020 Fedora Kernel Team [5.8.0-0.rc6.20200723gitd15be546031c.1] -- d15be546031c rebase -- fedora: arm: Update some meson config options (Peter Robinson) -- Updated changelog for the release based on 4fa640dc5230 (Fedora Kernel Team) - -* Tue Jul 21 2020 Fedora Kernel Team [5.8.0-0.rc6.20200721git4fa640dc5230.1] -- 4fa640dc5230 rebase -- Updated changelog for the release based on 5714ee50bb43 (Fedora Kernel Team) -- redhat/docs: Add Fedora RPM tagging date (Prarit Bhargava) - -* Mon Jul 20 2020 Fedora Kernel Team [5.8.0-0.rc6.20200720git5714ee50bb43.1] -- 5714ee50bb43 rebase -- Updated changelog for the release based on f932d58abc38 (Fedora Kernel Team) - -* Sun Jul 19 2020 Fedora Kernel Team [5.8.0-0.rc5.20200719gitf932d58abc38.1] -- f932d58abc38 rebase -- Updated changelog for the release based on 6a70f89cc58f (Fedora Kernel Team) - -* Sat Jul 18 2020 Fedora Kernel Team [5.8.0-0.rc5.20200718git6a70f89cc58f.1] -- 6a70f89cc58f rebase -- Updated changelog for the release based on 07a56bb875af (Fedora Kernel Team) - -* Fri Jul 17 2020 Fedora Kernel Team [5.8.0-0.rc5.20200717git07a56bb875af.1] -- 07a56bb875af rebase +- Enable CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG (Justin M. Forbes) - redhat/configs: Fix common CONFIGs (Prarit Bhargava) - redhat/configs: General CONFIG cleanups (Prarit Bhargava) - redhat/configs: Update & generalize evaluate_configs (Prarit Bhargava) -- arch/x86: Remove vendor specific CPU ID checks (Prarit Bhargava) -- Updated changelog for the release based on e9919e11e219 (Fedora Kernel Team) - -* Wed Jul 15 2020 Fedora Kernel Team [5.8.0-0.rc5.20200715gite9919e11e219.1] -- e9919e11e219 rebase -- arm64: dts: sun50i-a64-pinephone: Add touchscreen support (Ondrej Jirman) -- arm64: dts: sun50i-a64-pinephone: Enable LCD support on PinePhone (Icenowy Zheng) -- drm/panel: st7703: Assert reset prior to powering down the regulators (Ondrej Jirman) -- drm/panel: st7703: Enter sleep after display off (Ondrej Jirman) -- drm/panel: st7703: Add support for Xingbangda XBD599 (Ondrej Jirman) -- drm/panel: st7703: Move generic part of init sequence to enable callback (Ondrej Jirman) -- drm/panel: st7703: Move code specific to jh057n closer together (Ondrej Jirman) -- drm/panel: st7703: Prepare for supporting multiple panels (Ondrej Jirman) -- drm/panel: st7703: Rename functions from jh057n prefix to st7703 (Ondrej Jirman) -- drm/panel: rocktech-jh057n00900: Rename the driver to st7703 (Ondrej Jirman) -- dt-bindings: panel: Add compatible for Xingbangda XBD599 panel (Ondrej Jirman) -- dt-bindings: panel: Convert rocktech, jh057n00900 to yaml (Ondrej Jirman) -- dt-bindings: vendor-prefixes: Add Xingbangda (Icenowy Zheng) -- Revert "arm64: allwinner: dts: a64: add LCD-related device nodes for PinePhone" (Peter Robinson) -- Revert "drm/sun4i: sun6i_mipi_dsi: fix horizontal timing calculation" (Peter Robinson) -- Revert "drm: panel: add Xingbangda XBD599 panel" (Peter Robinson) -- Revert "dt-bindings: panel: add binding for Xingbangda XBD599 panel" (Peter Robinson) -- selinux: allow reading labels before policy is loaded (Jonathan Lebon) -- Fixes "acpi: prefer booting with ACPI over DTS" to be RHEL only (Peter Robinson) +- fedora: arm: Update some meson config options (Peter Robinson) +- redhat/docs: Add Fedora RPM tagging date (Prarit Bhargava) - Update config for renamed panel driver. (Peter Robinson) - Enable SERIAL_SC16IS7XX for SPI interfaces (Peter Robinson) -- Updated changelog for the release based on dcde237b9b0e (Fedora Kernel Team) - -* Wed Jul 08 2020 Fedora Kernel Team [5.8.0-0.rc4.20200708gitdcde237b9b0e.1] -- dcde237b9b0e rebase -- Updated changelog for the release based on v5.8-rc4 (Fedora Kernel Team) - -* Mon Jul 06 2020 Fedora Kernel Team [5.8.0-0.rc4.1] -- v5.8-rc4 rebase -- Updated changelog for the release based on cd77006e01b3 (Fedora Kernel Team) - -* Thu Jul 02 2020 Fedora Kernel Team [5.8.0-0.rc3.20200702gitcd77006e01b3.1] -- cd77006e01b3 rebase -- Updated changelog for the release based on v5.8-rc3 (Fedora Kernel Team) - -* Mon Jun 29 2020 Fedora Kernel Team [5.8.0-0.rc3.1] -- v5.8-rc3 rebase - s390x-zfcpdump: Handle missing Module.symvers file (Don Zickus) -- Updated changelog for the release based on 8be3a53e18e0 (Fedora Kernel Team) - -* Thu Jun 25 2020 Fedora Kernel Team [5.8.0-0.rc2.20200625git8be3a53e18e0.1] -- 8be3a53e18e0 rebase -- redhat: Replace hardware.redhat.com link in Unsupported message (Prarit Bhargava) +- Fedora config updates (Justin M. Forbes) - redhat/configs: Add .tmp files to .gitignore (Prarit Bhargava) - disable uncommon TCP congestion control algorithms (Davide Caratti) -- Updated changelog for the release based on dd0d718152e4 (Fedora Kernel Team) - -* Tue Jun 23 2020 Fedora Kernel Team [5.8.0-0.rc2.20200623gitdd0d718152e4.1] -- dd0d718152e4 rebase -- Add new bpf man pages ("Justin M. Forbes") -- Add default option for CONFIG_ARM64_BTI_KERNEL to pending-common so that eln kernels build ("Justin M. Forbes") -- Updated changelog for the release based on 625d3449788f (Fedora Kernel Team) - -* Mon Jun 22 2020 Fedora Kernel Team [5.8.0-0.rc2.20200622git625d3449788f.1] -- 625d3449788f rebase -- Updated changelog for the release based on 1b5044021070 (Fedora Kernel Team) - -* Thu Jun 18 2020 Fedora Kernel Team [5.8.0-0.rc1.20200618git1b5044021070.1] -- 1b5044021070 rebase +- Add new bpf man pages (Justin M. Forbes) +- Add default option for CONFIG_ARM64_BTI_KERNEL to pending-common so that eln kernels build (Justin M. Forbes) - redhat/Makefile: Add fedora-configs and rh-configs make targets (Prarit Bhargava) -- Updated changelog for the release based on 69119673bd50 (Fedora Kernel Team) - redhat/configs: Use SHA512 for module signing (Prarit Bhargava) - genspec.sh: 'touch' empty Patchlist file for single tarball (Don Zickus) - -* Wed Jun 17 2020 Fedora Kernel Team [5.8.0-0.rc1.20200617git69119673bd50.1] -- 69119673bd50 rebase -- Updated changelog for the release based on a5dc8300df75 (Fedora Kernel Team) - -* Tue Jun 16 2020 Fedora Kernel Team [5.8.0-0.rc1.20200616gita5dc8300df75.1] -- a5dc8300df75 rebase -- Fedora config update for rc1 ("Justin M. Forbes") -- Updated changelog for the release based on v5.8-rc1 (Fedora Kernel Team) - -* Sun Jun 14 2020 Fedora Kernel Team [5.8.0-0.rc1.1] -- v5.8-rc1 rebase -- Updated changelog for the release based on df2fbf5bfa0e (Fedora Kernel Team) - -* Sat Jun 13 2020 Fedora Kernel Team [5.8.0-0.rc0.20200613gitdf2fbf5bfa0e.1] -- df2fbf5bfa0e rebase -- Updated changelog for the release based on b791d1bdf921 (Fedora Kernel Team) - -* Fri Jun 12 2020 Fedora Kernel Team [5.8.0-0.rc0.20200612gitb791d1bdf921.1] -- b791d1bdf921 rebase -- PCI: tegra: Revert raw_violation_fixup for tegra124 (Nicolas Chauvet) -- One more Fedora config update ("Justin M. Forbes") -- Change ark CONFIG_COMMON_CLK to yes, it is selected already by other options ("Justin M. Forbes") -- Fix PATCHLEVEL for merge window ("Justin M. Forbes") -- More module filtering for Fedora ("Justin M. Forbes") -- Update filters for rnbd in Fedora ("Justin M. Forbes") +- Fedora config update for rc1 (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) - redhat/Makefile.common: fix RPMKSUBLEVEL condition (Ondrej Mosnacek) - redhat/Makefile: silence KABI tar output (Ondrej Mosnacek) -- Fix up module filtering for 5.8 ("Justin M. Forbes") -- More Fedora config work ("Justin M. Forbes") -- RTW88BE and CE have been extracted to their own modules ("Justin M. Forbes") -- Set CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK for Fedora ("Justin M. Forbes") -- Arm64 Use Branch Target Identification for kernel ("Justin M. Forbes") -- Fedora config updates ("Justin M. Forbes") -- Change value of CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE ("Justin M. Forbes") -- Fix configs for Fedora ("Justin M. Forbes") +- One more Fedora config update (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fix PATCHLEVEL for merge window (Justin M. Forbes) +- Change ark CONFIG_COMMON_CLK to yes, it is selected already by other options (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- More module filtering for Fedora (Justin M. Forbes) +- Update filters for rnbd in Fedora (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fix up module filtering for 5.8 (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- More Fedora config work (Justin M. Forbes) +- RTW88BE and CE have been extracted to their own modules (Justin M. Forbes) +- Set CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK for Fedora (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Arm64 Use Branch Target Identification for kernel (Justin M. Forbes) +- Change value of CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE (Justin M. Forbes) +- Fedora config updates (Justin M. Forbes) +- Fix configs for Fedora (Justin M. Forbes) +- Add zero-commit to format-patch options (Justin M. Forbes) +- Copy Makefile.rhelver as a source file rather than a patch (Jeremy Cline) +- Move the sed to clear the patch templating outside of conditionals (Justin M. Forbes) +- Match template format in kernel.spec.template (Justin M. Forbes) +- Break out the Patches into individual files for dist-git (Justin M. Forbes) +- Break the Red Hat patch into individual commits (Jeremy Cline) - Fix update_scripts.sh unselective pattern sub (David Howells) -- Updated changelog for the release based on b0c3ba31be3e ("CKI@GitLab") -- Drop the static path configuration for the Sphinx docs (Jeremy Cline) -- Sign off generated configuration patches (Jeremy Cline) +- Add cec to the filter overrides (Justin M. Forbes) +- Add overrides to filter-modules.sh (Justin M. Forbes) +- redhat/configs: Enable CONFIG_SMC91X and disable CONFIG_SMC911X (Prarit Bhargava) [1722136] +- Include bpftool-struct_ops man page in the bpftool package (Jeremy Cline) +- Add sharedbuffer_configuration.py to the pathfix.py script (Jeremy Cline) - Use __make macro instead of make (Tom Stellard) -- redhat/configs: Enable CONFIG_SMC91X and disable CONFIG_SMC911X (Prarit Bhargava) [http://bugzilla.redhat.com/1722136] - -* Thu May 28 2020 CKI@GitLab [5.7.0-0.rc7.20200528gitb0c3ba31be3e.1] -- b0c3ba31be3e rebase -- Updated changelog for the release based on 444fc5cde643 ("CKI@GitLab") - -* Wed May 27 2020 CKI@GitLab [5.7.0-0.rc7.20200527git444fc5cde643.1] -- 444fc5cde643 rebase -- platform/x86: sony-laptop: SNC calls should handle BUFFER types (Mattia Dongili) -- virt: vbox: Log unknown ioctl requests as error (Hans de Goede) -- virt: vbox: Add a few new vmmdev request types to the userspace whitelist (Hans de Goede) -- virt: vbox: Add support for the new VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES ioctl (Hans de Goede) -- virt: vbox: Add vbg_set_host_capabilities() helper function (Hans de Goede) -- virt: vbox: Rename guest_caps struct members to set_guest_caps (Hans de Goede) -- virt: vbox: Fix guest capabilities mask check (Hans de Goede) -- virt: vbox: Fix VBGL_IOCTL_VMMDEV_REQUEST_BIG and _LOG req numbers to match upstream (Hans de Goede) -- kms/nv50-: Share DP SST mode_valid() handling with MST (Lyude Paul) -- kms/nv50-: Move 8BPC limit for MST into nv50_mstc_get_modes() (Lyude Paul) -- kms/gv100-: Add support for interlaced modes (Lyude Paul) -- kms/nv50-: Probe SOR and PIOR caps for DP interlacing support (Lyude Paul) -- kms/nv50-: Initialize core channel in nouveau_display_create() (Lyude Paul) -- disp/hda/gv100-: NV_PDISP_SF_AUDIO_CNTRL0 register moved (Ben Skeggs) -- disp/hda/gf119-: select HDA device entry based on bound head (Ben Skeggs) -- disp/hda/gf119-: add HAL for programming device entry in SF (Ben Skeggs) -- disp/hda/gt215-: pass head to nvkm_ior.hda.eld() (Ben Skeggs) -- disp/nv50-: increase timeout on pio channel free() polling (Ben Skeggs) -- kms: Fix regression by audio component transition (Takashi Iwai) -- device: use regular PRI accessors in chipset detection (Ben Skeggs) -- device: detect vGPUs (Karol Herbst) -- device: detect if changing endianness failed (Karol Herbst) -- device: rework mmio mapping code to get rid of second map (Karol Herbst) -- mmu: Remove unneeded semicolon (Zheng Bin) -- drm: Use generic helper to check _PR3 presence (Kai-Heng Feng) -- acr: Use kmemdup instead of kmalloc and memcpy (Zou Wei) -- core/memory: remove redundant assignments to variable ret (Colin Ian King) -- disp/gv100-: expose capabilities class (Ben Skeggs) -- Remove typoed config file aarch64CONFIG_SM_GCC_8150 ("Justin M. Forbes") -- Updated changelog for the release based on v5.7-rc7 ("CKI@GitLab") +- Sign off generated configuration patches (Jeremy Cline) +- Drop the static path configuration for the Sphinx docs (Jeremy Cline) - redhat: Add dummy-module kernel module (Prarit Bhargava) - redhat: enable CONFIG_LWTUNNEL_BPF (Jiri Benc) - -* Mon May 25 2020 CKI@GitLab [5.7.0-0.rc7.1] -- v5.7-rc7 rebase -- Updated changelog for the release based on caffb99b6929 ("CKI@GitLab") - -* Sun May 24 2020 CKI@GitLab [5.7.0-0.rc6.20200524gitcaffb99b6929.1] -- caffb99b6929 rebase -- Updated changelog for the release based on 444565650a5f ("CKI@GitLab") - -* Sat May 23 2020 CKI@GitLab [5.7.0-0.rc6.20200523git444565650a5f.1] -- 444565650a5f rebase -- x86: Fix compile issues with rh_check_supported() (Don Zickus) -- redhat/Makefile: Fix RHEL8 python warning (Prarit Bhargava) +- Remove typoed config file aarch64CONFIG_SM_GCC_8150 (Justin M. Forbes) +- Add Documentation back to kernel-devel as it has Kconfig now (Justin M. Forbes) +- Copy distro files rather than moving them (Jeremy Cline) - kernel.spec: fix 'make scripts' for kernel-devel package (Brian Masney) - Makefile: correct help text for dist-cross--rpms (Brian Masney) -- Add Documentation back to kernel-devel as it has Kconfig now ("Justin M. Forbes") -- Updated changelog for the release based on 642b151f45dd ("CKI@GitLab") +- redhat/Makefile: Fix RHEL8 python warning (Prarit Bhargava) - redhat: Change Makefile target names to dist- (Prarit Bhargava) - configs: Disable Serial IR driver (Prarit Bhargava) - -* Tue May 19 2020 CKI@GitLab [5.7.0-0.rc6.20200519git642b151f45dd.1] -- 642b151f45dd rebase -- pwm: lpss: Fix get_state runtime-pm reference handling (Hans de Goede) -- Updated changelog for the release based on v5.7-rc6 ("CKI@GitLab") - -* Mon May 18 2020 CKI@GitLab [5.7.0-0.rc6.1] -- v5.7-rc6 rebase -- Updated changelog for the release based on 3d1c1e5931ce ("CKI@GitLab") - -* Sun May 17 2020 CKI@GitLab [5.7.0-0.rc5.20200517git3d1c1e5931ce.1] -- 3d1c1e5931ce rebase -- Updated changelog for the release based on 12bf0b632ed0 ("CKI@GitLab") - -* Sat May 16 2020 CKI@GitLab [5.7.0-0.rc5.20200516git12bf0b632ed0.1] -- 12bf0b632ed0 rebase -- Updated changelog for the release based on 1ae7efb38854 ("CKI@GitLab") - -* Fri May 15 2020 CKI@GitLab [5.7.0-0.rc5.20200515git1ae7efb38854.1] -- 1ae7efb38854 rebase -- Updated changelog for the release based on 24085f70a6e1 ("CKI@GitLab") - -* Wed May 13 2020 CKI@GitLab [5.7.0-0.rc5.20200513git24085f70a6e1.1] -- 24085f70a6e1 rebase -- Updated changelog for the release based on 152036d1379f ("CKI@GitLab") - -* Tue May 12 2020 CKI@GitLab [5.7.0-0.rc5.20200512git152036d1379f.1] -- 152036d1379f rebase -- Updated changelog for the release based on v5.7-rc5 ("CKI@GitLab") - Fix "multiple files for package kernel-tools" (Pablo Greco) - -* Mon May 11 2020 CKI@GitLab [5.7.0-0.rc5.1] -- v5.7-rc5 rebase -- Updated changelog for the release based on e99332e7b4cd ("CKI@GitLab") - -* Sun May 10 2020 CKI@GitLab [5.7.0-0.rc4.20200510gite99332e7b4cd.1] -- e99332e7b4cd rebase -- Updated changelog for the release based on d5eeab8d7e26 ("CKI@GitLab") - -* Sat May 09 2020 CKI@GitLab [5.7.0-0.rc4.20200509gitd5eeab8d7e26.1] -- d5eeab8d7e26 rebase -- Add zero-commit to format-patch options ("Justin M. Forbes") -- Updated changelog for the release based on 79dede78c057 ("CKI@GitLab") - Introduce a Sphinx documentation project (Jeremy Cline) - -* Fri May 08 2020 CKI@GitLab [5.7.0-0.rc4.20200508git79dede78c057.1] -- 79dede78c057 rebase -- Updated changelog for the release based on a811c1fa0a02 ("CKI@GitLab") - -* Thu May 07 2020 CKI@GitLab [5.7.0-0.rc4.20200507gita811c1fa0a02.1] -- a811c1fa0a02 rebase -- perf cs-etm: Move defined of traceid_list (Leo Yan) -- Updated changelog for the release based on dc56c5acd850 ("CKI@GitLab") - -* Wed May 06 2020 CKI@GitLab [5.7.0-0.rc4.20200506gitdc56c5acd850.1] -- dc56c5acd850 rebase -- Updated changelog for the release based on 47cf1b422e60 ("CKI@GitLab") - -* Tue May 05 2020 CKI@GitLab [5.7.0-0.rc4.20200505git47cf1b422e60.1] -- 47cf1b422e60 rebase - Build ARK against ELN (Don Zickus) -- Updated changelog for the release based on v5.7-rc4 ("CKI@GitLab") - -* Mon May 04 2020 CKI@GitLab [5.7.0-0.rc4.1] -- v5.7-rc4 rebase -- Updated changelog for the release based on f66ed1ebbfde ("CKI@GitLab") - -* Sun May 03 2020 CKI@GitLab [5.7.0-0.rc3.20200503gitf66ed1ebbfde.1] -- f66ed1ebbfde rebase -- Updated changelog for the release based on 690e2aba7beb ("CKI@GitLab") - -* Sat May 02 2020 CKI@GitLab [5.7.0-0.rc3.20200502git690e2aba7beb.1] -- 690e2aba7beb rebase -- Updated changelog for the release based on c45e8bccecaf ("CKI@GitLab") - Drop the requirement to have a remote called linus (Jeremy Cline) - Rename 'internal' branch to 'os-build' (Don Zickus) - -* Fri May 01 2020 CKI@GitLab [5.7.0-0.rc3.20200501gitc45e8bccecaf.1] -- c45e8bccecaf rebase -- Updated changelog for the release based on 1d2cc5ac6f66 ("CKI@GitLab") - -* Wed Apr 29 2020 CKI@GitLab [5.7.0-0.rc3.20200429git1d2cc5ac6f66.1] -- 1d2cc5ac6f66 rebase -- Add cec to the filter overrides ("Justin M. Forbes") -- Add overrides to filter-modules.sh ("Justin M. Forbes") -- Copy Makefile.rhelver as a source file rather than a patch (Jeremy Cline) -- Move the sed to clear the patch templating outside of conditionals ("Justin M. Forbes") - Only include open merge requests with "Include in Releases" label (Jeremy Cline) +- Package gpio-watch in kernel-tools (Jeremy Cline) - Exit non-zero if the tag already exists for a release (Jeremy Cline) - Adjust the changelog update script to not push anything (Jeremy Cline) - Drop --target noarch from the rh-rpms make target (Jeremy Cline) - -* Fri Apr 24 2020 CKI@GitLab [5.7.0-0.rc2.20200424gitb4f633221f0a.1] -- b4f633221f0a rebase - -* Thu Apr 23 2020 CKI@GitLab [5.7.0-0.rc2.20200423git7adc4b399952.1] -- 7adc4b399952 rebase -- Match template format in kernel.spec.template ("Justin M. Forbes") -- Break out the Patches into individual files for dist-git ("Justin M. Forbes") -- Break the Red Hat patch into individual commits (Jeremy Cline) -- Adjust module filtering so CONFIG_DRM_DP_CEC can be set (Jeremy Cline) - Add a script to generate release tags and branches (Jeremy Cline) -- Set CONFIG_VDPA for fedora ("Justin M. Forbes") +- Set CONFIG_VDPA for fedora (Justin M. Forbes) +- Add a README to the dist-git repository (Jeremy Cline) - Provide defaults in ark-rebase-patches.sh (Jeremy Cline) - Default ark-rebase-patches.sh to not report issues (Jeremy Cline) - -* Mon Apr 20 2020 Jeremy Cline [5.7.0-0.rc2.2] -- Package gpio-watch in kernel-tools (Jeremy Cline) - -* Mon Apr 20 2020 Jeremy Cline [5.7.0-0.rc2.1] -- v5.7-rc2 rebase -- Add a README to the dist-git repository (Jeremy Cline) -- Copy distro files rather than moving them (Jeremy Cline) - Drop DIST from release commits and tags (Jeremy Cline) - Place the buildid before the dist in the release (Jeremy Cline) - Sync up with Fedora arm configuration prior to merging (Jeremy Cline) - Disable CONFIG_PROTECTED_VIRTUALIZATION_GUEST for zfcpdump (Jeremy Cline) - -* Tue Apr 14 2020 Jeremy Cline [5.7.0-0.rc1.3.fc33] -- Include bpftool-struct_ops man page in the bpftool package (Jeremy Cline) - -* Mon Apr 13 2020 Jeremy Cline [5.7.0-0.rc1.2.fc33] -- Add sharedbuffer_configuration.py to the pathfix.py script (Jeremy Cline) - -* Mon Apr 13 2020 Jeremy Cline [5.7.0-0.rc1.1.fc33] -- v5.7-rc1 rebase -- tty/sysrq: Export sysrq_mask() (Dmitry Safonov) -- e1000e: bump up timeout to wait when ME un-configure ULP mode (Aaron Ma) +- Add RHMAINTAINERS file and supporting conf (Don Zickus) +- Add a script to test if all commits are signed off (Jeremy Cline) +- Fix make rh-configs-arch (Don Zickus) - Drop RH_FEDORA in favor of the now-merged RHEL_DIFFERENCES (Jeremy Cline) - Sync up Fedora configs from the first week of the merge window (Jeremy Cline) -- Add a script to test if all commits are signed off (Jeremy Cline) -- Fix a painfully obvious YAML syntax error in .gitlab-ci.yml (Jeremy Cline) - Migrate blacklisting floppy.ko to mod-blacklist.sh (Don Zickus) - kernel packaging: Combine mod-blacklist.sh and mod-extra-blacklist.sh (Don Zickus) - kernel packaging: Fix extra namespace collision (Don Zickus) - mod-extra.sh: Rename to mod-blacklist.sh (Don Zickus) - mod-extra.sh: Make file generic (Don Zickus) -- Fix make rh-configs-arch (Don Zickus) +- Fix a painfully obvious YAML syntax error in .gitlab-ci.yml (Jeremy Cline) - Add in armv7hl kernel header support (Don Zickus) - Disable all BuildKernel commands when only building headers (Don Zickus) -- Add RHMAINTAINERS file and supporting conf (Don Zickus) - -* Mon Mar 30 2020 Jeremy Cline [5.6.0-0.rc7.1.elrdy] -- v5.6-rc7 rebase - Drop any gitlab-ci patches from ark-patches (Jeremy Cline) - Build the srpm for internal branch CI using the vanilla tree (Jeremy Cline) -- arm64: allwinner: dts: a64: add LCD-related device nodes for PinePhone (Icenowy Zheng) -- drm/sun4i: sun6i_mipi_dsi: fix horizontal timing calculation (Icenowy Zheng) -- drm: panel: add Xingbangda XBD599 panel (Icenowy Zheng) -- dt-bindings: panel: add binding for Xingbangda XBD599 panel (Icenowy Zheng) - Pull in the latest ARM configurations for Fedora (Jeremy Cline) -- USB: pci-quirks: Add Raspberry Pi 4 quirk (Nicolas Saenz Julienne) -- PCI: brcmstb: Wait for Raspberry Pi's firmware when present (Nicolas Saenz Julienne) -- firmware: raspberrypi: Introduce vl805 init routine (Nicolas Saenz Julienne) -- soc: bcm2835: Sync xHCI reset firmware property with downstream (Nicolas Saenz Julienne) -- drm/i915: Force DPCD backlight mode for some Dell CML 2020 panels (Lyude Paul) -- drm/i915: Force DPCD backlight mode on X1 Extreme 2nd Gen 4K AMOLED panel (Lyude Paul) -- drm/dp: Introduce EDID-based quirks (Lyude Paul) -- drm/i915: Auto detect DPCD backlight support by default (Lyude Paul) -- drm/i915: Fix DPCD register order in intel_dp_aux_enable_backlight() (Lyude Paul) -- drm/i915: Assume 100 brightness when not in DPCD control mode (Lyude Paul) -- drm/i915: Fix eDP DPCD aux max backlight calculations (Lyude Paul) -- drm/dp_mst: Fix drm_dp_check_mstb_guid() return code (Lyude Paul) -- drm/dp_mst: Make drm_dp_mst_dpcd_write() consistent with drm_dp_dpcd_write() (Lyude Paul) -- drm/dp_mst: Fix W=1 warnings (Benjamin Gaignard) -- ARM: fix __get_user_check() in case uaccess_* calls are not inlined (Masahiro Yamada) -- mm/kmemleak: skip late_init if not skip disable (Murphy Zhou) -- KEYS: Make use of platform keyring for module signature verify (Robert Holmes) -- Drop that for now (Laura Abbott) -- Input: rmi4 - remove the need for artificial IRQ in case of HID (Benjamin Tissoires) -- arm64: dts: rockchip: Add initial support for Pinebook Pro (Tobias Schramm) -- dt-bindings: Add doc for Pine64 Pinebook Pro (Emmanuel Vadot) -- arm64: dts: allwinner: Add initial support for Pine64 PinePhone (Ondrej Jirman) -- dt-bindings: arm: sunxi: Add PinePhone 1.0 and 1.1 bindings (Ondrej Jirman) -- arm64: dts: sun50i-a64: Add i2c2 pins (Ondrej Jirman) -- arm64: dts: allwinner: a64: add support for PineTab (Icenowy Zheng) -- dt-bindings: arm: sunxi: add binding for PineTab tablet (Icenowy Zheng) -- arm64: allwinner: a64: enable LCD-related hardware for Pinebook (Icenowy Zheng) -- drm/panel: simple: Add NewEast Optoelectronics CO., LTD WJFH116008A panel support (Vasily Khoruzhick) -- dt-bindings: display: simple: Add NewEast Optoelectronics WJFH116008A compatible (Vasily Khoruzhick) -- dt-bindings: Add Guangdong Neweast Optoelectronics CO. LTD vendor prefix (Vasily Khoruzhick) -- drm/bridge: anx6345: don't print error message if regulator is not ready (Vasily Khoruzhick) -- drm/bridge: anx6345: Fix getting anx6345 regulators (Samuel Holland) -- arm64: dts: allwinner: a64: Add MBUS controller node (Jernej Skrabec) -- dt-bindings: interconnect: sunxi: Add A64 MBUS compatible (Jernej Skrabec) -- arm64: dts: allwinner: pinebook: Remove unused AXP803 regulators (Samuel Holland) -- arm64: dts: allwinner: pinebook: Fix 5v0 boost regulator (Samuel Holland) -- arm64: dts: allwinner: pinebook: Fix backlight regulator (Samuel Holland) -- arm64: dts: allwinner: pinebook: Add GPIO port regulators (Samuel Holland) -- arm64: dts: allwinner: pinebook: Document MMC0 CD pin name (Samuel Holland) -- arm64: dts: allwinner: pinebook: Make simplefb more consistent (Samuel Holland) -- arm64: dts: allwinner: pinebook: Sort device tree nodes (Samuel Holland) -- arm64: dts: allwinner: pinebook: Remove unused vcc3v3 regulator (Samuel Holland) -- arm64: dts: imx8mq-phanbell: Add support for ethernet (Alifer Moraes) -- backlight: lp855x: Ensure regulators are disabled on probe failure (Jon Hunter) -- regulator: pwm: Don't warn on probe deferral (Jon Hunter) -- ARM64: tegra: Fix Tegra194 PCIe compatible string ("Signed-off-by: Jon Hunter") -- serial: 8250_tegra: Create Tegra specific 8250 driver (Jeff Brasen) -- ARM64: tegra: Populate LP8557 backlight regulator (Jon Hunter) -- ARM64: tegra: Fix Tegra186 SOR supply (Jon Hunter) -- ARM64: tegra: Add EEPROM supplies (Jon Hunter) -- ARM64: Tegra: Enable I2C controller for EEPROM (Jon Hunter) -- ARM: dts: bcm2711: Move emmc2 into its own bus (Nicolas Saenz Julienne) -- irqchip/bcm2835: Quiesce IRQs left enabled by bootloader (Lukas Wunner) -- ARM: dts: bcm2711-rpi-4-b: Add SoC GPIO labels (Stefan Wahren) -- pinctrl: bcm2835: Add support for all GPIOs on BCM2711 (Stefan Wahren) -- pinctrl: bcm2835: Refactor platform data (Stefan Wahren) -- pinctrl: bcm2835: Drop unused define (Stefan Wahren) -- ARM: tegra: usb no reset (Peter Robinson) -- arm: make CONFIG_HIGHPTE optional without CONFIG_EXPERT (Jon Masters) -- Revert "Add a SysRq option to lift kernel lockdown" (Jeremy Cline) - Fix xz memory usage issue (Neil Horman) - Use ark-latest instead of master for update script (Jeremy Cline) - Move the CI jobs back into the ARK repository (Jeremy Cline) -- Revert "[redhat] Apply a second patch set in Fedora build roots" (Jeremy Cline) - Sync up ARK's Fedora config with the dist-git repository (Jeremy Cline) - -* Mon Mar 09 2020 Jeremy Cline [5.6.0-0.rc5.1.elrdy] -- v5.6-rc5 rebase - Pull in the latest configuration changes from Fedora (Jeremy Cline) - configs: enable CONFIG_NET_SCH_CBS (Marcelo Ricardo Leitner) - -* Fri Mar 06 2020 Jeremy Cline [5.6.0-0.rc4.2.elrdy] -- Disable CONFIG_DRM_DP_CEC temporarily (Jeremy Cline) - -* Fri Mar 06 2020 Jeremy Cline [5.6.0-0.rc4.1.elrdy] -- v5.6-rc4 rebase -- redhat: rh_kabi: deduplication friendly structs (Jiri Benc) -- redhat: rh_kabi add a comment with warning about RH_KABI_EXCLUDE usage (Jiri Benc) -- redhat: rh_kabi: introduce RH_KABI_EXTEND_WITH_SIZE (Jiri Benc) -- redhat: rh_kabi: Indirect EXTEND macros so nesting of other macros will resolve. (Don Dutile) -- redhat: rh_kabi: Fix RH_KABI_SET_SIZE to use dereference operator (Tony Camuso) -- redhat: rh_kabi: Add macros to size and extend structs (Prarit Bhargava) -- mptsas: pci-id table changes (Laura Abbott) -- mptsas: Taint kernel if mptsas is loaded (Laura Abbott) -- mptspi: pci-id table changes (Laura Abbott) -- mptspi: Taint kernel if mptspi is loaded (Laura Abbott) -- kernel: add SUPPORT_REMOVED kernel taint (Tomas Henzl) [1602033] -- Rename RH_DISABLE_DEPRECATED to RHEL_DIFFERENCES (Don Zickus) -- Revert "Drop references to SCSI PCI IDs we remove" (Don Zickus) -- Revert "mpt*: remove certain deprecated pci-ids" (Don Zickus) -- Revert "megaraid_sas: remove deprecated pci-ids" (Don Zickus) -- Revert "aacraid: Remove depreciated device and vendor PCI id's" (Don Zickus) -- Revert "qla4xxx: Remove deprecated PCI IDs from RHEL 8" (Don Zickus) -- Revert "hpsa: remove old cciss-based smartarray pci ids" (Don Zickus) -- Revert "hpsa: modify hpsa driver version" (Don Zickus) -- Revert "Removing Obsolete hba pci-ids from rhel8" (Don Zickus) -- Revert "be2iscsi: remove unsupported device IDs" (Don Zickus) -- Revert "be2iscsi: remove BE3 family support" (Don Zickus) -- Revert "qla2xxx: Remove PCI IDs of deprecated adapter" (Don Zickus) - Drop configuration options in fedora/ that no longer exist (Jeremy Cline) - Set RH_FEDORA for ARK and Fedora (Jeremy Cline) -- Add option of 13 for FORCE_MAX_ZONEORDER (Peter Robinson) -- Introduce RH_FEDORA config for Fedora-specific patches (Jeremy Cline) - redhat/kernel.spec: Include the release in the kernel COPYING file (Jeremy Cline) - -* Mon Feb 17 2020 Jeremy Cline [5.6.0-0.rc2.2.elrdy] -- Disable CONFIG_DRM_DP_CEC temporarily (Jeremy Cline) -- Drop references to SCSI PCI IDs we remove (Jeremy Cline) - -* Mon Feb 17 2020 Jeremy Cline [5.6.0-0.rc2.1.elrdy] -- v5.6-rc2 rebase - redhat/kernel.spec: add scripts/jobserver-exec to py3_shbang_opts list (Jeremy Cline) - redhat/kernel.spec: package bpftool-gen man page (Jeremy Cline) - -* Thu Feb 13 2020 Jeremy Cline [5.6.0-0.rc1.4.elrdy] -- Package bpftool-gen man page (Jeremy Cline) - -* Thu Feb 13 2020 Jeremy Cline [5.6.0-0.rc1.3.elrdy] -- Used Python 3 for scripts/jobserver-exec (Jeremy Cline) - -* Wed Feb 12 2020 Jeremy Cline [5.6.0-0.rc1.2.elrdy] -- Disable CONFIG_DRM_DP_CEC temporarily (Jeremy Cline) - -* Wed Feb 12 2020 Jeremy Cline [5.6.0-0.rc1.1.elrdy] -- v5.6-rc1 rebase -- Fix up the EFI secureboot rebase (Jeremy Cline) - distgit-changelog: handle multiple y-stream BZ numbers (Bruno Meneguele) - redhat/kernel.spec: remove all inline comments (Bruno Meneguele) - redhat/genspec: awk unknown whitespace regex pattern (Bruno Meneguele) - Improve the readability of gen_config_patches.sh (Jeremy Cline) - Fix some awkward edge cases in gen_config_patches.sh (Jeremy Cline) -- Updated changelog (Jeremy Cline) - Update the CI environment to use Fedora 31 (Jeremy Cline) - -* Tue Jan 28 2020 Jeremy Cline [5.5.0-1.elrdy] -- v5.5 rebase -- Revert "Turn off CONFIG_AX25" (Laura Abbott) - -* Thu Jan 23 2020 Jeremy Cline [5.5.0-0.rc7.1.elrdy] -- v5.5-rc7 rebase - -* Wed Jan 15 2020 Jeremy Cline [5.5.0-0.rc6.1.elrdy] -- v5.5-rc6 rebase -- s390: Lock down the kernel when the IPL secure flag is set (Jeremy Cline) +- redhat: drop whitespace from with_gcov macro (Jan Stancek) - configs: Enable CONFIG_KEY_DH_OPERATIONS on ARK (Ondrej Mosnacek) -- redhat: drop whitespace from with_gcov macro (Jan Stancek) [INTERNAL] - -* Mon Jan 06 2020 Jeremy Cline [5.5.0-0.rc5.1.elrdy] -- v5.5-rc5 rebase - -* Mon Jan 06 2020 Jeremy Cline [5.5.0-0.rc4.1.elrdy] -- v5.5-rc4 rebase - -* Fri Jan 03 2020 Jeremy Cline [5.5.0-0.rc3.1.elrdy] -- v5.5-rc3 rebase -- Turn on BLAKE2B for Fedora (Jeremy Cline) - configs: Adjust CONFIG_MPLS_ROUTING and CONFIG_MPLS_IPTUNNEL (Laura Abbott) - New configs in lib/crypto (Jeremy Cline) - New configs in drivers/char (Jeremy Cline) - -* Fri Jan 03 2020 Jeremy Cline [5.5.0-0.rc2.1.elrdy] -- v5.5-rc2 rebase -- Convert pr_warning to pr_warn in secureboot.c (Jeremy Cline) -- Enable CRYPTO_BLAKE2B as its being selected automatically (Jeremy Cline) +- Turn on BLAKE2B for Fedora (Jeremy Cline) - kernel.spec.template: Clean up stray *.h.s files (Laura Abbott) - Build the SRPM in the CI job (Jeremy Cline) -- Fix up released_kernel case (Laura Abbott) -- Add label so the Gitlab to email bridge ignores the changelog (Jeremy Cline) - New configs in net/tls (Jeremy Cline) - New configs in net/tipc (Jeremy Cline) - New configs in lib/kunit (Jeremy Cline) +- Fix up released_kernel case (Laura Abbott) - New configs in lib/Kconfig.debug (Jeremy Cline) - New configs in drivers/ptp (Jeremy Cline) - New configs in drivers/nvme (Jeremy Cline) - New configs in drivers/net/phy (Jeremy Cline) +- New configs in arch/arm64 (Jeremy Cline) - New configs in drivers/crypto (Jeremy Cline) - New configs in crypto/Kconfig (Jeremy Cline) -- New configs in arch/arm64 (Jeremy Cline) - -* Fri Dec 13 2019 Jeremy Cline [5.5.0-0.rc1.1.elrdy] -- v5.5-rc1 rebase -- Used Python 3 for scripts/jobserver-exec (Jeremy Cline) -- Drop references to SCSI PCI IDs we remove (Jeremy Cline) -- Disable documentation build, it is broken. (Jeremy Cline) +- Add label so the Gitlab to email bridge ignores the changelog (Jeremy Cline) - Temporarily switch TUNE_DEFAULT to y (Jeremy Cline) - Run config test for merge requests and internal (Jeremy Cline) -- Turn off CONFIG_AX25 (Laura Abbott) - Add missing licensedir line (Laura Abbott) - -* Tue Nov 26 2019 Jeremy Cline [5.4.0-1.elrdy] -- v5.4 rebase - redhat/scripts: Remove redhat/scripts/rh_get_maintainer.pl (Prarit Bhargava) - configs: Take CONFIG_DEFAULT_MMAP_MIN_ADDR from Fedra (Laura Abbott) - configs: Turn off ISDN (Laura Abbott) -- kernel-packaging: Remove kernel files from kernel-modules-extra package (Prarit Bhargava) - Add a script to generate configuration patches (Laura Abbott) - Introduce rh-configs-commit (Laura Abbott) - -* Fri Nov 22 2019 Jeremy Cline [5.4.0-0.rc8.1.elrdy] -- v5.4-rc8 rebase -- kconfig: Add option to get the full help text with listnewconfig (Laura Abbott) +- kernel-packaging: Remove kernel files from kernel-modules-extra package (Prarit Bhargava) - configs: Enable CONFIG_DEBUG_WX (Laura Abbott) - configs: Disable wireless USB (Laura Abbott) - Clean up some temporary config files (Laura Abbott) @@ -3772,60 +4977,11 @@ fi - configs: New config in crypto for v5.4-rc1 (Jeremy Cline) - configs: New config in drivers/usb for v5.4-rc1 (Jeremy Cline) - AUTOMATIC: New configs (Jeremy Cline) - -* Wed Nov 13 2019 Jeremy Cline [5.4.0-0.rc7.1.elrdy] -- v5.4-rc7 rebase -- Temporarily add VBOXSF_FS config (Jeremy Cline) -- Add support for deprecating processors (Laura Abbott) -- Add Red Hat tainting (Laura Abbott) -- Introduce CONFIG_RH_DISABLE_DEPRECATED (Laura Abbott) +- Skip ksamples for bpf, they are broken (Jeremy Cline) - configs: New config in fs/erofs for v5.4-rc1 (Jeremy Cline) - configs: New config in mm for v5.4-rc1 (Jeremy Cline) - configs: New config in drivers/md for v5.4-rc1 (Jeremy Cline) - configs: New config in init for v5.4-rc1 (Jeremy Cline) - -* Wed Nov 06 2019 Jeremy Cline [5.4.0-0.rc6.2.elrdy] -- v5.4-rc6 rebase -- iommu/arm-smmu: workaround DMA mode issues (Laura Abbott) -- rh_taint: correct loaddable module support dependencies (Philipp Rudo) [1652266] -- rh_kabi: introduce RH_KABI_EXCLUDE (Jakub Racek) [1652256] -- mark intel knights landing and knights mill unsupported (David Arcari) [1610493] -- mark whiskey-lake processor supported (David Arcari) [1609604] -- ipmi: do not configure ipmi for HPE m400 (Laura Abbott) [https://bugzilla.redhat.com/show_bug.cgi?id=1670017] -- IB/rxe: Mark Soft-RoCE Transport driver as tech-preview (Don Dutile) [1605216] -- scsi: smartpqi: add inspur advantech ids (Don Brace) [1503736] -- ice: mark driver as tech-preview (Jonathan Toppins) [1495347] -- be2iscsi: remove BE3 family support (Maurizio Lombardi) [1598366] -- update rh_check_supported processor list (David Arcari) [1595918] -- kABI: Add generic kABI macros to use for kABI workarounds (Myron Stowe) [1546831] -- add pci_hw_vendor_status() (Maurizio Lombardi) [1590829] -- ahci: thunderx2: Fix for errata that affects stop engine (Robert Richter) [1563590] -- Vulcan: AHCI PCI bar fix for Broadcom Vulcan early silicon (Robert Richter) [1563590] -- bpf: Add tech preview taint for syscall (Eugene Syromiatnikov) [1559877] -- bpf: set unprivileged_bpf_disabled to 1 by default, add a boot parameter (Eugene Syromiatnikov) [1561171] -- add Red Hat-specific taint flags (Eugene Syromiatnikov) [1559877] -- kdump: fix a grammar issue in a kernel message (Dave Young) [1507353] -- tags.sh: Ignore redhat/rpm (Jeremy Cline) -- put RHEL info into generated headers (Laura Abbott) [https://bugzilla.redhat.com/show_bug.cgi?id=1663728] -- kdump: add support for crashkernel=auto (Jeremy Cline) -- kdump: round up the total memory size to 128M for crashkernel reservation (Dave Young) [1507353] -- acpi: prefer booting with ACPI over DTS (Mark Salter) [1576869] -- aarch64: acpi scan: Fix regression related to X-Gene UARTs (Mark Salter) [1519554] -- ACPI / irq: Workaround firmware issue on X-Gene based m400 (Mark Salter) [1519554] -- add rh_check_supported (David Arcari) [1565717] -- qla2xxx: Remove PCI IDs of deprecated adapter (Jeremy Cline) -- be2iscsi: remove unsupported device IDs (Chris Leech) [1574502] -- Removing Obsolete hba pci-ids from rhel8 (Dick Kennedy) [1572321] -- hpsa: modify hpsa driver version (Jeremy Cline) -- hpsa: remove old cciss-based smartarray pci ids (Joseph Szczypek) [1471185] -- rh_taint: add support for marking driver as unsupported (Jonathan Toppins) [1565704] -- rh_taint: add support (David Arcari) [1565704] -- qla4xxx: Remove deprecated PCI IDs from RHEL 8 (Chad Dupuis) [1518874] -- aacraid: Remove depreciated device and vendor PCI id's (Raghava Aditya Renukunta) [1495307] -- megaraid_sas: remove deprecated pci-ids (Tomas Henzl) [1509329] -- mpt*: remove certain deprecated pci-ids (Jeremy Cline) -- modules: add rhelversion MODULE_INFO tag (Laura Abbott) -- ACPI: APEI: arm64: Ignore broken HPE moonshot APEI support (Al Stone) [1518076] - configs: New config in fs/fuse for v5.4-rc1 (Jeremy Cline) - merge.pl: Avoid comments but do not skip them (Don Zickus) - configs: New config in drivers/net/ethernet/pensando for v5.4-rc1 (Jeremy Cline) @@ -3839,11 +4995,7 @@ fi - kernel.spec.template: Don't run hardlink if rpm-ostree is in use (Laura Abbott) - configs: New config in net/can for v5.4-rc1 (Jeremy Cline) - configs: New config in drivers/net/phy for v5.4-rc1 (Jeremy Cline) -- Updated changelog ("CKI@GitLab") - -* Mon Oct 28 2019 Jeremy Cline [5.4.0-0.rc5.1.elrdy] -- v5.4-rc5 rebase -- arm: aarch64: Drop the EXPERT setting from ARM64_FORCE_52BIT (Jeremy Cline) +- configs: Increase x86_64 NR_UARTS to 64 (Prarit Bhargava) [1730649] - configs: turn on ARM64_FORCE_52BIT for debug builds (Jeremy Cline) - kernel.spec.template: Tweak the python3 mangling (Laura Abbott) - kernel.spec.template: Add --with verbose option (Laura Abbott) @@ -3860,17 +5012,12 @@ fi - configs: New config in arch/aarch64 for v5.4-rc4 (Jeremy Cline) - configs: New config in arch/arm64 for v5.4-rc1 (Jeremy Cline) - Flip off CONFIG_ARM64_VA_BITS_52 so the bundle that turns it on applies (Jeremy Cline) -- configs: Increase x86_64 NR_UARTS to 64 (Prarit Bhargava) [http://bugzilla.redhat.com/1730649] -- Update changelog (Laura Abbott) - New configuration options for v5.4-rc4 (Jeremy Cline) - Correctly name tarball for single tarball builds (Laura Abbott) - configs: New config in drivers/pci for v5.4-rc1 (Jeremy Cline) - Allow overriding the dist tag on the command line (Laura Abbott) - Allow scratch branch target to be overridden (Laura Abbott) - Remove long dead BUILD_DEFAULT_TARGET (Laura Abbott) - -* Thu Oct 17 2019 Jeremy Cline [5.4.0-0.rc3.1.elrdy] -- v5.4-rc3 rebase - Amend the changelog when rebasing (Laura Abbott) - configs: New config in drivers/platform for v5.4-rc1 (Jeremy Cline) - configs: New config in drivers/pinctrl for v5.4-rc1 (Jeremy Cline) @@ -3879,61 +5026,12 @@ fi - configs: New config in drivers/net/can for v5.4-rc1 (Jeremy Cline) - configs: New config in drivers/hid for v5.4-rc1 (Jeremy Cline) - configs: New config in drivers/dma-buf for v5.4-rc1 (Jeremy Cline) +- configs: New config in drivers/crypto for v5.4-rc1 (Jeremy Cline) +- configs: New config in arch/s390 for v5.4-rc1 (Jeremy Cline) - configs: New config in block for v5.4-rc1 (Jeremy Cline) - configs: New config in drivers/cpuidle for v5.4-rc1 (Jeremy Cline) - redhat: configs: Split CONFIG_CRYPTO_SHA512 (Laura Abbott) - redhat: Set Fedora options (Laura Abbott) - -* Wed Oct 09 2019 Jeremy Cline [5.4.0-0.rc2.1.elrdy] -- Skip ksamples for bpf, they are broken (Jeremy Cline) -- Add a SysRq option to lift kernel lockdown (Kyle McMartin) -- efi: Lock down the kernel if booted in secure boot mode (David Howells) -- efi: Add an EFI_SECURE_BOOT flag to indicate secure boot mode (David Howells) -- security: lockdown: expose a hook to lock the kernel down (Jeremy Cline) -- Make get_cert_list() use efi_status_to_str() to print error messages. (Peter Jones) -- Add efi_status_to_str() and rework efi_status_to_err(). (Peter Jones) -- Make get_cert_list() not complain about cert lists that aren't present. (Peter Jones) -- [iommu] iommu/arm-smmu: workaround DMA mode issues (Laura Abbott) -- [kernel] rh_taint: correct loaddable module support dependencies (Philipp Rudo) [1652266] -- [kernel] rh_kabi: introduce RH_KABI_EXCLUDE (Jakub Racek) [1652256] -- [x86] mark intel knights landing and knights mill unsupported (David Arcari) [1610493] -- [x86] mark whiskey-lake processor supported (David Arcari) [1609604] -- [char] ipmi: do not configure ipmi for HPE m400 (Laura Abbott) [https://bugzilla.redhat.com/show_bug.cgi?id=1670017] -- [infiniband] IB/rxe: Mark Soft-RoCE Transport driver as tech-preview (Don Dutile) [1605216] -- [scsi] scsi: smartpqi: add inspur advantech ids (Don Brace) [1503736] -- [netdrv] ice: mark driver as tech-preview (Jonathan Toppins) [1495347] -- [scsi] be2iscsi: remove BE3 family support (Maurizio Lombardi) [1598366] -- [x86] update rh_check_supported processor list (David Arcari) [1595918] -- [kernel] kABI: Add generic kABI macros to use for kABI workarounds (Myron Stowe) [1546831] -- [pci] add pci_hw_vendor_status() (Maurizio Lombardi) [1590829] -- [ata] ahci: thunderx2: Fix for errata that affects stop engine (Robert Richter) [1563590] -- [pci] Vulcan: AHCI PCI bar fix for Broadcom Vulcan early silicon (Robert Richter) [1563590] -- [kernel] bpf: Add tech preview taint for syscall (Eugene Syromiatnikov) [1559877] -- [kernel] bpf: set unprivileged_bpf_disabled to 1 by default, add a boot parameter (Eugene Syromiatnikov) [1561171] -- [kernel] add Red Hat-specific taint flags (Eugene Syromiatnikov) [1559877] -- [kernel] kdump: fix a grammar issue in a kernel message (Dave Young) [1507353] -- [scripts] tags.sh: Ignore redhat/rpm (Jeremy Cline) -- [kernel] put RHEL info into generated headers (Laura Abbott) [https://bugzilla.redhat.com/show_bug.cgi?id=1663728] -- [kernel] kdump: add support for crashkernel=auto (Jeremy Cline) -- [kernel] kdump: round up the total memory size to 128M for crashkernel reservation (Dave Young) [1507353] -- [arm64] acpi: prefer booting with ACPI over DTS (Mark Salter) [1576869] -- [acpi] aarch64: acpi scan: Fix regression related to X-Gene UARTs (Mark Salter) [1519554] -- [acpi] ACPI / irq: Workaround firmware issue on X-Gene based m400 (Mark Salter) [1519554] -- [x86] add rh_check_supported (David Arcari) [1565717] -- [scsi] qla2xxx: Remove PCI IDs of deprecated adapter (Jeremy Cline) -- [scsi] be2iscsi: remove unsupported device IDs (Chris Leech) [1574502] -- [scsi] Removing Obsolete hba pci-ids from rhel8 (Dick Kennedy) [1572321] -- [scsi] hpsa: modify hpsa driver version (Jeremy Cline) -- [scsi] hpsa: remove old cciss-based smartarray pci ids (Joseph Szczypek) [1471185] -- [kernel] rh_taint: add support for marking driver as unsupported (Jonathan Toppins) [1565704] -- [kernel] rh_taint: add support (David Arcari) [1565704] -- [scsi] qla4xxx: Remove deprecated PCI IDs from RHEL 8 (Chad Dupuis) [1518874] -- [scsi] aacraid: Remove depreciated device and vendor PCI id's (Raghava Aditya Renukunta) [1495307] -- [scsi] megaraid_sas: remove deprecated pci-ids (Tomas Henzl) [1509329] -- [scsi] mpt*: remove certain deprecated pci-ids (Jeremy Cline) -- [kernel] modules: add rhelversion MODULE_INFO tag (Laura Abbott) -- [acpi] ACPI: APEI: arm64: Ignore broken HPE moonshot APEI support (Al Stone) [1518076] -- gitlab: Add CI job for packaging scripts (Major Hayden) - Set CRYPTO_SHA3_*_S390 to builtin on zfcpdump (Jeremy Cline) - configs: New config in drivers/edac for v5.4-rc1 (Jeremy Cline) - configs: New config in drivers/firmware for v5.4-rc1 (Jeremy Cline) @@ -3947,21 +5045,22 @@ fi - configs: New config in drivers/crypto for v5.4-rc1 (Jeremy Cline) - configs: New config in sound/pci for v5.4-rc1 (Jeremy Cline) - configs: New config in sound/soc for v5.4-rc1 (Jeremy Cline) +- gitlab: Add CI job for packaging scripts (Major Hayden) - Speed up CI with CKI image (Major Hayden) +- Disable e1000 driver in ARK (Neil Horman) - configs: Fix the pending default for CONFIG_ARM64_VA_BITS_52 (Jeremy Cline) - configs: Turn on OPTIMIZE_INLINING for everything (Jeremy Cline) - configs: Set valid pending defaults for CRYPTO_ESSIV (Jeremy Cline) - Add an initial CI configuration for the internal branch (Jeremy Cline) - New drop of configuration options for v5.4-rc1 (Jeremy Cline) -- Disable e1000 driver in ARK (Neil Horman) - New drop of configuration options for v5.4-rc1 (Jeremy Cline) -- configs: Adjust CONFIG_FORCE_MAX_ZONEORDER for Fedora (Laura Abbott) -- configs: Add README for some other arches (Laura Abbott) -- configs: Sync up Fedora configs (Laura Abbott) - Pull the RHEL version defines out of the Makefile (Jeremy Cline) - Sync up the ARK build scripts (Jeremy Cline) - Sync up the Fedora Rawhide configs (Jeremy Cline) - Sync up the ARK config files (Jeremy Cline) +- configs: Adjust CONFIG_FORCE_MAX_ZONEORDER for Fedora (Laura Abbott) +- configs: Add README for some other arches (Laura Abbott) +- configs: Sync up Fedora configs (Laura Abbott) - [initial commit] Add structure for building with git (Laura Abbott) - [initial commit] Add Red Hat variables in the top level makefile (Laura Abbott) - [initial commit] Red Hat gitignore and attributes (Laura Abbott) -- cgit v1.2.3