diff options
Diffstat (limited to 'sys-kernel/linux-image-redcore-lts')
35 files changed, 5095 insertions, 3124 deletions
diff --git a/sys-kernel/linux-image-redcore-lts/Manifest b/sys-kernel/linux-image-redcore-lts/Manifest index 780f98f1..5994eb82 100644 --- a/sys-kernel/linux-image-redcore-lts/Manifest +++ b/sys-kernel/linux-image-redcore-lts/Manifest @@ -1,2 +1 @@ -DIST linux-5.4.35.tar.xz 109524684 BLAKE2B 0e73ef5292d77329d26b165d7da887f5ebc018049d6e9ff25f0036062201e1438f6b8c8234d0201b064e5c663d25b0c258e58ded44c1087c53cf6406676d7724 SHA512 66daf0192339450b0838cd1aef013ea8675f8687e2271d8d9b79c842e8cb081541788eb16fb0b6e5cd0b15617be67813c53a4db2d2e63219f3c64e692c325c5d -DIST linux-5.4.41.tar.xz 109535752 BLAKE2B 806e55dc2e2b649a280667e6bc043b0c84771043319e0c8a734c3bdb735f6bb15459863f4a4835c87d90e97e2774646902f85dc3bed4307063594a5aa23f261c SHA512 711db80661f2e94fd4819991bd69ff7c3124832ffd6c17025bb82daf2177b82d6700454f7cc58f76c9f839fddf1316f49406af3c2572723b3455b2aac689f7a4 +DIST linux-5.10.4.tar.xz 116612908 BLAKE2B 57f6d719451aacfd298452703ae02e6188885500e8cdf18fffa6b9967b0934a23cd378ab4c49b76ccb2f7a9012d6aa7ff1349d488cb31e40924be2f27b244cec SHA512 aab782786cc06b5f1872bbb88c4f55a73d222f8ecf1ab8f5b7d96de2160b11b4407e02a44b206d2c00e395ba0662aa5a038b8e10d185621a0b33c576b523b490 diff --git a/sys-kernel/linux-image-redcore-lts/files/5.10-0001-Revert-cpufreq-Avoid-configuring-old-governors-as-de.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-0001-Revert-cpufreq-Avoid-configuring-old-governors-as-de.patch new file mode 100644 index 00000000..e8ef9b4f --- /dev/null +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-0001-Revert-cpufreq-Avoid-configuring-old-governors-as-de.patch @@ -0,0 +1,38 @@ +From 2261dd7a91c24db2da4c9c5abf6a1670fcba1c0e Mon Sep 17 00:00:00 2001 +From: Gabriel C <crazy@frugalware.org> +Date: Tue, 15 Dec 2020 20:12:13 +0100 +Subject: [PATCH] Revert "cpufreq: Avoid configuring old governors as default + with intel_pstate" + +This reverts commit db865272d9c4687520dc29f77e701a1b2669872f. + +This is crazy stuff. These changes belong to an initramfs generator like dracut. +So you are forcing schedutil on everyone because a generic distro kernel may select +that driver? Uff.. fix it for every CPU then we can talk about it. +--- + drivers/cpufreq/Kconfig | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig +index 85de313ddec2..2c7171e0b001 100644 +--- a/drivers/cpufreq/Kconfig ++++ b/drivers/cpufreq/Kconfig +@@ -71,7 +71,6 @@ config CPU_FREQ_DEFAULT_GOV_USERSPACE + + config CPU_FREQ_DEFAULT_GOV_ONDEMAND + bool "ondemand" +- depends on !(X86_INTEL_PSTATE && SMP) + select CPU_FREQ_GOV_ONDEMAND + select CPU_FREQ_GOV_PERFORMANCE + help +@@ -84,7 +83,6 @@ config CPU_FREQ_DEFAULT_GOV_ONDEMAND + + config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE + bool "conservative" +- depends on !(X86_INTEL_PSTATE && SMP) + select CPU_FREQ_GOV_CONSERVATIVE + select CPU_FREQ_GOV_PERFORMANCE + help +-- +2.29.2 + diff --git a/sys-kernel/linux-image-redcore-lts/files/5.10-0001-Revert-hwmon-k10temp-Remove-support-for-displaying-v.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-0001-Revert-hwmon-k10temp-Remove-support-for-displaying-v.patch new file mode 100644 index 00000000..a750b093 --- /dev/null +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-0001-Revert-hwmon-k10temp-Remove-support-for-displaying-v.patch @@ -0,0 +1,188 @@ +From cb04c523c759e3704c6d8f81ad6fec7c94e09f69 Mon Sep 17 00:00:00 2001 +From: Gabriel Craciunescu <nix.or.die@gmail.com> +Date: Mon, 28 Dec 2020 16:23:11 +0100 +Subject: [PATCH] Revert "hwmon: (k10temp) Remove support for displaying + voltage and current on Zen CPUs" + +This reverts commit 0a4e668b5d52eed8026f5d717196b02b55fb2dc6. + +While not perfect ( and in this case caused by wrong code ), is better +than having nothing. Bugs could be fixed, and if not, such CPUs could be blacklisted +from getting the voltage informations.. +--- + drivers/hwmon/k10temp.c | 98 +++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 98 insertions(+) + +diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c +index 3bc2551577a3..a250481b5a97 100644 +--- a/drivers/hwmon/k10temp.c ++++ b/drivers/hwmon/k10temp.c +@@ -11,6 +11,13 @@ + * convert raw register values is from https://github.com/ocerman/zenpower. + * The information is not confirmed from chip datasheets, but experiments + * suggest that it provides reasonable temperature values. ++ * - Register addresses to read chip voltage and current are also from ++ * https://github.com/ocerman/zenpower, and not confirmed from chip ++ * datasheets. Current calibration is board specific and not typically ++ * shared by board vendors. For this reason, current values are ++ * normalized to report 1A/LSB for core current and and 0.25A/LSB for SoC ++ * current. Reported values can be adjusted using the sensors configuration ++ * file. + */ + + #include <linux/bitops.h> +@@ -102,7 +109,10 @@ struct k10temp_data { + int temp_offset; + u32 temp_adjust_mask; + u32 show_temp; ++ u32 svi_addr[2]; + bool is_zen; ++ bool show_current; ++ int cfactor[2]; + }; + + #define TCTL_BIT 0 +@@ -127,6 +137,16 @@ static const struct tctl_offset tctl_offset_table[] = { + { 0x17, "AMD Ryzen Threadripper 29", 27000 }, /* 29{20,50,70,90}[W]X */ + }; + ++static bool is_threadripper(void) ++{ ++ return strstr(boot_cpu_data.x86_model_id, "Threadripper"); ++} ++ ++static bool is_epyc(void) ++{ ++ return strstr(boot_cpu_data.x86_model_id, "EPYC"); ++} ++ + static void read_htcreg_pci(struct pci_dev *pdev, u32 *regval) + { + pci_read_config_dword(pdev, REG_HARDWARE_THERMAL_CONTROL, regval); +@@ -191,6 +211,16 @@ static const char *k10temp_temp_label[] = { + "Tccd8", + }; + ++static const char *k10temp_in_label[] = { ++ "Vcore", ++ "Vsoc", ++}; ++ ++static const char *k10temp_curr_label[] = { ++ "Icore", ++ "Isoc", ++}; ++ + static int k10temp_read_labels(struct device *dev, + enum hwmon_sensor_types type, + u32 attr, int channel, const char **str) +@@ -199,6 +229,50 @@ static int k10temp_read_labels(struct device *dev, + case hwmon_temp: + *str = k10temp_temp_label[channel]; + break; ++ case hwmon_in: ++ *str = k10temp_in_label[channel]; ++ break; ++ case hwmon_curr: ++ *str = k10temp_curr_label[channel]; ++ break; ++ default: ++ return -EOPNOTSUPP; ++ } ++ return 0; ++} ++ ++static int k10temp_read_curr(struct device *dev, u32 attr, int channel, ++ long *val) ++{ ++ struct k10temp_data *data = dev_get_drvdata(dev); ++ u32 regval; ++ ++ switch (attr) { ++ case hwmon_curr_input: ++ amd_smn_read(amd_pci_dev_to_node_id(data->pdev), ++ data->svi_addr[channel], ®val); ++ *val = DIV_ROUND_CLOSEST(data->cfactor[channel] * ++ (regval & 0xff), ++ 1000); ++ break; ++ default: ++ return -EOPNOTSUPP; ++ } ++ return 0; ++} ++ ++static int k10temp_read_in(struct device *dev, u32 attr, int channel, long *val) ++{ ++ struct k10temp_data *data = dev_get_drvdata(dev); ++ u32 regval; ++ ++ switch (attr) { ++ case hwmon_in_input: ++ amd_smn_read(amd_pci_dev_to_node_id(data->pdev), ++ data->svi_addr[channel], ®val); ++ regval = (regval >> 16) & 0xff; ++ *val = DIV_ROUND_CLOSEST(155000 - regval * 625, 100); ++ break; + default: + return -EOPNOTSUPP; + } +@@ -257,6 +331,10 @@ static int k10temp_read(struct device *dev, enum hwmon_sensor_types type, + switch (type) { + case hwmon_temp: + return k10temp_read_temp(dev, attr, channel, val); ++ case hwmon_in: ++ return k10temp_read_in(dev, attr, channel, val); ++ case hwmon_curr: ++ return k10temp_read_curr(dev, attr, channel, val); + default: + return -EOPNOTSUPP; + } +@@ -305,6 +383,11 @@ static umode_t k10temp_is_visible(const void *_data, + return 0; + } + break; ++ case hwmon_in: ++ case hwmon_curr: ++ if (!data->show_current) ++ return 0; ++ break; + default: + return 0; + } +@@ -434,10 +517,20 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id) + case 0x8: /* Zen+ */ + case 0x11: /* Zen APU */ + case 0x18: /* Zen+ APU */ ++ data->show_current = !is_threadripper() && !is_epyc(); ++ data->svi_addr[0] = F17H_M01H_SVI_TEL_PLANE0; ++ data->svi_addr[1] = F17H_M01H_SVI_TEL_PLANE1; ++ data->cfactor[0] = F17H_M01H_CFACTOR_ICORE; ++ data->cfactor[1] = F17H_M01H_CFACTOR_ISOC; + k10temp_get_ccd_support(pdev, data, 4); + break; + case 0x31: /* Zen2 Threadripper */ + case 0x71: /* Zen2 */ ++ data->show_current = !is_threadripper() && !is_epyc(); ++ data->cfactor[0] = F17H_M31H_CFACTOR_ICORE; ++ data->cfactor[1] = F17H_M31H_CFACTOR_ISOC; ++ data->svi_addr[0] = F17H_M31H_SVI_TEL_PLANE0; ++ data->svi_addr[1] = F17H_M31H_SVI_TEL_PLANE1; + k10temp_get_ccd_support(pdev, data, 8); + break; + } +@@ -449,6 +542,11 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id) + + switch (boot_cpu_data.x86_model) { + case 0x0 ... 0x1: /* Zen3 */ ++ data->show_current = true; ++ data->svi_addr[0] = F19H_M01_SVI_TEL_PLANE0; ++ data->svi_addr[1] = F19H_M01_SVI_TEL_PLANE1; ++ data->cfactor[0] = F19H_M01H_CFACTOR_ICORE; ++ data->cfactor[1] = F19H_M01H_CFACTOR_ISOC; + k10temp_get_ccd_support(pdev, data, 8); + break; + } +-- +2.29.2 + diff --git a/sys-kernel/linux-image-redcore-lts/files/5.10-8353d30e747f-drm-amd-display-disable-stream-if-pixel-clock-changed-with-link-active.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-8353d30e747f-drm-amd-display-disable-stream-if-pixel-clock-changed-with-link-active.patch new file mode 100644 index 00000000..631e709d --- /dev/null +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-8353d30e747f-drm-amd-display-disable-stream-if-pixel-clock-changed-with-link-active.patch @@ -0,0 +1,109 @@ +From 965421096770bb0d69444950c1f839e8e5504da5 Mon Sep 17 00:00:00 2001 +From: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> +Date: Tue, 15 Dec 2020 10:45:05 -0500 +Subject: [PATCH] drm/amd/display: Add get_dig_frontend implementation for DCEx + +Some old ASICs might not implement/require get_dig_frontend helper; in +this scenario, we can have a NULL pointer exception when we try to call +it inside vbios disable operation. For example, this situation might +happen when using Polaris12 with an eDP panel. This commit avoids this +situation by adding a specific get_dig_frontend implementation for DCEx. + +Cc: Alex Deucher <alexander.deucher@amd.com> +Cc: Borislav Petkov <bp@alien8.de> +Cc: Harry Wentland <Harry.Wentland@amd.com> +Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com> +Cc: Chiawen Huang <chiawen.huang@amd.com> +Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + .../drm/amd/display/dc/dce/dce_link_encoder.c | 45 ++++++++++++++++++- + .../drm/amd/display/dc/dce/dce_link_encoder.h | 2 + + 2 files changed, 45 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +index b409f6b2bfd8..f355cd1e9090 100644 +--- a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c ++++ b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +@@ -119,7 +119,8 @@ static const struct link_encoder_funcs dce110_lnk_enc_funcs = { + .disable_hpd = dce110_link_encoder_disable_hpd, + .is_dig_enabled = dce110_is_dig_enabled, + .destroy = dce110_link_encoder_destroy, +- .get_max_link_cap = dce110_link_encoder_get_max_link_cap ++ .get_max_link_cap = dce110_link_encoder_get_max_link_cap, ++ .get_dig_frontend = dce110_get_dig_frontend, + }; + + static enum bp_result link_transmitter_control( +@@ -235,6 +236,45 @@ static void set_link_training_complete( + + } + ++unsigned int dce110_get_dig_frontend(struct link_encoder *enc) ++{ ++ struct dce110_link_encoder *enc110 = TO_DCE110_LINK_ENC(enc); ++ u32 value; ++ enum engine_id result; ++ ++ REG_GET(DIG_BE_CNTL, DIG_FE_SOURCE_SELECT, &value); ++ ++ switch (value) { ++ case DCE110_DIG_FE_SOURCE_SELECT_DIGA: ++ result = ENGINE_ID_DIGA; ++ break; ++ case DCE110_DIG_FE_SOURCE_SELECT_DIGB: ++ result = ENGINE_ID_DIGB; ++ break; ++ case DCE110_DIG_FE_SOURCE_SELECT_DIGC: ++ result = ENGINE_ID_DIGC; ++ break; ++ case DCE110_DIG_FE_SOURCE_SELECT_DIGD: ++ result = ENGINE_ID_DIGD; ++ break; ++ case DCE110_DIG_FE_SOURCE_SELECT_DIGE: ++ result = ENGINE_ID_DIGE; ++ break; ++ case DCE110_DIG_FE_SOURCE_SELECT_DIGF: ++ result = ENGINE_ID_DIGF; ++ break; ++ case DCE110_DIG_FE_SOURCE_SELECT_DIGG: ++ result = ENGINE_ID_DIGG; ++ break; ++ default: ++ // invalid source select DIG ++ ASSERT(false); ++ result = ENGINE_ID_UNKNOWN; ++ } ++ ++ return result; ++} ++ + void dce110_link_encoder_set_dp_phy_pattern_training_pattern( + struct link_encoder *enc, + uint32_t index) +@@ -1665,7 +1705,8 @@ static const struct link_encoder_funcs dce60_lnk_enc_funcs = { + .disable_hpd = dce110_link_encoder_disable_hpd, + .is_dig_enabled = dce110_is_dig_enabled, + .destroy = dce110_link_encoder_destroy, +- .get_max_link_cap = dce110_link_encoder_get_max_link_cap ++ .get_max_link_cap = dce110_link_encoder_get_max_link_cap, ++ .get_dig_frontend = dce110_get_dig_frontend + }; + + void dce60_link_encoder_construct( +diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h +index cb714a48b171..fc6ade824c23 100644 +--- a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h ++++ b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h +@@ -295,6 +295,8 @@ void dce110_link_encoder_connect_dig_be_to_fe( + enum engine_id engine, + bool connect); + ++unsigned int dce110_get_dig_frontend(struct link_encoder *enc); ++ + void dce110_link_encoder_set_dp_phy_pattern_training_pattern( + struct link_encoder *enc, + uint32_t index); +-- +2.25.4 + diff --git a/sys-kernel/linux-image-redcore-lts/files/5.4-Unknow-SSD-HFM128GDHTNG-8310B-QUIRK_NO_APST.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-Unknow-SSD-HFM128GDHTNG-8310B-QUIRK_NO_APST.patch index 747935f6..747935f6 100644 --- a/sys-kernel/linux-image-redcore-lts/files/5.4-Unknow-SSD-HFM128GDHTNG-8310B-QUIRK_NO_APST.patch +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-Unknow-SSD-HFM128GDHTNG-8310B-QUIRK_NO_APST.patch diff --git a/sys-kernel/linux-image-redcore-lts/files/5.4-acer-wmi-silence-unknow-functions-messages.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-acer-wmi-silence-unknow-functions-messages.patch index 1205d5a4..1205d5a4 100644 --- a/sys-kernel/linux-image-redcore-lts/files/5.4-acer-wmi-silence-unknow-functions-messages.patch +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-acer-wmi-silence-unknow-functions-messages.patch diff --git a/sys-kernel/linux-image-redcore-lts/files/5.4-acpi-use-kern_warning_even_when_error.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-acpi-use-kern_warning_even_when_error.patch index 64c773ab..64c773ab 100644 --- a/sys-kernel/linux-image-redcore-lts/files/5.4-acpi-use-kern_warning_even_when_error.patch +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-acpi-use-kern_warning_even_when_error.patch diff --git a/sys-kernel/linux-image-redcore-lts/files/5.10-add-amd-sfh-hid_driver.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-add-amd-sfh-hid_driver.patch new file mode 100644 index 00000000..dd8badee --- /dev/null +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-add-amd-sfh-hid_driver.patch @@ -0,0 +1,1783 @@ +diff -Naur linux-5.10.2/drivers/hid/amd-sfh-hid/amd_sfh_client.c linux-5.10.2-amd/drivers/hid/amd-sfh-hid/amd_sfh_client.c +--- linux-5.10.2/drivers/hid/amd-sfh-hid/amd_sfh_client.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.10.2-amd/drivers/hid/amd-sfh-hid/amd_sfh_client.c 2020-12-25 14:25:44.298391979 +0100 +@@ -0,0 +1,246 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++/* ++ * AMD SFH Client Layer ++ * Copyright 2020 Advanced Micro Devices, Inc. ++ * Authors: Nehal Bakulchandra Shah <Nehal-Bakulchandra.Shah@amd.com> ++ * Sandeep Singh <Sandeep.singh@amd.com> ++ */ ++ ++#include <linux/dma-mapping.h> ++#include <linux/hid.h> ++#include <linux/list.h> ++#include <linux/slab.h> ++#include <linux/workqueue.h> ++#include <linux/errno.h> ++ ++#include "hid_descriptor/amd_sfh_hid_desc.h" ++#include "amd_sfh_pcie.h" ++#include "amd_sfh_hid.h" ++ ++#define AMD_SFH_IDLE_LOOP 200 ++ ++struct request_list { ++ struct hid_device *hid; ++ struct list_head list; ++ u8 report_id; ++ u8 sensor_idx; ++ u8 report_type; ++ u8 current_index; ++}; ++ ++static struct request_list req_list; ++ ++void amd_sfh_set_report(struct hid_device *hid, int report_id, ++ int report_type) ++{ ++ struct amdtp_hid_data *hid_data = hid->driver_data; ++ struct amdtp_cl_data *cli_data = hid_data->cli_data; ++ int i; ++ ++ for (i = 0; i < cli_data->num_hid_devices; i++) { ++ if (cli_data->hid_sensor_hubs[i] == hid) { ++ cli_data->cur_hid_dev = i; ++ break; ++ } ++ } ++ amdtp_hid_wakeup(hid); ++} ++ ++int amd_sfh_get_report(struct hid_device *hid, int report_id, int report_type) ++{ ++ struct amdtp_hid_data *hid_data = hid->driver_data; ++ struct amdtp_cl_data *cli_data = hid_data->cli_data; ++ int i; ++ ++ for (i = 0; i < cli_data->num_hid_devices; i++) { ++ if (cli_data->hid_sensor_hubs[i] == hid) { ++ struct request_list *new = kzalloc(sizeof(*new), GFP_KERNEL); ++ ++ if (!new) ++ return -ENOMEM; ++ ++ new->current_index = i; ++ new->sensor_idx = cli_data->sensor_idx[i]; ++ new->hid = hid; ++ new->report_type = report_type; ++ new->report_id = report_id; ++ cli_data->report_id[i] = report_id; ++ cli_data->request_done[i] = false; ++ list_add(&new->list, &req_list.list); ++ break; ++ } ++ } ++ schedule_delayed_work(&cli_data->work, 0); ++ return 0; ++} ++ ++static void amd_sfh_work(struct work_struct *work) ++{ ++ struct amdtp_cl_data *cli_data = container_of(work, struct amdtp_cl_data, work.work); ++ struct request_list *req_node; ++ u8 current_index, sensor_index; ++ u8 report_id, node_type; ++ u8 report_size = 0; ++ ++ req_node = list_last_entry(&req_list.list, struct request_list, list); ++ list_del(&req_node->list); ++ current_index = req_node->current_index; ++ sensor_index = req_node->sensor_idx; ++ report_id = req_node->report_id; ++ node_type = req_node->report_type; ++ ++ if (node_type == HID_FEATURE_REPORT) { ++ report_size = get_feature_report(sensor_index, report_id, ++ cli_data->feature_report[current_index]); ++ if (report_size) ++ hid_input_report(cli_data->hid_sensor_hubs[current_index], ++ cli_data->report_type[current_index], ++ cli_data->feature_report[current_index], report_size, 0); ++ else ++ pr_err("AMDSFH: Invalid report size\n"); ++ ++ } else if (node_type == HID_INPUT_REPORT) { ++ report_size = get_input_report(sensor_index, report_id, ++ cli_data->input_report[current_index], ++ cli_data->sensor_virt_addr[current_index]); ++ if (report_size) ++ hid_input_report(cli_data->hid_sensor_hubs[current_index], ++ cli_data->report_type[current_index], ++ cli_data->input_report[current_index], report_size, 0); ++ else ++ pr_err("AMDSFH: Invalid report size\n"); ++ } ++ cli_data->cur_hid_dev = current_index; ++ cli_data->sensor_requested_cnt[current_index] = 0; ++ amdtp_hid_wakeup(cli_data->hid_sensor_hubs[current_index]); ++} ++ ++static void amd_sfh_work_buffer(struct work_struct *work) ++{ ++ struct amdtp_cl_data *cli_data = container_of(work, struct amdtp_cl_data, work_buffer.work); ++ u8 report_size; ++ int i; ++ ++ for (i = 0; i < cli_data->num_hid_devices; i++) { ++ report_size = get_input_report(cli_data->sensor_idx[i], cli_data->report_id[i], ++ cli_data->input_report[i], ++ cli_data->sensor_virt_addr[i]); ++ hid_input_report(cli_data->hid_sensor_hubs[i], HID_INPUT_REPORT, ++ cli_data->input_report[i], report_size, 0); ++ } ++ schedule_delayed_work(&cli_data->work_buffer, msecs_to_jiffies(AMD_SFH_IDLE_LOOP)); ++} ++ ++int amd_sfh_hid_client_init(struct amd_mp2_dev *privdata) ++{ ++ struct amdtp_cl_data *cl_data = privdata->cl_data; ++ struct amd_mp2_sensor_info info; ++ struct device *dev; ++ u32 feature_report_size; ++ u32 input_report_size; ++ u8 cl_idx; ++ int rc, i; ++ ++ dev = &privdata->pdev->dev; ++ cl_data = kzalloc(sizeof(*cl_data), GFP_KERNEL); ++ if (!cl_data) ++ return -ENOMEM; ++ ++ cl_data->num_hid_devices = amd_mp2_get_sensor_num(privdata, &cl_data->sensor_idx[0]); ++ ++ INIT_DELAYED_WORK(&cl_data->work, amd_sfh_work); ++ INIT_DELAYED_WORK(&cl_data->work_buffer, amd_sfh_work_buffer); ++ INIT_LIST_HEAD(&req_list.list); ++ ++ for (i = 0; i < cl_data->num_hid_devices; i++) { ++ cl_data->sensor_virt_addr[i] = dma_alloc_coherent(dev, sizeof(int) * 8, ++ &cl_data->sensor_phys_addr[i], ++ GFP_KERNEL); ++ cl_data->sensor_sts[i] = 0; ++ cl_data->sensor_requested_cnt[i] = 0; ++ cl_data->cur_hid_dev = i; ++ cl_idx = cl_data->sensor_idx[i]; ++ cl_data->report_descr_sz[i] = get_descr_sz(cl_idx, descr_size); ++ if (!cl_data->report_descr_sz[i]) { ++ rc = -EINVAL; ++ goto cleanup; ++ } ++ feature_report_size = get_descr_sz(cl_idx, feature_size); ++ if (!feature_report_size) { ++ rc = -EINVAL; ++ goto cleanup; ++ } ++ input_report_size = get_descr_sz(cl_idx, input_size); ++ if (!input_report_size) { ++ rc = -EINVAL; ++ goto cleanup; ++ } ++ cl_data->feature_report[i] = kzalloc(feature_report_size, GFP_KERNEL); ++ if (!cl_data->feature_report[i]) { ++ rc = -ENOMEM; ++ goto cleanup; ++ } ++ cl_data->input_report[i] = kzalloc(input_report_size, GFP_KERNEL); ++ if (!cl_data->input_report[i]) { ++ rc = -ENOMEM; ++ goto cleanup; ++ } ++ info.period = msecs_to_jiffies(AMD_SFH_IDLE_LOOP); ++ info.sensor_idx = cl_idx; ++ info.phys_address = cl_data->sensor_phys_addr[i]; ++ ++ cl_data->report_descr[i] = kzalloc(cl_data->report_descr_sz[i], GFP_KERNEL); ++ if (!cl_data->report_descr[i]) { ++ rc = -ENOMEM; ++ goto cleanup; ++ } ++ rc = get_report_descriptor(cl_idx, cl_data->report_descr[i]); ++ if (rc) ++ return rc; ++ rc = amdtp_hid_probe(cl_data->cur_hid_dev, cl_data); ++ if (rc) ++ return rc; ++ amd_start_sensor(privdata, info); ++ cl_data->sensor_sts[i] = 1; ++ } ++ privdata->cl_data = cl_data; ++ schedule_delayed_work(&cl_data->work_buffer, msecs_to_jiffies(AMD_SFH_IDLE_LOOP)); ++ return 0; ++ ++cleanup: ++ for (i = 0; i < cl_data->num_hid_devices; i++) { ++ if (cl_data->sensor_virt_addr[i]) { ++ dma_free_coherent(&privdata->pdev->dev, 8 * sizeof(int), ++ cl_data->sensor_virt_addr[i], ++ cl_data->sensor_phys_addr[i]); ++ } ++ kfree(cl_data->feature_report[i]); ++ kfree(cl_data->input_report[i]); ++ kfree(cl_data->report_descr[i]); ++ } ++ kfree(cl_data); ++ return rc; ++} ++ ++int amd_sfh_hid_client_deinit(struct amd_mp2_dev *privdata) ++{ ++ struct amdtp_cl_data *cl_data = privdata->cl_data; ++ int i; ++ ++ for (i = 0; i < cl_data->num_hid_devices; i++) ++ amd_stop_sensor(privdata, i); ++ ++ cancel_delayed_work_sync(&cl_data->work); ++ cancel_delayed_work_sync(&cl_data->work_buffer); ++ amdtp_hid_remove(cl_data); ++ ++ for (i = 0; i < cl_data->num_hid_devices; i++) { ++ if (cl_data->sensor_virt_addr[i]) { ++ dma_free_coherent(&privdata->pdev->dev, 8 * sizeof(int), ++ cl_data->sensor_virt_addr[i], ++ cl_data->sensor_phys_addr[i]); ++ } ++ } ++ kfree(cl_data); ++ return 0; ++} +diff -Naur linux-5.10.2/drivers/hid/amd-sfh-hid/amd_sfh_hid.c linux-5.10.2-amd/drivers/hid/amd-sfh-hid/amd_sfh_hid.c +--- linux-5.10.2/drivers/hid/amd-sfh-hid/amd_sfh_hid.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.10.2-amd/drivers/hid/amd-sfh-hid/amd_sfh_hid.c 2020-12-25 14:25:44.298391979 +0100 +@@ -0,0 +1,174 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++/* ++ * AMD MP2 Sensors transport driver ++ * ++ * Authors: Nehal Bakulchandra Shah <Nehal-bakulchandra.shah@amd.com> ++ * Sandeep Singh <sandeep.singh@amd.com> ++ */ ++#include <linux/hid.h> ++#include <linux/wait.h> ++#include <linux/sched.h> ++ ++#include "amd_sfh_hid.h" ++ ++#define AMD_SFH_RESPONSE_TIMEOUT 1500 ++ ++/** ++ * amdtp_hid_parse() - hid-core .parse() callback ++ * @hid: hid device instance ++ * ++ * This function gets called during call to hid_add_device ++ * ++ * Return: 0 on success and non zero on error ++ */ ++static int amdtp_hid_parse(struct hid_device *hid) ++{ ++ struct amdtp_hid_data *hid_data = hid->driver_data; ++ struct amdtp_cl_data *cli_data = hid_data->cli_data; ++ ++ return hid_parse_report(hid, cli_data->report_descr[hid_data->index], ++ cli_data->report_descr_sz[hid_data->index]); ++} ++ ++/* Empty callbacks with success return code */ ++static int amdtp_hid_start(struct hid_device *hid) ++{ ++ return 0; ++} ++ ++static void amdtp_hid_stop(struct hid_device *hid) ++{ ++} ++ ++static int amdtp_hid_open(struct hid_device *hid) ++{ ++ return 0; ++} ++ ++static void amdtp_hid_close(struct hid_device *hid) ++{ ++} ++ ++static int amdtp_raw_request(struct hid_device *hdev, u8 reportnum, ++ u8 *buf, size_t len, u8 rtype, int reqtype) ++{ ++ return 0; ++} ++ ++static void amdtp_hid_request(struct hid_device *hid, struct hid_report *rep, int reqtype) ++{ ++ int rc; ++ ++ switch (reqtype) { ++ case HID_REQ_GET_REPORT: ++ rc = amd_sfh_get_report(hid, rep->id, rep->type); ++ if (rc) ++ dev_err(&hid->dev, "AMDSFH get report error\n"); ++ break; ++ case HID_REQ_SET_REPORT: ++ amd_sfh_set_report(hid, rep->id, reqtype); ++ break; ++ default: ++ break; ++ } ++} ++ ++static int amdtp_wait_for_response(struct hid_device *hid) ++{ ++ struct amdtp_hid_data *hid_data = hid->driver_data; ++ struct amdtp_cl_data *cli_data = hid_data->cli_data; ++ int i, ret = 0; ++ ++ for (i = 0; i < cli_data->num_hid_devices; i++) { ++ if (cli_data->hid_sensor_hubs[i] == hid) ++ break; ++ } ++ ++ if (!cli_data->request_done[i]) ++ ret = wait_event_interruptible_timeout(hid_data->hid_wait, ++ cli_data->request_done[i], ++ msecs_to_jiffies(AMD_SFH_RESPONSE_TIMEOUT)); ++ if (ret == -ERESTARTSYS) ++ return -ERESTARTSYS; ++ else if (ret < 0) ++ return -ETIMEDOUT; ++ else ++ return 0; ++} ++ ++void amdtp_hid_wakeup(struct hid_device *hid) ++{ ++ struct amdtp_hid_data *hid_data = hid->driver_data; ++ struct amdtp_cl_data *cli_data = hid_data->cli_data; ++ ++ cli_data->request_done[cli_data->cur_hid_dev] = true; ++ wake_up_interruptible(&hid_data->hid_wait); ++} ++ ++static struct hid_ll_driver amdtp_hid_ll_driver = { ++ .parse = amdtp_hid_parse, ++ .start = amdtp_hid_start, ++ .stop = amdtp_hid_stop, ++ .open = amdtp_hid_open, ++ .close = amdtp_hid_close, ++ .request = amdtp_hid_request, ++ .wait = amdtp_wait_for_response, ++ .raw_request = amdtp_raw_request, ++}; ++ ++int amdtp_hid_probe(u32 cur_hid_dev, struct amdtp_cl_data *cli_data) ++{ ++ struct hid_device *hid; ++ struct amdtp_hid_data *hid_data; ++ int rc; ++ ++ hid = hid_allocate_device(); ++ if (IS_ERR(hid)) ++ return PTR_ERR(hid); ++ ++ hid_data = kzalloc(sizeof(*hid_data), GFP_KERNEL); ++ if (!hid_data) { ++ rc = -ENOMEM; ++ goto err_hid_data; ++ } ++ ++ hid->ll_driver = &amdtp_hid_ll_driver; ++ hid_data->index = cur_hid_dev; ++ hid_data->cli_data = cli_data; ++ init_waitqueue_head(&hid_data->hid_wait); ++ ++ hid->driver_data = hid_data; ++ cli_data->hid_sensor_hubs[cur_hid_dev] = hid; ++ hid->bus = BUS_AMD_AMDTP; ++ hid->vendor = AMD_SFH_HID_VENDOR; ++ hid->product = AMD_SFH_HID_PRODUCT; ++ snprintf(hid->name, sizeof(hid->name), "%s %04X:%04X", "hid-amdtp", ++ hid->vendor, hid->product); ++ ++ rc = hid_add_device(hid); ++ if (rc) ++ goto err_hid_device; ++ return 0; ++ ++err_hid_device: ++ kfree(hid_data); ++err_hid_data: ++ hid_destroy_device(hid); ++ return rc; ++} ++ ++void amdtp_hid_remove(struct amdtp_cl_data *cli_data) ++{ ++ int i; ++ ++ for (i = 0; i < cli_data->num_hid_devices; ++i) { ++ kfree(cli_data->feature_report[i]); ++ kfree(cli_data->input_report[i]); ++ kfree(cli_data->report_descr[i]); ++ if (cli_data->hid_sensor_hubs[i]) { ++ kfree(cli_data->hid_sensor_hubs[i]->driver_data); ++ hid_destroy_device(cli_data->hid_sensor_hubs[i]); ++ cli_data->hid_sensor_hubs[i] = NULL; ++ } ++ } ++} +diff -Naur linux-5.10.2/drivers/hid/amd-sfh-hid/amd_sfh_hid.h linux-5.10.2-amd/drivers/hid/amd-sfh-hid/amd_sfh_hid.h +--- linux-5.10.2/drivers/hid/amd-sfh-hid/amd_sfh_hid.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.10.2-amd/drivers/hid/amd-sfh-hid/amd_sfh_hid.h 2020-12-25 14:25:44.299391977 +0100 +@@ -0,0 +1,67 @@ ++/* SPDX-License-Identifier: GPL-2.0-or-later */ ++/* ++ * AMD MP2 Sensors transport driver ++ * ++ * Authors: Nehal Bakulchandra Shah <Nehal-bakulchandra.shah@amd.com> ++ * Sandeep Singh <sandeep.singh@amd.com> ++ */ ++ ++#ifndef AMDSFH_HID_H ++#define AMDSFH_HID_H ++ ++#define MAX_HID_DEVICES 4 ++#define BUS_AMD_AMDTP 0x20 ++#define AMD_SFH_HID_VENDOR 0x1022 ++#define AMD_SFH_HID_PRODUCT 0x0001 ++ ++struct amdtp_cl_data { ++ u8 init_done; ++ u32 cur_hid_dev; ++ u32 hid_dev_count; ++ u32 num_hid_devices; ++ struct device_info *hid_devices; ++ u8 *report_descr[MAX_HID_DEVICES]; ++ int report_descr_sz[MAX_HID_DEVICES]; ++ struct hid_device *hid_sensor_hubs[MAX_HID_DEVICES]; ++ u8 *hid_descr[MAX_HID_DEVICES]; ++ int hid_descr_size[MAX_HID_DEVICES]; ++ phys_addr_t phys_addr_base; ++ u32 *sensor_virt_addr[MAX_HID_DEVICES]; ++ phys_addr_t sensor_phys_addr[MAX_HID_DEVICES]; ++ u32 sensor_sts[MAX_HID_DEVICES]; ++ u32 sensor_requested_cnt[MAX_HID_DEVICES]; ++ u8 report_type[MAX_HID_DEVICES]; ++ u8 report_id[MAX_HID_DEVICES]; ++ u8 sensor_idx[MAX_HID_DEVICES]; ++ u8 *feature_report[MAX_HID_DEVICES]; ++ u8 *input_report[MAX_HID_DEVICES]; ++ u8 request_done[MAX_HID_DEVICES]; ++ struct delayed_work work; ++ struct delayed_work work_buffer; ++}; ++ ++/** ++ * struct amdtp_hid_data - Per instance HID data ++ * @index: Device index in the order of enumeration ++ * @request_done: Get Feature/Input report complete flag ++ * used during get/set request from hid core ++ * @cli_data: Link to the client instance ++ * @hid_wait: Completion waitq ++ * ++ * Used to tie hid->driver data to driver client instance ++ */ ++struct amdtp_hid_data { ++ int index; ++ struct amdtp_cl_data *cli_data; ++ wait_queue_head_t hid_wait; ++}; ++ ++/* Interface functions between HID LL driver and AMD SFH client */ ++void hid_amdtp_set_feature(struct hid_device *hid, char *buf, u32 len, int report_id); ++void hid_amdtp_get_report(struct hid_device *hid, int report_id, int report_type); ++int amdtp_hid_probe(u32 cur_hid_dev, struct amdtp_cl_data *cli_data); ++void amdtp_hid_remove(struct amdtp_cl_data *cli_data); ++int amd_sfh_get_report(struct hid_device *hid, int report_id, int report_type); ++void amd_sfh_set_report(struct hid_device *hid, int report_id, int report_type); ++void amdtp_hid_wakeup(struct hid_device *hid); ++#endif +diff -Naur linux-5.10.2/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c linux-5.10.2-amd/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +--- linux-5.10.2/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.10.2-amd/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c 2020-12-25 14:25:44.299391977 +0100 +@@ -0,0 +1,152 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++/* ++ * AMD MP2 PCIe communication driver ++ * Copyright 2020 Advanced Micro Devices, Inc. ++ * ++ * Authors: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> ++ * Sandeep Singh <Sandeep.singh@amd.com> ++ */ ++ ++#include <linux/bitops.h> ++#include <linux/delay.h> ++#include <linux/dma-mapping.h> ++#include <linux/interrupt.h> ++#include <linux/io-64-nonatomic-lo-hi.h> ++#include <linux/module.h> ++#include <linux/slab.h> ++ ++#include "amd_sfh_pcie.h" ++ ++#define DRIVER_NAME "pcie_mp2_amd" ++#define DRIVER_DESC "AMD(R) PCIe MP2 Communication Driver" ++ ++#define ACEL_EN BIT(0) ++#define GYRO_EN BIT(1) ++#define MAGNO_EN BIT(2) ++#define ALS_EN BIT(19) ++ ++void amd_start_sensor(struct amd_mp2_dev *privdata, struct amd_mp2_sensor_info info) ++{ ++ union sfh_cmd_param cmd_param; ++ union sfh_cmd_base cmd_base; ++ ++ /* fill up command register */ ++ memset(&cmd_base, 0, sizeof(cmd_base)); ++ cmd_base.s.cmd_id = ENABLE_SENSOR; ++ cmd_base.s.period = info.period; ++ cmd_base.s.sensor_id = info.sensor_idx; ++ ++ /* fill up command param register */ ++ memset(&cmd_param, 0, sizeof(cmd_param)); ++ cmd_param.s.buf_layout = 1; ++ cmd_param.s.buf_length = 16; ++ ++ writeq(info.phys_address, privdata->mmio + AMD_C2P_MSG2); ++ writel(cmd_param.ul, privdata->mmio + AMD_C2P_MSG1); ++ writel(cmd_base.ul, privdata->mmio + AMD_C2P_MSG0); ++} ++ ++void amd_stop_sensor(struct amd_mp2_dev *privdata, u16 sensor_idx) ++{ ++ union sfh_cmd_base cmd_base; ++ ++ /* fill up command register */ ++ memset(&cmd_base, 0, sizeof(cmd_base)); ++ cmd_base.s.cmd_id = DISABLE_SENSOR; ++ cmd_base.s.period = 0; ++ cmd_base.s.sensor_id = sensor_idx; ++ ++ writeq(0x0, privdata->mmio + AMD_C2P_MSG2); ++ writel(cmd_base.ul, privdata->mmio + AMD_C2P_MSG0); ++} ++ ++void amd_stop_all_sensors(struct amd_mp2_dev *privdata) ++{ ++ union sfh_cmd_base cmd_base; ++ ++ /* fill up command register */ ++ memset(&cmd_base, 0, sizeof(cmd_base)); ++ cmd_base.s.cmd_id = STOP_ALL_SENSORS; ++ cmd_base.s.period = 0; ++ cmd_base.s.sensor_id = 0; ++ ++ writel(cmd_base.ul, privdata->mmio + AMD_C2P_MSG0); ++} ++ ++int amd_mp2_get_sensor_num(struct amd_mp2_dev *privdata, u8 *sensor_id) ++{ ++ int activestatus, num_of_sensors = 0; ++ ++ privdata->activecontrolstatus = readl(privdata->mmio + AMD_P2C_MSG3); ++ activestatus = privdata->activecontrolstatus >> 4; ++ if (ACEL_EN & activestatus) ++ sensor_id[num_of_sensors++] = accel_idx; ++ ++ if (GYRO_EN & activestatus) ++ sensor_id[num_of_sensors++] = gyro_idx; ++ ++ if (MAGNO_EN & activestatus) ++ sensor_id[num_of_sensors++] = mag_idx; ++ ++ if (ALS_EN & activestatus) ++ sensor_id[num_of_sensors++] = als_idx; ++ ++ return num_of_sensors; ++} ++ ++static void amd_mp2_pci_remove(void *privdata) ++{ ++ amd_sfh_hid_client_deinit(privdata); ++ amd_stop_all_sensors(privdata); ++} ++ ++static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) ++{ ++ struct amd_mp2_dev *privdata; ++ int rc; ++ ++ privdata = devm_kzalloc(&pdev->dev, sizeof(*privdata), GFP_KERNEL); ++ if (!privdata) ++ return -ENOMEM; ++ ++ privdata->pdev = pdev; ++ pci_set_drvdata(pdev, privdata); ++ rc = pcim_enable_device(pdev); ++ if (rc) ++ return rc; ++ ++ rc = pcim_iomap_regions(pdev, BIT(2), DRIVER_NAME); ++ if (rc) ++ return rc; ++ ++ privdata->mmio = pcim_iomap_table(pdev)[2]; ++ pci_set_master(pdev); ++ rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)); ++ if (rc) { ++ rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); ++ return rc; ++ } ++ rc = devm_add_action_or_reset(&pdev->dev, amd_mp2_pci_remove, privdata); ++ if (rc) ++ return rc; ++ ++ return amd_sfh_hid_client_init(privdata); ++} ++ ++static const struct pci_device_id amd_mp2_pci_tbl[] = { ++ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_MP2) }, ++ { } ++}; ++MODULE_DEVICE_TABLE(pci, amd_mp2_pci_tbl); ++ ++static struct pci_driver amd_mp2_pci_driver = { ++ .name = DRIVER_NAME, ++ .id_table = amd_mp2_pci_tbl, ++ .probe = amd_mp2_pci_probe, ++}; ++module_pci_driver(amd_mp2_pci_driver); ++ ++MODULE_DESCRIPTION(DRIVER_DESC); ++MODULE_LICENSE("Dual BSD/GPL"); ++MODULE_AUTHOR("Shyam Sundar S K <Shyam-sundar.S-k@amd.com>"); ++MODULE_AUTHOR("Sandeep Singh <Sandeep.singh@amd.com>"); +diff -Naur linux-5.10.2/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h linux-5.10.2-amd/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h +--- linux-5.10.2/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.10.2-amd/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h 2020-12-25 14:25:44.299391977 +0100 +@@ -0,0 +1,79 @@ ++/* SPDX-License-Identifier: GPL-2.0-or-later */ ++/* ++ * AMD MP2 PCIe communication driver ++ * Copyright 2020 Advanced Micro Devices, Inc. ++ * Authors: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> ++ * Sandeep Singh <Sandeep.singh@amd.com> ++ */ ++ ++#ifndef PCIE_MP2_AMD_H ++#define PCIE_MP2_AMD_H ++ ++#include <linux/pci.h> ++ ++#define PCI_DEVICE_ID_AMD_MP2 0x15E4 ++ ++#define ENABLE_SENSOR 1 ++#define DISABLE_SENSOR 2 ++#define STOP_ALL_SENSORS 8 ++ ++/* MP2 C2P Message Registers */ ++#define AMD_C2P_MSG0 0x10500 ++#define AMD_C2P_MSG1 0x10504 ++#define AMD_C2P_MSG2 0x10508 ++ ++/* MP2 P2C Message Registers */ ++#define AMD_P2C_MSG3 0x1068C /* Supported Sensors info */ ++ ++/* SFH Command register */ ++union sfh_cmd_base { ++ u32 ul; ++ struct { ++ u32 cmd_id : 8; ++ u32 sensor_id : 8; ++ u32 period : 16; ++ } s; ++}; ++ ++union sfh_cmd_param { ++ u32 ul; ++ struct { ++ u32 buf_layout : 2; ++ u32 buf_length : 6; ++ u32 rsvd : 24; ++ } s; ++}; ++ ++struct sfh_cmd_reg { ++ union sfh_cmd_base cmd_base; ++ union sfh_cmd_param cmd_param; ++ phys_addr_t phys_addr; ++}; ++ ++enum sensor_idx { ++ accel_idx = 0, ++ gyro_idx = 1, ++ mag_idx = 2, ++ als_idx = 19 ++}; ++ ++struct amd_mp2_dev { ++ struct pci_dev *pdev; ++ struct amdtp_cl_data *cl_data; ++ void __iomem *mmio; ++ u32 activecontrolstatus; ++}; ++ ++struct amd_mp2_sensor_info { ++ u8 sensor_idx; ++ u32 period; ++ phys_addr_t phys_address; ++}; ++ ++void amd_start_sensor(struct amd_mp2_dev *privdata, struct amd_mp2_sensor_info info); ++void amd_stop_sensor(struct amd_mp2_dev *privdata, u16 sensor_idx); ++void amd_stop_all_sensors(struct amd_mp2_dev *privdata); ++int amd_mp2_get_sensor_num(struct amd_mp2_dev *privdata, u8 *sensor_id); ++int amd_sfh_hid_client_init(struct amd_mp2_dev *privdata); ++int amd_sfh_hid_client_deinit(struct amd_mp2_dev *privdata); ++#endif +diff -Naur linux-5.10.2/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.c linux-5.10.2-amd/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.c +--- linux-5.10.2/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.10.2-amd/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.c 2020-12-25 14:25:44.299391977 +0100 +@@ -0,0 +1,224 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++/* ++ * AMD SFH Report Descriptor generator ++ * Copyright 2020 Advanced Micro Devices, Inc. ++ * Authors: Nehal Bakulchandra Shah <Nehal-Bakulchandra.Shah@amd.com> ++ * Sandeep Singh <sandeep.singh@amd.com> ++ */ ++ ++#include <linux/kernel.h> ++#include <linux/string.h> ++#include <linux/slab.h> ++#include "amd_sfh_pcie.h" ++#include "amd_sfh_hid_desc.h" ++#include "amd_sfh_hid_report_desc.h" ++ ++#define AMD_SFH_FW_MULTIPLIER (1000) ++#define HID_USAGE_SENSOR_PROP_REPORTING_STATE_ALL_EVENTS_ENUM 0x41 ++#define HID_USAGE_SENSOR_PROP_POWER_STATE_D0_FULL_POWER_ENUM 0x51 ++#define HID_DEFAULT_REPORT_INTERVAL 0x50 ++#define HID_DEFAULT_MIN_VALUE 0X7F ++#define HID_DEFAULT_MAX_VALUE 0x80 ++#define HID_DEFAULT_SENSITIVITY 0x7F ++#define HID_USAGE_SENSOR_PROPERTY_CONNECTION_TYPE_PC_INTEGRATED_ENUM 0x01 ++/* state enums */ ++#define HID_USAGE_SENSOR_STATE_READY_ENUM 0x02 ++#define HID_USAGE_SENSOR_STATE_INITIALIZING_ENUM 0x05 ++#define HID_USAGE_SENSOR_EVENT_DATA_UPDATED_ENUM 0x04 ++ ++int get_report_descriptor(int sensor_idx, u8 *rep_desc) ++{ ++ switch (sensor_idx) { ++ case accel_idx: /* accel */ ++ memset(rep_desc, 0, sizeof(accel3_report_descriptor)); ++ memcpy(rep_desc, accel3_report_descriptor, ++ sizeof(accel3_report_descriptor)); ++ break; ++ case gyro_idx: /* gyro */ ++ memset(rep_desc, 0, sizeof(gyro3_report_descriptor)); ++ memcpy(rep_desc, gyro3_report_descriptor, ++ sizeof(gyro3_report_descriptor)); ++ break; ++ case mag_idx: /* Magnetometer */ ++ memset(rep_desc, 0, sizeof(comp3_report_descriptor)); ++ memcpy(rep_desc, comp3_report_descriptor, ++ sizeof(comp3_report_descriptor)); ++ break; ++ case als_idx: /* ambient light sensor */ ++ memset(rep_desc, 0, sizeof(als_report_descriptor)); ++ memcpy(rep_desc, als_report_descriptor, ++ sizeof(als_report_descriptor)); ++ break; ++ default: ++ break; ++ } ++ return 0; ++} ++ ++u32 get_descr_sz(int sensor_idx, int descriptor_name) ++{ ++ switch (sensor_idx) { ++ case accel_idx: ++ switch (descriptor_name) { ++ case descr_size: ++ return sizeof(accel3_report_descriptor); ++ case input_size: ++ return sizeof(struct accel3_input_report); ++ case feature_size: ++ return sizeof(struct accel3_feature_report); ++ } ++ break; ++ case gyro_idx: ++ switch (descriptor_name) { ++ case descr_size: ++ return sizeof(gyro3_report_descriptor); ++ case input_size: ++ return sizeof(struct gyro_input_report); ++ case feature_size: ++ return sizeof(struct gyro_feature_report); ++ } ++ break; ++ case mag_idx: ++ switch (descriptor_name) { ++ case descr_size: ++ return sizeof(comp3_report_descriptor); ++ case input_size: ++ return sizeof(struct magno_input_report); ++ case feature_size: ++ return sizeof(struct magno_feature_report); ++ } ++ break; ++ case als_idx: ++ switch (descriptor_name) { ++ case descr_size: ++ return sizeof(als_report_descriptor); ++ case input_size: ++ return sizeof(struct als_input_report); ++ case feature_size: ++ return sizeof(struct als_feature_report); ++ } ++ break; ++ default: ++ break; ++ } ++ return 0; ++} ++ ++static void get_common_features(struct common_feature_property *common, int report_id) ++{ ++ common->report_id = report_id; ++ common->connection_type = HID_USAGE_SENSOR_PROPERTY_CONNECTION_TYPE_PC_INTEGRATED_ENUM; ++ common->report_state = HID_USAGE_SENSOR_PROP_REPORTING_STATE_ALL_EVENTS_ENUM; ++ common->power_state = HID_USAGE_SENSOR_PROP_POWER_STATE_D0_FULL_POWER_ENUM; ++ common->sensor_state = HID_USAGE_SENSOR_STATE_INITIALIZING_ENUM; ++ common->report_interval = HID_DEFAULT_REPORT_INTERVAL; ++} ++ ++u8 get_feature_report(int sensor_idx, int report_id, u8 *feature_report) ++{ ++ struct accel3_feature_report acc_feature; ++ struct gyro_feature_report gyro_feature; ++ struct magno_feature_report magno_feature; ++ struct als_feature_report als_feature; ++ u8 report_size = 0; ++ ++ if (!feature_report) ++ return report_size; ++ ++ switch (sensor_idx) { ++ case accel_idx: /* accel */ ++ get_common_features(&acc_feature.common_property, report_id); ++ acc_feature.accel_change_sesnitivity = HID_DEFAULT_SENSITIVITY; ++ acc_feature.accel_sensitivity_min = HID_DEFAULT_MIN_VALUE; ++ acc_feature.accel_sensitivity_max = HID_DEFAULT_MAX_VALUE; ++ memcpy(feature_report, &acc_feature, sizeof(acc_feature)); ++ report_size = sizeof(acc_feature); ++ break; ++ case gyro_idx: /* gyro */ ++ get_common_features(&gyro_feature.common_property, report_id); ++ gyro_feature.gyro_change_sesnitivity = HID_DEFAULT_SENSITIVITY; ++ gyro_feature.gyro_sensitivity_min = HID_DEFAULT_MIN_VALUE; ++ gyro_feature.gyro_sensitivity_max = HID_DEFAULT_MAX_VALUE; ++ memcpy(feature_report, &gyro_feature, sizeof(gyro_feature)); ++ report_size = sizeof(gyro_feature); ++ break; ++ case mag_idx: /* Magnetometer */ ++ get_common_features(&magno_feature.common_property, report_id); ++ magno_feature.magno_headingchange_sensitivity = HID_DEFAULT_SENSITIVITY; ++ magno_feature.heading_min = HID_DEFAULT_MIN_VALUE; ++ magno_feature.heading_max = HID_DEFAULT_MAX_VALUE; ++ magno_feature.flux_change_sensitivity = HID_DEFAULT_MIN_VALUE; ++ magno_feature.flux_min = HID_DEFAULT_MIN_VALUE; ++ magno_feature.flux_max = HID_DEFAULT_MAX_VALUE; ++ memcpy(feature_report, &magno_feature, sizeof(magno_feature)); ++ report_size = sizeof(magno_feature); ++ break; ++ case als_idx: /* ambient light sensor */ ++ get_common_features(&als_feature.common_property, report_id); ++ als_feature.als_change_sesnitivity = HID_DEFAULT_SENSITIVITY; ++ als_feature.als_sensitivity_min = HID_DEFAULT_MIN_VALUE; ++ als_feature.als_sensitivity_max = HID_DEFAULT_MAX_VALUE; ++ memcpy(feature_report, &als_feature, sizeof(als_feature)); ++ report_size = sizeof(als_feature); ++ break; ++ default: ++ break; ++ } ++ return report_size; ++} ++ ++static void get_common_inputs(struct common_input_property *common, int report_id) ++{ ++ common->report_id = report_id; ++ common->sensor_state = HID_USAGE_SENSOR_STATE_READY_ENUM; ++ common->event_type = HID_USAGE_SENSOR_EVENT_DATA_UPDATED_ENUM; ++} ++ ++u8 get_input_report(int sensor_idx, int report_id, u8 *input_report, u32 *sensor_virt_addr) ++{ ++ struct accel3_input_report acc_input; ++ struct gyro_input_report gyro_input; ++ struct magno_input_report magno_input; ++ struct als_input_report als_input; ++ u8 report_size = 0; ++ ++ if (!sensor_virt_addr || !input_report) ++ return report_size; ++ ++ switch (sensor_idx) { ++ case accel_idx: /* accel */ ++ get_common_inputs(&acc_input.common_property, report_id); ++ acc_input.in_accel_x_value = (int)sensor_virt_addr[0] / AMD_SFH_FW_MULTIPLIER; ++ acc_input.in_accel_y_value = (int)sensor_virt_addr[1] / AMD_SFH_FW_MULTIPLIER; ++ acc_input.in_accel_z_value = (int)sensor_virt_addr[2] / AMD_SFH_FW_MULTIPLIER; ++ memcpy(input_report, &acc_input, sizeof(acc_input)); ++ report_size = sizeof(acc_input); ++ break; ++ case gyro_idx: /* gyro */ ++ get_common_inputs(&gyro_input.common_property, report_id); ++ gyro_input.in_angel_x_value = (int)sensor_virt_addr[0] / AMD_SFH_FW_MULTIPLIER; ++ gyro_input.in_angel_y_value = (int)sensor_virt_addr[1] / AMD_SFH_FW_MULTIPLIER; ++ gyro_input.in_angel_z_value = (int)sensor_virt_addr[2] / AMD_SFH_FW_MULTIPLIER; ++ memcpy(input_report, &gyro_input, sizeof(gyro_input)); ++ report_size = sizeof(gyro_input); ++ break; ++ case mag_idx: /* Magnetometer */ ++ get_common_inputs(&magno_input.common_property, report_id); ++ magno_input.in_magno_x = (int)sensor_virt_addr[0] / AMD_SFH_FW_MULTIPLIER; ++ magno_input.in_magno_y = (int)sensor_virt_addr[1] / AMD_SFH_FW_MULTIPLIER; ++ magno_input.in_magno_z = (int)sensor_virt_addr[2] / AMD_SFH_FW_MULTIPLIER; ++ magno_input.in_magno_accuracy = (u16)sensor_virt_addr[3] / AMD_SFH_FW_MULTIPLIER; ++ memcpy(input_report, &magno_input, sizeof(magno_input)); ++ report_size = sizeof(magno_input); ++ break; ++ case als_idx: /* Als */ ++ get_common_inputs(&als_input.common_property, report_id); ++ als_input.illuminance_value = (int)sensor_virt_addr[0] / AMD_SFH_FW_MULTIPLIER; ++ report_size = sizeof(als_input); ++ memcpy(input_report, &als_input, sizeof(als_input)); ++ break; ++ default: ++ break; ++ } ++ return report_size; ++} +diff -Naur linux-5.10.2/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.h linux-5.10.2-amd/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.h +--- linux-5.10.2/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.10.2-amd/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.h 2020-12-25 14:25:44.299391977 +0100 +@@ -0,0 +1,107 @@ ++/* SPDX-License-Identifier: GPL-2.0-or-later */ ++/* ++ * HID report descriptors, structures and routines ++ * Copyright 2020 Advanced Micro Devices, Inc. ++ * Authors: Nehal Bakulchandra Shah <Nehal-bakulchandra.shah@amd.com> ++ * Sandeep Singh <Sandeep.singh@amd.com> ++ */ ++ ++#ifndef AMD_SFH_HID_DESCRIPTOR_H ++#define AMD_SFH_HID_DESCRIPTOR_H ++ ++enum desc_type { ++ /* Report descriptor name */ ++ descr_size = 1, ++ input_size, ++ feature_size, ++}; ++ ++struct common_feature_property { ++ /* common properties */ ++ u8 report_id; ++ u8 connection_type; ++ u8 report_state; ++ u8 power_state; ++ u8 sensor_state; ++ u32 report_interval; ++} __packed; ++ ++struct common_input_property { ++ /* common properties */ ++ u8 report_id; ++ u8 sensor_state; ++ u8 event_type; ++} __packed; ++ ++struct accel3_feature_report { ++ struct common_feature_property common_property; ++ /* properties specific to this sensor */ ++ u16 accel_change_sesnitivity; ++ s16 accel_sensitivity_max; ++ s16 accel_sensitivity_min; ++} __packed; ++ ++struct accel3_input_report { ++ struct common_input_property common_property; ++ /* values specific to this sensor */ ++ int in_accel_x_value; ++ int in_accel_y_value; ++ int in_accel_z_value; ++ /* include if required to support the "shake" event */ ++ u8 in_accel_shake_detection; ++} __packed; ++ ++struct gyro_feature_report { ++ struct common_feature_property common_property; ++ /* properties specific to this sensor */ ++ u16 gyro_change_sesnitivity; ++ s16 gyro_sensitivity_max; ++ s16 gyro_sensitivity_min; ++} __packed; ++ ++struct gyro_input_report { ++ struct common_input_property common_property; ++ /* values specific to this sensor */ ++ int in_angel_x_value; ++ int in_angel_y_value; ++ int in_angel_z_value; ++} __packed; ++ ++struct magno_feature_report { ++ struct common_feature_property common_property; ++ /*properties specific to this sensor */ ++ u16 magno_headingchange_sensitivity; ++ s16 heading_min; ++ s16 heading_max; ++ u16 flux_change_sensitivity; ++ s16 flux_min; ++ s16 flux_max; ++} __packed; ++ ++struct magno_input_report { ++ struct common_input_property common_property; ++ int in_magno_x; ++ int in_magno_y; ++ int in_magno_z; ++ int in_magno_accuracy; ++} __packed; ++ ++struct als_feature_report { ++ struct common_feature_property common_property; ++ /* properties specific to this sensor */ ++ u16 als_change_sesnitivity; ++ s16 als_sensitivity_max; ++ s16 als_sensitivity_min; ++} __packed; ++ ++struct als_input_report { ++ struct common_input_property common_property; ++ /* values specific to this sensor */ ++ int illuminance_value; ++} __packed; ++ ++int get_report_descriptor(int sensor_idx, u8 rep_desc[]); ++u32 get_descr_sz(int sensor_idx, int descriptor_name); ++u8 get_feature_report(int sensor_idx, int report_id, u8 *feature_report); ++u8 get_input_report(int sensor_idx, int report_id, u8 *input_report, u32 *sensor_virt_addr); ++#endif +diff -Naur linux-5.10.2/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_report_desc.h linux-5.10.2-amd/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_report_desc.h +--- linux-5.10.2/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_report_desc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.10.2-amd/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_report_desc.h 2020-12-25 14:25:44.299391977 +0100 +@@ -0,0 +1,645 @@ ++/* SPDX-License-Identifier: GPL-2.0-or-later */ ++/* ++ * HID descriptor stuructures ++ * Copyright 2020 Advanced Micro Devices, Inc. ++ * Authors: Nehal Bakulchandra Shah <Nehal-bakulchandra.shah@amd.com> ++ * Sandeep Singh <Sandeep.singh@amd.com> ++ */ ++ ++#ifndef AMD_SFH_HID_REPORT_DESCRIPTOR_H ++#define AMD_SFH_HID_REPORT_DESCRIPTOR_H ++ ++// Accelerometer 3D Sensor ++static const u8 accel3_report_descriptor[] = { ++0x05, 0x20, /* Usage page */ ++0x09, 0x73, /* Motion type Accel 3D */ ++0xA1, 0x00, /* HID Collection (Physical) */ ++ ++//feature reports(xmit/receive) ++0x85, 1, /* HID Report ID */ ++0x05, 0x20, /* HID usage page sensor */ ++0x0A, 0x09, 0x03, /* Sensor property and sensor connection type */ ++0x15, 0, /* HID logical MIN_8(0) */ ++0x25, 2, /* HID logical MAX_8(2) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count(1) */ ++0xA1, 0x02, /* HID collection (logical) */ ++0x0A, 0x30, 0x08, /* Sensor property connection type intergated sel*/ ++0x0A, 0x31, 0x08, /* Sensor property connection type attached sel */ ++0x0A, 0x32, 0x08, /* Sensor property connection type external sel */ ++0xB1, 0x00, /* HID feature (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x16, 0x03, /* HID usage sensor property reporting state */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x25, 5, /* HID logical Max_8(5) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count(1) */ ++0xA1, 0x02, /* HID collection(logical) */ ++0x0A, 0x40, 0x08, /* Sensor property report state no events sel */ ++0x0A, 0x41, 0x08, /* Sensor property report state all events sel */ ++0x0A, 0x42, 0x08, /* Sensor property report state threshold events sel */ ++0x0A, 0x43, 0x08, /* Sensor property report state no events wake sel */ ++0x0A, 0x44, 0x08, /* Sensor property report state all events wake sel */ ++0x0A, 0x45, 0x08, /* Sensor property report state threshold events wake sel */ ++0xB1, 0x00, /* HID feature (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x19, 0x03, /* HID usage sensor property power state */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x25, 5, /* HID logical Max_8(5) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count(1) */ ++0xA1, 0x02, /* HID collection(logical) */ ++0x0A, 0x50, 0x08, /* Sensor property power state undefined sel */ ++0x0A, 0x51, 0x08, /* Sensor property power state D0 full power sel */ ++0x0A, 0x52, 0x08, /* Sensor property power state D1 low power sel */ ++0x0A, 0x53, 0x08, /* Sensor property power state D2 standby with wake sel */ ++0x0A, 0x54, 0x08, /* Sensor property power state D3 sleep with wake sel */ ++0x0A, 0x55, 0x08, /* Sensor property power state D4 power off sel */ ++0xB1, 0x00, /* HID feature (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x01, 0x02, /* HID usage sensor state */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x25, 6, /* HID logical Max_8(6) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count(1) */ ++0xA1, 0x02, /* HID collection(logical) */ ++0x0A, 0x00, 0x08, /* HID usage sensor state unknown sel */ ++0x0A, 0x01, 0x08, /* HID usage sensor state ready sel */ ++0x0A, 0x02, 0x08, /* HID usage sensor state not available sel */ ++0x0A, 0x03, 0x08, /* HID usage sensor state no data sel */ ++0x0A, 0x04, 0x08, /* HID usage sensor state initializing sel */ ++0x0A, 0x05, 0x08, /* HID usage sensor state access denied sel */ ++0x0A, 0x06, 0x08, /* HID usage sensor state error sel */ ++0xB1, 0x00, /* HID feature (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x0E, 0x03, /* HID usage sensor property report interval */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x27, 0xFF, 0xFF, 0xFF, 0xFF, /* HID logical Max_32 */ ++ ++0x75, 32, /* HID report size(32) */ ++0x95, 1, /* HID report count(1) */ ++0x55, 0, /* HID unit exponent(0) */ ++0xB1, 0x02, /* HID feature (Data_Arr_Abs) */ ++0x0A, 0x52, 0x14, /* Sensor data motion accel and mod change sensitivity ABS) */ ++ ++0x15, 0, /* HID logical Min_8(0) */ ++0x26, 0xFF, 0xFF, /* HID logical Max_16(0xFF,0xFF) */ ++ ++0x75, 16, /* HID report size(16) */ ++0x95, 1, /* HID report count(1) */ ++0x55, 0x0E, /* HID unit exponent(0x0E) */ ++0xB1, 0x02, /* HID feature (Data_Arr_Abs) */ ++0x0A, 0x52, 0x24, /* HID usage sensor data (motion accel and mod max) */ ++ ++0x16, 0x01, 0x80, /* HID logical Min_16(0x01,0x80) */ ++ ++0x26, 0xFF, 0x7F, /* HID logical Max_16(0xFF,0x7F) */ ++ ++0x75, 16, /* HID report size(16) */ ++0x95, 1, /* HID report count(1) */ ++0x55, 0x0E, /* HID unit exponent(0x0E) */ ++0xB1, 0x02, /* HID feature (Data_Arr_Abs) */ ++0x0A, 0x52, 0x34, /* HID usage sensor data (motion accel and mod min) */ ++ ++0x16, 0x01, 0x80, /* HID logical Min_16(0x01,0x80) */ ++ ++0x26, 0xFF, 0x7F, /* HID logical Max_16(0xFF,0x7F) */ ++ ++0x75, 16, /* HID report size(16) */ ++0x95, 1, /* HID report count(1) */ ++0x55, 0x0E, /* HID unit exponent(0x0E) */ ++0xB1, 0x02, /* HID feature (Data_Arr_Abs) */ ++ ++//input report (transmit) ++0x05, 0x20, /* HID usage page sensors */ ++0x0A, 0x01, 0x02, /* HID usage sensor state */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x25, 6, /* HID logical Max_8(6) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count (1) */ ++0xA1, 0x02, /* HID end collection (logical) */ ++0x0A, 0x00, 0x08, /* HID usage sensor state unknown sel */ ++0x0A, 0x01, 0x08, /* HID usage sensor state ready sel */ ++0x0A, 0x02, 0x08, /* HID usage sensor state not available sel */ ++0x0A, 0x03, 0x08, /* HID usage sensor state no data sel */ ++0x0A, 0x04, 0x08, /* HID usage sensor state initializing sel */ ++0x0A, 0x05, 0x08, /* HID usage sensor state access denied sel */ ++0x0A, 0x06, 0x08, /* HID usage sensor state error sel */ ++0X81, 0x00, /* HID Input (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x02, 0x02, /* HID usage sensor event */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x25, 5, /* HID logical Max_8(5) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count (1) */ ++0xA1, 0x02, /* HID end collection (logical) */ ++0x0A, 0x10, 0x08, /* HID usage sensor event unknown sel */ ++0x0A, 0x11, 0x08, /* HID usage sensor event state changed sel */ ++0x0A, 0x12, 0x08, /* HID usage sensor event property changed sel */ ++0x0A, 0x13, 0x08, /* HID usage sensor event data updated sel */ ++0x0A, 0x14, 0x08, /* HID usage sensor event poll response sel */ ++0x0A, 0x15, 0x08, /* HID usage sensor event change sensitivity sel */ ++0X81, 0x00, /* HID Input (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x53, 0x04, /* HID usage sensor data motion Acceleration X axis */ ++0x17, 0x00, 0x00, 0x01, 0x80, /* HID logical Min_32 */ ++ ++0x27, 0xFF, 0xff, 0XFF, 0XFF, /* HID logical Max_32 */ ++ ++0x75, 32, /* HID report size(32) */ ++0x95, 1, /* HID report count (1) */ ++0x55, 0x0E, /* HID unit exponent(0x0E) */ ++0X81, 0x02, /* HID Input (Data_Arr_Abs) */ ++0x0A, 0x54, 0x04, /* HID usage sensor data motion Acceleration Y axis */ ++0x17, 0X00, 0X00, 0x01, 0x80, /* HID logical Min_32 */ ++ ++0x27, 0xFF, 0xFF, 0XFF, 0XFF, /* HID logical Max_32 */ ++ ++0x75, 32, /* HID report size(32) */ ++0x95, 1, /* HID report count (1) */ ++0x55, 0x0E, /* HID unit exponent(0x0E) */ ++0X81, 0x02, /* HID Input (Data_Arr_Abs) */ ++0x0A, 0x55, 0x04, /* HID usage sensor data motion Acceleration Z axis */ ++0x17, 0X00, 0X00, 0x01, 0x80, /* HID logical Min_32 */ ++ ++0x27, 0XFF, 0XFF, 0xFF, 0x7F, /* HID logical Max_32 */ ++ ++0x75, 32, /* HID report size(32) */ ++0x95, 1, /* HID report count (1) */ ++0x55, 0x0E, /* HID unit exponent(0x0E) */ ++0X81, 0x02, /* HID Input (Data_Arr_Abs) */ ++ ++0x0A, 0x51, 0x04, /* HID usage sensor data motion state */ ++0x15, 0, /* HID logical Min_8(0) False = Still*/ ++0x25, 1, /* HID logical Min_8(1) True = In motion */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count (1) */ ++0X81, 0x02, /* HID Input (Data_Arr_Abs) */ ++0xC0 /* HID end collection */ ++}; ++ ++const u8 gyro3_report_descriptor[] = { ++0x05, 0x20, /* Usage page */ ++0x09, 0x76, /* Motion type Gyro3D */ ++0xA1, 0x00, /* HID Collection (Physical) */ ++ ++0x85, 2, /* HID Report ID */ ++0x05, 0x20, /* HID usage page sensor */ ++0x0A, 0x09, 0x03, /* Sensor property and sensor connection type */ ++0x15, 0, /* HID logical MIN_8(0) */ ++0x25, 2, /* HID logical MAX_8(2) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count(1) */ ++0xA1, 0x02, /* HID collection (logical) */ ++0x0A, 0x30, 0x08, /* Sensor property connection type intergated sel */ ++0x0A, 0x31, 0x08, /* Sensor property connection type attached sel */ ++0x0A, 0x32, 0x08, /* Sensor property connection type external sel */ ++0xB1, 0x00, /* HID feature (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x16, 0x03, /* HID usage sensor property reporting state */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x25, 5, /* HID logical Max_8(5) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count(1) */ ++0xA1, 0x02, /* HID collection(logical) */ ++0x0A, 0x40, 0x08, /* Sensor reporting state no events sel */ ++0x0A, 0x41, 0x08, /* Sensor reporting state all events sel */ ++0x0A, 0x42, 0x08, /* Sensor reporting state threshold events sel */ ++0x0A, 0x43, 0x08, /* Sensor reporting state no events wake sel */ ++0x0A, 0x44, 0x08, /* Sensor reporting state all events wake sel */ ++0x0A, 0x45, 0x08, /* Sensor reporting state threshold events wake sel */ ++0xB1, 0x00, /* HID feature (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x19, 0x03, /* HID usage sensor property power state */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x25, 5, /* HID logical Max_8(5) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count(1) */ ++0xA1, 0x02, /* HID collection(logical) */ ++0x0A, 0x50, 0x08, /* Sensor power state undefined sel */ ++0x0A, 0x51, 0x08, /* Sensor power state D0 full power sel */ ++0x0A, 0x52, 0x08, /* Sensor power state D1 low power sel */ ++0x0A, 0x53, 0x08, /* Sensor power state D2 standby with wake sel */ ++0x0A, 0x54, 0x08, /* Sensor power state D3 sleep with wake sel */ ++0x0A, 0x55, 0x08, /* Sensor power state D4 power off sel */ ++0xB1, 0x00, /* HID feature (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x01, 0x02, /* HID usage sensor state */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x25, 6, /* HID logical Max_8(6) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count(1) */ ++0xA1, 0x02, /* HID collection(logical) */ ++0x0A, 0x00, 0x08, /* HID usage sensor state unknown sel */ ++0x0A, 0x01, 0x08, /* HID usage sensor state ready sel */ ++0x0A, 0x02, 0x08, /* HID usage sensor state not available sel */ ++0x0A, 0x03, 0x08, /* HID usage sensor state no data sel */ ++0x0A, 0x04, 0x08, /* HID usage sensor state initializing sel */ ++0x0A, 0x05, 0x08, /* HID usage sensor state access denied sel */ ++0x0A, 0x06, 0x08, /* HID usage sensor state error sel */ ++0xB1, 0x00, /* HID feature (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x0E, 0x03, /* HID usage sensor property report interval */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x27, 0xFF, 0xFF, 0xFF, 0xFF, /* HID logical Max_32 */ ++ ++0x75, 32, /* HID report size(32) */ ++0x95, 1, /* HID report count(1) */ ++0x55, 0, /* HID unit exponent(0) */ ++0xB1, 0x02, /* HID feature (Data_Arr_Abs) */ ++0x0A, 0x56, 0x14, /* Angular velocity and mod change sensitivity ABS)*/ ++ ++0x15, 0, /* HID logical Min_8(0) */ ++0x26, 0xFF, 0xFF, /* HID logical Max_16(0xFF,0xFF) */ ++ ++0x75, 16, /* HID report size(16) */ ++0x95, 1, /* HID report count(1) */ ++0x55, 0x0E, /* HID unit exponent(0x0E) */ ++0xB1, 0x02, /* HID feature (Data_Arr_Abs) */ ++0x0A, 0x56, 0x24, /* Sensor data (motion angular velocity and mod max) */ ++ ++0x16, 0x01, 0x80, /* HID logical Min_16(0x01,0x80) */ ++ ++0x26, 0xFF, 0x7F, /* HID logical Max_16(0xFF,0x7F) */ ++ ++0x75, 16, /* HID report size(16) */ ++0x95, 1, /* HID report count(1) */ ++0x55, 0x0E, /* HID unit exponent(0x0E) */ ++0xB1, 0x02, /* HID feature (Data_Arr_Abs) */ ++0x0A, 0x56, 0x34, /* HID usage sensor data (motion accel and mod min) */ ++ ++0x16, 0x01, 0x80, /* HID logical Min_16(0x01,0x80) */ ++ ++0x26, 0xFF, 0x7F, /* HID logical Max_16(0xFF,0x7F) */ ++ ++0x75, 16, /* HID report size(16) */ ++0x95, 1, /* HID report count(1) */ ++0x55, 0x0E, /* HID unit exponent(0x0E) */ ++0xB1, 0x02, /* HID feature (Data_Arr_Abs) */ ++ ++//Input reports(transmit) ++0x05, 0x20, /* HID usage page sensors */ ++0x0A, 0x01, 0x02, /* HID usage sensor state */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x25, 6, /* HID logical Max_8(6) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count (1) */ ++0xA1, 0x02, /* HID end collection (logical) */ ++0x0A, 0x00, 0x08, /* HID usage sensor state unknown sel */ ++0x0A, 0x01, 0x08, /* HID usage sensor state ready sel */ ++0x0A, 0x02, 0x08, /* HID usage sensor state not available sel */ ++0x0A, 0x03, 0x08, /* HID usage sensor state no data sel */ ++0x0A, 0x04, 0x08, /* HID usage sensor state initializing sel */ ++0x0A, 0x05, 0x08, /* HID usage sensor state access denied sel */ ++0x0A, 0x06, 0x08, /* HID usage sensor state error sel */ ++0X81, 0x00, /* HID Input (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x02, 0x02, /* HID usage sensor event */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x25, 5, /* HID logical Max_8(5) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count (1) */ ++0xA1, 0x02, /* HID end collection (logical) */ ++0x0A, 0x10, 0x08, /* HID usage sensor event unknown sel */ ++0x0A, 0x11, 0x08, /* HID usage sensor event state changed sel */ ++0x0A, 0x12, 0x08, /* HID usage sensor event property changed sel */ ++0x0A, 0x13, 0x08, /* HID usage sensor event data updated sel */ ++0x0A, 0x14, 0x08, /* HID usage sensor event poll response sel */ ++0x0A, 0x15, 0x08, /* HID usage sensor event change sensitivity sel */ ++0X81, 0x00, /* HID Input (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x57, 0x04, /* Sensor data motion Angular velocity X axis */ ++0x17, 0x00, 0x00, 0x01, 0x80, /* HID logical Min_32 */ ++ ++0x27, 0xFF, 0xFF, 0xFF, 0x7F, /* HID logical Max_32 */ ++ ++0x75, 32, /* HID report size(32) */ ++0x95, 1, /* HID report count (1) */ ++0x55, 0x0E, /* HID unit exponent(0x0E) */ ++0X81, 0x02, /* HID Input (Data_Arr_Abs) */ ++0x0A, 0x58, 0x04, /* Sensor data motion Angular velocity Y axis */ ++0x17, 0x00, 0x00, 0x01, 0x80, /* HID logical Min_32 */ ++ ++0x27, 0xFF, 0xFF, 0xFF, 0x7F, /* HID logical Max_32 */ ++ ++0x75, 32, /* HID report size(32) */ ++0x95, 1, /* HID report count (1) */ ++0x55, 0x0E, /* HID unit exponent(0x0E) */ ++0X81, 0x02, /* HID Input (Data_Arr_Abs) */ ++0x0A, 0x59, 0x04, /* Sensor data motion Angular velocity Z axis */ ++0x17, 0x00, 0x00, 0x01, 0x80, /* HID logical Min_32 */ ++ ++0x27, 0xFF, 0xFF, 0xFF, 0x7F, /* HID logical Max_32 */ ++ ++0x75, 32, /* HID report size(32) */ ++0x95, 1, /* HID report count (1) */ ++0x55, 0x0E, /* HID unit exponent(0x0E) */ ++0X81, 0x02, /* HID Input (Data_Arr_Abs) */ ++ ++0xC0, /* HID end collection */ ++}; ++ ++const u8 comp3_report_descriptor[] = { ++0x05, 0x20, /* Usage page */ ++0x09, 0x83, /* Motion type Orientation compass 3D */ ++0xA1, 0x00, /* HID Collection (Physical) */ ++ ++0x85, 3, /* HID Report ID */ ++0x05, 0x20, /* HID usage page sensor */ ++0x0A, 0x09, 0x03, /* Sensor property and sensor connection type */ ++0x15, 0, /* HID logical MIN_8(0) */ ++0x25, 2, /* HID logical MAX_8(2) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count(1) */ ++0xA1, 0x02, /* HID collection (logical) */ ++0x0A, 0x30, 0x08, /* Sensor property connection type intergated sel */ ++0x0A, 0x31, 0x08, /* Sensor property connection type attached sel */ ++0x0A, 0x32, 0x08, /* Sensor property connection type external sel */ ++0xB1, 0x00, /* HID feature (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x16, 0x03, /* HID usage sensor property reporting state */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x25, 5, /* HID logical Max_8(5) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count(1) */ ++0xA1, 0x02, /* HID collection(logical) */ ++0x0A, 0x40, 0x08, /* Sensor reporting state no events sel */ ++0x0A, 0x41, 0x08, /* Sensor reporting state all events sel */ ++0x0A, 0x42, 0x08, /* Sensor reporting state threshold events sel */ ++0x0A, 0x43, 0x08, /* Sensor reporting state no events wake sel */ ++0x0A, 0x44, 0x08, /* Sensor reporting state all events wake sel */ ++0x0A, 0x45, 0x08, /* Sensor reporting state threshold events wake sel */ ++0xB1, 0x00, /* HID feature (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x19, 0x03, /* HID usage sensor property power state */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x25, 5, /* HID logical Max_8(5) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count(1) */ ++0xA1, 0x02, /* HID collection(logical) */ ++0x0A, 0x50, 0x08, /* Sensor power state undefined sel */ ++0x0A, 0x51, 0x08, /* Sensor power state D0 full power sel */ ++0x0A, 0x52, 0x08, /* Sensor power state D1 low power sel */ ++0x0A, 0x53, 0x08, /* Sensor power state D2 standby with wake sel */ ++0x0A, 0x54, 0x08, /* Sensor power state D3 sleep with wake sel */ ++0x0A, 0x55, 0x08, /* Sensor power state D4 power off sel */ ++0xB1, 0x00, /* HID feature (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x01, 0x02, /* HID usage sensor state */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x25, 6, /* HID logical Max_8(6) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count(1) */ ++0xA1, 0x02, /* HID collection(logical) */ ++0x0A, 0x00, 0x08, /* HID usage sensor state unknown sel */ ++0x0A, 0x01, 0x08, /* HID usage sensor state ready sel */ ++0x0A, 0x02, 0x08, /* HID usage sensor state not available sel */ ++0x0A, 0x03, 0x08, /* HID usage sensor state no data sel */ ++0x0A, 0x04, 0x08, /* HID usage sensor state initializing sel */ ++0x0A, 0x05, 0x08, /* HID usage sensor state access denied sel */ ++0x0A, 0x06, 0x08, /* HID usage sensor state error sel */ ++0xB1, 0x00, /* HID feature (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x0E, 0x03, /* HID usage sensor property report interval */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x27, 0xFF, 0xFF, 0xFF, 0xFF, /* HID logical Max_32 */ ++0x75, 32, /* HID report size(32) */ ++0x95, 1, /* HID report count(1) */ ++0x55, 0, /* HID unit exponent(0) */ ++0xB1, 0x02, /* HID feature (Data_Arr_Abs) */ ++0x0A, 0x71, 0x14, /* Orientation and mod change sensitivity ABS)*/ ++0x15, 0, /* HID logical Min_8(0) */ ++0x26, 0xFF, 0xFF, /* HID logical Max_16(0xFF,0xFF) */ ++0x75, 16, /* HID report size(16) */ ++0x95, 1, /* HID report count(1) */ ++0x55, 0x0E, /* HID unit exponent(0x0E) */ ++0xB1, 0x02, /* HID feature (Data_Arr_Abs) */ ++0x0A, 0x71, 0x24, /* Sensor data (motion orientation and mod max) */ ++0x16, 0x01, 0x80, /* HID logical Min_16(0x01,0x80) */ ++0x26, 0xFF, 0x7F, /* HID logical Max_16(0xFF,0x7F) */ ++0x75, 16, /* HID report size(16) */ ++0x95, 1, /* HID report count(1) */ ++0x55, 0x0F, /* HID unit exponent(0x0F) */ ++0xB1, 0x02, /* HID feature (Data_Arr_Abs) */ ++0x0A, 0x71, 0x34, /* Sensor data (motion orientation and mod min) */ ++0x16, 0x01, 0x80, /* HID logical Min_16(0x01,0x80) */ ++0x26, 0xFF, 0x7F, /* HID logical Max_16(0xFF,0x7F) */ ++0x75, 16, /* HID report size(16) */ ++0x95, 1, /* HID report count(1) */ ++0x55, 0x0F, /* HID unit exponent(0x0F) */ ++0xB1, 0x02, /* HID feature (Data_Arr_Abs) */ ++0x0A, 0x84, 0x14, /* Maganetic flux and change sensitivity ABS) */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x26, 0xFF, 0xFF, /* HID logical Max_16(0xFF,0xFF) */ ++0x75, 16, /* HID report size(16) */ ++0x95, 1, /* HID report count(1) */ ++0x55, 0x0E, /* HID unit exponent(0x0E) */ ++0xB1, 0x02, /* HID feature (Data_Arr_Abs) */ ++0x0A, 0x84, 0x24, /* Maganetic flux and mod change sensitivity Max) */ ++0x16, 0x01, 0x80, /* HID logical Min_16(0x01,0x80) */ ++0x26, 0xFF, 0x7F, /* HID logical Max_16(0xFF,0x7F) */ ++0x75, 16, /* HID report size(16) */ ++0x95, 1, /* HID report count(1) */ ++0x55, 0x0F, /* HID unit exponent(0x0F) */ ++0xB1, 0x02, /* HID feature (Data_Arr_Abs) */ ++0x0A, 0x84, 0x34, /* Maganetic flux and mod change sensitivity Min */ ++0x16, 0x01, 0x80, /* HID logical Min_16(0x01,0x80) */ ++0x26, 0xFF, 0x7F, /* HID logical Max_16(0xFF,0x7F) */ ++0x75, 16, /* HID report size(16) */ ++0x95, 1, /* HID report count(1) */ ++0x55, 0x0F, /* HID unit exponent(0x0F) */ ++0xB1, 0x02, /* HID feature (Data_Arr_Abs) */ ++ ++//Input reports(transmit) ++0x05, 0x20, /* HID usage page sensors */ ++0x0A, 0x01, 0x02, /* HID usage sensor state */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x25, 6, /* HID logical Max_8(6) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count (1) */ ++0xA1, 0x02, /* HID end collection (logical) */ ++0x0A, 0x00, 0x08, /* HID usage sensor state unknown sel */ ++0x0A, 0x01, 0x08, /* HID usage sensor state ready sel */ ++0x0A, 0x02, 0x08, /* HID usage sensor state not available sel */ ++0x0A, 0x03, 0x08, /* HID usage sensor state no data sel */ ++0x0A, 0x04, 0x08, /* HID usage sensor state initializing sel */ ++0x0A, 0x05, 0x08, /* HID usage sensor state access denied sel */ ++0x0A, 0x06, 0x08, /* HID usage sensor state error sel */ ++0X81, 0x00, /* HID Input (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x02, 0x02, /* HID usage sensor event */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x25, 5, /* HID logical Max_8(5) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count (1) */ ++0xA1, 0x02, /* HID end collection (logical) */ ++0x0A, 0x10, 0x08, /* HID usage sensor event unknown sel */ ++0x0A, 0x11, 0x08, /* HID usage sensor event state changed sel */ ++0x0A, 0x12, 0x08, /* HID usage sensor event property changed sel */ ++0x0A, 0x13, 0x08, /* HID usage sensor event data updated sel */ ++0x0A, 0x14, 0x08, /* HID usage sensor event poll response sel */ ++0x0A, 0x15, 0x08, /* HID usage sensor event change sensitivity sel */ ++0X81, 0x00, /* HID Input (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x85, 0x04, /* Sensor data orientation magnetic flux X axis */ ++0x17, 0x00, 0x00, 0x01, 0x80, /* HID logical Min_32 */ ++0x27, 0xFF, 0xFF, 0xFF, 0x7F, /* HID logical Max_32 */ ++0x75, 32, /* HID report size(32) */ ++0x95, 1, /* HID report count (1) */ ++0x55, 0x0D, /* HID unit exponent(0x0D) */ ++0X81, 0x02, /* HID Input (Data_Arr_Abs) */ ++0x0A, 0x86, 0x04, /* Sensor data orientation magnetic flux Y axis */ ++0x17, 0x00, 0x00, 0x01, 0x80, /* HID logical Min_32 */ ++0x27, 0xFF, 0xFF, 0xFF, 0x7F, /* HID logical Max_32 */ ++0x75, 32, /* HID report size(32) */ ++0x95, 1, /* HID report count (1) */ ++0x55, 0x0D, /* HID unit exponent(0x0D) */ ++0X81, 0x02, /* HID Input (Data_Arr_Abs) */ ++0x0A, 0x87, 0x04, /* Sensor data orientation magnetic flux Z axis */ ++0x17, 0x00, 0x00, 0x01, 0x80, /* HID logical Min_32 */ ++0x27, 0xFF, 0xFF, 0xFF, 0x7F, /* HID logical Max_32 */ ++0x75, 32, /* HID report size(32) */ ++0x95, 1, /* HID report count (1) */ ++0x55, 0x0D, /* HID unit exponent(0x0D) */ ++0X81, 0x02, /* HID Input (Data_Arr_Abs) */ ++0x0A, 0x88, 0x04, /* Sensor data orientation magnetometer accuracy */ ++0x17, 0x00, 0x00, 0x01, 0x80, /* HID logical Min_32 */ ++0x27, 0xFF, 0xFF, 0xFF, 0x7F, /* HID logical Max_32 */ ++0x75, 32, /* HID report size(32) */ ++0x95, 1, /* HID report count (1) */ ++0X81, 0x02, /* HID Input (Data_Arr_Abs) */ ++0xC0 /* HID end collection */ ++}; ++ ++const u8 als_report_descriptor[] = { ++0x05, 0x20, /* HID usage page sensor */ ++0x09, 0x41, /* HID usage sensor type Ambientlight */ ++0xA1, 0x00, /* HID Collection (Physical) */ ++ ++//feature reports(xmit/receive)// ++0x85, 4, /* HID Report ID */ ++0x05, 0x20, /* HID usage page sensor */ ++0x0A, 0x09, 0x03, /* Sensor property and sensor connection type */ ++0x15, 0, /* HID logical MIN_8(0) */ ++0x25, 2, /* HID logical MAX_8(2) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count(1) */ ++0xA1, 0x02, /* HID collection (logical) */ ++0x0A, 0x30, 0x08, /* Sensor property connection type intergated sel */ ++0x0A, 0x31, 0x08, /* Sensor property connection type attached sel */ ++0x0A, 0x32, 0x08, /* Sensor property connection type external sel */ ++0xB1, 0x00, /* HID feature (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x16, 0x03, /* HID usage sensor property reporting state */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x25, 5, /* HID logical Max_8(5) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count(1) */ ++0xA1, 0x02, /* HID collection(logical) */ ++0x0A, 0x40, 0x08, /* Sensor reporting state no events sel */ ++0x0A, 0x41, 0x08, /* Sensor reporting state all events sel */ ++0x0A, 0x42, 0x08, /* Sensor reporting state threshold events sel */ ++0x0A, 0x43, 0x08, /* Sensor reporting state no events wake sel */ ++0x0A, 0x44, 0x08, /* Sensor reporting state all events wake sel */ ++0x0A, 0x45, 0x08, /* Sensor reporting state threshold events wake sel */ ++0xB1, 0x00, /* HID feature (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x19, 0x03, /* HID usage sensor property power state */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x25, 5, /* HID logical Max_8(5) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count(1) */ ++0xA1, 0x02, /* HID collection(logical) */ ++0x0A, 0x50, 0x08, /* Sensor power state undefined sel */ ++0x0A, 0x51, 0x08, /* Sensor power state D0 full power sel */ ++0x0A, 0x52, 0x08, /* Sensor power state D1 low power sel */ ++0x0A, 0x53, 0x08, /* Sensor power state D2 standby with wake sel */ ++0x0A, 0x54, 0x08, /* Sensor power state D3 sleep with wake sel */ ++0x0A, 0x55, 0x08, /* Sensor power state D4 power off sel */ ++0xB1, 0x00, /* HID feature (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x01, 0x02, /* HID usage sensor state */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x25, 6, /* HID logical Max_8(6) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count(1) */ ++0xA1, 0x02, /* HID collection(logical) */ ++0x0A, 0x00, 0x08, /* HID usage sensor state unknown sel */ ++0x0A, 0x01, 0x08, /* HID usage sensor state ready sel */ ++0x0A, 0x02, 0x08, /* HID usage sensor state not available sel */ ++0x0A, 0x03, 0x08, /* HID usage sensor state no data sel */ ++0x0A, 0x04, 0x08, /* HID usage sensor state initializing sel */ ++0x0A, 0x05, 0x08, /* HID usage sensor state access denied sel */ ++0x0A, 0x06, 0x08, /* HID usage sensor state error sel */ ++0xB1, 0x00, /* HID feature (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x0E, 0x03, /* HID usage sensor property report interval */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x27, 0xFF, 0xFF, 0xFF, 0xFF, /* HID logical Max_32 */ ++0x75, 32, /* HID report size(32) */ ++0x95, 1, /* HID report count(1) */ ++0x55, 0, /* HID unit exponent(0) */ ++0xB1, 0x02, /* HID feature (Data_Arr_Abs) */ ++0x0A, 0xD1, 0xE4, /* Light illuminance and sensitivity REL PCT) */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x26, 0x10, 0x27, /* HID logical Max_16(0x10,0x27) */ ++0x75, 16, /* HID report size(16) */ ++0x95, 1, /* HID report count(1) */ ++0x55, 0x0E, /* HID unit exponent(0x0E) */ ++0xB1, 0x02, /* HID feature (Data_Arr_Abs) */ ++0x0A, 0xD1, 0x24, /* Sensor data (Light illuminance and mod max) */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x26, 0xFF, 0xFF, /* HID logical Max_16(0xFF,0xFF) */ ++0x75, 16, /* HID report size(16) */ ++0x95, 1, /* HID report count(1) */ ++0x55, 0x0F, /* HID unit exponent(0x0F) */ ++0xB1, 0x02, /* HID feature (Data_Arr_Abs) */ ++0x0A, 0xD1, 0x34, /* Sensor data (Light illuminance and mod min) */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x26, 0xFF, 0xFF, /* HID logical Max_16(0xFF,0xFF) */ ++0x75, 16, /* HID report size(16) */ ++0x95, 1, /* HID report count(1) */ ++0x55, 0x0F, /* HID unit exponent(0x0F) */ ++0xB1, 0x02, /* HID feature (Data_Arr_Abs) */ ++ ++//Input reports (transmit) ++0x05, 0x20, /* HID usage page sensors */ ++0x0A, 0x01, 0x02, /* HID usage sensor state */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x25, 6, /* HID logical Max_8(6) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count (1) */ ++0xA1, 0x02, /* HID end collection (logical) */ ++0x0A, 0x00, 0x08, /* HID usage sensor state unknown sel */ ++0x0A, 0x01, 0x08, /* HID usage sensor state ready sel */ ++0x0A, 0x02, 0x08, /* HID usage sensor state not available sel */ ++0x0A, 0x03, 0x08, /* HID usage sensor state no data sel */ ++0x0A, 0x04, 0x08, /* HID usage sensor state initializing sel */ ++0x0A, 0x05, 0x08, /* HID usage sensor state access denied sel */ ++0x0A, 0x06, 0x08, /* HID usage sensor state error sel */ ++0X81, 0x00, /* HID Input (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0x02, 0x02, /* HID usage sensor event */ ++0x15, 0, /* HID logical Min_8(0) */ ++0x25, 5, /* HID logical Max_8(5) */ ++0x75, 8, /* HID report size(8) */ ++0x95, 1, /* HID report count (1) */ ++0xA1, 0x02, /* HID end collection (logical) */ ++0x0A, 0x10, 0x08, /* HID usage sensor event unknown sel */ ++0x0A, 0x11, 0x08, /* HID usage sensor event state changed sel */ ++0x0A, 0x12, 0x08, /* HID usage sensor event property changed sel */ ++0x0A, 0x13, 0x08, /* HID usage sensor event data updated sel */ ++0x0A, 0x14, 0x08, /* HID usage sensor event poll response sel */ ++0x0A, 0x15, 0x08, /* HID usage sensor event change sensitivity sel */ ++0X81, 0x00, /* HID Input (Data_Arr_Abs) */ ++0xC0, /* HID end collection */ ++0x0A, 0xD1, 0x04, /* HID usage sensor data light illuminance */ ++0x17, 0x00, 0x00, 0x01, 0x80, /* HID logical Min_32 */ ++0x27, 0xFF, 0xFF, 0xFF, 0x7F, /* HID logical Max_32 */ ++0x55, 0x0F, /* HID unit exponent(0x0F) */ ++0x75, 32, /* HID report size(32) */ ++0x95, 1, /* HID report count (1) */ ++0X81, 0x02, /* HID Input (Data_Arr_Abs) */ ++0xC0 /* HID end collection */ ++}; ++#endif +diff -Naur linux-5.10.2/drivers/hid/amd-sfh-hid/Kconfig linux-5.10.2-amd/drivers/hid/amd-sfh-hid/Kconfig +--- linux-5.10.2/drivers/hid/amd-sfh-hid/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.10.2-amd/drivers/hid/amd-sfh-hid/Kconfig 2020-12-25 14:25:44.298391979 +0100 +@@ -0,0 +1,18 @@ ++# SPDX-License-Identifier: GPL-2.0-or-later ++menu "AMD SFH HID Support" ++ depends on X86_64 || COMPILE_TEST ++ depends on PCI ++ depends on HID ++ ++config AMD_SFH_HID ++ tristate "AMD Sensor Fusion Hub" ++ help ++ If you say yes to this option, support will be included for the ++ AMD Sensor Fusion Hub. ++ This driver will enable sensors functionality on AMD platforms ++ starting from 17h family of RYZEN parts. ++ ++ This driver can also be built as a module. If so, the module will ++ be called amd-sfh. ++ Say Y or M here if you want to support AMD SFH. If unsure, say N. ++endmenu +diff -Naur linux-5.10.2/drivers/hid/amd-sfh-hid/Makefile linux-5.10.2-amd/drivers/hid/amd-sfh-hid/Makefile +--- linux-5.10.2/drivers/hid/amd-sfh-hid/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.10.2-amd/drivers/hid/amd-sfh-hid/Makefile 2020-12-25 14:25:44.298391979 +0100 +@@ -0,0 +1,13 @@ ++# SPDX-License-Identifier: GPL-2.0-or-later ++# ++# Makefile - AMD SFH HID drivers ++# Copyright (c) 2019-2020, Advanced Micro Devices, Inc. ++# ++# ++obj-$(CONFIG_AMD_SFH_HID) += amd_sfh.o ++amd_sfh-objs := amd_sfh_hid.o ++amd_sfh-objs += amd_sfh_client.o ++amd_sfh-objs += amd_sfh_pcie.o ++amd_sfh-objs += hid_descriptor/amd_sfh_hid_desc.o ++ ++ccflags-y += -I $(srctree)/$(src)/ +diff -Naur linux-5.10.2/drivers/hid/Kconfig linux-5.10.2-amd/drivers/hid/Kconfig +--- linux-5.10.2/drivers/hid/Kconfig 2020-12-21 13:30:08.000000000 +0100 ++++ linux-5.10.2-amd/drivers/hid/Kconfig 2020-12-25 14:27:01.284205047 +0100 +@@ -1183,4 +1183,6 @@ + + source "drivers/hid/intel-ish-hid/Kconfig" + ++source "drivers/hid/amd-sfh-hid/Kconfig" ++ + endmenu +diff -Naur linux-5.10.2/drivers/hid/Makefile linux-5.10.2-amd/drivers/hid/Makefile +--- linux-5.10.2/drivers/hid/Makefile 2020-12-21 13:30:08.000000000 +0100 ++++ linux-5.10.2-amd/drivers/hid/Makefile 2020-12-25 15:14:25.713530171 +0100 +@@ -142,3 +142,4 @@ + + obj-$(CONFIG_INTEL_ISH_HID) += intel-ish-hid/ + obj-$(INTEL_ISH_FIRMWARE_DOWNLOADER) += intel-ish-hid/ ++obj-$(CONFIG_AMD_SFH_HID) += amd-sfh-hid/ diff --git a/sys-kernel/linux-image-redcore-lts/files/5.10-add-sbtsi_driver.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-add-sbtsi_driver.patch new file mode 100644 index 00000000..13035071 --- /dev/null +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-add-sbtsi_driver.patch @@ -0,0 +1,285 @@ +diff -Naur linux-5.10.2/drivers/hwmon/Kconfig linux-5.10.2-p/drivers/hwmon/Kconfig +--- linux-5.10.2/drivers/hwmon/Kconfig 2020-12-21 13:30:08.000000000 +0100 ++++ linux-5.10.2-p/drivers/hwmon/Kconfig 2020-12-25 13:49:22.911559911 +0100 +@@ -1499,6 +1499,16 @@ + This driver can also be built as a module. If so, the module + will be called sl28cpld-hwmon. + ++config SENSORS_SBTSI ++ tristate "Emulated SB-TSI temperature sensor" ++ depends on I2C ++ help ++ If you say yes here you get support for emulated temperature ++ sensors on AMD SoCs with SB-TSI interface connected to a BMC device. ++ ++ This driver can also be built as a module. If so, the module will ++ be called sbtsi_temp. ++ + config SENSORS_SHT15 + tristate "Sensiron humidity and temperature sensors. SHT15 and compat." + depends on GPIOLIB || COMPILE_TEST +diff -Naur linux-5.10.2/drivers/hwmon/Makefile linux-5.10.2-p/drivers/hwmon/Makefile +--- linux-5.10.2/drivers/hwmon/Makefile 2020-12-21 13:30:08.000000000 +0100 ++++ linux-5.10.2-p/drivers/hwmon/Makefile 2020-12-25 13:49:22.911559911 +0100 +@@ -158,6 +158,7 @@ + obj-$(CONFIG_SENSORS_PWM_FAN) += pwm-fan.o + obj-$(CONFIG_SENSORS_RASPBERRYPI_HWMON) += raspberrypi-hwmon.o + obj-$(CONFIG_SENSORS_S3C) += s3c-hwmon.o ++obj-$(CONFIG_SENSORS_SBTSI) += sbtsi_temp.o + obj-$(CONFIG_SENSORS_SCH56XX_COMMON)+= sch56xx-common.o + obj-$(CONFIG_SENSORS_SCH5627) += sch5627.o + obj-$(CONFIG_SENSORS_SCH5636) += sch5636.o +diff -Naur linux-5.10.2/drivers/hwmon/sbtsi_temp.c linux-5.10.2-p/drivers/hwmon/sbtsi_temp.c +--- linux-5.10.2/drivers/hwmon/sbtsi_temp.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-5.10.2-p/drivers/hwmon/sbtsi_temp.c 2020-12-25 13:49:22.911559911 +0100 +@@ -0,0 +1,250 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++/* ++ * sbtsi_temp.c - hwmon driver for a SBI Temperature Sensor Interface (SB-TSI) ++ * compliant AMD SoC temperature device. ++ * ++ * Copyright (c) 2020, Google Inc. ++ * Copyright (c) 2020, Kun Yi <kunyi@google.com> ++ */ ++ ++#include <linux/err.h> ++#include <linux/i2c.h> ++#include <linux/init.h> ++#include <linux/hwmon.h> ++#include <linux/module.h> ++#include <linux/mutex.h> ++#include <linux/of_device.h> ++#include <linux/of.h> ++ ++/* ++ * SB-TSI registers only support SMBus byte data access. "_INT" registers are ++ * the integer part of a temperature value or limit, and "_DEC" registers are ++ * corresponding decimal parts. ++ */ ++#define SBTSI_REG_TEMP_INT 0x01 /* RO */ ++#define SBTSI_REG_STATUS 0x02 /* RO */ ++#define SBTSI_REG_CONFIG 0x03 /* RO */ ++#define SBTSI_REG_TEMP_HIGH_INT 0x07 /* RW */ ++#define SBTSI_REG_TEMP_LOW_INT 0x08 /* RW */ ++#define SBTSI_REG_TEMP_DEC 0x10 /* RW */ ++#define SBTSI_REG_TEMP_HIGH_DEC 0x13 /* RW */ ++#define SBTSI_REG_TEMP_LOW_DEC 0x14 /* RW */ ++ ++#define SBTSI_CONFIG_READ_ORDER_SHIFT 5 ++ ++#define SBTSI_TEMP_MIN 0 ++#define SBTSI_TEMP_MAX 255875 ++ ++/* Each client has this additional data */ ++struct sbtsi_data { ++ struct i2c_client *client; ++ struct mutex lock; ++}; ++ ++/* ++ * From SB-TSI spec: CPU temperature readings and limit registers encode the ++ * temperature in increments of 0.125 from 0 to 255.875. The "high byte" ++ * register encodes the base-2 of the integer portion, and the upper 3 bits of ++ * the "low byte" encode in base-2 the decimal portion. ++ * ++ * e.g. INT=0x19, DEC=0x20 represents 25.125 degrees Celsius ++ * ++ * Therefore temperature in millidegree Celsius = ++ * (INT + DEC / 256) * 1000 = (INT * 8 + DEC / 32) * 125 ++ */ ++static inline int sbtsi_reg_to_mc(s32 integer, s32 decimal) ++{ ++ return ((integer << 3) + (decimal >> 5)) * 125; ++} ++ ++/* ++ * Inversely, given temperature in millidegree Celsius ++ * INT = (TEMP / 125) / 8 ++ * DEC = ((TEMP / 125) % 8) * 32 ++ * Caller have to make sure temp doesn't exceed 255875, the max valid value. ++ */ ++static inline void sbtsi_mc_to_reg(s32 temp, u8 *integer, u8 *decimal) ++{ ++ temp /= 125; ++ *integer = temp >> 3; ++ *decimal = (temp & 0x7) << 5; ++} ++ ++static int sbtsi_read(struct device *dev, enum hwmon_sensor_types type, ++ u32 attr, int channel, long *val) ++{ ++ struct sbtsi_data *data = dev_get_drvdata(dev); ++ s32 temp_int, temp_dec; ++ int err; ++ ++ switch (attr) { ++ case hwmon_temp_input: ++ /* ++ * ReadOrder bit specifies the reading order of integer and ++ * decimal part of CPU temp for atomic reads. If bit == 0, ++ * reading integer part triggers latching of the decimal part, ++ * so integer part should be read first. If bit == 1, read ++ * order should be reversed. ++ */ ++ err = i2c_smbus_read_byte_data(data->client, SBTSI_REG_CONFIG); ++ if (err < 0) ++ return err; ++ ++ mutex_lock(&data->lock); ++ if (err & BIT(SBTSI_CONFIG_READ_ORDER_SHIFT)) { ++ temp_dec = i2c_smbus_read_byte_data(data->client, SBTSI_REG_TEMP_DEC); ++ temp_int = i2c_smbus_read_byte_data(data->client, SBTSI_REG_TEMP_INT); ++ } else { ++ temp_int = i2c_smbus_read_byte_data(data->client, SBTSI_REG_TEMP_INT); ++ temp_dec = i2c_smbus_read_byte_data(data->client, SBTSI_REG_TEMP_DEC); ++ } ++ mutex_unlock(&data->lock); ++ break; ++ case hwmon_temp_max: ++ mutex_lock(&data->lock); ++ temp_int = i2c_smbus_read_byte_data(data->client, SBTSI_REG_TEMP_HIGH_INT); ++ temp_dec = i2c_smbus_read_byte_data(data->client, SBTSI_REG_TEMP_HIGH_DEC); ++ mutex_unlock(&data->lock); ++ break; ++ case hwmon_temp_min: ++ mutex_lock(&data->lock); ++ temp_int = i2c_smbus_read_byte_data(data->client, SBTSI_REG_TEMP_LOW_INT); ++ temp_dec = i2c_smbus_read_byte_data(data->client, SBTSI_REG_TEMP_LOW_DEC); ++ mutex_unlock(&data->lock); ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ ++ if (temp_int < 0) ++ return temp_int; ++ if (temp_dec < 0) ++ return temp_dec; ++ ++ *val = sbtsi_reg_to_mc(temp_int, temp_dec); ++ ++ return 0; ++} ++ ++static int sbtsi_write(struct device *dev, enum hwmon_sensor_types type, ++ u32 attr, int channel, long val) ++{ ++ struct sbtsi_data *data = dev_get_drvdata(dev); ++ int reg_int, reg_dec, err; ++ u8 temp_int, temp_dec; ++ ++ switch (attr) { ++ case hwmon_temp_max: ++ reg_int = SBTSI_REG_TEMP_HIGH_INT; ++ reg_dec = SBTSI_REG_TEMP_HIGH_DEC; ++ break; ++ case hwmon_temp_min: ++ reg_int = SBTSI_REG_TEMP_LOW_INT; ++ reg_dec = SBTSI_REG_TEMP_LOW_DEC; ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ val = clamp_val(val, SBTSI_TEMP_MIN, SBTSI_TEMP_MAX); ++ sbtsi_mc_to_reg(val, &temp_int, &temp_dec); ++ ++ mutex_lock(&data->lock); ++ err = i2c_smbus_write_byte_data(data->client, reg_int, temp_int); ++ if (err) ++ goto exit; ++ ++ err = i2c_smbus_write_byte_data(data->client, reg_dec, temp_dec); ++exit: ++ mutex_unlock(&data->lock); ++ return err; ++} ++ ++static umode_t sbtsi_is_visible(const void *data, ++ enum hwmon_sensor_types type, ++ u32 attr, int channel) ++{ ++ switch (type) { ++ case hwmon_temp: ++ switch (attr) { ++ case hwmon_temp_input: ++ return 0444; ++ case hwmon_temp_min: ++ return 0644; ++ case hwmon_temp_max: ++ return 0644; ++ } ++ break; ++ default: ++ break; ++ } ++ return 0; ++} ++ ++static const struct hwmon_channel_info *sbtsi_info[] = { ++ HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), ++ HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_MIN | HWMON_T_MAX), ++ NULL ++}; ++ ++static const struct hwmon_ops sbtsi_hwmon_ops = { ++ .is_visible = sbtsi_is_visible, ++ .read = sbtsi_read, ++ .write = sbtsi_write, ++}; ++ ++static const struct hwmon_chip_info sbtsi_chip_info = { ++ .ops = &sbtsi_hwmon_ops, ++ .info = sbtsi_info, ++}; ++ ++static int sbtsi_probe(struct i2c_client *client, ++ const struct i2c_device_id *id) ++{ ++ struct device *dev = &client->dev; ++ struct device *hwmon_dev; ++ struct sbtsi_data *data; ++ ++ data = devm_kzalloc(dev, sizeof(struct sbtsi_data), GFP_KERNEL); ++ if (!data) ++ return -ENOMEM; ++ ++ data->client = client; ++ mutex_init(&data->lock); ++ ++ hwmon_dev = devm_hwmon_device_register_with_info(dev, client->name, data, &sbtsi_chip_info, ++ NULL); ++ ++ return PTR_ERR_OR_ZERO(hwmon_dev); ++} ++ ++static const struct i2c_device_id sbtsi_id[] = { ++ {"sbtsi", 0}, ++ {} ++}; ++MODULE_DEVICE_TABLE(i2c, sbtsi_id); ++ ++static const struct of_device_id __maybe_unused sbtsi_of_match[] = { ++ { ++ .compatible = "amd,sbtsi", ++ }, ++ { }, ++}; ++MODULE_DEVICE_TABLE(of, sbtsi_of_match); ++ ++static struct i2c_driver sbtsi_driver = { ++ .class = I2C_CLASS_HWMON, ++ .driver = { ++ .name = "sbtsi", ++ .of_match_table = of_match_ptr(sbtsi_of_match), ++ }, ++ .probe = sbtsi_probe, ++ .id_table = sbtsi_id, ++}; ++ ++module_i2c_driver(sbtsi_driver); ++ ++MODULE_AUTHOR("Kun Yi <kunyi@google.com>"); ++MODULE_DESCRIPTION("Hwmon driver for AMD SB-TSI emulated sensor"); ++MODULE_LICENSE("GPL"); diff --git a/sys-kernel/linux-image-redcore-lts/files/5.4-amd64.config b/sys-kernel/linux-image-redcore-lts/files/5.10-amd64.config index ae62098e..90a1a253 100644 --- a/sys-kernel/linux-image-redcore-lts/files/5.4-amd64.config +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-amd64.config @@ -1,19 +1,19 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 5.4.24-redcore-lts Kernel Configuration -# - -# -# Compiler: gcc (Gentoo Hardened 8.2.0-r1337 p1.6) 8.2.0 +# Linux/x86 5.10.4-redcore-lts Kernel Configuration # +CONFIG_CC_VERSION_TEXT="gcc (Gentoo Hardened 10.2.0-r10 p4) 10.2.0" CONFIG_CC_IS_GCC=y -CONFIG_GCC_VERSION=80200 +CONFIG_GCC_VERSION=100200 +CONFIG_LD_VERSION=235010000 CONFIG_CLANG_VERSION=0 +CONFIG_LLD_VERSION=0 CONFIG_CC_CAN_LINK=y +CONFIG_CC_CAN_LINK_STATIC=y CONFIG_CC_HAS_ASM_GOTO=y -CONFIG_CC_HAS_WARN_MAYBE_UNINITIALIZED=y +CONFIG_CC_HAS_ASM_INLINE=y CONFIG_IRQ_WORK=y -CONFIG_BUILDTIME_EXTABLE_SORT=y +CONFIG_BUILDTIME_TABLE_SORT=y CONFIG_THREAD_INFO_IN_TASK=y # @@ -30,18 +30,22 @@ CONFIG_HAVE_KERNEL_LZMA=y CONFIG_HAVE_KERNEL_XZ=y CONFIG_HAVE_KERNEL_LZO=y CONFIG_HAVE_KERNEL_LZ4=y +CONFIG_HAVE_KERNEL_ZSTD=y # CONFIG_KERNEL_GZIP is not set # CONFIG_KERNEL_BZIP2 is not set # CONFIG_KERNEL_LZMA is not set # CONFIG_KERNEL_XZ is not set # CONFIG_KERNEL_LZO is not set CONFIG_KERNEL_LZ4=y +# CONFIG_KERNEL_ZSTD is not set +CONFIG_DEFAULT_INIT="" CONFIG_DEFAULT_HOSTNAME="(none)" CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_SYSVIPC_SYSCTL=y CONFIG_POSIX_MQUEUE=y CONFIG_POSIX_MQUEUE_SYSCTL=y +# CONFIG_WATCH_QUEUE is not set CONFIG_CROSS_MEMORY_ATTACH=y # CONFIG_USELIB is not set CONFIG_AUDIT=y @@ -56,12 +60,14 @@ CONFIG_GENERIC_IRQ_SHOW=y CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y CONFIG_GENERIC_PENDING_IRQ=y CONFIG_GENERIC_IRQ_MIGRATION=y +CONFIG_HARDIRQS_SW_RESEND=y CONFIG_GENERIC_IRQ_CHIP=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_SIM=y CONFIG_IRQ_DOMAIN_HIERARCHY=y CONFIG_GENERIC_MSI_IRQ=y CONFIG_GENERIC_MSI_IRQ_DOMAIN=y +CONFIG_IRQ_MSI_IOMMU=y CONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR=y CONFIG_GENERIC_IRQ_RESERVATION_MODE=y CONFIG_IRQ_FORCED_THREADING=y @@ -70,7 +76,6 @@ CONFIG_SPARSE_IRQ=y # end of IRQ subsystem CONFIG_CLOCKSOURCE_WATCHDOG=y -CONFIG_ARCH_CLOCKSOURCE_DATA=y CONFIG_ARCH_CLOCKSOURCE_INIT=y CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=y CONFIG_GENERIC_TIME_VSYSCALL=y @@ -78,6 +83,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y CONFIG_GENERIC_CMOS_UPDATE=y +CONFIG_HAVE_POSIX_CPU_TIMERS_TASK_WORK=y +CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y # # Timers subsystem @@ -121,20 +128,21 @@ CONFIG_CPU_ISOLATION=y # # RCU Subsystem # +CONFIG_TREE_RCU=y CONFIG_PREEMPT_RCU=y -CONFIG_RCU_EXPERT=y +# CONFIG_RCU_EXPERT is not set CONFIG_SRCU=y CONFIG_TREE_SRCU=y +CONFIG_TASKS_RCU_GENERIC=y CONFIG_TASKS_RCU=y +CONFIG_TASKS_RUDE_RCU=y +CONFIG_TASKS_TRACE_RCU=y CONFIG_RCU_STALL_COMMON=y CONFIG_RCU_NEED_SEGCBLIST=y -CONFIG_RCU_FANOUT=64 -CONFIG_RCU_FANOUT_LEAF=16 -# CONFIG_RCU_FAST_NO_HZ is not set -# CONFIG_RCU_BOOST is not set CONFIG_RCU_NOCB_CPU=y # end of RCU Subsystem +CONFIG_BUILD_BIN2C=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_IKHEADERS is not set @@ -151,6 +159,7 @@ CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y +CONFIG_CC_HAS_INT128=y CONFIG_ARCH_SUPPORTS_INT128=y CONFIG_NUMA_BALANCING=y CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y @@ -158,7 +167,6 @@ CONFIG_CGROUPS=y CONFIG_PAGE_COUNTER=y CONFIG_MEMCG=y CONFIG_MEMCG_SWAP=y -CONFIG_MEMCG_SWAP_ENABLED=y CONFIG_MEMCG_KMEM=y CONFIG_BLK_CGROUP=y CONFIG_CGROUP_WRITEBACK=y @@ -180,12 +188,13 @@ CONFIG_CGROUP_BPF=y CONFIG_SOCK_CGROUP_DATA=y CONFIG_NAMESPACES=y CONFIG_UTS_NS=y +CONFIG_TIME_NS=y CONFIG_IPC_NS=y CONFIG_USER_NS=y -CONFIG_USER_NS_UNPRIVILEGED=y +# CONFIG_USER_NS_UNPRIVILEGED is not set CONFIG_PID_NS=y CONFIG_NET_NS=y -# CONFIG_CHECKPOINT_RESTORE is not set +CONFIG_CHECKPOINT_RESTORE=y CONFIG_SCHED_AUTOGROUP=y # CONFIG_SYSFS_DEPRECATED is not set CONFIG_RELAY=y @@ -197,8 +206,11 @@ CONFIG_RD_LZMA=y CONFIG_RD_XZ=y CONFIG_RD_LZO=y CONFIG_RD_LZ4=y +CONFIG_RD_ZSTD=y +CONFIG_BOOT_CONFIG=y CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_LD_ORPHAN_WARN=y CONFIG_SYSCTL=y CONFIG_HAVE_UID16=y CONFIG_SYSCTL_EXCEPTION_TRACE=y @@ -227,13 +239,17 @@ CONFIG_SHMEM=y CONFIG_AIO=y CONFIG_IO_URING=y CONFIG_ADVISE_SYSCALLS=y +CONFIG_HAVE_ARCH_USERFAULTFD_WP=y CONFIG_MEMBARRIER=y CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y CONFIG_KALLSYMS_ABSOLUTE_PERCPU=y CONFIG_KALLSYMS_BASE_RELATIVE=y CONFIG_BPF_SYSCALL=y +CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y CONFIG_BPF_JIT_ALWAYS_ON=y +CONFIG_BPF_JIT_DEFAULT_ON=y +# CONFIG_BPF_PRELOAD is not set CONFIG_USERFAULTFD=y # CONFIG_USERFAULTFD_UNPRIVILEGED is not set CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y @@ -268,7 +284,6 @@ CONFIG_X86_64=y CONFIG_X86=y CONFIG_INSTRUCTION_DECODER=y CONFIG_OUTPUT_FORMAT="elf64-x86-64" -CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig" CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_MMU=y @@ -327,11 +342,10 @@ CONFIG_X86_HV_CALLBACK_VECTOR=y # CONFIG_XEN is not set CONFIG_KVM_GUEST=y CONFIG_ARCH_CPUIDLE_HALTPOLL=y -CONFIG_PVH=y -# CONFIG_KVM_DEBUG_FS is not set +# CONFIG_PVH is not set # CONFIG_PARAVIRT_TIME_ACCOUNTING is not set CONFIG_PARAVIRT_CLOCK=y -CONFIG_JAILHOUSE_GUEST=y +# CONFIG_JAILHOUSE_GUEST is not set # CONFIG_ACRN_GUEST is not set # CONFIG_MK8 is not set # CONFIG_MPSC is not set @@ -345,6 +359,8 @@ CONFIG_X86_CMPXCHG64=y CONFIG_X86_CMOV=y CONFIG_X86_MINIMUM_CPU_FAMILY=64 CONFIG_X86_DEBUGCTLMSR=y +CONFIG_IA32_FEAT_CTL=y +CONFIG_X86_VMX_FEATURE_NAMES=y CONFIG_CPU_SUP_INTEL=y CONFIG_CPU_SUP_AMD=y CONFIG_CPU_SUP_HYGON=y @@ -354,7 +370,6 @@ CONFIG_HPET_TIMER=y CONFIG_HPET_EMULATE_RTC=y CONFIG_DMI=y CONFIG_GART_IOMMU=y -# CONFIG_CALGARY_IOMMU is not set CONFIG_MAXSMP=y CONFIG_NR_CPUS_RANGE_BEGIN=8192 CONFIG_NR_CPUS_RANGE_END=8192 @@ -386,6 +401,7 @@ CONFIG_PERF_EVENTS_AMD_POWER=m CONFIG_X86_16BIT=y CONFIG_X86_ESPFIX64=y CONFIG_X86_VSYSCALL_EMULATION=y +CONFIG_X86_IOPL_IOPERM=y CONFIG_I8K=m CONFIG_MICROCODE=y CONFIG_MICROCODE_INTEL=y @@ -401,7 +417,6 @@ CONFIG_AMD_MEM_ENCRYPT=y CONFIG_NUMA=y CONFIG_AMD_NUMA=y CONFIG_X86_64_ACPI_NUMA=y -CONFIG_NODES_SPAN_OTHER_NODES=y # CONFIG_NUMA_EMU is not set CONFIG_NODES_SHIFT=10 CONFIG_ARCH_SPARSEMEM_ENABLE=y @@ -423,8 +438,7 @@ CONFIG_X86_PAT=y CONFIG_ARCH_USES_PG_UNCACHED=y CONFIG_ARCH_RANDOM=y CONFIG_X86_SMAP=y -CONFIG_X86_INTEL_UMIP=y -CONFIG_X86_INTEL_MPX=y +CONFIG_X86_UMIP=y CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS=y CONFIG_X86_INTEL_TSX_MODE_OFF=y # CONFIG_X86_INTEL_TSX_MODE_ON is not set @@ -432,16 +446,18 @@ CONFIG_X86_INTEL_TSX_MODE_OFF=y CONFIG_EFI=y CONFIG_EFI_STUB=y CONFIG_EFI_MIXED=y -CONFIG_SECCOMP=y # CONFIG_HZ_100 is not set # CONFIG_HZ_250 is not set # CONFIG_HZ_300 is not set CONFIG_HZ_1000=y CONFIG_HZ=1000 CONFIG_SCHED_HRTICK=y -# CONFIG_KEXEC is not set -# CONFIG_KEXEC_FILE is not set +CONFIG_KEXEC=y +CONFIG_KEXEC_FILE=y +CONFIG_ARCH_HAS_KEXEC_PURGATORY=y +# CONFIG_KEXEC_SIG is not set # CONFIG_CRASH_DUMP is not set +CONFIG_KEXEC_JUMP=y CONFIG_PHYSICAL_START=0x1000000 CONFIG_RELOCATABLE=y CONFIG_RANDOMIZE_BASE=y @@ -460,7 +476,7 @@ CONFIG_LEGACY_VSYSCALL_XONLY=y # CONFIG_CMDLINE_BOOL is not set CONFIG_MODIFY_LDT_SYSCALL=y CONFIG_HAVE_LIVEPATCH=y -# CONFIG_LIVEPATCH is not set +CONFIG_LIVEPATCH=y # end of Processor type and features CONFIG_ARCH_HAS_ADD_PAGES=y @@ -479,6 +495,7 @@ CONFIG_SUSPEND=y CONFIG_SUSPEND_FREEZER=y CONFIG_HIBERNATE_CALLBACKS=y CONFIG_HIBERNATION=y +CONFIG_HIBERNATION_SNAPSHOT_DEV=y CONFIG_PM_STD_PARTITION="" CONFIG_PM_SLEEP=y CONFIG_PM_SLEEP_SMP=y @@ -502,12 +519,13 @@ CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y CONFIG_ACPI_SPCR_TABLE=y CONFIG_ACPI_LPIT=y CONFIG_ACPI_SLEEP=y -# CONFIG_ACPI_PROCFS_POWER is not set CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y # CONFIG_ACPI_EC_DEBUGFS is not set CONFIG_ACPI_AC=m CONFIG_ACPI_BATTERY=m CONFIG_ACPI_BUTTON=m +CONFIG_ACPI_TINY_POWER_BUTTON=m +CONFIG_ACPI_TINY_POWER_BUTTON_SIGNAL=38 CONFIG_ACPI_VIDEO=m CONFIG_ACPI_FAN=m CONFIG_ACPI_TAD=m @@ -521,7 +539,6 @@ CONFIG_ACPI_IPMI=m CONFIG_ACPI_HOTPLUG_CPU=y CONFIG_ACPI_PROCESSOR_AGGREGATOR=m CONFIG_ACPI_THERMAL=m -CONFIG_ACPI_NUMA=y CONFIG_ARCH_HAS_ACPI_TABLE_UPGRADE=y CONFIG_ACPI_TABLE_UPGRADE=y # CONFIG_ACPI_DEBUG is not set @@ -535,6 +552,7 @@ CONFIG_ACPI_HED=y CONFIG_ACPI_BGRT=y CONFIG_ACPI_NFIT=m # CONFIG_NFIT_SECURITY_DEBUG is not set +CONFIG_ACPI_NUMA=y CONFIG_ACPI_HMAT=y CONFIG_HAVE_ACPI_APEI=y CONFIG_HAVE_ACPI_APEI_NMI=y @@ -544,15 +562,17 @@ CONFIG_ACPI_APEI_PCIEAER=y CONFIG_ACPI_APEI_MEMORY_FAILURE=y # CONFIG_ACPI_APEI_EINJ is not set # CONFIG_ACPI_APEI_ERST_DEBUG is not set +CONFIG_ACPI_DPTF=y CONFIG_DPTF_POWER=m +CONFIG_DPTF_PCH_FIVR=m CONFIG_ACPI_WATCHDOG=y CONFIG_ACPI_EXTLOG=m CONFIG_ACPI_ADXL=y +CONFIG_ACPI_CONFIGFS=m CONFIG_PMIC_OPREGION=y # CONFIG_XPOWER_PMIC_OPREGION is not set # CONFIG_BXT_WC_PMIC_OPREGION is not set CONFIG_CHT_DC_TI_PMIC_OPREGION=y -CONFIG_ACPI_CONFIGFS=m CONFIG_X86_PM_TIMER=y CONFIG_SFI=y @@ -629,8 +649,6 @@ CONFIG_COMPAT_FOR_U64_ALIGNMENT=y CONFIG_SYSVIPC_COMPAT=y # end of Binary Emulations -CONFIG_X86_DEV_DMA_OPS=y - # # Firmware Drivers # @@ -660,20 +678,25 @@ CONFIG_EFI_VARS=m CONFIG_EFI_ESRT=y CONFIG_EFI_VARS_PSTORE=m CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y +CONFIG_EFI_RUNTIME_MAP=y # CONFIG_EFI_FAKE_MEMMAP is not set +CONFIG_EFI_SOFT_RESERVE=y CONFIG_EFI_RUNTIME_WRAPPERS=y +CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y CONFIG_EFI_BOOTLOADER_CONTROL=m CONFIG_EFI_CAPSULE_LOADER=m CONFIG_EFI_TEST=m CONFIG_APPLE_PROPERTIES=y CONFIG_RESET_ATTACK_MITIGATION=y CONFIG_EFI_RCI2_TABLE=y +# CONFIG_EFI_DISABLE_PCI_DMA is not set # end of EFI (Extensible Firmware Interface) Support CONFIG_UEFI_CPER=y CONFIG_UEFI_CPER_X86=y CONFIG_EFI_DEV_PATH_PARSER=y CONFIG_EFI_EARLYCON=y +CONFIG_EFI_CUSTOM_SSDT_OVERLAYS=y # # Tegra firmware driver @@ -695,27 +718,31 @@ CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y CONFIG_KVM_COMPAT=y CONFIG_HAVE_KVM_IRQ_BYPASS=y CONFIG_HAVE_KVM_NO_POLL=y +CONFIG_KVM_XFER_TO_GUEST_WORK=y CONFIG_VIRTUALIZATION=y CONFIG_KVM=m CONFIG_KVM_INTEL=m CONFIG_KVM_AMD=m +CONFIG_KVM_AMD_SEV=y # CONFIG_KVM_MMU_AUDIT is not set -CONFIG_VHOST_NET=m -CONFIG_VHOST_SCSI=m -CONFIG_VHOST_VSOCK=m -CONFIG_VHOST=m -# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set +CONFIG_AS_AVX512=y +CONFIG_AS_SHA1_NI=y +CONFIG_AS_SHA256_NI=y +CONFIG_AS_TPAUSE=y # # General architecture-dependent options # CONFIG_CRASH_CORE=y +CONFIG_KEXEC_CORE=y CONFIG_HOTPLUG_SMT=y +CONFIG_GENERIC_ENTRY=y CONFIG_HAVE_OPROFILE=y CONFIG_OPROFILE_NMI_TIMER=y # CONFIG_KPROBES is not set CONFIG_JUMP_LABEL=y # CONFIG_STATIC_KEYS_SELFTEST is not set +# CONFIG_STATIC_CALL_SELFTEST is not set CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y CONFIG_ARCH_USE_BUILTIN_BSWAP=y CONFIG_USER_RETURN_NOTIFIER=y @@ -738,7 +765,6 @@ CONFIG_HAVE_ASM_MODVERSIONS=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_RSEQ=y CONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y -CONFIG_HAVE_CLK=y CONFIG_HAVE_HW_BREAKPOINT=y CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y CONFIG_HAVE_USER_RETURN_NOTIFIER=y @@ -748,18 +774,20 @@ CONFIG_HAVE_PERF_REGS=y CONFIG_HAVE_PERF_USER_STACK_DUMP=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=y -CONFIG_HAVE_RCU_TABLE_FREE=y +CONFIG_MMU_GATHER_TABLE_FREE=y +CONFIG_MMU_GATHER_RCU_TABLE_FREE=y CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y CONFIG_HAVE_CMPXCHG_LOCAL=y CONFIG_HAVE_CMPXCHG_DOUBLE=y CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y +CONFIG_HAVE_ARCH_SECCOMP=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_SECCOMP=y CONFIG_SECCOMP_FILTER=y CONFIG_HAVE_ARCH_STACKLEAK=y CONFIG_HAVE_STACKPROTECTOR=y -CONFIG_CC_HAS_STACKPROTECTOR_NONE=y CONFIG_STACKPROTECTOR=y CONFIG_STACKPROTECTOR_STRONG=y CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=y @@ -774,7 +802,6 @@ CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y CONFIG_HAVE_ARCH_SOFT_DIRTY=y CONFIG_HAVE_MOD_ARCH_SPECIFIC=y CONFIG_MODULES_USE_ELF_RELA=y -CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y CONFIG_ARCH_HAS_ELF_RANDOMIZE=y CONFIG_HAVE_ARCH_MMAP_RND_BITS=y CONFIG_HAVE_EXIT_THREAD=y @@ -782,13 +809,11 @@ CONFIG_ARCH_MMAP_RND_BITS=32 CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y CONFIG_ARCH_MMAP_RND_COMPAT_BITS=16 CONFIG_HAVE_ARCH_COMPAT_MMAP_BASES=y -CONFIG_HAVE_COPY_THREAD_TLS=y CONFIG_HAVE_STACK_VALIDATION=y CONFIG_HAVE_RELIABLE_STACKTRACE=y CONFIG_ISA_BUS_API=y CONFIG_OLD_SIGSUSPEND3=y CONFIG_COMPAT_OLD_SIGACTION=y -CONFIG_64BIT_TIME=y CONFIG_COMPAT_32BIT_TIME=y CONFIG_HAVE_ARCH_VMAP_STACK=y CONFIG_VMAP_STACK=y @@ -796,12 +821,13 @@ CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y CONFIG_STRICT_KERNEL_RWX=y CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y CONFIG_STRICT_MODULE_RWX=y -CONFIG_ARCH_HAS_REFCOUNT=y -# CONFIG_REFCOUNT_FULL is not set CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y CONFIG_ARCH_USE_MEMREMAP_PROT=y # CONFIG_LOCK_EVENT_COUNTS is not set CONFIG_ARCH_HAS_MEM_ENCRYPT=y +CONFIG_HAVE_STATIC_CALL=y +CONFIG_HAVE_STATIC_CALL_INLINE=y +CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y # # GCOV-based kernel profiling @@ -810,7 +836,6 @@ CONFIG_ARCH_HAS_MEM_ENCRYPT=y CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y # end of GCOV-based kernel profiling -CONFIG_PLUGIN_HOSTCC="g++" CONFIG_HAVE_GCC_PLUGINS=y # CONFIG_GCC_PLUGINS is not set # end of General architecture-dependent options @@ -828,15 +853,18 @@ CONFIG_MODULE_SRCVERSION_ALL=y CONFIG_MODULE_COMPRESS=y CONFIG_MODULE_COMPRESS_GZIP=y # CONFIG_MODULE_COMPRESS_XZ is not set +# CONFIG_MODULE_COMPRESS_ZSTD is not set # CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set # CONFIG_UNUSED_SYMBOLS is not set # CONFIG_TRIM_UNUSED_KSYMS is not set CONFIG_MODULES_TREE_LOOKUP=y CONFIG_BLOCK=y CONFIG_BLK_SCSI_REQUEST=y +CONFIG_BLK_CGROUP_RWSTAT=y CONFIG_BLK_DEV_BSG=y CONFIG_BLK_DEV_BSGLIB=y CONFIG_BLK_DEV_INTEGRITY=y +CONFIG_BLK_DEV_INTEGRITY_T10=m CONFIG_BLK_DEV_ZONED=y CONFIG_BLK_DEV_THROTTLING=y # CONFIG_BLK_DEV_THROTTLING_LOW is not set @@ -848,6 +876,7 @@ CONFIG_BLK_WBT_MQ=y CONFIG_BLK_DEBUG_FS=y CONFIG_BLK_DEBUG_FS_ZONED=y # CONFIG_BLK_SED_OPAL is not set +# CONFIG_BLK_INLINE_ENCRYPTION is not set # # Partition Types @@ -909,6 +938,7 @@ CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y CONFIG_QUEUED_SPINLOCKS=y CONFIG_ARCH_USE_QUEUED_RWLOCKS=y CONFIG_QUEUED_RWLOCKS=y +CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y CONFIG_ARCH_HAS_SYNC_CORE_BEFORE_USERMODE=y CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y CONFIG_FREEZER=y @@ -932,12 +962,11 @@ CONFIG_SELECT_MEMORY_MODEL=y CONFIG_SPARSEMEM_MANUAL=y CONFIG_SPARSEMEM=y CONFIG_NEED_MULTIPLE_NODES=y -CONFIG_HAVE_MEMORY_PRESENT=y CONFIG_SPARSEMEM_EXTREME=y CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y CONFIG_SPARSEMEM_VMEMMAP=y -CONFIG_HAVE_MEMBLOCK_NODE_MAP=y CONFIG_HAVE_FAST_GUP=y +CONFIG_NUMA_KEEP_MEMINFO=y CONFIG_MEMORY_ISOLATION=y CONFIG_HAVE_BOOTMEM_INFO_NODE=y CONFIG_MEMORY_HOTPLUG=y @@ -948,6 +977,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_MEMORY_BALLOON=y CONFIG_BALLOON_COMPACTION=y CONFIG_COMPACTION=y +CONFIG_PAGE_REPORTING=y CONFIG_MIGRATION=y CONFIG_CONTIG_ALLOC=y CONFIG_PHYS_ADDR_T_64BIT=y @@ -966,25 +996,26 @@ CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y # CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set CONFIG_ARCH_WANTS_THP_SWAP=y CONFIG_THP_SWAP=y -CONFIG_TRANSPARENT_HUGE_PAGECACHE=y CONFIG_CLEANCACHE=y CONFIG_FRONTSWAP=y CONFIG_CMA=y # CONFIG_CMA_DEBUG is not set # CONFIG_CMA_DEBUGFS is not set CONFIG_CMA_AREAS=7 +# CONFIG_MEM_SOFT_DIRTY is not set # CONFIG_ZSWAP is not set CONFIG_ZPOOL=m CONFIG_ZBUD=m CONFIG_Z3FOLD=m CONFIG_ZSMALLOC=y -# CONFIG_PGTABLE_MAPPING is not set # CONFIG_ZSMALLOC_STAT is not set CONFIG_GENERIC_EARLY_IOREMAP=y # CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set # CONFIG_IDLE_PAGE_TRACKING is not set CONFIG_ARCH_HAS_PTE_DEVMAP=y # CONFIG_ZONE_DEVICE is not set +CONFIG_HMM_MIRROR=y +CONFIG_VMAP_PFN=y CONFIG_FRAME_VECTOR=y CONFIG_ARCH_USES_HIGH_VMA_FLAGS=y CONFIG_ARCH_HAS_PKEYS=y @@ -992,12 +1023,14 @@ CONFIG_ARCH_HAS_PKEYS=y # CONFIG_GUP_BENCHMARK is not set # CONFIG_READ_ONLY_THP_FOR_FS is not set CONFIG_ARCH_HAS_PTE_SPECIAL=y +CONFIG_MAPPING_DIRTY_HELPERS=y # end of Memory Management options CONFIG_NET=y CONFIG_COMPAT_NETLINK_MESSAGES=y CONFIG_NET_INGRESS=y CONFIG_NET_EGRESS=y +CONFIG_NET_REDIRECT=y CONFIG_SKB_EXTENSIONS=y # @@ -1010,17 +1043,22 @@ CONFIG_UNIX_SCM=y CONFIG_UNIX_DIAG=m CONFIG_TLS=m # CONFIG_TLS_DEVICE is not set +# CONFIG_TLS_TOE is not set CONFIG_XFRM=y CONFIG_XFRM_OFFLOAD=y CONFIG_XFRM_ALGO=m CONFIG_XFRM_USER=m +# CONFIG_XFRM_USER_COMPAT is not set CONFIG_XFRM_INTERFACE=m CONFIG_XFRM_SUB_POLICY=y CONFIG_XFRM_MIGRATE=y CONFIG_XFRM_STATISTICS=y +CONFIG_XFRM_AH=m +CONFIG_XFRM_ESP=m CONFIG_XFRM_IPCOMP=m CONFIG_NET_KEY=m CONFIG_NET_KEY_MIGRATE=y +CONFIG_XFRM_ESPINTCP=y CONFIG_SMC=m CONFIG_SMC_DIAG=m CONFIG_XDP_SOCKETS=y @@ -1055,6 +1093,7 @@ CONFIG_NET_FOU_IP_TUNNELS=y CONFIG_INET_AH=m CONFIG_INET_ESP=m CONFIG_INET_ESP_OFFLOAD=m +CONFIG_INET_ESPINTCP=y CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m @@ -1083,6 +1122,7 @@ CONFIG_TCP_CONG_BBR=m CONFIG_DEFAULT_RENO=y CONFIG_DEFAULT_TCP_CONG="reno" CONFIG_TCP_MD5SIG=y +# CONFIG_TCP_SIMULT_CONNECT_DEFAULT_ON is not set CONFIG_IPV6=m CONFIG_IPV6_ROUTER_PREF=y CONFIG_IPV6_ROUTE_INFO=y @@ -1090,6 +1130,7 @@ CONFIG_IPV6_OPTIMISTIC_DAD=y CONFIG_INET6_AH=m CONFIG_INET6_ESP=m CONFIG_INET6_ESP_OFFLOAD=m +# CONFIG_INET6_ESPINTCP is not set CONFIG_INET6_IPCOMP=m CONFIG_IPV6_MIP6=m CONFIG_IPV6_ILA=m @@ -1110,7 +1151,10 @@ CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y CONFIG_IPV6_PIMSM_V2=y CONFIG_IPV6_SEG6_LWTUNNEL=y CONFIG_IPV6_SEG6_HMAC=y +CONFIG_IPV6_RPL_LWTUNNEL=y # CONFIG_NETLABEL is not set +CONFIG_MPTCP=y +CONFIG_INET_MPTCP_DIAG=m CONFIG_NETWORK_SECMARK=y CONFIG_NET_PTP_CLASSIFY=y CONFIG_NETWORK_PHY_TIMESTAMPING=y @@ -1170,7 +1214,6 @@ CONFIG_NF_NAT_REDIRECT=y CONFIG_NF_NAT_MASQUERADE=y CONFIG_NETFILTER_SYNPROXY=m CONFIG_NF_TABLES=m -CONFIG_NF_TABLES_SET=m CONFIG_NF_TABLES_INET=y CONFIG_NF_TABLES_NETDEV=y CONFIG_NFT_NUMGEN=m @@ -1508,6 +1551,7 @@ CONFIG_RDS_TCP=m CONFIG_TIPC=m CONFIG_TIPC_MEDIA_IB=y CONFIG_TIPC_MEDIA_UDP=y +CONFIG_TIPC_CRYPTO=y CONFIG_TIPC_DIAG=m CONFIG_ATM=m CONFIG_ATM_CLIP=m @@ -1527,9 +1571,11 @@ CONFIG_MRP=m CONFIG_BRIDGE=m CONFIG_BRIDGE_IGMP_SNOOPING=y CONFIG_BRIDGE_VLAN_FILTERING=y +# CONFIG_BRIDGE_MRP is not set CONFIG_HAVE_NET_DSA=y CONFIG_NET_DSA=m CONFIG_NET_DSA_TAG_8021Q=m +CONFIG_NET_DSA_TAG_AR9331=m CONFIG_NET_DSA_TAG_BRCM_COMMON=m CONFIG_NET_DSA_TAG_BRCM=m CONFIG_NET_DSA_TAG_BRCM_PREPEND=m @@ -1538,6 +1584,8 @@ CONFIG_NET_DSA_TAG_DSA=m CONFIG_NET_DSA_TAG_EDSA=m CONFIG_NET_DSA_TAG_MTK=m CONFIG_NET_DSA_TAG_KSZ=m +CONFIG_NET_DSA_TAG_RTL4_A=m +CONFIG_NET_DSA_TAG_OCELOT=m CONFIG_NET_DSA_TAG_QCA=m CONFIG_NET_DSA_TAG_LAN9303=m CONFIG_NET_DSA_TAG_SJA1105=m @@ -1610,8 +1658,10 @@ CONFIG_NET_SCH_CAKE=m CONFIG_NET_SCH_FQ=m CONFIG_NET_SCH_HHF=m CONFIG_NET_SCH_PIE=m +CONFIG_NET_SCH_FQ_PIE=m CONFIG_NET_SCH_INGRESS=m CONFIG_NET_SCH_PLUG=m +CONFIG_NET_SCH_ETS=m # CONFIG_NET_SCH_DEFAULT is not set # @@ -1663,6 +1713,7 @@ CONFIG_NET_ACT_SKBMOD=m CONFIG_NET_ACT_IFE=m CONFIG_NET_ACT_TUNNEL_KEY=m CONFIG_NET_ACT_CT=m +CONFIG_NET_ACT_GATE=m CONFIG_NET_IFE_SKBMARK=m CONFIG_NET_IFE_SKBPRIO=m CONFIG_NET_IFE_SKBTCINDEX=m @@ -1686,6 +1737,7 @@ CONFIG_OPENVSWITCH_VXLAN=m CONFIG_OPENVSWITCH_GENEVE=m CONFIG_VSOCKETS=m CONFIG_VSOCKETS_DIAG=m +CONFIG_VSOCKETS_LOOPBACK=m CONFIG_VMWARE_VMCI_VSOCKETS=m CONFIG_VIRTIO_VSOCKETS=m CONFIG_VIRTIO_VSOCKETS_COMMON=m @@ -1699,6 +1751,10 @@ CONFIG_NET_NSH=m CONFIG_HSR=m CONFIG_NET_SWITCHDEV=y CONFIG_NET_L3_MASTER_DEV=y +CONFIG_QRTR=m +CONFIG_QRTR_SMD=m +CONFIG_QRTR_TUN=m +CONFIG_QRTR_MHI=m # CONFIG_NET_NCSI is not set CONFIG_RPS=y CONFIG_RFS_ACCEL=y @@ -1746,6 +1802,7 @@ CONFIG_CAN_RAW=m CONFIG_CAN_BCM=m CONFIG_CAN_GW=m CONFIG_CAN_J1939=m +CONFIG_CAN_ISOTP=m # # CAN Device Drivers @@ -1787,6 +1844,8 @@ CONFIG_CAN_SOFTING_CS=m # CONFIG_CAN_HI311X=m CONFIG_CAN_MCP251X=m +CONFIG_CAN_MCP251XFD=m +# CONFIG_CAN_MCP251XFD_SANITY is not set # end of CAN SPI interfaces # @@ -1818,8 +1877,10 @@ CONFIG_BT_HS=y CONFIG_BT_LE=y CONFIG_BT_6LOWPAN=m CONFIG_BT_LEDS=y -# CONFIG_BT_SELFTEST is not set +CONFIG_BT_MSFTEXT=y CONFIG_BT_DEBUGFS=y +# CONFIG_BT_SELFTEST is not set +# CONFIG_BT_FEATURE_DEBUG is not set # # Bluetooth device drivers @@ -1857,7 +1918,6 @@ CONFIG_BT_HCIVHCI=m CONFIG_BT_MRVL=m CONFIG_BT_MRVL_SDIO=m CONFIG_BT_ATH3K=m -CONFIG_BT_WILINK=m CONFIG_BT_MTKSDIO=m CONFIG_BT_MTKUART=m CONFIG_BT_HCIRSI=m @@ -1943,6 +2003,7 @@ CONFIG_NFC_PN544_MEI=m CONFIG_NFC_PN533=m CONFIG_NFC_PN533_USB=m CONFIG_NFC_PN533_I2C=m +CONFIG_NFC_PN532_UART=m CONFIG_NFC_MICROREAD=m CONFIG_NFC_MICROREAD_I2C=m CONFIG_NFC_MICROREAD_MEI=m @@ -1973,6 +2034,7 @@ CONFIG_NET_SOCK_MSG=y CONFIG_NET_DEVLINK=y CONFIG_PAGE_POOL=y CONFIG_FAILOVER=m +CONFIG_ETHTOOL_NETLINK=y CONFIG_HAVE_EBPF_JIT=y # @@ -1989,7 +2051,6 @@ CONFIG_PCIEAER=y # CONFIG_PCIEAER_INJECT is not set CONFIG_PCIE_ECRC=y CONFIG_PCIEASPM=y -CONFIG_PCIEASPM_DEBUG=y CONFIG_PCIEASPM_DEFAULT=y # CONFIG_PCIEASPM_POWERSAVE is not set # CONFIG_PCIEASPM_POWER_SUPERSAVE is not set @@ -1997,7 +2058,8 @@ CONFIG_PCIEASPM_DEFAULT=y CONFIG_PCIE_PME=y CONFIG_PCIE_DPC=y CONFIG_PCIE_PTM=y -CONFIG_PCIE_BW=y +# CONFIG_PCIE_BW is not set +CONFIG_PCIE_EDR=y CONFIG_PCI_MSI=y CONFIG_PCI_MSI_IRQ_DOMAIN=y CONFIG_PCI_QUIRKS=y @@ -2023,12 +2085,6 @@ CONFIG_HOTPLUG_PCI_SHPC=y # # PCI controller drivers # - -# -# Cadence PCIe controllers support -# -# end of Cadence PCIe controllers support - CONFIG_VMD=m CONFIG_PCI_HYPERV_INTERFACE=m @@ -2039,6 +2095,16 @@ CONFIG_PCI_HYPERV_INTERFACE=m # CONFIG_PCIE_DW_PLAT_EP is not set # CONFIG_PCI_MESON is not set # end of DesignWare PCI Core Support + +# +# Mobiveil PCIe Core Support +# +# end of Mobiveil PCIe Core Support + +# +# Cadence PCIe controllers support +# +# end of Cadence PCIe controllers support # end of PCI controller drivers # @@ -2110,6 +2176,7 @@ CONFIG_EXTRA_FIRMWARE="" CONFIG_FW_LOADER_USER_HELPER=y # CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set CONFIG_FW_LOADER_COMPRESS=y +CONFIG_FW_CACHE=y # end of Firmware loader CONFIG_WANT_DEV_COREDUMP=y @@ -2130,7 +2197,10 @@ CONFIG_REGMAP_SPMI=m CONFIG_REGMAP_W1=m CONFIG_REGMAP_MMIO=y CONFIG_REGMAP_IRQ=y +CONFIG_REGMAP_SOUNDWIRE=m +CONFIG_REGMAP_SCCB=m CONFIG_REGMAP_I3C=m +CONFIG_REGMAP_SPI_AVMM=m CONFIG_DMA_SHARED_BUFFER=y # CONFIG_DMA_FENCE_TRACE is not set # end of Generic Driver Options @@ -2138,6 +2208,8 @@ CONFIG_DMA_SHARED_BUFFER=y # # Bus devices # +CONFIG_MHI_BUS=m +# CONFIG_MHI_BUS_DEBUG is not set # end of Bus devices CONFIG_CONNECTOR=m @@ -2174,6 +2246,7 @@ CONFIG_RFD_FTL=m CONFIG_SSFDC=m CONFIG_SM_FTL=m CONFIG_MTD_OOPS=m +CONFIG_MTD_PSTORE=m CONFIG_MTD_SWAP=m # CONFIG_MTD_PARTITIONED_MASTER is not set @@ -2246,6 +2319,9 @@ CONFIG_BCH_CONST_M=14 CONFIG_BCH_CONST_T=4 # end of Self-contained MTD device drivers +# +# NAND +# CONFIG_MTD_NAND_CORE=m CONFIG_MTD_ONENAND=m CONFIG_MTD_ONENAND_VERIFY_WRITE=y @@ -2266,6 +2342,7 @@ CONFIG_MTD_NAND_CAFE=m CONFIG_MTD_NAND_MXIC=m CONFIG_MTD_NAND_GPIO=m CONFIG_MTD_NAND_PLATFORM=m +CONFIG_MTD_NAND_ARASAN=m # # Misc @@ -2281,6 +2358,13 @@ CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y CONFIG_MTD_SPI_NAND=m # +# ECC engine support +# +CONFIG_MTD_NAND_ECC=y +# end of ECC engine support +# end of NAND + +# # LPDDR & LPDDR2 PCM memory drivers # CONFIG_MTD_LPDDR=m @@ -2289,7 +2373,6 @@ CONFIG_MTD_QINFO_PROBE=m CONFIG_MTD_SPI_NOR=m CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y -CONFIG_SPI_MTK_QUADSPI=m CONFIG_SPI_INTEL_SPI=m CONFIG_SPI_INTEL_SPI_PCI=m CONFIG_SPI_INTEL_SPI_PLATFORM=m @@ -2372,9 +2455,11 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8 CONFIG_CDROM_PKTCDVD_WCACHE=y CONFIG_ATA_OVER_ETH=m CONFIG_VIRTIO_BLK=m -# CONFIG_VIRTIO_BLK_SCSI is not set CONFIG_BLK_DEV_RBD=m CONFIG_BLK_DEV_RSXX=m +CONFIG_BLK_DEV_RNBD=y +CONFIG_BLK_DEV_RNBD_CLIENT=m +CONFIG_BLK_DEV_RNBD_SERVER=m # # NVME Support @@ -2388,6 +2473,7 @@ CONFIG_NVME_RDMA=m CONFIG_NVME_FC=m CONFIG_NVME_TCP=m CONFIG_NVME_TARGET=m +# CONFIG_NVME_TARGET_PASSTHRU is not set CONFIG_NVME_TARGET_LOOP=m CONFIG_NVME_TARGET_RDMA=m CONFIG_NVME_TARGET_FC=m @@ -2461,53 +2547,6 @@ CONFIG_INTEL_MEI_ME=y CONFIG_INTEL_MEI_TXE=m CONFIG_INTEL_MEI_HDCP=m CONFIG_VMWARE_VMCI=m - -# -# Intel MIC & related support -# - -# -# Intel MIC Bus Driver -# -CONFIG_INTEL_MIC_BUS=m - -# -# SCIF Bus Driver -# -CONFIG_SCIF_BUS=m - -# -# VOP Bus Driver -# -CONFIG_VOP_BUS=m - -# -# Intel MIC Host Driver -# -CONFIG_INTEL_MIC_HOST=m - -# -# Intel MIC Card Driver -# -CONFIG_INTEL_MIC_CARD=m - -# -# SCIF Driver -# -CONFIG_SCIF=m - -# -# Intel MIC Coprocessor State Management (COSM) Drivers -# -CONFIG_MIC_COSM=m - -# -# VOP Driver -# -CONFIG_VOP=m -CONFIG_VHOST_RING=m -# end of Intel MIC & related support - CONFIG_GENWQE=m CONFIG_GENWQE_PLATFORM_ERROR_RECOVERY=0 CONFIG_ECHO=m @@ -2515,6 +2554,7 @@ CONFIG_MISC_ALCOR_PCI=m CONFIG_MISC_RTSX_PCI=m CONFIG_MISC_RTSX_USB=m CONFIG_HABANA_AI=m +CONFIG_UACCE=m # end of Misc devices CONFIG_HAVE_IDE=y @@ -2536,7 +2576,6 @@ CONFIG_SCSI_PROC_FS=y CONFIG_BLK_DEV_SD=m CONFIG_CHR_DEV_ST=m CONFIG_BLK_DEV_SR=m -CONFIG_BLK_DEV_SR_VENDOR=y CONFIG_CHR_DEV_SG=m CONFIG_CHR_DEV_SCH=m CONFIG_SCSI_ENCLOSURE=m @@ -2675,7 +2714,10 @@ CONFIG_SCSI_DH_ALUA=m # end of SCSI device support CONFIG_ATA=m +CONFIG_SATA_HOST=y +CONFIG_PATA_TIMINGS=y CONFIG_ATA_VERBOSE_ERROR=y +CONFIG_ATA_FORCE=y CONFIG_ATA_ACPI=y CONFIG_SATA_ZPODD=y CONFIG_SATA_PMP=y @@ -2783,6 +2825,7 @@ CONFIG_MD_CLUSTER=m CONFIG_BCACHE=m # CONFIG_BCACHE_DEBUG is not set # CONFIG_BCACHE_CLOSURES_DEBUG is not set +# CONFIG_BCACHE_ASYNC_REGISTRATION is not set CONFIG_BLK_DEV_DM_BUILTIN=y CONFIG_BLK_DEV_DM=m # CONFIG_DM_DEBUG is not set @@ -2797,6 +2840,7 @@ CONFIG_DM_THIN_PROVISIONING=m CONFIG_DM_CACHE=m CONFIG_DM_CACHE_SMQ=m CONFIG_DM_WRITECACHE=m +# CONFIG_DM_EBS is not set CONFIG_DM_ERA=m CONFIG_DM_CLONE=m CONFIG_DM_MIRROR=m @@ -2806,6 +2850,7 @@ CONFIG_DM_ZERO=m CONFIG_DM_MULTIPATH=m CONFIG_DM_MULTIPATH_QL=m CONFIG_DM_MULTIPATH_ST=m +CONFIG_DM_MULTIPATH_HST=m CONFIG_DM_DELAY=m CONFIG_DM_DUST=m CONFIG_DM_UEVENT=y @@ -2853,6 +2898,8 @@ CONFIG_MII=m CONFIG_NET_CORE=y CONFIG_BONDING=m CONFIG_DUMMY=m +CONFIG_WIREGUARD=m +# CONFIG_WIREGUARD_DEBUG is not set CONFIG_EQUALIZER=m CONFIG_NET_FC=y CONFIG_IFB=m @@ -2869,13 +2916,14 @@ CONFIG_IPVLAN=m CONFIG_IPVTAP=m CONFIG_VXLAN=m CONFIG_GENEVE=m +CONFIG_BAREUDP=m CONFIG_GTP=m CONFIG_MACSEC=m CONFIG_NETCONSOLE=m CONFIG_NETCONSOLE_DYNAMIC=y CONFIG_NETPOLL=y CONFIG_NET_POLL_CONTROLLER=y -# CONFIG_NTB_NETDEV is not set +CONFIG_NTB_NETDEV=m CONFIG_RIONET=m CONFIG_RIONET_TX_SIZE=128 CONFIG_RIONET_RX_SIZE=128 @@ -2929,15 +2977,7 @@ CONFIG_ATM_FORE200E_DEBUG=0 CONFIG_ATM_HE=m CONFIG_ATM_HE_USE_SUNI=y CONFIG_ATM_SOLOS=m - -# -# CAIF transport drivers -# -CONFIG_CAIF_TTY=m -CONFIG_CAIF_SPI_SLAVE=m -CONFIG_CAIF_SPI_SYNC=y -CONFIG_CAIF_HSI=m -CONFIG_CAIF_VIRTIO=m +# CONFIG_CAIF_DRIVERS is not set # # Distributed Switch Architecture drivers @@ -2962,14 +3002,20 @@ CONFIG_NET_DSA_MICROCHIP_KSZ8795_SPI=m CONFIG_NET_DSA_MV88E6XXX=m CONFIG_NET_DSA_MV88E6XXX_GLOBAL2=y CONFIG_NET_DSA_MV88E6XXX_PTP=y +CONFIG_NET_DSA_MSCC_SEVILLE=m +CONFIG_NET_DSA_AR9331=m CONFIG_NET_DSA_SJA1105=m CONFIG_NET_DSA_SJA1105_PTP=y CONFIG_NET_DSA_SJA1105_TAS=y +# CONFIG_NET_DSA_SJA1105_VL is not set CONFIG_NET_DSA_QCA8K=m CONFIG_NET_DSA_REALTEK_SMI=m CONFIG_NET_DSA_SMSC_LAN9303=m CONFIG_NET_DSA_SMSC_LAN9303_I2C=m CONFIG_NET_DSA_SMSC_LAN9303_MDIO=m +CONFIG_NET_DSA_VITESSE_VSC73XX=m +CONFIG_NET_DSA_VITESSE_VSC73XX_SPI=m +CONFIG_NET_DSA_VITESSE_VSC73XX_PLATFORM=m # end of Distributed Switch Architecture drivers CONFIG_ETHERNET=y @@ -3050,6 +3096,8 @@ CONFIG_CHELSIO_T4_DCB=y # CONFIG_CHELSIO_T4_FCOE is not set CONFIG_CHELSIO_T4VF=m CONFIG_CHELSIO_LIB=m +CONFIG_CHELSIO_INLINE_CRYPTO=y +CONFIG_CHELSIO_IPSEC_INLINE=m CONFIG_NET_VENDOR_CISCO=y CONFIG_ENIC=m # CONFIG_NET_VENDOR_CORTINA is not set @@ -3085,8 +3133,6 @@ CONFIG_NET_VENDOR_FUJITSU=y CONFIG_PCMCIA_FMVJ18X=m CONFIG_NET_VENDOR_GOOGLE=y CONFIG_GVE=m -CONFIG_NET_VENDOR_HP=y -CONFIG_HP100=m CONFIG_NET_VENDOR_HUAWEI=y CONFIG_HINIC=m CONFIG_NET_VENDOR_I825XX=y @@ -3122,6 +3168,8 @@ CONFIG_SKGE=m CONFIG_SKGE_GENESIS=y CONFIG_SKY2=m # CONFIG_SKY2_DEBUG is not set +CONFIG_PRESTERA=m +CONFIG_PRESTERA_PCI=m CONFIG_NET_VENDOR_MELLANOX=y CONFIG_MLX4_EN=m CONFIG_MLX4_EN_DCB=y @@ -3155,7 +3203,7 @@ CONFIG_ENC28J60=m CONFIG_ENCX24J600=m CONFIG_LAN743X=m CONFIG_NET_VENDOR_MICROSEMI=y -CONFIG_MSCC_OCELOT_SWITCH=m +CONFIG_MSCC_OCELOT_SWITCH_LIB=m CONFIG_NET_VENDOR_MYRI=y CONFIG_MYRI10GE=m CONFIG_MYRI10GE_DCA=y @@ -3246,6 +3294,7 @@ CONFIG_STMMAC_ETH=m # CONFIG_STMMAC_SELFTESTS is not set CONFIG_STMMAC_PLATFORM=m CONFIG_DWMAC_GENERIC=m +CONFIG_DWMAC_INTEL=m CONFIG_STMMAC_PCI=m CONFIG_NET_VENDOR_SUN=y CONFIG_HAPPYMEAL=m @@ -3284,45 +3333,33 @@ CONFIG_HIPPI=y CONFIG_ROADRUNNER=m CONFIG_ROADRUNNER_LARGE_RINGS=y CONFIG_NET_SB1000=m -CONFIG_MDIO_DEVICE=m -CONFIG_MDIO_BUS=m -CONFIG_MDIO_BCM_UNIMAC=m -CONFIG_MDIO_BITBANG=m -CONFIG_MDIO_CAVIUM=m -CONFIG_MDIO_GPIO=m -CONFIG_MDIO_I2C=m -CONFIG_MDIO_MSCC_MIIM=m -CONFIG_MDIO_THUNDER=m CONFIG_PHYLINK=m CONFIG_PHYLIB=m CONFIG_SWPHY=y CONFIG_LED_TRIGGER_PHY=y +CONFIG_FIXED_PHY=m +CONFIG_SFP=m # # MII PHY device drivers # -CONFIG_SFP=m -CONFIG_ADIN_PHY=m CONFIG_AMD_PHY=m +CONFIG_ADIN_PHY=m CONFIG_AQUANTIA_PHY=m CONFIG_AX88796B_PHY=m -CONFIG_AT803X_PHY=m +CONFIG_BROADCOM_PHY=m +CONFIG_BCM54140_PHY=m CONFIG_BCM7XXX_PHY=m +CONFIG_BCM84881_PHY=m CONFIG_BCM87XX_PHY=m CONFIG_BCM_NET_PHYLIB=m -CONFIG_BROADCOM_PHY=m CONFIG_CICADA_PHY=m CONFIG_CORTINA_PHY=m CONFIG_DAVICOM_PHY=m -CONFIG_DP83822_PHY=m -CONFIG_DP83TC811_PHY=m -CONFIG_DP83848_PHY=m -CONFIG_DP83867_PHY=m -CONFIG_FIXED_PHY=m CONFIG_ICPLUS_PHY=m +CONFIG_LXT_PHY=m CONFIG_INTEL_XWAY_PHY=m CONFIG_LSI_ET1011C_PHY=m -CONFIG_LXT_PHY=m CONFIG_MARVELL_PHY=m CONFIG_MARVELL_10G_PHY=m CONFIG_MICREL_PHY=m @@ -3331,6 +3368,7 @@ CONFIG_MICROCHIP_T1_PHY=m CONFIG_MICROSEMI_PHY=m CONFIG_NATIONAL_PHY=m CONFIG_NXP_TJA11XX_PHY=m +CONFIG_AT803X_PHY=m CONFIG_QSEMI_PHY=m CONFIG_REALTEK_PHY=m CONFIG_RENESAS_PHY=m @@ -3338,9 +3376,37 @@ CONFIG_ROCKCHIP_PHY=m CONFIG_SMSC_PHY=m CONFIG_STE10XP=m CONFIG_TERANETICS_PHY=m +CONFIG_DP83822_PHY=m +CONFIG_DP83TC811_PHY=m +CONFIG_DP83848_PHY=m +CONFIG_DP83867_PHY=m +CONFIG_DP83869_PHY=m CONFIG_VITESSE_PHY=m CONFIG_XILINX_GMII2RGMII=m CONFIG_MICREL_KS8995MA=m +CONFIG_MDIO_DEVICE=m +CONFIG_MDIO_BUS=m +CONFIG_MDIO_DEVRES=m +CONFIG_MDIO_BITBANG=m +CONFIG_MDIO_BCM_UNIMAC=m +CONFIG_MDIO_CAVIUM=m +CONFIG_MDIO_GPIO=m +CONFIG_MDIO_I2C=m +CONFIG_MDIO_MVUSB=m +CONFIG_MDIO_MSCC_MIIM=m +CONFIG_MDIO_THUNDER=m + +# +# MDIO Multiplexers +# + +# +# PCS device drivers +# +CONFIG_PCS_XPCS=m +CONFIG_PCS_LYNX=m +# end of PCS device drivers + CONFIG_PLIP=m CONFIG_PPP=m CONFIG_PPP_BSDCOMP=m @@ -3454,10 +3520,15 @@ CONFIG_ATH10K_PCI=m CONFIG_ATH10K_SDIO=m CONFIG_ATH10K_USB=m # CONFIG_ATH10K_DEBUG is not set -# CONFIG_ATH10K_DEBUGFS is not set +CONFIG_ATH10K_DEBUGFS=y +# CONFIG_ATH10K_SPECTRAL is not set # CONFIG_ATH10K_TRACING is not set CONFIG_WCN36XX=m # CONFIG_WCN36XX_DEBUGFS is not set +CONFIG_ATH11K=m +CONFIG_ATH11K_PCI=m +# CONFIG_ATH11K_DEBUG is not set +# CONFIG_ATH11K_TRACING is not set CONFIG_WLAN_VENDOR_ATMEL=y CONFIG_ATMEL=m CONFIG_PCI_ATMEL=m @@ -3587,6 +3658,7 @@ CONFIG_MT7601U=m CONFIG_MT76_CORE=m CONFIG_MT76_LEDS=y CONFIG_MT76_USB=m +CONFIG_MT76_SDIO=m CONFIG_MT76x02_LIB=m CONFIG_MT76x02_USB=m CONFIG_MT76x0_COMMON=m @@ -3596,7 +3668,17 @@ CONFIG_MT76x2_COMMON=m CONFIG_MT76x2E=m CONFIG_MT76x2U=m CONFIG_MT7603E=m +CONFIG_MT7615_COMMON=m CONFIG_MT7615E=m +CONFIG_MT7663_USB_SDIO_COMMON=m +CONFIG_MT7663U=m +CONFIG_MT7663S=m +CONFIG_MT7915E=m +CONFIG_WLAN_VENDOR_MICROCHIP=y +CONFIG_WILC1000=m +CONFIG_WILC1000_SDIO=m +CONFIG_WILC1000_SPI=m +# CONFIG_WILC1000_HW_OOB_INTR is not set CONFIG_WLAN_VENDOR_RALINK=y CONFIG_RT2X00=m CONFIG_RT2400PCI=m @@ -3652,8 +3734,14 @@ CONFIG_RTL8XXXU_UNTESTED=y CONFIG_RTW88=m CONFIG_RTW88_CORE=m CONFIG_RTW88_PCI=m -CONFIG_RTW88_8822BE=y -CONFIG_RTW88_8822CE=y +CONFIG_RTW88_8822B=m +CONFIG_RTW88_8822C=m +CONFIG_RTW88_8723D=m +CONFIG_RTW88_8821C=m +CONFIG_RTW88_8822BE=m +CONFIG_RTW88_8822CE=m +CONFIG_RTW88_8723DE=m +CONFIG_RTW88_8821CE=m # CONFIG_RTW88_DEBUG is not set # CONFIG_RTW88_DEBUGFS is not set CONFIG_WLAN_VENDOR_RSI=y @@ -3729,14 +3817,13 @@ CONFIG_IEEE802154_MCR20A=m CONFIG_IEEE802154_HWSIM=m CONFIG_VMXNET3=m CONFIG_FUJITSU_ES=m -CONFIG_THUNDERBOLT_NET=m +CONFIG_USB4_NET=m CONFIG_HYPERV_NET=m CONFIG_NETDEVSIM=m CONFIG_NET_FAILOVER=m CONFIG_ISDN=y -CONFIG_ISDN_CAPI=m +CONFIG_ISDN_CAPI=y CONFIG_CAPI_TRACE=y -CONFIG_ISDN_CAPI_CAPI20=m CONFIG_ISDN_CAPI_MIDDLEWARE=y CONFIG_MISDN=m CONFIG_MISDN_DSP=m @@ -3810,6 +3897,7 @@ CONFIG_KEYBOARD_OPENCORES=m CONFIG_KEYBOARD_SAMSUNG=m CONFIG_KEYBOARD_STOWAWAY=m CONFIG_KEYBOARD_SUNKBD=m +CONFIG_KEYBOARD_IQS62X=m CONFIG_KEYBOARD_TM2_TOUCHKEY=m CONFIG_KEYBOARD_XTKBD=m CONFIG_KEYBOARD_CROS_EC=m @@ -3845,6 +3933,7 @@ CONFIG_MOUSE_SYNAPTICS_USB=m CONFIG_INPUT_JOYSTICK=y CONFIG_JOYSTICK_ANALOG=m CONFIG_JOYSTICK_A3D=m +CONFIG_JOYSTICK_ADC=m CONFIG_JOYSTICK_ADI=m CONFIG_JOYSTICK_COBRA=m CONFIG_JOYSTICK_GF2K=m @@ -3899,6 +3988,7 @@ CONFIG_TOUCHSCREEN_AUO_PIXCIR=m CONFIG_TOUCHSCREEN_BU21013=m CONFIG_TOUCHSCREEN_BU21029=m CONFIG_TOUCHSCREEN_CHIPONE_ICN8505=m +CONFIG_TOUCHSCREEN_CY8CTMA140=m CONFIG_TOUCHSCREEN_CY8CTMG110=m CONFIG_TOUCHSCREEN_CYTTSP_CORE=m CONFIG_TOUCHSCREEN_CYTTSP_I2C=m @@ -3984,6 +4074,7 @@ CONFIG_TOUCHSCREEN_ZET6223=m CONFIG_TOUCHSCREEN_ZFORCE=m CONFIG_TOUCHSCREEN_ROHM_BU21023=m CONFIG_TOUCHSCREEN_IQS5XX=m +CONFIG_TOUCHSCREEN_ZINITIX=m CONFIG_INPUT_MISC=y CONFIG_INPUT_88PM80X_ONKEY=m CONFIG_INPUT_AD714X=m @@ -3992,13 +4083,11 @@ CONFIG_INPUT_AD714X_SPI=m CONFIG_INPUT_ARIZONA_HAPTICS=m CONFIG_INPUT_BMA150=m CONFIG_INPUT_E3X0_BUTTON=m -CONFIG_INPUT_MSM_VIBRATOR=m CONFIG_INPUT_PCSPKR=m CONFIG_INPUT_MAX77693_HAPTIC=m CONFIG_INPUT_MC13783_PWRBUTTON=m CONFIG_INPUT_MMA8450=m CONFIG_INPUT_APANEL=m -CONFIG_INPUT_GP2A=m CONFIG_INPUT_GPIO_BEEPER=m CONFIG_INPUT_GPIO_DECODER=m CONFIG_INPUT_GPIO_VIBRA=m @@ -4006,7 +4095,6 @@ CONFIG_INPUT_ATLAS_BTNS=m CONFIG_INPUT_ATI_REMOTE2=m CONFIG_INPUT_KEYSPAN_REMOTE=m CONFIG_INPUT_KXTJ9=m -CONFIG_INPUT_KXTJ9_POLLED_MODE=y CONFIG_INPUT_POWERMATE=m CONFIG_INPUT_YEALINK=m CONFIG_INPUT_CM109=m @@ -4027,6 +4115,7 @@ CONFIG_INPUT_ADXL34X=m CONFIG_INPUT_ADXL34X_I2C=m CONFIG_INPUT_ADXL34X_SPI=m CONFIG_INPUT_IMS_PCU=m +CONFIG_INPUT_IQS269A=m CONFIG_INPUT_CMA3000=m CONFIG_INPUT_CMA3000_I2C=m CONFIG_INPUT_IDEAPAD_SLIDEBAR=m @@ -4046,6 +4135,7 @@ CONFIG_RMI4_F11=y CONFIG_RMI4_F12=y CONFIG_RMI4_F30=y CONFIG_RMI4_F34=y +# CONFIG_RMI4_F3A is not set CONFIG_RMI4_F54=y CONFIG_RMI4_F55=y @@ -4088,25 +4178,7 @@ CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -CONFIG_SERIAL_NONSTANDARD=y -CONFIG_ROCKETPORT=m -CONFIG_CYCLADES=m -CONFIG_CYZ_INTR=y -CONFIG_MOXA_INTELLIO=m -CONFIG_MOXA_SMARTIO=m -CONFIG_SYNCLINK=m -CONFIG_SYNCLINKMP=m -CONFIG_SYNCLINK_GT=m -CONFIG_NOZOMI=m -CONFIG_ISI=m -CONFIG_N_HDLC=m -CONFIG_N_GSM=m -CONFIG_TRACE_ROUTER=m -CONFIG_TRACE_SINK=m -CONFIG_NULL_TTY=m CONFIG_LDISC_AUTOLOAD=y -CONFIG_DEVMEM=y -# CONFIG_DEVKMEM is not set # # Serial drivers @@ -4115,6 +4187,7 @@ CONFIG_SERIAL_EARLYCON=y CONFIG_SERIAL_8250=y # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set CONFIG_SERIAL_8250_PNP=y +# CONFIG_SERIAL_8250_16550A_VARIANTS is not set CONFIG_SERIAL_8250_FINTEK=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_DMA=y @@ -4145,6 +4218,7 @@ CONFIG_SERIAL_UARTLITE_NR_UARTS=1 CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_JSM=m +CONFIG_SERIAL_LANTIQ=m CONFIG_SERIAL_SCCNXP=m CONFIG_SERIAL_SC16IS7XX_CORE=m CONFIG_SERIAL_SC16IS7XX=m @@ -4162,14 +4236,31 @@ CONFIG_SERIAL_RP2_NR_UARTS=32 CONFIG_SERIAL_FSL_LPUART=m CONFIG_SERIAL_FSL_LINFLEXUART=m CONFIG_SERIAL_MEN_Z135=m +CONFIG_SERIAL_SPRD=m # end of Serial drivers CONFIG_SERIAL_MCTRL_GPIO=y +CONFIG_SERIAL_NONSTANDARD=y +CONFIG_ROCKETPORT=m +CONFIG_CYCLADES=m +CONFIG_CYZ_INTR=y +CONFIG_MOXA_INTELLIO=m +CONFIG_MOXA_SMARTIO=m +CONFIG_SYNCLINK=m +CONFIG_SYNCLINKMP=m +CONFIG_SYNCLINK_GT=m +CONFIG_ISI=m +CONFIG_N_HDLC=m +CONFIG_N_GSM=m +CONFIG_NOZOMI=m +CONFIG_NULL_TTY=m +CONFIG_TRACE_ROUTER=m +CONFIG_TRACE_SINK=m +CONFIG_HVC_DRIVER=y CONFIG_SERIAL_DEV_BUS=m CONFIG_PRINTER=m CONFIG_LP_CONSOLE=y CONFIG_PPDEV=m -CONFIG_HVC_DRIVER=y CONFIG_VIRTIO_CONSOLE=m CONFIG_IPMI_HANDLER=m CONFIG_IPMI_DMI_DECODE=y @@ -4182,13 +4273,14 @@ CONFIG_IPMI_SSIF=m CONFIG_IPMI_WATCHDOG=m CONFIG_IPMI_POWEROFF=m CONFIG_IPMB_DEVICE_INTERFACE=m -CONFIG_HW_RANDOM=m -CONFIG_HW_RANDOM_TIMERIOMEM=m -CONFIG_HW_RANDOM_INTEL=m -CONFIG_HW_RANDOM_AMD=m -CONFIG_HW_RANDOM_VIA=m -CONFIG_HW_RANDOM_VIRTIO=m -CONFIG_NVRAM=m +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_TIMERIOMEM=y +CONFIG_HW_RANDOM_INTEL=y +CONFIG_HW_RANDOM_AMD=y +CONFIG_HW_RANDOM_BA431=m +CONFIG_HW_RANDOM_VIA=y +# CONFIG_HW_RANDOM_VIRTIO is not set +CONFIG_HW_RANDOM_XIPHERA=m CONFIG_APPLICOM=m # @@ -4202,8 +4294,12 @@ CONFIG_IPWIRELESS=m # end of PCMCIA character devices CONFIG_MWAVE=m +CONFIG_DEVMEM=y +# CONFIG_DEVKMEM is not set +CONFIG_NVRAM=m CONFIG_RAW_DRIVER=m CONFIG_MAX_RAW_DEVS=256 +CONFIG_DEVPORT=y CONFIG_HPET=y CONFIG_HPET_MMAP=y CONFIG_HPET_MMAP_DEFAULT=y @@ -4213,6 +4309,7 @@ CONFIG_HW_RANDOM_TPM=y CONFIG_TCG_TIS_CORE=m CONFIG_TCG_TIS=m CONFIG_TCG_TIS_SPI=m +# CONFIG_TCG_TIS_SPI_CR50 is not set CONFIG_TCG_TIS_I2C_ATMEL=m CONFIG_TCG_TIS_I2C_INFINEON=m CONFIG_TCG_TIS_I2C_NUVOTON=m @@ -4225,13 +4322,12 @@ CONFIG_TCG_TIS_ST33ZP24=m CONFIG_TCG_TIS_ST33ZP24_I2C=m CONFIG_TCG_TIS_ST33ZP24_SPI=m CONFIG_TELCLOCK=m -CONFIG_DEVPORT=y CONFIG_XILLYBUS=m CONFIG_XILLYBUS_PCIE=m # end of Character devices -# CONFIG_RANDOM_TRUST_CPU is not set -# CONFIG_RANDOM_TRUST_BOOTLOADER is not set +CONFIG_RANDOM_TRUST_CPU=y +CONFIG_RANDOM_TRUST_BOOTLOADER=y # # I2C support @@ -4295,10 +4391,10 @@ CONFIG_I2C_SCMI=m # CONFIG_I2C_CBUS_GPIO=m CONFIG_I2C_DESIGNWARE_CORE=m -CONFIG_I2C_DESIGNWARE_PLATFORM=m # CONFIG_I2C_DESIGNWARE_SLAVE is not set -CONFIG_I2C_DESIGNWARE_PCI=m +CONFIG_I2C_DESIGNWARE_PLATFORM=m # CONFIG_I2C_DESIGNWARE_BAYTRAIL is not set +CONFIG_I2C_DESIGNWARE_PCI=m CONFIG_I2C_EMEV2=m CONFIG_I2C_GPIO=m # CONFIG_I2C_GPIO_FAULT_INJECTOR is not set @@ -4314,7 +4410,6 @@ CONFIG_I2C_XILINX=m CONFIG_I2C_DIOLAN_U2C=m CONFIG_I2C_DLN2=m CONFIG_I2C_PARPORT=m -CONFIG_I2C_PARPORT_LIGHT=m CONFIG_I2C_ROBOTFUZZ_OSIF=m CONFIG_I2C_TAOS_EVM=m CONFIG_I2C_TINY_USB=m @@ -4330,6 +4425,7 @@ CONFIG_I2C_CROS_EC_TUNNEL=m # CONFIG_I2C_STUB is not set CONFIG_I2C_SLAVE=y CONFIG_I2C_SLAVE_EEPROM=m +CONFIG_I2C_SLAVE_TESTUNIT=m # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set @@ -4352,13 +4448,14 @@ CONFIG_SPI_BITBANG=m CONFIG_SPI_BUTTERFLY=m CONFIG_SPI_CADENCE=m CONFIG_SPI_DESIGNWARE=m +# CONFIG_SPI_DW_DMA is not set CONFIG_SPI_DW_PCI=m -CONFIG_SPI_DW_MID_DMA=y CONFIG_SPI_DW_MMIO=m CONFIG_SPI_DLN2=m CONFIG_SPI_NXP_FLEXSPI=m CONFIG_SPI_GPIO=m CONFIG_SPI_LM70_LLP=m +CONFIG_SPI_LANTIQ_SSC=m CONFIG_SPI_OC_TINY=m CONFIG_SPI_PXA2XX=m CONFIG_SPI_PXA2XX_PCI=m @@ -4369,6 +4466,12 @@ CONFIG_SPI_MXIC=m CONFIG_SPI_XCOMM=m CONFIG_SPI_XILINX=m CONFIG_SPI_ZYNQMP_GQSPI=m +CONFIG_SPI_AMD=m + +# +# SPI Multiplexer support +# +CONFIG_SPI_MUX=m # # SPI Protocol Masters @@ -4379,6 +4482,7 @@ CONFIG_SPI_TLE62X0=m CONFIG_SPI_SLAVE=y CONFIG_SPI_SLAVE_TIME=m CONFIG_SPI_SLAVE_SYSTEM_CONTROL=m +CONFIG_SPI_DYNAMIC=y CONFIG_SPMI=m CONFIG_HSI=m CONFIG_HSI_BOARDINFO=y @@ -4411,7 +4515,11 @@ CONFIG_PPS_CLIENT_GPIO=m # CONFIG_PTP_1588_CLOCK=y CONFIG_DP83640_PHY=m +CONFIG_PTP_1588_CLOCK_INES=m CONFIG_PTP_1588_CLOCK_KVM=m +CONFIG_PTP_1588_CLOCK_IDT82P33=m +CONFIG_PTP_1588_CLOCK_IDTCM=m +CONFIG_PTP_1588_CLOCK_VMW=m # end of PTP clock support CONFIG_PINCTRL=y @@ -4420,18 +4528,31 @@ CONFIG_PINCONF=y CONFIG_GENERIC_PINCONF=y # CONFIG_DEBUG_PINCTRL is not set CONFIG_PINCTRL_AMD=m +CONFIG_PINCTRL_DA9062=m +CONFIG_PINCTRL_MCP23S08_I2C=m +CONFIG_PINCTRL_MCP23S08_SPI=m CONFIG_PINCTRL_MCP23S08=m CONFIG_PINCTRL_BAYTRAIL=y CONFIG_PINCTRL_CHERRYVIEW=m -CONFIG_PINCTRL_INTEL=m +CONFIG_PINCTRL_LYNXPOINT=m +CONFIG_PINCTRL_INTEL=y CONFIG_PINCTRL_BROXTON=m CONFIG_PINCTRL_CANNONLAKE=m CONFIG_PINCTRL_CEDARFORK=m CONFIG_PINCTRL_DENVERTON=m +CONFIG_PINCTRL_EMMITSBURG=m CONFIG_PINCTRL_GEMINILAKE=m CONFIG_PINCTRL_ICELAKE=m +CONFIG_PINCTRL_JASPERLAKE=m CONFIG_PINCTRL_LEWISBURG=m CONFIG_PINCTRL_SUNRISEPOINT=m +CONFIG_PINCTRL_TIGERLAKE=m + +# +# Renesas pinctrl drivers +# +# end of Renesas pinctrl drivers + CONFIG_PINCTRL_MADERA=m CONFIG_PINCTRL_CS47L15=y CONFIG_PINCTRL_CS47L35=y @@ -4444,6 +4565,8 @@ CONFIG_GPIO_ACPI=y CONFIG_GPIOLIB_IRQCHIP=y # CONFIG_DEBUG_GPIO is not set CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_CDEV=y +CONFIG_GPIO_CDEV_V1=y CONFIG_GPIO_GENERIC=m CONFIG_GPIO_MAX730X=m @@ -4455,7 +4578,6 @@ CONFIG_GPIO_DWAPB=m CONFIG_GPIO_EXAR=m CONFIG_GPIO_GENERIC_PLATFORM=m CONFIG_GPIO_ICH=m -CONFIG_GPIO_LYNXPOINT=y CONFIG_GPIO_MB86S7X=m CONFIG_GPIO_MENZ127=m CONFIG_GPIO_SIOX=m @@ -4482,6 +4604,8 @@ CONFIG_GPIO_ADP5588=m CONFIG_GPIO_MAX7300=m CONFIG_GPIO_MAX732X=m CONFIG_GPIO_PCA953X=m +# CONFIG_GPIO_PCA953X_IRQ is not set +CONFIG_GPIO_PCA9570=m CONFIG_GPIO_PCF857X=m CONFIG_GPIO_TPIC2810=m # end of I2C GPIO expanders @@ -4533,6 +4657,7 @@ CONFIG_GPIO_XRA1403=m CONFIG_GPIO_VIPERBOARD=m # end of USB GPIO expanders +CONFIG_GPIO_AGGREGATOR=m CONFIG_GPIO_MOCKUP=m CONFIG_W1=m CONFIG_W1_CON=y @@ -4560,6 +4685,7 @@ CONFIG_W1_SLAVE_DS2413=m CONFIG_W1_SLAVE_DS2406=m CONFIG_W1_SLAVE_DS2423=m CONFIG_W1_SLAVE_DS2805=m +CONFIG_W1_SLAVE_DS2430=m CONFIG_W1_SLAVE_DS2431=m CONFIG_W1_SLAVE_DS2433=m CONFIG_W1_SLAVE_DS2433_CRC=y @@ -4571,17 +4697,19 @@ CONFIG_W1_SLAVE_DS28E04=m CONFIG_W1_SLAVE_DS28E17=m # end of 1-wire Slaves -CONFIG_POWER_AVS=y CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_MT6323=y # CONFIG_POWER_RESET_RESTART is not set CONFIG_POWER_SUPPLY=y # CONFIG_POWER_SUPPLY_DEBUG is not set +CONFIG_POWER_SUPPLY_HWMON=y CONFIG_PDA_POWER=m CONFIG_GENERIC_ADC_BATTERY=m CONFIG_WM831X_BACKUP=m CONFIG_WM831X_POWER=m # CONFIG_TEST_POWER is not set CONFIG_CHARGER_ADP5061=m +CONFIG_BATTERY_CW2015=m CONFIG_BATTERY_DS2760=m CONFIG_BATTERY_DS2780=m CONFIG_BATTERY_DS2781=m @@ -4613,18 +4741,22 @@ CONFIG_CHARGER_MANAGER=y CONFIG_CHARGER_LT3651=m CONFIG_CHARGER_MAX14577=m CONFIG_CHARGER_MAX77693=m +CONFIG_CHARGER_MP2629=m CONFIG_CHARGER_BQ2415X=m CONFIG_CHARGER_BQ24190=m CONFIG_CHARGER_BQ24257=m CONFIG_CHARGER_BQ24735=m +CONFIG_CHARGER_BQ2515X=m CONFIG_CHARGER_BQ25890=m +CONFIG_CHARGER_BQ25980=m CONFIG_CHARGER_SMB347=m CONFIG_BATTERY_GAUGE_LTC2941=m CONFIG_BATTERY_RT5033=m CONFIG_CHARGER_RT9455=m CONFIG_CHARGER_CROS_USBPD=m +CONFIG_CHARGER_BD99954=m CONFIG_CHARGER_WILCO=m -CONFIG_HWMON=m +CONFIG_HWMON=y CONFIG_HWMON_VID=m # CONFIG_HWMON_DEBUG_CHIP is not set @@ -4641,6 +4773,7 @@ CONFIG_SENSORS_ADM1025=m CONFIG_SENSORS_ADM1026=m CONFIG_SENSORS_ADM1029=m CONFIG_SENSORS_ADM1031=m +CONFIG_SENSORS_ADM1177=m CONFIG_SENSORS_ADM9240=m CONFIG_SENSORS_ADT7X10=m CONFIG_SENSORS_ADT7310=m @@ -4651,13 +4784,17 @@ CONFIG_SENSORS_ADT7470=m CONFIG_SENSORS_ADT7475=m CONFIG_SENSORS_AS370=m CONFIG_SENSORS_ASC7621=m +CONFIG_SENSORS_AXI_FAN_CONTROL=m CONFIG_SENSORS_K8TEMP=m CONFIG_SENSORS_K10TEMP=m CONFIG_SENSORS_FAM15H_POWER=m +CONFIG_SENSORS_AMD_ENERGY=m CONFIG_SENSORS_APPLESMC=m CONFIG_SENSORS_ASB100=m CONFIG_SENSORS_ASPEED=m CONFIG_SENSORS_ATXP1=m +CONFIG_SENSORS_CORSAIR_CPRO=m +CONFIG_SENSORS_DRIVETEMP=m CONFIG_SENSORS_DS620=m CONFIG_SENSORS_DS1621=m CONFIG_SENSORS_DELL_SMM=m @@ -4684,6 +4821,9 @@ CONFIG_SENSORS_JC42=m CONFIG_SENSORS_POWR1220=m CONFIG_SENSORS_LINEAGE=m CONFIG_SENSORS_LTC2945=m +CONFIG_SENSORS_LTC2947=m +CONFIG_SENSORS_LTC2947_I2C=m +CONFIG_SENSORS_LTC2947_SPI=m CONFIG_SENSORS_LTC2990=m CONFIG_SENSORS_LTC4151=m CONFIG_SENSORS_LTC4215=m @@ -4697,6 +4837,7 @@ CONFIG_SENSORS_MAX1619=m CONFIG_SENSORS_MAX1668=m CONFIG_SENSORS_MAX197=m CONFIG_SENSORS_MAX31722=m +CONFIG_SENSORS_MAX31730=m CONFIG_SENSORS_MAX6621=m CONFIG_SENSORS_MAX6639=m CONFIG_SENSORS_MAX6642=m @@ -4707,6 +4848,7 @@ CONFIG_SENSORS_MCP3021=m CONFIG_SENSORS_MLXREG_FAN=m CONFIG_SENSORS_TC654=m CONFIG_SENSORS_MENF21BMC_HWMON=m +CONFIG_SENSORS_MR75203=m CONFIG_SENSORS_ADCXX=m CONFIG_SENSORS_LM63=m CONFIG_SENSORS_LM70=m @@ -4735,7 +4877,9 @@ CONFIG_SENSORS_NPCM7XX=m CONFIG_SENSORS_PCF8591=m CONFIG_PMBUS=m CONFIG_SENSORS_PMBUS=m +CONFIG_SENSORS_ADM1266=m CONFIG_SENSORS_ADM1275=m +CONFIG_SENSORS_BEL_PFE=m CONFIG_SENSORS_IBM_CFFPS=m CONFIG_SENSORS_INSPUR_IPSPS=m CONFIG_SENSORS_IR35221=m @@ -4747,16 +4891,21 @@ CONFIG_SENSORS_LTC2978=m CONFIG_SENSORS_LTC2978_REGULATOR=y CONFIG_SENSORS_LTC3815=m CONFIG_SENSORS_MAX16064=m +CONFIG_SENSORS_MAX16601=m +CONFIG_SENSORS_MAX20730=m CONFIG_SENSORS_MAX20751=m CONFIG_SENSORS_MAX31785=m CONFIG_SENSORS_MAX34440=m CONFIG_SENSORS_MAX8688=m +CONFIG_SENSORS_MP2975=m CONFIG_SENSORS_PXE1610=m CONFIG_SENSORS_TPS40422=m CONFIG_SENSORS_TPS53679=m CONFIG_SENSORS_UCD9000=m CONFIG_SENSORS_UCD9200=m +CONFIG_SENSORS_XDPE122=m CONFIG_SENSORS_ZL6100=m +CONFIG_SENSORS_SBTSI=m CONFIG_SENSORS_SHT15=m CONFIG_SENSORS_SHT21=m CONFIG_SENSORS_SHT3x=m @@ -4788,6 +4937,7 @@ CONFIG_SENSORS_TMP103=m CONFIG_SENSORS_TMP108=m CONFIG_SENSORS_TMP401=m CONFIG_SENSORS_TMP421=m +CONFIG_SENSORS_TMP513=m CONFIG_SENSORS_VIA_CPUTEMP=m CONFIG_SENSORS_VIA686A=m CONFIG_SENSORS_VT1211=m @@ -4798,13 +4948,14 @@ CONFIG_SENSORS_W83791D=m CONFIG_SENSORS_W83792D=m CONFIG_SENSORS_W83793=m CONFIG_SENSORS_W83795=m -# CONFIG_SENSORS_W83795_FANCTRL is not set +CONFIG_SENSORS_W83795_FANCTRL=y CONFIG_SENSORS_W83L785TS=m CONFIG_SENSORS_W83L786NG=m CONFIG_SENSORS_W83627HF=m CONFIG_SENSORS_W83627EHF=m CONFIG_SENSORS_WM831X=m CONFIG_SENSORS_XGENE=m +CONFIG_SENSORS_INTEL_M10_BMC_HWMON=m # # ACPI drivers @@ -4812,8 +4963,10 @@ CONFIG_SENSORS_XGENE=m CONFIG_SENSORS_ACPI_POWER=m CONFIG_SENSORS_ATK0110=m CONFIG_THERMAL=y -# CONFIG_THERMAL_STATISTICS is not set -CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 +CONFIG_THERMAL_NETLINK=y +CONFIG_THERMAL_STATISTICS=y +CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=100 +CONFIG_THERMAL_HWMON=y CONFIG_THERMAL_WRITABLE_TRIPS=y CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y # CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set @@ -4823,8 +4976,7 @@ CONFIG_THERMAL_GOV_FAIR_SHARE=y CONFIG_THERMAL_GOV_STEP_WISE=y CONFIG_THERMAL_GOV_BANG_BANG=y CONFIG_THERMAL_GOV_USER_SPACE=y -# CONFIG_THERMAL_GOV_POWER_ALLOCATOR is not set -CONFIG_CLOCK_THERMAL=y +CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y CONFIG_DEVFREQ_THERMAL=y # CONFIG_THERMAL_EMULATION is not set @@ -4989,15 +5141,20 @@ CONFIG_MFD_DLN2=m CONFIG_MFD_MC13XXX=m CONFIG_MFD_MC13XXX_SPI=m CONFIG_MFD_MC13XXX_I2C=m +CONFIG_MFD_MP2629=m CONFIG_HTC_PASIC3=m CONFIG_MFD_INTEL_QUARK_I2C_GPIO=m CONFIG_LPC_ICH=m CONFIG_LPC_SCH=m CONFIG_INTEL_SOC_PMIC_BXTWC=m CONFIG_INTEL_SOC_PMIC_CHTDC_TI=m +CONFIG_INTEL_SOC_PMIC_MRFLD=m CONFIG_MFD_INTEL_LPSS=m CONFIG_MFD_INTEL_LPSS_ACPI=m CONFIG_MFD_INTEL_LPSS_PCI=m +# CONFIG_MFD_INTEL_MSIC is not set +CONFIG_MFD_INTEL_PMC_BXT=m +CONFIG_MFD_IQS62X=m CONFIG_MFD_JANZ_CMODIO=m CONFIG_MFD_KEMPLD=m CONFIG_MFD_88PM800=m @@ -5005,6 +5162,7 @@ CONFIG_MFD_88PM805=m CONFIG_MFD_MAX14577=m CONFIG_MFD_MAX77693=m CONFIG_MFD_MAX8907=m +CONFIG_MFD_MT6360=m CONFIG_MFD_MT6397=m CONFIG_MFD_MENF21BMC=m CONFIG_EZX_PCAP=y @@ -5048,7 +5206,9 @@ CONFIG_MFD_WM8998=y CONFIG_MFD_WM831X=y CONFIG_MFD_WM831X_SPI=y CONFIG_MFD_WM8994=m +CONFIG_MFD_WCD934X=m CONFIG_RAVE_SP_CORE=m +CONFIG_MFD_INTEL_M10_BMC=m # end of Multifunction device drivers CONFIG_REGULATOR=y @@ -5060,7 +5220,6 @@ CONFIG_REGULATOR_88PG86X=m CONFIG_REGULATOR_88PM800=m CONFIG_REGULATOR_ACT8865=m CONFIG_REGULATOR_AD5398=m -CONFIG_REGULATOR_ANATOP=m CONFIG_REGULATOR_ARIZONA_LDO1=m CONFIG_REGULATOR_ARIZONA_MICSUPP=m CONFIG_REGULATOR_AXP20X=m @@ -5088,12 +5247,17 @@ CONFIG_REGULATOR_MAX8660=m CONFIG_REGULATOR_MAX8907=m CONFIG_REGULATOR_MAX8952=m CONFIG_REGULATOR_MAX77693=m +CONFIG_REGULATOR_MAX77826=m CONFIG_REGULATOR_MC13XXX_CORE=m CONFIG_REGULATOR_MC13783=m CONFIG_REGULATOR_MC13892=m +CONFIG_REGULATOR_MP8859=m CONFIG_REGULATOR_MT6311=m CONFIG_REGULATOR_MT6323=m +CONFIG_REGULATOR_MT6358=m +CONFIG_REGULATOR_MT6360=m CONFIG_REGULATOR_MT6397=m +CONFIG_REGULATOR_PCA9450=m CONFIG_REGULATOR_PCAP=m CONFIG_REGULATOR_PCF50633=m CONFIG_REGULATOR_PFUZE100=m @@ -5102,7 +5266,11 @@ CONFIG_REGULATOR_PV88080=m CONFIG_REGULATOR_PV88090=m CONFIG_REGULATOR_PWM=m CONFIG_REGULATOR_QCOM_SPMI=m +CONFIG_REGULATOR_QCOM_USB_VBUS=m +CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY=m +CONFIG_REGULATOR_RT4801=m CONFIG_REGULATOR_RT5033=m +CONFIG_REGULATOR_RTMV20=m CONFIG_REGULATOR_SKY81452=m CONFIG_REGULATOR_SLG51000=m CONFIG_REGULATOR_TPS51632=m @@ -5116,9 +5284,7 @@ CONFIG_REGULATOR_TPS6524X=m CONFIG_REGULATOR_TPS65912=m CONFIG_REGULATOR_WM831X=m CONFIG_REGULATOR_WM8994=m -CONFIG_CEC_CORE=m -CONFIG_CEC_NOTIFIER=y -CONFIG_CEC_PIN=y +CONFIG_REGULATOR_QCOM_LABIBB=m CONFIG_RC_CORE=m CONFIG_RC_MAP=m CONFIG_LIRC=y @@ -5154,26 +5320,46 @@ CONFIG_IR_SERIAL=m CONFIG_IR_SERIAL_TRANSMITTER=y CONFIG_IR_SIR=m CONFIG_RC_XBOX_DVD=m +CONFIG_IR_TOY=m +CONFIG_CEC_CORE=m +CONFIG_CEC_NOTIFIER=y +CONFIG_CEC_PIN=y +CONFIG_MEDIA_CEC_RC=y +# CONFIG_CEC_PIN_ERROR_INJ is not set +CONFIG_MEDIA_CEC_SUPPORT=y +CONFIG_CEC_CH7322=m +CONFIG_CEC_CROS_EC=m +CONFIG_CEC_GPIO=m +CONFIG_CEC_SECO=m +CONFIG_CEC_SECO_RC=y +CONFIG_USB_PULSE8_CEC=m +CONFIG_USB_RAINSHADOW_CEC=m CONFIG_MEDIA_SUPPORT=m +CONFIG_MEDIA_SUPPORT_FILTER=y +CONFIG_MEDIA_SUBDRV_AUTOSELECT=y # -# Multimedia core support +# Media device types # CONFIG_MEDIA_CAMERA_SUPPORT=y CONFIG_MEDIA_ANALOG_TV_SUPPORT=y CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y CONFIG_MEDIA_RADIO_SUPPORT=y CONFIG_MEDIA_SDR_SUPPORT=y -CONFIG_MEDIA_CEC_SUPPORT=y -CONFIG_MEDIA_CEC_RC=y -# CONFIG_CEC_PIN_ERROR_INJ is not set -CONFIG_MEDIA_CONTROLLER=y -CONFIG_MEDIA_CONTROLLER_DVB=y -CONFIG_MEDIA_CONTROLLER_REQUEST_API=y +CONFIG_MEDIA_PLATFORM_SUPPORT=y +# CONFIG_MEDIA_TEST_SUPPORT is not set +# end of Media device types + CONFIG_VIDEO_DEV=m -CONFIG_VIDEO_V4L2_SUBDEV_API=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_DVB_CORE=m + +# +# Video4Linux options +# CONFIG_VIDEO_V4L2=m CONFIG_VIDEO_V4L2_I2C=y +CONFIG_VIDEO_V4L2_SUBDEV_API=y # CONFIG_VIDEO_ADV_DEBUG is not set # CONFIG_VIDEO_FIXED_MINOR_RANGES is not set CONFIG_VIDEO_TUNER=m @@ -5183,18 +5369,33 @@ CONFIG_V4L2_FWNODE=m CONFIG_VIDEOBUF_GEN=m CONFIG_VIDEOBUF_DMA_SG=m CONFIG_VIDEOBUF_VMALLOC=m -CONFIG_DVB_CORE=m +# end of Video4Linux options + +# +# Media controller options +# +CONFIG_MEDIA_CONTROLLER_DVB=y +# end of Media controller options + +# +# Digital TV options +# # CONFIG_DVB_MMAP is not set CONFIG_DVB_NET=y -CONFIG_TTPCI_EEPROM=m CONFIG_DVB_MAX_ADAPTERS=8 CONFIG_DVB_DYNAMIC_MINORS=y # CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set # CONFIG_DVB_ULE_DEBUG is not set +# end of Digital TV options # # Media drivers # + +# +# Drivers filtered as selected at 'Filter media drivers' +# +CONFIG_TTPCI_EEPROM=m CONFIG_MEDIA_USB_SUPPORT=y # @@ -5269,7 +5470,6 @@ CONFIG_VIDEO_PVRUSB2_SYSFS=y CONFIG_VIDEO_PVRUSB2_DVB=y # CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set CONFIG_VIDEO_HDPVR=m -CONFIG_VIDEO_USBVISION=m CONFIG_VIDEO_STK1160_COMMON=m CONFIG_VIDEO_STK1160=m CONFIG_VIDEO_GO7007=m @@ -5358,12 +5558,6 @@ CONFIG_VIDEO_EM28XX_RC=m CONFIG_USB_AIRSPY=m CONFIG_USB_HACKRF=m CONFIG_USB_MSI2500=m - -# -# USB HDMI CEC adapters -# -CONFIG_USB_PULSE8_CEC=m -CONFIG_USB_RAINSHADOW_CEC=m CONFIG_MEDIA_PCI_SUPPORT=y # @@ -5440,28 +5634,6 @@ CONFIG_DVB_DDBRIDGE=m CONFIG_DVB_SMIPCIE=m CONFIG_DVB_NETUP_UNIDVB=m CONFIG_VIDEO_IPU3_CIO2=m -CONFIG_V4L_PLATFORM_DRIVERS=y -CONFIG_VIDEO_CAFE_CCIC=m -CONFIG_VIDEO_CADENCE=y -CONFIG_VIDEO_CADENCE_CSI2RX=m -CONFIG_VIDEO_CADENCE_CSI2TX=m -CONFIG_VIDEO_ASPEED=m -CONFIG_V4L_MEM2MEM_DRIVERS=y -CONFIG_VIDEO_MEM2MEM_DEINTERLACE=m -CONFIG_VIDEO_SH_VEU=m -# CONFIG_V4L_TEST_DRIVERS is not set -CONFIG_DVB_PLATFORM_DRIVERS=y -CONFIG_CEC_PLATFORM_DRIVERS=y -CONFIG_VIDEO_CROS_EC_CEC=m -CONFIG_CEC_GPIO=m -CONFIG_VIDEO_SECO_CEC=m -CONFIG_VIDEO_SECO_RC=y -CONFIG_SDR_PLATFORM_DRIVERS=y - -# -# Supported MMC/SDIO adapters -# -CONFIG_SMS_SDIO_DRV=m CONFIG_RADIO_ADAPTERS=y CONFIG_RADIO_TEA575X=m CONFIG_RADIO_SI470X=m @@ -5484,18 +5656,7 @@ CONFIG_RADIO_TEA5764=m CONFIG_RADIO_SAA7706H=m CONFIG_RADIO_TEF6862=m CONFIG_RADIO_WL1273=m - -# -# Texas Instruments WL128x FM driver (ST based) -# CONFIG_RADIO_WL128X=m -# end of Texas Instruments WL128x FM driver (ST based) - -# -# Supported FireWire (IEEE 1394) Adapters -# -CONFIG_DVB_FIREDTV=m -CONFIG_DVB_FIREDTV_INPUT=y CONFIG_MEDIA_COMMON_OPTIONS=y # @@ -5517,21 +5678,43 @@ CONFIG_VIDEO_SAA7146_VV=m CONFIG_SMS_SIANO_MDTV=m CONFIG_SMS_SIANO_RC=y # CONFIG_SMS_SIANO_DEBUGFS is not set +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_VIDEO_CAFE_CCIC=m +CONFIG_VIDEO_CADENCE=y +CONFIG_VIDEO_CADENCE_CSI2RX=m +CONFIG_VIDEO_CADENCE_CSI2TX=m +CONFIG_VIDEO_ASPEED=m +CONFIG_V4L_MEM2MEM_DRIVERS=y +CONFIG_VIDEO_MEM2MEM_DEINTERLACE=m +CONFIG_DVB_PLATFORM_DRIVERS=y +CONFIG_SDR_PLATFORM_DRIVERS=y # -# Media ancillary drivers (tuners, sensors, i2c, spi, frontends) +# MMC/SDIO DVB adapters # -CONFIG_MEDIA_SUBDRV_AUTOSELECT=y +CONFIG_SMS_SDIO_DRV=m + +# +# FireWire (IEEE 1394) Adapters +# +CONFIG_DVB_FIREDTV=m +CONFIG_DVB_FIREDTV_INPUT=y +# end of Media drivers + CONFIG_MEDIA_HIDE_ANCILLARY_SUBDRV=y + +# +# Media ancillary drivers +# CONFIG_MEDIA_ATTACH=y -CONFIG_VIDEO_IR_I2C=m # -# I2C drivers hidden by 'Autoselect ancillary drivers' +# IR I2C driver auto-selected by 'Autoselect ancillary drivers' # +CONFIG_VIDEO_IR_I2C=m # -# Audio decoders, processors and mixers +# audio, video and radio I2C drivers auto-selected by 'Autoselect ancillary drivers' # CONFIG_VIDEO_TVAUDIO=m CONFIG_VIDEO_TDA7432=m @@ -5547,70 +5730,109 @@ CONFIG_VIDEO_WM8775=m CONFIG_VIDEO_WM8739=m CONFIG_VIDEO_VP27SMPX=m CONFIG_VIDEO_SONY_BTF_MPX=m - -# -# RDS decoders -# CONFIG_VIDEO_SAA6588=m - -# -# Video decoders -# +CONFIG_VIDEO_BT819=m +CONFIG_VIDEO_BT856=m +CONFIG_VIDEO_BT866=m +CONFIG_VIDEO_KS0127=m +CONFIG_VIDEO_SAA7110=m CONFIG_VIDEO_SAA711X=m CONFIG_VIDEO_TVP5150=m CONFIG_VIDEO_TW2804=m CONFIG_VIDEO_TW9903=m CONFIG_VIDEO_TW9906=m +CONFIG_VIDEO_VPX3220=m # # Video and audio decoders # CONFIG_VIDEO_SAA717X=m CONFIG_VIDEO_CX25840=m - -# -# Video encoders -# CONFIG_VIDEO_SAA7127=m +CONFIG_VIDEO_SAA7185=m +CONFIG_VIDEO_ADV7170=m +CONFIG_VIDEO_ADV7175=m +CONFIG_VIDEO_UPD64031A=m +CONFIG_VIDEO_UPD64083=m +CONFIG_VIDEO_SAA6752HS=m +CONFIG_VIDEO_M52790=m # # Camera sensor devices # +CONFIG_VIDEO_APTINA_PLL=m +CONFIG_VIDEO_SMIAPP_PLL=m +CONFIG_VIDEO_HI556=m +CONFIG_VIDEO_IMX214=m +CONFIG_VIDEO_IMX219=m +CONFIG_VIDEO_IMX258=m +CONFIG_VIDEO_IMX274=m +CONFIG_VIDEO_IMX290=m +CONFIG_VIDEO_IMX319=m +CONFIG_VIDEO_IMX355=m CONFIG_VIDEO_OV2640=m +CONFIG_VIDEO_OV2659=m +CONFIG_VIDEO_OV2680=m +CONFIG_VIDEO_OV2685=m +CONFIG_VIDEO_OV2740=m +CONFIG_VIDEO_OV5647=m +CONFIG_VIDEO_OV6650=m +CONFIG_VIDEO_OV5670=m +CONFIG_VIDEO_OV5675=m +CONFIG_VIDEO_OV5695=m +CONFIG_VIDEO_OV7251=m +CONFIG_VIDEO_OV772X=m CONFIG_VIDEO_OV7640=m CONFIG_VIDEO_OV7670=m +CONFIG_VIDEO_OV7740=m +CONFIG_VIDEO_OV8856=m +CONFIG_VIDEO_OV9640=m +CONFIG_VIDEO_OV9650=m +CONFIG_VIDEO_OV13858=m +CONFIG_VIDEO_VS6624=m +CONFIG_VIDEO_MT9M001=m +CONFIG_VIDEO_MT9M032=m +CONFIG_VIDEO_MT9M111=m +CONFIG_VIDEO_MT9P031=m +CONFIG_VIDEO_MT9T001=m +CONFIG_VIDEO_MT9T112=m CONFIG_VIDEO_MT9V011=m +CONFIG_VIDEO_MT9V032=m +CONFIG_VIDEO_MT9V111=m +CONFIG_VIDEO_SR030PC30=m +CONFIG_VIDEO_NOON010PC30=m +CONFIG_VIDEO_M5MOLS=m +CONFIG_VIDEO_RDACM20=m +CONFIG_VIDEO_RJ54N1=m +CONFIG_VIDEO_S5K6AA=m +CONFIG_VIDEO_S5K6A3=m +CONFIG_VIDEO_S5K4ECGX=m +CONFIG_VIDEO_S5K5BAF=m +CONFIG_VIDEO_SMIAPP=m +CONFIG_VIDEO_ET8EK8=m +CONFIG_VIDEO_S5C73M3=m +# end of Camera sensor devices # # Lens drivers # +CONFIG_VIDEO_AD5820=m +CONFIG_VIDEO_AK7375=m +CONFIG_VIDEO_DW9714=m +CONFIG_VIDEO_DW9768=m +CONFIG_VIDEO_DW9807_VCM=m +# end of Lens drivers # # Flash devices # +CONFIG_VIDEO_ADP1653=m +CONFIG_VIDEO_LM3560=m +CONFIG_VIDEO_LM3646=m +# end of Flash devices # -# Video improvement chips -# -CONFIG_VIDEO_UPD64031A=m -CONFIG_VIDEO_UPD64083=m - -# -# Audio/Video compression chips -# -CONFIG_VIDEO_SAA6752HS=m - -# -# SDR tuner chips -# - -# -# Miscellaneous helper chips -# -CONFIG_VIDEO_M52790=m - -# -# SPI drivers hidden by 'Autoselect ancillary drivers' +# SPI I2C drivers auto-selected by 'Autoselect ancillary drivers' # # @@ -5622,7 +5844,7 @@ CONFIG_CXD2880_SPI_DRV=m CONFIG_MEDIA_TUNER=m # -# Tuner drivers hidden by 'Autoselect ancillary drivers' +# Tuner drivers auto-selected by 'Autoselect ancillary drivers' # CONFIG_MEDIA_TUNER_SIMPLE=m CONFIG_MEDIA_TUNER_TDA18250=m @@ -5663,7 +5885,7 @@ CONFIG_MEDIA_TUNER_QM1D1C0042=m CONFIG_MEDIA_TUNER_QM1D1B0004=m # -# DVB Frontend drivers hidden by 'Autoselect ancillary drivers' +# DVB Frontend drivers auto-selected by 'Autoselect ancillary drivers' # # @@ -5819,11 +6041,7 @@ CONFIG_DVB_HELENE=m # CONFIG_DVB_CXD2099=m CONFIG_DVB_SP2=m - -# -# Tools to develop new frontends -# -CONFIG_DVB_DUMMY_FE=m +# end of Media ancillary drivers # # Graphics support @@ -5849,10 +6067,13 @@ CONFIG_DRM_FBDEV_OVERALLOC=100 # CONFIG_DRM_LOAD_EDID_FIRMWARE is not set # CONFIG_DRM_DP_CEC is not set CONFIG_DRM_TTM=m +CONFIG_DRM_TTM_DMA_PAGE_POOL=y CONFIG_DRM_VRAM_HELPER=m +CONFIG_DRM_TTM_HELPER=m CONFIG_DRM_GEM_CMA_HELPER=y CONFIG_DRM_KMS_CMA_HELPER=y CONFIG_DRM_GEM_SHMEM_HELPER=y +CONFIG_DRM_VM=y CONFIG_DRM_SCHED=m # @@ -5887,32 +6108,36 @@ CONFIG_DRM_AMD_ACP=y # Display Engine Configuration # CONFIG_DRM_AMD_DC=y -CONFIG_DRM_AMD_DC_DCN1_0=y -CONFIG_DRM_AMD_DC_DCN2_0=y -CONFIG_DRM_AMD_DC_DCN2_1=y -CONFIG_DRM_AMD_DC_DSC_SUPPORT=y -# CONFIG_DEBUG_KERNEL_DC is not set +CONFIG_DRM_AMD_DC_DCN=y +CONFIG_DRM_AMD_DC_DCN3_0=y +CONFIG_DRM_AMD_DC_HDCP=y +# CONFIG_DRM_AMD_DC_SI is not set # end of Display Engine Configuration CONFIG_HSA_AMD=y CONFIG_DRM_NOUVEAU=m -# CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT is not set +CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT=y CONFIG_NOUVEAU_DEBUG=5 CONFIG_NOUVEAU_DEBUG_DEFAULT=3 # CONFIG_NOUVEAU_DEBUG_MMU is not set +# CONFIG_NOUVEAU_DEBUG_PUSH is not set CONFIG_DRM_NOUVEAU_BACKLIGHT=y CONFIG_DRM_I915=m -# CONFIG_DRM_I915_ALPHA_SUPPORT is not set CONFIG_DRM_I915_FORCE_PROBE="" CONFIG_DRM_I915_CAPTURE_ERROR=y CONFIG_DRM_I915_COMPRESS_ERROR=y CONFIG_DRM_I915_USERPTR=y CONFIG_DRM_I915_GVT=y CONFIG_DRM_I915_GVT_KVMGT=m +CONFIG_DRM_I915_FENCE_TIMEOUT=10000 CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250 -CONFIG_DRM_I915_SPIN_REQUEST=5 +CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500 +CONFIG_DRM_I915_PREEMPT_TIMEOUT=640 +CONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000 +CONFIG_DRM_I915_STOP_TIMEOUT=100 +CONFIG_DRM_I915_TIMESLICE_DURATION=1 CONFIG_DRM_VGEM=m -# CONFIG_DRM_VKMS is not set +CONFIG_DRM_VKMS=m CONFIG_DRM_VMWGFX=m CONFIG_DRM_VMWGFX_FBCON=y CONFIG_DRM_GMA500=m @@ -5921,7 +6146,6 @@ CONFIG_DRM_GMA3600=y CONFIG_DRM_UDL=m CONFIG_DRM_AST=m CONFIG_DRM_MGAG200=m -CONFIG_DRM_CIRRUS_QEMU=m CONFIG_DRM_QXL=m CONFIG_DRM_BOCHS=m CONFIG_DRM_VIRTIO_GPU=m @@ -5940,20 +6164,30 @@ CONFIG_DRM_PANEL_BRIDGE=y # Display Interface Bridges # CONFIG_DRM_ANALOGIX_ANX78XX=m +CONFIG_DRM_ANALOGIX_DP=m # end of Display Interface Bridges CONFIG_DRM_ETNAVIV=m CONFIG_DRM_ETNAVIV_THERMAL=y +CONFIG_DRM_CIRRUS_QEMU=m CONFIG_DRM_GM12U320=m CONFIG_TINYDRM_HX8357D=m CONFIG_TINYDRM_ILI9225=m CONFIG_TINYDRM_ILI9341=m +CONFIG_TINYDRM_ILI9486=m CONFIG_TINYDRM_MI0283QT=m CONFIG_TINYDRM_REPAPER=m CONFIG_TINYDRM_ST7586=m CONFIG_TINYDRM_ST7735R=m CONFIG_DRM_VBOXVIDEO=m -# CONFIG_DRM_LEGACY is not set +CONFIG_DRM_LEGACY=y +CONFIG_DRM_TDFX=m +CONFIG_DRM_R128=m +CONFIG_DRM_MGA=m +CONFIG_DRM_SIS=m +CONFIG_DRM_VIA=m +CONFIG_DRM_SAVAGE=m +CONFIG_DRM_EXPORT_FOR_TESTS=y CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y CONFIG_DRM_LIB_RANDOM=y @@ -5963,7 +6197,7 @@ CONFIG_DRM_LIB_RANDOM=y CONFIG_FB_CMDLINE=y CONFIG_FB_NOTIFY=y CONFIG_FB=y -# CONFIG_FIRMWARE_EDID is not set +CONFIG_FIRMWARE_EDID=y CONFIG_FB_BOOT_VESA_SUPPORT=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y @@ -5971,11 +6205,15 @@ CONFIG_FB_CFB_IMAGEBLIT=y CONFIG_FB_SYS_FILLRECT=m CONFIG_FB_SYS_COPYAREA=m CONFIG_FB_SYS_IMAGEBLIT=m -# CONFIG_FB_FOREIGN_ENDIAN is not set +CONFIG_FB_FOREIGN_ENDIAN=y +CONFIG_FB_BOTH_ENDIAN=y +# CONFIG_FB_BIG_ENDIAN is not set +# CONFIG_FB_LITTLE_ENDIAN is not set CONFIG_FB_SYS_FOPS=m CONFIG_FB_DEFERRED_IO=y +CONFIG_FB_BACKLIGHT=m CONFIG_FB_MODE_HELPERS=y -# CONFIG_FB_TILEBLITTING is not set +CONFIG_FB_TILEBLITTING=y # # Frame buffer hardware drivers @@ -6044,12 +6282,12 @@ CONFIG_LCD_LMS501KF03=m CONFIG_LCD_HX8357=m CONFIG_LCD_OTM3225A=m CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_GENERIC=m +CONFIG_BACKLIGHT_KTD253=m CONFIG_BACKLIGHT_LM3533=m CONFIG_BACKLIGHT_PWM=m CONFIG_BACKLIGHT_DA9052=m CONFIG_BACKLIGHT_APPLE=m -CONFIG_BACKLIGHT_PM8941_WLED=m +CONFIG_BACKLIGHT_QCOM_WLED=m CONFIG_BACKLIGHT_SAHARA=m CONFIG_BACKLIGHT_WM831X=m CONFIG_BACKLIGHT_ADP8860=m @@ -6072,22 +6310,16 @@ CONFIG_HDMI=y # Console display driver support # CONFIG_VGA_CONSOLE=y -CONFIG_VGACON_SOFT_SCROLLBACK=y -CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 -# CONFIG_VGACON_SOFT_SCROLLBACK_PERSISTENT_ENABLE_BY_DEFAULT is not set CONFIG_DUMMY_CONSOLE=y CONFIG_DUMMY_CONSOLE_COLUMNS=80 CONFIG_DUMMY_CONSOLE_ROWS=25 CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y -# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set +CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y # end of Console display driver support -CONFIG_LOGO=y -CONFIG_LOGO_LINUX_MONO=y -CONFIG_LOGO_LINUX_VGA16=y -CONFIG_LOGO_LINUX_CLUT224=y +# CONFIG_LOGO is not set # end of Graphics support CONFIG_SOUND=m @@ -6224,8 +6456,8 @@ CONFIG_SND_YMFPCI=m # HD-Audio # CONFIG_SND_HDA=m +CONFIG_SND_HDA_GENERIC_LEDS=y CONFIG_SND_HDA_INTEL=m -# CONFIG_SND_HDA_INTEL_DETECT_DMIC is not set CONFIG_SND_HDA_HWDEP=y CONFIG_SND_HDA_RECONFIG=y CONFIG_SND_HDA_INPUT_BEEP=y @@ -6245,6 +6477,7 @@ CONFIG_SND_HDA_CODEC_CMEDIA=m CONFIG_SND_HDA_CODEC_SI3054=m CONFIG_SND_HDA_GENERIC=m CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0 +CONFIG_SND_HDA_INTEL_HDMI_SILENT_STREAM=y # end of HD-Audio CONFIG_SND_HDA_CORE=m @@ -6252,8 +6485,9 @@ CONFIG_SND_HDA_DSP_LOADER=y CONFIG_SND_HDA_COMPONENT=y CONFIG_SND_HDA_I915=y CONFIG_SND_HDA_EXT_CORE=m -CONFIG_SND_HDA_PREALLOC_SIZE=64 -CONFIG_SND_INTEL_NHLT=m +CONFIG_SND_HDA_PREALLOC_SIZE=0 +CONFIG_SND_INTEL_NHLT=y +CONFIG_SND_INTEL_DSP_CONFIG=m CONFIG_SND_SPI=y CONFIG_SND_USB=y CONFIG_SND_USB_AUDIO=m @@ -6294,7 +6528,11 @@ CONFIG_SND_SOC_AMD_ACP=m CONFIG_SND_SOC_AMD_CZ_DA7219MX98357_MACH=m CONFIG_SND_SOC_AMD_CZ_RT5645_MACH=m CONFIG_SND_SOC_AMD_ACP3x=m +CONFIG_SND_SOC_AMD_RV_RT5682_MACH=m +CONFIG_SND_SOC_AMD_RENOIR=m +CONFIG_SND_SOC_AMD_RENOIR_MACH=m CONFIG_SND_ATMEL_SOC=m +CONFIG_SND_BCM63XX_I2S_WHISTLER=m CONFIG_SND_DESIGNWARE_I2S=m CONFIG_SND_DESIGNWARE_PCM=y @@ -6307,11 +6545,13 @@ CONFIG_SND_DESIGNWARE_PCM=y # CONFIG_SND_SOC_FSL_ASRC=m CONFIG_SND_SOC_FSL_SAI=m +CONFIG_SND_SOC_FSL_MQS=m CONFIG_SND_SOC_FSL_AUDMIX=m CONFIG_SND_SOC_FSL_SSI=m CONFIG_SND_SOC_FSL_SPDIF=m CONFIG_SND_SOC_FSL_ESAI=m CONFIG_SND_SOC_FSL_MICFIL=m +CONFIG_SND_SOC_FSL_EASRC=m CONFIG_SND_SOC_IMX_AUDMUX=m # end of SoC Audio for Freescale CPUs @@ -6324,13 +6564,8 @@ CONFIG_SND_SOC_IMG_SPDIF_IN=m CONFIG_SND_SOC_IMG_SPDIF_OUT=m CONFIG_SND_SOC_IMG_PISTACHIO_INTERNAL_DAC=m CONFIG_SND_SOC_INTEL_SST_TOPLEVEL=y -CONFIG_SND_SST_IPC=m -CONFIG_SND_SST_IPC_PCI=m -CONFIG_SND_SST_IPC_ACPI=m -CONFIG_SND_SOC_INTEL_SST_ACPI=m CONFIG_SND_SOC_INTEL_SST=m -CONFIG_SND_SOC_INTEL_SST_FIRMWARE=m -CONFIG_SND_SOC_INTEL_HASWELL=m +CONFIG_SND_SOC_INTEL_CATPT=m CONFIG_SND_SST_ATOM_HIFI2_PLATFORM=m CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_PCI=m CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_ACPI=m @@ -6349,7 +6584,9 @@ CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC=y CONFIG_SND_SOC_INTEL_SKYLAKE_COMMON=m CONFIG_SND_SOC_ACPI_INTEL_MATCH=m CONFIG_SND_SOC_INTEL_MACH=y +# CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES is not set CONFIG_SND_SOC_INTEL_HASWELL_MACH=m +CONFIG_SND_SOC_INTEL_BDW_RT5650_MACH=m CONFIG_SND_SOC_INTEL_BDW_RT5677_MACH=m CONFIG_SND_SOC_INTEL_BROADWELL_MACH=m CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH=m @@ -6366,25 +6603,29 @@ CONFIG_SND_SOC_INTEL_SKL_RT286_MACH=m CONFIG_SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH=m CONFIG_SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH=m CONFIG_SND_SOC_INTEL_DA7219_MAX98357A_GENERIC=m +CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_COMMON=m CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH=m CONFIG_SND_SOC_INTEL_BXT_RT298_MACH=m +CONFIG_SND_SOC_INTEL_SOF_WM8804_MACH=m CONFIG_SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH=m CONFIG_SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH=m CONFIG_SND_SOC_INTEL_KBL_DA7219_MAX98357A_MACH=m CONFIG_SND_SOC_INTEL_KBL_DA7219_MAX98927_MACH=m CONFIG_SND_SOC_INTEL_KBL_RT5660_MACH=m +CONFIG_SND_SOC_INTEL_GLK_DA7219_MAX98357A_MACH=m CONFIG_SND_SOC_INTEL_GLK_RT5682_MAX98357A_MACH=m CONFIG_SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH=m CONFIG_SND_SOC_INTEL_SOF_RT5682_MACH=m +CONFIG_SND_SOC_INTEL_SOF_PCM512x_MACH=m CONFIG_SND_SOC_INTEL_CML_LP_DA7219_MAX98357A_MACH=m +CONFIG_SND_SOC_INTEL_SOF_CML_RT1011_RT5682_MACH=m +CONFIG_SND_SOC_INTEL_SOF_DA7219_MAX98373_MACH=m +CONFIG_SND_SOC_INTEL_EHL_RT5660_MACH=m CONFIG_SND_SOC_MTK_BTCVSD=m CONFIG_SND_SOC_SOF_TOPLEVEL=y CONFIG_SND_SOC_SOF_PCI=m CONFIG_SND_SOC_SOF_ACPI=m -CONFIG_SND_SOC_SOF_OPTIONS=m -# CONFIG_SND_SOC_SOF_NOCODEC_SUPPORT is not set -# CONFIG_SND_SOC_SOF_STRICT_ABI_CHECKS is not set -# CONFIG_SND_SOC_SOF_DEBUG is not set +# CONFIG_SND_SOC_SOF_DEBUG_PROBES is not set CONFIG_SND_SOC_SOF=m CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE=y CONFIG_SND_SOC_SOF_INTEL_TOPLEVEL=y @@ -6393,8 +6634,7 @@ CONFIG_SND_SOC_SOF_INTEL_PCI=m CONFIG_SND_SOC_SOF_INTEL_HIFI_EP_IPC=m CONFIG_SND_SOC_SOF_INTEL_ATOM_HIFI_EP=m CONFIG_SND_SOC_SOF_INTEL_COMMON=m -CONFIG_SND_SOC_SOF_BAYTRAIL_SUPPORT=y -CONFIG_SND_SOC_SOF_BAYTRAIL=m +# CONFIG_SND_SOC_SOF_BROADWELL_SUPPORT is not set CONFIG_SND_SOC_SOF_MERRIFIELD_SUPPORT=y CONFIG_SND_SOC_SOF_MERRIFIELD=m CONFIG_SND_SOC_SOF_APOLLOLAKE_SUPPORT=y @@ -6407,20 +6647,23 @@ CONFIG_SND_SOC_SOF_COFFEELAKE_SUPPORT=y CONFIG_SND_SOC_SOF_COFFEELAKE=m CONFIG_SND_SOC_SOF_ICELAKE_SUPPORT=y CONFIG_SND_SOC_SOF_ICELAKE=m -CONFIG_SND_SOC_SOF_COMETLAKE_LP=m +CONFIG_SND_SOC_SOF_COMETLAKE=m +CONFIG_SND_SOC_SOF_COMETLAKE_SUPPORT=y CONFIG_SND_SOC_SOF_COMETLAKE_LP_SUPPORT=y -CONFIG_SND_SOC_SOF_COMETLAKE_H=m -CONFIG_SND_SOC_SOF_COMETLAKE_H_SUPPORT=y CONFIG_SND_SOC_SOF_TIGERLAKE_SUPPORT=y CONFIG_SND_SOC_SOF_TIGERLAKE=m CONFIG_SND_SOC_SOF_ELKHARTLAKE_SUPPORT=y CONFIG_SND_SOC_SOF_ELKHARTLAKE=m +CONFIG_SND_SOC_SOF_JASPERLAKE_SUPPORT=y +CONFIG_SND_SOC_SOF_JASPERLAKE=m CONFIG_SND_SOC_SOF_HDA_COMMON=m CONFIG_SND_SOC_SOF_HDA_LINK=y CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC=y CONFIG_SND_SOC_SOF_HDA_ALWAYS_ENABLE_DMI_L1=y CONFIG_SND_SOC_SOF_HDA_LINK_BASELINE=m CONFIG_SND_SOC_SOF_HDA=m +# CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE_LINK is not set +CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE=m CONFIG_SND_SOC_SOF_XTENSA=m # @@ -6446,6 +6689,9 @@ CONFIG_SND_SOC_ADAU1761=m CONFIG_SND_SOC_ADAU1761_I2C=m CONFIG_SND_SOC_ADAU1761_SPI=m CONFIG_SND_SOC_ADAU7002=m +CONFIG_SND_SOC_ADAU7118=m +CONFIG_SND_SOC_ADAU7118_HW=m +CONFIG_SND_SOC_ADAU7118_I2C=m CONFIG_SND_SOC_AK4104=m CONFIG_SND_SOC_AK4118=m CONFIG_SND_SOC_AK4458=m @@ -6469,6 +6715,7 @@ CONFIG_SND_SOC_CS42L51_I2C=m CONFIG_SND_SOC_CS42L52=m CONFIG_SND_SOC_CS42L56=m CONFIG_SND_SOC_CS42L73=m +CONFIG_SND_SOC_CS4234=m CONFIG_SND_SOC_CS4265=m CONFIG_SND_SOC_CS4270=m CONFIG_SND_SOC_CS4271=m @@ -6502,6 +6749,9 @@ CONFIG_SND_SOC_MAX98504=m CONFIG_SND_SOC_MAX9867=m CONFIG_SND_SOC_MAX98927=m CONFIG_SND_SOC_MAX98373=m +CONFIG_SND_SOC_MAX98373_I2C=m +CONFIG_SND_SOC_MAX98373_SDW=m +CONFIG_SND_SOC_MAX98390=m CONFIG_SND_SOC_MAX9860=m CONFIG_SND_SOC_MSM8916_WCD_ANALOG=m CONFIG_SND_SOC_MSM8916_WCD_DIGITAL=m @@ -6528,6 +6778,9 @@ CONFIG_SND_SOC_RL6231=m CONFIG_SND_SOC_RL6347A=m CONFIG_SND_SOC_RT286=m CONFIG_SND_SOC_RT298=m +CONFIG_SND_SOC_RT1011=m +CONFIG_SND_SOC_RT1015=m +CONFIG_SND_SOC_RT1308_SDW=m CONFIG_SND_SOC_RT5514=m CONFIG_SND_SOC_RT5514_SPI=m CONFIG_SND_SOC_RT5616=m @@ -6541,6 +6794,14 @@ CONFIG_SND_SOC_RT5670=m CONFIG_SND_SOC_RT5677=m CONFIG_SND_SOC_RT5677_SPI=m CONFIG_SND_SOC_RT5682=m +CONFIG_SND_SOC_RT5682_I2C=m +CONFIG_SND_SOC_RT5682_SDW=m +CONFIG_SND_SOC_RT700=m +CONFIG_SND_SOC_RT700_SDW=m +CONFIG_SND_SOC_RT711=m +CONFIG_SND_SOC_RT711_SDW=m +CONFIG_SND_SOC_RT715=m +CONFIG_SND_SOC_RT715_SDW=m CONFIG_SND_SOC_SGTL5000=m CONFIG_SND_SOC_SI476X=m CONFIG_SND_SOC_SIGMADSP=m @@ -6558,6 +6819,9 @@ CONFIG_SND_SOC_STA32X=m CONFIG_SND_SOC_STA350=m CONFIG_SND_SOC_STI_SAS=m CONFIG_SND_SOC_TAS2552=m +CONFIG_SND_SOC_TAS2562=m +CONFIG_SND_SOC_TAS2764=m +CONFIG_SND_SOC_TAS2770=m CONFIG_SND_SOC_TAS5086=m CONFIG_SND_SOC_TAS571X=m CONFIG_SND_SOC_TAS5720=m @@ -6572,11 +6836,13 @@ CONFIG_SND_SOC_TLV320AIC32X4=m CONFIG_SND_SOC_TLV320AIC32X4_I2C=m CONFIG_SND_SOC_TLV320AIC32X4_SPI=m CONFIG_SND_SOC_TLV320AIC3X=m +CONFIG_SND_SOC_TLV320ADCX140=m CONFIG_SND_SOC_TS3A227E=m CONFIG_SND_SOC_TSCS42XX=m CONFIG_SND_SOC_TSCS454=m CONFIG_SND_SOC_UDA1334=m CONFIG_SND_SOC_WCD9335=m +CONFIG_SND_SOC_WCD934X=m CONFIG_SND_SOC_WM8510=m CONFIG_SND_SOC_WM8523=m CONFIG_SND_SOC_WM8524=m @@ -6601,10 +6867,13 @@ CONFIG_SND_SOC_WM8962=m CONFIG_SND_SOC_WM8974=m CONFIG_SND_SOC_WM8978=m CONFIG_SND_SOC_WM8985=m +CONFIG_SND_SOC_WSA881X=m +CONFIG_SND_SOC_ZL38060=m CONFIG_SND_SOC_ZX_AUD96P22=m CONFIG_SND_SOC_MAX9759=m CONFIG_SND_SOC_MT6351=m CONFIG_SND_SOC_MT6358=m +CONFIG_SND_SOC_MT6660=m CONFIG_SND_SOC_NAU8540=m CONFIG_SND_SOC_NAU8810=m CONFIG_SND_SOC_NAU8822=m @@ -6662,9 +6931,11 @@ CONFIG_HID_ELO=m CONFIG_HID_EZKEY=m CONFIG_HID_GEMBIRD=m CONFIG_HID_GFRM=m +CONFIG_HID_GLORIOUS=m CONFIG_HID_HOLTEK=m CONFIG_HOLTEK_FF=y CONFIG_HID_GOOGLE_HAMMER=m +CONFIG_HID_VIVALDI=m CONFIG_HID_GT683R=m CONFIG_HID_KEYTOUCH=m CONFIG_HID_KYE=m @@ -6741,6 +7012,7 @@ CONFIG_HID_ZYDACRON=m CONFIG_HID_SENSOR_HUB=m CONFIG_HID_SENSOR_CUSTOM_SENSOR=m CONFIG_HID_ALPS=m +CONFIG_HID_MCP2221=m # end of Special HID drivers # @@ -6763,6 +7035,12 @@ CONFIG_I2C_HID=m CONFIG_INTEL_ISH_HID=m CONFIG_INTEL_ISH_FIRMWARE_DOWNLOADER=m # end of Intel ISH HID support + +# +# AMD SFH HID Support +# +CONFIG_AMD_SFH_HID=m +# end of AMD SFH HID Support # end of HID support CONFIG_USB_OHCI_LITTLE_ENDIAN=y @@ -6780,10 +7058,11 @@ CONFIG_USB_ANNOUNCE_NEW_DEVICES=y # Miscellaneous USB options # CONFIG_USB_DEFAULT_PERSIST=y +# CONFIG_USB_FEW_INIT_RETRIES is not set CONFIG_USB_DYNAMIC_MINORS=y CONFIG_USB_OTG=y -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set +# CONFIG_USB_OTG_PRODUCTLIST is not set +# CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set CONFIG_USB_OTG_FSM=m CONFIG_USB_LEDS_TRIGGER_USBPORT=m CONFIG_USB_AUTOSUSPEND_DELAY=2 @@ -6796,6 +7075,7 @@ CONFIG_USB_C67X00_HCD=m CONFIG_USB_XHCI_HCD=m CONFIG_USB_XHCI_DBGCAP=y CONFIG_USB_XHCI_PCI=m +CONFIG_USB_XHCI_PCI_RENESAS=m CONFIG_USB_XHCI_PLATFORM=m CONFIG_USB_EHCI_HCD=m CONFIG_USB_EHCI_ROOT_HUB_TT=y @@ -6906,9 +7186,11 @@ CONFIG_USB_DWC2_PCI=m # CONFIG_USB_DWC2_DEBUG is not set # CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set CONFIG_USB_CHIPIDEA=m -CONFIG_USB_CHIPIDEA_PCI=m CONFIG_USB_CHIPIDEA_UDC=y CONFIG_USB_CHIPIDEA_HOST=y +CONFIG_USB_CHIPIDEA_PCI=m +CONFIG_USB_CHIPIDEA_MSM=m +CONFIG_USB_CHIPIDEA_GENERIC=m CONFIG_USB_ISP1760=m CONFIG_USB_ISP1760_HCD=y CONFIG_USB_ISP1761_UDC=y @@ -6991,8 +7273,8 @@ CONFIG_USB_CYTHERM=m CONFIG_USB_IDMOUSE=m CONFIG_USB_FTDI_ELAN=m CONFIG_USB_APPLEDISPLAY=m +CONFIG_APPLE_MFI_FASTCHARGE=m CONFIG_USB_SISUSBVGA=m -CONFIG_USB_SISUSBVGA_CON=y CONFIG_USB_LD=m CONFIG_USB_TRANCEVIBRATOR=m CONFIG_USB_IOWARRIOR=m @@ -7054,6 +7336,7 @@ CONFIG_USB_NET2272_DMA=y CONFIG_USB_NET2280=m CONFIG_USB_GOKU=m CONFIG_USB_EG20T=m +CONFIG_USB_MAX3420_UDC=m # CONFIG_USB_DUMMY_HCD is not set # end of USB Peripheral Controller @@ -7101,6 +7384,10 @@ CONFIG_USB_CONFIGFS_F_HID=y CONFIG_USB_CONFIGFS_F_UVC=y CONFIG_USB_CONFIGFS_F_PRINTER=y CONFIG_USB_CONFIGFS_F_TCM=y + +# +# USB Gadget precomposed configurations +# CONFIG_USB_ZERO=m CONFIG_USB_ZERO_HNPTEST=y CONFIG_USB_AUDIO=m @@ -7129,20 +7416,28 @@ CONFIG_USB_G_MULTI_CDC=y CONFIG_USB_G_HID=m # CONFIG_USB_G_DBGP is not set CONFIG_USB_G_WEBCAM=m +CONFIG_USB_RAW_GADGET=m +# end of USB Gadget precomposed configurations + CONFIG_TYPEC=m CONFIG_TYPEC_TCPM=m CONFIG_TYPEC_TCPCI=m CONFIG_TYPEC_RT1711H=m +CONFIG_TYPEC_MT6360=m +CONFIG_TYPEC_TCPCI_MAXIM=m CONFIG_TYPEC_FUSB302=m CONFIG_TYPEC_UCSI=m CONFIG_UCSI_CCG=m CONFIG_UCSI_ACPI=m +CONFIG_TYPEC_HD3SS3220=m CONFIG_TYPEC_TPS6598X=m +CONFIG_TYPEC_STUSB160X=m # # USB Type-C Multiplexer/DeMultiplexer Switch support # CONFIG_TYPEC_MUX_PI3USB30532=m +CONFIG_TYPEC_MUX_INTEL_PMC=m # end of USB Type-C Multiplexer/DeMultiplexer Switch support # @@ -7184,6 +7479,7 @@ CONFIG_MMC_USDHI6ROL0=m CONFIG_MMC_REALTEK_PCI=m CONFIG_MMC_REALTEK_USB=m CONFIG_MMC_CQHCI=m +CONFIG_MMC_HSQ=m CONFIG_MMC_TOSHIBA_PCI=m CONFIG_MMC_MTK=m CONFIG_MMC_SDHCI_XENON=m @@ -7208,6 +7504,7 @@ CONFIG_MEMSTICK_REALTEK_USB=m CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y CONFIG_LEDS_CLASS_FLASH=m +CONFIG_LEDS_CLASS_MULTICOLOR=m # CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set # @@ -7226,11 +7523,7 @@ CONFIG_LEDS_PCA9532_GPIO=y CONFIG_LEDS_GPIO=m CONFIG_LEDS_LP3944=m CONFIG_LEDS_LP3952=m -CONFIG_LEDS_LP55XX_COMMON=m -CONFIG_LEDS_LP5521=m -CONFIG_LEDS_LP5523=m -CONFIG_LEDS_LP5562=m -CONFIG_LEDS_LP8501=m +CONFIG_LEDS_LP50XX=m CONFIG_LEDS_CLEVO_MAIL=m CONFIG_LEDS_PCA955X=m # CONFIG_LEDS_PCA955X_GPIO is not set @@ -7258,6 +7551,8 @@ CONFIG_LEDS_USER=m CONFIG_LEDS_NIC78BX=m CONFIG_LEDS_TI_LMU_COMMON=m CONFIG_LEDS_LM36274=m +CONFIG_LEDS_TPS6105X=m +CONFIG_LEDS_SGM3140=m # # LED Triggers @@ -7285,19 +7580,36 @@ CONFIG_LEDS_TRIGGER_PATTERN=m CONFIG_LEDS_TRIGGER_AUDIO=m CONFIG_ACCESSIBILITY=y CONFIG_A11Y_BRAILLE_CONSOLE=y + +# +# Speakup console speech +# +CONFIG_SPEAKUP=m +CONFIG_SPEAKUP_SYNTH_ACNTSA=m +CONFIG_SPEAKUP_SYNTH_APOLLO=m +CONFIG_SPEAKUP_SYNTH_AUDPTR=m +CONFIG_SPEAKUP_SYNTH_BNS=m +CONFIG_SPEAKUP_SYNTH_DECTLK=m +CONFIG_SPEAKUP_SYNTH_DECEXT=m +CONFIG_SPEAKUP_SYNTH_LTLK=m +CONFIG_SPEAKUP_SYNTH_SOFT=m +CONFIG_SPEAKUP_SYNTH_SPKOUT=m +CONFIG_SPEAKUP_SYNTH_TXPRT=m +# CONFIG_SPEAKUP_SYNTH_DUMMY is not set +# end of Speakup console speech + CONFIG_INFINIBAND=m CONFIG_INFINIBAND_USER_MAD=m CONFIG_INFINIBAND_USER_ACCESS=m -# CONFIG_INFINIBAND_EXP_LEGACY_VERBS_NEW_UAPI is not set CONFIG_INFINIBAND_USER_MEM=y CONFIG_INFINIBAND_ON_DEMAND_PAGING=y CONFIG_INFINIBAND_ADDR_TRANS=y CONFIG_INFINIBAND_ADDR_TRANS_CONFIGFS=y +CONFIG_INFINIBAND_VIRT_DMA=y CONFIG_INFINIBAND_MTHCA=m CONFIG_INFINIBAND_MTHCA_DEBUG=y CONFIG_INFINIBAND_QIB=m CONFIG_INFINIBAND_QIB_DCA=y -CONFIG_INFINIBAND_CXGB3=m CONFIG_INFINIBAND_CXGB4=m CONFIG_INFINIBAND_EFA=m CONFIG_INFINIBAND_I40IW=m @@ -7322,6 +7634,9 @@ CONFIG_INFINIBAND_SRP=m CONFIG_INFINIBAND_SRPT=m CONFIG_INFINIBAND_ISER=m CONFIG_INFINIBAND_ISERT=m +CONFIG_INFINIBAND_RTRS=m +CONFIG_INFINIBAND_RTRS_CLIENT=m +CONFIG_INFINIBAND_RTRS_SERVER=m CONFIG_INFINIBAND_OPA_VNIC=m CONFIG_EDAC_ATOMIC_SCRUB=y CONFIG_EDAC_SUPPORT=y @@ -7399,6 +7714,7 @@ CONFIG_RTC_DRV_RX8581=m CONFIG_RTC_DRV_RX8025=m CONFIG_RTC_DRV_EM3027=m CONFIG_RTC_DRV_RV3028=m +CONFIG_RTC_DRV_RV3032=m CONFIG_RTC_DRV_RV8803=m CONFIG_RTC_DRV_SD3078=m @@ -7484,8 +7800,10 @@ CONFIG_DMA_VIRTUAL_CHANNELS=y CONFIG_DMA_ACPI=y CONFIG_ALTERA_MSGDMA=m CONFIG_INTEL_IDMA64=m +CONFIG_INTEL_IDXD=m CONFIG_INTEL_IOATDMA=m -CONFIG_INTEL_MIC_X100_DMA=m +CONFIG_PLX_DMA=m +CONFIG_XILINX_ZYNQMP_DPDMA=m CONFIG_QCOM_HIDMA_MGMT=m CONFIG_QCOM_HIDMA=m CONFIG_DW_DMAC_CORE=y @@ -7494,6 +7812,7 @@ CONFIG_DW_DMAC_PCI=y CONFIG_DW_EDMA=m CONFIG_DW_EDMA_PCIE=m CONFIG_HSU_DMA=y +CONFIG_SF_PDMA=m # # DMA Clients @@ -7508,7 +7827,9 @@ CONFIG_DMA_ENGINE_RAID=y CONFIG_SYNC_FILE=y # CONFIG_SW_SYNC is not set # CONFIG_UDMABUF is not set +# CONFIG_DMABUF_MOVE_NOTIFY is not set CONFIG_DMABUF_SELFTESTS=m +# CONFIG_DMABUF_HEAPS is not set # end of DMABUF options CONFIG_DCA=m @@ -7554,15 +7875,31 @@ CONFIG_VFIO_MDEV_DEVICE=m CONFIG_IRQ_BYPASS_MANAGER=m CONFIG_VIRT_DRIVERS=y CONFIG_VBOXGUEST=m +CONFIG_NITRO_ENCLAVES=m CONFIG_VIRTIO=m CONFIG_VIRTIO_MENU=y CONFIG_VIRTIO_PCI=m CONFIG_VIRTIO_PCI_LEGACY=y +CONFIG_VIRTIO_VDPA=m CONFIG_VIRTIO_PMEM=m CONFIG_VIRTIO_BALLOON=m +CONFIG_VIRTIO_MEM=m CONFIG_VIRTIO_INPUT=m CONFIG_VIRTIO_MMIO=m CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y +CONFIG_VIRTIO_DMA_SHARED_BUFFER=m +CONFIG_VDPA=m +CONFIG_IFCVF=m +CONFIG_MLX5_VDPA=y +CONFIG_MLX5_VDPA_NET=m +CONFIG_VHOST_IOTLB=m +CONFIG_VHOST=m +CONFIG_VHOST_MENU=y +CONFIG_VHOST_NET=m +CONFIG_VHOST_SCSI=m +CONFIG_VHOST_VSOCK=m +CONFIG_VHOST_VDPA=m +# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set # # Microsoft Hyper-V guest support @@ -7744,7 +8081,6 @@ CONFIG_ADIS16240=m # Analog to digital converters # CONFIG_AD7816=m -CONFIG_AD7192=m CONFIG_AD7280=m # end of Analog to digital converters @@ -7792,32 +8128,29 @@ CONFIG_AD2S1210=m # end of IIO staging drivers CONFIG_FB_SM750=m - -# -# Speakup console speech -# -CONFIG_SPEAKUP=m -CONFIG_SPEAKUP_SYNTH_ACNTSA=m -CONFIG_SPEAKUP_SYNTH_APOLLO=m -CONFIG_SPEAKUP_SYNTH_AUDPTR=m -CONFIG_SPEAKUP_SYNTH_BNS=m -CONFIG_SPEAKUP_SYNTH_DECTLK=m -CONFIG_SPEAKUP_SYNTH_DECEXT=m -CONFIG_SPEAKUP_SYNTH_LTLK=m -CONFIG_SPEAKUP_SYNTH_SOFT=m -CONFIG_SPEAKUP_SYNTH_SPKOUT=m -CONFIG_SPEAKUP_SYNTH_TXPRT=m -# CONFIG_SPEAKUP_SYNTH_DUMMY is not set -# end of Speakup console speech - CONFIG_STAGING_MEDIA=y +CONFIG_INTEL_ATOMISP=y +CONFIG_VIDEO_ATOMISP=m +CONFIG_VIDEO_ATOMISP_ISP2401=y +CONFIG_VIDEO_ATOMISP_OV2722=m +CONFIG_VIDEO_ATOMISP_GC2235=m +CONFIG_VIDEO_ATOMISP_MSRLIST_HELPER=m +CONFIG_VIDEO_ATOMISP_MT9M114=m +CONFIG_VIDEO_ATOMISP_GC0310=m +CONFIG_VIDEO_ATOMISP_OV2680=m +CONFIG_VIDEO_ATOMISP_OV5693=m +CONFIG_VIDEO_ATOMISP_LM3554=m +CONFIG_VIDEO_ZORAN=m +CONFIG_VIDEO_ZORAN_DC30=m +CONFIG_VIDEO_ZORAN_ZR36060=m +CONFIG_VIDEO_ZORAN_BUZ=m +CONFIG_VIDEO_ZORAN_DC10=m +CONFIG_VIDEO_ZORAN_LML33=m +CONFIG_VIDEO_ZORAN_LML33R10=m +CONFIG_VIDEO_ZORAN_AVS6EYES=m CONFIG_VIDEO_IPU3_IMGU=m # -# soc_camera sensor drivers -# - -# # Android # # end of Android @@ -7831,19 +8164,47 @@ CONFIG_UNISYSSPAR=y # CONFIG_UNISYS_VISORNIC is not set # CONFIG_UNISYS_VISORINPUT is not set # CONFIG_UNISYS_VISORHBA is not set -CONFIG_WILC1000=m -CONFIG_WILC1000_SDIO=m -CONFIG_WILC1000_SPI=m -# CONFIG_WILC1000_HW_OOB_INTR is not set -CONFIG_MOST=m -CONFIG_MOST_CDEV=m +CONFIG_FB_TFT=m +CONFIG_FB_TFT_AGM1264K_FL=m +CONFIG_FB_TFT_BD663474=m +CONFIG_FB_TFT_HX8340BN=m +CONFIG_FB_TFT_HX8347D=m +CONFIG_FB_TFT_HX8353D=m +CONFIG_FB_TFT_HX8357D=m +CONFIG_FB_TFT_ILI9163=m +CONFIG_FB_TFT_ILI9320=m +CONFIG_FB_TFT_ILI9325=m +CONFIG_FB_TFT_ILI9340=m +CONFIG_FB_TFT_ILI9341=m +CONFIG_FB_TFT_ILI9481=m +CONFIG_FB_TFT_ILI9486=m +CONFIG_FB_TFT_PCD8544=m +CONFIG_FB_TFT_RA8875=m +CONFIG_FB_TFT_S6D02A1=m +CONFIG_FB_TFT_S6D1121=m +CONFIG_FB_TFT_SEPS525=m +CONFIG_FB_TFT_SH1106=m +CONFIG_FB_TFT_SSD1289=m +CONFIG_FB_TFT_SSD1305=m +CONFIG_FB_TFT_SSD1306=m +CONFIG_FB_TFT_SSD1331=m +CONFIG_FB_TFT_SSD1351=m +# CONFIG_FB_TFT_ST7735R is not set +CONFIG_FB_TFT_ST7789V=m +CONFIG_FB_TFT_TINYLCD=m +CONFIG_FB_TFT_TLS8204=m +CONFIG_FB_TFT_UC1611=m +CONFIG_FB_TFT_UC1701=m +CONFIG_FB_TFT_UPD161704=m +CONFIG_FB_TFT_WATTEROTT=m +CONFIG_MOST_COMPONENTS=m CONFIG_MOST_NET=m CONFIG_MOST_SOUND=m CONFIG_MOST_VIDEO=m CONFIG_MOST_I2C=m -CONFIG_MOST_USB=m CONFIG_KS7010=m CONFIG_GREYBUS_AUDIO=m +CONFIG_GREYBUS_AUDIO_APB_CODEC=m CONFIG_GREYBUS_BOOTROM=m CONFIG_GREYBUS_FIRMWARE=m CONFIG_GREYBUS_HID=m @@ -7876,78 +8237,51 @@ CONFIG_KPC2000_CORE=m CONFIG_KPC2000_SPI=m CONFIG_KPC2000_I2C=m CONFIG_KPC2000_DMA=m - -# -# ISDN CAPI drivers -# -CONFIG_CAPI_AVM=y -CONFIG_ISDN_DRV_AVMB1_B1PCI=m -CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y -CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m -CONFIG_ISDN_DRV_AVMB1_AVM_CS=m -CONFIG_ISDN_DRV_AVMB1_T1PCI=m -CONFIG_ISDN_DRV_AVMB1_C4=m -CONFIG_ISDN_DRV_GIGASET=m -CONFIG_GIGASET_CAPI=y -CONFIG_GIGASET_BASE=m -CONFIG_GIGASET_M105=m -CONFIG_GIGASET_M101=m -# CONFIG_GIGASET_DEBUG is not set -CONFIG_HYSDN=m -CONFIG_HYSDN_CAPI=y -# end of ISDN CAPI drivers - -CONFIG_USB_WUSB=m -CONFIG_USB_WUSB_CBAF=m -# CONFIG_USB_WUSB_CBAF_DEBUG is not set -CONFIG_USB_WHCI_HCD=m -CONFIG_USB_HWA_HCD=m -CONFIG_UWB=m -CONFIG_UWB_HWA=m -CONFIG_UWB_WHCI=m -CONFIG_UWB_I1480U=m -CONFIG_EXFAT_FS=m -CONFIG_EXFAT_DONT_MOUNT_VFAT=y -CONFIG_EXFAT_DISCARD=y -# CONFIG_EXFAT_DELAYED_SYNC is not set -# CONFIG_EXFAT_KERNEL_DEBUG is not set -# CONFIG_EXFAT_DEBUG_MSG is not set -CONFIG_EXFAT_DEFAULT_CODEPAGE=437 -CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8" CONFIG_QLGE=m +CONFIG_WFX=m +CONFIG_SPMI_HISI3670=m CONFIG_X86_PLATFORM_DEVICES=y -CONFIG_ACER_WMI=m -CONFIG_ACER_WIRELESS=m -CONFIG_ACERHDF=m +CONFIG_ACPI_WMI=m +CONFIG_WMI_BMOF=m CONFIG_ALIENWARE_WMI=m +CONFIG_HUAWEI_WMI=m +CONFIG_INTEL_WMI_SBL_FW_UPDATE=m +CONFIG_INTEL_WMI_THUNDERBOLT=m +CONFIG_MXM_WMI=m +CONFIG_PEAQ_WMI=m +CONFIG_XIAOMI_WMI=m +CONFIG_ACERHDF=m +CONFIG_ACER_WIRELESS=m +CONFIG_ACER_WMI=m +CONFIG_APPLE_GMUX=m CONFIG_ASUS_LAPTOP=m +CONFIG_ASUS_WIRELESS=m +CONFIG_ASUS_WMI=m +CONFIG_ASUS_NB_WMI=m +CONFIG_EEEPC_LAPTOP=m +CONFIG_EEEPC_WMI=m CONFIG_DCDBAS=m CONFIG_DELL_SMBIOS=m CONFIG_DELL_SMBIOS_WMI=y CONFIG_DELL_SMBIOS_SMM=y CONFIG_DELL_LAPTOP=m +CONFIG_DELL_RBTN=m +CONFIG_DELL_RBU=m +CONFIG_DELL_SMO8800=m CONFIG_DELL_WMI=m CONFIG_DELL_WMI_DESCRIPTOR=m CONFIG_DELL_WMI_AIO=m CONFIG_DELL_WMI_LED=m -CONFIG_DELL_SMO8800=m -CONFIG_DELL_RBTN=m -CONFIG_DELL_RBU=m +CONFIG_AMILO_RFKILL=m CONFIG_FUJITSU_LAPTOP=m CONFIG_FUJITSU_TABLET=m -CONFIG_AMILO_RFKILL=m CONFIG_GPD_POCKET_FAN=m CONFIG_HP_ACCEL=m CONFIG_HP_WIRELESS=m CONFIG_HP_WMI=m -CONFIG_LG_LAPTOP=m -CONFIG_MSI_LAPTOP=m -CONFIG_PANASONIC_LAPTOP=m -CONFIG_COMPAL_LAPTOP=m -CONFIG_SONY_LAPTOP=m -CONFIG_SONYPI_COMPAT=y +CONFIG_IBM_RTL=m CONFIG_IDEAPAD_LAPTOP=m -CONFIG_SURFACE3_WMI=m +CONFIG_SENSORS_HDAPS=m CONFIG_THINKPAD_ACPI=m CONFIG_THINKPAD_ACPI_ALSA_SUPPORT=y # CONFIG_THINKPAD_ACPI_DEBUGFACILITIES is not set @@ -7955,52 +8289,39 @@ CONFIG_THINKPAD_ACPI_ALSA_SUPPORT=y # CONFIG_THINKPAD_ACPI_UNSAFE_LEDS is not set CONFIG_THINKPAD_ACPI_VIDEO=y CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y -CONFIG_SENSORS_HDAPS=m +CONFIG_INTEL_ATOMISP2_LED=m +CONFIG_INTEL_CHT_INT33FE=m +CONFIG_INTEL_HID_EVENT=m +CONFIG_INTEL_INT0002_VGPIO=m CONFIG_INTEL_MENLOW=m -CONFIG_EEEPC_LAPTOP=m -CONFIG_ASUS_WMI=m -CONFIG_ASUS_NB_WMI=m -CONFIG_EEEPC_WMI=m -CONFIG_ASUS_WIRELESS=m -CONFIG_ACPI_WMI=m -CONFIG_WMI_BMOF=m -CONFIG_INTEL_WMI_THUNDERBOLT=m -CONFIG_XIAOMI_WMI=m +CONFIG_INTEL_OAKTRAIL=m +CONFIG_INTEL_VBTN=m +CONFIG_SURFACE3_WMI=m +CONFIG_SURFACE_3_BUTTON=m +CONFIG_SURFACE_3_POWER_OPREGION=m +CONFIG_SURFACE_PRO3_BUTTON=m +CONFIG_MSI_LAPTOP=m CONFIG_MSI_WMI=m -CONFIG_PEAQ_WMI=m -CONFIG_TOPSTAR_LAPTOP=m +CONFIG_PCENGINES_APU2=m +CONFIG_SAMSUNG_LAPTOP=m +CONFIG_SAMSUNG_Q10=m CONFIG_ACPI_TOSHIBA=m CONFIG_TOSHIBA_BT_RFKILL=m CONFIG_TOSHIBA_HAPS=m CONFIG_TOSHIBA_WMI=m CONFIG_ACPI_CMPC=m -CONFIG_INTEL_CHT_INT33FE=m -CONFIG_INTEL_INT0002_VGPIO=m -CONFIG_INTEL_HID_EVENT=m -CONFIG_INTEL_VBTN=m +CONFIG_COMPAL_LAPTOP=m +CONFIG_LG_LAPTOP=m +CONFIG_PANASONIC_LAPTOP=m +CONFIG_SONY_LAPTOP=m +CONFIG_SONYPI_COMPAT=y +CONFIG_SYSTEM76_ACPI=m +CONFIG_TOPSTAR_LAPTOP=m +CONFIG_I2C_MULTI_INSTANTIATE=m +CONFIG_MLX_PLATFORM=m CONFIG_INTEL_IPS=m -CONFIG_INTEL_PMC_CORE=y -CONFIG_IBM_RTL=m -CONFIG_SAMSUNG_LAPTOP=m -CONFIG_MXM_WMI=m -CONFIG_INTEL_OAKTRAIL=m -CONFIG_SAMSUNG_Q10=m -CONFIG_APPLE_GMUX=m CONFIG_INTEL_RST=m CONFIG_INTEL_SMARTCONNECT=m -CONFIG_INTEL_PMC_IPC=m -CONFIG_INTEL_BXTWC_PMIC_TMU=m -CONFIG_SURFACE_PRO3_BUTTON=m -CONFIG_SURFACE_3_BUTTON=m -CONFIG_INTEL_PUNIT_IPC=m -CONFIG_INTEL_TELEMETRY=m -CONFIG_MLX_PLATFORM=m -CONFIG_INTEL_TURBO_MAX_3=y -CONFIG_INTEL_CHTDC_TI_PWRBTN=m -CONFIG_I2C_MULTI_INSTANTIATE=m -CONFIG_INTEL_ATOMISP2_PM=m -CONFIG_HUAWEI_WMI=m -CONFIG_PCENGINES_APU2=m # # Intel Speed Select Technology interface support @@ -8008,8 +8329,21 @@ CONFIG_PCENGINES_APU2=m CONFIG_INTEL_SPEED_SELECT_INTERFACE=m # end of Intel Speed Select Technology interface support +CONFIG_INTEL_TURBO_MAX_3=y +CONFIG_INTEL_UNCORE_FREQ_CONTROL=m +CONFIG_INTEL_BXTWC_PMIC_TMU=m +CONFIG_INTEL_CHTDC_TI_PWRBTN=m +CONFIG_INTEL_MID_POWER_BUTTON=m +CONFIG_INTEL_MRFLD_PWRBTN=m +CONFIG_INTEL_PMC_CORE=y +CONFIG_INTEL_PUNIT_IPC=m +CONFIG_INTEL_SCU_IPC=y +CONFIG_INTEL_SCU=y +CONFIG_INTEL_SCU_PCI=y +CONFIG_INTEL_SCU_PLATFORM=m +CONFIG_INTEL_SCU_IPC_UTIL=m +CONFIG_INTEL_TELEMETRY=m CONFIG_PMC_ATOM=y -CONFIG_MFD_CROS_EC=m CONFIG_CHROME_PLATFORMS=y CONFIG_CHROMEOS_LAPTOP=m CONFIG_CHROMEOS_PSTORE=m @@ -8024,8 +8358,11 @@ CONFIG_CROS_KBD_LED_BACKLIGHT=m CONFIG_CROS_EC_CHARDEV=m CONFIG_CROS_EC_LIGHTBAR=m CONFIG_CROS_EC_DEBUGFS=m +CONFIG_CROS_EC_SENSORHUB=m CONFIG_CROS_EC_SYSFS=m +CONFIG_CROS_EC_TYPEC=m CONFIG_CROS_USBPD_LOGGER=m +CONFIG_CROS_USBPD_NOTIFY=m CONFIG_WILCO_EC=m CONFIG_WILCO_EC_DEBUGFS=m CONFIG_WILCO_EC_EVENTS=m @@ -8033,13 +8370,10 @@ CONFIG_WILCO_EC_TELEMETRY=m CONFIG_MELLANOX_PLATFORM=y CONFIG_MLXREG_HOTPLUG=m CONFIG_MLXREG_IO=m +CONFIG_HAVE_CLK=y CONFIG_CLKDEV_LOOKUP=y CONFIG_HAVE_CLK_PREPARE=y CONFIG_COMMON_CLK=y - -# -# Common Clock Framework -# CONFIG_COMMON_CLK_WM831X=m CONFIG_COMMON_CLK_MAX9485=m CONFIG_COMMON_CLK_SI5341=m @@ -8048,8 +8382,6 @@ CONFIG_COMMON_CLK_SI544=m CONFIG_COMMON_CLK_CDCE706=m CONFIG_COMMON_CLK_CS2000_CP=m CONFIG_COMMON_CLK_PWM=m -# end of Common Clock Framework - CONFIG_HWSPINLOCK=y # @@ -8064,6 +8396,7 @@ CONFIG_MAILBOX=y CONFIG_PCC=y CONFIG_ALTERA_MBOX=m CONFIG_IOMMU_IOVA=y +CONFIG_IOASID=y CONFIG_IOMMU_API=y CONFIG_IOMMU_SUPPORT=y @@ -8074,6 +8407,7 @@ CONFIG_IOMMU_SUPPORT=y # CONFIG_IOMMU_DEBUGFS is not set # CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set +CONFIG_IOMMU_DMA=y CONFIG_AMD_IOMMU=y CONFIG_AMD_IOMMU_V2=m CONFIG_DMAR_TABLE=y @@ -8081,6 +8415,7 @@ CONFIG_INTEL_IOMMU=y CONFIG_INTEL_IOMMU_SVM=y # CONFIG_INTEL_IOMMU_DEFAULT_ON is not set CONFIG_INTEL_IOMMU_FLOPPY_WA=y +# CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON is not set CONFIG_IRQ_REMAP=y CONFIG_HYPERV_IOMMU=y @@ -8095,7 +8430,7 @@ CONFIG_HYPERV_IOMMU=y # CONFIG_RPMSG=m CONFIG_RPMSG_CHAR=m -CONFIG_RPMSG_QCOM_GLINK_NATIVE=m +CONFIG_RPMSG_QCOM_GLINK=m CONFIG_RPMSG_QCOM_GLINK_RPM=m CONFIG_RPMSG_VIRTIO=m # end of Rpmsg drivers @@ -8107,6 +8442,8 @@ CONFIG_SOUNDWIRE=y # CONFIG_SOUNDWIRE_CADENCE=m CONFIG_SOUNDWIRE_INTEL=m +CONFIG_SOUNDWIRE_QCOM=m +CONFIG_SOUNDWIRE_GENERIC_ALLOCATION=m # # SOC (System On Chip) specific Drivers @@ -8140,6 +8477,7 @@ CONFIG_SOUNDWIRE_INTEL=m # # Qualcomm SoC drivers # +CONFIG_QCOM_QMI_HELPERS=m # end of Qualcomm SoC drivers # CONFIG_SOC_TI is not set @@ -8177,6 +8515,7 @@ CONFIG_EXTCON_AXP288=m CONFIG_EXTCON_FSA9480=m CONFIG_EXTCON_GPIO=m CONFIG_EXTCON_INTEL_INT3496=m +CONFIG_EXTCON_INTEL_MRFLD=m CONFIG_EXTCON_MAX14577=m CONFIG_EXTCON_MAX3355=m CONFIG_EXTCON_MAX77693=m @@ -8189,6 +8528,8 @@ CONFIG_MEMORY=y CONFIG_IIO=m CONFIG_IIO_BUFFER=y CONFIG_IIO_BUFFER_CB=m +CONFIG_IIO_BUFFER_DMA=m +CONFIG_IIO_BUFFER_DMAENGINE=m CONFIG_IIO_BUFFER_HW_CONSUMER=m CONFIG_IIO_KFIFO_BUF=m CONFIG_IIO_TRIGGERED_BUFFER=m @@ -8207,8 +8548,10 @@ CONFIG_ADIS16209=m CONFIG_ADXL372=m CONFIG_ADXL372_SPI=m CONFIG_ADXL372_I2C=m -CONFIG_BMA180=m CONFIG_BMA220=m +CONFIG_BMA400=m +CONFIG_BMA400_I2C=m +CONFIG_BMA400_SPI=m CONFIG_BMC150_ACCEL=m CONFIG_BMC150_ACCEL_I2C=m CONFIG_BMC150_ACCEL_SPI=m @@ -8245,9 +8588,12 @@ CONFIG_STK8BA50=m # Analog to digital converters # CONFIG_AD_SIGMA_DELTA=m +CONFIG_AD7091R5=m CONFIG_AD7124=m +CONFIG_AD7192=m CONFIG_AD7266=m CONFIG_AD7291=m +CONFIG_AD7292=m CONFIG_AD7298=m CONFIG_AD7476=m CONFIG_AD7606=m @@ -8262,6 +8608,8 @@ CONFIG_AD7887=m CONFIG_AD7923=m CONFIG_AD7949=m CONFIG_AD799X=m +CONFIG_AD9467=m +CONFIG_ADI_AXI_ADC=m CONFIG_AXP20X_ADC=m CONFIG_AXP288_ADC=m CONFIG_CC10001_ADC=m @@ -8270,18 +8618,22 @@ CONFIG_DLN2_ADC=m CONFIG_HI8435=m CONFIG_HX711=m CONFIG_INA2XX_ADC=m +CONFIG_INTEL_MRFLD_ADC=m CONFIG_LTC2471=m CONFIG_LTC2485=m +CONFIG_LTC2496=m CONFIG_LTC2497=m CONFIG_MAX1027=m CONFIG_MAX11100=m CONFIG_MAX1118=m +CONFIG_MAX1241=m CONFIG_MAX1363=m CONFIG_MAX9611=m CONFIG_MCP320X=m CONFIG_MCP3422=m CONFIG_MCP3911=m CONFIG_MEN_Z188_ADC=m +CONFIG_MP2629_ADC=m CONFIG_NAU7802=m CONFIG_QCOM_VADC_COMMON=m CONFIG_QCOM_SPMI_IADC=m @@ -8311,18 +8663,23 @@ CONFIG_XILINX_XADC=m # Amplifiers # CONFIG_AD8366=m +CONFIG_HMC425=m # end of Amplifiers # # Chemical Sensors # CONFIG_ATLAS_PH_SENSOR=m +CONFIG_ATLAS_EZO_SENSOR=m CONFIG_BME680=m CONFIG_BME680_I2C=m CONFIG_BME680_SPI=m CONFIG_CCS811=m CONFIG_IAQCORE=m CONFIG_PMS7003=m +CONFIG_SCD30_CORE=m +CONFIG_SCD30_I2C=m +CONFIG_SCD30_SERIAL=m CONFIG_SENSIRION_SGP30=m CONFIG_SPS30=m CONFIG_VZ89X=m @@ -8366,8 +8723,6 @@ CONFIG_AD5592R=m CONFIG_AD5593R=m CONFIG_AD5504=m CONFIG_AD5624R_SPI=m -CONFIG_LTC1660=m -CONFIG_LTC2632=m CONFIG_AD5686=m CONFIG_AD5686_SPI=m CONFIG_AD5696_I2C=m @@ -8375,10 +8730,13 @@ CONFIG_AD5755=m CONFIG_AD5758=m CONFIG_AD5761=m CONFIG_AD5764=m +CONFIG_AD5770R=m CONFIG_AD5791=m CONFIG_AD7303=m CONFIG_AD8801=m CONFIG_DS4424=m +CONFIG_LTC1660=m +CONFIG_LTC2632=m CONFIG_M62332=m CONFIG_MAX517=m CONFIG_MCP4725=m @@ -8420,6 +8778,7 @@ CONFIG_ADIS16080=m CONFIG_ADIS16130=m CONFIG_ADIS16136=m CONFIG_ADIS16260=m +CONFIG_ADXRS290=m CONFIG_ADXRS450=m CONFIG_BMG160=m CONFIG_BMG160_I2C=m @@ -8456,6 +8815,7 @@ CONFIG_MAX30102=m CONFIG_AM2315=m CONFIG_DHT11=m CONFIG_HDC100X=m +CONFIG_HDC2010=m CONFIG_HID_SENSOR_HUMIDITY=m CONFIG_HTS221=m CONFIG_HTS221_I2C=m @@ -8470,11 +8830,18 @@ CONFIG_SI7020=m # CONFIG_ADIS16400=m CONFIG_ADIS16460=m +CONFIG_ADIS16475=m CONFIG_ADIS16480=m CONFIG_BMI160=m CONFIG_BMI160_I2C=m CONFIG_BMI160_SPI=m +CONFIG_FXOS8700=m +CONFIG_FXOS8700_I2C=m +CONFIG_FXOS8700_SPI=m CONFIG_KMX61=m +CONFIG_INV_ICM42600=m +CONFIG_INV_ICM42600_I2C=m +CONFIG_INV_ICM42600_SPI=m CONFIG_INV_MPU6050_IIO=m CONFIG_INV_MPU6050_I2C=m CONFIG_INV_MPU6050_SPI=m @@ -8492,9 +8859,12 @@ CONFIG_IIO_ADIS_LIB_BUFFER=y # # CONFIG_ACPI_ALS is not set CONFIG_ADJD_S311=m +CONFIG_ADUX1020=m +CONFIG_AL3010=m CONFIG_AL3320A=m CONFIG_APDS9300=m CONFIG_APDS9960=m +CONFIG_AS73211=m CONFIG_BH1750=m CONFIG_BH1780=m CONFIG_CM32181=m @@ -8502,7 +8872,9 @@ CONFIG_CM3232=m CONFIG_CM3323=m CONFIG_CM36651=m CONFIG_IIO_CROS_EC_LIGHT_PROX=m +CONFIG_GP2AP002=m CONFIG_GP2AP020A00F=m +CONFIG_IQS621_ALS=m CONFIG_SENSORS_ISL29018=m CONFIG_SENSORS_ISL29028=m CONFIG_ISL29125=m @@ -8533,6 +8905,7 @@ CONFIG_TSL4531=m CONFIG_US5182D=m CONFIG_VCNL4000=m CONFIG_VCNL4035=m +CONFIG_VEML6030=m CONFIG_VEML6070=m CONFIG_VL6180=m CONFIG_ZOPT2201=m @@ -8582,6 +8955,12 @@ CONFIG_IIO_SYSFS_TRIGGER=m # end of Triggers - standalone # +# Linear and angular position sensors +# +CONFIG_IQS624_POS=m +# end of Linear and angular position sensors + +# # Digital potentiometers # CONFIG_AD5272=m @@ -8610,9 +8989,11 @@ CONFIG_BMP280=m CONFIG_BMP280_I2C=m CONFIG_BMP280_SPI=m CONFIG_IIO_CROS_EC_BARO=m +CONFIG_DLHL60D=m CONFIG_DPS310=m CONFIG_HID_SENSOR_PRESS=m CONFIG_HP03=m +CONFIG_ICP10100=m CONFIG_MPL115=m CONFIG_MPL115_I2C=m CONFIG_MPL115_SPI=m @@ -8643,10 +9024,13 @@ CONFIG_AS3935=m CONFIG_ISL29501=m CONFIG_LIDAR_LITE_V2=m CONFIG_MB1232=m +CONFIG_PING=m CONFIG_RFD77402=m CONFIG_SRF04=m +CONFIG_SX9310=m CONFIG_SX9500=m CONFIG_SRF08=m +CONFIG_VCNL3020=m CONFIG_VL53L0X_I2C=m # end of Proximity and distance sensors @@ -8660,6 +9044,8 @@ CONFIG_AD2S1200=m # # Temperature sensors # +CONFIG_IQS620AT_TEMP=m +CONFIG_LTC2983=m CONFIG_MAXIM_THERMOCOUPLE=m CONFIG_HID_SENSOR_TEMP=m CONFIG_MLX90614=m @@ -8702,7 +9088,9 @@ CONFIG_VMIVME_7805=m CONFIG_VME_USER=m CONFIG_PWM=y CONFIG_PWM_SYSFS=y +# CONFIG_PWM_DEBUG is not set CONFIG_PWM_CROS_EC=m +CONFIG_PWM_IQS620A=m CONFIG_PWM_LP3943=m CONFIG_PWM_LPSS=m CONFIG_PWM_LPSS_PCI=m @@ -8719,12 +9107,14 @@ CONFIG_IPACK_BUS=m CONFIG_BOARD_TPCI200=m CONFIG_SERIAL_IPOCTAL=m CONFIG_RESET_CONTROLLER=y +# CONFIG_RESET_BRCMSTB_RESCAL is not set CONFIG_RESET_TI_SYSCON=m # # PHY Subsystem # CONFIG_GENERIC_PHY=y +CONFIG_USB_LGM_PHY=m CONFIG_BCM_KONA_USB2_PHY=m CONFIG_PHY_PXA_28NM_HSIC=m CONFIG_PHY_PXA_28NM_USB2=m @@ -8733,6 +9123,7 @@ CONFIG_PHY_QCOM_USB_HS=m CONFIG_PHY_QCOM_USB_HSIC=m CONFIG_PHY_SAMSUNG_USB2=m CONFIG_PHY_TUSB1210=m +CONFIG_PHY_INTEL_LGM_EMMC=m # end of PHY Subsystem CONFIG_POWERCAP=y @@ -8751,7 +9142,8 @@ CONFIG_MCB_LPC=m CONFIG_RAS=y CONFIG_RAS_CEC=y # CONFIG_RAS_CEC_DEBUG is not set -CONFIG_THUNDERBOLT=m +CONFIG_USB4=m +# CONFIG_USB4_DEBUGFS_WRITE is not set # # Android @@ -8769,9 +9161,12 @@ CONFIG_NVDIMM_KEYS=y CONFIG_DAX_DRIVER=y CONFIG_DAX=y CONFIG_DEV_DAX=m +CONFIG_DEV_DAX_HMEM=m +CONFIG_DEV_DAX_HMEM_DEVICES=y CONFIG_DEV_DAX_KMEM=m CONFIG_NVMEM=y CONFIG_NVMEM_SYSFS=y +CONFIG_NVMEM_SPMI_SDAM=m CONFIG_RAVE_SP_EEPROM=m # @@ -8811,14 +9206,35 @@ CONFIG_FPGA_DFL_FME_BRIDGE=m CONFIG_FPGA_DFL_FME_REGION=m CONFIG_FPGA_DFL_AFU=m CONFIG_FPGA_DFL_PCI=m +CONFIG_TEE=m + +# +# TEE drivers +# +CONFIG_AMDTEE=m +# end of TEE drivers + +CONFIG_MULTIPLEXER=m + +# +# Multiplexer drivers +# +CONFIG_MUX_ADG792A=m +CONFIG_MUX_ADGS1408=m +CONFIG_MUX_GPIO=m +# end of Multiplexer drivers + CONFIG_PM_OPP=y CONFIG_UNISYS_VISORBUS=m CONFIG_SIOX=m CONFIG_SIOX_BUS_GPIO=m CONFIG_SLIMBUS=m CONFIG_SLIM_QCOM_CTRL=m -CONFIG_INTERCONNECT=m +# CONFIG_INTERCONNECT is not set CONFIG_COUNTER=m +CONFIG_MOST=m +CONFIG_MOST_USB_HDM=m +CONFIG_MOST_CDEV=m # end of Device Drivers # @@ -8853,6 +9269,7 @@ CONFIG_JFS_SECURITY=y # CONFIG_JFS_DEBUG is not set CONFIG_JFS_STATISTICS=y CONFIG_XFS_FS=m +CONFIG_XFS_SUPPORT_V4=y CONFIG_XFS_QUOTA=y CONFIG_XFS_POSIX_ACL=y CONFIG_XFS_RT=y @@ -8884,6 +9301,12 @@ CONFIG_F2FS_FS_SECURITY=y CONFIG_F2FS_CHECK_FS=y # CONFIG_F2FS_IO_TRACE is not set # CONFIG_F2FS_FAULT_INJECTION is not set +CONFIG_F2FS_FS_COMPRESSION=y +CONFIG_F2FS_FS_LZO=y +CONFIG_F2FS_FS_LZ4=y +CONFIG_F2FS_FS_ZSTD=y +CONFIG_F2FS_FS_LZORLE=y +CONFIG_ZONEFS_FS=m CONFIG_FS_DAX=y CONFIG_FS_POSIX_ACL=y CONFIG_EXPORTFS=y @@ -8891,6 +9314,7 @@ CONFIG_EXPORTFS_BLOCK_OPS=y CONFIG_FILE_LOCKING=y CONFIG_MANDATORY_FILE_LOCKING=y CONFIG_FS_ENCRYPTION=y +CONFIG_FS_ENCRYPTION_ALGS=m # CONFIG_FS_VERITY is not set CONFIG_FSNOTIFY=y CONFIG_DNOTIFY=y @@ -8905,12 +9329,12 @@ CONFIG_QUOTA_TREE=m CONFIG_QFMT_V1=m CONFIG_QFMT_V2=m CONFIG_QUOTACTL=y -CONFIG_QUOTACTL_COMPAT=y CONFIG_AUTOFS4_FS=m CONFIG_AUTOFS_FS=m CONFIG_FUSE_FS=m CONFIG_CUSE=m CONFIG_VIRTIO_FS=m +CONFIG_FUSE_DAX=y CONFIG_OVERLAY_FS=m CONFIG_OVERLAY_FS_REDIRECT_DIR=y CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y @@ -8942,7 +9366,7 @@ CONFIG_UDF_FS=m # end of CD-ROM/DVD Filesystems # -# DOS/FAT/NT Filesystems +# DOS/FAT/EXFAT/NT Filesystems # CONFIG_FAT_FS=m CONFIG_MSDOS_FS=m @@ -8950,10 +9374,12 @@ CONFIG_VFAT_FS=m CONFIG_FAT_DEFAULT_CODEPAGE=437 CONFIG_FAT_DEFAULT_IOCHARSET="utf8" # CONFIG_FAT_DEFAULT_UTF8 is not set +CONFIG_EXFAT_FS=m +CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8" CONFIG_NTFS_FS=m # CONFIG_NTFS_DEBUG is not set CONFIG_NTFS_RW=y -# end of DOS/FAT/NT Filesystems +# end of DOS/FAT/EXFAT/NT Filesystems # # Pseudo filesystems @@ -8962,13 +9388,15 @@ CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y CONFIG_PROC_SYSCTL=y CONFIG_PROC_PAGE_MONITOR=y -# CONFIG_PROC_CHILDREN is not set +CONFIG_PROC_CHILDREN=y CONFIG_PROC_PID_ARCH_STATUS=y +CONFIG_PROC_CPU_RESCTRL=y CONFIG_KERNFS=y CONFIG_SYSFS=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y CONFIG_TMPFS_XATTR=y +# CONFIG_TMPFS_INODE64 is not set CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y CONFIG_MEMFD_CREATE=y @@ -9057,15 +9485,21 @@ CONFIG_PSTORE_ZSTD_COMPRESS=y CONFIG_PSTORE_COMPRESS=y # CONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT is not set # CONFIG_PSTORE_LZO_COMPRESS_DEFAULT is not set -CONFIG_PSTORE_LZ4_COMPRESS_DEFAULT=y +# CONFIG_PSTORE_LZ4_COMPRESS_DEFAULT is not set # CONFIG_PSTORE_LZ4HC_COMPRESS_DEFAULT is not set # CONFIG_PSTORE_842_COMPRESS_DEFAULT is not set -# CONFIG_PSTORE_ZSTD_COMPRESS_DEFAULT is not set -CONFIG_PSTORE_COMPRESS_DEFAULT="lz4" +CONFIG_PSTORE_ZSTD_COMPRESS_DEFAULT=y +CONFIG_PSTORE_COMPRESS_DEFAULT="zstd" # CONFIG_PSTORE_CONSOLE is not set CONFIG_PSTORE_PMSG=y # CONFIG_PSTORE_FTRACE is not set CONFIG_PSTORE_RAM=m +CONFIG_PSTORE_ZONE=m +CONFIG_PSTORE_BLK=m +CONFIG_PSTORE_BLK_BLKDEV="" +CONFIG_PSTORE_BLK_KMSG_SIZE=64 +CONFIG_PSTORE_BLK_MAX_REASON=2 +CONFIG_PSTORE_BLK_PMSG_SIZE=64 CONFIG_SYSV_FS=m CONFIG_UFS_FS=m # CONFIG_UFS_FS_WRITE is not set @@ -9076,6 +9510,7 @@ CONFIG_EROFS_FS_XATTR=y CONFIG_EROFS_FS_POSIX_ACL=y # CONFIG_EROFS_FS_SECURITY is not set # CONFIG_EROFS_FS_ZIP is not set +# CONFIG_VBOXSF_FS is not set CONFIG_NETWORK_FILESYSTEMS=y CONFIG_NFS_FS=m CONFIG_NFS_V2=m @@ -9094,6 +9529,8 @@ CONFIG_NFS_V4_SECURITY_LABEL=y CONFIG_NFS_FSCACHE=y # CONFIG_NFS_USE_LEGACY_DNS is not set CONFIG_NFS_USE_KERNEL_DNS=y +CONFIG_NFS_DISABLE_UDP_SUPPORT=y +# CONFIG_NFS_V4_2_READ_PLUS is not set CONFIG_NFSD=m CONFIG_NFSD_V2_ACL=y CONFIG_NFSD_V3=y @@ -9103,6 +9540,7 @@ CONFIG_NFSD_PNFS=y CONFIG_NFSD_BLOCKLAYOUT=y CONFIG_NFSD_SCSILAYOUT=y CONFIG_NFSD_FLEXFILELAYOUT=y +# CONFIG_NFSD_V4_2_INTER_SSC is not set # CONFIG_NFSD_V4_SECURITY_LABEL is not set CONFIG_GRACE_PERIOD=m CONFIG_LOCKD=m @@ -9196,16 +9634,15 @@ CONFIG_DLM=m # CONFIG_DLM_DEBUG is not set CONFIG_UNICODE=y CONFIG_UNICODE_NORMALIZATION_SELFTEST=m +CONFIG_IO_WQ=y # end of File systems # # Security options # CONFIG_KEYS=y -CONFIG_KEYS_COMPAT=y # CONFIG_KEYS_REQUEST_CACHE is not set CONFIG_PERSISTENT_KEYRINGS=y -# CONFIG_BIG_KEYS is not set CONFIG_TRUSTED_KEYS=m CONFIG_ENCRYPTED_KEYS=m # CONFIG_KEY_DH_OPERATIONS is not set @@ -9234,12 +9671,13 @@ CONFIG_SECURITY_APPARMOR_HASH_DEFAULT=y # CONFIG_SECURITY_APPARMOR_DEBUG is not set # CONFIG_SECURITY_LOADPIN is not set CONFIG_SECURITY_YAMA=y -CONFIG_SECURITY_SAFESETID=y +# CONFIG_SECURITY_SAFESETID is not set # CONFIG_SECURITY_LOCKDOWN_LSM is not set CONFIG_INTEGRITY=y # CONFIG_INTEGRITY_SIGNATURE is not set CONFIG_INTEGRITY_AUDIT=y # CONFIG_IMA is not set +# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set # CONFIG_EVM is not set CONFIG_DEFAULT_SECURITY_APPARMOR=y # CONFIG_DEFAULT_SECURITY_DAC is not set @@ -9253,25 +9691,14 @@ CONFIG_LSM="yama,loadpin,safesetid,integrity,apparmor" # Memory initialization # CONFIG_INIT_STACK_NONE=y -CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y -CONFIG_INIT_ON_FREE_DEFAULT_ON=y +# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set +# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set CONFIG_PAGE_SANITIZE_VERIFY=y CONFIG_SLAB_SANITIZE_VERIFY=y # end of Memory initialization # end of Kernel hardening options # end of Security options -# -# Hardened Enhancements -# -# CONFIG_HARDENED_RANDOM is not set -# CONFIG_HARDENED_STEALTH_NETWORKING is not set -# CONFIG_HARDENED_NO_SIMULT_CONNECT is not set -# CONFIG_HARDENED_SYSFS_RESTRICT is not set -# CONFIG_HARDENED_FIFO is not set -# CONFIG_HARDENED_MODULE_LOAD is not set -# end of Hardened Enhancements - CONFIG_XOR_BLOCKS=m CONFIG_ASYNC_CORE=m CONFIG_ASYNC_MEMCPY=m @@ -9287,8 +9714,8 @@ CONFIG_CRYPTO_ALGAPI=y CONFIG_CRYPTO_ALGAPI2=y CONFIG_CRYPTO_AEAD=m CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_SKCIPHER=y +CONFIG_CRYPTO_SKCIPHER2=y CONFIG_CRYPTO_HASH=y CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_RNG=m @@ -9322,6 +9749,9 @@ CONFIG_CRYPTO_DH=m CONFIG_CRYPTO_ECC=m CONFIG_CRYPTO_ECDH=m CONFIG_CRYPTO_ECRDSA=m +CONFIG_CRYPTO_SM2=m +CONFIG_CRYPTO_CURVE25519=m +CONFIG_CRYPTO_CURVE25519_X86=m # # Authenticated Encryption with Associated Data @@ -9369,6 +9799,9 @@ CONFIG_CRYPTO_CRC32C_INTEL=m CONFIG_CRYPTO_CRC32=m CONFIG_CRYPTO_CRC32_PCLMUL=m CONFIG_CRYPTO_XXHASH=m +CONFIG_CRYPTO_BLAKE2B=m +CONFIG_CRYPTO_BLAKE2S=m +CONFIG_CRYPTO_BLAKE2S_X86=m CONFIG_CRYPTO_CRCT10DIF=y CONFIG_CRYPTO_CRCT10DIF_PCLMUL=m CONFIG_CRYPTO_GHASH=m @@ -9385,7 +9818,6 @@ CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA1_SSSE3=m CONFIG_CRYPTO_SHA256_SSSE3=m CONFIG_CRYPTO_SHA512_SSSE3=m -CONFIG_CRYPTO_LIB_SHA256=y CONFIG_CRYPTO_SHA256=y CONFIG_CRYPTO_SHA512=y CONFIG_CRYPTO_SHA3=m @@ -9398,12 +9830,10 @@ CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=m # # Ciphers # -CONFIG_CRYPTO_LIB_AES=y CONFIG_CRYPTO_AES=y CONFIG_CRYPTO_AES_TI=m CONFIG_CRYPTO_AES_NI_INTEL=m CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_LIB_ARC4=m CONFIG_CRYPTO_ARC4=m CONFIG_CRYPTO_BLOWFISH=m CONFIG_CRYPTO_BLOWFISH_COMMON=m @@ -9417,7 +9847,6 @@ CONFIG_CRYPTO_CAST5=m CONFIG_CRYPTO_CAST5_AVX_X86_64=m CONFIG_CRYPTO_CAST6=m CONFIG_CRYPTO_CAST6_AVX_X86_64=m -CONFIG_CRYPTO_LIB_DES=m CONFIG_CRYPTO_DES=m CONFIG_CRYPTO_DES3_EDE_X86_64=m CONFIG_CRYPTO_FCRYPT=m @@ -9462,9 +9891,33 @@ CONFIG_CRYPTO_USER_API=m CONFIG_CRYPTO_USER_API_HASH=m CONFIG_CRYPTO_USER_API_SKCIPHER=m CONFIG_CRYPTO_USER_API_RNG=m +# CONFIG_CRYPTO_USER_API_RNG_CAVP is not set CONFIG_CRYPTO_USER_API_AEAD=m +CONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y # CONFIG_CRYPTO_STATS is not set CONFIG_CRYPTO_HASH_INFO=y + +# +# Crypto library routines +# +CONFIG_CRYPTO_LIB_AES=y +CONFIG_CRYPTO_LIB_ARC4=m +CONFIG_CRYPTO_ARCH_HAVE_LIB_BLAKE2S=m +CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=m +CONFIG_CRYPTO_LIB_BLAKE2S=m +CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=m +CONFIG_CRYPTO_LIB_CHACHA_GENERIC=m +CONFIG_CRYPTO_LIB_CHACHA=m +CONFIG_CRYPTO_ARCH_HAVE_LIB_CURVE25519=m +CONFIG_CRYPTO_LIB_CURVE25519_GENERIC=m +CONFIG_CRYPTO_LIB_CURVE25519=m +CONFIG_CRYPTO_LIB_DES=m +CONFIG_CRYPTO_LIB_POLY1305_RSIZE=11 +CONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=m +CONFIG_CRYPTO_LIB_POLY1305_GENERIC=m +CONFIG_CRYPTO_LIB_POLY1305=m +CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m +CONFIG_CRYPTO_LIB_SHA256=y CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_DEV_PADLOCK=m CONFIG_CRYPTO_DEV_PADLOCK_AES=m @@ -9476,7 +9929,7 @@ CONFIG_CRYPTO_DEV_CCP=y CONFIG_CRYPTO_DEV_CCP_DD=m CONFIG_CRYPTO_DEV_SP_CCP=y CONFIG_CRYPTO_DEV_CCP_CRYPTO=m -# CONFIG_CRYPTO_DEV_SP_PSP is not set +CONFIG_CRYPTO_DEV_SP_PSP=y # CONFIG_CRYPTO_DEV_CCP_DEBUGFS is not set CONFIG_CRYPTO_DEV_QAT=m CONFIG_CRYPTO_DEV_QAT_DH895xCC=m @@ -9488,10 +9941,10 @@ CONFIG_CRYPTO_DEV_QAT_C62XVF=m CONFIG_CRYPTO_DEV_NITROX=m CONFIG_CRYPTO_DEV_NITROX_CNN55XX=m CONFIG_CRYPTO_DEV_CHELSIO=m -CONFIG_CHELSIO_IPSEC_INLINE=y -CONFIG_CRYPTO_DEV_CHELSIO_TLS=m CONFIG_CRYPTO_DEV_VIRTIO=m CONFIG_CRYPTO_DEV_SAFEXCEL=m +CONFIG_CRYPTO_DEV_AMLOGIC_GXL=m +# CONFIG_CRYPTO_DEV_AMLOGIC_GXL_DEBUG is not set CONFIG_ASYMMETRIC_KEY_TYPE=y CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y CONFIG_ASYMMETRIC_TPM_KEY_SUBTYPE=m @@ -9520,6 +9973,7 @@ CONFIG_BINARY_PRINTF=y # CONFIG_RAID6_PQ=m CONFIG_RAID6_PQ_BENCHMARK=y +CONFIG_LINEAR_RANGES=y CONFIG_PACKING=y CONFIG_BITREVERSE=y CONFIG_GENERIC_STRNCPY_FROM_USER=y @@ -9533,6 +9987,7 @@ CONFIG_GENERIC_PCI_IOMAP=y CONFIG_GENERIC_IOMAP=y CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y CONFIG_ARCH_HAS_FAST_MULTIPLIER=y +CONFIG_ARCH_USE_SYM_ANNOTATIONS=y CONFIG_CRC_CCITT=m CONFIG_CRC16=m CONFIG_CRC_T10DIF=y @@ -9576,6 +10031,7 @@ CONFIG_DECOMPRESS_LZMA=y CONFIG_DECOMPRESS_XZ=y CONFIG_DECOMPRESS_LZO=y CONFIG_DECOMPRESS_LZ4=y +CONFIG_DECOMPRESS_ZSTD=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_REED_SOLOMON=m CONFIG_REED_SOLOMON_ENC8=y @@ -9593,13 +10049,16 @@ CONFIG_ASSOCIATIVE_ARRAY=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y CONFIG_HAS_DMA=y +CONFIG_DMA_OPS=y CONFIG_NEED_SG_DMA_LENGTH=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_ARCH_DMA_ADDR_T_64BIT=y CONFIG_ARCH_HAS_FORCE_DMA_UNENCRYPTED=y CONFIG_DMA_VIRT_OPS=y CONFIG_SWIOTLB=y +CONFIG_DMA_COHERENT_POOL=y CONFIG_DMA_CMA=y +# CONFIG_DMA_PERNUMA_CMA is not set # # Default contiguous memory area size: @@ -9629,6 +10088,7 @@ CONFIG_OID_REGISTRY=y CONFIG_UCS2_STRING=y CONFIG_HAVE_GENERIC_VDSO=y CONFIG_GENERIC_GETTIMEOFDAY=y +CONFIG_GENERIC_VDSO_TIME_NS=y CONFIG_FONT_SUPPORT=y CONFIG_FONTS=y CONFIG_FONT_8x8=y @@ -9643,10 +10103,12 @@ CONFIG_FONT_8x16=y # CONFIG_FONT_SUN8x16 is not set # CONFIG_FONT_SUN12x22 is not set CONFIG_FONT_TER16x32=y +# CONFIG_FONT_6x8 is not set CONFIG_SG_POOL=y CONFIG_ARCH_HAS_PMEM_API=y +CONFIG_MEMREGION=y CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE=y -CONFIG_ARCH_HAS_UACCESS_MCSAFE=y +CONFIG_ARCH_HAS_COPY_MC=y CONFIG_ARCH_STACKWALK=y CONFIG_SBITMAP=y CONFIG_PARMAN=m @@ -9654,6 +10116,8 @@ CONFIG_OBJAGG=m # CONFIG_STRING_SELFTEST is not set # end of Library routines +CONFIG_PLDMFW=y + # # Kernel hacking # @@ -9668,6 +10132,9 @@ CONFIG_CONSOLE_LOGLEVEL_QUIET=4 CONFIG_MESSAGE_LOGLEVEL_DEFAULT=1 # CONFIG_BOOT_PRINTK_DELAY is not set # CONFIG_DYNAMIC_DEBUG is not set +# CONFIG_DYNAMIC_DEBUG_CORE is not set +CONFIG_SYMBOLIC_ERRNAME=y +CONFIG_DEBUG_BUGVERBOSE=y # end of printk and dmesg options # @@ -9678,9 +10145,7 @@ CONFIG_MESSAGE_LOGLEVEL_DEFAULT=1 CONFIG_FRAME_WARN=0 CONFIG_STRIP_ASM_SYMS=y # CONFIG_READABLE_ASM is not set -CONFIG_DEBUG_FS=y # CONFIG_HEADERS_INSTALL is not set -CONFIG_OPTIMIZE_INLINING=y # CONFIG_DEBUG_SECTION_MISMATCH is not set CONFIG_SECTION_MISMATCH_WARN_ONLY=y # CONFIG_DEBUG_WRITABLE_FUNCTION_POINTERS_VERBOSE is not set @@ -9688,9 +10153,24 @@ CONFIG_STACK_VALIDATION=y # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set # end of Compile-time checks and compiler options +# +# Generic Kernel Debugging Instruments +# CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x0 CONFIG_MAGIC_SYSRQ_SERIAL=y +CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE="" +CONFIG_DEBUG_FS=y +CONFIG_DEBUG_FS_ALLOW_ALL=y +# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set +# CONFIG_DEBUG_FS_ALLOW_NONE is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y +# CONFIG_UBSAN is not set +CONFIG_HAVE_ARCH_KCSAN=y +# end of Generic Kernel Debugging Instruments + CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_MISC=y @@ -9703,45 +10183,56 @@ CONFIG_DEBUG_MISC=y # CONFIG_PAGE_POISONING is not set # CONFIG_DEBUG_PAGE_REF is not set # CONFIG_DEBUG_RODATA_TEST is not set +CONFIG_ARCH_HAS_DEBUG_WX=y +CONFIG_DEBUG_WX=y +CONFIG_GENERIC_PTDUMP=y +CONFIG_PTDUMP_CORE=y +# CONFIG_PTDUMP_DEBUGFS is not set # CONFIG_DEBUG_OBJECTS is not set # CONFIG_SLUB_DEBUG_ON is not set # CONFIG_SLUB_STATS is not set CONFIG_HAVE_DEBUG_KMEMLEAK=y # CONFIG_DEBUG_KMEMLEAK is not set # CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_SCHED_STACK_END_CHECK is not set +CONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y # CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_VM_PGTABLE is not set CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y # CONFIG_DEBUG_VIRTUAL is not set CONFIG_DEBUG_MEMORY_INIT=y # CONFIG_DEBUG_PER_CPU_MAPS is not set CONFIG_HAVE_ARCH_KASAN=y +CONFIG_HAVE_ARCH_KASAN_VMALLOC=y CONFIG_CC_HAS_KASAN_GENERIC=y +CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y # CONFIG_KASAN is not set -CONFIG_KASAN_STACK=1 # end of Memory Debugging -CONFIG_ARCH_HAS_KCOV=y -CONFIG_CC_HAS_SANCOV_TRACE_PC=y -# CONFIG_KCOV is not set # CONFIG_DEBUG_SHIRQ is not set # -# Debug Lockups and Hangs +# Debug Oops, Lockups and Hangs # +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 +CONFIG_PANIC_TIMEOUT=60 # CONFIG_SOFTLOCKUP_DETECTOR is not set CONFIG_HARDLOCKUP_CHECK_TIMESTAMP=y # CONFIG_HARDLOCKUP_DETECTOR is not set # CONFIG_DETECT_HUNG_TASK is not set # CONFIG_WQ_WATCHDOG is not set -# end of Debug Lockups and Hangs +CONFIG_TEST_LOCKUP=m +# end of Debug Oops, Lockups and Hangs -# CONFIG_PANIC_ON_OOPS is not set -CONFIG_PANIC_ON_OOPS_VALUE=0 -CONFIG_PANIC_TIMEOUT=60 +# +# Scheduler Debugging +# CONFIG_SCHED_DEBUG=y CONFIG_SCHED_INFO=y CONFIG_SCHEDSTATS=y -# CONFIG_SCHED_STACK_END_CHECK is not set +# end of Scheduler Debugging + # CONFIG_DEBUG_TIMEKEEPING is not set # CONFIG_DEBUG_PREEMPT is not set @@ -9761,24 +10252,33 @@ CONFIG_LOCK_DEBUGGING_SUPPORT=y # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_LOCK_TORTURE_TEST is not set # CONFIG_WW_MUTEX_SELFTEST is not set +CONFIG_SCF_TORTURE_TEST=m +# CONFIG_CSD_LOCK_WAIT_DEBUG is not set # end of Lock Debugging (spinlocks, mutexes, etc...) CONFIG_STACKTRACE=y # CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set # CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_BUGVERBOSE=y + +# +# Debug kernel data structures +# # CONFIG_DEBUG_LIST is not set # CONFIG_DEBUG_PLIST is not set # CONFIG_DEBUG_SG is not set # CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_BUG_ON_DATA_CORRUPTION is not set +# end of Debug kernel data structures + # CONFIG_DEBUG_CREDENTIALS is not set # # RCU Debugging # CONFIG_TORTURE_TEST=m -CONFIG_RCU_PERF_TEST=m +CONFIG_RCU_SCALE_TEST=m # CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_RCU_REF_SCALE_TEST is not set CONFIG_RCU_CPU_STALL_TIMEOUT=60 # CONFIG_RCU_TRACE is not set # CONFIG_RCU_EQS_DEBUG is not set @@ -9787,8 +10287,6 @@ CONFIG_RCU_CPU_STALL_TIMEOUT=60 # CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set # CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set CONFIG_LATENCYTOP=y CONFIG_USER_STACKTRACE_SUPPORT=y CONFIG_NOP_TRACER=y @@ -9796,6 +10294,7 @@ CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y +CONFIG_HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_HAVE_FENTRY=y @@ -9808,56 +10307,52 @@ CONFIG_TRACING=y CONFIG_GENERIC_TRACER=y CONFIG_TRACING_SUPPORT=y CONFIG_FTRACE=y +CONFIG_BOOTTIME_TRACING=y CONFIG_FUNCTION_TRACER=y # CONFIG_FUNCTION_GRAPH_TRACER is not set -# CONFIG_PREEMPTIRQ_EVENTS is not set +CONFIG_DYNAMIC_FTRACE=y +CONFIG_DYNAMIC_FTRACE_WITH_REGS=y +CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y +CONFIG_FUNCTION_PROFILER=y +CONFIG_STACK_TRACER=y # CONFIG_IRQSOFF_TRACER is not set # CONFIG_PREEMPT_TRACER is not set # CONFIG_SCHED_TRACER is not set # CONFIG_HWLAT_TRACER is not set +# CONFIG_MMIOTRACE is not set CONFIG_FTRACE_SYSCALLS=y # CONFIG_TRACER_SNAPSHOT is not set CONFIG_BRANCH_PROFILE_NONE=y # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -CONFIG_STACK_TRACER=y CONFIG_BLK_DEV_IO_TRACE=y # CONFIG_UPROBE_EVENTS is not set -CONFIG_DYNAMIC_FTRACE=y -CONFIG_DYNAMIC_FTRACE_WITH_REGS=y -CONFIG_FUNCTION_PROFILER=y CONFIG_FTRACE_MCOUNT_RECORD=y -# CONFIG_FTRACE_STARTUP_TEST is not set -# CONFIG_MMIOTRACE is not set +# CONFIG_SYNTH_EVENTS is not set # CONFIG_HIST_TRIGGERS is not set +# CONFIG_TRACE_EVENT_INJECT is not set # CONFIG_TRACEPOINT_BENCHMARK is not set # CONFIG_RING_BUFFER_BENCHMARK is not set +# CONFIG_TRACE_EVAL_MAP_FILE is not set +# CONFIG_FTRACE_STARTUP_TEST is not set # CONFIG_RING_BUFFER_STARTUP_TEST is not set CONFIG_PREEMPTIRQ_DELAY_TEST=m -# CONFIG_TRACE_EVAL_MAP_FILE is not set # CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set -# CONFIG_RUNTIME_TESTING_MENU is not set -CONFIG_MEMTEST=y -# CONFIG_BUG_ON_DATA_CORRUPTION is not set # CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -# CONFIG_KGDB is not set -CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y -# CONFIG_UBSAN is not set -CONFIG_UBSAN_ALIGNMENT=y CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y CONFIG_STRICT_DEVMEM=y CONFIG_IO_STRICT_DEVMEM=y + +# +# x86 Debugging +# CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y CONFIG_EARLY_PRINTK_USB=y CONFIG_X86_VERBOSE_BOOTUP=y CONFIG_EARLY_PRINTK=y CONFIG_EARLY_PRINTK_DBGP=y CONFIG_EARLY_PRINTK_USB_XDBC=y -CONFIG_X86_PTDUMP_CORE=y -# CONFIG_X86_PTDUMP is not set # CONFIG_EFI_PGT_DUMP is not set -CONFIG_DEBUG_WX=y -CONFIG_DOUBLEFAULT=y # CONFIG_DEBUG_TLBFLUSH is not set # CONFIG_IOMMU_DEBUG is not set CONFIG_HAVE_MMIOTRACE_SUPPORT=y @@ -9874,4 +10369,19 @@ CONFIG_X86_DEBUG_FPU=y # CONFIG_PUNIT_ATOM_DEBUG is not set CONFIG_UNWINDER_ORC=y # CONFIG_UNWINDER_FRAME_POINTER is not set +# end of x86 Debugging + +# +# Kernel Testing and Coverage +# +# CONFIG_KUNIT is not set +# CONFIG_NOTIFIER_ERROR_INJECTION is not set +# CONFIG_FAULT_INJECTION is not set +CONFIG_ARCH_HAS_KCOV=y +CONFIG_CC_HAS_SANCOV_TRACE_PC=y +# CONFIG_KCOV is not set +# CONFIG_RUNTIME_TESTING_MENU is not set +CONFIG_MEMTEST=y +# CONFIG_HYPERV_TESTING is not set +# end of Kernel Testing and Coverage # end of Kernel hacking diff --git a/sys-kernel/linux-image-redcore-lts/files/5.10-amd_iommu_init_info.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-amd_iommu_init_info.patch new file mode 100644 index 00000000..8b17c2f6 --- /dev/null +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-amd_iommu_init_info.patch @@ -0,0 +1,13 @@ +diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c +index c652f16eb702..b52ea079d555 100644 +--- a/drivers/iommu/amd/init.c ++++ b/drivers/iommu/amd/init.c +@@ -1680,7 +1680,7 @@ static void init_iommu_perf_ctr(struct amd_iommu *iommu) + return; + + pc_false: +- pci_err(pdev, "Unable to read/write to IOMMU perf counter.\n"); ++ pci_info(pdev, "Unable to read/write to IOMMU perf counter.\n"); + amd_iommu_pc_present = false; + return; + } diff --git a/sys-kernel/linux-image-redcore-lts/files/5.10-apic_vector-spam-in-debug-mode-only.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-apic_vector-spam-in-debug-mode-only.patch new file mode 100644 index 00000000..0771ca17 --- /dev/null +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-apic_vector-spam-in-debug-mode-only.patch @@ -0,0 +1,13 @@ +diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c +index 67768e54438b..d271e231c74e 100644 +--- a/arch/x86/kernel/apic/vector.c ++++ b/arch/x86/kernel/apic/vector.c +@@ -405,7 +405,7 @@ static int activate_reserved(struct irq_data *irqd) + */ + if (!cpumask_subset(irq_data_get_effective_affinity_mask(irqd), + irq_data_get_affinity_mask(irqd))) { +- pr_warn("irq %u: Affinity broken due to vector space exhaustion.\n", ++ pr_debug("irq %u: Affinity broken due to vector space exhaustion.\n", + irqd->irq); + } + diff --git a/sys-kernel/linux-image-redcore-lts/files/5.4-ata-fix-NCQ-LOG-strings-and-move-to-debug.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-ata-fix-NCQ-LOG-strings-and-move-to-debug.patch index 344a8c4b..344a8c4b 100644 --- a/sys-kernel/linux-image-redcore-lts/files/5.4-ata-fix-NCQ-LOG-strings-and-move-to-debug.patch +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-ata-fix-NCQ-LOG-strings-and-move-to-debug.patch diff --git a/sys-kernel/linux-image-redcore-lts/files/5.10-ath10k-be-quiet.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-ath10k-be-quiet.patch new file mode 100644 index 00000000..a6c715e7 --- /dev/null +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-ath10k-be-quiet.patch @@ -0,0 +1,25 @@ +diff -Naur linux-5.6/drivers/net/wireless/ath/ath10k/core.c linux-5.6-p/drivers/net/wireless/ath/ath10k/core.c +--- linux-5.6/drivers/net/wireless/ath/ath10k/core.c 2020-03-30 00:25:41.000000000 +0200 ++++ linux-5.6-p/drivers/net/wireless/ath/ath10k/core.c 2020-03-30 16:20:00.558005330 +0200 +@@ -2166,7 +2166,8 @@ + return ret; + } + +- ath10k_info(ar, "UART prints enabled\n"); ++ /* Please, _dbg() , no need to flood the dmesg with these */ ++ ath10k_dbg(ar, ATH10K_DBG_BOOT, "UART prints enabled\n"); + return 0; + } + +diff -Naur linux-5.6/drivers/net/wireless/ath/ath10k/sdio.c linux-5.6-p/drivers/net/wireless/ath/ath10k/sdio.c +--- linux-5.6/drivers/net/wireless/ath/ath10k/sdio.c 2020-03-30 00:25:41.000000000 +0200 ++++ linux-5.6-p/drivers/net/wireless/ath/ath10k/sdio.c 2020-03-30 16:20:00.558005330 +0200 +@@ -1974,7 +1974,7 @@ + ar_sdio->mbox_addr[eid], ar_sdio->mbox_size[eid]); + break; + default: +- ath10k_warn(ar, "unsupported HTC service id: %d\n", ++ ath10k_dbg(ar, ATH10K_DBG_SDIO, "unsupported HTC service id: %d\n", + service_id); + return -EINVAL; + } diff --git a/sys-kernel/linux-image-redcore-lts/files/5.10-compress-modules-zstd-support.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-compress-modules-zstd-support.patch new file mode 100644 index 00000000..591a4e8c --- /dev/null +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-compress-modules-zstd-support.patch @@ -0,0 +1,49 @@ +diff -Naur linux-5.5.11/init/Kconfig linux-5.5.11-p/init/Kconfig +--- linux-5.5.11/init/Kconfig 2020-03-21 08:15:56.000000000 +0100 ++++ linux-5.5.11-p/init/Kconfig 2020-03-23 17:29:43.424355692 +0100 +@@ -2103,10 +2103,10 @@ + bool "Compress modules on installation" + help + +- Compresses kernel modules when 'make modules_install' is run; gzip or +- xz depending on "Compression algorithm" below. ++ Compresses kernel modules when 'make modules_install' is run; gzip, ++ xz or zstd depending on "Compression algorithm" below. + +- module-init-tools MAY support gzip, and kmod MAY support gzip and xz. ++ module-init-tools MAY support gzip, and kmod MAY support gzip, xz and zstd. + + Out-of-tree kernel modules installed using Kbuild will also be + compressed upon installation. +@@ -2126,7 +2126,7 @@ + This determines which sort of compression will be used during + 'make modules_install'. + +- GZIP (default) and XZ are supported. ++ GZIP (default), XZ and ZSTD are supported. + + config MODULE_COMPRESS_GZIP + bool "GZIP" +@@ -2134,6 +2134,9 @@ + config MODULE_COMPRESS_XZ + bool "XZ" + ++config MODULE_COMPRESS_ZSTD ++ bool "ZSTD" ++ + endchoice + + config MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS +diff -Naur linux-5.5.11/Makefile linux-5.5.11-p/Makefile +--- linux-5.5.11/Makefile 2020-03-23 17:32:31.848367600 +0100 ++++ linux-5.5.11-p/Makefile 2020-03-23 17:31:57.173159400 +0100 +@@ -983,6 +983,9 @@ + ifdef CONFIG_MODULE_COMPRESS_XZ + mod_compress_cmd = xz -T0 -f + endif # CONFIG_MODULE_COMPRESS_XZ ++ ifdef CONFIG_MODULE_COMPRESS_ZSTD ++ mod_compress_cmd = zstd -T0 -19 -q --rm -f ++ endif # CONFIG_MODULE_COMPRESS_ZSTD + endif # CONFIG_MODULE_COMPRESS + export mod_compress_cmd + diff --git a/sys-kernel/linux-image-redcore-lts/files/5.10-do_not_bug_the_next_18-years.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-do_not_bug_the_next_18-years.patch new file mode 100644 index 00000000..75763d62 --- /dev/null +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-do_not_bug_the_next_18-years.patch @@ -0,0 +1,12 @@ +diff -Naur linux-5.5.6/fs/namespace.c linux-5.5.6-p/fs/namespace.c +--- linux-5.5.6/fs/namespace.c 2020-02-24 08:38:51.000000000 +0100 ++++ linux-5.5.6-p/fs/namespace.c 2020-02-27 11:09:12.337903446 +0100 +@@ -2478,7 +2478,7 @@ + + time64_to_tm(sb->s_time_max, 0, &tm); + +- pr_warn("%s filesystem being %s at %s supports timestamps until %04ld (0x%llx)\n", ++ pr_debug("%s filesystem being %s at %s supports timestamps until %04ld (0x%llx)\n", + sb->s_type->name, + is_mounted(mnt) ? "remounted" : "mounted", + mntpath, diff --git a/sys-kernel/linux-image-redcore-lts/files/5.10-enable-new-amd-energy-driver-for-all-ryzen.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-enable-new-amd-energy-driver-for-all-ryzen.patch new file mode 100644 index 00000000..3d7a4948 --- /dev/null +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-enable-new-amd-energy-driver-for-all-ryzen.patch @@ -0,0 +1,13 @@ +diff -Naur linux-5.10.2/drivers/hwmon/amd_energy.c linux-5.10.2-p/drivers/hwmon/amd_energy.c +--- linux-5.10.2/drivers/hwmon/amd_energy.c 2020-12-21 13:30:08.000000000 +0100 ++++ linux-5.10.2-p/drivers/hwmon/amd_energy.c 2020-12-25 16:41:30.326691167 +0100 +@@ -330,7 +330,8 @@ + static struct platform_device *amd_energy_platdev; + + static const struct x86_cpu_id cpu_ids[] __initconst = { +- X86_MATCH_VENDOR_FAM_MODEL(AMD, 0x17, 0x31, NULL), ++ X86_MATCH_VENDOR_FAM(AMD, 0x17, NULL), ++ X86_MATCH_VENDOR_FAM(AMD, 0x19, NULL), + {} + }; + MODULE_DEVICE_TABLE(x86cpu, cpu_ids); diff --git a/sys-kernel/linux-image-redcore-lts/files/5.4-enable_alx_wol.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-enable_alx_wol.patch index 55505fbd..55505fbd 100644 --- a/sys-kernel/linux-image-redcore-lts/files/5.4-enable_alx_wol.patch +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-enable_alx_wol.patch diff --git a/sys-kernel/linux-image-redcore-lts/files/5.10-fix-bootconfig-makefile.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-fix-bootconfig-makefile.patch new file mode 100644 index 00000000..4399ecda --- /dev/null +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-fix-bootconfig-makefile.patch @@ -0,0 +1,30 @@ +--- linux-5.7/tools/bootconfig/Makefile 2020-06-01 01:49:15.000000000 +0200 ++++ linux-5.7.new/tools/bootconfig/Makefile 2020-06-02 09:20:09.827274106 +0200 +@@ -2,7 +2,7 @@ + # Makefile for bootconfig command + include ../scripts/Makefile.include + +-bindir ?= /usr/bin ++sbindir ?= /usr/sbin + + ifeq ($(srctree),) + srctree := $(patsubst %/,%,$(dir $(CURDIR))) +@@ -10,7 +10,7 @@ + endif + + LIBSRC = $(srctree)/lib/bootconfig.c $(srctree)/include/linux/bootconfig.h +-CFLAGS = -Wall -g -I$(CURDIR)/include ++CFLAGS += -Wall -g -I$(CURDIR)/include + + ALL_TARGETS := bootconfig + ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS)) +@@ -24,7 +24,7 @@ + ./test-bootconfig.sh $(OUTPUT) + + install: $(ALL_PROGRAMS) +- install $(OUTPUT)bootconfig $(DESTDIR)$(bindir) +- ++ mkdir -p $(DESTDIR)$(sbindir) ++ install -m 0755 bootconfig $(DESTDIR)$(sbindir) + clean: + $(RM) -f $(OUTPUT)*.o $(ALL_PROGRAMS) diff --git a/sys-kernel/linux-image-redcore-lts/files/5.10-iwlwifi-fix-5e003982b07ae.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-iwlwifi-fix-5e003982b07ae.patch new file mode 100644 index 00000000..e1eb15f9 --- /dev/null +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-iwlwifi-fix-5e003982b07ae.patch @@ -0,0 +1,15 @@ +diff -Naur linux-5.7.7/drivers/net/wireless/intel/iwlwifi/pcie/drv.c linux-5.7.7-p/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +--- linux-5.7.7/drivers/net/wireless/intel/iwlwifi/pcie/drv.c 2020-06-30 22:21:22.000000000 +0200 ++++ linux-5.7.7-p/drivers/net/wireless/intel/iwlwifi/pcie/drv.c 2020-07-14 03:08:27.106340422 +0200 +@@ -581,9 +581,10 @@ + IWL_DEV_INFO(0x271C, 0x0214, iwl9260_2ac_cfg, iwl9260_1_name), + + /* AX200 */ ++ /* IWL_CFG_ANY need to be the first entry, otherwise everything is overridden */ ++ IWL_DEV_INFO(0x2723, IWL_CFG_ANY, iwl_ax200_cfg_cc, iwl_ax200_name), + IWL_DEV_INFO(0x2723, 0x1653, iwl_ax200_cfg_cc, iwl_ax200_killer_1650w_name), + IWL_DEV_INFO(0x2723, 0x1654, iwl_ax200_cfg_cc, iwl_ax200_killer_1650x_name), +- IWL_DEV_INFO(0x2723, IWL_CFG_ANY, iwl_ax200_cfg_cc, iwl_ax200_name), + + /* Qu with Hr */ + IWL_DEV_INFO(0x43F0, 0x0044, iwl_ax101_cfg_qu_hr, NULL), diff --git a/sys-kernel/linux-image-redcore-lts/files/5.10-iwlwifi-use-debug-for-debug-infos.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-iwlwifi-use-debug-for-debug-infos.patch new file mode 100644 index 00000000..5ec56c69 --- /dev/null +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-iwlwifi-use-debug-for-debug-infos.patch @@ -0,0 +1,24 @@ +diff -Naur linux-5.9/drivers/net/wireless/intel/iwlwifi/fw/dbg.c linux-5.9-p/drivers/net/wireless/intel/iwlwifi/fw/dbg.c +--- linux-5.9/drivers/net/wireless/intel/iwlwifi/fw/dbg.c 2020-10-11 23:15:50.000000000 +0200 ++++ linux-5.9-p/drivers/net/wireless/intel/iwlwifi/fw/dbg.c 2020-10-12 00:56:12.171166232 +0200 +@@ -2554,7 +2554,7 @@ + return -EINVAL; + + if (fwrt->dump.conf != FW_DBG_INVALID) +- IWL_INFO(fwrt, "FW already configured (%d) - re-configuring\n", ++ IWL_DEBUG_FW_INFO(fwrt, "FW already configured (%d) - re-configuring\n", + fwrt->dump.conf); + + /* Send all HCMDs for configuring the FW debug */ +diff -Naur linux-5.9/drivers/net/wireless/intel/iwlwifi/pcie/trans.c linux-5.9-p/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +--- linux-5.9/drivers/net/wireless/intel/iwlwifi/pcie/trans.c 2020-10-11 23:15:50.000000000 +0200 ++++ linux-5.9-p/drivers/net/wireless/intel/iwlwifi/pcie/trans.c 2020-10-12 00:57:02.204539087 +0200 +@@ -929,7 +929,7 @@ + return; + } + +- IWL_INFO(trans, "Applying debug destination %s\n", ++ IWL_DEBUG_INFO(trans, "Applying debug destination %s\n", + get_fw_dbg_mode_string(dest->monitor_mode)); + + if (dest->monitor_mode == EXTERNAL_MODE) diff --git a/sys-kernel/linux-image-redcore-lts/files/5.10-k10temp-fix-ZEN2-desktop-add-ZEN3-desktop.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-k10temp-fix-ZEN2-desktop-add-ZEN3-desktop.patch new file mode 100644 index 00000000..ed381bfa --- /dev/null +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-k10temp-fix-ZEN2-desktop-add-ZEN3-desktop.patch @@ -0,0 +1,94 @@ +diff -Naur linux-5.10.2/drivers/hwmon/k10temp.c linux-5.10.2-p/drivers/hwmon/k10temp.c +--- linux-5.10.2/drivers/hwmon/k10temp.c 2020-12-21 13:30:08.000000000 +0100 ++++ linux-5.10.2-p/drivers/hwmon/k10temp.c 2020-12-22 18:15:23.686670195 +0100 +@@ -87,17 +87,28 @@ + /* F17h thermal registers through SMN */ + #define F17H_M01H_SVI_TEL_PLANE0 (ZEN_SVI_BASE + 0xc) + #define F17H_M01H_SVI_TEL_PLANE1 (ZEN_SVI_BASE + 0x10) ++/* ZEN2 SP3/TR */ + #define F17H_M31H_SVI_TEL_PLANE0 (ZEN_SVI_BASE + 0x14) + #define F17H_M31H_SVI_TEL_PLANE1 (ZEN_SVI_BASE + 0x10) + ++/* ZEN2 Ryzen Desktop */ ++#define F17H_M71H_SVI_TEL_PLANE0 (ZEN_SVI_BASE + 0x10) ++#define F17H_M71H_SVI_TEL_PLANE1 (ZEN_SVI_BASE + 0xc) ++ ++/* fixme: figure these */ + #define F17H_M01H_CFACTOR_ICORE 1000000 /* 1A / LSB */ + #define F17H_M01H_CFACTOR_ISOC 250000 /* 0.25A / LSB */ + #define F17H_M31H_CFACTOR_ICORE 1000000 /* 1A / LSB */ + #define F17H_M31H_CFACTOR_ISOC 310000 /* 0.31A / LSB */ + + /* F19h thermal registers through SMN */ +-#define F19H_M01_SVI_TEL_PLANE0 (ZEN_SVI_BASE + 0x14) +-#define F19H_M01_SVI_TEL_PLANE1 (ZEN_SVI_BASE + 0x10) ++/* ZEN3 SP3/TR */ ++#define F19H_M01H_SVI_TEL_PLANE0 (ZEN_SVI_BASE + 0x14) ++#define F19H_M01H_SVI_TEL_PLANE1 (ZEN_SVI_BASE + 0x10) ++ ++/* ZEN3 Ryzen Desktop */ ++#define F19H_M21H_SVI_TEL_PLANE0 (ZEN_SVI_BASE + 0x10) ++#define F19H_M21H_SVI_TEL_PLANE1 (ZEN_SVI_BASE + 0xc) + + #define F19H_M01H_CFACTOR_ICORE 1000000 /* 1A / LSB */ + #define F19H_M01H_CFACTOR_ISOC 310000 /* 0.31A / LSB */ +@@ -513,6 +524,7 @@ + data->is_zen = true; + + switch (boot_cpu_data.x86_model) { ++ /* FIXME: those looks wrong too */ + case 0x1: /* Zen */ + case 0x8: /* Zen+ */ + case 0x11: /* Zen APU */ +@@ -524,8 +536,7 @@ + data->cfactor[1] = F17H_M01H_CFACTOR_ISOC; + k10temp_get_ccd_support(pdev, data, 4); + break; +- case 0x31: /* Zen2 Threadripper */ +- case 0x71: /* Zen2 */ ++ case 0x31: /* Zen2 SP3/TR */ + data->show_current = !is_threadripper() && !is_epyc(); + data->cfactor[0] = F17H_M31H_CFACTOR_ICORE; + data->cfactor[1] = F17H_M31H_CFACTOR_ISOC; +@@ -533,6 +544,14 @@ + data->svi_addr[1] = F17H_M31H_SVI_TEL_PLANE1; + k10temp_get_ccd_support(pdev, data, 8); + break; ++ case 0x71: /* ZEN2 Ryzen Desktop */ ++ data->show_current = true; ++ data->cfactor[0] = F17H_M31H_CFACTOR_ICORE; ++ data->cfactor[1] = F17H_M31H_CFACTOR_ISOC; ++ data->svi_addr[0] = F17H_M71H_SVI_TEL_PLANE0; ++ data->svi_addr[1] = F17H_M71H_SVI_TEL_PLANE1; ++ k10temp_get_ccd_support(pdev, data, 4); ++ break; + } + } else if (boot_cpu_data.x86 == 0x19) { + data->temp_adjust_mask = ZEN_CUR_TEMP_RANGE_SEL_MASK; +@@ -541,14 +560,23 @@ + data->is_zen = true; + + switch (boot_cpu_data.x86_model) { +- case 0x0 ... 0x1: /* Zen3 */ ++ case 0x0 ... 0x1: /* Zen3 SP3/TR */ + data->show_current = true; +- data->svi_addr[0] = F19H_M01_SVI_TEL_PLANE0; +- data->svi_addr[1] = F19H_M01_SVI_TEL_PLANE1; ++ data->svi_addr[0] = F19H_M01H_SVI_TEL_PLANE0; ++ data->svi_addr[1] = F19H_M01H_SVI_TEL_PLANE1; + data->cfactor[0] = F19H_M01H_CFACTOR_ICORE; + data->cfactor[1] = F19H_M01H_CFACTOR_ISOC; + k10temp_get_ccd_support(pdev, data, 8); + break; ++ case 0x21: /* ZEN3 Ryzen Desktop */ ++ data->show_current = true; ++ data->svi_addr[0] = F19H_M21H_SVI_TEL_PLANE0; ++ data->svi_addr[1] = F19H_M21H_SVI_TEL_PLANE1; ++ data->cfactor[0] = F19H_M01H_CFACTOR_ICORE; ++ data->cfactor[1] = F19H_M01H_CFACTOR_ISOC; ++ k10temp_get_ccd_support(pdev, data, 2); ++ break; ++ + } + } else { + data->read_htcreg = read_htcreg_pci; diff --git a/sys-kernel/linux-image-redcore-lts/files/5.4-linux-hardened.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-linux-hardened.patch index 1d52bc84..1af30834 100644 --- a/sys-kernel/linux-image-redcore-lts/files/5.4-linux-hardened.patch +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-linux-hardened.patch @@ -1,8 +1,8 @@ diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt -index 5594c8bf1dcd..ac80978f4629 100644 +index f6a1513dfb76..282777d18d19 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt -@@ -505,16 +505,6 @@ +@@ -518,17 +518,6 @@ nosocket -- Disable socket memory accounting. nokmem -- Disable kernel memory accounting. @@ -14,12 +14,13 @@ index 5594c8bf1dcd..ac80978f4629 100644 - 1 -- check protection requested by application. - Default value is set via a kernel config option. - Value can be changed at runtime via -- /selinux/checkreqprot. +- /sys/fs/selinux/checkreqprot. +- Setting checkreqprot to 1 is deprecated. - cio_ignore= [S390] See Documentation/s390/common_io.rst for details. clk_ignore_unused -@@ -3345,6 +3335,11 @@ +@@ -3566,6 +3555,11 @@ the specified number of seconds. This is to be used if your oopses keep scrolling off the screen. @@ -32,48 +33,79 @@ index 5594c8bf1dcd..ac80978f4629 100644 pcd. [PARIDE] diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst -index 032c7cd3cede..cc3491b05976 100644 +index d4b32cc32bb7..3cd263f8ac46 100644 --- a/Documentation/admin-guide/sysctl/kernel.rst +++ b/Documentation/admin-guide/sysctl/kernel.rst -@@ -102,6 +102,7 @@ show up in /proc/sys/kernel: - - sysctl_writes_strict - - tainted ==> Documentation/admin-guide/tainted-kernels.rst - - threads-max -+- tiocsti_restrict - - unknown_nmi_panic - - watchdog - - watchdog_thresh -@@ -1114,6 +1115,25 @@ thread structures would occupy too much (more than 1/8th) of the - available RAM pages threads-max is reduced accordingly. +@@ -860,6 +860,8 @@ with respect to CAP_PERFMON use cases. + >=1 Disallow CPU event access by users without ``CAP_PERFMON``. + >=2 Disallow kernel profiling by users without ``CAP_PERFMON``. ++ ++>=3 Disallow use of any event by users without ``CAP_PERFMON``. + === ================================================================== + + +@@ -1383,6 +1385,26 @@ If a value outside of this range is written to ``threads-max`` an + ``EINVAL`` error occurs. -+tiocsti_restrict: -+================= + ++tiocsti_restrict ++================ + +This toggle indicates whether unprivileged users are prevented from using the -+TIOCSTI ioctl to inject commands into other processes which share a tty ++``TIOCSTI`` ioctl to inject commands into other processes which share a tty +session. + -+When tiocsti_restrict is set to (0) there are no restrictions(accept the -+default restriction of only being able to injection commands into one's own -+tty). When tiocsti_restrict is set to (1), users must have CAP_SYS_ADMIN to -+use the TIOCSTI ioctl. ++= ============================================================================ ++0 No restriction, except the default one of only being able to inject commands ++ into one's own tty. ++1 Users must have ``CAP_SYS_ADMIN`` to use the ``TIOCSTI`` ioctl. ++= ============================================================================ + -+When user namespaces are in use, the check for the capability CAP_SYS_ADMIN is -+done against the user namespace that originally opened the tty. ++When user namespaces are in use, the check for ``CAP_SYS_ADMIN`` is done ++against the user namespace that originally opened the tty. + -+The kernel config option CONFIG_SECURITY_TIOCSTI_RESTRICT sets the default -+value of tiocsti_restrict. ++The kernel config option ``CONFIG_SECURITY_TIOCSTI_RESTRICT`` sets the default ++value of ``tiocsti_restrict``. + + - unknown_nmi_panic: - ================== + traceoff_on_warning + =================== + +diff --git a/Documentation/networking/ip-sysctl.rst b/Documentation/networking/ip-sysctl.rst +index 25e6673a085a..76f1892d65ed 100644 +--- a/Documentation/networking/ip-sysctl.rst ++++ b/Documentation/networking/ip-sysctl.rst +@@ -665,6 +665,24 @@ tcp_comp_sack_nr - INTEGER + Default : 44 + ++tcp_simult_connect - BOOLEAN ++ Enable TCP simultaneous connect that adds a weakness in Linux's strict ++ implementation of TCP that allows two clients to connect to each other ++ without either entering a listening state. The weakness allows an attacker ++ to easily prevent a client from connecting to a known server provided the ++ source port for the connection is guessed correctly. ++ ++ As the weakness could be used to prevent an antivirus or IPS from fetching ++ updates, or prevent an SSL gateway from fetching a CRL, it should be ++ eliminated by disabling this option. Though Linux is one of few operating ++ systems supporting simultaneous connect, it has no legitimate use in ++ practice and is rarely supported by firewalls. ++ ++ Disabling this may break TCP STUNT which is used by some applications for ++ NAT traversal. ++ ++ Default: Value of CONFIG_TCP_SIMULT_CONNECT_DEFAULT_ON ++ + tcp_slow_start_after_idle - BOOLEAN + If set, provide RFC2861 behavior and time out the congestion + window after an idle period. An idle period is defined at diff --git a/arch/Kconfig b/arch/Kconfig -index 5f8a5d84dbbe..60103a76d33e 100644 +index ddd4641446bd..8e8f31cafe43 100644 --- a/arch/Kconfig +++ b/arch/Kconfig -@@ -653,7 +653,7 @@ config ARCH_MMAP_RND_BITS +@@ -752,7 +752,7 @@ config ARCH_MMAP_RND_BITS int "Number of bits to use for ASLR of mmap base address" if EXPERT range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT @@ -82,7 +114,7 @@ index 5f8a5d84dbbe..60103a76d33e 100644 depends on HAVE_ARCH_MMAP_RND_BITS help This value can be used to select the number of bits to use to -@@ -687,7 +687,7 @@ config ARCH_MMAP_RND_COMPAT_BITS +@@ -786,7 +786,7 @@ config ARCH_MMAP_RND_COMPAT_BITS int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT @@ -91,19 +123,11 @@ index 5f8a5d84dbbe..60103a76d33e 100644 depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS help This value can be used to select the number of bits to use to -@@ -906,6 +906,7 @@ config ARCH_HAS_REFCOUNT - - config REFCOUNT_FULL - bool "Perform full reference count validation at the expense of speed" -+ default y - help - Enabling this switches the refcounting infrastructure from a fast - unchecked atomic_t implementation to a fully state checked diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig -index 6ccd2ed30963..56d39ec3c2c3 100644 +index a6b5b7ef40ae..21088a6532d8 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig -@@ -1139,6 +1139,7 @@ config RODATA_FULL_DEFAULT_ENABLED +@@ -1199,6 +1199,7 @@ config RODATA_FULL_DEFAULT_ENABLED config ARM64_SW_TTBR0_PAN bool "Emulate Privileged Access Never using TTBR0_EL1 switching" @@ -111,7 +135,7 @@ index 6ccd2ed30963..56d39ec3c2c3 100644 help Enabling this option prevents the kernel from accessing user-space memory directly by pointing TTBR0_EL1 to a reserved -@@ -1538,6 +1539,7 @@ config RANDOMIZE_BASE +@@ -1789,6 +1790,7 @@ config RANDOMIZE_BASE bool "Randomize the address of the kernel image" select ARM64_MODULE_PLTS if MODULES select RELOCATABLE @@ -119,20 +143,8 @@ index 6ccd2ed30963..56d39ec3c2c3 100644 help Randomizes the virtual address at which the kernel image is loaded, as a security feature that deters exploit attempts -diff --git a/arch/arm64/Kconfig.debug b/arch/arm64/Kconfig.debug -index cf09010d825f..dc4083ceff57 100644 ---- a/arch/arm64/Kconfig.debug -+++ b/arch/arm64/Kconfig.debug -@@ -43,6 +43,7 @@ config ARM64_RANDOMIZE_TEXT_OFFSET - config DEBUG_WX - bool "Warn on W+X mappings at boot" - select ARM64_PTDUMP_CORE -+ default y - ---help--- - Generate a warning if any W+X mappings are found at boot. - diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig -index c9a867ac32d4..5c4d264f6a6e 100644 +index 5cfe3cf6f2ac..f25871361bdc 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -1,4 +1,3 @@ @@ -141,10 +153,10 @@ index c9a867ac32d4..5c4d264f6a6e 100644 CONFIG_AUDIT=y CONFIG_NO_HZ_IDLE=y diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h -index b618017205a3..0a228dbcad65 100644 +index 8d1c8dcb87fd..32c1609a1158 100644 --- a/arch/arm64/include/asm/elf.h +++ b/arch/arm64/include/asm/elf.h -@@ -103,14 +103,10 @@ +@@ -124,14 +124,10 @@ /* * This is the base location for PIE (ET_DYN with INTERP) loads. On @@ -161,7 +173,7 @@ index b618017205a3..0a228dbcad65 100644 #ifndef __ASSEMBLY__ -@@ -164,10 +160,10 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm, +@@ -189,10 +185,10 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm, /* 1GB of VA */ #ifdef CONFIG_COMPAT #define STACK_RND_MASK (test_thread_flag(TIF_32BIT) ? \ @@ -176,20 +188,20 @@ index b618017205a3..0a228dbcad65 100644 #ifdef __AARCH64EB__ diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index 8ef85139553f..e16076b30625 100644 +index fbf26e0f7a6a..ab11aeb0a807 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig -@@ -1219,8 +1219,7 @@ config VM86 - default X86_LEGACY_VM86 +@@ -1193,8 +1193,7 @@ config VM86 + default X86_LEGACY_VM86 config X86_16BIT - bool "Enable support for 16-bit segments" if EXPERT - default y + bool "Enable support for 16-bit segments" depends on MODIFY_LDT_SYSCALL - ---help--- + help This option is required by programs like Wine to run 16-bit -@@ -2365,7 +2364,7 @@ config COMPAT_VDSO +@@ -2296,7 +2295,7 @@ config COMPAT_VDSO choice prompt "vsyscall table for legacy applications" depends on X86_64 @@ -198,43 +210,31 @@ index 8ef85139553f..e16076b30625 100644 help Legacy user code that does not know how to find the vDSO expects to be able to issue three syscalls by calling fixed addresses in -@@ -2461,8 +2460,7 @@ config CMDLINE_OVERRIDE +@@ -2392,8 +2391,7 @@ config CMDLINE_OVERRIDE be set to 'N' under normal conditions. config MODIFY_LDT_SYSCALL - bool "Enable the LDT (local descriptor table)" if EXPERT - default y + bool "Enable the LDT (local descriptor table)" - ---help--- + help Linux can allow user programs to install a per-process x86 Local Descriptor Table (LDT) using the modify_ldt(2) system -diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug -index bf9cd83de777..13ef90f3de52 100644 ---- a/arch/x86/Kconfig.debug -+++ b/arch/x86/Kconfig.debug -@@ -91,6 +91,7 @@ config EFI_PGT_DUMP - config DEBUG_WX - bool "Warn on W+X mappings at boot" - select X86_PTDUMP_CORE -+ default y - ---help--- - Generate a warning if any W+X mappings are found at boot. - diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig -index d0a5ffeae8df..2a91d4a9f640 100644 +index 9936528e1939..981ee8c0e330 100644 --- a/arch/x86/configs/x86_64_defconfig +++ b/arch/x86/configs/x86_64_defconfig @@ -1,5 +1,4 @@ # CONFIG_LOCALVERSION_AUTO is not set -CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y - CONFIG_BSD_PROCESS_ACCT=y - CONFIG_TASKSTATS=y + CONFIG_AUDIT=y + CONFIG_NO_HZ=y diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c -index f5937742b290..6655ce228e25 100644 +index 9185cb1d13b9..543912071557 100644 --- a/arch/x86/entry/vdso/vma.c +++ b/arch/x86/entry/vdso/vma.c -@@ -198,55 +198,9 @@ static int map_vdso(const struct vdso_image *image, unsigned long addr) +@@ -315,55 +315,9 @@ static int map_vdso(const struct vdso_image *image, unsigned long addr) } #ifdef CONFIG_X86_64 @@ -292,10 +292,10 @@ index f5937742b290..6655ce228e25 100644 #endif diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h -index 69c0f892e310..f9f7a85bb71e 100644 +index b9a5d488f1a5..608cca19cf8c 100644 --- a/arch/x86/include/asm/elf.h +++ b/arch/x86/include/asm/elf.h -@@ -248,11 +248,11 @@ extern int force_personality32; +@@ -246,11 +246,11 @@ extern int force_personality32; /* * This is the base location for PIE (ET_DYN with INTERP) loads. On @@ -309,7 +309,7 @@ index 69c0f892e310..f9f7a85bb71e 100644 /* This yields a mask that user programs can use to figure out what instruction set this CPU supports. This could be done in user space, -@@ -312,8 +312,8 @@ extern bool mmap_address_hint_valid(unsigned long addr, unsigned long len); +@@ -330,8 +330,8 @@ extern bool mmap_address_hint_valid(unsigned long addr, unsigned long len); #ifdef CONFIG_X86_32 @@ -320,7 +320,7 @@ index 69c0f892e310..f9f7a85bb71e 100644 #define ARCH_DLINFO ARCH_DLINFO_IA32 -@@ -322,7 +322,11 @@ extern bool mmap_address_hint_valid(unsigned long addr, unsigned long len); +@@ -340,7 +340,11 @@ extern bool mmap_address_hint_valid(unsigned long addr, unsigned long len); #else /* CONFIG_X86_32 */ /* 1GB for 64bit, 8MB for 32bit */ @@ -333,74 +333,46 @@ index 69c0f892e310..f9f7a85bb71e 100644 #define STACK_RND_MASK __STACK_RND_MASK(mmap_is_ia32()) #define ARCH_DLINFO \ -@@ -380,5 +384,4 @@ struct va_alignment { +@@ -398,5 +402,4 @@ struct va_alignment { } ____cacheline_aligned; extern struct va_alignment va_align; -extern unsigned long align_vdso_addr(unsigned long); #endif /* _ASM_X86_ELF_H */ -diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h -index 6f66d841262d..b786e7cb395d 100644 ---- a/arch/x86/include/asm/tlbflush.h -+++ b/arch/x86/include/asm/tlbflush.h -@@ -295,6 +295,7 @@ static inline void cr4_set_bits_irqsoff(unsigned long mask) - unsigned long cr4; - - cr4 = this_cpu_read(cpu_tlbstate.cr4); -+ BUG_ON(cr4 != __read_cr4()); - if ((cr4 | mask) != cr4) - __cr4_set(cr4 | mask); - } -@@ -305,6 +306,7 @@ static inline void cr4_clear_bits_irqsoff(unsigned long mask) - unsigned long cr4; - - cr4 = this_cpu_read(cpu_tlbstate.cr4); -+ BUG_ON(cr4 != __read_cr4()); - if ((cr4 & ~mask) != cr4) - __cr4_set(cr4 & ~mask); - } -@@ -334,6 +336,7 @@ static inline void cr4_toggle_bits_irqsoff(unsigned long mask) - unsigned long cr4; - - cr4 = this_cpu_read(cpu_tlbstate.cr4); -+ BUG_ON(cr4 != __read_cr4()); - __cr4_set(cr4 ^ mask); - } - -@@ -440,6 +443,7 @@ static inline void __native_flush_tlb_global(void) - raw_local_irq_save(flags); - - cr4 = this_cpu_read(cpu_tlbstate.cr4); -+ BUG_ON(cr4 != __read_cr4()); - /* toggle PGE */ - native_write_cr4(cr4 ^ X86_CR4_PGE); - /* write old PGE again and flush TLBs */ diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c -index fffe21945374..e9e124eb6ccb 100644 +index 35ad8480c464..edaeeab9df4b 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c -@@ -1854,7 +1854,6 @@ void cpu_init(void) - wrmsrl(MSR_KERNEL_GS_BASE, 0); - barrier(); +@@ -399,6 +399,7 @@ EXPORT_SYMBOL_GPL(native_write_cr4); + void cr4_update_irqsoff(unsigned long set, unsigned long clear) + { + unsigned long newval, cr4 = this_cpu_read(cpu_tlbstate.cr4); ++ BUG_ON(cr4 != __read_cr4()); -- x86_configure_nx(); - x2apic_setup(); + lockdep_assert_irqs_disabled(); - /* diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c -index 5e94c4354d4e..093bd8ad1130 100644 +index 145a7ac0c19a..161e25d02fd5 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c -@@ -42,6 +42,8 @@ - #include <asm/prctl.h> - #include <asm/spec-ctrl.h> +@@ -43,6 +43,8 @@ + #include <asm/io_bitmap.h> #include <asm/proto.h> + #include <asm/frame.h> +#include <asm/elf.h> +#include <linux/sizes.h> #include "process.h" -@@ -798,7 +800,10 @@ unsigned long arch_align_stack(unsigned long sp) +@@ -596,6 +598,7 @@ void speculation_ctrl_update_current(void) + static inline void cr4_toggle_bits_irqsoff(unsigned long mask) + { + unsigned long newval, cr4 = this_cpu_read(cpu_tlbstate.cr4); ++ BUG_ON(cr4 != __read_cr4()); + + newval = cr4 ^ mask; + if (newval != cr4) { +@@ -905,7 +908,10 @@ unsigned long arch_align_stack(unsigned long sp) unsigned long arch_randomize_brk(struct mm_struct *mm) { @@ -413,10 +385,10 @@ index 5e94c4354d4e..093bd8ad1130 100644 /* diff --git a/arch/x86/kernel/sys_x86_64.c b/arch/x86/kernel/sys_x86_64.c -index f7476ce23b6e..652169a2b23a 100644 +index 504fa5425bce..e30ec4c750d1 100644 --- a/arch/x86/kernel/sys_x86_64.c +++ b/arch/x86/kernel/sys_x86_64.c -@@ -54,13 +54,6 @@ static unsigned long get_align_bits(void) +@@ -52,13 +52,6 @@ static unsigned long get_align_bits(void) return va_align.bits & get_align_mask(); } @@ -430,7 +402,7 @@ index f7476ce23b6e..652169a2b23a 100644 static int __init control_va_addr_alignment(char *str) { /* guard against enabling this on other CPU families */ -@@ -122,10 +115,7 @@ static void find_start_end(unsigned long addr, unsigned long flags, +@@ -120,10 +113,7 @@ static void find_start_end(unsigned long addr, unsigned long flags, } *begin = get_mmap_base(1); @@ -442,7 +414,7 @@ index f7476ce23b6e..652169a2b23a 100644 } unsigned long -@@ -210,7 +200,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, +@@ -200,7 +190,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, info.flags = VM_UNMAPPED_AREA_TOPDOWN; info.length = len; @@ -452,10 +424,10 @@ index f7476ce23b6e..652169a2b23a 100644 /* diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c -index 0a74407ef92e..5ceff405c81c 100644 +index 7c055259de3a..291b7b4476a9 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c -@@ -560,9 +560,9 @@ static void __init pagetable_init(void) +@@ -546,9 +546,9 @@ static void __init pagetable_init(void) #define DEFAULT_PTE_MASK ~(_PAGE_NX | _PAGE_GLOBAL) /* Bits supported by the hardware: */ @@ -468,7 +440,7 @@ index 0a74407ef92e..5ceff405c81c 100644 /* Used in PAGE_KERNEL_* macros which are reasonably used out-of-tree: */ EXPORT_SYMBOL(__default_kernel_pte_mask); diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c -index b8541d77452c..a231504e0348 100644 +index b5a3fa4033d3..c3d771ffc178 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -97,9 +97,9 @@ DEFINE_ENTRY(pte, pte, init) @@ -483,11 +455,23 @@ index b8541d77452c..a231504e0348 100644 EXPORT_SYMBOL_GPL(__supported_pte_mask); /* Used in PAGE_KERNEL_* macros which are reasonably used out-of-tree: */ EXPORT_SYMBOL(__default_kernel_pte_mask); -diff --git a/block/blk-softirq.c b/block/blk-softirq.c -index 457d9ba3eb20..5f987fc1c0a0 100644 ---- a/block/blk-softirq.c -+++ b/block/blk-softirq.c -@@ -20,7 +20,7 @@ static DEFINE_PER_CPU(struct list_head, blk_cpu_done); +diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c +index 569ac1d57f55..044d88da4aee 100644 +--- a/arch/x86/mm/tlb.c ++++ b/arch/x86/mm/tlb.c +@@ -1066,6 +1066,7 @@ STATIC_NOPV void native_flush_tlb_global(void) + raw_local_irq_save(flags); + + cr4 = this_cpu_read(cpu_tlbstate.cr4); ++ BUG_ON(cr4 != __read_cr4()); + /* toggle PGE */ + native_write_cr4(cr4 ^ X86_CR4_PGE); + /* write old PGE again and flush TLBs */ +diff --git a/block/blk-mq.c b/block/blk-mq.c +index 55bcee5dc032..507336218518 100644 +--- a/block/blk-mq.c ++++ b/block/blk-mq.c +@@ -569,7 +569,7 @@ EXPORT_SYMBOL(blk_mq_end_request); * Softirq action handler - move entries to local list and loop over them * while passing them to the queue registered handler. */ @@ -497,10 +481,10 @@ index 457d9ba3eb20..5f987fc1c0a0 100644 struct list_head *cpu_list, local_list; diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c -index 84b183a6424e..b83bff5e9ab5 100644 +index 61c762961ca8..02a83039c25b 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c -@@ -5143,7 +5143,7 @@ void ata_qc_free(struct ata_queued_cmd *qc) +@@ -4540,7 +4540,7 @@ void ata_qc_free(struct ata_queued_cmd *qc) struct ata_port *ap; unsigned int tag; @@ -509,7 +493,7 @@ index 84b183a6424e..b83bff5e9ab5 100644 ap = qc->ap; qc->flags = 0; -@@ -5160,7 +5160,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc) +@@ -4557,7 +4557,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc) struct ata_port *ap; struct ata_link *link; @@ -519,10 +503,10 @@ index 84b183a6424e..b83bff5e9ab5 100644 ap = qc->ap; link = qc->dev->link; diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig -index df0fc997dc3e..bd8eed8de6c1 100644 +index d229a2d0c017..2fd45f01e7a2 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig -@@ -9,7 +9,6 @@ source "drivers/tty/Kconfig" +@@ -327,7 +327,6 @@ config NSC_GPIO config DEVMEM bool "/dev/mem virtual device support" @@ -530,7 +514,7 @@ index df0fc997dc3e..bd8eed8de6c1 100644 help Say Y here if you want to support the /dev/mem device. The /dev/mem device is used to access areas of physical -@@ -514,7 +513,6 @@ config TELCLOCK +@@ -391,7 +390,6 @@ config MAX_RAW_DEVS config DEVPORT bool "/dev/port character device" depends on ISA || PCI @@ -538,310 +522,8 @@ index df0fc997dc3e..bd8eed8de6c1 100644 help Say Y here if you want to support the /dev/port device. The /dev/port device is similar to /dev/mem, but for I/O ports. -diff --git a/drivers/char/random.c b/drivers/char/random.c -index 01b8868b9bed..13b8635519fe 100644 ---- a/drivers/char/random.c -+++ b/drivers/char/random.c -@@ -350,11 +350,20 @@ - /* - * Configuration information - */ -+#ifdef CONFIG_HARDENED_RANDOM -+#define INPUT_POOL_SHIFT 18 -+#define OUTPUT_POOL_SHIFT 16 -+#else - #define INPUT_POOL_SHIFT 12 --#define INPUT_POOL_WORDS (1 << (INPUT_POOL_SHIFT-5)) - #define OUTPUT_POOL_SHIFT 10 -+#endif -+#define INPUT_POOL_WORDS (1 << (INPUT_POOL_SHIFT-5)) - #define OUTPUT_POOL_WORDS (1 << (OUTPUT_POOL_SHIFT-5)) -+#ifdef CONFIG_HARDENED_RANDOM -+#define SEC_XFER_SIZE 32768 -+#else - #define SEC_XFER_SIZE 512 -+#endif - #define EXTRACT_SIZE 10 - - -@@ -363,9 +372,6 @@ - /* - * To allow fractional bits to be tracked, the entropy_count field is - * denominated in units of 1/8th bits. -- * -- * 2*(ENTROPY_SHIFT + poolbitshift) must <= 31, or the multiply in -- * credit_entropy_bits() needs to be 64 bits wide. - */ - #define ENTROPY_SHIFT 3 - #define ENTROPY_BITS(r) ((r)->entropy_count >> ENTROPY_SHIFT) -@@ -428,17 +434,28 @@ static int random_write_wakeup_bits = 28 * OUTPUT_POOL_WORDS; - * polynomial which improves the resulting TGFSR polynomial to be - * irreducible, which we have made here. - */ --static const struct poolinfo { -+static struct poolinfo { - int poolbitshift, poolwords, poolbytes, poolfracbits; --#define S(x) ilog2(x)+5, (x), (x)*4, (x) << (ENTROPY_SHIFT+5) -- int tap1, tap2, tap3, tap4, tap5; --} poolinfo_table[] = { -+#define S(x) \ -+ .poolbitshift = ilog2(x)+5, \ -+ .poolwords = (x), \ -+ .poolbytes = (x)*4, \ -+ .poolfracbits = (x) << (ENTROPY_SHIFT+5) -+ int tap[5]; -+} __randomize_layout poolinfo_table[] = { -+#ifdef CONFIG_HARDENED_RANDOM -+ /* x^8192 + x^104 + x^76 + x^51 +x^25 + x + 1 */ -+ { S(8192), .tap = { 104, 76, 51, 25, 1 } }, -+ /* x^2048 + x^26 + x^19 + x^14 + x^7 + x + 1 */ -+ { S(2048), .tap = { 26, 19, 14, 7, 1 } } -+#else - /* was: x^128 + x^103 + x^76 + x^51 +x^25 + x + 1 */ - /* x^128 + x^104 + x^76 + x^51 +x^25 + x + 1 */ -- { S(128), 104, 76, 51, 25, 1 }, -+ { S(128), .tap = { 104, 76, 51, 25, 1 } }, - /* was: x^32 + x^26 + x^20 + x^14 + x^7 + x + 1 */ - /* x^32 + x^26 + x^19 + x^14 + x^7 + x + 1 */ -- { S(32), 26, 19, 14, 7, 1 }, -+ { S(32), .tap = { 26, 19, 14, 7, 1 } }, -+#endif - #if 0 - /* x^2048 + x^1638 + x^1231 + x^819 + x^411 + x + 1 -- 115 */ - { S(2048), 1638, 1231, 819, 411, 1 }, -@@ -482,7 +499,7 @@ struct crng_state { - __u32 state[16]; - unsigned long init_time; - spinlock_t lock; --}; -+} __randomize_layout; - - static struct crng_state primary_crng = { - .lock = __SPIN_LOCK_UNLOCKED(primary_crng.lock), -@@ -542,7 +559,7 @@ struct entropy_store { - unsigned int initialized:1; - unsigned int last_data_init:1; - __u8 last_data[EXTRACT_SIZE]; --}; -+} __randomize_layout; - - static ssize_t extract_entropy(struct entropy_store *r, void *buf, - size_t nbytes, int min, int rsvd); -@@ -553,6 +570,8 @@ static void crng_reseed(struct crng_state *crng, struct entropy_store *r); - static void push_to_pool(struct work_struct *work); - static __u32 input_pool_data[INPUT_POOL_WORDS] __latent_entropy; - static __u32 blocking_pool_data[OUTPUT_POOL_WORDS] __latent_entropy; -+/* this actually doesn't need latent entropy */ -+static __u32 secondary_xfer_buffer[OUTPUT_POOL_WORDS]; - - static struct entropy_store input_pool = { - .poolinfo = &poolinfo_table[0], -@@ -571,9 +590,78 @@ static struct entropy_store blocking_pool = { - push_to_pool), - }; - -+#ifdef CONFIG_HARDENED_RANDOM -+static __u32 const twist_table[64][4] = { -+ { 0x6a09e668, 0xbb67ae86, 0x3c6ef373, 0xa54ff53a }, -+ { 0x510e5280, 0x9b05688c, 0x1f83d9ac, 0x5be0cd19 }, -+ { 0xcbbb9d5e, 0x629a292a, 0x9159015a, 0x152fecd9 }, -+ { 0x67332668, 0x8eb44a87, 0xdb0c2e0d, 0x47b5481e }, -+ { 0xae5f9157, 0xcf6c85d4, 0x2f73477d, 0x6d1826cb }, -+ { 0x8b43d457, 0xe360b597, 0x1c456003, 0x6f196331 }, -+ { 0xd94ebeb2, 0x0cc4a612, 0x261dc1f3, 0x5815a7be }, -+ { 0x70b7ed68, 0xa1513c69, 0x44f93636, 0x720dcdfe }, -+ { 0xb467369e, 0xca320b76, 0x34e0d42e, 0x49c7d9be }, -+ { 0x87abb9f2, 0xc463a2fc, 0xec3fc3f4, 0x27277f6d }, -+ { 0x610bebf3, 0x7420b49f, 0xd1fd8a34, 0xe4773594 }, -+ { 0x092197f6, 0x1b530c96, 0x869d6343, 0xeee52e50 }, -+ { 0x1107668a, 0x21fba37c, 0x43ab9fb6, 0x75a9f91d }, -+ { 0x8630501a, 0xd7cd8174, 0x007fe010, 0x0379f514 }, -+ { 0x066b651b, 0x0764ab84, 0x0a4b06be, 0x0c3578c1 }, -+ { 0x0d2962a5, 0x11e039f4, 0x1857b7bf, 0x1a29bf2e }, -+ { 0x1b11a32f, 0x1cdf34e8, 0x23183042, 0x25b89093 }, -+ { 0x2a0c06a1, 0x2ae79843, 0x2c9cda69, 0x2f281f24 }, -+ { 0x32841259, 0x3502e64e, 0x377c9c21, 0x39204cda }, -+ { 0x3b91bf66, 0x3ecc38ca, 0x40665609, 0x43947938 }, -+ { 0x47830769, 0x484ae4b8, 0x4c2b2b75, 0x4cf03d21 }, -+ { 0x4f3cbb11, 0x50c2d3b5, 0x5308af16, 0x560a7a9a }, -+ { 0x5788d981, 0x584769b4, 0x59c34f06, 0x5e2d564c }, -+ { 0x6116d760, 0x62894c10, 0x6569b58c, 0x66d7b394 }, -+ { 0x68f9f8dc, 0x6d34f03d, 0x6de8372f, 0x742687a4 }, -+ { 0x76356021, 0x799d1235, 0x7ba455f4, 0x7da8d73b }, -+ { 0x7e546743, 0x80554bdc, 0x83a63a3c, 0x85a01e39 }, -+ { 0x879774ac, 0x883eac9f, 0x8a32aae0, 0x8c243210 }, -+ { 0x8d6e8781, 0x8e134b6f, 0x91ea5892, 0x95166fe4 }, -+ { 0x95b817e6, 0x96faa747, 0x98dca135, 0x9abc6593 }, -+ { 0x9b5bd55a, 0x9f136df7, 0xa04ebd79, 0xa225f6ed }, -+ { 0xa4970e49, 0xa79f5a6b, 0xaa0869af, 0xad06dcbd }, -+ { 0xaf68312e, 0xb12efe0b, 0xb2f3ef5b, 0xb420e03a }, -+ { 0xb6785656, 0xb837d738, 0xb9613115, 0xbbb18efb }, -+ { 0xbcd89621, 0xc0db3814, 0xc3b2f2a3, 0xc71638d9 }, -+ { 0xc7a6240f, 0xca73166e, 0xcb01f3ba, 0xcc1f293d }, -+ { 0xccad81c8, 0xcf72acaf, 0xd34c7258, 0xd4649b7a }, -+ { 0xd4f07147, 0xd607a013, 0xd9d3b47b, 0xdae803b5 }, -+ { 0xdb71ef1a, 0xdc854e24, 0xe1dcf0ea, 0xe2eca719 }, -+ { 0xe50a4ad8, 0xe7ac0990, 0xe9c46d3a, 0xeacfc33c }, -+ { 0xec5fb417, 0xedee611c, 0xf18bc533, 0xf292ef77 }, -+ { 0xf41cab36, 0xf5a531ec, 0xf7aeb45d, 0xf93474e9 }, -+ { 0xfc3c7559, 0xfd3e1962, 0xfebf9bc1, 0xff3fdbf2 }, -+ { 0x01bf3cab, 0x023ebd6b, 0x03bc8288, 0x06365a0f }, -+ { 0x06b4c1d2, 0x092afcc1, 0x09a8ad2c, 0x0b21093c }, -+ { 0x0f83d25e, 0x107c1074, 0x10f803d0, 0x11ef938d }, -+ { 0x136212e8, 0x14d390a4, 0x16beab25, 0x182dd7d5 }, -+ { 0x199c09bf, 0x1ed27f46, 0x1f4b2d3e, 0x21a502bc }, -+ { 0x23849e06, 0x25d9d3da, 0x273ef0ca, 0x28a326f6 }, -+ { 0x2a7cb5e4, 0x2d4019ba, 0x2e2b1e73, 0x2f8aec73 }, -+ { 0x30e9ddcc, 0x315ea828, 0x32bc75cf, 0x357587f0 }, -+ { 0x37b7de93, 0x3bc31ec6, 0x3c35b24a, 0x3d1a949b }, -+ { 0x3e713d15, 0x3ee347da, 0x4038e0bf, 0x411c2bae }, -+ { 0x418daf9a, 0x4270749e, 0x4516b0b0, 0x45876dcb }, -+ { 0x46d92246, 0x4e448a56, 0x4f9141c0, 0x50dd3e71 }, -+ { 0x5296c45b, 0x56738aac, 0x58961d02, 0x5b9010c1 }, -+ { 0x5c6913ae, 0x5cd577f2, 0x5dae0649, 0x5ef24aeb }, -+ { 0x60a199af, 0x6178ce9b, 0x61e44c97, 0x6326551c }, -+ { 0x65a86b29, 0x67bd7e12, 0x6827e41c, 0x68fc7925 }, -+ { 0x6966a836, 0x6a3acfa3, 0x6b78828a, 0x6df2017d }, -+ { 0x7068fdbb, 0x720c4495, 0x747f226b, 0x75b7a753 }, -+ { 0x7687a9e0, 0x77bf2d48, 0x795d98d4, 0x7a2c690b }, -+ { 0x7bc93fa8, 0x7c974690, 0x7f6653f3, 0x80333127 }, -+ { 0x81660244, 0x81cc2760, 0x829840e3, 0x83c9edd4 } -+}; -+#else - static __u32 const twist_table[8] = { - 0x00000000, 0x3b6e20c8, 0x76dc4190, 0x4db26158, - 0xedb88320, 0xd6d6a3e8, 0x9b64c2b0, 0xa00ae278 }; -+#endif - - /* - * This function adds bytes into the entropy "pool". It does not -@@ -588,17 +676,14 @@ static __u32 const twist_table[8] = { - static void _mix_pool_bytes(struct entropy_store *r, const void *in, - int nbytes) - { -- unsigned long i, tap1, tap2, tap3, tap4, tap5; -+ unsigned long i, n, t1, t2, tap[5]; - int input_rotate; - int wordmask = r->poolinfo->poolwords - 1; - const char *bytes = in; - __u32 w; - -- tap1 = r->poolinfo->tap1; -- tap2 = r->poolinfo->tap2; -- tap3 = r->poolinfo->tap3; -- tap4 = r->poolinfo->tap4; -- tap5 = r->poolinfo->tap5; -+ for (n = 0; n < 5; n++) -+ tap[n] = r->poolinfo->tap[n]; - - input_rotate = r->input_rotate; - i = r->add_ptr; -@@ -610,14 +695,17 @@ static void _mix_pool_bytes(struct entropy_store *r, const void *in, - - /* XOR in the various taps */ - w ^= r->pool[i]; -- w ^= r->pool[(i + tap1) & wordmask]; -- w ^= r->pool[(i + tap2) & wordmask]; -- w ^= r->pool[(i + tap3) & wordmask]; -- w ^= r->pool[(i + tap4) & wordmask]; -- w ^= r->pool[(i + tap5) & wordmask]; -+ for (n = 0; n < 5; n++) -+ w ^= r->pool[(i + tap[n]) & wordmask]; - - /* Mix the result back in with a twist */ -+#ifdef CONFIG_HARDENED_RANDOM -+ t1 = rol32(w, 14) & 0x1FFF; // 0-63, 1111111111111 -+ t2 = rol32(w, t1) & 0x3; // 0-3, 11 -+ r->pool[i] = (w >> 3) ^ twist_table[t1][t2]; -+#else - r->pool[i] = (w >> 3) ^ twist_table[w & 7]; -+#endif - - /* - * Normally, we add 7 bits of rotation to the pool. -@@ -655,7 +743,7 @@ struct fast_pool { - unsigned long last; - unsigned short reg_idx; - unsigned char count; --}; -+} __randomize_layout; - - /* - * This is a fast mixing routine used by the interrupt randomness -@@ -750,7 +838,7 @@ static void credit_entropy_bits(struct entropy_store *r, int nbits) - /* The +2 corresponds to the /4 in the denominator */ - - do { -- unsigned int anfrac = min(pnfrac, pool_size/2); -+ __u64 anfrac = min(pnfrac, pool_size/2); - unsigned int add = - ((pool_size - entropy_count)*anfrac*3) >> s; - -@@ -1134,7 +1222,7 @@ static ssize_t extract_crng_user(void __user *buf, size_t nbytes) - - extract_crng(tmp); - i = min_t(int, nbytes, CHACHA_BLOCK_SIZE); -- if (copy_to_user(buf, tmp, i)) { -+ if (i > sizeof(tmp) || copy_to_user(buf, tmp, i)) { - ret = -EFAULT; - break; - } -@@ -1162,9 +1250,9 @@ static ssize_t extract_crng_user(void __user *buf, size_t nbytes) - struct timer_rand_state { - cycles_t last_time; - long last_delta, last_delta2; --}; -+} __randomize_layout; - --#define INIT_TIMER_RAND_STATE { INITIAL_JIFFIES, }; -+#define INIT_TIMER_RAND_STATE { .last_time = INITIAL_JIFFIES }; - - /* - * Add device- or boot-specific data to the input pool to help -@@ -1407,20 +1495,18 @@ static void xfer_secondary_pool(struct entropy_store *r, size_t nbytes) - - static void _xfer_secondary_pool(struct entropy_store *r, size_t nbytes) - { -- __u32 tmp[OUTPUT_POOL_WORDS]; -- - int bytes = nbytes; - - /* pull at least as much as a wakeup */ - bytes = max_t(int, bytes, random_read_wakeup_bits / 8); - /* but never more than the buffer size */ -- bytes = min_t(int, bytes, sizeof(tmp)); -+ bytes = min_t(int, bytes, sizeof(secondary_xfer_buffer)); - - trace_xfer_secondary_pool(r->name, bytes * 8, nbytes * 8, - ENTROPY_BITS(r), ENTROPY_BITS(r->pull)); -- bytes = extract_entropy(r->pull, tmp, bytes, -+ bytes = extract_entropy(r->pull, secondary_xfer_buffer, bytes, - random_read_wakeup_bits / 8, 0); -- mix_pool_bytes(r, tmp, bytes); -+ mix_pool_bytes(r, secondary_xfer_buffer, bytes); - credit_entropy_bits(r, bytes*8); - } - -@@ -1650,7 +1736,7 @@ static ssize_t extract_entropy_user(struct entropy_store *r, void __user *buf, - - extract_buf(r, tmp); - i = min_t(int, nbytes, EXTRACT_SIZE); -- if (copy_to_user(buf, tmp, i)) { -+ if (i > sizeof(tmp) || copy_to_user(buf, tmp, i)) { - ret = -EFAULT; - break; - } -@@ -2353,7 +2439,7 @@ struct batched_entropy { - }; - unsigned int position; - spinlock_t batch_lock; --}; -+} __randomize_layout; - - /* - * Get a random word for internal kernel use only. The quality of the random diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig -index c7623f99ac0f..859c2782c8e2 100644 +index 93fd984eb2f5..d9086484d2de 100644 --- a/drivers/tty/Kconfig +++ b/drivers/tty/Kconfig @@ -122,7 +122,6 @@ config UNIX98_PTYS @@ -849,14 +531,14 @@ index c7623f99ac0f..859c2782c8e2 100644 config LEGACY_PTYS bool "Legacy (BSD) PTY support" - default y - ---help--- + help A pseudo terminal (PTY) is a software device consisting of two halves: a master and a slave. The slave device behaves identical to diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c -index 802c1210558f..0cc320f33cdc 100644 +index 56ade99ef99f..5670bd7442df 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c -@@ -173,6 +173,7 @@ static void free_tty_struct(struct tty_struct *tty) +@@ -174,6 +174,7 @@ static void free_tty_struct(struct tty_struct *tty) put_device(tty->dev); kfree(tty->write_buf); tty->magic = 0xDEADDEAD; @@ -864,7 +546,7 @@ index 802c1210558f..0cc320f33cdc 100644 kfree(tty); } -@@ -2180,11 +2181,19 @@ static int tty_fasync(int fd, struct file *filp, int on) +@@ -2181,11 +2182,19 @@ static int tty_fasync(int fd, struct file *filp, int on) * FIXME: may race normal receive processing */ @@ -884,7 +566,7 @@ index 802c1210558f..0cc320f33cdc 100644 if ((current->signal->tty != tty) && !capable(CAP_SYS_ADMIN)) return -EPERM; if (get_user(ch, p)) -@@ -3004,6 +3013,7 @@ struct tty_struct *alloc_tty_struct(struct tty_driver *driver, int idx) +@@ -3014,6 +3023,7 @@ struct tty_struct *alloc_tty_struct(struct tty_driver *driver, int idx) tty->index = idx; tty_line_name(driver, idx, tty->name); tty->dev = tty_get_device(tty); @@ -892,20 +574,23 @@ index 802c1210558f..0cc320f33cdc 100644 return tty; } +diff --git a/drivers/usb/core/Makefile b/drivers/usb/core/Makefile +index 18e874b0441e..fc7a3a9aa72a 100644 +--- a/drivers/usb/core/Makefile ++++ b/drivers/usb/core/Makefile +@@ -11,6 +11,7 @@ usbcore-y += phy.o port.o + usbcore-$(CONFIG_OF) += of.o + usbcore-$(CONFIG_USB_PCI) += hcd-pci.o + usbcore-$(CONFIG_ACPI) += usb-acpi.o ++usbcore-$(CONFIG_SYSCTL) += sysctl.o + + obj-$(CONFIG_USB) += usbcore.o + diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c -index 4ac74b354801..7c2cb5b3a449 100644 +index 17202b2ee063..b62b3da81ac4 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -42,6 +42,8 @@ - #define USB_TP_TRANSMISSION_DELAY 40 /* ns */ - #define USB_TP_TRANSMISSION_DELAY_MAX 65535 /* ns */ - -+extern int deny_new_usb; -+ - /* Protect struct usb_device->state and ->children members - * Note: Both are also protected by ->dev.sem, except that ->state can - * change to USB_STATE_NOTATTACHED even when the semaphore isn't held. */ -@@ -4991,6 +4993,12 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus, +@@ -5114,6 +5114,12 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus, goto done; return; } @@ -918,70 +603,138 @@ index 4ac74b354801..7c2cb5b3a449 100644 if (hub_is_superspeed(hub->hdev)) unit_load = 150; else -diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c -index 7b975dbb2bb4..43fdb33a1fc0 100644 ---- a/fs/debugfs/inode.c -+++ b/fs/debugfs/inode.c -@@ -36,6 +36,10 @@ static struct vfsmount *debugfs_mount; - static int debugfs_mount_count; - static bool debugfs_registered; - -+#ifdef CONFIG_HARDENED_SYSFS_RESTRICT -+extern int sysfs_restricted; -+#endif +diff --git a/drivers/usb/core/sysctl.c b/drivers/usb/core/sysctl.c +new file mode 100644 +index 000000000000..3fa188ac8f67 +--- /dev/null ++++ b/drivers/usb/core/sysctl.c +@@ -0,0 +1,44 @@ ++#include <linux/errno.h> ++#include <linux/init.h> ++#include <linux/kmemleak.h> ++#include <linux/sysctl.h> ++#include <linux/usb.h> ++ ++static struct ctl_table usb_table[] = { ++ { ++ .procname = "deny_new_usb", ++ .data = &deny_new_usb, ++ .maxlen = sizeof(int), ++ .mode = 0644, ++ .proc_handler = proc_dointvec_minmax_sysadmin, ++ .extra1 = SYSCTL_ZERO, ++ .extra2 = SYSCTL_ONE, ++ }, ++ { } ++}; + - /* - * Don't allow access attributes to be changed whilst the kernel is locked down - * so that we can use the file mode as part of a heuristic to determine whether -@@ -559,6 +563,11 @@ struct dentry *debugfs_create_dir(const char *name, struct dentry *parent) - return failed_creating(dentry); - } ++static struct ctl_table usb_root_table[] = { ++ { .procname = "kernel", ++ .mode = 0555, ++ .child = usb_table }, ++ { } ++}; ++ ++static struct ctl_table_header *usb_table_header; ++ ++int __init usb_init_sysctl(void) ++{ ++ usb_table_header = register_sysctl_table(usb_root_table); ++ if (!usb_table_header) { ++ pr_warn("usb: sysctl registration failed\n"); ++ return -ENOMEM; ++ } ++ ++ kmemleak_not_leak(usb_table_header); ++ return 0; ++} ++ ++void usb_exit_sysctl(void) ++{ ++ unregister_sysctl_table(usb_table_header); ++} +diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c +index 9b4ac4415f1a..93b4b798bdcc 100644 +--- a/drivers/usb/core/usb.c ++++ b/drivers/usb/core/usb.c +@@ -72,6 +72,9 @@ MODULE_PARM_DESC(autosuspend, "default autosuspend delay"); + #define usb_autosuspend_delay 0 + #endif -+#ifdef CONFIG_HARDENED_SYSFS_RESTRICT -+ if (sysfs_restricted) -+ inode->i_mode = S_IFDIR | S_IRWXU; -+ else -+#endif - inode->i_mode = S_IFDIR | S_IRWXU | S_IRUGO | S_IXUGO; - inode->i_op = &debugfs_dir_inode_operations; - inode->i_fop = &simple_dir_operations; ++int deny_new_usb __read_mostly = 0; ++EXPORT_SYMBOL(deny_new_usb); ++ + static bool match_endpoint(struct usb_endpoint_descriptor *epd, + struct usb_endpoint_descriptor **bulk_in, + struct usb_endpoint_descriptor **bulk_out, +@@ -978,6 +981,9 @@ static int __init usb_init(void) + usb_debugfs_init(); + + usb_acpi_register(); ++ retval = usb_init_sysctl(); ++ if (retval) ++ goto sysctl_init_failed; + retval = bus_register(&usb_bus_type); + if (retval) + goto bus_register_failed; +@@ -1012,6 +1018,8 @@ static int __init usb_init(void) + bus_notifier_failed: + bus_unregister(&usb_bus_type); + bus_register_failed: ++ usb_exit_sysctl(); ++sysctl_init_failed: + usb_acpi_unregister(); + usb_debugfs_cleanup(); + out: +@@ -1035,6 +1043,7 @@ static void __exit usb_exit(void) + usb_hub_cleanup(); + bus_unregister_notifier(&usb_bus_type, &usb_bus_nb); + bus_unregister(&usb_bus_type); ++ usb_exit_sysctl(); + usb_acpi_unregister(); + usb_debugfs_cleanup(); + idr_destroy(&usb_bus_idr); diff --git a/fs/exec.c b/fs/exec.c -index c27231234764..4038334db213 100644 +index 547a2390baf5..5f8758368f15 100644 --- a/fs/exec.c +++ b/fs/exec.c -@@ -63,6 +63,7 @@ - #include <linux/oom.h> +@@ -64,6 +64,7 @@ #include <linux/compat.h> #include <linux/vmalloc.h> + #include <linux/io_uring.h> +#include <linux/random.h> #include <linux/uaccess.h> #include <asm/mmu_context.h> -@@ -276,6 +277,8 @@ static int __bprm_mm_init(struct linux_binprm *bprm) - arch_bprm_mm_init(mm, vma); - up_write(&mm->mmap_sem); +@@ -280,6 +281,8 @@ static int __bprm_mm_init(struct linux_binprm *bprm) + mm->stack_vm = mm->total_vm = 1; + mmap_write_unlock(mm); bprm->p = vma->vm_end - sizeof(void *); + if (randomize_va_space) + bprm->p ^= get_random_int() & ~PAGE_MASK; return 0; err: - up_write(&mm->mmap_sem); -diff --git a/fs/namei.c b/fs/namei.c -index e81521c87f98..8c933ad857e0 100644 ---- a/fs/namei.c -+++ b/fs/namei.c -@@ -124,6 +124,10 @@ - - #define EMBEDDED_NAME_MAX (PATH_MAX - offsetof(struct filename, iname)) + mmap_write_unlock(mm); +diff --git a/fs/inode.c b/fs/inode.c +index 5eea9912a0b9..f86f383a3e1d 100644 +--- a/fs/inode.c ++++ b/fs/inode.c +@@ -116,6 +116,10 @@ int proc_nr_inodes(struct ctl_table *table, int write, + } + #endif -+#ifdef CONFIG_HARDENED_FIFO -+extern int fifo_restrictions; -+#endif ++/* sysctl */ ++int device_sidechannel_restrict __read_mostly = 1; ++EXPORT_SYMBOL(device_sidechannel_restrict); + - struct filename * - getname_flags(const char __user *filename, int flags, int *empty) + static int no_open(struct inode *inode, struct file *file) { -@@ -877,10 +881,10 @@ static inline void put_link(struct nameidata *nd) + return -ENXIO; +diff --git a/fs/namei.c b/fs/namei.c +index d4a6dd772303..72f912c68975 100644 +--- a/fs/namei.c ++++ b/fs/namei.c +@@ -932,10 +932,10 @@ static inline void put_link(struct nameidata *nd) path_put(&last->link); } @@ -996,66 +749,20 @@ index e81521c87f98..8c933ad857e0 100644 /** * may_follow_link - Check symlink following for unsafe situations -@@ -3242,6 +3246,32 @@ static int lookup_open(struct nameidata *nd, struct path *path, - return error; - } - -+/* -+ * Handles possibly restricted FIFO operations -+ * if the user doesn't own this directory. -+ */ -+static int fifo_restricted(const struct dentry *dentry, -+ const struct vfsmount *mnt, -+ const struct dentry *dir, -+ const int flag, -+ const int acc_mode) { -+#ifdef CONFIG_HARDENED_FIFO -+ const struct cred *cred; -+ struct inode *inode, *dir_inode; -+ -+ cred = current_cred(); -+ inode = d_backing_inode(dentry); -+ dir_inode = d_backing_inode(dir); -+ -+ if (fifo_restrictions && S_ISFIFO(inode->i_mode) && -+ !(flag & O_EXCL) && (dir_inode->i_mode & S_ISVTX) && -+ !uid_eq(inode->i_uid, dir_inode->i_uid) && -+ !uid_eq(cred->fsuid, inode->i_uid)) -+ return -EACCES; -+#endif -+ return 0; -+} -+ - /* - * Handle the last step of open() - */ -@@ -3360,6 +3390,15 @@ static int do_last(struct nameidata *nd, - return -ENOENT; - } - -+ /* -+ * Only check if O_CREAT is specified, all other checks need to go -+ * into may_open(). -+ */ -+ if (fifo_restricted(path.dentry, path.mnt, dir, open_flag, acc_mode)) { -+ path_to_nameidata(&path, nd); -+ return -EACCES; -+ } -+ - /* - * create/update audit record if it already exists. - */ diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig -index 295a7a21b774..3aed361bc0f9 100644 +index e2a488d403a6..ce54c1c693a8 100644 --- a/fs/nfs/Kconfig +++ b/fs/nfs/Kconfig -@@ -195,4 +195,3 @@ config NFS_DEBUG +@@ -195,7 +195,6 @@ config NFS_DEBUG bool depends on NFS_FS && SUNRPC_DEBUG select CRC32 - default y + + config NFS_DISABLE_UDP_SUPPORT + bool "NFS: Disable NFS UDP protocol support" diff --git a/fs/proc/Kconfig b/fs/proc/Kconfig -index cb5629bd5fff..bc44606fcc48 100644 +index c930001056f9..6a0a51b3f593 100644 --- a/fs/proc/Kconfig +++ b/fs/proc/Kconfig @@ -41,7 +41,6 @@ config PROC_KCORE @@ -1063,14 +770,14 @@ index cb5629bd5fff..bc44606fcc48 100644 bool "/proc/vmcore support" depends on PROC_FS && CRASH_DUMP - default y - help - Exports the dump image of crashed kernel in ELF format. + help + Exports the dump image of crashed kernel in ELF format. diff --git a/fs/stat.c b/fs/stat.c -index c38e4c2e1221..6135fbaf7298 100644 +index dacecdda2e79..14173d0f777d 100644 --- a/fs/stat.c +++ b/fs/stat.c -@@ -40,8 +40,13 @@ void generic_fillattr(struct inode *inode, struct kstat *stat) +@@ -43,8 +43,13 @@ void generic_fillattr(struct inode *inode, struct kstat *stat) stat->gid = inode->i_gid; stat->rdev = inode->i_rdev; stat->size = i_size_read(inode); @@ -1086,9 +793,9 @@ index c38e4c2e1221..6135fbaf7298 100644 stat->ctime = inode->i_ctime; stat->blksize = i_blocksize(inode); stat->blocks = inode->i_blocks; -@@ -77,9 +82,14 @@ int vfs_getattr_nosec(const struct path *path, struct kstat *stat, - if (IS_AUTOMOUNT(inode)) - stat->attributes |= STATX_ATTR_AUTOMOUNT; +@@ -83,9 +88,14 @@ int vfs_getattr_nosec(const struct path *path, struct kstat *stat, + if (IS_DAX(inode)) + stat->attributes |= STATX_ATTR_DAX; - if (inode->i_op->getattr) - return inode->i_op->getattr(path, stat, request_mask, @@ -1104,79 +811,8 @@ index c38e4c2e1221..6135fbaf7298 100644 generic_fillattr(inode, stat); return 0; -diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c -index aa85f2874a9f..9b85cc73f70f 100644 ---- a/fs/sysfs/dir.c -+++ b/fs/sysfs/dir.c -@@ -18,6 +18,10 @@ - - DEFINE_SPINLOCK(sysfs_symlink_target_lock); - -+#ifdef CONFIG_HARDENED_SYSFS_RESTRICT -+extern int sysfs_restricted; -+#endif -+ - void sysfs_warn_dup(struct kernfs_node *parent, const char *name) - { - char *buf; -@@ -40,12 +44,20 @@ void sysfs_warn_dup(struct kernfs_node *parent, const char *name) - int sysfs_create_dir_ns(struct kobject *kobj, const void *ns) - { - struct kernfs_node *parent, *kn; -+ const char* name; -+ umode_t mode; - kuid_t uid; - kgid_t gid; - -+#ifdef CONFIG_HARDENED_SYSFS_RESTRICT -+ const char *parent_name; -+#endif -+ - if (WARN_ON(!kobj)) - return -EINVAL; - -+ name = kobject_name(kobj); -+ - if (kobj->parent) - parent = kobj->parent->sd; - else -@@ -56,12 +68,30 @@ int sysfs_create_dir_ns(struct kobject *kobj, const void *ns) - - kobject_get_ownership(kobj, &uid, &gid); - -- kn = kernfs_create_dir_ns(parent, kobject_name(kobj), -- S_IRWXU | S_IRUGO | S_IXUGO, uid, gid, -- kobj, ns); -+#ifdef CONFIG_HARDENED_SYSFS_RESTRICT -+ if (sysfs_restricted) { -+ parent_name = parent->name; -+ mode = S_IRWXU; -+ -+ if ((!strcmp(parent_name, "") && (!strcmp(name, "devices") || -+ !strcmp(name, "fs"))) || -+ (!strcmp(parent_name, "devices") && !strcmp(name, "system")) || -+ (!strcmp(parent_name, "fs") && (!strcmp(name, "selinux") || -+ !strcmp(name, "fuse") || !strcmp(name, "ecryptfs"))) || -+ (!strcmp(parent_name, "system") && !strcmp(name, "cpu"))) -+ mode |= S_IRUGO | S_IXUGO; -+ } -+ else -+ mode = S_IRWXU | S_IRUGO | S_IXUGO; -+#else -+ mode = S_IRWXU | S_IRUGO | S_IXUGO; -+#endif -+ -+ kn = kernfs_create_dir_ns(parent, name, mode, uid, gid, kobj, ns); -+ - if (IS_ERR(kn)) { - if (PTR_ERR(kn) == -EEXIST) -- sysfs_warn_dup(parent, kobject_name(kobj)); -+ sysfs_warn_dup(parent, name); - return PTR_ERR(kn); - } - diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c -index d99d166fd892..7a4f2854feb8 100644 +index 000b457ad087..06d35ecdcbc8 100644 --- a/fs/userfaultfd.c +++ b/fs/userfaultfd.c @@ -28,7 +28,11 @@ @@ -1192,11 +828,11 @@ index d99d166fd892..7a4f2854feb8 100644 static struct kmem_cache *userfaultfd_ctx_cachep __read_mostly; diff --git a/include/linux/cache.h b/include/linux/cache.h -index 750621e41d1c..e7157c18c62c 100644 +index d742c57eaee5..f0222c070458 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h -@@ -31,6 +31,8 @@ - #define __ro_after_init __attribute__((__section__(".data..ro_after_init"))) +@@ -37,6 +37,8 @@ + #define __ro_after_init __section(".data..ro_after_init") #endif +#define __read_only __ro_after_init @@ -1205,7 +841,7 @@ index 750621e41d1c..e7157c18c62c 100644 #define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) #endif diff --git a/include/linux/capability.h b/include/linux/capability.h -index ecce0f43c73a..e46306dd4401 100644 +index 1e7fe311cabe..a5b6d4c9acf5 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h @@ -208,6 +208,7 @@ extern bool has_capability_noaudit(struct task_struct *t, int cap); @@ -1227,11 +863,31 @@ index ecce0f43c73a..e46306dd4401 100644 static inline bool ns_capable(struct user_namespace *ns, int cap) { return true; +diff --git a/include/linux/dccp.h b/include/linux/dccp.h +index 07e547c02fd8..504afa1a4be6 100644 +--- a/include/linux/dccp.h ++++ b/include/linux/dccp.h +@@ -259,6 +259,7 @@ struct dccp_ackvec; + * @dccps_sync_scheduled - flag which signals "send out-of-band message soon" + * @dccps_xmitlet - tasklet scheduled by the TX CCID to dequeue data packets + * @dccps_xmit_timer - used by the TX CCID to delay sending (rate-based pacing) ++ * @dccps_ccid_timer - used by the CCIDs + * @dccps_syn_rtt - RTT sample from Request/Response exchange (in usecs) + */ + struct dccp_sock { +@@ -303,6 +304,7 @@ struct dccp_sock { + __u8 dccps_sync_scheduled:1; + struct tasklet_struct dccps_xmitlet; + struct timer_list dccps_xmit_timer; ++ struct timer_list dccps_ccid_timer; + }; + + static inline struct dccp_sock *dccp_sk(const struct sock *sk) diff --git a/include/linux/fs.h b/include/linux/fs.h -index 0b4d8fc79e0f..6f318e089249 100644 +index 8bde32cf9711..83d50b0a2a18 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h -@@ -3627,4 +3627,15 @@ static inline int inode_drain_writes(struct inode *inode) +@@ -3475,4 +3475,15 @@ static inline int inode_drain_writes(struct inode *inode) return filemap_write_and_wait(inode->i_mapping); } @@ -1248,34 +904,29 @@ index 0b4d8fc79e0f..6f318e089249 100644 + #endif /* _LINUX_FS_H */ diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h -index a2d5d175d3c1..e91ab06119b0 100644 +index f8acddcf54fb..7b109980327f 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h -@@ -233,6 +233,9 @@ static inline void fsnotify_access(struct file *file) - struct inode *inode = file_inode(file); - __u32 mask = FS_ACCESS; - -+ if (is_sidechannel_device(inode)) -+ return; -+ - if (S_ISDIR(inode->i_mode)) - mask |= FS_ISDIR; +@@ -83,10 +83,14 @@ static inline void fsnotify_dentry(struct dentry *dentry, __u32 mask) + static inline int fsnotify_file(struct file *file, __u32 mask) + { + const struct path *path = &file->f_path; ++ struct inode *inode = file_inode(file); -@@ -249,6 +252,9 @@ static inline void fsnotify_modify(struct file *file) - struct inode *inode = file_inode(file); - __u32 mask = FS_MODIFY; + if (file->f_mode & FMODE_NONOTIFY) + return 0; -+ if (is_sidechannel_device(inode)) -+ return; ++ if (mask & (FS_ACCESS | FS_MODIFY) && is_sidechannel_device(inode)) ++ return 0; + - if (S_ISDIR(inode->i_mode)) - mask |= FS_ISDIR; + return fsnotify_parent(path->dentry, mask, path, FSNOTIFY_EVENT_PATH); + } diff --git a/include/linux/gfp.h b/include/linux/gfp.h -index 61f2f6ff9467..f9b3e3d675ae 100644 +index c603237e006c..893378b0262e 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h -@@ -553,9 +553,9 @@ extern struct page *alloc_pages_vma(gfp_t gfp_mask, int order, +@@ -568,9 +568,9 @@ static inline struct page *alloc_pages(gfp_t gfp_mask, unsigned int order) extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order); extern unsigned long get_zeroed_page(gfp_t gfp_mask); @@ -1288,10 +939,10 @@ index 61f2f6ff9467..f9b3e3d675ae 100644 #define __get_free_page(gfp_mask) \ __get_free_pages((gfp_mask), 0) diff --git a/include/linux/highmem.h b/include/linux/highmem.h -index ea5cdbd8c2c3..805b84d6bbca 100644 +index 14e6202ce47f..4348ad7f5c50 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h -@@ -215,6 +215,13 @@ static inline void clear_highpage(struct page *page) +@@ -284,6 +284,13 @@ static inline void clear_highpage(struct page *page) kunmap_atomic(kaddr); } @@ -1306,10 +957,10 @@ index ea5cdbd8c2c3..805b84d6bbca 100644 unsigned start1, unsigned end1, unsigned start2, unsigned end2) diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h -index 89fc59dab57d..5f98e14e9470 100644 +index ee8299eb1f52..4381b79f76cf 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h -@@ -540,7 +540,7 @@ extern const char * const softirq_to_name[NR_SOFTIRQS]; +@@ -554,7 +554,7 @@ extern const char * const softirq_to_name[NR_SOFTIRQS]; struct softirq_action { @@ -1318,7 +969,7 @@ index 89fc59dab57d..5f98e14e9470 100644 }; asmlinkage void do_softirq(void); -@@ -555,7 +555,7 @@ static inline void do_softirq_own_stack(void) +@@ -569,7 +569,7 @@ static inline void do_softirq_own_stack(void) } #endif @@ -1328,7 +979,7 @@ index 89fc59dab57d..5f98e14e9470 100644 extern void __raise_softirq_irqoff(unsigned int nr); diff --git a/include/linux/kobject_ns.h b/include/linux/kobject_ns.h -index 069aa2ebef90..cb9e3637a620 100644 +index 2b5b64256cf4..8cdce21dce0f 100644 --- a/include/linux/kobject_ns.h +++ b/include/linux/kobject_ns.h @@ -45,7 +45,7 @@ struct kobj_ns_type_operations { @@ -1341,10 +992,10 @@ index 069aa2ebef90..cb9e3637a620 100644 const struct kobj_ns_type_operations *kobj_child_ns_ops(struct kobject *parent); const struct kobj_ns_type_operations *kobj_ns_ops(struct kobject *kobj); diff --git a/include/linux/mm.h b/include/linux/mm.h -index b249d2e033aa..a4855777d1fa 100644 +index db6ae4d3fb4e..3519e61b07fa 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h -@@ -664,7 +664,7 @@ static inline int is_vmalloc_or_module_addr(const void *x) +@@ -759,7 +759,7 @@ static inline int is_vmalloc_or_module_addr(const void *x) } #endif @@ -1353,6 +1004,24 @@ index b249d2e033aa..a4855777d1fa 100644 static inline void *kvmalloc(size_t size, gfp_t flags) { return kvmalloc_node(size, flags, NUMA_NO_NODE); +@@ -894,10 +894,15 @@ static inline void set_compound_page_dtor(struct page *page, + page[1].compound_dtor = compound_dtor; + } + +-static inline void destroy_compound_page(struct page *page) ++static inline compound_page_dtor *get_compound_page_dtor(struct page *page) + { + VM_BUG_ON_PAGE(page[1].compound_dtor >= NR_COMPOUND_DTORS, page); +- compound_page_dtors[page[1].compound_dtor](page); ++ return compound_page_dtors[page[1].compound_dtor]; ++} ++ ++static inline void destroy_compound_page(struct page *page) ++{ ++ (*get_compound_page_dtor(page))(page); + } + + static inline unsigned int compound_order(struct page *page) diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 5e76af742c80..9a6c682ec127 100644 --- a/include/linux/percpu.h @@ -1378,37 +1047,38 @@ index 5e76af742c80..9a6c682ec127 100644 extern phys_addr_t per_cpu_ptr_to_phys(void *addr); diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h -index 68ccc5b1913b..a7565ea44938 100644 +index 96450f6fb1de..d020c26b612a 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h -@@ -1241,6 +1241,11 @@ extern int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write, - int perf_event_max_stack_handler(struct ctl_table *table, int write, - void __user *buffer, size_t *lenp, loff_t *ppos); +@@ -1312,6 +1312,14 @@ static inline int perf_is_paranoid(void) + return sysctl_perf_event_paranoid > -1; + } -+static inline bool perf_paranoid_any(void) ++static inline int perf_allow_open(struct perf_event_attr *attr) +{ -+ return sysctl_perf_event_paranoid > 2; ++ if (sysctl_perf_event_paranoid > 2 && !perfmon_capable()) ++ return -EACCES; ++ ++ return security_perf_event_open(attr, PERF_SECURITY_OPEN); +} + - static inline bool perf_paranoid_tracepoint_raw(void) + static inline int perf_allow_kernel(struct perf_event_attr *attr) { - return sysctl_perf_event_paranoid > -1; + if (sysctl_perf_event_paranoid > 1 && !perfmon_capable()) diff --git a/include/linux/slab.h b/include/linux/slab.h -index 4d2a2fa55ed5..be3a8234edde 100644 +index dd6897f62010..78f99835b91b 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h -@@ -184,8 +184,8 @@ void memcg_deactivate_kmem_caches(struct mem_cgroup *, struct mem_cgroup *); +@@ -181,7 +181,7 @@ int kmem_cache_shrink(struct kmem_cache *); /* * Common kmalloc functions provided by all allocators */ --void * __must_check __krealloc(const void *, size_t, gfp_t); -void * __must_check krealloc(const void *, size_t, gfp_t); -+void * __must_check __krealloc(const void *, size_t, gfp_t) __attribute__((alloc_size(2))); +void * __must_check krealloc(const void *, size_t, gfp_t) __attribute((alloc_size(2))); void kfree(const void *); - void kzfree(const void *); + void kfree_sensitive(const void *); size_t __ksize(const void *); -@@ -390,7 +390,7 @@ static __always_inline unsigned int kmalloc_index(size_t size) +@@ -386,7 +386,7 @@ static __always_inline unsigned int kmalloc_index(size_t size) } #endif /* !CONFIG_SLOB */ @@ -1417,7 +1087,7 @@ index 4d2a2fa55ed5..be3a8234edde 100644 void *kmem_cache_alloc(struct kmem_cache *, gfp_t flags) __assume_slab_alignment __malloc; void kmem_cache_free(struct kmem_cache *, void *); -@@ -414,7 +414,7 @@ static __always_inline void kfree_bulk(size_t size, void **p) +@@ -410,7 +410,7 @@ static __always_inline void kfree_bulk(size_t size, void **p) } #ifdef CONFIG_NUMA @@ -1426,7 +1096,7 @@ index 4d2a2fa55ed5..be3a8234edde 100644 void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node) __assume_slab_alignment __malloc; #else static __always_inline void *__kmalloc_node(size_t size, gfp_t flags, int node) -@@ -539,7 +539,7 @@ static __always_inline void *kmalloc_large(size_t size, gfp_t flags) +@@ -535,7 +535,7 @@ static __always_inline void *kmalloc_large(size_t size, gfp_t flags) * Try really hard to succeed the allocation but fail * eventually. */ @@ -1435,8 +1105,8 @@ index 4d2a2fa55ed5..be3a8234edde 100644 { if (__builtin_constant_p(size)) { #ifndef CONFIG_SLOB -@@ -581,7 +581,7 @@ static __always_inline unsigned int kmalloc_size(unsigned int n) - return 0; +@@ -557,7 +557,7 @@ static __always_inline void *kmalloc(size_t size, gfp_t flags) + return __kmalloc(size, flags); } -static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) @@ -1445,10 +1115,10 @@ index 4d2a2fa55ed5..be3a8234edde 100644 #ifndef CONFIG_SLOB if (__builtin_constant_p(size) && diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h -index d2153789bd9f..97da977d6060 100644 +index 1be0ed5befa1..c71cf30b5987 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h -@@ -121,6 +121,11 @@ struct kmem_cache { +@@ -113,6 +113,11 @@ struct kmem_cache { unsigned long random; #endif @@ -1461,10 +1131,10 @@ index d2153789bd9f..97da977d6060 100644 /* * Defragmentation by allocating from a remote node. diff --git a/include/linux/string.h b/include/linux/string.h -index b6ccdc2c7f02..6d66b8740f90 100644 +index b1f3894a0a3e..4c5564a6ad80 100644 --- a/include/linux/string.h +++ b/include/linux/string.h -@@ -268,10 +268,16 @@ void __read_overflow2(void) __compiletime_error("detected read beyond size of ob +@@ -264,6 +264,12 @@ void __read_overflow2(void) __compiletime_error("detected read beyond size of ob void __read_overflow3(void) __compiletime_error("detected read beyond size of object passed as 3rd parameter"); void __write_overflow(void) __compiletime_error("detected write beyond size of object passed as 1st parameter"); @@ -1475,6 +1145,10 @@ index b6ccdc2c7f02..6d66b8740f90 100644 +#endif + #if !defined(__NO_FORTIFY) && defined(__OPTIMIZE__) && defined(CONFIG_FORTIFY_SOURCE) + + #ifdef CONFIG_KASAN +@@ -292,7 +298,7 @@ extern char *__underlying_strncpy(char *p, const char *q, __kernel_size_t size) + __FORTIFY_INLINE char *strncpy(char *p, const char *q, __kernel_size_t size) { - size_t p_size = __builtin_object_size(p, 0); @@ -1482,16 +1156,16 @@ index b6ccdc2c7f02..6d66b8740f90 100644 if (__builtin_constant_p(size) && p_size < size) __write_overflow(); if (p_size < size) -@@ -281,7 +287,7 @@ __FORTIFY_INLINE char *strncpy(char *p, const char *q, __kernel_size_t size) +@@ -302,7 +308,7 @@ __FORTIFY_INLINE char *strncpy(char *p, const char *q, __kernel_size_t size) __FORTIFY_INLINE char *strcat(char *p, const char *q) { - size_t p_size = __builtin_object_size(p, 0); + size_t p_size = __string_size(p); if (p_size == (size_t)-1) - return __builtin_strcat(p, q); + return __underlying_strcat(p, q); if (strlcat(p, q, p_size) >= p_size) -@@ -292,7 +298,7 @@ __FORTIFY_INLINE char *strcat(char *p, const char *q) +@@ -313,7 +319,7 @@ __FORTIFY_INLINE char *strcat(char *p, const char *q) __FORTIFY_INLINE __kernel_size_t strlen(const char *p) { __kernel_size_t ret; @@ -1500,7 +1174,7 @@ index b6ccdc2c7f02..6d66b8740f90 100644 /* Work around gcc excess stack consumption issue */ if (p_size == (size_t)-1 || -@@ -307,7 +313,7 @@ __FORTIFY_INLINE __kernel_size_t strlen(const char *p) +@@ -328,7 +334,7 @@ __FORTIFY_INLINE __kernel_size_t strlen(const char *p) extern __kernel_size_t __real_strnlen(const char *, __kernel_size_t) __RENAME(strnlen); __FORTIFY_INLINE __kernel_size_t strnlen(const char *p, __kernel_size_t maxlen) { @@ -1509,7 +1183,7 @@ index b6ccdc2c7f02..6d66b8740f90 100644 __kernel_size_t ret = __real_strnlen(p, maxlen < p_size ? maxlen : p_size); if (p_size <= ret && maxlen != ret) fortify_panic(__func__); -@@ -319,8 +325,8 @@ extern size_t __real_strlcpy(char *, const char *, size_t) __RENAME(strlcpy); +@@ -340,8 +346,8 @@ extern size_t __real_strlcpy(char *, const char *, size_t) __RENAME(strlcpy); __FORTIFY_INLINE size_t strlcpy(char *p, const char *q, size_t size) { size_t ret; @@ -1520,7 +1194,7 @@ index b6ccdc2c7f02..6d66b8740f90 100644 if (p_size == (size_t)-1 && q_size == (size_t)-1) return __real_strlcpy(p, q, size); ret = strlen(q); -@@ -340,8 +346,8 @@ __FORTIFY_INLINE size_t strlcpy(char *p, const char *q, size_t size) +@@ -361,8 +367,8 @@ __FORTIFY_INLINE size_t strlcpy(char *p, const char *q, size_t size) __FORTIFY_INLINE char *strncat(char *p, const char *q, __kernel_size_t count) { size_t p_len, copy_len; @@ -1529,9 +1203,9 @@ index b6ccdc2c7f02..6d66b8740f90 100644 + size_t p_size = __string_size(p); + size_t q_size = __string_size(q); if (p_size == (size_t)-1 && q_size == (size_t)-1) - return __builtin_strncat(p, q, count); + return __underlying_strncat(p, q, count); p_len = strlen(p); -@@ -454,8 +460,8 @@ __FORTIFY_INLINE void *kmemdup(const void *p, size_t size, gfp_t gfp) +@@ -475,8 +481,8 @@ __FORTIFY_INLINE void *kmemdup(const void *p, size_t size, gfp_t gfp) /* defined after fortified strlen and memcpy to reuse them */ __FORTIFY_INLINE char *strcpy(char *p, const char *q) { @@ -1540,10 +1214,23 @@ index b6ccdc2c7f02..6d66b8740f90 100644 + size_t p_size = __string_size(p); + size_t q_size = __string_size(q); if (p_size == (size_t)-1 && q_size == (size_t)-1) - return __builtin_strcpy(p, q); + return __underlying_strcpy(p, q); memcpy(p, q, strlen(q) + 1); +diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h +index 51298a4f4623..b835c57330f2 100644 +--- a/include/linux/sysctl.h ++++ b/include/linux/sysctl.h +@@ -53,6 +53,8 @@ int proc_douintvec(struct ctl_table *, int, void *, size_t *, loff_t *); + int proc_dointvec_minmax(struct ctl_table *, int, void *, size_t *, loff_t *); + int proc_douintvec_minmax(struct ctl_table *table, int write, void *buffer, + size_t *lenp, loff_t *ppos); ++int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write, ++ void *buffer, size_t *lenp, loff_t *ppos); + int proc_dointvec_jiffies(struct ctl_table *, int, void *, size_t *, loff_t *); + int proc_dointvec_userhz_jiffies(struct ctl_table *, int, void *, size_t *, + loff_t *); diff --git a/include/linux/tty.h b/include/linux/tty.h -index bfa4e2ee94a9..3e18d583fc8d 100644 +index eb33d948788c..116138eb394c 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -14,6 +14,7 @@ @@ -1554,7 +1241,7 @@ index bfa4e2ee94a9..3e18d583fc8d 100644 /* -@@ -336,6 +337,7 @@ struct tty_struct { +@@ -342,6 +343,7 @@ struct tty_struct { /* If the tty has a pending do_SAK, queue it here - akpm */ struct work_struct SAK_work; struct tty_port *port; @@ -1562,7 +1249,7 @@ index bfa4e2ee94a9..3e18d583fc8d 100644 } __randomize_layout; /* Each of a tty's open files has private_data pointing to tty_file_private */ -@@ -345,6 +347,8 @@ struct tty_file_private { +@@ -351,6 +353,8 @@ struct tty_file_private { struct list_head list; }; @@ -1571,11 +1258,55 @@ index bfa4e2ee94a9..3e18d583fc8d 100644 /* tty magic number */ #define TTY_MAGIC 0x5401 +diff --git a/include/linux/usb.h b/include/linux/usb.h +index 7d72c4e0713c..653265115e56 100644 +--- a/include/linux/usb.h ++++ b/include/linux/usb.h +@@ -2035,6 +2035,17 @@ extern void usb_led_activity(enum usb_led_event ev); + static inline void usb_led_activity(enum usb_led_event ev) {} + #endif + ++/* sysctl.c */ ++extern int deny_new_usb; ++#ifdef CONFIG_SYSCTL ++extern int usb_init_sysctl(void); ++extern void usb_exit_sysctl(void); ++#else ++static inline int usb_init_sysctl(void) { return 0; } ++static inline void usb_exit_sysctl(void) { } ++#endif /* CONFIG_SYSCTL */ ++ ++ + #endif /* __KERNEL__ */ + + #endif +diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h +index 6ef1c7109fc4..2140091b0b8d 100644 +--- a/include/linux/user_namespace.h ++++ b/include/linux/user_namespace.h +@@ -106,6 +106,8 @@ void dec_ucount(struct ucounts *ucounts, enum ucount_type type); + + #ifdef CONFIG_USER_NS + ++extern int unprivileged_userns_clone; ++ + static inline struct user_namespace *get_user_ns(struct user_namespace *ns) + { + if (ns) +@@ -139,6 +141,8 @@ extern bool current_in_userns(const struct user_namespace *target_ns); + struct ns_common *ns_get_owner(struct ns_common *ns); + #else + ++#define unprivileged_userns_clone 0 ++ + static inline struct user_namespace *get_user_ns(struct user_namespace *ns) + { + return &init_user_ns; diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h -index 4e7809408073..0b58a5176a25 100644 +index 938eaf9517e2..7c069063c20d 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h -@@ -88,19 +88,19 @@ static inline void vmalloc_init(void) +@@ -102,18 +102,18 @@ static inline void vmalloc_init(void) static inline unsigned long vmalloc_nr_pages(void) { return 0; } #endif @@ -1584,48 +1315,42 @@ index 4e7809408073..0b58a5176a25 100644 -extern void *vmalloc_user(unsigned long size); -extern void *vmalloc_node(unsigned long size, int node); -extern void *vzalloc_node(unsigned long size, int node); --extern void *vmalloc_exec(unsigned long size); -extern void *vmalloc_32(unsigned long size); -extern void *vmalloc_32_user(unsigned long size); --extern void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot); +-extern void *__vmalloc(unsigned long size, gfp_t gfp_mask); +extern void *vmalloc(unsigned long size) __attribute__((alloc_size(1))); +extern void *vzalloc(unsigned long size) __attribute__((alloc_size(1))); +extern void *vmalloc_user(unsigned long size) __attribute__((alloc_size(1))); +extern void *vmalloc_node(unsigned long size, int node) __attribute__((alloc_size(1))); +extern void *vzalloc_node(unsigned long size, int node) __attribute__((alloc_size(1))); -+extern void *vmalloc_exec(unsigned long size) __attribute__((alloc_size(1))); +extern void *vmalloc_32(unsigned long size) __attribute__((alloc_size(1))); +extern void *vmalloc_32_user(unsigned long size) __attribute__((alloc_size(1))); -+extern void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot) __attribute__((alloc_size(1))); ++extern void *__vmalloc(unsigned long size, gfp_t gfp_mask) __attribute__((alloc_size(1))); extern void *__vmalloc_node_range(unsigned long size, unsigned long align, unsigned long start, unsigned long end, gfp_t gfp_mask, pgprot_t prot, unsigned long vm_flags, int node, - const void *caller); + const void *caller) __attribute__((alloc_size(1))); - #ifndef CONFIG_MMU - extern void *__vmalloc_node_flags(unsigned long size, int node, gfp_t flags); - static inline void *__vmalloc_node_flags_caller(unsigned long size, int node, -diff --git a/include/uapi/linux/ip.h b/include/uapi/linux/ip.h -index e42d13b55cf3..3228bcfe7599 100644 ---- a/include/uapi/linux/ip.h -+++ b/include/uapi/linux/ip.h -@@ -66,7 +66,11 @@ - - #define IPVERSION 4 - #define MAXTTL 255 -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+#define IPDEFTTL 128 -+#else - #define IPDEFTTL 64 -+#endif - - #define IPOPT_OPTVAL 0 - #define IPOPT_OLEN 1 + void *__vmalloc_node(unsigned long size, unsigned long align, gfp_t gfp_mask, + int node, const void *caller); + +diff --git a/include/net/tcp.h b/include/net/tcp.h +index d4ef5bf94168..34d0d5438108 100644 +--- a/include/net/tcp.h ++++ b/include/net/tcp.h +@@ -245,6 +245,7 @@ void tcp_time_wait(struct sock *sk, int state, int timeo); + /* sysctl variables for tcp */ + extern int sysctl_tcp_max_orphans; + extern long sysctl_tcp_mem[3]; ++extern int sysctl_tcp_simult_connect; + + #define TCP_RACK_LOSS_DETECTION 0x1 /* Use RACK to detect losses */ + #define TCP_RACK_STATIC_REO_WND 0x2 /* Use static RACK reo wnd */ diff --git a/init/Kconfig b/init/Kconfig -index 0328b53d09ad..fde78a967939 100644 +index 0872a5a2e759..2feea719cc25 100644 --- a/init/Kconfig +++ b/init/Kconfig -@@ -382,6 +382,7 @@ config USELIB +@@ -419,6 +419,7 @@ config USELIB config AUDIT bool "Auditing support" depends on NET @@ -1633,7 +1358,7 @@ index 0328b53d09ad..fde78a967939 100644 help Enable auditing infrastructure that can be used with another kernel subsystem, such as SELinux (which requires this for -@@ -1119,6 +1120,22 @@ config USER_NS +@@ -1173,6 +1174,22 @@ config USER_NS If unsure, say N. @@ -1656,7 +1381,35 @@ index 0328b53d09ad..fde78a967939 100644 config PID_NS bool "PID Namespaces" default y -@@ -1539,8 +1556,7 @@ config SHMEM +@@ -1402,9 +1419,8 @@ menuconfig EXPERT + Only use this if you really know what you are doing. + + config UID16 +- bool "Enable 16-bit UID system calls" if EXPERT ++ bool "Enable 16-bit UID system calls" + depends on HAVE_UID16 && MULTIUSER +- default y + help + This enables the legacy 16-bit UID syscall wrappers. + +@@ -1433,14 +1449,13 @@ config SGETMASK_SYSCALL + If unsure, leave the default option here. + + config SYSFS_SYSCALL +- bool "Sysfs syscall support" if EXPERT +- default y ++ bool "Sysfs syscall support" + help + sys_sysfs is an obsolete system call no longer supported in libc. + Note that disabling this option is more secure but might break + compatibility with some systems. + +- If unsure say Y here. ++ If unsure say N here. + + config FHANDLE + bool "open by fhandle syscalls" if EXPERT +@@ -1591,8 +1606,7 @@ config SHMEM which may be appropriate on small systems without swap. config AIO @@ -1666,7 +1419,7 @@ index 0328b53d09ad..fde78a967939 100644 help This option enables POSIX asynchronous I/O which may by used by some high performance threaded applications. Disabling -@@ -1651,6 +1667,23 @@ config USERFAULTFD +@@ -1731,6 +1745,23 @@ config USERFAULTFD Enable the userfaultfd() system call that allows to intercept and handle page faults in userland. @@ -1690,7 +1443,7 @@ index 0328b53d09ad..fde78a967939 100644 config ARCH_HAS_MEMBARRIER_CALLBACKS bool -@@ -1763,7 +1796,7 @@ config VM_EVENT_COUNTERS +@@ -1843,7 +1874,7 @@ config VM_EVENT_COUNTERS config SLUB_DEBUG default y @@ -1699,7 +1452,7 @@ index 0328b53d09ad..fde78a967939 100644 depends on SLUB && SYSFS help SLUB has extensive debug support features. Disabling these can -@@ -1787,7 +1820,6 @@ config SLUB_MEMCG_SYSFS_ON +@@ -1867,7 +1898,6 @@ config SLUB_MEMCG_SYSFS_ON config COMPAT_BRK bool "Disable heap randomization" @@ -1707,7 +1460,7 @@ index 0328b53d09ad..fde78a967939 100644 help Randomizing heap placement makes heap exploits harder, but it also breaks ancient binaries (including anything libc5 based). -@@ -1834,7 +1866,6 @@ endchoice +@@ -1914,7 +1944,6 @@ endchoice config SLAB_MERGE_DEFAULT bool "Allow slab caches to be merged" @@ -1715,27 +1468,25 @@ index 0328b53d09ad..fde78a967939 100644 help For reduced kernel memory fragmentation, slab caches can be merged when they share the same size and other characteristics. -@@ -1847,9 +1878,9 @@ config SLAB_MERGE_DEFAULT - command line. - +@@ -1929,6 +1958,7 @@ config SLAB_MERGE_DEFAULT config SLAB_FREELIST_RANDOM -- default n + bool "Randomize slab freelist" depends on SLAB || SLUB - bool "SLAB freelist randomization" + default y help Randomizes the freelist order used on creating new pages. This security feature reduces the predictability of the kernel slab -@@ -1858,12 +1889,30 @@ config SLAB_FREELIST_RANDOM +@@ -1937,6 +1967,7 @@ config SLAB_FREELIST_RANDOM config SLAB_FREELIST_HARDENED bool "Harden slab freelist metadata" - depends on SLUB + depends on SLAB || SLUB + default y help Many kernel heap attacks try to target slab cache metadata and other infrastructure. This options makes minor performance - sacrifices to harden the kernel slab allocator against common - freelist exploit methods. +@@ -1945,6 +1976,23 @@ config SLAB_FREELIST_HARDENED + sanity-checking than others. This option is most effective with + CONFIG_SLUB. +config SLAB_CANARY + depends on SLUB @@ -1758,10 +1509,10 @@ index 0328b53d09ad..fde78a967939 100644 bool "Page allocator randomization" default SLAB_FREELIST_RANDOM && ACPI_NUMA diff --git a/kernel/audit.c b/kernel/audit.c -index da8dc0db5bd3..62dda6867dd9 100644 +index 68cee3bc8cfe..2059c66f7c9b 100644 --- a/kernel/audit.c +++ b/kernel/audit.c -@@ -1628,6 +1628,9 @@ static int __init audit_enable(char *str) +@@ -1693,6 +1693,9 @@ static int __init audit_enable(char *str) if (audit_default == AUDIT_OFF) audit_initialized = AUDIT_DISABLED; @@ -1772,33 +1523,33 @@ index da8dc0db5bd3..62dda6867dd9 100644 pr_err("audit: error setting audit state (%d)\n", audit_default); diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c -index ef0e1e3e66f4..d1ddc8695ab8 100644 +index 55454d2278b1..de02792dc2fc 100644 --- a/kernel/bpf/core.c +++ b/kernel/bpf/core.c -@@ -519,7 +519,7 @@ void bpf_prog_kallsyms_del_all(struct bpf_prog *fp) - #ifdef CONFIG_BPF_JIT +@@ -524,7 +524,7 @@ void bpf_prog_kallsyms_del_all(struct bpf_prog *fp) /* All BPF JIT sysctl knobs here. */ - int bpf_jit_enable __read_mostly = IS_BUILTIN(CONFIG_BPF_JIT_ALWAYS_ON); + int bpf_jit_enable __read_mostly = IS_BUILTIN(CONFIG_BPF_JIT_DEFAULT_ON); + int bpf_jit_kallsyms __read_mostly = IS_BUILTIN(CONFIG_BPF_JIT_DEFAULT_ON); -int bpf_jit_harden __read_mostly; +int bpf_jit_harden __read_mostly = 2; - int bpf_jit_kallsyms __read_mostly; long bpf_jit_limit __read_mostly; + static void diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c -index ace1cfaa24b6..37e08fc44a6b 100644 +index 8f50c9c19f1b..a54c05624647 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c -@@ -39,7 +39,7 @@ static DEFINE_SPINLOCK(prog_idr_lock); - static DEFINE_IDR(map_idr); - static DEFINE_SPINLOCK(map_idr_lock); +@@ -50,7 +50,7 @@ static DEFINE_SPINLOCK(map_idr_lock); + static DEFINE_IDR(link_idr); + static DEFINE_SPINLOCK(link_idr_lock); -int sysctl_unprivileged_bpf_disabled __read_mostly; +int sysctl_unprivileged_bpf_disabled __read_mostly = 1; static const struct bpf_map_ops * const bpf_map_types[] = { - #define BPF_PROG_TYPE(_id, _ops) + #define BPF_PROG_TYPE(_id, _name, prog_ctx_type, kern_ctx_type) diff --git a/kernel/capability.c b/kernel/capability.c -index 1444f3954d75..8cc9dd7992f2 100644 +index de7eac903a2a..5602178f3d21 100644 --- a/kernel/capability.c +++ b/kernel/capability.c @@ -449,6 +449,12 @@ bool capable(int cap) @@ -1815,10 +1566,10 @@ index 1444f3954d75..8cc9dd7992f2 100644 /** diff --git a/kernel/events/core.c b/kernel/events/core.c -index 6c829e22bad3..3063a7239a94 100644 +index dc568ca295bd..d97501029990 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c -@@ -398,8 +398,13 @@ static cpumask_var_t perf_online_mask; +@@ -407,8 +407,13 @@ static cpumask_var_t perf_online_mask; * 0 - disallow raw tracepoint access for unpriv * 1 - disallow cpu events for unpriv * 2 - disallow kernel profiling for unpriv @@ -1832,33 +1583,28 @@ index 6c829e22bad3..3063a7239a94 100644 /* Minimum for 512 kiB + 1 user control page */ int sysctl_perf_event_mlock __read_mostly = 512 + (PAGE_SIZE / 1024); /* 'free' kiB per user */ -@@ -10895,6 +10900,9 @@ SYSCALL_DEFINE5(perf_event_open, - if (flags & ~PERF_FLAG_ALL) +@@ -11638,7 +11643,7 @@ SYSCALL_DEFINE5(perf_event_open, return -EINVAL; -+ if (perf_paranoid_any() && !capable(CAP_SYS_ADMIN)) -+ return -EACCES; -+ - err = perf_copy_attr(attr_uptr, &attr); + /* Do we allow access to perf_event_open(2) ? */ +- err = security_perf_event_open(&attr, PERF_SECURITY_OPEN); ++ err = perf_allow_open(&attr); if (err) return err; + diff --git a/kernel/fork.c b/kernel/fork.c -index 755d8160e001..ed909f8050b2 100644 +index dc55f68a6ee3..31932fe83510 100644 --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -106,6 +106,11 @@ - - #define CREATE_TRACE_POINTS - #include <trace/events/task.h> -+#ifdef CONFIG_USER_NS -+extern int unprivileged_userns_clone; -+#else -+#define unprivileged_userns_clone 0 -+#endif - - /* - * Minimum number of threads to boot the kernel -@@ -1779,6 +1784,10 @@ static __latent_entropy struct task_struct *copy_process( +@@ -82,6 +82,7 @@ + #include <linux/perf_event.h> + #include <linux/posix-timers.h> + #include <linux/user-return-notifier.h> ++#include <linux/user_namespace.h> + #include <linux/oom.h> + #include <linux/khugepaged.h> + #include <linux/signalfd.h> +@@ -1863,6 +1864,10 @@ static __latent_entropy struct task_struct *copy_process( if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS)) return ERR_PTR(-EINVAL); @@ -1869,7 +1615,7 @@ index 755d8160e001..ed909f8050b2 100644 /* * Thread groups must share signals as well, and detached threads * can only be started up within the thread group. -@@ -2836,6 +2845,12 @@ int ksys_unshare(unsigned long unshare_flags) +@@ -2928,6 +2933,12 @@ int ksys_unshare(unsigned long unshare_flags) if (unshare_flags & CLONE_NEWNS) unshare_flags |= CLONE_FS; @@ -1882,43 +1628,11 @@ index 755d8160e001..ed909f8050b2 100644 err = check_unshare_flags(unshare_flags); if (err) goto bad_unshare_out; -diff --git a/kernel/kmod.c b/kernel/kmod.c -index bc6addd9152b..008be43f6cdd 100644 ---- a/kernel/kmod.c -+++ b/kernel/kmod.c -@@ -149,6 +149,13 @@ int __request_module(bool wait, const char *fmt, ...) - if (ret) - return ret; - -+#ifdef CONFIG_HARDENED_MODULE_LOAD -+ if (uid_eq(current_uid(), GLOBAL_ROOT_UID)) { -+ printk(KERN_ALERT "denied attempt to auto-load module %.64s\n", module_name); -+ return -EPERM; -+ } -+#endif -+ - if (atomic_dec_if_positive(&kmod_concurrent_max) < 0) { - pr_warn_ratelimited("request_module: kmod_concurrent_max (%u) close to 0 (max_modprobes: %u), for module %s, throttling...", - atomic_read(&kmod_concurrent_max), -diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c -index d65f2d5ab694..145e3c62c380 100644 ---- a/kernel/power/snapshot.c -+++ b/kernel/power/snapshot.c -@@ -1150,6 +1150,9 @@ void clear_free_pages(void) - struct memory_bitmap *bm = free_pages_map; - unsigned long pfn; - -+ if (!IS_ENABLED(CONFIG_PAGE_POISONING_ZERO) && !want_init_on_free()) -+ return; -+ - if (WARN_ON(!(free_pages_map))) - return; - diff --git a/kernel/rcu/tiny.c b/kernel/rcu/tiny.c -index 477b4eb44af5..db28cc3fd301 100644 +index aa897c3f2e92..d8976886fd68 100644 --- a/kernel/rcu/tiny.c +++ b/kernel/rcu/tiny.c -@@ -74,7 +74,7 @@ void rcu_sched_clock_irq(int user) +@@ -101,7 +101,7 @@ static inline bool rcu_reclaim_tiny(struct rcu_head *head) } /* Invoke the RCU callbacks whose grace period has elapsed. */ @@ -1928,11 +1642,11 @@ index 477b4eb44af5..db28cc3fd301 100644 struct rcu_head *next, *list; unsigned long flags; diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c -index 81105141b6a8..38f04f653d29 100644 +index 593df7edfe97..3285d81d8a26 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c -@@ -2381,7 +2381,7 @@ static __latent_entropy void rcu_core(void) - trace_rcu_utilization(TPS("End RCU core")); +@@ -2722,7 +2722,7 @@ static __latent_entropy void rcu_core(void) + queue_work_on(rdp->cpu, rcu_gp_wq, &rdp->strict_work); } -static void rcu_core_si(struct softirq_action *h) @@ -1941,10 +1655,10 @@ index 81105141b6a8..38f04f653d29 100644 rcu_core(); } diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c -index c87a798d1456..341c384cc597 100644 +index ae7ceba8fd4f..d118be5f18b8 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c -@@ -9889,7 +9889,7 @@ int newidle_balance(struct rq *this_rq, struct rq_flags *rf) +@@ -10628,7 +10628,7 @@ static int newidle_balance(struct rq *this_rq, struct rq_flags *rf) * run_rebalance_domains is triggered when needed from the scheduler tick. * Also triggered for nohz idle balancing (with nohz_balancing_kick set). */ @@ -1954,7 +1668,7 @@ index c87a798d1456..341c384cc597 100644 struct rq *this_rq = this_rq(); enum cpu_idle_type idle = this_rq->idle_balance ? diff --git a/kernel/softirq.c b/kernel/softirq.c -index 0427a86743a4..5e6a9b4ccb41 100644 +index 09229ad82209..6a02d63b135a 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -52,7 +52,7 @@ DEFINE_PER_CPU_ALIGNED(irq_cpustat_t, irq_stat); @@ -1966,7 +1680,7 @@ index 0427a86743a4..5e6a9b4ccb41 100644 DEFINE_PER_CPU(struct task_struct *, ksoftirqd); -@@ -289,7 +289,7 @@ asmlinkage __visible void __softirq_entry __do_softirq(void) +@@ -295,7 +295,7 @@ asmlinkage __visible void __softirq_entry __do_softirq(void) kstat_incr_softirqs_this_cpu(vec_nr); trace_softirq_entry(vec_nr); @@ -1975,7 +1689,7 @@ index 0427a86743a4..5e6a9b4ccb41 100644 trace_softirq_exit(vec_nr); if (unlikely(prev_count != preempt_count())) { pr_err("huh, entered softirq %u %s %p with preempt_count %08x, exited with %08x?\n", -@@ -452,7 +452,7 @@ void __raise_softirq_irqoff(unsigned int nr) +@@ -486,7 +486,7 @@ void __raise_softirq_irqoff(unsigned int nr) or_softirq_pending(1UL << nr); } @@ -1984,7 +1698,7 @@ index 0427a86743a4..5e6a9b4ccb41 100644 { softirq_vec[nr].action = action; } -@@ -498,8 +498,7 @@ void __tasklet_hi_schedule(struct tasklet_struct *t) +@@ -532,8 +532,7 @@ void __tasklet_hi_schedule(struct tasklet_struct *t) } EXPORT_SYMBOL(__tasklet_hi_schedule); @@ -1994,7 +1708,7 @@ index 0427a86743a4..5e6a9b4ccb41 100644 unsigned int softirq_nr) { struct tasklet_struct *list; -@@ -536,14 +535,14 @@ static void tasklet_action_common(struct softirq_action *a, +@@ -573,14 +572,14 @@ static void tasklet_action_common(struct softirq_action *a, } } @@ -2012,53 +1726,29 @@ index 0427a86743a4..5e6a9b4ccb41 100644 + tasklet_action_common(this_cpu_ptr(&tasklet_hi_vec), HI_SOFTIRQ); } - void tasklet_init(struct tasklet_struct *t, + void tasklet_setup(struct tasklet_struct *t, diff --git a/kernel/sysctl.c b/kernel/sysctl.c -index 70665934d53e..9b2fc21fb844 100644 +index afad085960b8..8fd007fbec4c 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c -@@ -68,6 +68,7 @@ - #include <linux/bpf.h> - #include <linux/mount.h> - #include <linux/userfaultfd_k.h> -+#include <linux/tty.h> - - #include "../lib/kstrtox.h" - -@@ -104,12 +105,25 @@ - #if defined(CONFIG_SYSCTL) - - /* External variables not in a header file. */ -+#if IS_ENABLED(CONFIG_USB) -+int deny_new_usb __read_mostly = 0; -+EXPORT_SYMBOL(deny_new_usb); -+#endif -+#ifdef CONFIG_HARDENED_SYSFS_RESTRICT -+int __read_mostly sysfs_restricted = 1; -+#endif -+#ifdef CONFIG_HARDENED_FIFO -+int __read_mostly fifo_restrictions = 1; -+#endif - extern int suid_dumpable; - #ifdef CONFIG_COREDUMP - extern int core_uses_pid; - extern char core_pattern[]; - extern unsigned int core_pipe_limit; +@@ -103,38 +103,44 @@ + #ifdef CONFIG_LOCKUP_DETECTOR + #include <linux/nmi.h> #endif +#ifdef CONFIG_USER_NS -+extern int unprivileged_userns_clone; ++#include <linux/user_namespace.h> +#endif - extern int pid_max; - extern int pid_max_min, pid_max_max; - extern int percpu_pagelist_fraction; -@@ -121,32 +135,32 @@ extern int sysctl_nr_trim_pages; ++#if defined CONFIG_TTY ++#include <linux/tty.h> ++#endif + + #if defined(CONFIG_SYSCTL) /* Constants used for minimum and maximum */ #ifdef CONFIG_LOCKUP_DETECTOR -static int sixty = 60; -+static int sixty __read_only = 60; - #endif - +-#endif +- -static int __maybe_unused neg_one = -1; -static int __maybe_unused two = 2; -static int __maybe_unused four = 4; @@ -2066,7 +1756,11 @@ index 70665934d53e..9b2fc21fb844 100644 -static unsigned long one_ul = 1; -static unsigned long long_max = LONG_MAX; -static int one_hundred = 100; +-static int two_hundred = 200; -static int one_thousand = 1000; ++static int sixty __read_only = 60; ++#endif ++ +static int __maybe_unused neg_one __read_only = -1; +static int __maybe_unused two __read_only = 2; +static int __maybe_unused four __read_only = 4; @@ -2074,6 +1768,7 @@ index 70665934d53e..9b2fc21fb844 100644 +static unsigned long one_ul __read_only = 1; +static unsigned long long_max __read_only = LONG_MAX; +static int one_hundred __read_only = 100; ++static int two_hundred __read_only = 200; +static int one_thousand __read_only = 1000; #ifdef CONFIG_PRINTK -static int ten_thousand = 10000; @@ -2099,7 +1794,7 @@ index 70665934d53e..9b2fc21fb844 100644 static const int cap_last_cap = CAP_LAST_CAP; /* -@@ -154,9 +168,12 @@ static const int cap_last_cap = CAP_LAST_CAP; +@@ -142,7 +148,7 @@ static const int cap_last_cap = CAP_LAST_CAP; * and hung_task_check_interval_secs */ #ifdef CONFIG_DETECT_HUNG_TASK @@ -2107,14 +1802,9 @@ index 70665934d53e..9b2fc21fb844 100644 +static unsigned long hung_task_timeout_max __read_only = (LONG_MAX/HZ); #endif -+int device_sidechannel_restrict __read_mostly = 1; -+EXPORT_SYMBOL(device_sidechannel_restrict); -+ #ifdef CONFIG_INOTIFY_USER - #include <linux/inotify.h> +@@ -185,19 +191,19 @@ int sysctl_legacy_va_layout; #endif -@@ -301,19 +318,19 @@ static struct ctl_table sysctl_base_table[] = { - }; #ifdef CONFIG_SCHED_DEBUG -static int min_sched_granularity_ns = 100000; /* 100 usecs */ @@ -2140,8 +1830,59 @@ index 70665934d53e..9b2fc21fb844 100644 +static int max_extfrag_threshold __read_only = 1000; #endif - static struct ctl_table kern_table[] = { -@@ -546,6 +563,15 @@ static struct ctl_table kern_table[] = { + #endif /* CONFIG_SYSCTL */ +@@ -887,8 +893,27 @@ static int proc_taint(struct ctl_table *table, int write, + return err; + } + +-#ifdef CONFIG_PRINTK +-static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write, ++/** ++ * proc_dointvec_minmax_sysadmin - read a vector of integers with min/max values ++ * checking CAP_SYS_ADMIN on write ++ * @table: the sysctl table ++ * @write: %TRUE if this is a write to the sysctl file ++ * @buffer: the user buffer ++ * @lenp: the size of the user buffer ++ * @ppos: file position ++ * ++ * Reads/writes up to table->maxlen/sizeof(unsigned int) integer ++ * values from/to the user buffer, treated as an ASCII string. ++ * ++ * This routine will ensure the values are within the range specified by ++ * table->extra1 (min) and table->extra2 (max). ++ * ++ * Writing is only allowed when root has CAP_SYS_ADMIN. ++ * ++ * Returns 0 on success, -EPERM on permission failure or -EINVAL on write ++ * when the range check fails. ++ */ ++int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) + { + if (write && !capable(CAP_SYS_ADMIN)) +@@ -896,7 +921,6 @@ static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write, + + return proc_dointvec_minmax(table, write, buffer, lenp, ppos); + } +-#endif + + /** + * struct do_proc_dointvec_minmax_conv_param - proc_dointvec_minmax() range checking structure +@@ -1582,6 +1606,12 @@ int proc_douintvec_minmax(struct ctl_table *table, int write, + return -ENOSYS; + } + ++int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write, ++ void *buffer, size_t *lenp, loff_t *ppos) ++{ ++ return -ENOSYS; ++} ++ + int proc_dointvec_jiffies(struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos) + { +@@ -1902,6 +1932,15 @@ static struct ctl_table kern_table[] = { .proc_handler = proc_dointvec, }, #endif @@ -2157,11 +1898,10 @@ index 70665934d53e..9b2fc21fb844 100644 #ifdef CONFIG_PROC_SYSCTL { .procname = "tainted", -@@ -901,6 +927,59 @@ static struct ctl_table kern_table[] = { - .extra1 = SYSCTL_ZERO, +@@ -2260,6 +2299,26 @@ static struct ctl_table kern_table[] = { .extra2 = &two, }, -+#endif + #endif +#if defined CONFIG_TTY + { + .procname = "tiocsti_restrict", @@ -2182,46 +1922,22 @@ index 70665934d53e..9b2fc21fb844 100644 + .extra1 = SYSCTL_ZERO, + .extra2 = SYSCTL_ONE, + }, -+#if IS_ENABLED(CONFIG_USB) -+ { -+ .procname = "deny_new_usb", -+ .data = &deny_new_usb, -+ .maxlen = sizeof(int), -+ .mode = 0644, -+ .proc_handler = proc_dointvec_minmax_sysadmin, -+ .extra1 = SYSCTL_ZERO, -+ .extra2 = SYSCTL_ONE, -+ }, -+#endif -+#ifdef CONFIG_HARDENED_SYSFS_RESTRICT -+ { -+ .procname = "sysfs_restricted", -+ .data = &sysfs_restricted, -+ .maxlen = sizeof(int), -+ .mode = 0644, -+ .proc_handler = proc_dointvec_minmax_sysadmin, -+ .extra1 = SYSCTL_ZERO, -+ .extra2 = SYSCTL_ONE, -+ }, -+#endif -+#ifdef CONFIG_HARDENED_FIFO -+ { -+ .procname = "fifo_restrictions", -+ .data = &fifo_restrictions, -+ .maxlen = sizeof(int), -+ .mode = 0644, -+ .proc_handler = proc_dointvec_minmax_sysadmin, -+ .extra1 = SYSCTL_ZERO, -+ .extra2 = SYSCTL_ONE, -+ }, - #endif { .procname = "ngroups_max", + .data = &ngroups_max, +@@ -3415,6 +3474,7 @@ EXPORT_SYMBOL(proc_douintvec); + EXPORT_SYMBOL(proc_dointvec_jiffies); + EXPORT_SYMBOL(proc_dointvec_minmax); + EXPORT_SYMBOL_GPL(proc_douintvec_minmax); ++EXPORT_SYMBOL(proc_dointvec_minmax_sysadmin); + EXPORT_SYMBOL(proc_dointvec_userhz_jiffies); + EXPORT_SYMBOL(proc_dointvec_ms_jiffies); + EXPORT_SYMBOL(proc_dostring); diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c -index 7f31932216a1..9ede224fc81f 100644 +index 387b4bef7dd1..8fe28c28a906 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c -@@ -1583,7 +1583,7 @@ static void __hrtimer_run_queues(struct hrtimer_cpu_base *cpu_base, ktime_t now, +@@ -1587,7 +1587,7 @@ static void __hrtimer_run_queues(struct hrtimer_cpu_base *cpu_base, ktime_t now, } } @@ -2231,10 +1947,10 @@ index 7f31932216a1..9ede224fc81f 100644 struct hrtimer_cpu_base *cpu_base = this_cpu_ptr(&hrtimer_bases); unsigned long flags; diff --git a/kernel/time/timer.c b/kernel/time/timer.c -index 4820823515e9..1a61e5aa87ae 100644 +index c3ad64fb9d8b..217bc49a3856 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c -@@ -1779,7 +1779,7 @@ static inline void __run_timers(struct timer_base *base) +@@ -1753,7 +1753,7 @@ static inline void __run_timers(struct timer_base *base) /* * This function runs timers and the timer-tq in bottom half context. */ @@ -2244,7 +1960,7 @@ index 4820823515e9..1a61e5aa87ae 100644 struct timer_base *base = this_cpu_ptr(&timer_bases[BASE_STD]); diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c -index 8eadadc478f9..c36ecd19562c 100644 +index e703d5d9cbe8..5758274feaee 100644 --- a/kernel/user_namespace.c +++ b/kernel/user_namespace.c @@ -21,6 +21,13 @@ @@ -2262,12 +1978,12 @@ index 8eadadc478f9..c36ecd19562c 100644 static DEFINE_MUTEX(userns_state_mutex); diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug -index 93d97f9b0157..fb923cae2120 100644 +index c789b39ed527..5fce84adc315 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug -@@ -352,6 +352,9 @@ config SECTION_MISMATCH_WARN_ONLY +@@ -374,6 +374,9 @@ config DEBUG_FORCE_FUNCTION_ALIGN_32B - If unsure, say Y. + It is mainly for debug and performance tuning use. +config DEBUG_WRITABLE_FUNCTION_POINTERS_VERBOSE + bool "Enable verbose reporting of writable function pointers" @@ -2275,7 +1991,16 @@ index 93d97f9b0157..fb923cae2120 100644 # # Select this config option from the architecture Kconfig, if it # is preferred to always offer frame pointers as a config -@@ -974,6 +977,7 @@ endmenu # "Debug lockups and hangs" +@@ -488,7 +491,7 @@ config DEBUG_FS + choice + prompt "Debugfs default access" + depends on DEBUG_FS +- default DEBUG_FS_ALLOW_ALL ++ default DEBUG_FS_ALLOW_NONE + help + This selects the default access restrictions for debugfs. + It can be overridden with kernel command line option +@@ -894,6 +897,7 @@ menu "Debug Oops, Lockups and Hangs" config PANIC_ON_OOPS bool "Panic on Oops" @@ -2283,7 +2008,7 @@ index 93d97f9b0157..fb923cae2120 100644 help Say Y here to enable the kernel to panic when it oopses. This has the same effect as setting oops=panic on the kernel command -@@ -983,7 +987,7 @@ config PANIC_ON_OOPS +@@ -903,7 +907,7 @@ config PANIC_ON_OOPS anything erroneous after an oops which could result in data corruption or other issues. @@ -2292,7 +2017,7 @@ index 93d97f9b0157..fb923cae2120 100644 config PANIC_ON_OOPS_VALUE int -@@ -1352,6 +1356,7 @@ config DEBUG_BUGVERBOSE +@@ -1471,6 +1475,7 @@ menu "Debug kernel data structures" config DEBUG_LIST bool "Debug linked list manipulation" depends on DEBUG_KERNEL || BUG_ON_DATA_CORRUPTION @@ -2300,7 +2025,7 @@ index 93d97f9b0157..fb923cae2120 100644 help Enable this to turn on extended checks in the linked-list walking routines. -@@ -2073,6 +2078,7 @@ config MEMTEST +@@ -1510,6 +1515,7 @@ config DEBUG_NOTIFIERS config BUG_ON_DATA_CORRUPTION bool "Trigger a BUG when data corruption is detected" select DEBUG_LIST @@ -2308,12 +2033,12 @@ index 93d97f9b0157..fb923cae2120 100644 help Select this option if the kernel should BUG when it encounters data corruption in kernel memory structures when they get checked -@@ -2112,6 +2118,7 @@ config STRICT_DEVMEM +@@ -1665,6 +1671,7 @@ config STRICT_DEVMEM config IO_STRICT_DEVMEM bool "Filter I/O access to /dev/mem" depends on STRICT_DEVMEM + default y - ---help--- + help If this option is disabled, you allow userspace (root) access to all io-memory regardless of whether a driver is actively using that diff --git a/lib/irq_poll.c b/lib/irq_poll.c @@ -2330,10 +2055,10 @@ index 2f17b488d58e..b6e7996a0058 100644 struct list_head *list = this_cpu_ptr(&blk_cpu_iopoll); int rearm = 0, budget = irq_poll_budget; diff --git a/lib/kobject.c b/lib/kobject.c -index 83198cb37d8d..4a053b7aef42 100644 +index ea53b30cf483..5343bbeea5f8 100644 --- a/lib/kobject.c +++ b/lib/kobject.c -@@ -1009,9 +1009,9 @@ EXPORT_SYMBOL_GPL(kset_create_and_add); +@@ -1023,9 +1023,9 @@ EXPORT_SYMBOL_GPL(kset_create_and_add); static DEFINE_SPINLOCK(kobj_ns_type_lock); @@ -2346,10 +2071,10 @@ index 83198cb37d8d..4a053b7aef42 100644 enum kobj_ns_type type = ops->type; int error; diff --git a/lib/nlattr.c b/lib/nlattr.c -index cace9b307781..39ba1387045d 100644 +index 74019c8ebf6b..c480b4e7ffef 100644 --- a/lib/nlattr.c +++ b/lib/nlattr.c -@@ -571,6 +571,8 @@ int nla_memcpy(void *dest, const struct nlattr *src, int count) +@@ -778,6 +778,8 @@ int nla_memcpy(void *dest, const struct nlattr *src, int count) { int minlen = min_t(int, count, nla_len(src)); @@ -2359,10 +2084,10 @@ index cace9b307781..39ba1387045d 100644 if (count > minlen) memset(dest + minlen, 0, count - minlen); diff --git a/lib/vsprintf.c b/lib/vsprintf.c -index e78017a3e1bd..ac5a5b5a439b 100644 +index 14c9a6af1b23..2501f75bd74d 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c -@@ -771,7 +771,7 @@ static char *ptr_to_id(char *buf, char *end, const void *ptr, +@@ -821,7 +821,7 @@ static char *ptr_to_id(char *buf, char *end, const void *ptr, return pointer_string(buf, end, (const void *)hashval, spec); } @@ -2372,24 +2097,36 @@ index e78017a3e1bd..ac5a5b5a439b 100644 static noinline_for_stack char *restricted_pointer(char *buf, char *end, const void *ptr, diff --git a/mm/Kconfig b/mm/Kconfig -index a5dae9a7eb51..0a3070c5a125 100644 +index 390165ffbb0f..3b24c9e3535e 100644 --- a/mm/Kconfig +++ b/mm/Kconfig -@@ -303,7 +303,8 @@ config KSM +@@ -321,7 +321,8 @@ config KSM config DEFAULT_MMAP_MIN_ADDR - int "Low address space to protect from user allocation" + int "Low address space to protect from user allocation" depends on MMU -- default 4096 +- default 4096 + default 32768 if ARM || (ARM64 && COMPAT) + default 65536 - help + help This is the portion of low virtual memory which should be protected from userspace allocation. Keeping a user from writing to low pages +diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug +index 864f129f1937..929d585bd267 100644 +--- a/mm/Kconfig.debug ++++ b/mm/Kconfig.debug +@@ -126,6 +126,7 @@ config DEBUG_WX + depends on ARCH_HAS_DEBUG_WX + depends on MMU + select PTDUMP_CORE ++ default y + help + Generate a warning if any W+X mappings are found at boot. + diff --git a/mm/mmap.c b/mm/mmap.c -index 4390dbea4aa5..076fd46af68c 100644 +index 5c8b4485860d..0e26c225bb53 100644 --- a/mm/mmap.c +++ b/mm/mmap.c -@@ -230,6 +230,13 @@ SYSCALL_DEFINE1(brk, unsigned long, brk) +@@ -231,6 +231,13 @@ SYSCALL_DEFINE1(brk, unsigned long, brk) newbrk = PAGE_ALIGN(brk); oldbrk = PAGE_ALIGN(mm->brk); @@ -2404,20 +2141,20 @@ index 4390dbea4aa5..076fd46af68c 100644 mm->brk = brk; goto success; diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 45e39131a716..78b4865f8a1c 100644 +index 32f783ddb5c3..3a7e9c279c35 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -68,6 +68,7 @@ - #include <linux/lockdep.h> - #include <linux/nmi.h> +@@ -70,6 +70,7 @@ #include <linux/psi.h> + #include <linux/padata.h> + #include <linux/khugepaged.h> +#include <linux/random.h> #include <asm/sections.h> #include <asm/tlbflush.h> -@@ -106,6 +107,15 @@ struct pcpu_drain { - DEFINE_MUTEX(pcpu_drain_mutex); - DEFINE_PER_CPU(struct pcpu_drain, pcpu_drain); +@@ -136,6 +137,15 @@ struct pcpu_drain { + static DEFINE_MUTEX(pcpu_drain_mutex); + static DEFINE_PER_CPU(struct pcpu_drain, pcpu_drain); +bool __meminitdata extra_latent_entropy; + @@ -2431,7 +2168,7 @@ index 45e39131a716..78b4865f8a1c 100644 #ifdef CONFIG_GCC_PLUGIN_LATENT_ENTROPY volatile unsigned long latent_entropy __latent_entropy; EXPORT_SYMBOL(latent_entropy); -@@ -1427,6 +1437,25 @@ static void __free_pages_ok(struct page *page, unsigned int order) +@@ -1527,6 +1537,25 @@ static void __free_pages_ok(struct page *page, unsigned int order, local_irq_restore(flags); } @@ -2457,15 +2194,15 @@ index 45e39131a716..78b4865f8a1c 100644 void __free_pages_core(struct page *page, unsigned int order) { unsigned int nr_pages = 1 << order; -@@ -1441,7 +1470,6 @@ void __free_pages_core(struct page *page, unsigned int order) +@@ -1546,7 +1575,6 @@ void __free_pages_core(struct page *page, unsigned int order) } __ClearPageReserved(p); set_page_count(p, 0); - atomic_long_add(nr_pages, &page_zone(page)->managed_pages); - set_page_refcounted(page); - __free_pages(page, order); -@@ -1492,6 +1520,7 @@ void __init memblock_free_pages(struct page *page, unsigned long pfn, + + /* +@@ -1605,6 +1633,7 @@ void __init memblock_free_pages(struct page *page, unsigned long pfn, { if (early_page_uninitialised(pfn)) return; @@ -2473,7 +2210,7 @@ index 45e39131a716..78b4865f8a1c 100644 __free_pages_core(page, order); } -@@ -1582,6 +1611,7 @@ static void __init deferred_free_range(unsigned long pfn, +@@ -1696,6 +1725,7 @@ static void __init deferred_free_range(unsigned long pfn, if (nr_pages == pageblock_nr_pages && (pfn & (pageblock_nr_pages - 1)) == 0) { set_pageblock_migratetype(page, MIGRATE_MOVABLE); @@ -2481,7 +2218,7 @@ index 45e39131a716..78b4865f8a1c 100644 __free_pages_core(page, pageblock_order); return; } -@@ -1589,6 +1619,7 @@ static void __init deferred_free_range(unsigned long pfn, +@@ -1703,6 +1733,7 @@ static void __init deferred_free_range(unsigned long pfn, for (i = 0; i < nr_pages; i++, page++, pfn++) { if ((pfn & (pageblock_nr_pages - 1)) == 0) set_pageblock_migratetype(page, MIGRATE_MOVABLE); @@ -2489,7 +2226,7 @@ index 45e39131a716..78b4865f8a1c 100644 __free_pages_core(page, 0); } } -@@ -2156,6 +2187,12 @@ static void prep_new_page(struct page *page, unsigned int order, gfp_t gfp_flags +@@ -2282,6 +2313,12 @@ static void prep_new_page(struct page *page, unsigned int order, gfp_t gfp_flags { post_alloc_hook(page, order, gfp_flags); @@ -2503,10 +2240,10 @@ index 45e39131a716..78b4865f8a1c 100644 kernel_init_free_pages(page, 1 << order); diff --git a/mm/slab.h b/mm/slab.h -index b2b01694dc43..b531661095a2 100644 +index f9977d6613d6..2138deacf719 100644 --- a/mm/slab.h +++ b/mm/slab.h -@@ -470,9 +470,13 @@ static inline struct kmem_cache *virt_to_cache(const void *obj) +@@ -435,9 +435,13 @@ static inline struct kmem_cache *virt_to_cache(const void *obj) struct page *page; page = virt_to_head_page(obj); @@ -2520,25 +2257,26 @@ index b2b01694dc43..b531661095a2 100644 return page->slab_cache; } -@@ -518,9 +522,14 @@ static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x) +@@ -467,10 +471,15 @@ static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x) return s; cachep = virt_to_cache(x); -- WARN_ONCE(cachep && !slab_equal_or_root(cachep, s), +- if (WARN(cachep && cachep != s, - "%s: Wrong slab cache. %s but object is from %s\n", -- __func__, s->name, cachep->name); -+ if (cachep && !slab_equal_or_root(cachep, s)) { +- __func__, s->name, cachep->name)) ++ if (cachep && cachep != s) { +#ifdef CONFIG_BUG_ON_DATA_CORRUPTION + BUG(); +#else -+ WARN_ONCE(1, "%s: Wrong slab cache. %s but object is from %s\n", -+ __func__, s->name, cachep->name); ++ WARN(1, "%s: Wrong slab cache. %s but object is from %s\n", ++ __func__, s->name, cachep->name); +#endif + print_tracking(cachep, x); + } return cachep; } -@@ -545,7 +554,7 @@ static inline size_t slab_ksize(const struct kmem_cache *s) +@@ -495,7 +504,7 @@ static inline size_t slab_ksize(const struct kmem_cache *s) * back there or track user information then we can * only use the space before that information. */ @@ -2547,7 +2285,7 @@ index b2b01694dc43..b531661095a2 100644 return s->inuse; /* * Else we can use all the padding etc for the allocation -@@ -674,8 +683,10 @@ static inline void cache_random_seq_destroy(struct kmem_cache *cachep) { } +@@ -621,8 +630,10 @@ static inline void cache_random_seq_destroy(struct kmem_cache *cachep) { } static inline bool slab_want_init_on_alloc(gfp_t flags, struct kmem_cache *c) { if (static_branch_unlikely(&init_on_alloc)) { @@ -2558,7 +2296,7 @@ index b2b01694dc43..b531661095a2 100644 if (c->flags & (SLAB_TYPESAFE_BY_RCU | SLAB_POISON)) return flags & __GFP_ZERO; return true; -@@ -685,9 +696,15 @@ static inline bool slab_want_init_on_alloc(gfp_t flags, struct kmem_cache *c) +@@ -632,9 +643,15 @@ static inline bool slab_want_init_on_alloc(gfp_t flags, struct kmem_cache *c) static inline bool slab_want_init_on_free(struct kmem_cache *c) { @@ -2578,10 +2316,10 @@ index b2b01694dc43..b531661095a2 100644 } diff --git a/mm/slab_common.c b/mm/slab_common.c -index ade6c257d4b4..f8f9ebd51296 100644 +index f9ccd5dc13f3..2b73c12d8fce 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c -@@ -28,10 +28,10 @@ +@@ -30,10 +30,10 @@ #include "slab.h" @@ -2594,7 +2332,7 @@ index ade6c257d4b4..f8f9ebd51296 100644 #ifdef CONFIG_HARDENED_USERCOPY bool usercopy_fallback __ro_after_init = -@@ -59,7 +59,7 @@ static DECLARE_WORK(slab_caches_to_rcu_destroy_work, +@@ -61,7 +61,7 @@ static DECLARE_WORK(slab_caches_to_rcu_destroy_work, /* * Merge control. If this is set then no merging of slab caches will occur. */ @@ -2604,11 +2342,11 @@ index ade6c257d4b4..f8f9ebd51296 100644 static int __init setup_slab_nomerge(char *str) { diff --git a/mm/slub.c b/mm/slub.c -index 20d72cb20515..3820def7e275 100644 +index 34dcc09e2ec9..cb8abacabfdb 100644 --- a/mm/slub.c +++ b/mm/slub.c -@@ -125,6 +125,12 @@ static inline int kmem_cache_debug(struct kmem_cache *s) - #endif +@@ -127,6 +127,12 @@ static inline bool kmem_cache_debug(struct kmem_cache *s) + return kmem_cache_debug_flags(s, SLAB_DEBUG_FLAGS); } +static inline bool has_sanitize_verify(struct kmem_cache *s) @@ -2619,17 +2357,33 @@ index 20d72cb20515..3820def7e275 100644 + void *fixup_red_left(struct kmem_cache *s, void *p) { - if (kmem_cache_debug(s) && s->flags & SLAB_RED_ZONE) -@@ -309,6 +315,35 @@ static inline void set_freepointer(struct kmem_cache *s, void *object, void *fp) - *(void **)freeptr_addr = freelist_ptr(s, fp, freeptr_addr); + if (kmem_cache_debug_flags(s, SLAB_RED_ZONE)) +@@ -486,13 +492,13 @@ static inline void *restore_red_left(struct kmem_cache *s, void *p) + * Debug settings: + */ + #if defined(CONFIG_SLUB_DEBUG_ON) +-static slab_flags_t slub_debug = DEBUG_DEFAULT_FLAGS; ++static slab_flags_t slub_debug __ro_after_init = DEBUG_DEFAULT_FLAGS; + #else +-static slab_flags_t slub_debug; ++static slab_flags_t slub_debug __ro_after_init; + #endif + +-static char *slub_debug_string; +-static int disable_higher_order_debug; ++static char *slub_debug_string __ro_after_init; ++static int disable_higher_order_debug __ro_after_init; + + /* + * slub is about to manipulate internal object metadata. This memory lies +@@ -563,6 +569,33 @@ static inline unsigned int get_info_end(struct kmem_cache *s) + return s->inuse; } +#ifdef CONFIG_SLAB_CANARY +static inline unsigned long *get_canary(struct kmem_cache *s, void *object) +{ -+ if (s->offset) -+ return object + s->offset + sizeof(void *); -+ return object + s->inuse; ++ return object + get_info_end(s); +} + +static inline unsigned long get_canary_value(const void *canary, unsigned long value) @@ -2653,30 +2407,12 @@ index 20d72cb20515..3820def7e275 100644 +#define check_canary(s, object, value) +#endif + - /* Loop over all objects in a slab */ - #define for_each_object(__p, __s, __addr, __objects) \ - for (__p = fixup_red_left(__s, __addr); \ -@@ -476,13 +511,13 @@ static inline void *restore_red_left(struct kmem_cache *s, void *p) - * Debug settings: - */ - #if defined(CONFIG_SLUB_DEBUG_ON) --static slab_flags_t slub_debug = DEBUG_DEFAULT_FLAGS; -+static slab_flags_t slub_debug __ro_after_init = DEBUG_DEFAULT_FLAGS; - #else --static slab_flags_t slub_debug; -+static slab_flags_t slub_debug __ro_after_init; - #endif - --static char *slub_debug_slabs; --static int disable_higher_order_debug; -+static char *slub_debug_slabs __ro_after_init; -+static int disable_higher_order_debug __ro_after_init; + static struct track *get_track(struct kmem_cache *s, void *object, + enum track_item alloc) + { +@@ -570,6 +603,9 @@ static struct track *get_track(struct kmem_cache *s, void *object, - /* - * slub is about to manipulate internal object metadata. This memory lies -@@ -543,6 +578,9 @@ static struct track *get_track(struct kmem_cache *s, void *object, - else - p = object + s->inuse; + p = object + get_info_end(s); + if (IS_ENABLED(CONFIG_SLAB_CANARY)) + p = (void *)p + sizeof(void *); @@ -2684,9 +2420,9 @@ index 20d72cb20515..3820def7e275 100644 return p + alloc; } -@@ -673,6 +711,9 @@ static void print_trailer(struct kmem_cache *s, struct page *page, u8 *p) - else - off = s->inuse; +@@ -711,6 +747,9 @@ static void print_trailer(struct kmem_cache *s, struct page *page, u8 *p) + + off = get_info_end(s); + if (IS_ENABLED(CONFIG_SLAB_CANARY)) + off += sizeof(void *); @@ -2694,9 +2430,21 @@ index 20d72cb20515..3820def7e275 100644 if (s->flags & SLAB_STORE_USER) off += 2 * sizeof(struct track); -@@ -802,6 +843,9 @@ static int check_pad_bytes(struct kmem_cache *s, struct page *page, u8 *p) - /* Freepointer is placed after the object. */ - off += sizeof(void *); +@@ -819,8 +858,9 @@ static int check_bytes_and_report(struct kmem_cache *s, struct page *page, + * Meta data starts here. + * + * A. Free pointer (if we cannot overwrite object on free) +- * B. Tracking data for SLAB_STORE_USER +- * C. Padding to reach required alignment boundary or at mininum ++ * B. Canary for SLAB_CANARY ++ * C. Tracking data for SLAB_STORE_USER ++ * D. Padding to reach required alignment boundary or at mininum + * one word if debugging is on to be able to detect writes + * before the word boundary. + * +@@ -838,6 +878,9 @@ static int check_pad_bytes(struct kmem_cache *s, struct page *page, u8 *p) + { + unsigned long off = get_info_end(s); /* The end of info */ + if (IS_ENABLED(CONFIG_SLAB_CANARY)) + off += sizeof(void *); @@ -2704,7 +2452,7 @@ index 20d72cb20515..3820def7e275 100644 if (s->flags & SLAB_STORE_USER) /* We also have user information there */ off += 2 * sizeof(struct track); -@@ -1441,6 +1485,8 @@ static inline bool slab_free_freelist_hook(struct kmem_cache *s, +@@ -1561,6 +1604,8 @@ static inline bool slab_free_freelist_hook(struct kmem_cache *s, object = next; next = get_freepointer(s, object); @@ -2713,7 +2461,7 @@ index 20d72cb20515..3820def7e275 100644 if (slab_want_init_on_free(s)) { /* * Clear the object and the metadata, but don't touch -@@ -1451,8 +1497,12 @@ static inline bool slab_free_freelist_hook(struct kmem_cache *s, +@@ -1571,8 +1616,12 @@ static inline bool slab_free_freelist_hook(struct kmem_cache *s, : 0; memset((char *)object + s->inuse, 0, s->size - s->inuse - rsize); @@ -2727,7 +2475,26 @@ index 20d72cb20515..3820def7e275 100644 /* If object's reuse doesn't have to be delayed */ if (!slab_free_hook(s, object)) { /* Move object to the new freelist */ -@@ -1473,8 +1523,9 @@ static void *setup_object(struct kmem_cache *s, struct page *page, +@@ -1580,6 +1629,18 @@ static inline bool slab_free_freelist_hook(struct kmem_cache *s, + *head = object; + if (!*tail) + *tail = object; ++ } else if (slab_want_init_on_free(s) && s->ctor) { ++ /* Objects that are put into quarantine by KASAN will ++ * still undergo free_consistency_checks() and thus ++ * need to show a valid freepointer to check_object(). ++ * ++ * Note that doing this for all caches (not just ctor ++ * ones, which have s->offset >= object_size)) causes a ++ * GPF, due to KASAN poisoning and the way ++ * set_freepointer() eventually dereferences the ++ * freepointer. ++ */ ++ set_freepointer(s, object, NULL); + } + } while (object != old_tail); + +@@ -1593,8 +1654,9 @@ static void *setup_object(struct kmem_cache *s, struct page *page, void *object) { setup_object_debug(s, page, object); @@ -2738,7 +2505,7 @@ index 20d72cb20515..3820def7e275 100644 kasan_unpoison_object_data(s, object); s->ctor(object); kasan_poison_object_data(s, object); -@@ -2752,8 +2803,28 @@ static __always_inline void *slab_alloc_node(struct kmem_cache *s, +@@ -2885,8 +2947,28 @@ static __always_inline void *slab_alloc_node(struct kmem_cache *s, maybe_wipe_obj_freeptr(s, object); @@ -2766,42 +2533,39 @@ index 20d72cb20515..3820def7e275 100644 + set_canary(s, object, s->random_active); + } - slab_post_alloc_hook(s, gfpflags, 1, &object); + slab_post_alloc_hook(s, objcg, gfpflags, 1, &object); -@@ -3136,7 +3207,7 @@ int kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t size, +@@ -3275,7 +3357,7 @@ int kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t size, void **p) { struct kmem_cache_cpu *c; - int i; + int i, k; + struct obj_cgroup *objcg = NULL; /* memcg and kmem_cache debug support */ - s = slab_pre_alloc_hook(s, flags); -@@ -3176,11 +3247,38 @@ int kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t size, +@@ -3325,11 +3407,35 @@ int kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t size, local_irq_enable(); /* Clear memory outside IRQ disabled fastpath loop */ - if (unlikely(slab_want_init_on_alloc(flags, s))) { + if (has_sanitize_verify(s)) { -+ size_t offset = s->offset ? 0 : sizeof(void *); - int j; - -- for (j = 0; j < i; j++) ++ int j; ++ + for (j = 0; j < i; j++) { + /* KASAN hasn't unpoisoned the object yet (this is done + * in the post-alloc hook), so let's do it temporarily. + */ + kasan_unpoison_object_data(s, p[j]); -+ BUG_ON(memchr_inv(p[j] + offset, 0, s->object_size - offset)); ++ BUG_ON(memchr_inv(p[j], 0, s->object_size)); + if (s->ctor) + s->ctor(p[j]); + kasan_poison_object_data(s, p[j]); -+ if (unlikely(flags & __GFP_ZERO) && offset) -+ memset(p[j], 0, sizeof(void *)); + } + } else if (unlikely(slab_want_init_on_alloc(flags, s))) { -+ int j; -+ + int j; + +- for (j = 0; j < i; j++) + for (j = 0; j < i; j++) { memset(p[j], 0, s->object_size); + if (s->ctor) { @@ -2818,7 +2582,7 @@ index 20d72cb20515..3820def7e275 100644 } /* memcg and kmem_cache debug support */ -@@ -3214,9 +3312,9 @@ EXPORT_SYMBOL(kmem_cache_alloc_bulk); +@@ -3363,9 +3469,9 @@ EXPORT_SYMBOL(kmem_cache_alloc_bulk); * and increases the number of allocations possible without having to * take the list_lock. */ @@ -2831,7 +2595,7 @@ index 20d72cb20515..3820def7e275 100644 /* * Calculate the order of allocation given an slab object size. -@@ -3384,6 +3482,7 @@ static void early_kmem_cache_node_alloc(int node) +@@ -3533,6 +3639,7 @@ static void early_kmem_cache_node_alloc(int node) init_object(kmem_cache_node, n, SLUB_RED_ACTIVE); init_tracking(kmem_cache_node, n); #endif @@ -2839,8 +2603,8 @@ index 20d72cb20515..3820def7e275 100644 n = kasan_kmalloc(kmem_cache_node, n, sizeof(struct kmem_cache_node), GFP_KERNEL); page->freelist = get_freepointer(kmem_cache_node, n); -@@ -3544,6 +3643,9 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order) - size += sizeof(void *); +@@ -3713,6 +3820,9 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order) + s->offset = ALIGN(freepointer_area / 2, sizeof(void *)); } + if (IS_ENABLED(CONFIG_SLAB_CANARY)) @@ -2849,7 +2613,7 @@ index 20d72cb20515..3820def7e275 100644 #ifdef CONFIG_SLUB_DEBUG if (flags & SLAB_STORE_USER) /* -@@ -3616,6 +3718,10 @@ static int kmem_cache_open(struct kmem_cache *s, slab_flags_t flags) +@@ -3786,6 +3896,10 @@ static int kmem_cache_open(struct kmem_cache *s, slab_flags_t flags) #ifdef CONFIG_SLAB_FREELIST_HARDENED s->random = get_random_long(); #endif @@ -2860,7 +2624,7 @@ index 20d72cb20515..3820def7e275 100644 if (!calculate_sizes(s, -1)) goto error; -@@ -3891,6 +3997,8 @@ void __check_heap_object(const void *ptr, unsigned long n, struct page *page, +@@ -4059,6 +4173,8 @@ void __check_heap_object(const void *ptr, unsigned long n, struct page *page, offset -= s->red_left_pad; } @@ -2869,7 +2633,7 @@ index 20d72cb20515..3820def7e275 100644 /* Allow address range falling entirely within usercopy region. */ if (offset >= s->useroffset && offset - s->useroffset <= s->usersize && -@@ -3924,7 +4032,11 @@ size_t __ksize(const void *object) +@@ -4092,7 +4208,11 @@ size_t __ksize(const void *object) page = virt_to_head_page(object); if (unlikely(!PageSlab(page))) { @@ -2881,7 +2645,7 @@ index 20d72cb20515..3820def7e275 100644 return page_size(page); } -@@ -4769,7 +4881,7 @@ enum slab_stat_type { +@@ -4883,7 +5003,7 @@ enum slab_stat_type { #define SO_TOTAL (1 << SL_TOTAL) #ifdef CONFIG_MEMCG @@ -2891,13 +2655,24 @@ index 20d72cb20515..3820def7e275 100644 static int __init setup_slub_memcg_sysfs(char *str) { diff --git a/mm/swap.c b/mm/swap.c -index 38c3fa4308e2..0534c2e348c2 100644 +index 47a47681c86b..762095d95092 100644 --- a/mm/swap.c +++ b/mm/swap.c -@@ -94,6 +94,13 @@ static void __put_compound_page(struct page *page) +@@ -102,6 +102,8 @@ static void __put_single_page(struct page *page) + + static void __put_compound_page(struct page *page) + { ++ compound_page_dtor *dtor; ++ + /* + * __page_cache_release() is supposed to be called for thp, not for + * hugetlb. This is because hugetlb page does never have PageLRU set +@@ -110,7 +112,15 @@ static void __put_compound_page(struct page *page) + */ if (!PageHuge(page)) __page_cache_release(page); - dtor = get_compound_page_dtor(page); +- destroy_compound_page(page); ++ dtor = get_compound_page_dtor(page); + if (!PageHuge(page)) + BUG_ON(dtor != free_compound_page +#ifdef CONFIG_TRANSPARENT_HUGEPAGE @@ -2905,14 +2680,15 @@ index 38c3fa4308e2..0534c2e348c2 100644 +#endif + ); + - (*dtor)(page); ++ (*dtor)(page); } + void __put_page(struct page *page) diff --git a/mm/util.c b/mm/util.c -index 3ad6db9a722e..80209685f67c 100644 +index 4ddb6e186dd5..62ed34dfceb7 100644 --- a/mm/util.c +++ b/mm/util.c -@@ -325,9 +325,9 @@ unsigned long arch_randomize_brk(struct mm_struct *mm) +@@ -336,9 +336,9 @@ unsigned long arch_randomize_brk(struct mm_struct *mm) { /* Is the current task 32bit ? */ if (!IS_ENABLED(CONFIG_64BIT) || is_compat_task()) @@ -2925,19 +2701,19 @@ index 3ad6db9a722e..80209685f67c 100644 unsigned long arch_mmap_rnd(void) diff --git a/net/core/dev.c b/net/core/dev.c -index 82325d3d1371..240e3ae8e298 100644 +index 38412e70f761..c3cd49e04b7b 100644 --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4492,7 +4492,7 @@ int netif_rx_ni(struct sk_buff *skb) +@@ -4856,7 +4856,7 @@ int netif_rx_any_context(struct sk_buff *skb) } - EXPORT_SYMBOL(netif_rx_ni); + EXPORT_SYMBOL(netif_rx_any_context); -static __latent_entropy void net_tx_action(struct softirq_action *h) +static __latent_entropy void net_tx_action(void) { struct softnet_data *sd = this_cpu_ptr(&softnet_data); -@@ -6355,7 +6355,7 @@ static int napi_poll(struct napi_struct *n, struct list_head *repoll) +@@ -6803,7 +6803,7 @@ static int napi_poll(struct napi_struct *n, struct list_head *repoll) return work; } @@ -2946,451 +2722,311 @@ index 82325d3d1371..240e3ae8e298 100644 { struct softnet_data *sd = this_cpu_ptr(&softnet_data); unsigned long time_limit = jiffies + -diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c -index 9f9e00ba3ad7..962c6ca661e4 100644 ---- a/net/core/sysctl_net_core.c -+++ b/net/core/sysctl_net_core.c -@@ -43,6 +43,10 @@ EXPORT_SYMBOL(sysctl_fb_tunnels_only_for_init_net); - int sysctl_devconf_inherit_init_net __read_mostly; - EXPORT_SYMBOL(sysctl_devconf_inherit_init_net); - -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+int sysctl_stealth_blackhole __read_mostly = 1; -+#endif -+ - #ifdef CONFIG_RPS - static int rps_sock_flow_sysctl(struct ctl_table *table, int write, - void __user *buffer, size_t *lenp, loff_t *ppos) -@@ -512,6 +516,17 @@ static struct ctl_table net_core_table[] = { - .proc_handler = set_default_qdisc - }, - #endif -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+ { -+ .procname = "ip_blackhole", -+ .data = &sysctl_stealth_blackhole, -+ .maxlen = sizeof(int), -+ .mode = 0644, -+ .proc_handler = proc_dointvec_minmax, -+ .extra1 = SYSCTL_ZERO, -+ .extra2 = SYSCTL_ONE, -+ }, -+#endif - #endif /* CONFIG_NET */ - { - .procname = "netdev_budget", -diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig -index 03381f3e12ba..8ea409f37436 100644 ---- a/net/ipv4/Kconfig -+++ b/net/ipv4/Kconfig -@@ -267,6 +267,7 @@ config IP_PIMSM_V2 - - config SYN_COOKIES - bool "IP: TCP syncookie support" -+ default y - ---help--- - Normal TCP/IP networking is open to an attack known as "SYN - flooding". This denial-of-service attack prevents legitimate remote -diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c -index ac95ba78b903..249c6970e67c 100644 ---- a/net/ipv4/icmp.c -+++ b/net/ipv4/icmp.c -@@ -190,6 +190,10 @@ struct icmp_control { - short error; /* This ICMP is classed as an error message */ - }; - -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+extern int sysctl_stealth_blackhole; -+#endif -+ - static const struct icmp_control icmp_pointers[NR_ICMP_TYPES+1]; +diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c +index 3da1f77bd039..dbca1f1e2449 100644 +--- a/net/dccp/ccids/ccid2.c ++++ b/net/dccp/ccids/ccid2.c +@@ -126,21 +126,26 @@ static void dccp_tasklet_schedule(struct sock *sk) - /* -@@ -929,6 +933,11 @@ static bool icmp_echo(struct sk_buff *skb) + static void ccid2_hc_tx_rto_expire(struct timer_list *t) { - struct net *net; +- struct ccid2_hc_tx_sock *hc = from_timer(hc, t, tx_rtotimer); +- struct sock *sk = hc->sk; +- const bool sender_was_blocked = ccid2_cwnd_network_limited(hc); ++ struct dccp_sock *dp = from_timer(dp, t, dccps_ccid_timer); ++ struct sock *sk = (struct sock *)dp; ++ struct ccid2_hc_tx_sock *hc; ++ bool sender_was_blocked; -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+ if (likely(sysctl_stealth_blackhole) && !(skb->dev->flags & IFF_LOOPBACK)) -+ return true; -+#endif -+ - net = dev_net(skb_dst(skb)->dev); - if (!net->ipv4.sysctl_icmp_echo_ignore_all) { - struct icmp_bxm icmp_param; -@@ -955,6 +964,12 @@ static bool icmp_echo(struct sk_buff *skb) - static bool icmp_timestamp(struct sk_buff *skb) - { - struct icmp_bxm icmp_param; + bh_lock_sock(sk); + -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+ if (likely(sysctl_stealth_blackhole) && !(skb->dev->flags & IFF_LOOPBACK)) -+ return true; -+#endif -+ - /* - * Too short. - */ -diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c -index 480d0b22db1a..b5f73fb34156 100644 ---- a/net/ipv4/igmp.c -+++ b/net/ipv4/igmp.c -@@ -132,6 +132,10 @@ - ((in_dev)->mr_v2_seen && \ - time_before(jiffies, (in_dev)->mr_v2_seen))) - -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+extern int sysctl_stealth_blackhole; -+#endif ++ if (inet_sk_state_load(sk) == DCCP_CLOSED) ++ goto out; + - static int unsolicited_report_interval(struct in_device *in_dev) - { - int interval_ms, interval_jiffies; -@@ -735,6 +739,11 @@ static int igmp_send_report(struct in_device *in_dev, struct ip_mc_list *pmc, - __be32 dst; - int hlen, tlen; - -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+ if (likely(sysctl_stealth_blackhole)) -+ return -1; -+#endif ++ hc = ccid_priv(dp->dccps_hc_tx_ccid); ++ sender_was_blocked = ccid2_cwnd_network_limited(hc); + - if (type == IGMPV3_HOST_MEMBERSHIP_REPORT) - return igmpv3_send_report(in_dev, pmc); + if (sock_owned_by_user(sk)) { +- sk_reset_timer(sk, &hc->tx_rtotimer, jiffies + HZ / 5); ++ sk_reset_timer(sk, &dp->dccps_ccid_timer, jiffies + HZ / 5); + goto out; + } -diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c -index 6f7155d91313..e320249ecf67 100644 ---- a/net/ipv4/tcp_input.c -+++ b/net/ipv4/tcp_input.c -@@ -313,11 +313,13 @@ static void tcp_ecn_rcv_synack(struct tcp_sock *tp, const struct tcphdr *th) - tp->ecn_flags &= ~TCP_ECN_OK; - } + ccid2_pr_debug("RTO_EXPIRE\n"); -+#ifndef CONFIG_HARDENED_NO_SIMULT_CONNECT - static void tcp_ecn_rcv_syn(struct tcp_sock *tp, const struct tcphdr *th) - { - if ((tp->ecn_flags & TCP_ECN_OK) && (!th->ece || !th->cwr)) - tp->ecn_flags &= ~TCP_ECN_OK; +- if (sk->sk_state == DCCP_CLOSED) +- goto out; +- + /* back-off timer */ + hc->tx_rto <<= 1; + if (hc->tx_rto > DCCP_RTO_MAX) +@@ -166,7 +171,7 @@ static void ccid2_hc_tx_rto_expire(struct timer_list *t) + if (sender_was_blocked) + dccp_tasklet_schedule(sk); + /* restart backed-off timer */ +- sk_reset_timer(sk, &hc->tx_rtotimer, jiffies + hc->tx_rto); ++ sk_reset_timer(sk, &dp->dccps_ccid_timer, jiffies + hc->tx_rto); + out: + bh_unlock_sock(sk); + sock_put(sk); +@@ -330,7 +335,7 @@ static void ccid2_hc_tx_packet_sent(struct sock *sk, unsigned int len) + } + #endif + +- sk_reset_timer(sk, &hc->tx_rtotimer, jiffies + hc->tx_rto); ++ sk_reset_timer(sk, &dp->dccps_ccid_timer, jiffies + hc->tx_rto); + + #ifdef CONFIG_IP_DCCP_CCID2_DEBUG + do { +@@ -700,9 +705,9 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb) + + /* restart RTO timer if not all outstanding data has been acked */ + if (hc->tx_pipe == 0) +- sk_stop_timer(sk, &hc->tx_rtotimer); ++ sk_stop_timer(sk, &dp->dccps_ccid_timer); + else +- sk_reset_timer(sk, &hc->tx_rtotimer, jiffies + hc->tx_rto); ++ sk_reset_timer(sk, &dp->dccps_ccid_timer, jiffies + hc->tx_rto); + done: + /* check if incoming Acks allow pending packets to be sent */ + if (sender_was_blocked && !ccid2_cwnd_network_limited(hc)) +@@ -737,17 +742,18 @@ static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk) + hc->tx_last_cong = hc->tx_lsndtime = hc->tx_cwnd_stamp = ccid2_jiffies32; + hc->tx_cwnd_used = 0; + hc->sk = sk; +- timer_setup(&hc->tx_rtotimer, ccid2_hc_tx_rto_expire, 0); ++ timer_setup(&dp->dccps_ccid_timer, ccid2_hc_tx_rto_expire, 0); + INIT_LIST_HEAD(&hc->tx_av_chunks); + return 0; } -+#endif - static bool tcp_ecn_rcv_ecn_echo(const struct tcp_sock *tp, const struct tcphdr *th) + static void ccid2_hc_tx_exit(struct sock *sk) { -@@ -6026,6 +6028,7 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb, - tcp_paws_reject(&tp->rx_opt, 0)) - goto discard_and_undo; - -+#ifndef CONFIG_HARDENED_NO_SIMULT_CONNECT - if (th->syn) { - /* We see SYN without ACK. It is attempt of - * simultaneous connect with crossed SYNs. -@@ -6077,6 +6080,7 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb, - goto discard; - #endif - } -+#endif - /* "fifth, if neither of the SYN or RST bits is set then - * drop the segment and return." - */ -diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c -index eda64871f983..892c7e1a6f95 100644 ---- a/net/ipv4/tcp_ipv4.c -+++ b/net/ipv4/tcp_ipv4.c -@@ -90,6 +90,10 @@ static int tcp_v4_md5_hash_hdr(char *md5_hash, const struct tcp_md5sig_key *key, - struct inet_hashinfo tcp_hashinfo; - EXPORT_SYMBOL(tcp_hashinfo); - -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+extern int sysctl_stealth_blackhole; -+#endif -+ - static u32 tcp_v4_init_seq(const struct sk_buff *skb) ++ struct dccp_sock *dp = dccp_sk(sk); + struct ccid2_hc_tx_sock *hc = ccid2_hc_tx_sk(sk); + int i; + +- sk_stop_timer(sk, &hc->tx_rtotimer); ++ sk_stop_timer(sk, &dp->dccps_ccid_timer); + + for (i = 0; i < hc->tx_seqbufc; i++) + kfree(hc->tx_seqbuf[i]); +diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c +index b9ee1a4a8955..685f4d046c0d 100644 +--- a/net/dccp/ccids/ccid3.c ++++ b/net/dccp/ccids/ccid3.c +@@ -184,17 +184,24 @@ static inline void ccid3_hc_tx_update_win_count(struct ccid3_hc_tx_sock *hc, + + static void ccid3_hc_tx_no_feedback_timer(struct timer_list *t) { - return secure_tcp_seq(ip_hdr(skb)->daddr, -@@ -1590,6 +1594,9 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb) - return 0; +- struct ccid3_hc_tx_sock *hc = from_timer(hc, t, tx_no_feedback_timer); +- struct sock *sk = hc->sk; ++ struct dccp_sock *dp = from_timer(dp, t, dccps_ccid_timer); ++ struct ccid3_hc_tx_sock *hc; ++ struct sock *sk = (struct sock *)dp; + unsigned long t_nfb = USEC_PER_SEC / 5; + + bh_lock_sock(sk); ++ ++ if (inet_sk_state_load(sk) == DCCP_CLOSED) ++ goto out; ++ + if (sock_owned_by_user(sk)) { + /* Try again later. */ + /* XXX: set some sensible MIB */ + goto restart_timer; + } - reset: -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+ if (!likely(sysctl_stealth_blackhole)) -+#endif - tcp_v4_send_reset(rsk, skb); - discard: - kfree_skb(skb); -@@ -1832,6 +1839,27 @@ int tcp_v4_rcv(struct sk_buff *skb) - if (!pskb_may_pull(skb, th->doff * 4)) - goto discard_it; - -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+ if (likely(sysctl_stealth_blackhole) && -+ ( -+ th->res1 || !tcp_flag_word(th) || -+ tcp_flag_word(th) == TCP_FLAG_PSH || -+ tcp_flag_word(th) & (TCP_FLAG_CWR | TCP_FLAG_ECE) || -+ ( -+ tcp_flag_word(th) & -+ (TCP_FLAG_SYN | TCP_FLAG_FIN | TCP_FLAG_RST) && -+ tcp_flag_word(th) & TCP_FLAG_URG -+ ) || -+ ( -+ tcp_flag_word(th) & -+ (TCP_FLAG_FIN | TCP_FLAG_RST) && -+ tcp_flag_word(th) & TCP_FLAG_SYN -+ ) -+ ) -+ ) -+ goto discard_it; -+#endif -+ - /* An explanation is required here, I think. - * Packet length and doff are validated by header prediction, - * provided case of th->doff==0 is eliminated. -@@ -1845,12 +1873,22 @@ int tcp_v4_rcv(struct sk_buff *skb) - lookup: - sk = __inet_lookup_skb(&tcp_hashinfo, skb, __tcp_hdrlen(th), th->source, - th->dest, sdif, &refcounted); -- if (!sk) -+ if (!sk) { -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+ ret = 1; -+#endif ++ hc = ccid_priv(dp->dccps_hc_tx_ccid); + - goto no_tcp_socket; -+ } + ccid3_pr_debug("%s(%p, state=%s) - entry\n", dccp_role(sk), sk, + ccid3_tx_state_name(hc->tx_state)); - process: -- if (sk->sk_state == TCP_TIME_WAIT) -+ if (sk->sk_state == TCP_TIME_WAIT) { -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+ ret = 2; -+#endif -+ - goto do_time_wait; -+ } +@@ -250,8 +257,8 @@ static void ccid3_hc_tx_no_feedback_timer(struct timer_list *t) + t_nfb = max(hc->tx_t_rto, 2 * hc->tx_t_ipi); - if (sk->sk_state == TCP_NEW_SYN_RECV) { - struct request_sock *req = inet_reqsk(sk); -@@ -1970,6 +2008,11 @@ int tcp_v4_rcv(struct sk_buff *skb) - bad_packet: - __TCP_INC_STATS(net, TCP_MIB_INERRS); - } else { -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+ if (!sysctl_stealth_blackhole || (ret == 1 && -+ (skb->dev->flags & IFF_LOOPBACK))) -+#endif -+ - tcp_v4_send_reset(NULL, skb); - } + restart_timer: +- sk_reset_timer(sk, &hc->tx_no_feedback_timer, +- jiffies + usecs_to_jiffies(t_nfb)); ++ sk_reset_timer(sk, &dp->dccps_ccid_timer, ++ jiffies + usecs_to_jiffies(t_nfb)); + out: + bh_unlock_sock(sk); + sock_put(sk); +@@ -280,7 +287,7 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb) + return -EBADMSG; + + if (hc->tx_state == TFRC_SSTATE_NO_SENT) { +- sk_reset_timer(sk, &hc->tx_no_feedback_timer, (jiffies + ++ sk_reset_timer(sk, &dp->dccps_ccid_timer, (jiffies + + usecs_to_jiffies(TFRC_INITIAL_TIMEOUT))); + hc->tx_last_win_count = 0; + hc->tx_t_last_win_count = now; +@@ -354,6 +361,7 @@ static void ccid3_hc_tx_packet_sent(struct sock *sk, unsigned int len) + static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb) + { + struct ccid3_hc_tx_sock *hc = ccid3_hc_tx_sk(sk); ++ struct dccp_sock *dp = dccp_sk(sk); + struct tfrc_tx_hist_entry *acked; + ktime_t now; + unsigned long t_nfb; +@@ -420,7 +428,7 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb) + (unsigned int)(hc->tx_x >> 6)); + + /* unschedule no feedback timer */ +- sk_stop_timer(sk, &hc->tx_no_feedback_timer); ++ sk_stop_timer(sk, &dp->dccps_ccid_timer); -diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c -index c802bc80c400..9efacbc3b3e6 100644 ---- a/net/ipv4/tcp_minisocks.c -+++ b/net/ipv4/tcp_minisocks.c -@@ -30,6 +30,10 @@ - #include <net/xfrm.h> - #include <net/busy_poll.h> + /* + * As we have calculated new ipi, delta, t_nom it is possible +@@ -445,8 +453,8 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb) + "expire in %lu jiffies (%luus)\n", + dccp_role(sk), sk, usecs_to_jiffies(t_nfb), t_nfb); + +- sk_reset_timer(sk, &hc->tx_no_feedback_timer, +- jiffies + usecs_to_jiffies(t_nfb)); ++ sk_reset_timer(sk, &dp->dccps_ccid_timer, ++ jiffies + usecs_to_jiffies(t_nfb)); + } -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+extern int sysctl_stealth_blackhole; -+#endif -+ - static bool tcp_in_window(u32 seq, u32 end_seq, u32 s_win, u32 e_win) + static int ccid3_hc_tx_parse_options(struct sock *sk, u8 packet_type, +@@ -488,21 +496,23 @@ static int ccid3_hc_tx_parse_options(struct sock *sk, u8 packet_type, + + static int ccid3_hc_tx_init(struct ccid *ccid, struct sock *sk) { - if (seq == s_win) -@@ -790,6 +794,10 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb, - * avoid becoming vulnerable to outside attack aiming at - * resetting legit local connections. - */ -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+ if (!sysctl_stealth_blackhole || skb->dev->flags & IFF_LOOPBACK) -+#endif -+ - req->rsk_ops->send_reset(sk, skb); - } else if (fastopen) { /* received a valid RST pkt */ - reqsk_fastopen_remove(sk, req, true); -diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c -index 7ae7065758bd..802677524936 100644 ---- a/net/ipv4/udp.c -+++ b/net/ipv4/udp.c -@@ -125,6 +125,10 @@ EXPORT_SYMBOL(udp_memory_allocated); - #define MAX_UDP_PORTS 65536 - #define PORTS_PER_CHAIN (MAX_UDP_PORTS / UDP_HTABLE_SIZE_MIN) - -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+extern int sysctl_stealth_blackhole; -+#endif -+ - static int udp_lib_lport_inuse(struct net *net, __u16 num, - const struct udp_hslot *hslot, - unsigned long *bitmap, -@@ -2337,6 +2341,9 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, - goto csum_error; ++ struct dccp_sock *dp = dccp_sk(sk); + struct ccid3_hc_tx_sock *hc = ccid_priv(ccid); + + hc->tx_state = TFRC_SSTATE_NO_SENT; + hc->tx_hist = NULL; + hc->sk = sk; +- timer_setup(&hc->tx_no_feedback_timer, ++ timer_setup(&dp->dccps_ccid_timer, + ccid3_hc_tx_no_feedback_timer, 0); + return 0; + } - __UDP_INC_STATS(net, UDP_MIB_NOPORTS, proto == IPPROTO_UDPLITE); -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+ if (!likely(sysctl_stealth_blackhole) || (skb->dev->flags & IFF_LOOPBACK)) -+#endif - icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0); + static void ccid3_hc_tx_exit(struct sock *sk) + { ++ struct dccp_sock *dp = dccp_sk(sk); + struct ccid3_hc_tx_sock *hc = ccid3_hc_tx_sk(sk); - /* -diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c -index 62c997201970..c43f64b7c7a5 100644 ---- a/net/ipv6/icmp.c -+++ b/net/ipv6/icmp.c -@@ -68,6 +68,10 @@ +- sk_stop_timer(sk, &hc->tx_no_feedback_timer); ++ sk_stop_timer(sk, &dp->dccps_ccid_timer); + tfrc_tx_hist_purge(&hc->tx_hist); + } - #include <linux/uaccess.h> +diff --git a/net/dccp/proto.c b/net/dccp/proto.c +index 6d705d90c614..359e848dba6c 100644 +--- a/net/dccp/proto.c ++++ b/net/dccp/proto.c +@@ -279,7 +279,9 @@ int dccp_disconnect(struct sock *sk, int flags) -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+extern int sysctl_stealth_blackhole; -+#endif -+ - /* - * The ICMP socket(s). This is the most convenient way to flow control - * our ICMP output as well as maintain a clean interface throughout -@@ -867,6 +871,9 @@ static int icmpv6_rcv(struct sk_buff *skb) - - switch (type) { - case ICMPV6_ECHO_REQUEST: -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+ if (!sysctl_stealth_blackhole || skb->dev->flags & IFF_LOOPBACK) -+#endif - if (!net->ipv6.sysctl.icmpv6_echo_ignore_all) - icmpv6_echo_reply(skb); - break; -diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c -index b42fa41cfceb..cd866ab245c7 100644 ---- a/net/ipv6/tcp_ipv6.c -+++ b/net/ipv6/tcp_ipv6.c -@@ -68,6 +68,10 @@ + dccp_clear_xmit_timers(sk); + ccid_hc_rx_delete(dp->dccps_hc_rx_ccid, sk); ++ ccid_hc_tx_delete(dp->dccps_hc_tx_ccid, sk); + dp->dccps_hc_rx_ccid = NULL; ++ dp->dccps_hc_tx_ccid = NULL; - #include <trace/events/tcp.h> + __skb_queue_purge(&sk->sk_receive_queue); + __skb_queue_purge(&sk->sk_write_queue); +diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig +index 87983e70f03f..d1584b4b39f9 100644 +--- a/net/ipv4/Kconfig ++++ b/net/ipv4/Kconfig +@@ -267,6 +267,7 @@ config IP_PIMSM_V2 -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+extern int sysctl_stealth_blackhole; -+#endif -+ - static void tcp_v6_send_reset(const struct sock *sk, struct sk_buff *skb); - static void tcp_v6_reqsk_send_ack(const struct sock *sk, struct sk_buff *skb, - struct request_sock *req); -@@ -1407,6 +1411,10 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) - return 0; + config SYN_COOKIES + bool "IP: TCP syncookie support" ++ default y + help + Normal TCP/IP networking is open to an attack known as "SYN + flooding". This denial-of-service attack prevents legitimate remote +@@ -742,3 +743,26 @@ config TCP_MD5SIG + on the Internet. - reset: -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+ if (!likely(sysctl_stealth_blackhole)) -+#endif + If unsure, say N. + - tcp_v6_send_reset(sk, skb); - discard: - if (opt_skb) -@@ -1505,6 +1513,27 @@ INDIRECT_CALLABLE_SCOPE int tcp_v6_rcv(struct sk_buff *skb) - if (!pskb_may_pull(skb, th->doff*4)) - goto discard_it; - -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+ if (likely(sysctl_stealth_blackhole) && -+ ( -+ th->res1 || !tcp_flag_word(th) || -+ tcp_flag_word(th) == TCP_FLAG_PSH || -+ tcp_flag_word(th) & (TCP_FLAG_CWR | TCP_FLAG_ECE) || -+ ( -+ tcp_flag_word(th) & -+ (TCP_FLAG_SYN | TCP_FLAG_FIN | TCP_FLAG_RST) && -+ tcp_flag_word(th) & TCP_FLAG_URG -+ ) || -+ ( -+ tcp_flag_word(th) & -+ (TCP_FLAG_FIN | TCP_FLAG_RST) && -+ tcp_flag_word(th) & TCP_FLAG_SYN -+ ) -+ ) -+ ) -+ goto discard_it; -+#endif ++config TCP_SIMULT_CONNECT_DEFAULT_ON ++ bool "Enable TCP simultaneous connect" ++ help ++ Enable TCP simultaneous connect that adds a weakness in Linux's strict ++ implementation of TCP that allows two clients to connect to each other ++ without either entering a listening state. The weakness allows an ++ attacker to easily prevent a client from connecting to a known server ++ provided the source port for the connection is guessed correctly. + - if (skb_checksum_init(skb, IPPROTO_TCP, ip6_compute_pseudo)) - goto csum_error; - -@@ -1515,12 +1544,22 @@ INDIRECT_CALLABLE_SCOPE int tcp_v6_rcv(struct sk_buff *skb) - sk = __inet6_lookup_skb(&tcp_hashinfo, skb, __tcp_hdrlen(th), - th->source, th->dest, inet6_iif(skb), sdif, - &refcounted); -- if (!sk) -+ if (!sk) { -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+ ret = 1; -+#endif ++ As the weakness could be used to prevent an antivirus or IPS from ++ fetching updates, or prevent an SSL gateway from fetching a CRL, it ++ should be eliminated by disabling this option. Though Linux is one of ++ few operating systems supporting simultaneous connect, it has no ++ legitimate use in practice and is rarely supported by firewalls. + - goto no_tcp_socket; -+ } - - process: -- if (sk->sk_state == TCP_TIME_WAIT) -+ if (sk->sk_state == TCP_TIME_WAIT) { -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+ ret = 2; -+#endif ++ Disabling this may break TCP STUNT which is used by some applications ++ for NAT traversal. + - goto do_time_wait; -+ } - - if (sk->sk_state == TCP_NEW_SYN_RECV) { - struct request_sock *req = inet_reqsk(sk); -@@ -1633,6 +1672,11 @@ INDIRECT_CALLABLE_SCOPE int tcp_v6_rcv(struct sk_buff *skb) - bad_packet: - __TCP_INC_STATS(net, TCP_MIB_INERRS); - } else { -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+ if (!sysctl_stealth_blackhole || (ret == 1 && -+ (skb->dev->flags & IFF_LOOPBACK))) -+#endif ++ This setting can be overridden at runtime via the ++ net.ipv4.tcp_simult_connect sysctl. + - tcp_v6_send_reset(NULL, skb); - } ++ If unsure, say N. +diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c +index 3e5f4f2e705e..791329c77dea 100644 +--- a/net/ipv4/sysctl_net_ipv4.c ++++ b/net/ipv4/sysctl_net_ipv4.c +@@ -588,6 +588,15 @@ static struct ctl_table ipv4_table[] = { + .mode = 0644, + .proc_handler = proc_do_static_key, + }, ++ { ++ .procname = "tcp_simult_connect", ++ .data = &sysctl_tcp_simult_connect, ++ .maxlen = sizeof(int), ++ .mode = 0644, ++ .proc_handler = proc_dointvec_minmax, ++ .extra1 = SYSCTL_ZERO, ++ .extra2 = SYSCTL_ONE, ++ }, + { } + }; -diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c -index 9fec580c968e..aaba8b13ba66 100644 ---- a/net/ipv6/udp.c -+++ b/net/ipv6/udp.c -@@ -54,6 +54,10 @@ - #include <trace/events/skb.h> - #include "udp_impl.h" +diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c +index ef4bdb038a4b..86967b09a8e2 100644 +--- a/net/ipv4/tcp_input.c ++++ b/net/ipv4/tcp_input.c +@@ -82,6 +82,7 @@ + #include <net/mptcp.h> -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+extern int sysctl_stealth_blackhole; -+#endif -+ - static u32 udp6_ehashfn(const struct net *net, - const struct in6_addr *laddr, - const u16 lport, -@@ -923,6 +927,9 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, - goto csum_error; + int sysctl_tcp_max_orphans __read_mostly = NR_FILE; ++int sysctl_tcp_simult_connect __read_mostly = IS_ENABLED(CONFIG_TCP_SIMULT_CONNECT_DEFAULT_ON); - __UDP6_INC_STATS(net, UDP_MIB_NOPORTS, proto == IPPROTO_UDPLITE); -+#ifdef CONFIG_HARDENED_STEALTH_NETWORKING -+ if (!likely(sysctl_stealth_blackhole) || skb->dev->flags & IFF_LOOPBACK) -+#endif - icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0); + #define FLAG_DATA 0x01 /* Incoming frame contained data. */ + #define FLAG_WIN_UPDATE 0x02 /* Incoming ACK was a window update. */ +@@ -6195,7 +6196,7 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb, + tcp_paws_reject(&tp->rx_opt, 0)) + goto discard_and_undo; - kfree_skb(skb); +- if (th->syn) { ++ if (th->syn && sysctl_tcp_simult_connect) { + /* We see SYN without ACK. It is attempt of + * simultaneous connect with crossed SYNs. + * Particularly, it can be connect to self. diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost -index 952fff485546..59ffccdb1be4 100644 +index f54b6ac37ac2..e53b3057d4cb 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost -@@ -54,6 +54,7 @@ MODPOST = scripts/mod/modpost \ - $(if $(KBUILD_EXTMOD),$(addprefix -e ,$(KBUILD_EXTRA_SYMBOLS))) \ - $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ - $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \ -+ $(if $(CONFIG_DEBUG_WRITABLE_FUNCTION_POINTERS_VERBOSE),-f) \ - $(if $(KBUILD_MODPOST_WARN),-w) \ - $(if $(filter nsdeps,$(MAKECMDGOALS)),-d) +@@ -47,6 +47,7 @@ MODPOST = scripts/mod/modpost \ + $(if $(CONFIG_MODVERSIONS),-m) \ + $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a) \ + $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \ ++ $(if $(CONFIG_DEBUG_WRITABLE_FUNCTION_POINTERS_VERBOSE),-f) \ + $(if $(KBUILD_MODPOST_WARN),-w) \ + -o $@ diff --git a/scripts/gcc-plugins/Kconfig b/scripts/gcc-plugins/Kconfig -index e3569543bdac..55cc439b3bc6 100644 +index ae19fb0243b9..ad78375ece5e 100644 --- a/scripts/gcc-plugins/Kconfig +++ b/scripts/gcc-plugins/Kconfig -@@ -61,6 +61,11 @@ config GCC_PLUGIN_LATENT_ENTROPY +@@ -53,6 +53,11 @@ config GCC_PLUGIN_LATENT_ENTROPY is some slowdown of the boot process (about 0.5%) and fork and irq processing. @@ -3403,10 +3039,10 @@ index e3569543bdac..55cc439b3bc6 100644 secure! diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c -index d2a30a7b3f07..ff57a5fe8029 100644 +index f882ce0d9327..2cbc4e8a6295 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c -@@ -36,6 +36,8 @@ static int warn_unresolved = 0; +@@ -35,6 +35,8 @@ static int warn_unresolved = 0; /* How a symbol is exported */ static int sec_mismatch_count = 0; static int sec_mismatch_fatal = 0; @@ -3414,8 +3050,8 @@ index d2a30a7b3f07..ff57a5fe8029 100644 +static int writable_fptr_verbose = 0; /* ignore missing files */ static int ignore_missing_files; - /* write namespace dependencies */ -@@ -1019,6 +1021,7 @@ enum mismatch { + /* If set to 1, only warn (instead of error) about missing ns imports */ +@@ -1007,6 +1009,7 @@ enum mismatch { ANY_EXIT_TO_ANY_INIT, EXPORT_TO_INIT_EXIT, EXTABLE_TO_NON_TEXT, @@ -3423,7 +3059,7 @@ index d2a30a7b3f07..ff57a5fe8029 100644 }; /** -@@ -1145,6 +1148,12 @@ static const struct sectioncheck sectioncheck[] = { +@@ -1133,6 +1136,12 @@ static const struct sectioncheck sectioncheck[] = { .good_tosec = {ALL_TEXT_SECTIONS , NULL}, .mismatch = EXTABLE_TO_NON_TEXT, .handler = extable_mismatch_handler, @@ -3436,7 +3072,7 @@ index d2a30a7b3f07..ff57a5fe8029 100644 } }; -@@ -1332,10 +1341,10 @@ static Elf_Sym *find_elf_symbol(struct elf_info *elf, Elf64_Sword addr, +@@ -1320,10 +1329,10 @@ static Elf_Sym *find_elf_symbol(struct elf_info *elf, Elf64_Sword addr, continue; if (!is_valid_name(elf, sym)) continue; @@ -3449,7 +3085,7 @@ index d2a30a7b3f07..ff57a5fe8029 100644 if (d < 0) d = addr - sym->st_value; if (d < distance) { -@@ -1470,7 +1479,13 @@ static void report_sec_mismatch(const char *modname, +@@ -1458,7 +1467,13 @@ static void report_sec_mismatch(const char *modname, char *prl_from; char *prl_to; @@ -3464,7 +3100,7 @@ index d2a30a7b3f07..ff57a5fe8029 100644 get_pretty_name(from_is_func, &from, &from_p); get_pretty_name(to_is_func, &to, &to_p); -@@ -1592,6 +1607,12 @@ static void report_sec_mismatch(const char *modname, +@@ -1580,6 +1595,12 @@ static void report_sec_mismatch(const char *modname, fatal("There's a special handler for this mismatch type, " "we should never get here."); break; @@ -3477,18 +3113,18 @@ index d2a30a7b3f07..ff57a5fe8029 100644 } fprintf(stderr, "\n"); } -@@ -2569,7 +2590,7 @@ int main(int argc, char **argv) - struct ext_sym_list *extsym_iter; - struct ext_sym_list *extsym_start = NULL; +@@ -2559,7 +2580,7 @@ int main(int argc, char **argv) + struct dump_list *dump_read_start = NULL; + struct dump_list **dump_read_iter = &dump_read_start; -- while ((opt = getopt(argc, argv, "i:I:e:mnsT:o:awEd")) != -1) { -+ while ((opt = getopt(argc, argv, "i:I:e:fmnsT:o:awEd")) != -1) { +- while ((opt = getopt(argc, argv, "ei:mnT:o:awENd:")) != -1) { ++ while ((opt = getopt(argc, argv, "ei:fmnT:o:awENd:")) != -1) { switch (opt) { - case 'i': - kernel_read = optarg; -@@ -2586,6 +2607,9 @@ int main(int argc, char **argv) - extsym_iter->file = optarg; - extsym_start = extsym_iter; + case 'e': + external_module = 1; +@@ -2570,6 +2591,9 @@ int main(int argc, char **argv) + (*dump_read_iter)->file = optarg; + dump_read_iter = &(*dump_read_iter)->next; break; + case 'f': + writable_fptr_verbose = 1; @@ -3496,7 +3132,7 @@ index d2a30a7b3f07..ff57a5fe8029 100644 case 'm': modversions = 1; break; -@@ -2692,6 +2716,11 @@ int main(int argc, char **argv) +@@ -2670,6 +2694,11 @@ int main(int argc, char **argv) } free(buf.p); @@ -3509,7 +3145,7 @@ index d2a30a7b3f07..ff57a5fe8029 100644 return err; } diff --git a/security/Kconfig b/security/Kconfig -index 2a1a2d396228..66eb3db67eb0 100644 +index 7561f6f99f1d..615205c0113b 100644 --- a/security/Kconfig +++ b/security/Kconfig @@ -9,7 +9,7 @@ source "security/keys/Kconfig" @@ -3602,140 +3238,11 @@ index 2a1a2d396228..66eb3db67eb0 100644 config STATIC_USERMODEHELPER bool "Force all usermode helper calls through a single binary" help -@@ -293,3 +329,128 @@ source "security/Kconfig.hardening" - - endmenu - -+menu "Hardened Enhancements" -+ -+config HARDENED_RANDOM -+ bool "Enhance the random number generator" -+ default n -+ help -+ Enabling this option enhances the Linux kernel random number generator. -+ This is done by: -+ - Increasing the pool size from 4096 bits to 262144 bits. ( 512B -> 32KB ) -+ - Increasing the diffusion via the linear feedback shift register. -+ - Defines newer 64-bit polynomial fields for the input and output pools. -+ -+ Overall, this enhances the total entropy available to the system and further -+ enhances the random number generator. -+ -+ -+config HARDENED_STEALTH_NETWORKING -+ bool "Enable stealth networking [GRSECURITY]" -+ default n -+ depends on NET -+ help -+ If you say Y here, neither TCP resets nor ICMP -+ destination-unreachable packets will be sent in response to packets -+ sent to ports for which no associated listening process exists. -+ This feature supports both IPV4 and IPV6 and exempts the -+ loopback interface from blackholing. Enabling this feature -+ makes a host more resilient to DoS attacks and reduces network -+ visibility against scanners. -+ -+ The blackhole feature as-implemented is equivalent to the FreeBSD -+ blackhole feature, as it prevents RST responses to all packets, not -+ just SYNs. Under most application behavior this causes no -+ problems, but applications (like haproxy) may not close certain -+ connections in a way that cleanly terminates them on the remote -+ end, leaving the remote host in LAST_ACK state. Because of this -+ side-effect and to prevent intentional LAST_ACK DoSes, this -+ feature also adds automatic mitigation against such attacks. -+ The mitigation drastically reduces the amount of time a socket -+ can spend in LAST_ACK state. If you're using haproxy and not -+ all servers it connects to have this option enabled, consider -+ disabling this feature on the haproxy host. -+ -+ If the sysctl option is enabled, a sysctl option with names -+ "ip_blackhole" will be created. -+ This sysctl, "ip_blackhole" takes the standard zero/non-zero -+ on/off toggle to enable or disable this feature. -+ -+ -+config HARDENED_NO_SIMULT_CONNECT -+ bool "Disable simultaneous TCP connections [GRSECURITY]" -+ default n -+ depends on NET -+ help -+ If you say Y here, a feature by Willy Tarreau will be enabled that -+ removes a weakness in Linux's strict implementation of TCP that -+ allows two clients to connect to each other without either entering -+ a listening state. The weakness allows an attacker to easily prevent -+ a client from connecting to a known server provided the source port -+ for the connection is guessed correctly. -+ -+ As the weakness could be used to prevent an antivirus or IPS from -+ fetching updates, or prevent an SSL gateway from fetching a CRL, -+ it should be eliminated by enabling this option. Though Linux is -+ one of few operating systems supporting simultaneous connect, it -+ has no legitimate use in practice and is rarely supported by firewalls. -+ -+ -+config HARDENED_SYSFS_RESTRICT -+ bool "Restrict SysFS & DebugFS [GRSECURITY]" -+ default y -+ depends on SYSFS -+ help -+ If you say Y here, sysfs (the pseudo-filesystem mounted at /sys) and -+ any filesystem normally mounted under it (e.g. debugfs) will be -+ mostly accessible only by root. These filesystems generally provide access -+ to hardware and debug information that isn't appropriate for unprivileged -+ users of the system. Sysfs and debugfs have also become a large source -+ of new vulnerabilities, ranging from infoleaks to local compromise. -+ There has been very little oversight with an eye toward security involved -+ in adding new exporters of information to these filesystems, so their -+ use is discouraged. -+ To enable or disable this feature at runtime, use the sysctl -+ kernel.sysfs_restricted. -+ For reasons of compatibility, a few directories have been whitelisted -+ for access by non-root users: -+ /sys/fs/selinux -+ /sys/fs/fuse -+ /sys/devices/system/cpu -+ -+ -+config HARDENED_FIFO -+ bool "Restrict FIFO [GRSECURITY]" -+ default y -+ help -+ If you say Y here, users will not be able to write to FIFOs they don't -+ own in world-writable +t directories (e.g. /tmp), unless the owner of -+ the FIFO is the same owner of the directory it's held in. If the sysctl -+ option is enabled, a sysctl option with name "fifo_restrictions" is -+ created. -+ -+ -+config HARDENED_MODULE_LOAD -+ bool "Harden module auto-loading [GRSECURITY]" -+ default y -+ depends on MODULES -+ help -+ If you say Y here, module auto-loading in response to use of some -+ feature implemented by an unloaded module will be restricted to -+ root users. Enabling this option helps defend against attacks -+ by unprivileged users who abuse the auto-loading behavior to -+ cause a vulnerable module to load that is then exploited. -+ -+ If this option prevents a legitimate use of auto-loading for a -+ non-root user, the administrator can execute modprobe manually -+ with the exact name of the module mentioned in the alert log. -+ Alternatively, the administrator can add the module to the list -+ of modules loaded at boot by modifying init scripts. -+ -+ Modification of init scripts will most likely be needed on -+ Ubuntu servers with encrypted home directory support enabled, -+ as the first non-root user logging in will cause the ecb(aes), -+ ecb(aes)-all, cbc(aes), and cbc(aes)-all modules to be loaded. -+ -+ -+endmenu diff --git a/security/Kconfig.hardening b/security/Kconfig.hardening -index af4c979b38ee..473e40bb8537 100644 +index 269967c4fc1b..7dede18f1074 100644 --- a/security/Kconfig.hardening +++ b/security/Kconfig.hardening -@@ -169,6 +169,7 @@ config STACKLEAK_RUNTIME_DISABLE +@@ -190,6 +190,7 @@ config STACKLEAK_RUNTIME_DISABLE config INIT_ON_ALLOC_DEFAULT_ON bool "Enable heap memory zeroing on allocation by default" @@ -3743,7 +3250,7 @@ index af4c979b38ee..473e40bb8537 100644 help This has the effect of setting "init_on_alloc=1" on the kernel command line. This can be disabled with "init_on_alloc=0". -@@ -181,6 +182,7 @@ config INIT_ON_ALLOC_DEFAULT_ON +@@ -202,6 +203,7 @@ config INIT_ON_ALLOC_DEFAULT_ON config INIT_ON_FREE_DEFAULT_ON bool "Enable heap memory zeroing on free by default" @@ -3751,7 +3258,7 @@ index af4c979b38ee..473e40bb8537 100644 help This has the effect of setting "init_on_free=1" on the kernel command line. This can be disabled with "init_on_free=0". -@@ -196,6 +198,20 @@ config INIT_ON_FREE_DEFAULT_ON +@@ -217,6 +219,21 @@ config INIT_ON_FREE_DEFAULT_ON touching "cold" memory areas. Most cases see 3-5% impact. Some synthetic workloads have measured as high as 8%. @@ -3763,8 +3270,9 @@ index af4c979b38ee..473e40bb8537 100644 + are zeroed to detect write-after-free bugs. + +config SLAB_SANITIZE_VERIFY -+ default y + bool "Verify sanitized SLAB allocations" ++ default y ++ depends on !KASAN + help + When init_on_free is enabled, verify that newly allocated slab + objects are zeroed to detect write-after-free bugs. @@ -3773,7 +3281,7 @@ index af4c979b38ee..473e40bb8537 100644 endmenu diff --git a/security/selinux/Kconfig b/security/selinux/Kconfig -index 5711689deb6a..fab0cb896907 100644 +index 9e921fc72538..ae851a826c26 100644 --- a/security/selinux/Kconfig +++ b/security/selinux/Kconfig @@ -3,7 +3,7 @@ config SECURITY_SELINUX @@ -3785,11 +3293,10 @@ index 5711689deb6a..fab0cb896907 100644 help This selects NSA Security-Enhanced Linux (SELinux). You will also need a policy configuration and a labeled filesystem. -@@ -65,23 +65,3 @@ config SECURITY_SELINUX_AVC_STATS - This option collects access vector cache statistics to - /selinux/avc/cache_stats, which may be monitored via +@@ -70,29 +70,6 @@ config SECURITY_SELINUX_AVC_STATS + /sys/fs/selinux/avc/cache_stats, which may be monitored via tools such as avcstat. -- + -config SECURITY_SELINUX_CHECKREQPROT_VALUE - int "NSA SELinux checkreqprot default value" - depends on SECURITY_SELINUX @@ -3806,14 +3313,21 @@ index 5711689deb6a..fab0cb896907 100644 - default to checking the protection requested by the application. - The checkreqprot flag may be changed from the default via the - 'checkreqprot=' boot parameter. It may also be changed at runtime -- via /selinux/checkreqprot if authorized by policy. +- via /sys/fs/selinux/checkreqprot if authorized by policy. +- +- WARNING: this option is deprecated and will be removed in a future +- kernel release. - - If you are unsure how to answer this question, answer 0. +- + config SECURITY_SELINUX_SIDTAB_HASH_BITS + int "NSA SELinux sidtab hashtable size" + depends on SECURITY_SELINUX diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c -index 9625b99e677f..daa40da7a8f9 100644 +index c46312710e73..541c65650c5e 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c -@@ -135,18 +135,7 @@ static int __init selinux_enabled_setup(char *str) +@@ -136,21 +136,7 @@ static int __init selinux_enabled_setup(char *str) __setup("selinux=", selinux_enabled_setup); #endif @@ -3824,8 +3338,11 @@ index 9625b99e677f..daa40da7a8f9 100644 -{ - unsigned long checkreqprot; - -- if (!kstrtoul(str, 0, &checkreqprot)) +- if (!kstrtoul(str, 0, &checkreqprot)) { - selinux_checkreqprot_boot = checkreqprot ? 1 : 0; +- if (checkreqprot) +- pr_warn("SELinux: checkreqprot set to 1 via kernel parameter. This is deprecated and will be rejected in a future kernel release.\n"); +- } - return 1; -} -__setup("checkreqprot=", checkreqprot_setup); @@ -3834,10 +3351,10 @@ index 9625b99e677f..daa40da7a8f9 100644 /** * selinux_secmark_enabled - Check to see if SECMARK is currently enabled diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c -index e6c7643c3fc0..0e8217f72c5a 100644 +index 4bde570d56a2..cc5caffc07fa 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c -@@ -639,7 +639,6 @@ static ssize_t sel_read_checkreqprot(struct file *filp, char __user *buf, +@@ -725,7 +725,6 @@ static ssize_t sel_read_checkreqprot(struct file *filp, char __user *buf, static ssize_t sel_write_checkreqprot(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { @@ -3845,7 +3362,7 @@ index e6c7643c3fc0..0e8217f72c5a 100644 char *page; ssize_t length; unsigned int new_value; -@@ -663,10 +662,9 @@ static ssize_t sel_write_checkreqprot(struct file *file, const char __user *buf, +@@ -749,18 +748,9 @@ static ssize_t sel_write_checkreqprot(struct file *file, const char __user *buf, return PTR_ERR(page); length = -EINVAL; @@ -3853,7 +3370,15 @@ index e6c7643c3fc0..0e8217f72c5a 100644 + if (sscanf(page, "%u", &new_value) != 1 || new_value) goto out; -- fsi->state->checkreqprot = new_value ? 1 : 0; +- if (new_value) { +- char comm[sizeof(current->comm)]; +- +- memcpy(comm, current->comm, sizeof(comm)); +- pr_warn_once("SELinux: %s (%d) set checkreqprot to 1. This is deprecated and will be rejected in a future kernel release.\n", +- comm, current->pid); +- } +- +- checkreqprot_set(fsi->state, (new_value ? 1 : 0)); length = count; out: kfree(page); @@ -3870,18 +3395,15 @@ index a810304123ca..b809050b25d2 100644 help This selects Yama, which extends DAC support with additional system-wide security settings beyond regular Linux discretionary -diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c -index 13efc291b1c7..3c79201de266 100644 ---- a/virt/kvm/kvm_main.c -+++ b/virt/kvm/kvm_main.c -@@ -632,6 +632,10 @@ static int kvm_create_vm_debugfs(struct kvm *kvm, int fd) - struct kvm_stat_data *stat_data; - struct kvm_stats_debugfs_item *p; - -+#ifdef CONFIG_HARDENED_SYSFS_RESTRICT -+ return 0; -+#endif -+ - if (!debugfs_initialized()) - return 0; +diff --git a/tools/perf/Documentation/security.txt b/tools/perf/Documentation/security.txt +index 4fe3b8b1958f..a7d88cc23a70 100644 +--- a/tools/perf/Documentation/security.txt ++++ b/tools/perf/Documentation/security.txt +@@ -148,6 +148,7 @@ Perf tool provides a message similar to the one below: + >= 0: Disallow raw and ftrace function tracepoint access + >= 1: Disallow CPU event access + >= 2: Disallow kernel profiling ++ >= 3: Disallow use of any event + To make the adjusted perf_event_paranoid setting permanent preserve it + in /etc/sysctl.conf (e.g. kernel.perf_event_paranoid = <setting>) diff --git a/sys-kernel/linux-image-redcore-lts/files/5.10-nvme-Patriot_Viper_VPN100-QUIRK_IGNORE_DEV_SUBNQN.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-nvme-Patriot_Viper_VPN100-QUIRK_IGNORE_DEV_SUBNQN.patch new file mode 100644 index 00000000..1f3c5c7b --- /dev/null +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-nvme-Patriot_Viper_VPN100-QUIRK_IGNORE_DEV_SUBNQN.patch @@ -0,0 +1,13 @@ +diff -Naur linux-5.10.4/drivers/nvme/host/pci.c linux-5.10.4-p/drivers/nvme/host/pci.c +--- linux-5.10.4/drivers/nvme/host/pci.c 2020-12-30 11:54:29.000000000 +0100 ++++ linux-5.10.4-p/drivers/nvme/host/pci.c 2021-01-01 02:02:04.011358821 +0100 +@@ -3224,7 +3224,8 @@ + .driver_data = NVME_QUIRK_SINGLE_VECTOR | + NVME_QUIRK_128_BYTES_SQES | + NVME_QUIRK_SHARED_TAGS }, +- ++ { PCI_DEVICE(0x1987, 0x5012), /* Patriot Viper VPN100 */ ++ .driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN, }, + { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) }, + { 0, } + }; diff --git a/sys-kernel/linux-image-redcore-lts/files/5.4-radeon_dp_aux_transfer_native-no-ratelimited_debug.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-radeon_dp_aux_transfer_native-no-ratelimited_debug.patch index 6ffcb42c..6ffcb42c 100644 --- a/sys-kernel/linux-image-redcore-lts/files/5.4-radeon_dp_aux_transfer_native-no-ratelimited_debug.patch +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-radeon_dp_aux_transfer_native-no-ratelimited_debug.patch diff --git a/sys-kernel/linux-image-redcore-lts/files/5.10-revert-parts-of-a00ec3874e7d326ab2dffbed92faddf6a77a84e9-no-Intel-NO.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-revert-parts-of-a00ec3874e7d326ab2dffbed92faddf6a77a84e9-no-Intel-NO.patch new file mode 100644 index 00000000..dec57667 --- /dev/null +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-revert-parts-of-a00ec3874e7d326ab2dffbed92faddf6a77a84e9-no-Intel-NO.patch @@ -0,0 +1,12 @@ +diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig +index 85de313ddec2..1b2a7160981c 100644 +--- a/drivers/cpufreq/Kconfig ++++ b/drivers/cpufreq/Kconfig +@@ -38,7 +38,6 @@ choice + prompt "Default CPUFreq governor" + default CPU_FREQ_DEFAULT_GOV_USERSPACE if ARM_SA1100_CPUFREQ || ARM_SA1110_CPUFREQ + default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if ARM64 || ARM +- default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if X86_INTEL_PSTATE && SMP + default CPU_FREQ_DEFAULT_GOV_PERFORMANCE + help + This option sets which CPUFreq governor shall be loaded at diff --git a/sys-kernel/linux-image-redcore-lts/files/5.4-uksm-linux-hardened.patch b/sys-kernel/linux-image-redcore-lts/files/5.10-uksm-linux-hardened.patch index 54e1627d..f85a1de1 100644 --- a/sys-kernel/linux-image-redcore-lts/files/5.4-uksm-linux-hardened.patch +++ b/sys-kernel/linux-image-redcore-lts/files/5.10-uksm-linux-hardened.patch @@ -1,6 +1,6 @@ diff -Nur a/Documentation/vm/uksm.txt b/Documentation/vm/uksm.txt --- a/Documentation/vm/uksm.txt 1970-01-01 01:00:00.000000000 +0100 -+++ b/Documentation/vm/uksm.txt 2019-12-31 03:53:56.314014609 +0000 ++++ b/Documentation/vm/uksm.txt 2021-01-03 14:22:34.498459039 +0000 @@ -0,0 +1,61 @@ +The Ultra Kernel Samepage Merging feature +---------------------------------------------- @@ -64,21 +64,21 @@ diff -Nur a/Documentation/vm/uksm.txt b/Documentation/vm/uksm.txt +2016-09-10 UKSM 0.1.2.5 Fix a bug in dedup ratio calculation. +2017-02-26 UKSM 0.1.2.6 Fix a bug in hugetlbpage handling and a race bug with page migration. diff -Nur a/fs/exec.c b/fs/exec.c ---- a/fs/exec.c 2019-12-31 03:51:52.180090905 +0000 -+++ b/fs/exec.c 2019-12-31 03:55:51.737645870 +0000 -@@ -64,6 +64,7 @@ - #include <linux/compat.h> +--- a/fs/exec.c 2021-01-03 14:20:51.258372089 +0000 ++++ b/fs/exec.c 2021-01-03 14:23:32.755627017 +0000 +@@ -65,6 +65,7 @@ #include <linux/vmalloc.h> + #include <linux/io_uring.h> #include <linux/random.h> +#include <linux/ksm.h> #include <linux/uaccess.h> #include <asm/mmu_context.h> diff -Nur a/fs/proc/meminfo.c b/fs/proc/meminfo.c ---- a/fs/proc/meminfo.c 2019-12-18 15:09:17.000000000 +0000 -+++ b/fs/proc/meminfo.c 2019-12-31 03:53:56.314014609 +0000 -@@ -105,7 +105,10 @@ - global_zone_page_state(NR_KERNEL_STACK_KB)); +--- a/fs/proc/meminfo.c 2020-12-30 10:54:29.000000000 +0000 ++++ b/fs/proc/meminfo.c 2021-01-03 14:22:34.498459039 +0000 +@@ -108,7 +108,10 @@ + #endif show_val_kb(m, "PageTables: ", global_zone_page_state(NR_PAGETABLE)); - @@ -86,57 +86,12 @@ diff -Nur a/fs/proc/meminfo.c b/fs/proc/meminfo.c + show_val_kb(m, "KsmZeroPages: ", + global_zone_page_state(NR_UKSM_ZERO_PAGES)); +#endif - show_val_kb(m, "NFS_Unstable: ", - global_node_page_state(NR_UNSTABLE_NFS)); + show_val_kb(m, "NFS_Unstable: ", 0); show_val_kb(m, "Bounce: ", -diff -Nur a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h ---- a/include/asm-generic/pgtable.h 2019-12-18 15:09:17.000000000 +0000 -+++ b/include/asm-generic/pgtable.h 2019-12-31 03:53:56.314014609 +0000 -@@ -855,12 +855,25 @@ - extern void untrack_pfn_moved(struct vm_area_struct *vma); - #endif - -+#ifdef CONFIG_UKSM -+static inline int is_uksm_zero_pfn(unsigned long pfn) -+{ -+ extern unsigned long uksm_zero_pfn; -+ return pfn == uksm_zero_pfn; -+} -+#else -+static inline int is_uksm_zero_pfn(unsigned long pfn) -+{ -+ return 0; -+} -+#endif -+ - #ifdef __HAVE_COLOR_ZERO_PAGE - static inline int is_zero_pfn(unsigned long pfn) - { - extern unsigned long zero_pfn; - unsigned long offset_from_zero_pfn = pfn - zero_pfn; -- return offset_from_zero_pfn <= (zero_page_mask >> PAGE_SHIFT); -+ return offset_from_zero_pfn <= (zero_page_mask >> PAGE_SHIFT) || is_uksm_zero_pfn(pfn); - } - - #define my_zero_pfn(addr) page_to_pfn(ZERO_PAGE(addr)) -@@ -869,7 +882,7 @@ - static inline int is_zero_pfn(unsigned long pfn) - { - extern unsigned long zero_pfn; -- return pfn == zero_pfn; -+ return (pfn == zero_pfn) || (is_uksm_zero_pfn(pfn)); - } - - static inline unsigned long my_zero_pfn(unsigned long addr) + global_zone_page_state(NR_BOUNCE)); diff -Nur a/include/linux/ksm.h b/include/linux/ksm.h ---- a/include/linux/ksm.h 2019-12-18 15:09:17.000000000 +0000 -+++ b/include/linux/ksm.h 2019-12-31 03:53:56.314014609 +0000 -@@ -1,4 +1,4 @@ --/* SPDX-License-Identifier: GPL-2.0 */ -+/* SPDX-License-Identifier: GPL-3.0 */ - #ifndef __LINUX_KSM_H - #define __LINUX_KSM_H - /* +--- a/include/linux/ksm.h 2020-12-30 10:54:29.000000000 +0000 ++++ b/include/linux/ksm.h 2021-01-03 14:22:34.498459039 +0000 @@ -21,20 +21,16 @@ #ifdef CONFIG_KSM int ksm_madvise(struct vm_area_struct *vma, unsigned long start, @@ -163,9 +118,9 @@ diff -Nur a/include/linux/ksm.h b/include/linux/ksm.h } /* -@@ -56,6 +52,33 @@ - bool reuse_ksm_page(struct page *page, - struct vm_area_struct *vma, unsigned long address); +@@ -54,6 +50,33 @@ + void rmap_walk_ksm(struct page *page, struct rmap_walk_control *rwc); + void ksm_migrate_page(struct page *newpage, struct page *oldpage); +#ifdef CONFIG_KSM_LEGACY +int __ksm_enter(struct mm_struct *mm); @@ -197,7 +152,7 @@ diff -Nur a/include/linux/ksm.h b/include/linux/ksm.h #else /* !CONFIG_KSM */ static inline int ksm_fork(struct mm_struct *mm, struct mm_struct *oldmm) -@@ -96,4 +119,6 @@ +@@ -89,4 +112,6 @@ #endif /* CONFIG_MMU */ #endif /* !CONFIG_KSM */ @@ -205,9 +160,9 @@ diff -Nur a/include/linux/ksm.h b/include/linux/ksm.h + #endif /* __LINUX_KSM_H */ diff -Nur a/include/linux/mm_types.h b/include/linux/mm_types.h ---- a/include/linux/mm_types.h 2019-12-18 15:09:17.000000000 +0000 -+++ b/include/linux/mm_types.h 2019-12-31 03:53:56.324014923 +0000 -@@ -353,6 +353,9 @@ +--- a/include/linux/mm_types.h 2020-12-30 10:54:29.000000000 +0000 ++++ b/include/linux/mm_types.h 2021-01-03 14:22:34.498459039 +0000 +@@ -372,6 +372,9 @@ struct mempolicy *vm_policy; /* NUMA policy for the VMA */ #endif struct vm_userfaultfd_ctx vm_userfaultfd_ctx; @@ -218,9 +173,9 @@ diff -Nur a/include/linux/mm_types.h b/include/linux/mm_types.h struct core_thread { diff -Nur a/include/linux/mmzone.h b/include/linux/mmzone.h ---- a/include/linux/mmzone.h 2019-12-18 15:09:17.000000000 +0000 -+++ b/include/linux/mmzone.h 2019-12-31 03:53:56.324014923 +0000 -@@ -206,6 +206,9 @@ +--- a/include/linux/mmzone.h 2020-12-30 10:54:29.000000000 +0000 ++++ b/include/linux/mmzone.h 2021-01-03 14:22:34.498459039 +0000 +@@ -159,6 +159,9 @@ NR_ZSPAGES, /* allocated in zsmalloc */ #endif NR_FREE_CMA_PAGES, @@ -230,9 +185,48 @@ diff -Nur a/include/linux/mmzone.h b/include/linux/mmzone.h NR_VM_ZONE_STAT_ITEMS }; enum node_stat_item { +diff -Nur a/include/linux/pgtable.h b/include/linux/pgtable.h +--- a/include/linux/pgtable.h 2020-12-30 10:54:29.000000000 +0000 ++++ b/include/linux/pgtable.h 2021-01-03 14:22:34.498459039 +0000 +@@ -1060,12 +1060,25 @@ + extern void untrack_pfn_moved(struct vm_area_struct *vma); + #endif + ++#ifdef CONFIG_UKSM ++static inline int is_uksm_zero_pfn(unsigned long pfn) ++{ ++ extern unsigned long uksm_zero_pfn; ++ return pfn == uksm_zero_pfn; ++} ++#else ++static inline int is_uksm_zero_pfn(unsigned long pfn) ++{ ++ return 0; ++} ++#endif ++ + #ifdef __HAVE_COLOR_ZERO_PAGE + static inline int is_zero_pfn(unsigned long pfn) + { + extern unsigned long zero_pfn; + unsigned long offset_from_zero_pfn = pfn - zero_pfn; +- return offset_from_zero_pfn <= (zero_page_mask >> PAGE_SHIFT); ++ return offset_from_zero_pfn <= (zero_page_mask >> PAGE_SHIFT) || is_uksm_zero_pfn(pfn); + } + + #define my_zero_pfn(addr) page_to_pfn(ZERO_PAGE(addr)) +@@ -1074,7 +1087,7 @@ + static inline int is_zero_pfn(unsigned long pfn) + { + extern unsigned long zero_pfn; +- return pfn == zero_pfn; ++ return (pfn == zero_pfn) || (is_uksm_zero_pfn(pfn)); + } + + static inline unsigned long my_zero_pfn(unsigned long addr) diff -Nur a/include/linux/sradix-tree.h b/include/linux/sradix-tree.h --- a/include/linux/sradix-tree.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/include/linux/sradix-tree.h 2019-12-31 03:53:56.324014923 +0000 ++++ b/include/linux/sradix-tree.h 2021-01-03 14:22:34.498459039 +0000 @@ -0,0 +1,77 @@ +#ifndef _LINUX_SRADIX_TREE_H +#define _LINUX_SRADIX_TREE_H @@ -313,7 +307,7 @@ diff -Nur a/include/linux/sradix-tree.h b/include/linux/sradix-tree.h +#endif /* _LINUX_SRADIX_TREE_H */ diff -Nur a/include/linux/uksm.h b/include/linux/uksm.h --- a/include/linux/uksm.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/include/linux/uksm.h 2019-12-31 03:53:56.324014923 +0000 ++++ b/include/linux/uksm.h 2021-01-03 14:22:34.498459039 +0000 @@ -0,0 +1,149 @@ +#ifndef __LINUX_UKSM_H +#define __LINUX_UKSM_H @@ -465,9 +459,9 @@ diff -Nur a/include/linux/uksm.h b/include/linux/uksm.h +#endif /* !CONFIG_UKSM */ +#endif /* __LINUX_UKSM_H */ diff -Nur a/kernel/fork.c b/kernel/fork.c ---- a/kernel/fork.c 2019-12-31 03:51:52.200091547 +0000 -+++ b/kernel/fork.c 2019-12-31 03:53:56.324014923 +0000 -@@ -600,7 +600,7 @@ +--- a/kernel/fork.c 2021-01-03 14:20:51.263372191 +0000 ++++ b/kernel/fork.c 2021-01-03 14:22:34.499459059 +0000 +@@ -588,7 +588,7 @@ __vma_link_rb(mm, tmp, rb_link, rb_parent); rb_link = &tmp->vm_rb.rb_right; rb_parent = &tmp->vm_rb; @@ -475,22 +469,22 @@ diff -Nur a/kernel/fork.c b/kernel/fork.c + uksm_vma_add_new(tmp); mm->map_count++; if (!(tmp->vm_flags & VM_WIPEONFORK)) - retval = copy_page_range(mm, oldmm, mpnt); + retval = copy_page_range(tmp, mpnt); diff -Nur a/lib/Makefile b/lib/Makefile ---- a/lib/Makefile 2019-12-18 15:09:17.000000000 +0000 -+++ b/lib/Makefile 2019-12-31 03:53:56.324014923 +0000 -@@ -25,7 +25,7 @@ - endif +--- a/lib/Makefile 2020-12-30 10:54:29.000000000 +0000 ++++ b/lib/Makefile 2021-01-03 14:22:34.499459059 +0000 +@@ -31,7 +31,7 @@ + KCSAN_SANITIZE_random32.o := n lib-y := ctype.o string.o vsprintf.o cmdline.o \ - rbtree.o radix-tree.o timerqueue.o xarray.o \ + rbtree.o radix-tree.o sradix-tree.o timerqueue.o xarray.o \ - idr.o extable.o \ - sha1.o chacha.o irq_regs.o argv_split.o \ + idr.o extable.o sha1.o irq_regs.o argv_split.o \ flex_proportions.o ratelimit.o show_mem.o \ + is_single_threaded.o plist.o decompress.o kobject_uevent.o \ diff -Nur a/lib/sradix-tree.c b/lib/sradix-tree.c --- a/lib/sradix-tree.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/lib/sradix-tree.c 2019-12-31 03:53:56.324014923 +0000 ++++ b/lib/sradix-tree.c 2021-01-03 14:22:34.499459059 +0000 @@ -0,0 +1,476 @@ +#include <linux/errno.h> +#include <linux/mm.h> @@ -969,9 +963,9 @@ diff -Nur a/lib/sradix-tree.c b/lib/sradix-tree.c + return 0; +} diff -Nur a/mm/Kconfig b/mm/Kconfig ---- a/mm/Kconfig 2019-12-31 03:51:52.210091867 +0000 -+++ b/mm/Kconfig 2019-12-31 03:53:56.324014923 +0000 -@@ -299,6 +299,32 @@ +--- a/mm/Kconfig 2021-01-03 14:20:51.266372252 +0000 ++++ b/mm/Kconfig 2021-01-03 14:22:34.499459059 +0000 +@@ -317,6 +317,32 @@ See Documentation/vm/ksm.rst for more information: KSM is inactive until a program has madvised that an area is MADV_MERGEABLE, and root has set /sys/kernel/mm/ksm/run to 1 (if CONFIG_SYSFS is set). @@ -993,7 +987,7 @@ diff -Nur a/mm/Kconfig b/mm/Kconfig + and CPU efficiency. Since KVM is friendly to KSM, KVM can also benefit from + UKSM. Now UKSM has its first stable release and first real world enterprise user. + For more information, please goto its project page. -+ (www.kerneldedup.org) ++ (github.com/dolohow/uksm) + +config KSM_LEGACY + bool "Legacy KSM implementation" @@ -1003,11 +997,11 @@ diff -Nur a/mm/Kconfig b/mm/Kconfig +endchoice config DEFAULT_MMAP_MIN_ADDR - int "Low address space to protect from user allocation" + int "Low address space to protect from user allocation" diff -Nur a/mm/ksm.c b/mm/ksm.c ---- a/mm/ksm.c 2019-12-18 15:09:17.000000000 +0000 -+++ b/mm/ksm.c 2019-12-31 03:53:56.324014923 +0000 -@@ -857,17 +857,6 @@ +--- a/mm/ksm.c 2020-12-30 10:54:29.000000000 +0000 ++++ b/mm/ksm.c 2021-01-03 14:22:34.499459059 +0000 +@@ -858,17 +858,6 @@ return err; } @@ -1026,9 +1020,9 @@ diff -Nur a/mm/ksm.c b/mm/ksm.c /* * Only called through the sysfs control interface: diff -Nur a/mm/Makefile b/mm/Makefile ---- a/mm/Makefile 2019-12-18 15:09:17.000000000 +0000 -+++ b/mm/Makefile 2019-12-31 03:53:56.324014923 +0000 -@@ -66,7 +66,8 @@ +--- a/mm/Makefile 2020-12-30 10:54:29.000000000 +0000 ++++ b/mm/Makefile 2021-01-03 14:22:34.499459059 +0000 +@@ -76,7 +76,8 @@ obj-$(CONFIG_SPARSEMEM_VMEMMAP) += sparse-vmemmap.o obj-$(CONFIG_SLOB) += slob.o obj-$(CONFIG_MMU_NOTIFIER) += mmu_notifier.o @@ -1039,9 +1033,9 @@ diff -Nur a/mm/Makefile b/mm/Makefile obj-$(CONFIG_SLAB) += slab.o obj-$(CONFIG_SLUB) += slub.o diff -Nur a/mm/memory.c b/mm/memory.c ---- a/mm/memory.c 2019-12-18 15:09:17.000000000 +0000 -+++ b/mm/memory.c 2019-12-31 03:53:56.324014923 +0000 -@@ -130,6 +130,25 @@ +--- a/mm/memory.c 2020-12-30 10:54:29.000000000 +0000 ++++ b/mm/memory.c 2021-01-03 14:22:34.500459079 +0000 +@@ -146,6 +146,25 @@ unsigned long highest_memmap_pfn __read_mostly; @@ -1067,29 +1061,27 @@ diff -Nur a/mm/memory.c b/mm/memory.c /* * CONFIG_MMU architectures set up ZERO_PAGE in their paging_init() */ -@@ -141,6 +160,7 @@ - core_initcall(init_zero_pfn); - +@@ -161,6 +180,7 @@ + trace_rss_stat(mm, member, count); + } + #if defined(SPLIT_RSS_COUNTING) void sync_mm_rss(struct mm_struct *mm) -@@ -772,8 +792,13 @@ +@@ -869,6 +889,11 @@ get_page(page); page_dup_rmap(page, false); rss[mm_counter(page)]++; + + /* Should return NULL in vm_normal_page() */ + uksm_bugon_zeropage(pte); - } else if (pte_devmap(pte)) { - page = pte_page(pte); + } else { + uksm_map_zero_page(pte); } - out_set_pte: -@@ -1046,8 +1071,10 @@ + /* +@@ -1248,8 +1273,10 @@ ptent = ptep_get_and_clear_full(mm, addr, pte, tlb->fullmm); tlb_remove_tlb_entry(tlb, pte, addr); @@ -1101,19 +1093,15 @@ diff -Nur a/mm/memory.c b/mm/memory.c if (!PageAnon(page)) { if (pte_dirty(ptent)) { -@@ -2169,8 +2196,10 @@ - clear_page(kaddr); - kunmap_atomic(kaddr); - flush_dcache_page(dst); -- } else -+ } else { - copy_user_highpage(dst, src, va, vma); +@@ -2597,6 +2624,7 @@ + + if (likely(src)) { + copy_user_highpage(dst, src, addr, vma); + uksm_cow_page(vma, src); -+ } - } + return true; + } - static gfp_t __get_fault_gfp_mask(struct vm_area_struct *vma) -@@ -2322,6 +2351,7 @@ +@@ -2843,6 +2871,7 @@ vmf->address); if (!new_page) goto oom; @@ -1121,7 +1109,7 @@ diff -Nur a/mm/memory.c b/mm/memory.c } else { new_page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, vmf->address); -@@ -2351,7 +2381,9 @@ +@@ -2885,7 +2914,9 @@ mm_counter_file(old_page)); inc_mm_counter_fast(mm, MM_ANONPAGES); } @@ -1132,8 +1120,8 @@ diff -Nur a/mm/memory.c b/mm/memory.c } flush_cache_page(vma, vmf->address, pte_pfn(vmf->orig_pte)); diff -Nur a/mm/mmap.c b/mm/mmap.c ---- a/mm/mmap.c 2019-12-31 03:51:52.210091867 +0000 -+++ b/mm/mmap.c 2019-12-31 03:53:56.324014923 +0000 +--- a/mm/mmap.c 2021-01-03 14:20:51.267372272 +0000 ++++ b/mm/mmap.c 2021-01-03 14:22:34.500459079 +0000 @@ -46,6 +46,7 @@ #include <linux/moduleparam.h> #include <linux/pkeys.h> @@ -1142,7 +1130,7 @@ diff -Nur a/mm/mmap.c b/mm/mmap.c #include <linux/sched/mm.h> #include <linux/uaccess.h> -@@ -184,6 +185,7 @@ +@@ -181,6 +182,7 @@ if (vma->vm_file) fput(vma->vm_file); mpol_put(vma_policy(vma)); @@ -1150,7 +1138,7 @@ diff -Nur a/mm/mmap.c b/mm/mmap.c vm_area_free(vma); return next; } -@@ -743,9 +745,16 @@ +@@ -757,9 +759,16 @@ long adjust_next = 0; int remove_next = 0; @@ -1167,15 +1155,15 @@ diff -Nur a/mm/mmap.c b/mm/mmap.c if (end >= next->vm_end) { /* * vma expands, overlapping all the next, and -@@ -878,6 +887,7 @@ +@@ -890,6 +899,7 @@ end_changed = true; } vma->vm_pgoff = pgoff; + if (adjust_next) { - next->vm_start += adjust_next << PAGE_SHIFT; - next->vm_pgoff += adjust_next; -@@ -983,6 +993,7 @@ + next->vm_start += adjust_next; + next->vm_pgoff += adjust_next >> PAGE_SHIFT; +@@ -994,6 +1004,7 @@ if (remove_next == 2) { remove_next = 1; end = next->vm_end; @@ -1183,7 +1171,7 @@ diff -Nur a/mm/mmap.c b/mm/mmap.c goto again; } else if (next) -@@ -1009,10 +1020,14 @@ +@@ -1020,10 +1031,14 @@ */ VM_WARN_ON(mm->highest_vm_end != vm_end_gap(vma)); } @@ -1198,8 +1186,8 @@ diff -Nur a/mm/mmap.c b/mm/mmap.c validate_mm(mm); return 0; -@@ -1472,6 +1487,9 @@ - vm_flags |= calc_vm_prot_bits(prot, pkey) | calc_vm_flag_bits(flags) | +@@ -1479,6 +1494,9 @@ + vm_flags = calc_vm_prot_bits(prot, pkey) | calc_vm_flag_bits(flags) | mm->def_flags | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC; + /* If uksm is enabled, we add VM_MERGEABLE to new VMAs. */ @@ -1208,7 +1196,7 @@ diff -Nur a/mm/mmap.c b/mm/mmap.c if (flags & MAP_LOCKED) if (!can_do_mlock()) return -EPERM; -@@ -1842,6 +1860,7 @@ +@@ -1874,6 +1892,7 @@ allow_write_access(file); } file = vma->vm_file; @@ -1216,7 +1204,7 @@ diff -Nur a/mm/mmap.c b/mm/mmap.c out: perf_event_mmap(vma); -@@ -1884,6 +1903,7 @@ +@@ -1916,6 +1935,7 @@ if (vm_flags & VM_DENYWRITE) allow_write_access(file); free_vma: @@ -1224,7 +1212,7 @@ diff -Nur a/mm/mmap.c b/mm/mmap.c vm_area_free(vma); unacct_error: if (charged) -@@ -2713,6 +2733,8 @@ +@@ -2775,6 +2795,8 @@ else err = vma_adjust(vma, vma->vm_start, addr, vma->vm_pgoff, new); @@ -1233,15 +1221,15 @@ diff -Nur a/mm/mmap.c b/mm/mmap.c /* Success. */ if (!err) return 0; -@@ -3018,6 +3040,7 @@ +@@ -3082,6 +3104,7 @@ if ((flags & (~VM_EXEC)) != 0) return -EINVAL; flags |= VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags; + uksm_vm_flags_mod(&flags); - error = get_unmapped_area(NULL, addr, len, 0, MAP_FIXED); - if (offset_in_page(error)) -@@ -3068,6 +3091,7 @@ + mapped_addr = get_unmapped_area(NULL, addr, len, 0, MAP_FIXED); + if (IS_ERR_VALUE(mapped_addr)) +@@ -3127,6 +3150,7 @@ vma->vm_flags = flags; vma->vm_page_prot = vm_get_page_prot(flags); vma_link(mm, vma, prev, rb_link, rb_parent); @@ -1249,32 +1237,32 @@ diff -Nur a/mm/mmap.c b/mm/mmap.c out: perf_event_mmap(vma); mm->total_vm += len >> PAGE_SHIFT; -@@ -3145,6 +3169,12 @@ - up_write(&mm->mmap_sem); +@@ -3204,6 +3228,12 @@ + mmap_write_unlock(mm); } + /* -+ * Taking write lock on mmap_sem does not harm others, ++ * Taking write lock on mmap does not harm others, + * but it's crucial for uksm to avoid races. + */ -+ down_write(&mm->mmap_sem); ++ mmap_write_lock(mm); + if (mm->locked_vm) { vma = mm->mmap; while (vma) { -@@ -3179,6 +3209,11 @@ - vma = remove_vma(vma); +@@ -3239,6 +3269,11 @@ + cond_resched(); } vm_unacct_memory(nr_accounted); + + mm->mmap = NULL; + mm->mm_rb = RB_ROOT; + vmacache_invalidate(mm); -+ up_write(&mm->mmap_sem); ++ mmap_write_unlock(mm); } /* Insert vm structure into process list sorted by address -@@ -3286,6 +3321,7 @@ +@@ -3346,6 +3381,7 @@ new_vma->vm_ops->open(new_vma); vma_link(mm, new_vma, prev, rb_link, rb_parent); *need_rmap_locks = false; @@ -1282,7 +1270,7 @@ diff -Nur a/mm/mmap.c b/mm/mmap.c } return new_vma; -@@ -3436,6 +3472,7 @@ +@@ -3498,6 +3534,7 @@ vm_stat_account(mm, vma->vm_flags, len >> PAGE_SHIFT); perf_event_mmap(vma); @@ -1292,8 +1280,8 @@ diff -Nur a/mm/mmap.c b/mm/mmap.c diff -Nur a/mm/uksm.c b/mm/uksm.c --- a/mm/uksm.c 1970-01-01 01:00:00.000000000 +0100 -+++ b/mm/uksm.c 2019-12-31 03:53:56.334015236 +0000 -@@ -0,0 +1,5613 @@ ++++ b/mm/uksm.c 2021-01-03 14:22:34.501459099 +0000 +@@ -0,0 +1,5614 @@ +/* + * Ultra KSM. Copyright (C) 2011-2012 Nai Xia + * @@ -2201,7 +2189,7 @@ diff -Nur a/mm/uksm.c b/mm/uksm.c + * page->mapping is naturally ordered after reading node->kpfn, + * but on Alpha we need to be more careful. + */ -+ smp_read_barrier_depends(); ++ smp_rmb(); + + if (READ_ONCE(page->mapping) != expected_mapping) + goto stale; @@ -2442,7 +2430,7 @@ diff -Nur a/mm/uksm.c b/mm/uksm.c + /* Ok, vma still valid */ + vma = slot->vma; + mm = vma->vm_mm; -+ sem = &mm->mmap_sem; ++ sem = &mm->mmap_lock; + + if (uksm_test_exit(mm)) { + spin_unlock(&vma_slot_list_lock); @@ -2522,7 +2510,7 @@ diff -Nur a/mm/uksm.c b/mm/uksm.c + return 0; + +failout_up: -+ up_read(&mm->mmap_sem); ++ mmap_read_unlock(mm); + return err; +} + @@ -3994,7 +3982,8 @@ diff -Nur a/mm/uksm.c b/mm/uksm.c + break; + if (PageKsm(page)) { + ret = handle_mm_fault(vma, addr, -+ FAULT_FLAG_WRITE | FAULT_FLAG_REMOTE); ++ FAULT_FLAG_WRITE | FAULT_FLAG_REMOTE, ++ NULL); + } else + ret = VM_FAULT_WRITE; + put_page(page); @@ -4269,7 +4258,7 @@ diff -Nur a/mm/uksm.c b/mm/uksm.c + } +put_up_out: + put_page(tree_rmap_item->page); -+ up_read(&tree_rmap_item->slot->vma->vm_mm->mmap_sem); ++ mmap_read_unlock(tree_rmap_item->slot->vma->vm_mm); + } +} + @@ -5849,7 +5838,7 @@ diff -Nur a/mm/uksm.c b/mm/uksm.c + BUG_ON(!vma_can_enter(slot->vma)); + if (uksm_test_exit(slot->vma->vm_mm)) { + mmsem_batch = 0; -+ up_read(&slot->vma->vm_mm->mmap_sem); ++ mmap_read_unlock(slot->vma->vm_mm); + goto rm_slot; + } + @@ -5865,13 +5854,13 @@ diff -Nur a/mm/uksm.c b/mm/uksm.c + + if (rung->current_offset + rung->step > slot->pages - 1 + || vma_fully_scanned(slot)) { -+ up_read(&slot->vma->vm_mm->mmap_sem); ++ mmap_read_unlock(slot->vma->vm_mm); + judge_slot(slot); + mmsem_batch = 0; + } else { + rung->current_offset += rung->step; + if (!mmsem_batch) -+ up_read(&slot->vma->vm_mm->mmap_sem); ++ mmap_read_unlock(slot->vma->vm_mm); + } + + busy_retry = BUSY_RETRY; @@ -5879,7 +5868,7 @@ diff -Nur a/mm/uksm.c b/mm/uksm.c + } + + if (mmsem_batch) { -+ up_read(&slot->vma->vm_mm->mmap_sem); ++ mmap_read_unlock(slot->vma->vm_mm); + mmsem_batch = 0; + } + @@ -6908,11 +6897,11 @@ diff -Nur a/mm/uksm.c b/mm/uksm.c +#endif + diff -Nur a/mm/vmstat.c b/mm/vmstat.c ---- a/mm/vmstat.c 2019-12-18 15:09:17.000000000 +0000 -+++ b/mm/vmstat.c 2019-12-31 03:53:56.334015236 +0000 -@@ -1168,6 +1168,9 @@ - "nr_written", - "nr_kernel_misc_reclaimable", +--- a/mm/vmstat.c 2020-12-30 10:54:29.000000000 +0000 ++++ b/mm/vmstat.c 2021-01-03 14:22:34.502459119 +0000 +@@ -1216,6 +1216,9 @@ + "nr_shadow_call_stack", + #endif +#ifdef CONFIG_UKSM + "nr_uksm_zero_pages", diff --git a/sys-kernel/linux-image-redcore-lts/files/5.4-amdgpu-dc_link-drop-some-asserts.patch b/sys-kernel/linux-image-redcore-lts/files/5.4-amdgpu-dc_link-drop-some-asserts.patch deleted file mode 100644 index f189eff5..00000000 --- a/sys-kernel/linux-image-redcore-lts/files/5.4-amdgpu-dc_link-drop-some-asserts.patch +++ /dev/null @@ -1,196 +0,0 @@ -diff -Naur linux-5.3.5/drivers/gpu/drm/amd/display/dc/core/dc_link.c linux-5.3.5-p/drivers/gpu/drm/amd/display/dc/core/dc_link.c ---- linux-5.3.5/drivers/gpu/drm/amd/display/dc/core/dc_link.c 2019-10-07 19:01:58.000000000 +0200 -+++ linux-5.3.5-p/drivers/gpu/drm/amd/display/dc/core/dc_link.c 2019-10-10 23:30:11.410468583 +0200 -@@ -1721,10 +1721,6 @@ - offset = 0x%x, reg_val= 0x%x, i2c_success = %d\n", - slave_address, buffer[0], buffer[1], i2c_success?1:0); - -- if (!i2c_success) -- /* Write failure */ -- ASSERT(i2c_success); -- - /* Based on DP159 specs, APPLY_RX_TX_CHANGE bit in 0x0A - * needs to be set to 1 on every 0xA-0xC write. - */ -@@ -1740,9 +1736,6 @@ - dal_ddc_service_query_ddc_data( - pipe_ctx->stream->link->ddc, - slave_address, &offset, 1, &value, 1); -- if (!i2c_success) -- /* Write failure */ -- ASSERT(i2c_success); - } - - buffer[0] = offset; -@@ -1753,9 +1746,6 @@ - RETIMER_REDRIVER_INFO("retimer write to slave_address = 0x%x,\ - offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n", - slave_address, buffer[0], buffer[1], i2c_success?1:0); -- if (!i2c_success) -- /* Write failure */ -- ASSERT(i2c_success); - } - } - } -@@ -1774,9 +1764,6 @@ - offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n", - slave_address, buffer[0], buffer[1], i2c_success?1:0); - -- if (!i2c_success) -- /* Write failure */ -- ASSERT(i2c_success); - - /* Based on DP159 specs, APPLY_RX_TX_CHANGE bit in 0x0A - * needs to be set to 1 on every 0xA-0xC write. -@@ -1793,9 +1780,6 @@ - dal_ddc_service_query_ddc_data( - pipe_ctx->stream->link->ddc, - slave_address, &offset, 1, &value, 1); -- if (!i2c_success) -- /* Write failure */ -- ASSERT(i2c_success); - } - - buffer[0] = offset; -@@ -1806,9 +1790,6 @@ - RETIMER_REDRIVER_INFO("retimer write to slave_address = 0x%x,\ - offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n", - slave_address, buffer[0], buffer[1], i2c_success?1:0); -- if (!i2c_success) -- /* Write failure */ -- ASSERT(i2c_success); - } - } - } -@@ -1825,9 +1806,6 @@ - RETIMER_REDRIVER_INFO("retimer write to slave_address = 0x%x,\ - offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n", - slave_address, buffer[0], buffer[1], i2c_success?1:0); -- if (!i2c_success) -- /* Write failure */ -- ASSERT(i2c_success); - - /* Write offset 0x00 to 0x23 */ - buffer[0] = 0x00; -@@ -1837,9 +1815,6 @@ - RETIMER_REDRIVER_INFO("retimer write to slave_address = 0x%x,\ - offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n", - slave_address, buffer[0], buffer[1], i2c_success?1:0); -- if (!i2c_success) -- /* Write failure */ -- ASSERT(i2c_success); - - /* Write offset 0xff to 0x00 */ - buffer[0] = 0xff; -@@ -1849,10 +1824,6 @@ - RETIMER_REDRIVER_INFO("retimer write to slave_address = 0x%x,\ - offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n", - slave_address, buffer[0], buffer[1], i2c_success?1:0); -- if (!i2c_success) -- /* Write failure */ -- ASSERT(i2c_success); -- - } - } - -@@ -1877,9 +1848,6 @@ - RETIMER_REDRIVER_INFO("retimer writes default setting to slave_address = 0x%x,\ - offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n", - slave_address, buffer[0], buffer[1], i2c_success?1:0); -- if (!i2c_success) -- /* Write failure */ -- ASSERT(i2c_success); - - /* Write offset 0x0A to 0x17 */ - buffer[0] = 0x0A; -@@ -1889,9 +1857,6 @@ - RETIMER_REDRIVER_INFO("retimer write to slave_addr = 0x%x,\ - offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n", - slave_address, buffer[0], buffer[1], i2c_success?1:0); -- if (!i2c_success) -- /* Write failure */ -- ASSERT(i2c_success); - - /* Write offset 0x0B to 0xDA or 0xD8 */ - buffer[0] = 0x0B; -@@ -1901,9 +1866,6 @@ - RETIMER_REDRIVER_INFO("retimer write to slave_addr = 0x%x,\ - offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n", - slave_address, buffer[0], buffer[1], i2c_success?1:0); -- if (!i2c_success) -- /* Write failure */ -- ASSERT(i2c_success); - - /* Write offset 0x0A to 0x17 */ - buffer[0] = 0x0A; -@@ -1913,9 +1875,6 @@ - RETIMER_REDRIVER_INFO("retimer write to slave_addr = 0x%x,\ - offset = 0x%x, reg_val= 0x%x, i2c_success = %d\n", - slave_address, buffer[0], buffer[1], i2c_success?1:0); -- if (!i2c_success) -- /* Write failure */ -- ASSERT(i2c_success); - - /* Write offset 0x0C to 0x1D or 0x91 */ - buffer[0] = 0x0C; -@@ -1925,9 +1884,6 @@ - RETIMER_REDRIVER_INFO("retimer write to slave_addr = 0x%x,\ - offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n", - slave_address, buffer[0], buffer[1], i2c_success?1:0); -- if (!i2c_success) -- /* Write failure */ -- ASSERT(i2c_success); - - /* Write offset 0x0A to 0x17 */ - buffer[0] = 0x0A; -@@ -1937,9 +1893,6 @@ - RETIMER_REDRIVER_INFO("retimer write to slave_addr = 0x%x,\ - offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n", - slave_address, buffer[0], buffer[1], i2c_success?1:0); -- if (!i2c_success) -- /* Write failure */ -- ASSERT(i2c_success); - - - if (is_vga_mode) { -@@ -1953,9 +1906,7 @@ - RETIMER_REDRIVER_INFO("retimer write to slave_addr = 0x%x,\ - offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n", - slave_address, buffer[0], buffer[1], i2c_success?1:0); -- if (!i2c_success) -- /* Write failure */ -- ASSERT(i2c_success); -+ - - /* Write offset 0x00 to 0x23 */ - buffer[0] = 0x00; -@@ -1965,9 +1916,6 @@ - RETIMER_REDRIVER_INFO("retimer write to slave_addr = 0x%x,\ - offset = 0x%x, reg_val= 0x%x, i2c_success = %d\n", - slave_address, buffer[0], buffer[1], i2c_success?1:0); -- if (!i2c_success) -- /* Write failure */ -- ASSERT(i2c_success); - - /* Write offset 0xff to 0x00 */ - buffer[0] = 0xff; -@@ -1977,9 +1925,6 @@ - RETIMER_REDRIVER_INFO("retimer write default setting to slave_addr = 0x%x,\ - offset = 0x%x, reg_val= 0x%x, i2c_success = %d end here\n", - slave_address, buffer[0], buffer[1], i2c_success?1:0); -- if (!i2c_success) -- /* Write failure */ -- ASSERT(i2c_success); - } - } - -@@ -2008,9 +1953,6 @@ - i2c_success = %d\n", - slave_address, buffer[3], buffer[4], buffer[5], buffer[6], i2c_success?1:0); - -- if (!i2c_success) -- /* Write failure */ -- ASSERT(i2c_success); - } - - static void enable_link_hdmi(struct pipe_ctx *pipe_ctx) diff --git a/sys-kernel/linux-image-redcore-lts/files/5.4-ath10k-be-quiet.patch b/sys-kernel/linux-image-redcore-lts/files/5.4-ath10k-be-quiet.patch deleted file mode 100644 index df32a919..00000000 --- a/sys-kernel/linux-image-redcore-lts/files/5.4-ath10k-be-quiet.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff -Naur linux-5.2.14/drivers/net/wireless/ath/ath10k/core.c linux-5.2.14-ath/drivers/net/wireless/ath/ath10k/core.c ---- linux-5.2.14/drivers/net/wireless/ath/ath10k/core.c 2019-09-10 11:35:27.000000000 +0200 -+++ linux-5.2.14-ath/drivers/net/wireless/ath/ath10k/core.c 2019-09-11 21:02:39.494630998 +0200 -@@ -2087,7 +2087,8 @@ - return ret; - } - -- ath10k_info(ar, "UART prints enabled\n"); -+ /* Please, _dbg() , no need to flood the dmesg with these */ -+ ath10k_dbg(ar, ATH10K_DBG_BOOT, "UART prints enabled\n"); - return 0; - } - -diff -Naur linux-5.2.14/drivers/net/wireless/ath/ath10k/htc.c linux-5.2.14-ath/drivers/net/wireless/ath/ath10k/htc.c ---- linux-5.2.14/drivers/net/wireless/ath/ath10k/htc.c 2019-09-10 11:35:27.000000000 +0200 -+++ linux-5.2.14-ath/drivers/net/wireless/ath/ath10k/htc.c 2019-09-11 21:02:39.494630998 +0200 -@@ -799,7 +799,7 @@ - &ep->ul_pipe_id, - &ep->dl_pipe_id); - if (status) { -- ath10k_warn(ar, "unsupported HTC service id: %d\n", -+ ath10k_dbg(ar, ATH10K_DBG_BOOT, "unsupported HTC service id: %d\n", - ep->service_id); - return status; - } -@@ -877,7 +877,7 @@ - &ul_pipe_id, - &dl_pipe_id); - if (status) { -- ath10k_warn(ar, "unsupported HTC service id: %d\n", -+ ath10k_dbg(ar, ATH10K_DBG_BOOT, "unsupported HTC service id: %d\n", - ATH10K_HTC_SVC_ID_HTT_LOG_MSG); - - return false; -diff -Naur linux-5.2.14/drivers/net/wireless/ath/ath10k/sdio.c linux-5.2.14-ath/drivers/net/wireless/ath/ath10k/sdio.c ---- linux-5.2.14/drivers/net/wireless/ath/ath10k/sdio.c 2019-09-10 11:35:27.000000000 +0200 -+++ linux-5.2.14-ath/drivers/net/wireless/ath/ath10k/sdio.c 2019-09-11 21:02:39.494630998 +0200 -@@ -1875,7 +1875,7 @@ - ar_sdio->mbox_addr[eid], ar_sdio->mbox_size[eid]); - break; - default: -- ath10k_warn(ar, "unsupported HTC service id: %d\n", -+ ath10k_dbg(ar, ATH10K_DBG_SDIO, "unsupported HTC service id: %d\n", - service_id); - return -EINVAL; - } diff --git a/sys-kernel/linux-image-redcore-lts/files/5.4-drop_ancient-and-wrong-msg.patch b/sys-kernel/linux-image-redcore-lts/files/5.4-drop_ancient-and-wrong-msg.patch deleted file mode 100644 index f184b08e..00000000 --- a/sys-kernel/linux-image-redcore-lts/files/5.4-drop_ancient-and-wrong-msg.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -Naur linux-4.15.1/drivers/edac/amd64_edac.c linux-4.15.1-p/drivers/edac/amd64_edac.c ---- linux-4.15.1/drivers/edac/amd64_edac.c 2018-02-03 17:58:44.000000000 +0100 -+++ linux-4.15.1-p/drivers/edac/amd64_edac.c 2018-02-12 01:52:10.411149240 +0100 -@@ -3020,17 +3020,6 @@ - amd64_warn("Error restoring NB MCGCTL settings!\n"); - } - --/* -- * EDAC requires that the BIOS have ECC enabled before -- * taking over the processing of ECC errors. A command line -- * option allows to force-enable hardware ECC later in -- * enable_ecc_error_reporting(). -- */ --static const char *ecc_msg = -- "ECC disabled in the BIOS or no ECC capability, module will not load.\n" -- " Either enable ECC checking or force module loading by setting " -- "'ecc_enable_override'.\n" -- " (Note that use of the override may cause unknown side effects.)\n"; - - static bool ecc_enabled(struct pci_dev *F3, u16 nid) - { -@@ -3083,7 +3072,6 @@ - nid, (ecc_en ? "enabled" : "disabled")); - - if (!ecc_en || !nb_mce_en) { -- amd64_info("%s", ecc_msg); - return false; - } - return true; diff --git a/sys-kernel/linux-image-redcore-lts/files/5.4-nvme-hwmon.patch b/sys-kernel/linux-image-redcore-lts/files/5.4-nvme-hwmon.patch deleted file mode 100644 index d0290576..00000000 --- a/sys-kernel/linux-image-redcore-lts/files/5.4-nvme-hwmon.patch +++ /dev/null @@ -1,300 +0,0 @@ -v3: NVME -> NVMe - Call nvme_hwmon_init() only once, when the controller is first - identified - Protect call to nvme_get_log() and reading the log with mutex - Convert error return from nvme_get_log() to Linux error code - in nvme_hwmon_get_smart_log() - Don't read smart log for reporting warning and critical limits - Use get_unaligned_le16() instead of le16_to_cpup() to read the - composite temperature - Use #ifdef CONFIG_NVME_HWMON instead of IS_ENABLED(CONFIG_NVME_HWMON) - -EPROTO -> -EIO for generic NVMe level errors - Tab-align '=' in data structure initializations - -v2: Use devm_kfree() to release memory in error path - -Tested with the following NVMe drives: - Intel SSDPEKKW512G7 500GB - Samsung SSD 960 EVO 500GB - Samsung SSD 970 EVO 500GB - Samsung SSD 970 EVO 1TB - - drivers/nvme/host/Kconfig | 10 ++ - drivers/nvme/host/Makefile | 1 + - drivers/nvme/host/core.c | 6 ++ - drivers/nvme/host/nvme-hwmon.c | 181 +++++++++++++++++++++++++++++++++ - drivers/nvme/host/nvme.h | 8 ++ - 5 files changed, 206 insertions(+) - create mode 100644 drivers/nvme/host/nvme-hwmon.c - -diff --git a/drivers/nvme/host/Kconfig b/drivers/nvme/host/Kconfig -index 2b36f052bfb9..c6439638a419 100644 ---- a/drivers/nvme/host/Kconfig -+++ b/drivers/nvme/host/Kconfig -@@ -23,6 +23,16 @@ config NVME_MULTIPATH - /dev/nvmeXnY device will show up for each NVMe namespaces, - even if it is accessible through multiple controllers. - -+config NVME_HWMON -+ bool "NVMe hardware monitoring" -+ depends on (NVME_CORE=y && HWMON=y) || (NVME_CORE=m && HWMON) -+ help -+ This provides support for NVMe hardware monitoring. If enabled, -+ a hardware monitoring device will be created for each NVMe drive -+ in the system. -+ -+ If unsure, say N. -+ - config NVME_FABRICS - tristate - -diff --git a/drivers/nvme/host/Makefile b/drivers/nvme/host/Makefile -index 8a4b671c5f0c..03de4797a877 100644 ---- a/drivers/nvme/host/Makefile -+++ b/drivers/nvme/host/Makefile -@@ -14,6 +14,7 @@ nvme-core-$(CONFIG_TRACING) += trace.o - nvme-core-$(CONFIG_NVME_MULTIPATH) += multipath.o - nvme-core-$(CONFIG_NVM) += lightnvm.o - nvme-core-$(CONFIG_FAULT_INJECTION_DEBUG_FS) += fault_inject.o -+nvme-core-$(CONFIG_NVME_HWMON) += nvme-hwmon.o - - nvme-y += pci.o - -diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c -index fa7ba09dca77..d039e392de36 100644 ---- a/drivers/nvme/host/core.c -+++ b/drivers/nvme/host/core.c -@@ -2796,6 +2796,9 @@ int nvme_init_identify(struct nvme_ctrl *ctrl) - ctrl->oncs = le16_to_cpu(id->oncs); - ctrl->mtfa = le16_to_cpu(id->mtfa); - ctrl->oaes = le32_to_cpu(id->oaes); -+ ctrl->wctemp = le16_to_cpu(id->wctemp); -+ ctrl->cctemp = le16_to_cpu(id->cctemp); -+ - atomic_set(&ctrl->abort_limit, id->acl + 1); - ctrl->vwc = id->vwc; - if (id->mdts) -@@ -2895,6 +2898,9 @@ int nvme_init_identify(struct nvme_ctrl *ctrl) - if (ret < 0) - return ret; - -+ if (!ctrl->identified) -+ nvme_hwmon_init(ctrl); -+ - ctrl->identified = true; - - return 0; -diff --git a/drivers/nvme/host/nvme-hwmon.c b/drivers/nvme/host/nvme-hwmon.c -new file mode 100644 -index 000000000000..8a86f0363531 ---- /dev/null -+++ b/drivers/nvme/host/nvme-hwmon.c -@@ -0,0 +1,181 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * NVM Express hardware monitoring support -+ * Copyright (c) 2019, Guenter Roeck -+ */ -+ -+#include <linux/hwmon.h> -+#include <asm/unaligned.h> -+ -+#include "nvme.h" -+ -+struct nvme_hwmon_data { -+ struct nvme_ctrl *ctrl; -+ struct nvme_smart_log log; -+ struct mutex read_lock; -+}; -+ -+static int nvme_hwmon_get_smart_log(struct nvme_hwmon_data *data) -+{ -+ int ret; -+ -+ ret = nvme_get_log(data->ctrl, NVME_NSID_ALL, NVME_LOG_SMART, 0, -+ &data->log, sizeof(data->log), 0); -+ -+ return ret <= 0 ? ret : -EIO; -+} -+ -+static int nvme_hwmon_read(struct device *dev, enum hwmon_sensor_types type, -+ u32 attr, int channel, long *val) -+{ -+ struct nvme_hwmon_data *data = dev_get_drvdata(dev); -+ struct nvme_smart_log *log = &data->log; -+ int temp; -+ int err; -+ -+ /* -+ * First handle attributes which don't require us to read -+ * the smart log. -+ */ -+ switch (attr) { -+ case hwmon_temp_max: -+ *val = (data->ctrl->wctemp - 273) * 1000; -+ return 0; -+ case hwmon_temp_crit: -+ *val = (data->ctrl->cctemp - 273) * 1000; -+ return 0; -+ default: -+ break; -+ } -+ -+ mutex_lock(&data->read_lock); -+ err = nvme_hwmon_get_smart_log(data); -+ if (err) -+ goto unlock; -+ -+ switch (attr) { -+ case hwmon_temp_input: -+ if (!channel) -+ temp = get_unaligned_le16(log->temperature); -+ else -+ temp = le16_to_cpu(log->temp_sensor[channel - 1]); -+ *val = (temp - 273) * 1000; -+ break; -+ case hwmon_temp_crit_alarm: -+ *val = !!(log->critical_warning & NVME_SMART_CRIT_TEMPERATURE); -+ break; -+ default: -+ err = -EOPNOTSUPP; -+ break; -+ } -+unlock: -+ mutex_unlock(&data->read_lock); -+ return err; -+} -+ -+static const char * const nvme_hwmon_sensor_names[] = { -+ "Composite", -+ "Sensor 1", -+ "Sensor 2", -+ "Sensor 3", -+ "Sensor 4", -+ "Sensor 5", -+ "Sensor 6", -+ "Sensor 7", -+ "Sensor 8", -+}; -+ -+static int nvme_hwmon_read_string(struct device *dev, -+ enum hwmon_sensor_types type, u32 attr, -+ int channel, const char **str) -+{ -+ *str = nvme_hwmon_sensor_names[channel]; -+ return 0; -+} -+ -+static umode_t nvme_hwmon_is_visible(const void *_data, -+ enum hwmon_sensor_types type, -+ u32 attr, int channel) -+{ -+ const struct nvme_hwmon_data *data = _data; -+ -+ switch (attr) { -+ case hwmon_temp_crit: -+ if (!channel && data->ctrl->cctemp) -+ return 0444; -+ break; -+ case hwmon_temp_max: -+ if (!channel && data->ctrl->wctemp) -+ return 0444; -+ break; -+ case hwmon_temp_crit_alarm: -+ if (!channel) -+ return 0444; -+ break; -+ case hwmon_temp_input: -+ case hwmon_temp_label: -+ if (!channel || data->log.temp_sensor[channel - 1]) -+ return 0444; -+ break; -+ default: -+ break; -+ } -+ return 0; -+} -+ -+static const struct hwmon_channel_info *nvme_hwmon_info[] = { -+ HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), -+ HWMON_CHANNEL_INFO(temp, -+ HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_CRIT | -+ HWMON_T_LABEL | HWMON_T_CRIT_ALARM, -+ HWMON_T_INPUT | HWMON_T_LABEL, -+ HWMON_T_INPUT | HWMON_T_LABEL, -+ HWMON_T_INPUT | HWMON_T_LABEL, -+ HWMON_T_INPUT | HWMON_T_LABEL, -+ HWMON_T_INPUT | HWMON_T_LABEL, -+ HWMON_T_INPUT | HWMON_T_LABEL, -+ HWMON_T_INPUT | HWMON_T_LABEL, -+ HWMON_T_INPUT | HWMON_T_LABEL), -+ NULL -+}; -+ -+static const struct hwmon_ops nvme_hwmon_ops = { -+ .is_visible = nvme_hwmon_is_visible, -+ .read = nvme_hwmon_read, -+ .read_string = nvme_hwmon_read_string, -+}; -+ -+static const struct hwmon_chip_info nvme_hwmon_chip_info = { -+ .ops = &nvme_hwmon_ops, -+ .info = nvme_hwmon_info, -+}; -+ -+void nvme_hwmon_init(struct nvme_ctrl *ctrl) -+{ -+ struct device *dev = ctrl->device; -+ struct nvme_hwmon_data *data; -+ struct device *hwmon; -+ int err; -+ -+ data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); -+ if (!data) -+ return; -+ -+ data->ctrl = ctrl; -+ mutex_init(&data->read_lock); -+ -+ err = nvme_hwmon_get_smart_log(data); -+ if (err) { -+ dev_warn(dev, "Failed to read smart log (error %d)\n", err); -+ devm_kfree(dev, data); -+ return; -+ } -+ -+ hwmon = devm_hwmon_device_register_with_info(dev, dev_name(dev), data, -+ &nvme_hwmon_chip_info, -+ NULL); -+ if (IS_ERR(hwmon)) { -+ dev_warn(dev, "Failed to instantiate hwmon device\n"); -+ devm_kfree(dev, data); -+ } -+} -diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h -index 22e8401352c2..cb3b242a214e 100644 ---- a/drivers/nvme/host/nvme.h -+++ b/drivers/nvme/host/nvme.h -@@ -231,6 +231,8 @@ struct nvme_ctrl { - u16 kas; - u8 npss; - u8 apsta; -+ u16 wctemp; -+ u16 cctemp; - u32 oaes; - u32 aen_result; - u32 ctratt; -@@ -652,4 +654,10 @@ static inline struct nvme_ns *nvme_get_ns_from_dev(struct device *dev) - return dev_to_disk(dev)->private_data; - } - -+#ifdef CONFIG_NVME_HWMON -+void nvme_hwmon_init(struct nvme_ctrl *ctrl); -+#else -+static inline void nvme_hwmon_init(struct nvme_ctrl *ctrl) { } -+#endif -+ - #endif /* _NVME_H */ --- -2.17.1 - diff --git a/sys-kernel/linux-image-redcore-lts/files/5.4-nvme-pci-more-info.patch b/sys-kernel/linux-image-redcore-lts/files/5.4-nvme-pci-more-info.patch deleted file mode 100644 index d4c88dc0..00000000 --- a/sys-kernel/linux-image-redcore-lts/files/5.4-nvme-pci-more-info.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -Naur linux-5.3.1/drivers/nvme/host/pci.c linux-5.3.1-p/drivers/nvme/host/pci.c ---- linux-5.3.1/drivers/nvme/host/pci.c 2019-09-21 07:19:47.000000000 +0200 -+++ linux-5.3.1-p/drivers/nvme/host/pci.c 2019-09-27 14:46:38.567818352 +0200 -@@ -2524,8 +2524,11 @@ - } - - result = nvme_init_identify(&dev->ctrl); -- if (result) -+ if (result) { -+ dev_warn(dev->ctrl.device, -+ "nvme_init_identify() failed\n"); - goto out; -+ } - - if (dev->ctrl.oacs & NVME_CTRL_OACS_SEC_SUPP) { - if (!dev->ctrl.opal_dev) -@@ -2547,13 +2550,19 @@ - - if (dev->ctrl.hmpre) { - result = nvme_setup_host_mem(dev); -- if (result < 0) -+ if (result < 0) { -+ dev_warn(dev->ctrl.device, -+ "hmpre - nvme_setup_host_mem() failed\n"); - goto out; -+ } - } - - result = nvme_setup_io_queues(dev); -- if (result) -+ if (result) { -+ dev_warn(dev->ctrl.device, -+ "nvme_setup_io_queues() failed\n"); - goto out; -+ } - - /* - * Keep the controller around but remove all namespaces if we don't have diff --git a/sys-kernel/linux-image-redcore-lts/files/5.4-nvme-suspend-resume-workaround.patch b/sys-kernel/linux-image-redcore-lts/files/5.4-nvme-suspend-resume-workaround.patch deleted file mode 100644 index 684a939f..00000000 --- a/sys-kernel/linux-image-redcore-lts/files/5.4-nvme-suspend-resume-workaround.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur linux-5.2.14-nvme-resume/drivers/nvme/host/pci.c linux-5.2.14-nvme/drivers/nvme/host/pci.c ---- linux-5.2.14-nvme-resume/drivers/nvme/host/pci.c 2019-09-11 21:23:38.746030937 +0200 -+++ linux-5.2.14-nvme/drivers/nvme/host/pci.c 2019-09-11 23:29:45.638351764 +0200 -@@ -1072,6 +1072,8 @@ - u16 start, end; - int found; - -+ if (!nvme_cqe_pending(nvmeq)) -+ return 0; - /* - * For a poll queue we need to protect against the polling thread - * using the CQ lock. For normal interrupt driven threads we have diff --git a/sys-kernel/linux-image-redcore-lts/linux-image-redcore-lts-5.4.35.ebuild b/sys-kernel/linux-image-redcore-lts/linux-image-redcore-lts-5.10.4.ebuild index 367c11d4..6a4de404 100644 --- a/sys-kernel/linux-image-redcore-lts/linux-image-redcore-lts-5.4.35.ebuild +++ b/sys-kernel/linux-image-redcore-lts/linux-image-redcore-lts-5.10.4.ebuild @@ -7,7 +7,7 @@ inherit eutils EXTRAVERSION="redcore-lts" KV_FULL="${PV}-${EXTRAVERSION}" -KV_MAJOR="5.4" +KV_MAJOR="5.10" DESCRIPTION="Redcore Linux Kernel Image (LTS)" HOMEPAGE="https://redcorelinux.org" @@ -34,18 +34,29 @@ DEPEND=" RDEPEND="${DEPEND}" PATCHES=( + "${FILESDIR}"/"${KV_MAJOR}"-ath10k-be-quiet.patch "${FILESDIR}"/"${KV_MAJOR}"-enable_alx_wol.patch - "${FILESDIR}"/"${KV_MAJOR}"-drop_ancient-and-wrong-msg.patch "${FILESDIR}"/"${KV_MAJOR}"-ata-fix-NCQ-LOG-strings-and-move-to-debug.patch "${FILESDIR}"/"${KV_MAJOR}"-radeon_dp_aux_transfer_native-no-ratelimited_debug.patch "${FILESDIR}"/"${KV_MAJOR}"-acpi-use-kern_warning_even_when_error.patch - "${FILESDIR}"/"${KV_MAJOR}"-ath10k-be-quiet.patch "${FILESDIR}"/"${KV_MAJOR}"-Unknow-SSD-HFM128GDHTNG-8310B-QUIRK_NO_APST.patch - "${FILESDIR}"/"${KV_MAJOR}"-nvme-suspend-resume-workaround.patch - "${FILESDIR}"/"${KV_MAJOR}"-nvme-pci-more-info.patch + "${FILESDIR}"/"${KV_MAJOR}"-nvme-Patriot_Viper_VPN100-QUIRK_IGNORE_DEV_SUBNQN.patch "${FILESDIR}"/"${KV_MAJOR}"-acer-wmi-silence-unknow-functions-messages.patch - "${FILESDIR}"/"${KV_MAJOR}"-amdgpu-dc_link-drop-some-asserts.patch - "${FILESDIR}"/"${KV_MAJOR}"-nvme-hwmon.patch + "${FILESDIR}"/"${KV_MAJOR}"-do_not_bug_the_next_18-years.patch + "${FILESDIR}"/"${KV_MAJOR}"-iwlwifi-use-debug-for-debug-infos.patch + "${FILESDIR}"/"${KV_MAJOR}"-compress-modules-zstd-support.patch + "${FILESDIR}"/"${KV_MAJOR}"-fix-bootconfig-makefile.patch + "${FILESDIR}"/"${KV_MAJOR}"-apic_vector-spam-in-debug-mode-only.patch + "${FILESDIR}"/"${KV_MAJOR}"-iwlwifi-fix-5e003982b07ae.patch + "${FILESDIR}"/"${KV_MAJOR}"-enable-new-amd-energy-driver-for-all-ryzen.patch + "${FILESDIR}"/"${KV_MAJOR}"-amd_iommu_init_info.patch + "${FILESDIR}"/"${KV_MAJOR}"-0001-Revert-hwmon-k10temp-Remove-support-for-displaying-v.patch + "${FILESDIR}"/"${KV_MAJOR}"-k10temp-fix-ZEN2-desktop-add-ZEN3-desktop.patch + "${FILESDIR}"/"${KV_MAJOR}"-8353d30e747f-drm-amd-display-disable-stream-if-pixel-clock-changed-with-link-active.patch + "${FILESDIR}"/"${KV_MAJOR}"-add-amd-sfh-hid_driver.patch + "${FILESDIR}"/"${KV_MAJOR}"-add-sbtsi_driver.patch + "${FILESDIR}"/"${KV_MAJOR}"-0001-Revert-cpufreq-Avoid-configuring-old-governors-as-de.patch + "${FILESDIR}"/"${KV_MAJOR}"-revert-parts-of-a00ec3874e7d326ab2dffbed92faddf6a77a84e9-no-Intel-NO.patch "${FILESDIR}"/"${KV_MAJOR}"-linux-hardened.patch "${FILESDIR}"/"${KV_MAJOR}"-uksm-linux-hardened.patch ) diff --git a/sys-kernel/linux-image-redcore-lts/linux-image-redcore-lts-5.4.41.ebuild b/sys-kernel/linux-image-redcore-lts/linux-image-redcore-lts-5.4.41.ebuild deleted file mode 100644 index 367c11d4..00000000 --- a/sys-kernel/linux-image-redcore-lts/linux-image-redcore-lts-5.4.41.ebuild +++ /dev/null @@ -1,155 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit eutils - -EXTRAVERSION="redcore-lts" -KV_FULL="${PV}-${EXTRAVERSION}" -KV_MAJOR="5.4" - -DESCRIPTION="Redcore Linux Kernel Image (LTS)" -HOMEPAGE="https://redcorelinux.org" -SRC_URI="https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-${PV}.tar.xz" - -KEYWORDS="~amd64" -LICENSE="GPL-2" -SLOT="${PVR}" -IUSE="+cryptsetup +dmraid +dracut +dkms +mdadm" - -RESTRICT="binchecks strip mirror" -DEPEND=" - app-arch/lz4 - app-arch/xz-utils - sys-devel/autoconf - sys-devel/bc - sys-devel/make - cryptsetup? ( sys-fs/cryptsetup ) - dmraid? ( sys-fs/dmraid ) - dracut? ( >=sys-kernel/dracut-0.44-r8 ) - dkms? ( sys-kernel/dkms sys-kernel/linux-sources-redcore-lts:${SLOT} ) - mdadm? ( sys-fs/mdadm ) - >=sys-kernel/linux-firmware-20180314" -RDEPEND="${DEPEND}" - -PATCHES=( - "${FILESDIR}"/"${KV_MAJOR}"-enable_alx_wol.patch - "${FILESDIR}"/"${KV_MAJOR}"-drop_ancient-and-wrong-msg.patch - "${FILESDIR}"/"${KV_MAJOR}"-ata-fix-NCQ-LOG-strings-and-move-to-debug.patch - "${FILESDIR}"/"${KV_MAJOR}"-radeon_dp_aux_transfer_native-no-ratelimited_debug.patch - "${FILESDIR}"/"${KV_MAJOR}"-acpi-use-kern_warning_even_when_error.patch - "${FILESDIR}"/"${KV_MAJOR}"-ath10k-be-quiet.patch - "${FILESDIR}"/"${KV_MAJOR}"-Unknow-SSD-HFM128GDHTNG-8310B-QUIRK_NO_APST.patch - "${FILESDIR}"/"${KV_MAJOR}"-nvme-suspend-resume-workaround.patch - "${FILESDIR}"/"${KV_MAJOR}"-nvme-pci-more-info.patch - "${FILESDIR}"/"${KV_MAJOR}"-acer-wmi-silence-unknow-functions-messages.patch - "${FILESDIR}"/"${KV_MAJOR}"-amdgpu-dc_link-drop-some-asserts.patch - "${FILESDIR}"/"${KV_MAJOR}"-nvme-hwmon.patch - "${FILESDIR}"/"${KV_MAJOR}"-linux-hardened.patch - "${FILESDIR}"/"${KV_MAJOR}"-uksm-linux-hardened.patch -) - -S="${WORKDIR}"/linux-"${PV}" - -pkg_setup() { - export KBUILD_BUILD_USER="nexus" - export KBUILD_BUILD_HOST="nexus.redcorelinux.org" - - export REAL_ARCH="$ARCH" - unset ARCH ; unset LDFLAGS #will interfere with Makefile if set -} - -src_prepare() { - default - emake mrproper - sed -ri "s|^(EXTRAVERSION =).*|\1 -${EXTRAVERSION}|" Makefile - cp "${FILESDIR}"/"${KV_MAJOR}"-amd64.config .config - rm -rf $(find . -type f|grep -F \.orig) -} - -src_compile() { - emake prepare modules_prepare bzImage modules -} - -src_install() { - dodir boot - insinto boot - newins .config config-"${KV_FULL}" - newins System.map System.map-"${KV_FULL}" - newins arch/x86/boot/bzImage vmlinuz-"${KV_FULL}" - - dodir usr/src/linux-"${KV_FULL}" - insinto usr/src/linux-"${KV_FULL}" - doins Module.symvers - doins System.map - exeinto usr/src/linux-"${KV_FULL}" - doexe vmlinux - - emake INSTALL_MOD_PATH="${D}" modules_install - - rm -f "${D}"lib/modules/"${KV_FULL}"/build - rm -f "${D}"lib/modules/"${KV_FULL}"/source - export local KSYMS - for KSYMS in build source ; do - dosym ../../../usr/src/linux-"${KV_FULL}" lib/modules/"${KV_FULL}"/"${KSYMS}" - done -} - -_grub2_update_grubcfg() { - if [[ -x $(which grub2-mkconfig) ]]; then - elog "Updating GRUB-2 bootloader configuration, please wait" - grub2-mkconfig -o "${ROOT}"boot/grub/grub.cfg - else - elog "It looks like you're not using GRUB-2, you must update bootloader configuration by hand" - fi -} - -_dracut_initrd_create() { - if [[ -x $(which dracut) ]]; then - elog "Generating initrd for "${KV_FULL}", please wait" - addpredict /etc/ld.so.cache~ - dracut -N -f --kver="${KV_FULL}" "${ROOT}"boot/initrd-"${KV_FULL}" - else - elog "It looks like you're not using dracut, you must generate an initrd by hand" - fi -} - -_dracut_initrd_delete() { - rm -rf "${ROOT}"boot/initrd-"${KV_FULL}" -} - -_dkms_modules_delete() { - if [[ -x $(which dkms) ]] ; then - export local DKMSMOD - for DKMSMOD in $(dkms status | cut -d " " -f1,2 | sed -e 's/,//g' | sed -e 's/ /\//g' | sed -e 's/://g' | uniq) ; do - dkms remove "${DKMSMOD}" -k "${KV_FULL}" - done - fi -} - -_kernel_modules_delete() { - rm -rf "${ROOT}"lib/modules/"${KV_FULL}" -} - -pkg_postinst() { - if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then - if use dracut; then - _dracut_initrd_create - fi - _grub2_update_grubcfg - fi -} - -pkg_postrm() { - if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then - if use dracut; then - _dracut_initrd_delete - fi - _grub2_update_grubcfg - fi - if use dkms; then - _dkms_modules_delete - fi - _kernel_modules_delete -} |