From 07eb7fc47550babe5b6a32773da5b2b3d54c768d Mon Sep 17 00:00:00 2001 From: "Justin M. Forbes" Date: Wed, 13 Sep 2023 07:03:15 -0500 Subject: [PATCH] kernel-6.5.3-300 * Wed Sep 13 2023 Justin M. Forbes [6.5.3-0] - Revert "misc: rtsx: judge ASPM Mode to set PETXCFG Reg" (Justin M. Forbes) - Config updates for 6.5.3 (Justin M. Forbes) - Fix up buildReqs for UKI (Justin M. Forbes) - Linux v6.5.3 Resolves: Signed-off-by: Justin M. Forbes --- kernel.spec | 15 +- patch-6.5-redhat.patch | 330 +++++++++++++++++------------------------ sources | 6 +- 3 files changed, 143 insertions(+), 208 deletions(-) diff --git a/kernel.spec b/kernel.spec index 1c92c4df8..a3de841c7 100644 --- a/kernel.spec +++ b/kernel.spec @@ -160,18 +160,18 @@ Summary: The Linux kernel # the --with-release option overrides this setting.) %define debugbuildsenabled 1 # define buildid .local -%define specrpmversion 6.5.2 -%define specversion 6.5.2 +%define specrpmversion 6.5.3 +%define specversion 6.5.3 %define patchversion 6.5 -%define pkgrelease 301 +%define pkgrelease 300 %define kversion 6 -%define tarfile_release 6.5.2 +%define tarfile_release 6.5.3 # This is needed to do merge window version magic %define patchlevel 5 # This allows pkg_release to have configurable %%{?dist} tag -%define specrelease 301%{?buildid}%{?dist} +%define specrelease 300%{?buildid}%{?dist} # This defines the kabi tarball version -%define kabiversion 6.5.2 +%define kabiversion 6.5.3 # If this variable is set to 1, a bpf selftests build failure will cause a # fatal kernel package build error @@ -3702,10 +3702,11 @@ fi\ # # %changelog -* Mon Sep 11 2023 Justin M. Forbes [6.5.2-301] +* Wed Sep 13 2023 Justin M. Forbes [6.5.3-0] - Revert "misc: rtsx: judge ASPM Mode to set PETXCFG Reg" (Justin M. Forbes) - Config updates for 6.5.3 (Justin M. Forbes) - Fix up buildReqs for UKI (Justin M. Forbes) +- Linux v6.5.3 * Wed Sep 06 2023 Justin M. Forbes [6.5.2-0] - Move squashfs to kernel-modules-core (Justin M. Forbes) diff --git a/patch-6.5-redhat.patch b/patch-6.5-redhat.patch index 40a2dc709..f46674d36 100644 --- a/patch-6.5-redhat.patch +++ b/patch-6.5-redhat.patch @@ -9,12 +9,10 @@ drivers/ata/libahci.c | 18 +++ drivers/char/ipmi/ipmi_dmi.c | 15 +++ drivers/char/ipmi/ipmi_msghandler.c | 16 ++- - drivers/char/tpm/tpm_crb.c | 33 ++---- drivers/firmware/efi/Makefile | 1 + drivers/firmware/efi/efi.c | 124 +++++++++++++++------ drivers/firmware/efi/secureboot.c | 38 +++++++ drivers/firmware/sysfb.c | 18 ++- - drivers/gpu/drm/msm/adreno/adreno_device.c | 2 +- drivers/hid/hid-rmi.c | 66 ----------- drivers/hwtracing/coresight/coresight-etm4x-core.c | 19 ++++ drivers/input/rmi4/rmi_driver.c | 124 ++++++++++++--------- @@ -41,16 +39,16 @@ security/lockdown/Kconfig | 13 +++ security/lockdown/lockdown.c | 1 + security/security.c | 12 ++ - 43 files changed, 581 insertions(+), 216 deletions(-) + 41 files changed, 572 insertions(+), 190 deletions(-) diff --git a/Makefile b/Makefile -index c47558bc00aa..ed7450da2c78 100644 +index 901cdfa5e7d3..8ca0b56a75cc 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,18 @@ $(if $(filter __%, $(MAKECMDGOALS)), \ PHONY := __all __all: - + +# Set RHEL variables +# Note that this ifdef'ery is required to handle when building with +# the O= mechanism (relocate the object file results) due to upstream @@ -75,16 +73,16 @@ index b0d00032479d..afb9544fb007 100644 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 85a00d97a314..bbb1c69afb62 100644 +index dfcb2b563e2b..29e3f1b4bd00 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c -@@ -2533,3 +2533,8 @@ int ipl_report_free(struct ipl_report *report) +@@ -2535,3 +2535,8 @@ int ipl_report_free(struct ipl_report *report) } - + #endif + +bool ipl_get_secureboot(void) @@ -102,11 +100,11 @@ index 00d76448319d..e679d13303e3 100644 +#include #include #include - + @@ -914,6 +915,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); + @@ -128,7 +126,7 @@ index fd975a4a5200..3e05018e244c 100644 @@ -1031,6 +1032,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 @@ -138,11 +136,11 @@ index fd975a4a5200..3e05018e244c 100644 + reserve_ibft_region(); dmi_setup(); - + @@ -1192,19 +1200,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: @@ -157,9 +155,9 @@ index fd975a4a5200..3e05018e244c 100644 - } - } + efi_set_secure_boot(boot_params.secure_boot); - + reserve_initrd(); - + diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c index 6aef1ee5e1bd..8f146b1b4972 100644 --- a/drivers/acpi/apei/hest.c @@ -167,7 +165,7 @@ index 6aef1ee5e1bd..8f146b1b4972 100644 @@ -96,6 +96,14 @@ static 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) && @@ -189,7 +187,7 @@ index c2c786eb95ab..4e3aa80cd5cf 100644 struct irq_fwspec *fwspec; + bool skip_producer_check; }; - + /** @@ -211,7 +212,8 @@ static acpi_status acpi_irq_parse_one_cb(struct acpi_resource *ares, return AE_CTRL_TERMINATE; @@ -207,7 +205,7 @@ index c2c786eb95ab..4e3aa80cd5cf 100644 { - 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. @@ -229,7 +227,7 @@ index 87e385542576..7e9de6e3eb9f 100644 @@ -1749,6 +1749,15 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device) if (!acpi_match_device_ids(device, ignore_serial_bus_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 @@ -249,7 +247,7 @@ index 06aec35f88f2..50428bd0fa12 100644 @@ -729,6 +729,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) && @@ -278,7 +276,7 @@ index bbf7029e224b..cf7faa970dd6 100644 @@ -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 @@ -296,7 +294,7 @@ index bbf7029e224b..cf7faa970dd6 100644 + 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 186f1fee7534..93e3a76596ff 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c @@ -307,12 +305,12 @@ index 186f1fee7534..93e3a76596ff 100644 #include +#include #include - + #define IPMI_DRIVER_VERSION "39.2" @@ -5516,8 +5517,21 @@ static int __init ipmi_init_msghandler_mod(void) { int rv; - + - pr_info("version " IPMI_DRIVER_VERSION "\n"); +#ifdef CONFIG_ARM64 + /* RHEL-only @@ -321,7 +319,7 @@ index 186f1fee7534..93e3a76596ff 100644 + * 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; @@ -332,57 +330,6 @@ index 186f1fee7534..93e3a76596ff 100644 mutex_lock(&ipmi_interfaces_mutex); rv = ipmi_register_driver(); mutex_unlock(&ipmi_interfaces_mutex); -diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c -index 9eb1a1859012..a5dbebb1acfc 100644 ---- a/drivers/char/tpm/tpm_crb.c -+++ b/drivers/char/tpm/tpm_crb.c -@@ -463,28 +463,6 @@ static bool crb_req_canceled(struct tpm_chip *chip, u8 status) - return (cancel & CRB_CANCEL_INVOKE) == CRB_CANCEL_INVOKE; - } - --static int crb_check_flags(struct tpm_chip *chip) --{ -- u32 val; -- int ret; -- -- ret = crb_request_locality(chip, 0); -- if (ret) -- return ret; -- -- ret = tpm2_get_tpm_pt(chip, TPM2_PT_MANUFACTURER, &val, NULL); -- if (ret) -- goto release; -- -- if (val == 0x414D4400U /* AMD */) -- chip->flags |= TPM_CHIP_FLAG_HWRNG_DISABLED; -- --release: -- crb_relinquish_locality(chip, 0); -- -- return ret; --} -- - static const struct tpm_class_ops tpm_crb = { - .flags = TPM_OPS_AUTO_STARTUP, - .status = crb_status, -@@ -826,9 +804,14 @@ static int crb_acpi_add(struct acpi_device *device) - if (rc) - goto out; - -- rc = crb_check_flags(chip); -- if (rc) -- goto out; -+#ifdef CONFIG_X86 -+ /* A quirk for https://www.amd.com/en/support/kb/faq/pa-410 */ -+ if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD && -+ priv->sm != ACPI_TPM2_COMMAND_BUFFER_WITH_PLUTON) { -+ dev_info(dev, "Disabling hwrng\n"); -+ chip->flags |= TPM_CHIP_FLAG_HWRNG_DISABLED; -+ } -+#endif /* CONFIG_X86 */ - - rc = tpm_chip_register(chip); - diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile index e489fefd23da..f2dfae764fb5 100644 --- a/drivers/firmware/efi/Makefile @@ -404,13 +351,13 @@ index 1599f1176842..a1fc17f1e0cc 100644 #include #include +#include - + #include - + @@ -953,40 +954,101 @@ int efi_mem_type(unsigned long phys_addr) } #endif - + +struct efi_error_code { + efi_status_t status; + int errno; @@ -515,7 +462,7 @@ index 1599f1176842..a1fc17f1e0cc 100644 - } + 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, @@ -539,7 +486,7 @@ index 1599f1176842..a1fc17f1e0cc 100644 + return found->description; } EXPORT_SYMBOL_GPL(efi_status_to_err); - + diff --git a/drivers/firmware/efi/secureboot.c b/drivers/firmware/efi/secureboot.c new file mode 100644 index 000000000000..de0a3714a5d4 @@ -591,7 +538,7 @@ index 82fcfd29bc4d..17b7e096b682 100644 @@ -34,6 +34,22 @@ #include #include - + +static int skip_simpledrm; + +static int __init simpledrm_disable(char *opt) @@ -612,7 +559,7 @@ index 82fcfd29bc4d..17b7e096b682 100644 static DEFINE_MUTEX(disable_lock); static bool disabled; @@ -85,7 +101,7 @@ static __init int sysfb_init(void) - + /* try to create a simple-framebuffer device */ compatible = sysfb_parse_mode(si, &mode); - if (compatible) { @@ -620,19 +567,6 @@ index 82fcfd29bc4d..17b7e096b682 100644 pd = sysfb_create_simplefb(si, &mode); if (!IS_ERR(pd)) goto unlock_mutex; -diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c -index ce8d0b2475bf..6e3c1368c5e1 100644 ---- a/drivers/gpu/drm/msm/adreno/adreno_device.c -+++ b/drivers/gpu/drm/msm/adreno/adreno_device.c -@@ -371,7 +371,7 @@ static const struct adreno_info gpulist[] = { - .rev = ADRENO_REV(6, 9, 0, ANY_ID), - .fw = { - [ADRENO_FW_SQE] = "a660_sqe.fw", -- [ADRENO_FW_GMU] = "a690_gmu.bin", -+ [ADRENO_FW_GMU] = "a660_gmu.bin", - }, - .gmem = SZ_4M, - .inactive_period = DRM_MSM_INACTIVE_PERIOD, diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c index 84e7ba5314d3..efc96776f761 100644 --- a/drivers/hid/hid-rmi.c @@ -642,27 +576,27 @@ index 84e7ba5314d3..efc96776f761 100644 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; - + - pm_wakeup_event(hdev->dev.parent, 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 +582,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; @@ -717,9 +651,9 @@ index 84e7ba5314d3..efc96776f761 100644 { struct rmi_data *data = NULL; @@ -713,18 +654,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"); @@ -728,13 +662,13 @@ index 84e7ba5314d3..efc96776f761 100644 - 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/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c index 7e307022303a..c68d7da67148 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c @@ -750,7 +684,7 @@ index 7e307022303a..c68d7da67148 100644 @@ -2265,6 +2266,16 @@ static const struct amba_id etm4_ids[] = { {}, }; - + +static const struct dmi_system_id broken_coresight[] = { + { + .matches = { @@ -762,22 +696,22 @@ index 7e307022303a..c68d7da67148 100644 +}; + MODULE_DEVICE_TABLE(amba, etm4_ids); - + static struct amba_driver etm4x_amba_driver = { @@ -2298,6 +2309,11 @@ static int __init etm4x_init(void) { int ret; - + + if (dmi_check_system(broken_coresight)) { + pr_info("ETM4 disabled due to firmware bug\n"); + return 0; + } + ret = etm4_pm_setup(); - + /* etm4_pm_setup() does its own cleanup - exit on error */ @@ -2324,6 +2340,9 @@ static int __init etm4x_init(void) - + static void __exit etm4x_exit(void) { + if (dmi_check_system(broken_coresight)) @@ -792,13 +726,13 @@ index 258d5fe3d395..f7298e3dc8f3 100644 +++ 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) { @@ -809,7 +743,7 @@ index 258d5fe3d395..f7298e3dc8f3 100644 + 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; @@ -817,7 +751,7 @@ index 258d5fe3d395..f7298e3dc8f3 100644 - } + if (!count) + return; - + - ret = rmi_process_interrupt_requests(rmi_dev); + *(drvdata->irq_status) = attn_data.irq_status; + drvdata->attn_data = attn_data; @@ -827,14 +761,14 @@ index 258d5fe3d395..f7298e3dc8f3 100644 - 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); @@ -849,7 +783,7 @@ index 258d5fe3d395..f7298e3dc8f3 100644 + 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) @@ -859,20 +793,20 @@ index 258d5fe3d395..f7298e3dc8f3 100644 - 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)) { @@ -892,7 +826,7 @@ index 258d5fe3d395..f7298e3dc8f3 100644 + "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. @@ -910,12 +844,12 @@ index 258d5fe3d395..f7298e3dc8f3 100644 + } 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)) { @@ -948,21 +882,21 @@ index 258d5fe3d395..f7298e3dc8f3 100644 + 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; @@ -975,15 +909,15 @@ index 258d5fe3d395..f7298e3dc8f3 100644 + 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 caaf563d38ae..d9c4d039c4e7 100644 +index cabeb5bd3e41..25ef4e9cc34a 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -8,6 +8,7 @@ - + #include #include +#include @@ -993,7 +927,7 @@ index caaf563d38ae..d9c4d039c4e7 100644 @@ -2819,6 +2820,27 @@ int iommu_dev_disable_feature(struct device *dev, enum iommu_dev_features feat) } EXPORT_SYMBOL_GPL(iommu_dev_disable_feature); - + +#ifdef CONFIG_ARM64 +static int __init iommu_quirks(void) +{ @@ -1025,7 +959,7 @@ index 3dae5e3a1697..d676cf63a966 100644 @@ -195,7 +195,7 @@ static int rts5227_extra_init_hw(struct rtsx_pcr *pcr) } } - + - if (option->force_clkreq_0 && pcr->aspm_mode == ASPM_MODE_CFG) + if (option->force_clkreq_0) rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PETXCFG, @@ -1046,17 +980,17 @@ index f4ab09439da7..cfebad51d1d8 100644 + else + option->force_clkreq_0 = true; } - + static int rts5228_extra_init_hw(struct rtsx_pcr *pcr) { + struct rtsx_cr_option *option = &pcr->option; - + rtsx_pci_write_register(pcr, RTS5228_AUTOLOAD_CFG1, CD_RESUME_EN_MASK, CD_RESUME_EN_MASK); @@ -469,6 +476,17 @@ static int rts5228_extra_init_hw(struct rtsx_pcr *pcr) else rtsx_pci_write_register(pcr, PETXCFG, 0x30, 0x00); - + + /* + * If u_force_clkreq_0 is enabled, CLKREQ# PIN will be forced + * to drive low, and we forcibly request clock. @@ -1069,7 +1003,7 @@ index f4ab09439da7..cfebad51d1d8 100644 + FORCE_CLKREQ_DELINK_MASK, FORCE_CLKREQ_HIGH); + rtsx_pci_write_register(pcr, PWD_SUSPEND_EN, 0xFF, 0xFB); - + if (pcr->rtd3_en) { diff --git a/drivers/misc/cardreader/rts5249.c b/drivers/misc/cardreader/rts5249.c index 47ab72a43256..91d240dd68fa 100644 @@ -1078,7 +1012,7 @@ index 47ab72a43256..91d240dd68fa 100644 @@ -327,11 +327,12 @@ static int rts5249_extra_init_hw(struct rtsx_pcr *pcr) } } - + + /* * If u_force_clkreq_0 is enabled, CLKREQ# PIN will be forced @@ -1104,17 +1038,17 @@ index 79b18f6f73a8..9b42b20a3e5a 100644 + else + option->force_clkreq_0 = true; } - + static int rts5260_extra_init_hw(struct rtsx_pcr *pcr) { + struct rtsx_cr_option *option = &pcr->option; - + /* Set mcu_cnt to 7 to ensure data can be sampled properly */ rtsx_pci_write_register(pcr, 0xFC03, 0x7F, 0x07); @@ -539,6 +546,17 @@ static int rts5260_extra_init_hw(struct rtsx_pcr *pcr) - + rts5260_init_hw(pcr); - + + /* + * If u_force_clkreq_0 is enabled, CLKREQ# PIN will be forced + * to drive low, and we forcibly request clock. @@ -1127,7 +1061,7 @@ index 79b18f6f73a8..9b42b20a3e5a 100644 + FORCE_CLKREQ_DELINK_MASK, FORCE_CLKREQ_HIGH); + rtsx_pci_write_register(pcr, pcr->reg_pm_ctrl3, 0x10, 0x00); - + return 0; diff --git a/drivers/misc/cardreader/rts5261.c b/drivers/misc/cardreader/rts5261.c index 94af6bf8a25a..b1e76030cafd 100644 @@ -1144,17 +1078,17 @@ index 94af6bf8a25a..b1e76030cafd 100644 + else + option->force_clkreq_0 = true; } - + static int rts5261_extra_init_hw(struct rtsx_pcr *pcr) { + struct rtsx_cr_option *option = &pcr->option; u32 val; - + rtsx_pci_write_register(pcr, RTS5261_AUTOLOAD_CFG1, @@ -547,6 +554,17 @@ static int rts5261_extra_init_hw(struct rtsx_pcr *pcr) else rtsx_pci_write_register(pcr, PETXCFG, 0x30, 0x00); - + + /* + * If u_force_clkreq_0 is enabled, CLKREQ# PIN will be forced + * to drive low, and we forcibly request clock. @@ -1167,7 +1101,7 @@ index 94af6bf8a25a..b1e76030cafd 100644 + FORCE_CLKREQ_DELINK_MASK, FORCE_CLKREQ_HIGH); + rtsx_pci_write_register(pcr, PWD_SUSPEND_EN, 0xFF, 0xFB); - + if (pcr->rtd3_en) { diff --git a/drivers/misc/cardreader/rtsx_pcr.c b/drivers/misc/cardreader/rtsx_pcr.c index a3f4b52bb159..32b7783e9d4f 100644 @@ -1176,14 +1110,14 @@ index a3f4b52bb159..32b7783e9d4f 100644 @@ -1326,11 +1326,8 @@ static int rtsx_pci_init_hw(struct rtsx_pcr *pcr) return err; } - + - if (pcr->aspm_mode == ASPM_MODE_REG) { + if (pcr->aspm_mode == ASPM_MODE_REG) rtsx_pci_write_register(pcr, ASPM_FORCE_CTL, 0x30, 0x30); - rtsx_pci_write_register(pcr, PETXCFG, - FORCE_CLKREQ_DELINK_MASK, FORCE_CLKREQ_HIGH); - } - + /* No CD interrupt if probing driver with card inserted. * So we need to initialize pcr->card_exist here. diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c @@ -1191,7 +1125,7 @@ index f3a01b79148c..9a1a74d183ce 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -251,6 +251,9 @@ void nvme_delete_ctrl_sync(struct nvme_ctrl *ctrl) - + static blk_status_t nvme_error_status(u16 status) { + if (unlikely(status & NVME_SC_DNR)) @@ -1207,17 +1141,17 @@ index f3a01b79148c..9a1a74d183ce 100644 + FAILUP, AUTHENTICATE, }; - + @@ -352,15 +356,16 @@ static inline enum nvme_disposition nvme_decide_disposition(struct request *req) if ((nvme_req(req)->status & 0x7ff) == NVME_SC_AUTH_REQUIRED) return AUTHENTICATE; - + - if (blk_noretry_request(req) || + if ((req->cmd_flags & (REQ_FAILFAST_DEV | REQ_FAILFAST_DRIVER)) || (nvme_req(req)->status & NVME_SC_DNR) || nvme_req(req)->retries >= nvme_max_retries) return COMPLETE; - + - if (req->cmd_flags & REQ_NVME_MPATH) { + if (req->cmd_flags & (REQ_NVME_MPATH | REQ_FAILFAST_TRANSPORT)) { if (nvme_is_path_error(nvme_req(req)->status) || @@ -1231,7 +1165,7 @@ index f3a01b79148c..9a1a74d183ce 100644 @@ -390,6 +395,14 @@ static inline void nvme_end_req(struct request *req) blk_mq_end_request(req, status); } - + +static inline void nvme_failup_req(struct request *req) +{ + nvme_update_ana(req); @@ -1260,7 +1194,7 @@ index 0a88d7bdc5e3..967bb3a85889 100644 @@ -80,14 +80,10 @@ void nvme_mpath_start_freeze(struct nvme_subsystem *subsys) blk_freeze_queue_start(h->disk->queue); } - + -void nvme_failover_req(struct request *req) +void nvme_update_ana(struct request *req) { @@ -1270,7 +1204,7 @@ index 0a88d7bdc5e3..967bb3a85889 100644 - struct bio *bio; - - nvme_mpath_clear_current_path(ns); - + /* * If we got back an ANA error, we know the controller is alive but not @@ -98,6 +94,16 @@ void nvme_failover_req(struct request *req) @@ -1287,18 +1221,18 @@ index 0a88d7bdc5e3..967bb3a85889 100644 + + nvme_mpath_clear_current_path(ns); + nvme_update_ana(req); - + spin_lock_irqsave(&ns->head->requeue_lock, flags); for (bio = req->bio; bio; bio = bio->bi_next) { @@ -912,8 +918,7 @@ int nvme_mpath_init_identify(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id) int error = 0; - + /* check if multipath is enabled and we have the capability */ - if (!multipath || !ctrl->subsys || - !(ctrl->subsys->cmic & NVME_CTRL_CMIC_ANA)) + if (!ctrl->subsys || !(ctrl->subsys->cmic & NVME_CTRL_CMIC_ANA)) return 0; - + if (!ctrl->max_namespaces || diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index f35647c470af..e57357f23306 100644 @@ -1329,7 +1263,7 @@ index 321156ca273d..fc399e56ec8f 100644 @@ -4406,6 +4406,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 @@ -1364,7 +1298,7 @@ index 3c668cfb146d..95724cd9875f 100644 @@ -130,6 +130,14 @@ static const char *sd_cache_types[] = { "write back, no read (daft)" }; - + +static const char *sd_probe_types[] = { "async", "sync" }; + +static char sd_probe_type[6] = "async"; @@ -1379,20 +1313,20 @@ index 3c668cfb146d..95724cd9875f 100644 @@ -3961,6 +3969,8 @@ static int __init init_sd(void) goto err_out_class; } - + + if (!strcmp(sd_probe_type, "sync")) + sd_template.gendrv.probe_type = PROBE_FORCE_SYNCHRONOUS; err = scsi_register_driver(&sd_template.gendrv); if (err) goto err_out_driver; diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c -index a739403a9e45..191513936ce8 100644 +index 26a27ff50408..e1050b7dd63d 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -5749,6 +5749,13 @@ static void hub_event(struct work_struct *work) +@@ -5805,6 +5805,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) && @@ -1410,7 +1344,7 @@ index ab088c662e88..f974f9d9a7c5 100644 @@ -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; @@ -1428,22 +1362,22 @@ index ab088c662e88..f974f9d9a7c5 100644 + efi_secureboot_mode_disabled, + efi_secureboot_mode_enabled, +}; - + #ifdef CONFIG_EFI /* @@ -882,6 +892,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) @@ -903,6 +915,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) @@ -1451,16 +1385,16 @@ index ab088c662e88..f974f9d9a7c5 100644 return false; @@ -917,6 +931,7 @@ static inline void efi_find_mirror(void) {} #endif - + extern int efi_status_to_err(efi_status_t status); +extern const char *efi_status_to_str(efi_status_t status); - + /* * Variable Attributes @@ -1133,13 +1148,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, @@ -1472,16 +1406,16 @@ index ab088c662e88..f974f9d9a7c5 100644 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 7308a1a7599b..a3aa26339b43 100644 +index af796986baee..83e1cb0ca159 100644 --- a/include/linux/lsm_hook_defs.h +++ b/include/linux/lsm_hook_defs.h -@@ -404,6 +404,8 @@ LSM_HOOK(void, LSM_RET_VOID, bpf_prog_free_security, struct bpf_prog_aux *aux) +@@ -405,6 +405,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/rmi.h b/include/linux/rmi.h @@ -1489,26 +1423,26 @@ 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 32828502f09e..b5c27505fa16 100644 +index bac98ea18f78..28abed10b583 100644 --- a/include/linux/security.h +++ b/include/linux/security.h -@@ -482,6 +482,7 @@ int security_inode_notifysecctx(struct inode *inode, void *ctx, u32 ctxlen); +@@ -483,6 +483,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) -@@ -1388,6 +1389,10 @@ static inline int security_locked_down(enum lockdown_reason what) +@@ -1394,6 +1395,10 @@ static inline int security_locked_down(enum lockdown_reason what) { return 0; } @@ -1517,7 +1451,7 @@ index 32828502f09e..b5c27505fa16 100644 + return 0; +} #endif /* CONFIG_SECURITY */ - + #if defined(CONFIG_SECURITY) && defined(CONFIG_WATCH_QUEUE) diff --git a/kernel/module/signing.c b/kernel/module/signing.c index a2ff4242e623..f0d2be1ee4f1 100644 @@ -1526,7 +1460,7 @@ index a2ff4242e623..f0d2be1ee4f1 100644 @@ -61,10 +61,17 @@ 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, @@ -1540,7 +1474,7 @@ index a2ff4242e623..f0d2be1ee4f1 100644 + } + return ret; } - + int module_sig_check(struct load_info *info, int flags) diff --git a/scripts/tags.sh b/scripts/tags.sh index a70d43723146..56d06b04f752 100755 @@ -1552,7 +1486,7 @@ index a70d43723146..56d06b04f752 100755 ignore="$ignore ( -name *.mod.c ) -prune -o" +# RHEL tags and cscope should also ignore redhat/rpm +ignore="$ignore ( -path redhat/rpm ) -prune -o" - + # ignore arbitrary directories if [ -n "${IGNORE_DIRS}" ]; then diff --git a/security/integrity/platform_certs/load_uefi.c b/security/integrity/platform_certs/load_uefi.c @@ -1561,14 +1495,14 @@ index d1fdd113450a..182e8090cfe8 100644 +++ b/security/integrity/platform_certs/load_uefi.c @@ -74,7 +74,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; } - + @@ -85,7 +86,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) { @@ -1578,7 +1512,7 @@ index d1fdd113450a..182e8090cfe8 100644 + 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 @@ -1586,7 +1520,7 @@ index e84ddf484010..d0501353a4b9 100644 @@ -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 @@ -1608,21 +1542,21 @@ index 68d19632aeb7..ef348935b6ff 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[] __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 b720424ca37d..bf65c13de58f 100644 +index 549104a447e3..73670798f075 100644 --- a/security/security.c +++ b/security/security.c -@@ -5184,6 +5184,18 @@ int security_locked_down(enum lockdown_reason what) +@@ -5198,6 +5198,18 @@ int security_locked_down(enum lockdown_reason what) } EXPORT_SYMBOL(security_locked_down); - + +/** + * security_lock_kernel_down() - Put the kernel into lock-down mode. + * diff --git a/sources b/sources index 0a280bc75..a5292cfed 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (linux-6.5.2.tar.xz) = 9aaf88d58a27576e7ce8378480718f44f140511494bb1ef6872521c94536f798d7b2adc5070f2686872cc0ea14b5412750bfaa31fb760db68901f351fd802321 -SHA512 (kernel-abi-stablelists-6.5.2.tar.bz2) = 7c328de94454d54b3e2fbe93c3b0099724ffc6c22f6c304f98ff88f72a7eb3de1d3476f4b9d5fbfaf68eb95f1f5e1d6d2a4fec32e519cfbeb4102a9d56898d37 -SHA512 (kernel-kabi-dw-6.5.2.tar.bz2) = 73379173c6af0d7517af2adb440470d2d8b34151cad7b4a9511f480f0fc9092a9629fea582b095fa56f28eb9e56919191828e0e5f34b0415f831cb0278a149b8 +SHA512 (linux-6.5.3.tar.xz) = aa38c189954b3721c08a25e9cd077b4e1d5eb4d51baa3438f3ff7d18c76b28a99a68213a81c4fdf9a3343f0b108e42256fa8307df3fed7b943e938ed6348ac8b +SHA512 (kernel-abi-stablelists-6.5.3.tar.bz2) = ec90c164dd2b0793f5e6310c7d585ccae1a0868f11f52ce33678f980af6777d8af2dbd7578966800ee505e6788b59b41bbb2fdf90c5ba073f3740ec28ddb254d +SHA512 (kernel-kabi-dw-6.5.3.tar.bz2) = 58a0d9aea64f12a138b1d15dc7ad9345588705bb63477714d58db42cbba834d90782687b8e28275feb87e79c6c9f7a2dc10c9c13236cad99fba7f64cfe86e64f