[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 844998387fd9d7d10658d0ea4fb2d4afb787 Author: Mike Pagano gentoo org> AuthorDate: Mon Apr 29 11:30:41 2024 + Commit: Mike Pagano gentoo org> CommitDate: Mon Apr 29 11:30:41 2024 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=84499838 Linux patch 6.1.89, this time for real Signed-off-by: Mike Pagano gentoo.org> 1088_linux-6.1.89.patch | 168 1 file changed, 168 insertions(+) diff --git a/1088_linux-6.1.89.patch b/1088_linux-6.1.89.patch new file mode 100644 index ..4b4067bb --- /dev/null +++ b/1088_linux-6.1.89.patch @@ -0,0 +1,168 @@ +diff --git a/Makefile b/Makefile +index c73cb678fb9ac..a0472e1cf7156 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 88 ++SUBLEVEL = 89 + EXTRAVERSION = + NAME = Curry Ramen + +diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c +index 44da1e14a3740..9deba798cc919 100644 +--- a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c +@@ -257,19 +257,9 @@ static struct platform_device pandora_backlight = { + .id = -1, + }; + +-static struct gpiod_lookup_table pandora_soc_audio_gpios = { +- .dev_id = "soc-audio", +- .table = { +- GPIO_LOOKUP("gpio-112-127", 6, "dac", GPIO_ACTIVE_HIGH), +- GPIO_LOOKUP("gpio-0-15", 14, "amp", GPIO_ACTIVE_HIGH), +- { } +- }, +-}; +- + static void __init omap3_pandora_legacy_init(void) + { + platform_device_register(_backlight); +- gpiod_add_lookup_table(_soc_audio_gpios); + } + #endif /* CONFIG_ARCH_OMAP3 */ + +diff --git a/sound/soc/ti/omap3pandora.c b/sound/soc/ti/omap3pandora.c +index fa92ed97dfe3b..a287e9747c2a1 100644 +--- a/sound/soc/ti/omap3pandora.c b/sound/soc/ti/omap3pandora.c +@@ -7,7 +7,7 @@ + + #include + #include +-#include ++#include + #include + #include + #include +@@ -21,11 +21,12 @@ + + #include "omap-mcbsp.h" + ++#define OMAP3_PANDORA_DAC_POWER_GPIO 118 ++#define OMAP3_PANDORA_AMP_POWER_GPIO 14 ++ + #define PREFIX "ASoC omap3pandora: " + + static struct regulator *omap3pandora_dac_reg; +-static struct gpio_desc *dac_power_gpio; +-static struct gpio_desc *amp_power_gpio; + + static int omap3pandora_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *params) +@@ -77,9 +78,9 @@ static int omap3pandora_dac_event(struct snd_soc_dapm_widget *w, + return ret; + } + mdelay(1); +- gpiod_set_value(dac_power_gpio, 1); ++ gpio_set_value(OMAP3_PANDORA_DAC_POWER_GPIO, 1); + } else { +- gpiod_set_value(dac_power_gpio, 0); ++ gpio_set_value(OMAP3_PANDORA_DAC_POWER_GPIO, 0); + mdelay(1); + regulator_disable(omap3pandora_dac_reg); + } +@@ -91,9 +92,9 @@ static int omap3pandora_hp_event(struct snd_soc_dapm_widget *w, + struct snd_kcontrol *k, int event) + { + if (SND_SOC_DAPM_EVENT_ON(event)) +- gpiod_set_value(amp_power_gpio, 1); ++ gpio_set_value(OMAP3_PANDORA_AMP_POWER_GPIO, 1); + else +- gpiod_set_value(amp_power_gpio, 0); ++ gpio_set_value(OMAP3_PANDORA_AMP_POWER_GPIO, 0); + + return 0; + } +@@ -228,10 +229,35 @@ static int __init omap3pandora_soc_init(void) + + pr_info("OMAP3 Pandora SoC init\n"); + ++ ret = gpio_request(OMAP3_PANDORA_DAC_POWER_GPIO, "dac_power"); ++ if (ret) { ++ pr_err(PREFIX "Failed to get DAC power GPIO\n"); ++ return ret; ++ } ++ ++ ret = gpio_direction_output(OMAP3_PANDORA_DAC_POWER_GPIO, 0); ++ if (ret) { ++ pr_err(PREFIX "Failed to set DAC power GPIO direction\n"); ++ goto fail0; ++ } ++ ++ ret = gpio_request(OMAP3_PANDORA_AMP_POWER_GPIO, "amp_power"); ++ if (ret) { ++ pr_err(PREFIX "Failed to get amp power GPIO\n"); ++ goto fail0; ++ } ++ ++ ret = gpio_direction_output(OMAP3_PANDORA_AMP_POWER_GPIO, 0); ++ if (ret) { ++ pr_err(PREFIX "Failed to set amp power GPIO direction\n"); ++ goto fail1; ++ } ++ + omap3pandora_snd_device = platform_device_alloc("soc-audio", -1); + if (omap3pandora_snd_device == NULL) { + pr_err(PREFIX "Platform device allocation failed\n"); +- return -ENOMEM; ++ ret = -ENOMEM; ++ goto fail1; + } + + platform_set_drvdata(omap3pandora_snd_device, _soc_card_omap3pandora); +@@ -242,20 +268,6 @@ static int __init omap3pandora_soc_init(void) + goto fail2; + } + +- dac_power_gpio = devm_gpiod_get(_snd_device->dev, +- "dac", GPIOD_OUT_LOW); +- if (IS_ERR(dac_power_gpio)) { +-
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 953980257fd3f8126add5807fc245277a419b080 Author: Mike Pagano gentoo org> AuthorDate: Mon Apr 29 11:27:00 2024 + Commit: Mike Pagano gentoo org> CommitDate: Mon Apr 29 11:27:00 2024 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=95398025 Linux patch 6.1.89 Signed-off-by: Mike Pagano gentoo.org> _README | 4 1 file changed, 4 insertions(+) diff --git a/_README b/_README index 54940ade..d6fe6f2d 100644 --- a/_README +++ b/_README @@ -395,6 +395,10 @@ Patch: 1087_linux-6.1.88.patch From: https://www.kernel.org Desc: Linux 6.1.88 +Patch: 1088_linux-6.1.89.patch +From: https://www.kernel.org +Desc: Linux 6.1.89 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs.
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 47c1a6be7342f74fc0212885099153b2b2f014b8 Author: Mike Pagano gentoo org> AuthorDate: Sat Apr 27 22:44:45 2024 + Commit: Mike Pagano gentoo org> CommitDate: Sat Apr 27 22:44:45 2024 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=47c1a6be Add UBSAN_BOUNDS and UBSAN_SHIFT and dependencies Signed-off-by: Mike Pagano gentoo.org> 4567_distro-Gentoo-Kconfig.patch | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/4567_distro-Gentoo-Kconfig.patch b/4567_distro-Gentoo-Kconfig.patch index 195c7d47..4dcd85ca 100644 --- a/4567_distro-Gentoo-Kconfig.patch +++ b/4567_distro-Gentoo-Kconfig.patch @@ -6,9 +6,9 @@ source "Documentation/Kconfig" + +source "distro/Kconfig" /dev/null 2022-08-25 07:13:06.694086407 -0400 -+++ b/distro/Kconfig 2022-08-25 13:21:55.150660724 -0400 -@@ -0,0 +1,291 @@ +--- /dev/null 2024-04-27 13:10:54.18827 -0400 b/distro/Kconfig 2024-04-27 18:16:00.549054795 -0400 +@@ -0,0 +1,295 @@ +menu "Gentoo Linux" + +config GENTOO_LINUX @@ -213,6 +213,10 @@ + select SLAB_FREELIST_HARDENED + select SHUFFLE_PAGE_ALLOCATOR + select SLUB_DEBUG ++ select UBSAN ++ select CC_HAS_UBSAN_BOUNDS_STRICT if !CC_HAS_UBSAN_ARRAY_BOUNDS ++ select UBSAN_BOUNDS ++ select UBSAN_SHIFT + select PAGE_POISONING + select PAGE_POISONING_NO_SANITY + select PAGE_POISONING_ZERO @@ -300,7 +304,6 @@ + See the settings that become available for more details and fine-tuning. + +endmenu -diff --git a/security/selinux/Kconfig b/security/selinux/Kconfig index 9e921fc72..f29bc13fa 100644 --- a/security/selinux/Kconfig +++ b/security/selinux/Kconfig @@ -339,4 +342,3 @@ index 24c045b24..e13fc740c 100644 This is the portion of low virtual memory which should be protected -- 2.31.1 -```
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 93c626a5c38a14ed6cf7becf888c1dc582cdca9c Author: Alice Ferrazzi gentoo org> AuthorDate: Thu Apr 18 03:05:18 2024 + Commit: Alice Ferrazzi gentoo org> CommitDate: Thu Apr 18 03:05:18 2024 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=93c626a5 Linux patch 6.1.87 Signed-off-by: Alice Ferrazzi gentoo.org> _README |4 + 1086_linux-6.1.87.patch | 2733 +++ 2 files changed, 2737 insertions(+) diff --git a/_README b/_README index d1148845..b5d4486e 100644 --- a/_README +++ b/_README @@ -387,6 +387,10 @@ Patch: 1085_linux-6.1.86.patch From: https://www.kernel.org Desc: Linux 6.1.86 +Patch: 1086_linux-6.1.87.patch +From: https://www.kernel.org +Desc: Linux 6.1.87 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1086_linux-6.1.87.patch b/1086_linux-6.1.87.patch new file mode 100644 index ..ec06f7c5 --- /dev/null +++ b/1086_linux-6.1.87.patch @@ -0,0 +1,2733 @@ +diff --git a/Documentation/admin-guide/hw-vuln/spectre.rst b/Documentation/admin-guide/hw-vuln/spectre.rst +index 9edb2860a3e19..e0a1be97fa759 100644 +--- a/Documentation/admin-guide/hw-vuln/spectre.rst b/Documentation/admin-guide/hw-vuln/spectre.rst +@@ -439,12 +439,12 @@ The possible values in this file are: +- System is protected by retpoline + * - BHI: BHI_DIS_S +- System is protected by BHI_DIS_S +- * - BHI: SW loop; KVM SW loop ++ * - BHI: SW loop, KVM SW loop +- System is protected by software clearing sequence +- * - BHI: Syscall hardening +- - Syscalls are hardened against BHI +- * - BHI: Syscall hardening; KVM: SW loop +- - System is protected from userspace attacks by syscall hardening; KVM is protected by software clearing sequence ++ * - BHI: Vulnerable ++ - System is vulnerable to BHI ++ * - BHI: Vulnerable, KVM: SW loop ++ - System is vulnerable; KVM is protected by software clearing sequence + + Full mitigation might require a microcode update from the CPU + vendor. When the necessary microcode is not available, the kernel will +@@ -661,18 +661,14 @@ kernel command line. + spectre_bhi= + + [X86] Control mitigation of Branch History Injection +- (BHI) vulnerability. Syscalls are hardened against BHI +- regardless of this setting. This setting affects the deployment ++ (BHI) vulnerability. This setting affects the deployment + of the HW BHI control and the SW BHB clearing sequence. + + on +- unconditionally enable. ++ (default) Enable the HW or SW mitigation as ++ needed. + off +- unconditionally disable. +- auto +- enable if hardware mitigation +- control(BHI_DIS_S) is available, otherwise +- enable alternate mitigation in KVM. ++ Disable the mitigation. + + For spectre_v2_user see Documentation/admin-guide/kernel-parameters.txt + +diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt +index b2c7b2f012e90..aebbe2981241a 100644 +--- a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt +@@ -3283,6 +3283,7 @@ + reg_file_data_sampling=off [X86] + retbleed=off [X86] + spec_store_bypass_disable=off [X86,PPC] ++ spectre_bhi=off [X86] + spectre_v2_user=off [X86] + srbds=off [X86,INTEL] + ssbd=force-off [ARM64] +@@ -5734,16 +5735,13 @@ + See Documentation/admin-guide/laptops/sonypi.rst + + spectre_bhi=[X86] Control mitigation of Branch History Injection +- (BHI) vulnerability. Syscalls are hardened against BHI +- reglardless of this setting. This setting affects the ++ (BHI) vulnerability. This setting affects the + deployment of the HW BHI control and the SW BHB + clearing sequence. + +- on - unconditionally enable. +- off - unconditionally disable. +- auto - (default) enable hardware mitigation +- (BHI_DIS_S) if available, otherwise enable +- alternate mitigation in KVM. ++ on - (default) Enable the HW or SW mitigation ++ as needed. ++
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 98e85977046ab355bf2f834605abd83404ffc4ad Author: Mike Pagano gentoo org> AuthorDate: Sat Apr 13 13:07:07 2024 + Commit: Mike Pagano gentoo org> CommitDate: Sat Apr 13 13:07:07 2024 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=98e85977 Linux patch 6.1.86 Signed-off-by: Mike Pagano gentoo.org> _README |4 + 1085_linux-6.1.86.patch | 2257 +++ 2 files changed, 2261 insertions(+) diff --git a/_README b/_README index beb8ee68..d1148845 100644 --- a/_README +++ b/_README @@ -383,6 +383,10 @@ Patch: 1084_linux-6.1.85.patch From: https://www.kernel.org Desc: Linux 6.1.85 +Patch: 1085_linux-6.1.86.patch +From: https://www.kernel.org +Desc: Linux 6.1.86 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1085_linux-6.1.86.patch b/1085_linux-6.1.86.patch new file mode 100644 index ..64dcadfd --- /dev/null +++ b/1085_linux-6.1.86.patch @@ -0,0 +1,2257 @@ +diff --git a/Makefile b/Makefile +index 5dff9ff81..baddd8ed81868 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 85 ++SUBLEVEL = 86 + EXTRAVERSION = + NAME = Curry Ramen + +diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi +index 905a50aa5dc38..d42846efff2fe 100644 +--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi +@@ -741,11 +741,20 @@ hdmi: hdmi@ff3c { + status = "disabled"; + + ports { +- hdmi_in: port { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ hdmi_in: port@0 { ++ reg = <0>; ++ + hdmi_in_vop: endpoint { + remote-endpoint = <_out_hdmi>; + }; + }; ++ ++ hdmi_out: port@1 { ++ reg = <1>; ++ }; + }; + }; + +diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi +index a7e6eccb14cc6..8363cc13ec517 100644 +--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi +@@ -1906,6 +1906,7 @@ simple-audio-card,codec { + hdmi: hdmi@ff94 { + compatible = "rockchip,rk3399-dw-hdmi"; + reg = <0x0 0xff94 0x0 0x2>; ++ reg-io-width = <4>; + interrupts = ; + clocks = < PCLK_HDMI_CTRL>, +< SCLK_HDMI_SFR>, +@@ -1914,13 +1915,16 @@ hdmi: hdmi@ff94 { +< PLL_VPLL>; + clock-names = "iahb", "isfr", "cec", "grf", "ref"; + power-domains = < RK3399_PD_HDCP>; +- reg-io-width = <4>; + rockchip,grf = <>; + #sound-dai-cells = <0>; + status = "disabled"; + + ports { +- hdmi_in: port { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ hdmi_in: port@0 { ++ reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + +@@ -1933,6 +1937,10 @@ hdmi_in_vopl: endpoint@1 { + remote-endpoint = <_out_hdmi>; + }; + }; ++ ++ hdmi_out: port@1 { ++ reg = <1>; ++ }; + }; + }; + +diff --git a/arch/x86/events/amd/lbr.c b/arch/x86/events/amd/lbr.c +index b8fe74e8e0a60..48f4095f500d4 100644 +--- a/arch/x86/events/amd/lbr.c b/arch/x86/events/amd/lbr.c +@@ -173,9 +173,11 @@ void amd_pmu_lbr_read(void) + + /* +* Check if a branch has been logged; if valid = 0, spec = 0 +- * then no branch was recorded ++ * then no branch was recorded; if reserved = 1 then an ++ * erroneous branch was recorded (see Erratum 1452) +*/ +- if (!entry.to.split.valid && !entry.to.split.spec) ++ if ((!entry.to.split.valid && !entry.to.split.spec) || ++ entry.to.split.reserved) + continue; + + perf_clear_branch_entry_bitfields(br + out); +diff --git a/block/blk-stat.c b/block/blk-stat.c +index da9407b7d4abf..41be89ecaf20e 100644 +--- a/block/blk-stat.c b/block/blk-stat.c +@@ -28,7 +28,7 @@ void blk_rq_stat_init(struct blk_rq_stat *stat) + /* src is a per-cpu stat, mean isn't initialized */ +
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 5de092155dd2e46a47672e5a9edb72eb15f4cbc1 Author: Mike Pagano gentoo org> AuthorDate: Fri Mar 15 22:00:42 2024 + Commit: Mike Pagano gentoo org> CommitDate: Fri Mar 15 22:00:42 2024 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=5de09215 Linux patch 6.1.82 Signed-off-by: Mike Pagano gentoo.org> _README |4 + 1081_linux-6.1.82.patch | 2221 +++ 2 files changed, 2225 insertions(+) diff --git a/_README b/_README index d0f067de..db3a7674 100644 --- a/_README +++ b/_README @@ -367,6 +367,10 @@ Patch: 1080_linux-6.1.81.patch From: https://www.kernel.org Desc: Linux 6.1.81 +Patch: 1081_linux-6.1.82.patch +From: https://www.kernel.org +Desc: Linux 6.1.82 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1081_linux-6.1.82.patch b/1081_linux-6.1.82.patch new file mode 100644 index ..23680cee --- /dev/null +++ b/1081_linux-6.1.82.patch @@ -0,0 +1,2221 @@ +diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu +index 13c01b641dc70..78c26280c473b 100644 +--- a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu +@@ -519,6 +519,7 @@ What: /sys/devices/system/cpu/vulnerabilities + /sys/devices/system/cpu/vulnerabilities/mds + /sys/devices/system/cpu/vulnerabilities/meltdown + /sys/devices/system/cpu/vulnerabilities/mmio_stale_data ++ /sys/devices/system/cpu/vulnerabilities/reg_file_data_sampling + /sys/devices/system/cpu/vulnerabilities/retbleed + /sys/devices/system/cpu/vulnerabilities/spec_store_bypass + /sys/devices/system/cpu/vulnerabilities/spectre_v1 +diff --git a/Documentation/admin-guide/hw-vuln/index.rst b/Documentation/admin-guide/hw-vuln/index.rst +index 6828102baaa7a..3e4a14e38b49e 100644 +--- a/Documentation/admin-guide/hw-vuln/index.rst b/Documentation/admin-guide/hw-vuln/index.rst +@@ -21,3 +21,4 @@ are configurable at compile, boot or run time. +cross-thread-rsb.rst +gather_data_sampling.rst +srso ++ reg-file-data-sampling +diff --git a/Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst b/Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst +new file mode 100644 +index 0..0585d02b9a6cb +--- /dev/null b/Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst +@@ -0,0 +1,104 @@ ++== ++Register File Data Sampling (RFDS) ++== ++ ++Register File Data Sampling (RFDS) is a microarchitectural vulnerability that ++only affects Intel Atom parts(also branded as E-cores). RFDS may allow ++a malicious actor to infer data values previously used in floating point ++registers, vector registers, or integer registers. RFDS does not provide the ++ability to choose which data is inferred. CVE-2023-28746 is assigned to RFDS. ++ ++Affected Processors ++=== ++Below is the list of affected Intel processors [#f1]_: ++ ++ === ++ Common name Family_Model ++ === ++ ATOM_GOLDMONT 06_5CH ++ ATOM_GOLDMONT_D 06_5FH ++ ATOM_GOLDMONT_PLUS 06_7AH ++ ATOM_TREMONT_D 06_86H ++ ATOM_TREMONT06_96H ++ ALDERLAKE 06_97H ++ ALDERLAKE_L 06_9AH ++ ATOM_TREMONT_L 06_9CH ++ RAPTORLAKE 06_B7H ++ RAPTORLAKE_P06_BAH ++ ATOM_GRACEMONT 06_BEH ++ RAPTORLAKE_S06_BFH ++ === ++ ++As an exception to this table, Intel Xeon E family parts ALDERLAKE(06_97H) and ++RAPTORLAKE(06_B7H) codenamed Catlow are not affected. They are reported as ++vulnerable in Linux because they share the same family/model with an affected ++part. Unlike their affected counterparts, they do not enumerate RFDS_CLEAR or ++CPUID.HYBRID. This information could be used to distinguish between the ++affected and unaffected parts, but it is deemed not worth adding complexity as ++the reporting is fixed automatically when these parts enumerate RFDS_NO. ++ ++Mitigation ++== ++Intel released a microcode update that enables software to clear sensitive ++information using the VERW instruction. Like MDS, RFDS deploys the same ++mitigation strategy to force the CPU to clear the affected buffers before an ++attacker can extract the secrets. This is achieved by using the otherwise ++unused and obsolete VERW instruction in combination with a microcode update. ++The microcode clears the affected CPU buffers when the VERW instruction is ++executed. ++ ++Mitigation points ++- ++VERW is executed by
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: ff81d2160a223fce45984c504cd886e7fdde438a Author: Mike Pagano gentoo org> AuthorDate: Fri Feb 23 13:19:36 2024 + Commit: Mike Pagano gentoo org> CommitDate: Fri Feb 23 13:19:36 2024 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=ff81d216 Update cpu opt patch Signed-off-by: Mike Pagano gentoo.org> 5010_enable-cpu-optimizations-universal.patch | 71 ++- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/5010_enable-cpu-optimizations-universal.patch b/5010_enable-cpu-optimizations-universal.patch index 7a1b717a..596cade6 100644 --- a/5010_enable-cpu-optimizations-universal.patch +++ b/5010_enable-cpu-optimizations-universal.patch @@ -1,6 +1,6 @@ -From 70d4906b87983ed2ed5da78930a701625d881dd0 Mon Sep 17 00:00:00 2001 +From 71dd30c3e2ab2852b0290ae1f34ce1c7f8655040 Mon Sep 17 00:00:00 2001 From: graysky -Date: Thu, 5 Jan 2023 14:29:37 -0500 +Date: Wed, 21 Feb 2024 08:38:13 -0500 FEATURES This patch adds additional CPU options to the Linux kernel accessible under: @@ -13,9 +13,10 @@ offered which are good for supported Intel or AMD CPUs: • x86-64-v3 • x86-64-v4 -Users of glibc 2.33 and above can see which level is supported by current -hardware by running: +Users of glibc 2.33 and above can see which level is supported by running: /lib/ld-linux-x86-64.so.2 --help | grep supported +Or + /lib64/ld-linux-x86-64.so.2 --help | grep supported Alternatively, compare the flags from /proc/cpuinfo to this list.[1] @@ -106,12 +107,12 @@ REFERENCES 3 files changed, 528 insertions(+), 17 deletions(-) diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu -index 542377cd419d..f589971df2d3 100644 +index 87396575c..5ac6e8463 100644 --- a/arch/x86/Kconfig.cpu +++ b/arch/x86/Kconfig.cpu @@ -157,7 +157,7 @@ config MPENTIUM4 - - + + config MK6 - bool "K6/K6-II/K6-III" + bool "AMD K6/K6-II/K6-III" @@ -120,7 +121,7 @@ index 542377cd419d..f589971df2d3 100644 Select this for an AMD K6-family processor. Enables use of @@ -165,7 +165,7 @@ config MK6 flags to GCC. - + config MK7 - bool "Athlon/Duron/K7" + bool "AMD Athlon/Duron/K7" @@ -129,7 +130,7 @@ index 542377cd419d..f589971df2d3 100644 Select this for an AMD Athlon K7-family processor. Enables use of @@ -173,12 +173,106 @@ config MK7 flags to GCC. - + config MK8 - bool "Opteron/Athlon64/Hammer/K8" + bool "AMD Opteron/Athlon64/Hammer/K8" @@ -137,7 +138,7 @@ index 542377cd419d..f589971df2d3 100644 Select this for an AMD Opteron or Athlon64 Hammer-family processor. Enables use of some extended instructions, and passes appropriate optimization flags to GCC. - + +config MK8SSE3 + bool "AMD Opteron/Athlon64/Hammer/K8 with SSE3" + help @@ -237,17 +238,17 @@ index 542377cd419d..f589971df2d3 100644 depends on X86_32 @@ -270,7 +364,7 @@ config MPSC in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one. - + config MCORE2 - bool "Core 2/newer Xeon" + bool "Intel Core 2" help - + Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and @@ -278,6 +372,8 @@ config MCORE2 family in /proc/cpuinfo. Newer ones have 6 and older ones 15 (not a typo) - + +Enables -march=core2 + config MATOM @@ -256,7 +257,7 @@ index 542377cd419d..f589971df2d3 100644 @@ -287,6 +383,212 @@ config MATOM accordingly optimized code. Use a recent GCC with specific Atom support in order to fully benefit from selecting this option. - + +config MNEHALEM + bool "Intel Nehalem" + select X86_P6_NOP @@ -469,7 +470,7 @@ index 542377cd419d..f589971df2d3 100644 @@ -294,6 +596,50 @@ config GENERIC_CPU Generic x86-64 CPU. Run equally well on all x86-64 CPUs. - + +config GENERIC_CPU2 + bool "Generic-x86-64-v2" + depends on (CC_IS_GCC && GCC_VERSION > 11) || (CC_IS_CLANG && CLANG_VERSION >= 12) @@ -515,7 +516,7 @@ index 542377cd419d..f589971df2d3 100644 +Enables -march=native + endchoice - + config X86_GENERIC @@ -318,9 +664,17 @@ config X86_INTERNODE_CACHE_SHIFT config X86_L1_CACHE_SHIFT @@ -534,17 +535,17 @@ index 542377cd419d..f589971df2d3 100644 - default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX + default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII \ + || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX - + config X86_F00F_BUG def_bool y @@ -332,15 +686,27 @@ config X86_INVD_BUG - + config X86_ALIGNMENT_16 def_bool y - depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MELAN || MK6 || M586MMX || M586TSC || M586 || M486SX || M486
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 09ae4eccbe9b346bb7300a09df69bfb5495388e5 Author: Mike Pagano gentoo org> AuthorDate: Fri Feb 16 19:00:20 2024 + Commit: Mike Pagano gentoo org> CommitDate: Fri Feb 16 19:00:20 2024 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=09ae4ecc Linux patch 6.1.78 Signed-off-by: Mike Pagano gentoo.org> _README |4 + 1077_linux-6.1.78.patch | 2252 +++ 2 files changed, 2256 insertions(+) diff --git a/_README b/_README index 264766b5..7d732a84 100644 --- a/_README +++ b/_README @@ -351,6 +351,10 @@ Patch: 1076_linux-6.1.77.patch From: https://www.kernel.org Desc: Linux 6.1.77 +Patch: 1077_linux-6.1.78.patch +From: https://www.kernel.org +Desc: Linux 6.1.78 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1077_linux-6.1.78.patch b/1077_linux-6.1.78.patch new file mode 100644 index ..d0f0c097 --- /dev/null +++ b/1077_linux-6.1.78.patch @@ -0,0 +1,2252 @@ +diff --git a/Makefile b/Makefile +index f5598d90093f5..e93554269e474 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 77 ++SUBLEVEL = 78 + EXTRAVERSION = + NAME = Curry Ramen + +diff --git a/block/blk-core.c b/block/blk-core.c +index 6eaf2b0ad7cca..aefdf07bdc2cf 100644 +--- a/block/blk-core.c b/block/blk-core.c +@@ -864,7 +864,16 @@ int bio_poll(struct bio *bio, struct io_comp_batch *iob, unsigned int flags) +*/ + blk_flush_plug(current->plug, false); + +- if (bio_queue_enter(bio)) ++ /* ++ * We need to be able to enter a frozen queue, similar to how ++ * timeouts also need to do that. If that is blocked, then we can ++ * have pending IO when a queue freeze is started, and then the ++ * wait for the freeze to finish will wait for polled requests to ++ * timeout as the poller is preventer from entering the queue and ++ * completing them. As long as we prevent new IO from being queued, ++ * that should be all that matters. ++ */ ++ if (!percpu_ref_tryget(>q_usage_counter)) + return 0; + if (queue_is_mq(q)) { + ret = blk_mq_poll(q, cookie, iob, flags); +diff --git a/block/blk-iocost.c b/block/blk-iocost.c +index 7dd6a33e1d6a8..e6557024e3da8 100644 +--- a/block/blk-iocost.c b/block/blk-iocost.c +@@ -1337,6 +1337,13 @@ static bool iocg_kick_delay(struct ioc_gq *iocg, struct ioc_now *now) + + lockdep_assert_held(>waitq.lock); + ++ /* ++ * If the delay is set by another CPU, we may be in the past. No need to ++ * change anything if so. This avoids decay calculation underflow. ++ */ ++ if (time_before64(now->now, iocg->delay_at)) ++ return false; ++ + /* calculate the current delay in effect - 1/2 every second */ + tdelta = now->now - iocg->delay_at; + if (iocg->delay) +diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c +index 49cb4537344aa..2daf50d4cd47a 100644 +--- a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c +@@ -2930,6 +2930,8 @@ open_card_ubr0(struct idt77252_dev *card) + vc->scq = alloc_scq(card, vc->class); + if (!vc->scq) { + printk("%s: can't get SCQ.\n", card->name); ++ kfree(card->vcs[0]); ++ card->vcs[0] = NULL; + return -ENOMEM; + } + +diff --git a/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c b/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c +index 8dd40d00a672a..6b829d347417a 100644 +--- a/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c b/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c +@@ -38,15 +38,17 @@ static int dpaa2_qdma_alloc_chan_resources(struct dma_chan *chan) + if (!dpaa2_chan->fd_pool) + goto err; + +- dpaa2_chan->fl_pool = dma_pool_create("fl_pool", dev, +-sizeof(struct dpaa2_fl_entry), +-sizeof(struct dpaa2_fl_entry), 0); ++ dpaa2_chan->fl_pool = ++ dma_pool_create("fl_pool", dev, ++ sizeof(struct dpaa2_fl_entry) * 3, ++ sizeof(struct dpaa2_fl_entry), 0); ++ + if (!dpaa2_chan->fl_pool) + goto err_fd; + + dpaa2_chan->sdd_pool = + dma_pool_create("sdd_pool", dev, +- sizeof(struct dpaa2_qdma_sd_d), ++ sizeof(struct dpaa2_qdma_sd_d) * 2, + sizeof(struct dpaa2_qdma_sd_d), 0); + if (!dpaa2_chan->sdd_pool) + goto err_fl; +diff --git a/drivers/dma/fsl-qdma.c b/drivers/dma/fsl-qdma.c +index 045ead46ec8fc..69385f32e2756 100644 +--- a/drivers/dma/fsl-qdma.c b/drivers/dma/fsl-qdma.c +@@ -514,11
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: e03cb0c42952561dd7ad061b371076b7defafa36 Author: Mike Pagano gentoo org> AuthorDate: Sat Jan 20 11:45:31 2024 + Commit: Mike Pagano gentoo org> CommitDate: Sat Jan 20 11:45:31 2024 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=e03cb0c4 Linux patch 6.1 Signed-off-by: Mike Pagano gentoo.org> _README |4 + 1073_linux-6.1.74.patch | 3175 +++ 2 files changed, 3179 insertions(+) diff --git a/_README b/_README index 9cb280cd..32442528 100644 --- a/_README +++ b/_README @@ -335,6 +335,10 @@ Patch: 1072_linux-6.1.73.patch From: https://www.kernel.org Desc: Linux 6.1.73 +Patch: 1073_linux-6.1.74.patch +From: https://www.kernel.org +Desc: Linux 6.1.74 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1073_linux-6.1.74.patch b/1073_linux-6.1.74.patch new file mode 100644 index ..4e3e51d3 --- /dev/null +++ b/1073_linux-6.1.74.patch @@ -0,0 +1,3175 @@ +diff --git a/Makefile b/Makefile +index e4f2d019ca745..63125d1ffd9cf 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 73 ++SUBLEVEL = 74 + EXTRAVERSION = + NAME = Curry Ramen + +diff --git a/arch/arc/kernel/signal.c b/arch/arc/kernel/signal.c +index 3c1590c27fae3..723abcb10c801 100644 +--- a/arch/arc/kernel/signal.c b/arch/arc/kernel/signal.c +@@ -61,7 +61,7 @@ struct rt_sigframe { + unsigned int sigret_magic; + }; + +-static int save_arcv2_regs(struct sigcontext *mctx, struct pt_regs *regs) ++static int save_arcv2_regs(struct sigcontext __user *mctx, struct pt_regs *regs) + { + int err = 0; + #ifndef CONFIG_ISA_ARCOMPACT +@@ -74,12 +74,12 @@ static int save_arcv2_regs(struct sigcontext *mctx, struct pt_regs *regs) + #else + v2abi.r58 = v2abi.r59 = 0; + #endif +- err = __copy_to_user(>v2abi, , sizeof(v2abi)); ++ err = __copy_to_user(>v2abi, (void const *), sizeof(v2abi)); + #endif + return err; + } + +-static int restore_arcv2_regs(struct sigcontext *mctx, struct pt_regs *regs) ++static int restore_arcv2_regs(struct sigcontext __user *mctx, struct pt_regs *regs) + { + int err = 0; + #ifndef CONFIG_ISA_ARCOMPACT +diff --git a/arch/arm/mach-sunxi/mc_smp.c b/arch/arm/mach-sunxi/mc_smp.c +index b2f5f4f28705f..f779e386b6e7d 100644 +--- a/arch/arm/mach-sunxi/mc_smp.c b/arch/arm/mach-sunxi/mc_smp.c +@@ -804,12 +804,12 @@ static int __init sunxi_mc_smp_init(void) + for (i = 0; i < ARRAY_SIZE(sunxi_mc_smp_data); i++) { + ret = of_property_match_string(node, "enable-method", + sunxi_mc_smp_data[i].enable_method); +- if (!ret) ++ if (ret >= 0) + break; + } + + of_node_put(node); +- if (ret) ++ if (ret < 0) + return -ENODEV; + + is_a83t = sunxi_mc_smp_data[i].is_a83t; +diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi +index ee6095baba4d3..7d9b8064ad2ec 100644 +--- a/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi +@@ -510,8 +510,7 @@ ap_i2c_tp: { + _rootport { + mvl_wifi: wifi@0,0 { + compatible = "pci1b4b,2b42"; +- reg = <0x8301 0x0 0x 0x0 0x0010 +- 0x8301 0x0 0x0010 0x0 0x0010>; ++ reg = <0x 0x0 0x0 0x0 0x0>; + interrupt-parent = <>; + interrupts = <8 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names = "default"; +diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet-dumo.dts b/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet-dumo.dts +index 853e88455e750..9e4b12ed62cbe 100644 +--- a/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet-dumo.dts b/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet-dumo.dts +@@ -34,8 +34,8 @@ + _rootport { + wifi@0,0 { + compatible = "qcom,ath10k"; +- reg = <0x0001 0x0 0x 0x0 0x>, +-<0x03010010 0x0 0x 0x0 0x0020>; ++ reg = <0x 0x0 0x 0x0 0x>, ++<0x0310 0x0 0x 0x0 0x0020>; + qcom,ath10k-calibration-variant = "GO_DUMO"; + }; + }; +diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi +index 23bfba86daabe..7ba25315dd9ab 100644 +--- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi +@@ -489,6 +489,7 @@ ap_i2c_audio: { + #address-cells = <3>; + #size-cells = <2>; + ranges; ++
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 148d2179613dff642ecf5cb7253eee922ab3cb1e Author: Mike Pagano gentoo org> AuthorDate: Mon Jan 15 18:47:24 2024 + Commit: Mike Pagano gentoo org> CommitDate: Mon Jan 15 18:47:24 2024 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=148d2179 Linux patch 6.1.73 Signed-off-by: Mike Pagano gentoo.org> _README | 4 + 1072_linux-6.1.73.patch | 294 2 files changed, 298 insertions(+) diff --git a/_README b/_README index fd657319..9cb280cd 100644 --- a/_README +++ b/_README @@ -331,6 +331,10 @@ Patch: 1071_linux-6.1.72.patch From: https://www.kernel.org Desc: Linux 6.1.72 +Patch: 1072_linux-6.1.73.patch +From: https://www.kernel.org +Desc: Linux 6.1.73 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1072_linux-6.1.73.patch b/1072_linux-6.1.73.patch new file mode 100644 index ..feadcd41 --- /dev/null +++ b/1072_linux-6.1.73.patch @@ -0,0 +1,294 @@ +diff --git a/Makefile b/Makefile +index bad3387b3251c..e4f2d019ca745 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 72 ++SUBLEVEL = 73 + EXTRAVERSION = + NAME = Curry Ramen + +diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c +index b3b4542e31ed5..573de0d49e172 100644 +--- a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c +@@ -716,10 +716,8 @@ static ssize_t __write_ports_addfd(char *buf, struct net *net, const struct cred + + err = svc_addsock(nn->nfsd_serv, net, fd, buf, SIMPLE_TRANSACTION_LIMIT, cred); + +- if (err < 0 && !nn->nfsd_serv->sv_nrthreads && !nn->keep_active) +- nfsd_last_thread(net); +- else if (err >= 0 && +- !nn->nfsd_serv->sv_nrthreads && !xchg(>keep_active, 1)) ++ if (err >= 0 && ++ !nn->nfsd_serv->sv_nrthreads && !xchg(>keep_active, 1)) + svc_get(nn->nfsd_serv); + + nfsd_put(net); +@@ -769,9 +767,6 @@ out_close: + svc_xprt_put(xprt); + } + out_err: +- if (!nn->nfsd_serv->sv_nrthreads && !nn->keep_active) +- nfsd_last_thread(net); +- + nfsd_put(net); + return err; + } +diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h +index 53166cce7062c..09726c5b9a317 100644 +--- a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h +@@ -97,12 +97,7 @@ int nfsd_pool_stats_open(struct inode *, struct file *); + int nfsd_pool_stats_release(struct inode *, struct file *); + void nfsd_shutdown_threads(struct net *net); + +-static inline void nfsd_put(struct net *net) +-{ +- struct nfsd_net *nn = net_generic(net, nfsd_net_id); +- +- svc_put(nn->nfsd_serv); +-} ++void nfsd_put(struct net *net); + + bool i_am_nfsd(void); + +@@ -139,7 +134,6 @@ int nfsd_vers(struct nfsd_net *nn, int vers, enum vers_op change); + int nfsd_minorversion(struct nfsd_net *nn, u32 minorversion, enum vers_op change); + void nfsd_reset_versions(struct nfsd_net *nn); + int nfsd_create_serv(struct net *net); +-void nfsd_last_thread(struct net *net); + + extern int nfsd_max_blksize; + +diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c +index 350c6c72f793f..c7695ebd28dc3 100644 +--- a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c +@@ -523,14 +523,9 @@ static struct notifier_block nfsd_inet6addr_notifier = { + /* Only used under nfsd_mutex, so this atomic may be overkill: */ + static atomic_t nfsd_notifier_refcount = ATOMIC_INIT(0); + +-void nfsd_last_thread(struct net *net) ++static void nfsd_last_thread(struct svc_serv *serv, struct net *net) + { + struct nfsd_net *nn = net_generic(net, nfsd_net_id); +- struct svc_serv *serv = nn->nfsd_serv; +- +- spin_lock(_notifier_lock); +- nn->nfsd_serv = NULL; +- spin_unlock(_notifier_lock); + + /* check if the notifier still has clients */ + if (atomic_dec_return(_notifier_refcount) == 0) { +@@ -540,8 +535,6 @@ void nfsd_last_thread(struct net *net) + #endif + } + +- svc_xprt_destroy_all(serv, net); +- + /* +* write_ports can create the server without actually starting +* any threads--if we get shut down before any threads are +@@ -632,8 +625,7 @@ void nfsd_shutdown_threads(struct net *net) + svc_get(serv); + /* Kill outstanding nfsd threads */ + svc_set_num_threads(serv, NULL, 0); +- nfsd_last_thread(net); +- svc_put(serv); ++ nfsd_put(net); + mutex_unlock(_mutex); + } + +@@ -663,6 +655,9 @@ int nfsd_create_serv(struct net *net) + serv->sv_maxconn = nn->max_connections; + error = svc_bind(serv, net); + if (error < 0) { ++ /* NOT nfsd_put() as notifiers (see below) haven't ++ * been set up yet. ++ */ + svc_put(serv); + return error; + }
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: df521057576f25c519318776dee39439f5d07dc0 Author: Mike Pagano gentoo org> AuthorDate: Wed Dec 20 16:55:58 2023 + Commit: Mike Pagano gentoo org> CommitDate: Wed Dec 20 16:55:58 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=df521057 Linux patch 6.1.69 Signed-off-by: Mike Pagano gentoo.org> _README |4 + 1068_linux-6.1.69.patch | 4110 +++ 2 files changed, 4114 insertions(+) diff --git a/_README b/_README index a8206ed1..3d9aed2d 100644 --- a/_README +++ b/_README @@ -315,6 +315,10 @@ Patch: 1067_linux-6.1.68.patch From: https://www.kernel.org Desc: Linux 6.1.68 +Patch: 1068_linux-6.1.69.patch +From: https://www.kernel.org +Desc: Linux 6.1.69 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1068_linux-6.1.69.patch b/1068_linux-6.1.69.patch new file mode 100644 index ..fd8d28e1 --- /dev/null +++ b/1068_linux-6.1.69.patch @@ -0,0 +1,4110 @@ +diff --git a/Makefile b/Makefile +index 2a8ad0cec2f1c..9a3b34d2387fa 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 68 ++SUBLEVEL = 69 + EXTRAVERSION = + NAME = Curry Ramen + +diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile +index 5e56d26a22398..c9496539c3351 100644 +--- a/arch/arm64/Makefile b/arch/arm64/Makefile +@@ -157,7 +157,7 @@ endif + + all: $(notdir $(KBUILD_IMAGE)) + +- ++vmlinuz.efi: Image + Image vmlinuz.efi: vmlinux + $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ + +diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h +index 5d0f1f7b76004..56c7df4c65325 100644 +--- a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h +@@ -822,6 +822,12 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) + if (pte_hw_dirty(pte)) + pte = pte_mkdirty(pte); + pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask); ++ /* ++ * If we end up clearing hw dirtiness for a sw-dirty PTE, set hardware ++ * dirtiness again. ++ */ ++ if (pte_sw_dirty(pte)) ++ pte = pte_mkdirty(pte); + return pte; + } + +diff --git a/arch/loongarch/Makefile b/arch/loongarch/Makefile +index 01b57b7263225..ed47a3a87768e 100644 +--- a/arch/loongarch/Makefile b/arch/loongarch/Makefile +@@ -116,6 +116,8 @@ vdso_install: + + all: $(notdir $(KBUILD_IMAGE)) + ++vmlinuz.efi: vmlinux.efi ++ + vmlinux.elf vmlinux.efi vmlinuz.efi: vmlinux + $(Q)$(MAKE) $(build)=$(boot) $(bootvars-y) $(boot)/$@ + +diff --git a/arch/loongarch/kernel/time.c b/arch/loongarch/kernel/time.c +index d2b7d5df132a9..150df6e17bb6a 100644 +--- a/arch/loongarch/kernel/time.c b/arch/loongarch/kernel/time.c +@@ -58,14 +58,16 @@ static int constant_set_state_oneshot(struct clock_event_device *evt) + return 0; + } + +-static int constant_set_state_oneshot_stopped(struct clock_event_device *evt) ++static int constant_set_state_periodic(struct clock_event_device *evt) + { ++ unsigned long period; + unsigned long timer_config; + + raw_spin_lock(_lock); + +- timer_config = csr_read64(LOONGARCH_CSR_TCFG); +- timer_config &= ~CSR_TCFG_EN; ++ period = const_clock_freq / HZ; ++ timer_config = period & CSR_TCFG_VAL; ++ timer_config |= (CSR_TCFG_PERIOD | CSR_TCFG_EN); + csr_write64(timer_config, LOONGARCH_CSR_TCFG); + + raw_spin_unlock(_lock); +@@ -73,16 +75,14 @@ static int constant_set_state_oneshot_stopped(struct clock_event_device *evt) + return 0; + } + +-static int constant_set_state_periodic(struct clock_event_device *evt) ++static int constant_set_state_shutdown(struct clock_event_device *evt) + { +- unsigned long period; + unsigned long timer_config; + + raw_spin_lock(_lock); + +- period = const_clock_freq / HZ; +- timer_config = period & CSR_TCFG_VAL; +- timer_config |= (CSR_TCFG_PERIOD | CSR_TCFG_EN); ++ timer_config = csr_read64(LOONGARCH_CSR_TCFG); ++ timer_config &= ~CSR_TCFG_EN; + csr_write64(timer_config, LOONGARCH_CSR_TCFG); + + raw_spin_unlock(_lock); +@@ -90,11 +90,6 @@ static int constant_set_state_periodic(struct clock_event_device *evt) + return 0; + } + +-static int constant_set_state_shutdown(struct clock_event_device *evt) +-{ +- return 0; +-} +- + static int constant_timer_next_event(unsigned long delta, struct clock_event_device *evt) + { + unsigned long timer_config; +@@ -156,7 +151,7 @@ int constant_clockevent_init(void) + cd->rating = 320; + cd->cpumask = cpumask_of(cpu); + cd->set_state_oneshot = constant_set_state_oneshot; +- cd->set_state_oneshot_stopped = constant_set_state_oneshot_stopped; ++
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 38a5712dd639ae25005f19ae1d210b2fe87ecad6 Author: Mike Pagano gentoo org> AuthorDate: Mon Dec 11 14:19:59 2023 + Commit: Mike Pagano gentoo org> CommitDate: Mon Dec 11 14:19:59 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=38a5712d Linux patch 6.1.67 Signed-off-by: Mike Pagano gentoo.org> _README | 4 ++ 1066_linux-6.1.67.patch | 122 2 files changed, 126 insertions(+) diff --git a/_README b/_README index 37486bab..5f228fc4 100644 --- a/_README +++ b/_README @@ -307,6 +307,10 @@ Patch: 1065_linux-6.1.66.patch From: https://www.kernel.org Desc: Linux 6.1.66 +Patch: 1066_linux-6.1.67.patch +From: https://www.kernel.org +Desc: Linux 6.1.67 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1066_linux-6.1.67.patch b/1066_linux-6.1.67.patch new file mode 100644 index ..38a86e85 --- /dev/null +++ b/1066_linux-6.1.67.patch @@ -0,0 +1,122 @@ +diff --git a/Makefile b/Makefile +index 5d7e995d686c8..c27600b90cad2 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 66 ++SUBLEVEL = 67 + EXTRAVERSION = + NAME = Curry Ramen + +diff --git a/net/wireless/core.h b/net/wireless/core.h +index ee980965a7cfb..e1accacc6f233 100644 +--- a/net/wireless/core.h b/net/wireless/core.h +@@ -297,7 +297,6 @@ struct cfg80211_cqm_config { + u32 rssi_hyst; + s32 last_rssi_event_value; + enum nl80211_cqm_rssi_threshold_event last_rssi_event_type; +- bool use_range_api; + int n_rssi_thresholds; + s32 rssi_thresholds[]; + }; +diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c +index 42c858219b341..b19b5acfaf3a9 100644 +--- a/net/wireless/nl80211.c b/net/wireless/nl80211.c +@@ -12574,6 +12574,10 @@ static int cfg80211_cqm_rssi_update(struct cfg80211_registered_device *rdev, + int i, n, low_index; + int err; + ++ /* RSSI reporting disabled? */ ++ if (!cqm_config) ++ return rdev_set_cqm_rssi_range_config(rdev, dev, 0, 0); ++ + /* +* Obtain current RSSI value if possible, if not and no RSSI threshold +* event has been received yet, we should receive an event after a +@@ -12648,6 +12652,18 @@ static int nl80211_set_cqm_rssi(struct genl_info *info, + wdev->iftype != NL80211_IFTYPE_P2P_CLIENT) + return -EOPNOTSUPP; + ++ if (n_thresholds <= 1 && rdev->ops->set_cqm_rssi_config) { ++ if (n_thresholds == 0 || thresholds[0] == 0) /* Disabling */ ++ return rdev_set_cqm_rssi_config(rdev, dev, 0, 0); ++ ++ return rdev_set_cqm_rssi_config(rdev, dev, ++ thresholds[0], hysteresis); ++ } ++ ++ if (!wiphy_ext_feature_isset(>wiphy, ++ NL80211_EXT_FEATURE_CQM_RSSI_LIST)) ++ return -EOPNOTSUPP; ++ + if (n_thresholds == 1 && thresholds[0] == 0) /* Disabling */ + n_thresholds = 0; + +@@ -12655,20 +12671,6 @@ static int nl80211_set_cqm_rssi(struct genl_info *info, + old = rcu_dereference_protected(wdev->cqm_config, + lockdep_is_held(>mtx)); + +- /* if already disabled just succeed */ +- if (!n_thresholds && !old) +- return 0; +- +- if (n_thresholds > 1) { +- if (!wiphy_ext_feature_isset(>wiphy, +- NL80211_EXT_FEATURE_CQM_RSSI_LIST) || +- !rdev->ops->set_cqm_rssi_range_config) +- return -EOPNOTSUPP; +- } else { +- if (!rdev->ops->set_cqm_rssi_config) +- return -EOPNOTSUPP; +- } +- + if (n_thresholds) { + cqm_config = kzalloc(struct_size(cqm_config, rssi_thresholds, +n_thresholds), +@@ -12683,26 +12685,13 @@ static int nl80211_set_cqm_rssi(struct genl_info *info, + memcpy(cqm_config->rssi_thresholds, thresholds, + flex_array_size(cqm_config, rssi_thresholds, + n_thresholds)); +- cqm_config->use_range_api = n_thresholds > 1 || +- !rdev->ops->set_cqm_rssi_config; + + rcu_assign_pointer(wdev->cqm_config, cqm_config); +- +- if (cqm_config->use_range_api) +- err = cfg80211_cqm_rssi_update(rdev, dev, cqm_config); +- else +- err = rdev_set_cqm_rssi_config(rdev, dev, +- thresholds[0], +- hysteresis); + } else { +
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 60297308479e47932e515186d086233dc4aefa39 Author: Mike Pagano gentoo org> AuthorDate: Sun Dec 3 11:16:03 2023 + Commit: Mike Pagano gentoo org> CommitDate: Sun Dec 3 11:16:03 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=60297308 Linux patch 6.1.65 Signed-off-by: Mike Pagano gentoo.org> _README |4 + 1064_linux-6.1.65.patch | 4244 +++ 2 files changed, 4248 insertions(+) diff --git a/_README b/_README index 8892941f..08e6f2e1 100644 --- a/_README +++ b/_README @@ -299,6 +299,10 @@ Patch: 1063_linux-6.1.64.patch From: https://www.kernel.org Desc: Linux 6.1.64 +Patch: 1064_linux-6.1.65.patch +From: https://www.kernel.org +Desc: Linux 6.1.65 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1064_linux-6.1.65.patch b/1064_linux-6.1.65.patch new file mode 100644 index ..70227a3a --- /dev/null +++ b/1064_linux-6.1.65.patch @@ -0,0 +1,4244 @@ +diff --git a/Makefile b/Makefile +index 97c75ae364cdf..1646e334a647f 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 64 ++SUBLEVEL = 65 + EXTRAVERSION = + NAME = Curry Ramen + +diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c +index b647306eb1608..d12fdb9c05a89 100644 +--- a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c +@@ -484,7 +484,8 @@ static int __init xen_guest_init(void) +* for secondary CPUs as they are brought up. +* For uniformity we use VCPUOP_register_vcpu_info even on cpu0. +*/ +- xen_vcpu_info = alloc_percpu(struct vcpu_info); ++ xen_vcpu_info = __alloc_percpu(sizeof(struct vcpu_info), ++ 1 << fls(sizeof(struct vcpu_info) - 1)); + if (xen_vcpu_info == NULL) + return -ENOMEM; + +diff --git a/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi +index faafefe562e4b..d74c126d5ee07 100644 +--- a/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi +@@ -27,6 +27,7 @@ + regulator-name = "eth_phy_pwr"; + regulator-min-microvolt = <330>; + regulator-max-microvolt = <330>; ++ regulator-enable-ramp-delay = <2>; + gpio = < 9 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +diff --git a/arch/arm64/include/asm/kfence.h b/arch/arm64/include/asm/kfence.h +index aa855c6a0ae6f..a81937fae9f6d 100644 +--- a/arch/arm64/include/asm/kfence.h b/arch/arm64/include/asm/kfence.h +@@ -19,4 +19,14 @@ static inline bool kfence_protect_page(unsigned long addr, bool protect) + return true; + } + ++#ifdef CONFIG_KFENCE ++extern bool kfence_early_init; ++static inline bool arm64_kfence_can_set_direct_map(void) ++{ ++ return !kfence_early_init; ++} ++#else /* CONFIG_KFENCE */ ++static inline bool arm64_kfence_can_set_direct_map(void) { return false; } ++#endif /* CONFIG_KFENCE */ ++ + #endif /* __ASM_KFENCE_H */ +diff --git a/arch/arm64/include/asm/setup.h b/arch/arm64/include/asm/setup.h +index f4af547ef54ca..2e4d7da74fb87 100644 +--- a/arch/arm64/include/asm/setup.h b/arch/arm64/include/asm/setup.h +@@ -21,9 +21,22 @@ static inline bool arch_parse_debug_rodata(char *arg) + extern bool rodata_enabled; + extern bool rodata_full; + +- if (arg && !strcmp(arg, "full")) { ++ if (!arg) ++ return false; ++ ++ if (!strcmp(arg, "full")) { ++ rodata_enabled = rodata_full = true; ++ return true; ++ } ++ ++ if (!strcmp(arg, "off")) { ++ rodata_enabled = rodata_full = false; ++ return true; ++ } ++ ++ if (!strcmp(arg, "on")) { + rodata_enabled = true; +- rodata_full = true; ++ rodata_full = false; + return true; + } + +diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c +index 9a7c389651540..4b302dbf78e96 100644 +--- a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -38,6 +39,7 @@ + #include + #include + #include ++#include + + #define NO_BLOCK_MAPPINGS BIT(0) + #define NO_CONT_MAPPINGS BIT(1) +@@ -521,12 +523,67 @@ static int __init enable_crash_mem_map(char *arg) + } + early_param("crashkernel", enable_crash_mem_map); + ++#ifdef CONFIG_KFENCE ++ ++bool __ro_after_init kfence_early_init = !!CONFIG_KFENCE_SAMPLE_INTERVAL; ++ ++/* early_param() will be parsed before map_mem() below. */ ++static int __init parse_kfence_early_init(char *arg) ++{ ++ int val; ++ ++ if (get_option(, )) ++
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: c7a3f75078a457fe0d157a98bcdbe94b5f19b329 Author: Mike Pagano gentoo org> AuthorDate: Fri Dec 1 10:35:13 2023 + Commit: Mike Pagano gentoo org> CommitDate: Fri Dec 1 10:35:13 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=c7a3f750 neighbour: Fix __randomize_layout crash in struct neighbour Bug: https://bugs.gentoo.org/918128 Signed-off-by: Mike Pagano gentoo.org> _README| 4 ++ ...ix_randomize_layout_crash_in_struct_neigh.patch | 44 ++ 2 files changed, 48 insertions(+) diff --git a/_README b/_README index 85eaeddf..8892941f 100644 --- a/_README +++ b/_README @@ -315,6 +315,10 @@ Patch: 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch From: https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-mar...@holtmann.org/raw Desc: Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. See bug #686758 +Patch: 2010_Fix_randomize_layout_crash_in_struct_neigh.patch +From: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=45b3fae4675d +Desc: neighbour: Fix __randomize_layout crash in struct neighbour + Patch: 2900_tmp513-Fix-build-issue-by-selecting-CONFIG_REG.patch From: https://bugs.gentoo.org/710790 Desc: tmp513 requies REGMAP_I2C to build. Select it by default in Kconfig. See bug #710790. Thanks to Phil Stracchino diff --git a/2010_Fix_randomize_layout_crash_in_struct_neigh.patch b/2010_Fix_randomize_layout_crash_in_struct_neigh.patch new file mode 100644 index ..8ee50b2f --- /dev/null +++ b/2010_Fix_randomize_layout_crash_in_struct_neigh.patch @@ -0,0 +1,44 @@ +From 45b3fae4675dc1d4ee2d7aefa19d85ee4f891377 Mon Sep 17 00:00:00 2001 +From: "Gustavo A. R. Silva" +Date: Sat, 25 Nov 2023 15:33:58 -0600 +Subject: neighbour: Fix __randomize_layout crash in struct neighbour + +Previously, one-element and zero-length arrays were treated as true +flexible arrays, even though they are actually "fake" flex arrays. +The __randomize_layout would leave them untouched at the end of the +struct, similarly to proper C99 flex-array members. + +However, this approach changed with commit 1ee60356c2dc ("gcc-plugins: +randstruct: Only warn about true flexible arrays"). Now, only C99 +flexible-array members will remain untouched at the end of the struct, +while one-element and zero-length arrays will be subject to randomization. + +Fix a `__randomize_layout` crash in `struct neighbour` by transforming +zero-length array `primary_key` into a proper C99 flexible-array member. + +Fixes: 1ee60356c2dc ("gcc-plugins: randstruct: Only warn about true flexible arrays") +Closes: https://lore.kernel.org/linux-hardening/20231124102458.gb1503...@e124191.cambridge.arm.com/ +Signed-off-by: Gustavo A. R. Silva +Reviewed-by: Kees Cook +Tested-by: Joey Gouly +Link: https://lore.kernel.org/r/ZWJoRsJGnCPdJ3+2@work +Signed-off-by: Paolo Abeni +--- + include/net/neighbour.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/net/neighbour.h b/include/net/neighbour.h +index 07022bb0d44d4b..0d28172193fa63 100644 +--- a/include/net/neighbour.h b/include/net/neighbour.h +@@ -162,7 +162,7 @@ struct neighbour { + struct rcu_head rcu; + struct net_device *dev; + netdevice_tracker dev_tracker; +- u8 primary_key[0]; ++ u8 primary_key[]; + } __randomize_layout; + + struct neigh_ops { +-- +cgit
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: b6b4af36aa8079ef0c7c6cf9c05b3c1a59be66e0 Author: Mike Pagano gentoo org> AuthorDate: Wed Nov 8 14:02:18 2023 + Commit: Mike Pagano gentoo org> CommitDate: Wed Nov 8 14:02:18 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=b6b4af36 Linux patch 6.1.62 Signed-off-by: Mike Pagano gentoo.org> _README |4 + 1061_linux-6.1.62.patch | 1798 +++ 2 files changed, 1802 insertions(+) diff --git a/_README b/_README index 78a774ef..3a96d6b9 100644 --- a/_README +++ b/_README @@ -287,6 +287,10 @@ Patch: 1060_linux-6.1.61.patch From: https://www.kernel.org Desc: Linux 6.1.61 +Patch: 1061_linux-6.1.62.patch +From: https://www.kernel.org +Desc: Linux 6.1.62 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1061_linux-6.1.62.patch b/1061_linux-6.1.62.patch new file mode 100644 index ..9c94ec46 --- /dev/null +++ b/1061_linux-6.1.62.patch @@ -0,0 +1,1798 @@ +diff --git a/Makefile b/Makefile +index 635474f38aaa9..2e7bc3cc1c177 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 61 ++SUBLEVEL = 62 + EXTRAVERSION = + NAME = Curry Ramen + +diff --git a/arch/loongarch/mm/init.c b/arch/loongarch/mm/init.c +index c7e9c96719fa3..f42a3be5f28d7 100644 +--- a/arch/loongarch/mm/init.c b/arch/loongarch/mm/init.c +@@ -68,11 +68,11 @@ void copy_user_highpage(struct page *to, struct page *from, + { + void *vfrom, *vto; + +- vto = kmap_atomic(to); +- vfrom = kmap_atomic(from); ++ vfrom = kmap_local_page(from); ++ vto = kmap_local_page(to); + copy_page(vto, vfrom); +- kunmap_atomic(vfrom); +- kunmap_atomic(vto); ++ kunmap_local(vfrom); ++ kunmap_local(vto); + /* Make sure this page is cleared on other CPU's too before using it */ + smp_wmb(); + } +@@ -228,6 +228,7 @@ pgd_t swapper_pg_dir[_PTRS_PER_PGD] __section(".bss..swapper_pg_dir"); + pgd_t invalid_pg_dir[_PTRS_PER_PGD] __page_aligned_bss; + #ifndef __PAGETABLE_PUD_FOLDED + pud_t invalid_pud_table[PTRS_PER_PUD] __page_aligned_bss; ++EXPORT_SYMBOL(invalid_pud_table); + #endif + #ifndef __PAGETABLE_PMD_FOLDED + pmd_t invalid_pmd_table[PTRS_PER_PMD] __page_aligned_bss; +diff --git a/arch/powerpc/kernel/head_85xx.S b/arch/powerpc/kernel/head_85xx.S +index 52c0ab416326a..0e16aea7853b8 100644 +--- a/arch/powerpc/kernel/head_85xx.S b/arch/powerpc/kernel/head_85xx.S +@@ -394,7 +394,7 @@ interrupt_base: + #ifdef CONFIG_PPC_FPU + FP_UNAVAILABLE_EXCEPTION + #else +- EXCEPTION(0x0800, FP_UNAVAIL, FloatingPointUnavailable, unknown_exception) ++ EXCEPTION(0x0800, FP_UNAVAIL, FloatingPointUnavailable, emulation_assist_interrupt) + #endif + + /* System Call Interrupt */ +diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c +index efb301a4987ca..59b4ac57bfaf7 100644 +--- a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c +@@ -946,6 +946,8 @@ void __init setup_arch(char **cmdline_p) + + /* Parse memory topology */ + mem_topology_setup(); ++ /* Set max_mapnr before paging_init() */ ++ set_max_mapnr(max_pfn); + + /* +* Release secondary cpus out of their spinloops at 0x60 now that +diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c +index 84d171953ba44..c7599b1737099 100644 +--- a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c +@@ -288,7 +288,6 @@ void __init mem_init(void) + #endif + + high_memory = (void *) __va(max_low_pfn * PAGE_SIZE); +- set_max_mapnr(max_pfn); + + kasan_late_init(); + +diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c +index c871a6d6364ca..4194aa4c5f0e0 100644 +--- a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c +@@ -822,8 +822,7 @@ void svm_set_x2apic_msr_interception(struct vcpu_svm *svm, bool intercept) + if (intercept == svm->x2avic_msrs_intercepted) + return; + +- if (avic_mode != AVIC_MODE_X2 || +- !apic_x2apic_mode(svm->vcpu.arch.apic)) ++ if (avic_mode != AVIC_MODE_X2) + return; + + for (i = 0; i < MAX_DIRECT_ACCESS_MSRS; i++) { +diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c +index 3b09fdc507e04..594b016e76efc 100644 +--- a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c +@@ -3697,6 +3697,7 @@ static int __init d40_probe(struct platform_device *pdev) + regulator_disable(base->lcpa_regulator); + regulator_put(base->lcpa_regulator); + } ++ pm_runtime_disable(base->dev); + + kfree(base->lcla_pool.alloc_map); + kfree(base->lookup_log_chans); +diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c +index
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: e87165447456e2d4f4675c67b3a59b9d5396dc5e Author: Mike Pagano gentoo org> AuthorDate: Thu Nov 2 11:09:47 2023 + Commit: Mike Pagano gentoo org> CommitDate: Thu Nov 2 11:09:47 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=e8716544 Linux patch 6.1.61 Signed-off-by: Mike Pagano gentoo.org> _README |4 + 1060_linux-6.1.61.patch | 2922 +++ 2 files changed, 2926 insertions(+) diff --git a/_README b/_README index a3b5d2f0..78a774ef 100644 --- a/_README +++ b/_README @@ -283,6 +283,10 @@ Patch: 1059_linux-6.1.60.patch From: https://www.kernel.org Desc: Linux 6.1.60 +Patch: 1060_linux-6.1.61.patch +From: https://www.kernel.org +Desc: Linux 6.1.61 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1060_linux-6.1.61.patch b/1060_linux-6.1.61.patch new file mode 100644 index ..a25aac45 --- /dev/null +++ b/1060_linux-6.1.61.patch @@ -0,0 +1,2922 @@ +diff --git a/Makefile b/Makefile +index d47edcde8..635474f38aaa9 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 60 ++SUBLEVEL = 61 + EXTRAVERSION = + NAME = Curry Ramen + +diff --git a/arch/arm/boot/dts/omap4-l4-abe.dtsi b/arch/arm/boot/dts/omap4-l4-abe.dtsi +index 7ae8b620515c5..59f546a278f87 100644 +--- a/arch/arm/boot/dts/omap4-l4-abe.dtsi b/arch/arm/boot/dts/omap4-l4-abe.dtsi +@@ -109,6 +109,8 @@ + reg = <0x0 0xff>, /* MPU private access */ + <0x49022000 0xff>; /* L3 Interconnect */ + reg-names = "mpu", "dma"; ++ clocks = <_clkctrl OMAP4_MCBSP1_CLKCTRL 24>; ++ clock-names = "fck"; + interrupts = ; + interrupt-names = "common"; + ti,buffer-size = <128>; +@@ -142,6 +144,8 @@ + reg = <0x0 0xff>, /* MPU private access */ + <0x49024000 0xff>; /* L3 Interconnect */ + reg-names = "mpu", "dma"; ++ clocks = <_clkctrl OMAP4_MCBSP2_CLKCTRL 24>; ++ clock-names = "fck"; + interrupts = ; + interrupt-names = "common"; + ti,buffer-size = <128>; +@@ -175,6 +179,8 @@ + reg = <0x0 0xff>, /* MPU private access */ + <0x49026000 0xff>; /* L3 Interconnect */ + reg-names = "mpu", "dma"; ++ clocks = <_clkctrl OMAP4_MCBSP3_CLKCTRL 24>; ++ clock-names = "fck"; + interrupts = ; + interrupt-names = "common"; + ti,buffer-size = <128>; +diff --git a/arch/arm/boot/dts/omap4-l4.dtsi b/arch/arm/boot/dts/omap4-l4.dtsi +index 46b8f9efd4131..3fcef3080eaec 100644 +--- a/arch/arm/boot/dts/omap4-l4.dtsi b/arch/arm/boot/dts/omap4-l4.dtsi +@@ -2043,6 +2043,8 @@ + compatible = "ti,omap4-mcbsp"; + reg = <0x0 0xff>; /* L4 Interconnect */ + reg-names = "mpu"; ++ clocks = <_per_clkctrl OMAP4_MCBSP4_CLKCTRL 24>; ++ clock-names = "fck"; + interrupts = ; + interrupt-names = "common"; + ti,buffer-size = <128>; +diff --git a/arch/arm/boot/dts/omap5-l4-abe.dtsi b/arch/arm/boot/dts/omap5-l4-abe.dtsi +index a03bca5a35844..97b0c3b5f573f 100644 +--- a/arch/arm/boot/dts/omap5-l4-abe.dtsi b/arch/arm/boot/dts/omap5-l4-abe.dtsi +@@ -109,6 +109,8 @@ + reg = <0x0 0xff>, /* MPU private access */ + <0x49022000 0xff>; /* L3 Interconnect */ + reg-names = "mpu", "dma"; ++ clocks = <_clkctrl OMAP5_MCBSP1_CLKCTRL 24>; ++ clock-names = "fck"; + interrupts = ; + interrupt-names = "common"; + ti,buffer-size = <128>; +@@ -142,6 +144,8 @@ + reg = <0x0 0xff>, /* MPU private access */ + <0x49024000 0xff>; /* L3 Interconnect */ + reg-names = "mpu", "dma"; ++ clocks = <_clkctrl OMAP5_MCBSP2_CLKCTRL 24>; ++
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 1b5d19742dd710541a3d5f47e0e9d4aafa829ef7 Author: Mike Pagano gentoo org> AuthorDate: Sun Oct 22 22:52:32 2023 + Commit: Mike Pagano gentoo org> CommitDate: Sun Oct 22 22:52:32 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=1b5d1974 kbuild: Use CRC32 and a 1MiB dictionary for XZ compressed modules Signed-off-by: Mike Pagano gentoo.org> _README | 4 +++ 2950_kbuild-CRC32-1MB-dict-xz-modules.patch | 38 + 2 files changed, 42 insertions(+) diff --git a/_README b/_README index 455e85da..2db06d5c 100644 --- a/_README +++ b/_README @@ -315,6 +315,10 @@ Patch: 2940_handle-gcc-14-last-stmt-rename.patch From: https://lore.kernel.org/all/20230811060545.never.564-k...@kernel.org/#Z31scripts:gcc-plugins:gcc-common.h Desc: gcc-plugins: Rename last_stmt() for GCC 14+ +Patch: 2950_kbuild-CRC32-1MB-dict-xz-modules.patch +From: https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/commit/?h=kbuild=fbf5892df21a8ccfcb2fda0fd65bc3169c89ed28 +Desc: kbuild: Use CRC32 and a 1MiB dictionary for XZ compressed modules + Patch: 3000_Support-printing-firmware-info.patch From: https://bugs.gentoo.org/732852 Desc: Print firmware info (Reqs CONFIG_GENTOO_PRINT_FIRMWARE_INFO). Thanks to Georgy Yakovlev diff --git a/2950_kbuild-CRC32-1MB-dict-xz-modules.patch b/2950_kbuild-CRC32-1MB-dict-xz-modules.patch new file mode 100644 index ..32090343 --- /dev/null +++ b/2950_kbuild-CRC32-1MB-dict-xz-modules.patch @@ -0,0 +1,38 @@ +From fbf5892df21a8ccfcb2fda0fd65bc3169c89ed28 Mon Sep 17 00:00:00 2001 +From: Martin Nybo Andersen +Date: Fri, 15 Sep 2023 12:15:39 +0200 +Subject: kbuild: Use CRC32 and a 1MiB dictionary for XZ compressed modules + +Kmod is now (since kmod commit 09c9f8c5df04 ("libkmod: Use kernel +decompression when available")) using the kernel decompressor, when +loading compressed modules. + +However, the kernel XZ decompressor is XZ Embedded, which doesn't +handle CRC64 and dictionaries larger than 1MiB. + +Use CRC32 and 1MiB dictionary when XZ compressing and installing +kernel modules. + +Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050582 +Signed-off-by: Martin Nybo Andersen +Signed-off-by: Masahiro Yamada +--- + scripts/Makefile.modinst | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst +index 346f5ec506823..0afd75472679f 100644 +--- a/scripts/Makefile.modinst b/scripts/Makefile.modinst +@@ -144,7 +144,7 @@ endif + quiet_cmd_gzip = GZIP$@ + cmd_gzip = $(KGZIP) -n -f $< + quiet_cmd_xz = XZ $@ +- cmd_xz = $(XZ) --lzma2=dict=2MiB -f $< ++ cmd_xz = $(XZ) --check=crc32 --lzma2=dict=1MiB -f $< + quiet_cmd_zstd = ZSTD$@ + cmd_zstd = $(ZSTD) -T0 --rm -f -q $< + +-- +cgit +
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 2946d45ccac2c25c38654d1f380feab6f5672191 Author: Mike Pagano gentoo org> AuthorDate: Wed Oct 18 20:04:34 2023 + Commit: Mike Pagano gentoo org> CommitDate: Wed Oct 18 20:04:34 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=2946d45c TAR override and gcc 14 patch kheaders: make it possible to override TAR gcc-plugins: Rename last_stmt() for GCC 14+ Signed-off-by: Mike Pagano gentoo.org> _README | 8 2930_tar_override.patch | 69 +++ 2940_handle-gcc-14-last-stmt-rename.patch | 31 ++ 3 files changed, 108 insertions(+) diff --git a/_README b/_README index 09720a58..1d0e038f 100644 --- a/_README +++ b/_README @@ -303,6 +303,14 @@ Patch: 2920_sign-file-patch-for-libressl.patch From: https://bugs.gentoo.org/717166 Desc: sign-file: full functionality with modern LibreSSL +Patch: 2930_tar_override.patch +From: https://lore.kernel.org/lkml/20230412082743.350699-1-mgo...@gentoo.org/#t +Desc: kheaders: make it possible to override TAR + +Patch: 2940_handle-gcc-14-last-stmt-rename.patch +From: https://lore.kernel.org/all/20230811060545.never.564-k...@kernel.org/#Z31scripts:gcc-plugins:gcc-common.h +Desc: gcc-plugins: Rename last_stmt() for GCC 14+ + Patch: 3000_Support-printing-firmware-info.patch From: https://bugs.gentoo.org/732852 Desc: Print firmware info (Reqs CONFIG_GENTOO_PRINT_FIRMWARE_INFO). Thanks to Georgy Yakovlev diff --git a/2930_tar_override.patch b/2930_tar_override.patch new file mode 100644 index ..aa62aae1 --- /dev/null +++ b/2930_tar_override.patch @@ -0,0 +1,69 @@ +From: "Michał Górny" +To: Dmitry Goldin +Cc: "Masahiro Yamada" , + linux-ker...@vger.kernel.org, "Michał Górny" , + "Sam James" , + "Masahiro Yamada" +Subject: [PATCH v2] kheaders: make it possible to override TAR +Date: Wed, 12 Apr 2023 10:27:43 +0200 [thread overview] +Message-ID: <20230412082743.350699-1-mgo...@gentoo.org> (raw) +In-Reply-To: + +Commit 86cdd2fdc4e39c388d39c7ba2396d1a9dfd66226 ("kheaders: make headers +archive reproducible") introduced a number of options specific to GNU +tar to the `tar` invocation in `gen_kheaders.sh` script. This causes +the script to fail to work on systems where `tar` is not GNU tar. This +can occur e.g. on recent Gentoo Linux installations that support using +bsdtar from libarchive instead. + +Add a `TAR` make variable to make it possible to override the tar +executable used, e.g. by specifying: + + make TAR=gtar + +Link: https://bugs.gentoo.org/884061 +Reported-by: Sam James +Tested-by: Sam James +Co-developed-by: Masahiro Yamada +Signed-off-by: Michał Górny +--- + Makefile | 3 ++- + kernel/gen_kheaders.sh | 2 +- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 5aeea3d98..50045059c 100644 +--- a/Makefile b/Makefile +@@ -520,6 +520,7 @@ LZMA = lzma + LZ4 = lz4c + XZ= xz + ZSTD = zstd ++TAR = tar + + PAHOLE_FLAGS = $(shell PAHOLE=$(PAHOLE) $(srctree)/scripts/pahole-flags.sh) + +@@ -599,7 +600,7 @@ export RUSTC RUSTDOC RUSTFMT RUSTC_OR_CLIPPY_QUIET RUSTC_OR_CLIPPY BINDGEN CARGO + export HOSTRUSTC KBUILD_HOSTRUSTFLAGS + export CPP AR NM STRIP OBJCOPY OBJDUMP READELF PAHOLE RESOLVE_BTFIDS LEX YACC AWK INSTALLKERNEL + export PERL PYTHON3 CHECK CHECKFLAGS MAKE UTS_MACHINE HOSTCXX +-export KGZIP KBZIP2 KLZOP LZMA LZ4 XZ ZSTD ++export KGZIP KBZIP2 KLZOP LZMA LZ4 XZ ZSTD TAR + export KBUILD_HOSTCXXFLAGS KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS LDFLAGS_MODULE + export KBUILD_USERCFLAGS KBUILD_USERLDFLAGS + +diff --git a/kernel/gen_kheaders.sh b/kernel/gen_kheaders.sh +index 1ef9a8751..82d539648 100755 +--- a/kernel/gen_kheaders.sh b/kernel/gen_kheaders.sh +@@ -86,7 +86,7 @@ find $cpio_dir -type f -print0 | + # For compatibility with older versions of tar, files are fed to tar + # pre-sorted, as --sort=name might not be available. + find $cpio_dir -printf "./%P\n" | LC_ALL=C sort | \ +-tar "${KBUILD_BUILD_TIMESTAMP:+--mtime=$KBUILD_BUILD_TIMESTAMP}" \ ++${TAR:-tar} "${KBUILD_BUILD_TIMESTAMP:+--mtime=$KBUILD_BUILD_TIMESTAMP}" \ + --owner=0 --group=0 --numeric-owner --no-recursion \ + -I $XZ -cf $tarfile -C $cpio_dir/ -T - > /dev/null + +-- +2.40.0 diff --git a/2940_handle-gcc-14-last-stmt-rename.patch b/2940_handle-gcc-14-last-stmt-rename.patch new file mode 100644 index ..b04ce8da --- /dev/null +++ b/2940_handle-gcc-14-last-stmt-rename.patch @@ -0,0 +1,31 @@ +From: Kees Cook +To: linux-harden...@vger.kernel.org +Cc: Kees Cook , linux-ker...@vger.kernel.org +Subject: [PATCH] gcc-plugins: Rename last_stmt() for GCC 14+ +Date: Thu, 10 Aug 2023 23:05:49 -0700 [thread overview] +Message-ID: <20230811060545.never.564-k...@kernel.org> (raw) + +In GCC 14, last_stmt() was renamed to last_nondebug_stmt(). Add a
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 2938b52a4b8118a1fed79013d3bb258819489ad8 Author: Mike Pagano gentoo org> AuthorDate: Sun Oct 15 17:40:10 2023 + Commit: Mike Pagano gentoo org> CommitDate: Sun Oct 15 17:40:10 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=2938b52a Linux patch 6.1.58 Signed-off-by: Mike Pagano gentoo.org> _README | 4 + 1057_linux-6.1.58.patch | 389 2 files changed, 393 insertions(+) diff --git a/_README b/_README index 921005a5..09720a58 100644 --- a/_README +++ b/_README @@ -271,6 +271,10 @@ Patch: 1056_linux-6.1.57.patch From: https://www.kernel.org Desc: Linux 6.1.57 +Patch: 1057_linux-6.1.58.patch +From: https://www.kernel.org +Desc: Linux 6.1.58 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1057_linux-6.1.58.patch b/1057_linux-6.1.58.patch new file mode 100644 index ..b890875f --- /dev/null +++ b/1057_linux-6.1.58.patch @@ -0,0 +1,389 @@ +diff --git a/Makefile b/Makefile +index b435b56594f0f..ce1eec0b5010d 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 57 ++SUBLEVEL = 58 + EXTRAVERSION = + NAME = Curry Ramen + +diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c +index 5a976fa343df1..3bb530d4bb5ce 100644 +--- a/fs/nfs/direct.c b/fs/nfs/direct.c +@@ -93,10 +93,12 @@ nfs_direct_handle_truncated(struct nfs_direct_req *dreq, + dreq->max_count = dreq_len; + if (dreq->count > dreq_len) + dreq->count = dreq_len; +- } + +- if (test_bit(NFS_IOHDR_ERROR, >flags) && !dreq->error) +- dreq->error = hdr->error; ++ if (test_bit(NFS_IOHDR_ERROR, >flags)) ++ dreq->error = hdr->error; ++ else /* Clear outstanding error if this is EOF */ ++ dreq->error = 0; ++ } + } + + static void +@@ -118,18 +120,6 @@ nfs_direct_count_bytes(struct nfs_direct_req *dreq, + dreq->count = dreq_len; + } + +-static void nfs_direct_truncate_request(struct nfs_direct_req *dreq, +- struct nfs_page *req) +-{ +- loff_t offs = req_offset(req); +- size_t req_start = (size_t)(offs - dreq->io_start); +- +- if (req_start < dreq->max_count) +- dreq->max_count = req_start; +- if (req_start < dreq->count) +- dreq->count = req_start; +-} +- + /** + * nfs_swap_rw - NFS address space operation for swap I/O + * @iocb: target I/O control block +@@ -500,9 +490,7 @@ static void nfs_direct_add_page_head(struct list_head *list, + kref_get(>wb_kref); + } + +-static void nfs_direct_join_group(struct list_head *list, +-struct nfs_commit_info *cinfo, +-struct inode *inode) ++static void nfs_direct_join_group(struct list_head *list, struct inode *inode) + { + struct nfs_page *req, *subreq; + +@@ -524,7 +512,7 @@ static void nfs_direct_join_group(struct list_head *list, + nfs_release_request(subreq); + } + } while ((subreq = subreq->wb_this_page) != req); +- nfs_join_page_group(req, cinfo, inode); ++ nfs_join_page_group(req, inode); + } + } + +@@ -542,15 +530,20 @@ nfs_direct_write_scan_commit_list(struct inode *inode, + static void nfs_direct_write_reschedule(struct nfs_direct_req *dreq) + { + struct nfs_pageio_descriptor desc; +- struct nfs_page *req; ++ struct nfs_page *req, *tmp; + LIST_HEAD(reqs); + struct nfs_commit_info cinfo; ++ LIST_HEAD(failed); + + nfs_init_cinfo_from_dreq(, dreq); + nfs_direct_write_scan_commit_list(dreq->inode, , ); + +- nfs_direct_join_group(, , dreq->inode); ++ nfs_direct_join_group(, dreq->inode); + ++ dreq->count = 0; ++ dreq->max_count = 0; ++ list_for_each_entry(req, , wb_list) ++ dreq->max_count += req->wb_bytes; + nfs_clear_pnfs_ds_commit_verifiers(>ds_cinfo); + get_dreq(dreq); + +@@ -558,40 +551,27 @@ static void nfs_direct_write_reschedule(struct nfs_direct_req *dreq) + _direct_write_completion_ops); + desc.pg_dreq = dreq; + +- while (!list_empty()) { +- req = nfs_list_entry(reqs.next); ++ list_for_each_entry_safe(req, tmp, , wb_list) { + /* Bump the transmission count */ + req->wb_nio++; + if (!nfs_pageio_add_request(, req)) { +- spin_lock(>lock); +- if (dreq->error < 0) { +- desc.pg_error = dreq->error; +- } else if (desc.pg_error != -EAGAIN) { +-
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: b34204a3e7f9be1d039f1b914643e23ddb0166fa Author: Mike Pagano gentoo org> AuthorDate: Thu Oct 5 14:04:01 2023 + Commit: Mike Pagano gentoo org> CommitDate: Thu Oct 5 14:23:39 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=b34204a3 select BLK_DEV_BSG if SCSI as it depends on it. Thanks, Ancient. Signed-off-by: Mike Pagano gentoo.org> 4567_distro-Gentoo-Kconfig.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/4567_distro-Gentoo-Kconfig.patch b/4567_distro-Gentoo-Kconfig.patch index 9cb1eb0c..195c7d47 100644 --- a/4567_distro-Gentoo-Kconfig.patch +++ b/4567_distro-Gentoo-Kconfig.patch @@ -122,7 +122,7 @@ + depends on GENTOO_LINUX && GENTOO_LINUX_UDEV + + select AUTOFS_FS -+ select BLK_DEV_BSG ++ select BLK_DEV_BSG if SCSI + select BPF_SYSCALL + select CGROUP_BPF + select CGROUPS
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 5f0da340c312b96c5645d105e56a06674020ee3a Author: Mike Pagano gentoo org> AuthorDate: Sat Sep 23 11:03:17 2023 + Commit: Mike Pagano gentoo org> CommitDate: Sat Sep 23 11:03:17 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=5f0da340 Remove redundant patch Removed: 1515_selinux-fix-handling-of-empty-opts.patch Signed-off-by: Mike Pagano gentoo.org> _README | 4 --- 1515_selinux-fix-handling-of-empty-opts.patch | 51 --- 2 files changed, 55 deletions(-) diff --git a/_README b/_README index 44dd3ca6..3723582e 100644 --- a/_README +++ b/_README @@ -271,10 +271,6 @@ Patch: 1510_fs-enable-link-security-restrictions-by-default.patch From: http://sources.debian.net/src/linux/3.16.7-ckt4-3/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch/ Desc: Enable link security restrictions by default. -Patch: 1515_selinux-fix-handling-of-empty-opts.patch -From: https://www.spinics.net/lists/linux-fsdevel/msg249428.html -Desc: selinux: fix handling of empty opts in selinux_fs_context_submount() - Patch: 1700_sparc-address-warray-bound-warnings.patch From: https://github.com/KSPP/linux/issues/109 Desc: Address -Warray-bounds warnings diff --git a/1515_selinux-fix-handling-of-empty-opts.patch b/1515_selinux-fix-handling-of-empty-opts.patch deleted file mode 100644 index 10336ec5.. --- a/1515_selinux-fix-handling-of-empty-opts.patch +++ /dev/null @@ -1,51 +0,0 @@ -selinux: fix handling of empty opts in selinux_fs_context_submount() - -selinux_set_mnt_opts() relies on the fact that the mount options pointer -is always NULL when all options are unset (specifically in its -!selinux_initialized() branch. However, the new -selinux_fs_context_submount() hook breaks this rule by allocating a new -structure even if no options are set. That causes any submount created -before a SELinux policy is loaded to be rejected in -selinux_set_mnt_opts(). - -Fix this by making selinux_fs_context_submount() leave fc->security -set to NULL when there are no options to be copied from the reference -superblock. - -Reported-by: Adam Williamson -Link: https://bugzilla.redhat.com/show_bug.cgi?id=2236345 -Fixes: d80a8f1b58c2 ("vfs, security: Fix automount superblock LSM init problem, preventing NFS sb sharing") -Signed-off-by: Ondrej Mosnacek - security/selinux/hooks.c | 10 -- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c -index 10350534de6d6..2aa0e219d7217 100644 a/security/selinux/hooks.c -+++ b/security/selinux/hooks.c -@@ -2775,14 +2775,20 @@ static int selinux_umount(struct vfsmount *mnt, int flags) - static int selinux_fs_context_submount(struct fs_context *fc, - struct super_block *reference) - { -- const struct superblock_security_struct *sbsec; -+ const struct superblock_security_struct *sbsec = selinux_superblock(reference); - struct selinux_mnt_opts *opts; - -+ /* -+ * Ensure that fc->security remains NULL when no options are set -+ * as expected by selinux_set_mnt_opts(). -+ */ -+ if (!(sbsec->flags & (FSCONTEXT_MNT|CONTEXT_MNT|DEFCONTEXT_MNT))) -+ return 0; -+ - opts = kzalloc(sizeof(*opts), GFP_KERNEL); - if (!opts) - return -ENOMEM; - -- sbsec = selinux_superblock(reference); - if (sbsec->flags & FSCONTEXT_MNT) - opts->fscontext_sid = sbsec->sid; - if (sbsec->flags & CONTEXT_MNT) --- -2.41.0
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 5df5f5fb4856b26077f84645a8c9ed2b8bae0edf Author: Mike Pagano gentoo org> AuthorDate: Fri Sep 15 18:04:22 2023 + Commit: Mike Pagano gentoo org> CommitDate: Fri Sep 15 18:04:22 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=5df5f5fb selinux: fix handling of empty opts in selinux_fs_context_submount()6.5 Bug: https://bugs.gentoo.org/914204 Signed-off-by: Mike Pagano gentoo.org> _README | 4 +++ 1515_selinux-fix-handling-of-empty-opts.patch | 51 +++ 2 files changed, 55 insertions(+) diff --git a/_README b/_README index 053298cf..e0a65c77 100644 --- a/_README +++ b/_README @@ -263,6 +263,10 @@ Patch: 1510_fs-enable-link-security-restrictions-by-default.patch From: http://sources.debian.net/src/linux/3.16.7-ckt4-3/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch/ Desc: Enable link security restrictions by default. +Patch: 1515_selinux-fix-handling-of-empty-opts.patch +From: https://www.spinics.net/lists/linux-fsdevel/msg249428.html +Desc: selinux: fix handling of empty opts in selinux_fs_context_submount() + Patch: 1700_sparc-address-warray-bound-warnings.patch From: https://github.com/KSPP/linux/issues/109 Desc: Address -Warray-bounds warnings diff --git a/1515_selinux-fix-handling-of-empty-opts.patch b/1515_selinux-fix-handling-of-empty-opts.patch new file mode 100644 index ..10336ec5 --- /dev/null +++ b/1515_selinux-fix-handling-of-empty-opts.patch @@ -0,0 +1,51 @@ +selinux: fix handling of empty opts in selinux_fs_context_submount() + +selinux_set_mnt_opts() relies on the fact that the mount options pointer +is always NULL when all options are unset (specifically in its +!selinux_initialized() branch. However, the new +selinux_fs_context_submount() hook breaks this rule by allocating a new +structure even if no options are set. That causes any submount created +before a SELinux policy is loaded to be rejected in +selinux_set_mnt_opts(). + +Fix this by making selinux_fs_context_submount() leave fc->security +set to NULL when there are no options to be copied from the reference +superblock. + +Reported-by: Adam Williamson +Link: https://bugzilla.redhat.com/show_bug.cgi?id=2236345 +Fixes: d80a8f1b58c2 ("vfs, security: Fix automount superblock LSM init problem, preventing NFS sb sharing") +Signed-off-by: Ondrej Mosnacek +--- + security/selinux/hooks.c | 10 -- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c +index 10350534de6d6..2aa0e219d7217 100644 +--- a/security/selinux/hooks.c b/security/selinux/hooks.c +@@ -2775,14 +2775,20 @@ static int selinux_umount(struct vfsmount *mnt, int flags) + static int selinux_fs_context_submount(struct fs_context *fc, + struct super_block *reference) + { +- const struct superblock_security_struct *sbsec; ++ const struct superblock_security_struct *sbsec = selinux_superblock(reference); + struct selinux_mnt_opts *opts; + ++ /* ++ * Ensure that fc->security remains NULL when no options are set ++ * as expected by selinux_set_mnt_opts(). ++ */ ++ if (!(sbsec->flags & (FSCONTEXT_MNT|CONTEXT_MNT|DEFCONTEXT_MNT))) ++ return 0; ++ + opts = kzalloc(sizeof(*opts), GFP_KERNEL); + if (!opts) + return -ENOMEM; + +- sbsec = selinux_superblock(reference); + if (sbsec->flags & FSCONTEXT_MNT) + opts->fscontext_sid = sbsec->sid; + if (sbsec->flags & CONTEXT_MNT) +-- +2.41.0
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 71132679abcc54524dac8235d816499d3badd881 Author: Mike Pagano gentoo org> AuthorDate: Wed Sep 13 11:19:11 2023 + Commit: Mike Pagano gentoo org> CommitDate: Wed Sep 13 11:19:11 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=71132679 Remove redundant patch Removed: 2930_tpm-Enable-hwrng-for-Pluton-on-AMD-CPUs.patch Signed-off-by: Mike Pagano gentoo.org> _README| 4 - 2930_tpm-Enable-hwrng-for-Pluton-on-AMD-CPUs.patch | 90 -- 2 files changed, 94 deletions(-) diff --git a/_README b/_README index d7316905..053298cf 100644 --- a/_README +++ b/_README @@ -283,10 +283,6 @@ Patch: 2920_sign-file-patch-for-libressl.patch From: https://bugs.gentoo.org/717166 Desc: sign-file: full functionality with modern LibreSSL -Patch: 2930_tpm-Enable-hwrng-for-Pluton-on-AMD-CPUs.patch -From: https://lore.kernel.org/all/20230822231510.2263255-1-jar...@kernel.org/ -Desc: tpm: Enable hwrng only for Pluton on AMD CPUs - Patch: 3000_Support-printing-firmware-info.patch From: https://bugs.gentoo.org/732852 Desc: Print firmware info (Reqs CONFIG_GENTOO_PRINT_FIRMWARE_INFO). Thanks to Georgy Yakovlev diff --git a/2930_tpm-Enable-hwrng-for-Pluton-on-AMD-CPUs.patch b/2930_tpm-Enable-hwrng-for-Pluton-on-AMD-CPUs.patch deleted file mode 100644 index 932e82ed.. --- a/2930_tpm-Enable-hwrng-for-Pluton-on-AMD-CPUs.patch +++ /dev/null @@ -1,90 +0,0 @@ -From: Jarkko Sakkinen -To: linux-integr...@vger.kernel.org -Cc: Jerry Snitselaar , - Jarkko Sakkinen , - sta...@vger.kernel.org, Todd Brandt , - Peter Huewe , Jason Gunthorpe , - Mario Limonciello , - linux-ker...@vger.kernel.org -Subject: [PATCH v3] tpm: Enable hwrng only for Pluton on AMD CPUs -Date: Wed, 23 Aug 2023 02:15:10 +0300 [thread overview] -Message-ID: <20230822231510.2263255-1-jar...@kernel.org> (raw) - -The vendor check introduced by commit 554b841d4703 ("tpm: Disable RNG for -all AMD fTPMs") doesn't work properly on a number of Intel fTPMs. On the -reported systems the TPM doesn't reply at bootup and returns back the -command code. This makes the TPM fail probe. - -Since only Microsoft Pluton is the only known combination of AMD CPU and -fTPM from other vendor, disable hwrng otherwise. In order to make sysadmin -aware of this, print also info message to the klog. - -Cc: sta...@vger.kernel.org -Fixes: 554b841d4703 ("tpm: Disable RNG for all AMD fTPMs") -Reported-by: Todd Brandt -Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217804 -Signed-off-by: Jarkko Sakkinen -v3: -* Forgot to amend config flags. -v2: -* CONFIG_X86 -* Removed "Reviewed-by: Jarkko Sakkinen " -* Removed "Signed-off-by: Mario Limonciello " - drivers/char/tpm/tpm_crb.c | 33 - - 1 file changed, 8 insertions(+), 25 deletions(-) - -diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c -index 65ff4d2fbe8d..ea085b14ab7c 100644 a/drivers/char/tpm/tpm_crb.c -+++ b/drivers/char/tpm/tpm_crb.c -@@ -463,28 +463,6 @@ static bool crb_req_canceled(struct tpm_chip *chip, u8 status) - return (cancel & CRB_CANCEL_INVOKE) == CRB_CANCEL_INVOKE; - } - --static int crb_check_flags(struct tpm_chip *chip) --{ -- u32 val; -- int ret; -- -- ret = crb_request_locality(chip, 0); -- if (ret) -- return ret; -- -- ret = tpm2_get_tpm_pt(chip, TPM2_PT_MANUFACTURER, , NULL); -- if (ret) -- goto release; -- -- if (val == 0x414D4400U /* AMD */) -- chip->flags |= TPM_CHIP_FLAG_HWRNG_DISABLED; -- --release: -- crb_relinquish_locality(chip, 0); -- -- return ret; --} -- - static const struct tpm_class_ops tpm_crb = { - .flags = TPM_OPS_AUTO_STARTUP, - .status = crb_status, -@@ -827,9 +805,14 @@ static int crb_acpi_add(struct acpi_device *device) - if (rc) - goto out; - -- rc = crb_check_flags(chip); -- if (rc) -- goto out; -+#ifdef CONFIG_X86 -+ /* A quirk for https://www.amd.com/en/support/kb/faq/pa-410 */ -+ if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD && -+ priv->sm != ACPI_TPM2_COMMAND_BUFFER_WITH_PLUTON) { -+ dev_info(dev, "Disabling hwrng\n"); -+ chip->flags |= TPM_CHIP_FLAG_HWRNG_DISABLED; -+ } -+#endif /* CONFIG_X86 */ - - rc = tpm_chip_register(chip); - --- -2.39.2
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: ac6e318860d1a3ad84655aaa24fb455f7b092bc0 Author: Mike Pagano gentoo org> AuthorDate: Wed Sep 6 22:15:50 2023 + Commit: Mike Pagano gentoo org> CommitDate: Wed Sep 6 22:15:50 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=ac6e3188 Linux patch 6.1.52 Signed-off-by: Mike Pagano gentoo.org> _README | 4 + 1051_linux-6.1.52.patch | 957 2 files changed, 961 insertions(+) diff --git a/_README b/_README index 641d98d3..9d50d635 100644 --- a/_README +++ b/_README @@ -247,6 +247,10 @@ Patch: 1050_linux-6.1.51.patch From: https://www.kernel.org Desc: Linux 6.1.51 +Patch: 1051_linux-6.1.52.patch +From: https://www.kernel.org +Desc: Linux 6.1.52 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1051_linux-6.1.52.patch b/1051_linux-6.1.52.patch new file mode 100644 index ..11ad1175 --- /dev/null +++ b/1051_linux-6.1.52.patch @@ -0,0 +1,957 @@ +diff --git a/Documentation/devicetree/bindings/serial/nxp,sc16is7xx.txt b/Documentation/devicetree/bindings/serial/nxp,sc16is7xx.txt +index 0fa8e3e43bf80..1a7e4bff0456f 100644 +--- a/Documentation/devicetree/bindings/serial/nxp,sc16is7xx.txt b/Documentation/devicetree/bindings/serial/nxp,sc16is7xx.txt +@@ -23,6 +23,9 @@ Optional properties: + 1 = active low. + - irda-mode-ports: An array that lists the indices of the port that + should operate in IrDA mode. ++- nxp,modem-control-line-ports: An array that lists the indices of the port that ++ should have shared GPIO lines configured as ++ modem control lines. + + Example: + sc16is750: sc16is750@51 { +@@ -35,6 +38,26 @@ Example: + #gpio-cells = <2>; + }; + ++ sc16is752: sc16is752@53 { ++ compatible = "nxp,sc16is752"; ++ reg = <0x53>; ++ clocks = <>; ++ interrupt-parent = <>; ++ interrupts = <7 IRQ_TYPE_EDGE_FALLING>; ++ nxp,modem-control-line-ports = <1>; /* Port 1 as modem control lines */ ++ gpio-controller; /* Port 0 as GPIOs */ ++ #gpio-cells = <2>; ++ }; ++ ++ sc16is752: sc16is752@54 { ++ compatible = "nxp,sc16is752"; ++ reg = <0x54>; ++ clocks = <>; ++ interrupt-parent = <>; ++ interrupts = <7 IRQ_TYPE_EDGE_FALLING>; ++ nxp,modem-control-line-ports = <0 1>; /* Ports 0 and 1 as modem control lines */ ++ }; ++ + * spi as bus + + Required properties: +@@ -59,6 +82,9 @@ Optional properties: + 1 = active low. + - irda-mode-ports: An array that lists the indices of the port that + should operate in IrDA mode. ++- nxp,modem-control-line-ports: An array that lists the indices of the port that ++ should have shared GPIO lines configured as ++ modem control lines. + + Example: + sc16is750: sc16is750@0 { +@@ -70,3 +96,23 @@ Example: + gpio-controller; + #gpio-cells = <2>; + }; ++ ++ sc16is752: sc16is752@1 { ++ compatible = "nxp,sc16is752"; ++ reg = <1>; ++ clocks = <>; ++ interrupt-parent = <>; ++ interrupts = <7 IRQ_TYPE_EDGE_FALLING>; ++ nxp,modem-control-line-ports = <1>; /* Port 1 as modem control lines */ ++ gpio-controller; /* Port 0 as GPIOs */ ++ #gpio-cells = <2>; ++ }; ++ ++ sc16is752: sc16is752@2 { ++ compatible = "nxp,sc16is752"; ++ reg = <2>; ++ clocks = <>; ++ interrupt-parent = <>; ++ interrupts = <7 IRQ_TYPE_EDGE_FALLING>; ++ nxp,modem-control-line-ports = <0 1>; /* Ports 0 and 1 as modem control lines */ ++ }; +diff --git a/Makefile b/Makefile +index e7c344d5af156..82aaa3ae7395b 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 51 ++SUBLEVEL = 52 + EXTRAVERSION = + NAME = Curry Ramen + +diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c +index a829baf8d9226..05c0a0f6fe630 100644 +--- a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c +@@ -220,8 +220,6 @@ void sharpsl_battery_kick(void) + { + schedule_delayed_work(_bat, msecs_to_jiffies(125)); + } +-EXPORT_SYMBOL(sharpsl_battery_kick); +- + + static void sharpsl_battery_thread(struct work_struct *private_) + { +diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c +index 9964729cd428f..937f56bbaf6c6 100644 +--- a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c +@@ -9,7 +9,6 @@ + */ + +
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 0fc743e4891da8f3fb4d6255a2dbdde81b184016 Author: Mike Pagano gentoo org> AuthorDate: Sat Sep 2 09:56:29 2023 + Commit: Mike Pagano gentoo org> CommitDate: Sat Sep 2 09:56:29 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=0fc743e4 Linux patch 6.1.51 Signed-off-by: Mike Pagano gentoo.org> _README | 4 + 1050_linux-6.1.51.patch | 550 2 files changed, 554 insertions(+) diff --git a/_README b/_README index 870654fc..641d98d3 100644 --- a/_README +++ b/_README @@ -243,6 +243,10 @@ Patch: 1049_linux-6.1.50.patch From: https://www.kernel.org Desc: Linux 6.1.50 +Patch: 1050_linux-6.1.51.patch +From: https://www.kernel.org +Desc: Linux 6.1.51 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1050_linux-6.1.51.patch b/1050_linux-6.1.51.patch new file mode 100644 index ..1b1e4e60 --- /dev/null +++ b/1050_linux-6.1.51.patch @@ -0,0 +1,550 @@ +diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt +index 882b6198dd0d1..31af352b4762d 100644 +--- a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt +@@ -6164,10 +6164,6 @@ + -1: disable all critical trip points in all thermal zones + : override all critical trip points + +- thermal.nocrt= [HW,ACPI] +- Set to disable actions on ACPI thermal zone +- critical and hot trip points. +- + thermal.off=[HW,ACPI] + 1: disable ACPI thermal control + +diff --git a/Makefile b/Makefile +index e5e1fdeef8bf0..e7c344d5af156 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 50 ++SUBLEVEL = 51 + EXTRAVERSION = + NAME = Curry Ramen + +diff --git a/arch/arm/kernel/module-plts.c b/arch/arm/kernel/module-plts.c +index 1fc309b41f944..8d809724cde52 100644 +--- a/arch/arm/kernel/module-plts.c b/arch/arm/kernel/module-plts.c +@@ -256,7 +256,7 @@ int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, + /* sort by type and symbol index */ + sort(rels, numrels, sizeof(Elf32_Rel), cmp_rel, NULL); + +- if (strncmp(secstrings + dstsec->sh_name, ".init", 5) != 0) ++ if (!module_init_layout_section(secstrings + dstsec->sh_name)) + core_plts += count_plts(syms, dstsec->sh_addr, rels, + numrels, s->sh_info); + else +diff --git a/arch/arm64/kernel/module-plts.c b/arch/arm64/kernel/module-plts.c +index 5a0a8f552a610..c703b5db8eb11 100644 +--- a/arch/arm64/kernel/module-plts.c b/arch/arm64/kernel/module-plts.c +@@ -7,6 +7,7 @@ + #include + #include + #include ++#include + #include + + static struct plt_entry __get_adrp_add_pair(u64 dst, u64 pc, +@@ -343,7 +344,7 @@ int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, + if (nents) + sort(rels, nents, sizeof(Elf64_Rela), cmp_rela, NULL); + +- if (!str_has_prefix(secstrings + dstsec->sh_name, ".init")) ++ if (!module_init_layout_section(secstrings + dstsec->sh_name)) + core_plts += count_plts(syms, rels, numrels, + sechdrs[i].sh_info, dstsec); + else +diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c +index 09a34b07f02e6..9915062d5243c 100644 +--- a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c +@@ -24,32 +24,28 @@ + #include + #include + #include ++#include + +-/* we construct an artificial offset for the mapping based on the physical +- * address of the kernel mapping variable */ +-#define GET_LAST_MMAP(filp) \ +- (filp ? ((unsigned long) filp->f_mapping) >> 8 : 0UL) +-#define SET_LAST_MMAP(filp, val) \ +- { /* nothing */ } +- +-static int get_offset(unsigned int last_mmap) +-{ +- return (last_mmap & (SHM_COLOUR-1)) >> PAGE_SHIFT; +-} ++/* ++ * Construct an artificial page offset for the mapping based on the physical ++ * address of the kernel file mapping variable. ++ */ ++#define GET_FILP_PGOFF(filp) \ ++ (filp ? (((unsigned long) filp->f_mapping) >> 8)\ ++ & ((SHM_COLOUR-1) >> PAGE_SHIFT) : 0UL) + +-static unsigned long shared_align_offset(unsigned int last_mmap, ++static unsigned long shared_align_offset(unsigned long filp_pgoff, +unsigned long pgoff) + { +- return (get_offset(last_mmap) + pgoff) << PAGE_SHIFT; ++ return (filp_pgoff + pgoff) << PAGE_SHIFT; + } + +
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 1d1cf87e8d9001f2eaf9fb98557eead6934e4aaa Author: Mike Pagano gentoo org> AuthorDate: Sun Aug 27 21:41:02 2023 + Commit: Mike Pagano gentoo org> CommitDate: Sun Aug 27 21:41:02 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=1d1cf87e Linux patch 6.1.49 Signed-off-by: Mike Pagano gentoo.org> _README | 4 + 1048_linux-6.1.49.patch | 292 2 files changed, 296 insertions(+) diff --git a/_README b/_README index 0c66344f..6ce2c13b 100644 --- a/_README +++ b/_README @@ -235,6 +235,10 @@ Patch: 1047_linux-6.1.48.patch From: https://www.kernel.org Desc: Linux 6.1.48 +Patch: 1048_linux-6.1.49.patch +From: https://www.kernel.org +Desc: Linux 6.1.49 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1048_linux-6.1.49.patch b/1048_linux-6.1.49.patch new file mode 100644 index ..637a71c4 --- /dev/null +++ b/1048_linux-6.1.49.patch @@ -0,0 +1,292 @@ +diff --git a/Makefile b/Makefile +index 8bb8dd199c552..61ebd54aba899 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 48 ++SUBLEVEL = 49 + EXTRAVERSION = + NAME = Curry Ramen + +diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h +index 78f39a78de29a..4d1e48c676fab 100644 +--- a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h +@@ -3431,6 +3431,7 @@ static inline bool __is_valid_data_blkaddr(block_t blkaddr) + * file.c + */ + int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync); ++void f2fs_truncate_data_blocks(struct dnode_of_data *dn); + int f2fs_do_truncate_blocks(struct inode *inode, u64 from, bool lock); + int f2fs_truncate_blocks(struct inode *inode, u64 from, bool lock); + int f2fs_truncate(struct inode *inode); +diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c +index 3ce6da4fac9c6..7b94f047cbf79 100644 +--- a/fs/f2fs/file.c b/fs/f2fs/file.c +@@ -628,6 +628,11 @@ void f2fs_truncate_data_blocks_range(struct dnode_of_data *dn, int count) +dn->ofs_in_node, nr_free); + } + ++void f2fs_truncate_data_blocks(struct dnode_of_data *dn) ++{ ++ f2fs_truncate_data_blocks_range(dn, ADDRS_PER_BLOCK(dn->inode)); ++} ++ + static int truncate_partial_data_page(struct inode *inode, u64 from, + bool cache_only) + { +diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c +index 9fe502485930f..a010b4bc36d2c 100644 +--- a/fs/f2fs/node.c b/fs/f2fs/node.c +@@ -923,7 +923,6 @@ static int truncate_node(struct dnode_of_data *dn) + + static int truncate_dnode(struct dnode_of_data *dn) + { +- struct f2fs_sb_info *sbi = F2FS_I_SB(dn->inode); + struct page *page; + int err; + +@@ -931,25 +930,16 @@ static int truncate_dnode(struct dnode_of_data *dn) + return 1; + + /* get direct node */ +- page = f2fs_get_node_page(sbi, dn->nid); ++ page = f2fs_get_node_page(F2FS_I_SB(dn->inode), dn->nid); + if (PTR_ERR(page) == -ENOENT) + return 1; + else if (IS_ERR(page)) + return PTR_ERR(page); + +- if (IS_INODE(page) || ino_of_node(page) != dn->inode->i_ino) { +- f2fs_err(sbi, "incorrect node reference, ino: %lu, nid: %u, ino_of_node: %u", +- dn->inode->i_ino, dn->nid, ino_of_node(page)); +- set_sbi_flag(sbi, SBI_NEED_FSCK); +- f2fs_handle_error(sbi, ERROR_INVALID_NODE_REFERENCE); +- f2fs_put_page(page, 1); +- return -EFSCORRUPTED; +- } +- + /* Make dnode_of_data for parameter */ + dn->node_page = page; + dn->ofs_in_node = 0; +- f2fs_truncate_data_blocks_range(dn, ADDRS_PER_BLOCK(dn->inode)); ++ f2fs_truncate_data_blocks(dn); + err = truncate_node(dn); + if (err) { + f2fs_put_page(page, 1); +diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c +index ff47aad636e5b..b6dad389fa144 100644 +--- a/fs/f2fs/super.c b/fs/f2fs/super.c +@@ -1347,12 +1347,6 @@ default_check: + return -EINVAL; + } + +- if ((f2fs_sb_has_readonly(sbi) || f2fs_readonly(sbi->sb)) && +- test_opt(sbi, FLUSH_MERGE)) { +- f2fs_err(sbi, "FLUSH_MERGE not compatible with readonly mode"); +- return -EINVAL; +- } +- + if (f2fs_sb_has_readonly(sbi) && !f2fs_readonly(sbi->sb)) { + f2fs_err(sbi, "Allow to mount readonly mode only"); + return -EROFS; +@@ -1939,10 +1933,8 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root) + seq_puts(seq, ",inline_dentry"); + else + seq_puts(seq, ",noinline_dentry"); +- if (test_opt(sbi, FLUSH_MERGE)) ++ if (!f2fs_readonly(sbi->sb)
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: d40e0faac42c6b42986e65605d6e04768e0e8bef Author: Mike Pagano gentoo org> AuthorDate: Sat Aug 26 15:18:16 2023 + Commit: Mike Pagano gentoo org> CommitDate: Sat Aug 26 15:18:16 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=d40e0faa tpm: Enable hwrng only for Pluton on AMD CPUs See: https://bugzilla.kernel.org/show_bug.cgi?id=217804 Signed-off-by: Mike Pagano gentoo.org> _README| 4 + 2930_tpm-Enable-hwrng-for-Pluton-on-AMD-CPUs.patch | 90 ++ 2 files changed, 94 insertions(+) diff --git a/_README b/_README index 40eb5947..0c66344f 100644 --- a/_README +++ b/_README @@ -263,6 +263,10 @@ Patch: 2920_sign-file-patch-for-libressl.patch From: https://bugs.gentoo.org/717166 Desc: sign-file: full functionality with modern LibreSSL +Patch: 2930_tpm-Enable-hwrng-for-Pluton-on-AMD-CPUs.patch +From: https://lore.kernel.org/all/20230822231510.2263255-1-jar...@kernel.org/ +Desc: tpm: Enable hwrng only for Pluton on AMD CPUs + Patch: 3000_Support-printing-firmware-info.patch From: https://bugs.gentoo.org/732852 Desc: Print firmware info (Reqs CONFIG_GENTOO_PRINT_FIRMWARE_INFO). Thanks to Georgy Yakovlev diff --git a/2930_tpm-Enable-hwrng-for-Pluton-on-AMD-CPUs.patch b/2930_tpm-Enable-hwrng-for-Pluton-on-AMD-CPUs.patch new file mode 100644 index ..932e82ed --- /dev/null +++ b/2930_tpm-Enable-hwrng-for-Pluton-on-AMD-CPUs.patch @@ -0,0 +1,90 @@ +From: Jarkko Sakkinen +To: linux-integr...@vger.kernel.org +Cc: Jerry Snitselaar , + Jarkko Sakkinen , + sta...@vger.kernel.org, Todd Brandt , + Peter Huewe , Jason Gunthorpe , + Mario Limonciello , + linux-ker...@vger.kernel.org +Subject: [PATCH v3] tpm: Enable hwrng only for Pluton on AMD CPUs +Date: Wed, 23 Aug 2023 02:15:10 +0300 [thread overview] +Message-ID: <20230822231510.2263255-1-jar...@kernel.org> (raw) + +The vendor check introduced by commit 554b841d4703 ("tpm: Disable RNG for +all AMD fTPMs") doesn't work properly on a number of Intel fTPMs. On the +reported systems the TPM doesn't reply at bootup and returns back the +command code. This makes the TPM fail probe. + +Since only Microsoft Pluton is the only known combination of AMD CPU and +fTPM from other vendor, disable hwrng otherwise. In order to make sysadmin +aware of this, print also info message to the klog. + +Cc: sta...@vger.kernel.org +Fixes: 554b841d4703 ("tpm: Disable RNG for all AMD fTPMs") +Reported-by: Todd Brandt +Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217804 +Signed-off-by: Jarkko Sakkinen +--- +v3: +* Forgot to amend config flags. +v2: +* CONFIG_X86 +* Removed "Reviewed-by: Jarkko Sakkinen " +* Removed "Signed-off-by: Mario Limonciello " +--- + drivers/char/tpm/tpm_crb.c | 33 - + 1 file changed, 8 insertions(+), 25 deletions(-) + +diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c +index 65ff4d2fbe8d..ea085b14ab7c 100644 +--- a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c +@@ -463,28 +463,6 @@ static bool crb_req_canceled(struct tpm_chip *chip, u8 status) + return (cancel & CRB_CANCEL_INVOKE) == CRB_CANCEL_INVOKE; + } + +-static int crb_check_flags(struct tpm_chip *chip) +-{ +- u32 val; +- int ret; +- +- ret = crb_request_locality(chip, 0); +- if (ret) +- return ret; +- +- ret = tpm2_get_tpm_pt(chip, TPM2_PT_MANUFACTURER, , NULL); +- if (ret) +- goto release; +- +- if (val == 0x414D4400U /* AMD */) +- chip->flags |= TPM_CHIP_FLAG_HWRNG_DISABLED; +- +-release: +- crb_relinquish_locality(chip, 0); +- +- return ret; +-} +- + static const struct tpm_class_ops tpm_crb = { + .flags = TPM_OPS_AUTO_STARTUP, + .status = crb_status, +@@ -827,9 +805,14 @@ static int crb_acpi_add(struct acpi_device *device) + if (rc) + goto out; + +- rc = crb_check_flags(chip); +- if (rc) +- goto out; ++#ifdef CONFIG_X86 ++ /* A quirk for https://www.amd.com/en/support/kb/faq/pa-410 */ ++ if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD && ++ priv->sm != ACPI_TPM2_COMMAND_BUFFER_WITH_PLUTON) { ++ dev_info(dev, "Disabling hwrng\n"); ++ chip->flags |= TPM_CHIP_FLAG_HWRNG_DISABLED; ++ } ++#endif /* CONFIG_X86 */ + + rc = tpm_chip_register(chip); + +-- +2.39.2
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 597ad722c61ee3671b7cd0dcefa8ce523a757ed3 Author: Mike Pagano gentoo org> AuthorDate: Sat Aug 26 15:00:24 2023 + Commit: Mike Pagano gentoo org> CommitDate: Sat Aug 26 15:00:24 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=597ad722 Linux patch 6.1.48 Signed-off-by: Mike Pagano gentoo.org> _README | 4 + 1047_linux-6.1.48.patch | 604 2 files changed, 608 insertions(+) diff --git a/_README b/_README index 0ad2cca2..40eb5947 100644 --- a/_README +++ b/_README @@ -231,6 +231,10 @@ Patch: 1046_linux-6.1.47.patch From: https://www.kernel.org Desc: Linux 6.1.47 +Patch: 1047_linux-6.1.48.patch +From: https://www.kernel.org +Desc: Linux 6.1.48 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1047_linux-6.1.48.patch b/1047_linux-6.1.48.patch new file mode 100644 index ..eb7ca312 --- /dev/null +++ b/1047_linux-6.1.48.patch @@ -0,0 +1,604 @@ +diff --git a/Documentation/admin-guide/hw-vuln/srso.rst b/Documentation/admin-guide/hw-vuln/srso.rst +index 2f923c805802f..f79cb11b080f6 100644 +--- a/Documentation/admin-guide/hw-vuln/srso.rst b/Documentation/admin-guide/hw-vuln/srso.rst +@@ -124,8 +124,8 @@ sequence. + To ensure the safety of this mitigation, the kernel must ensure that the + safe return sequence is itself free from attacker interference. In Zen3 + and Zen4, this is accomplished by creating a BTB alias between the +-untraining function srso_untrain_ret_alias() and the safe return +-function srso_safe_ret_alias() which results in evicting a potentially ++untraining function srso_alias_untrain_ret() and the safe return ++function srso_alias_safe_ret() which results in evicting a potentially + poisoned BTB entry and using that safe one for all function returns. + + In older Zen1 and Zen2, this is accomplished using a reinterpretation +diff --git a/Makefile b/Makefile +index 375efcfb91f8f..8bb8dd199c552 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 47 ++SUBLEVEL = 48 + EXTRAVERSION = + NAME = Curry Ramen + +diff --git a/arch/x86/include/asm/entry-common.h b/arch/x86/include/asm/entry-common.h +index 674ed46d3ceda..11203a9fe0a87 100644 +--- a/arch/x86/include/asm/entry-common.h b/arch/x86/include/asm/entry-common.h +@@ -92,6 +92,7 @@ static inline void arch_exit_to_user_mode_prepare(struct pt_regs *regs, + static __always_inline void arch_exit_to_user_mode(void) + { + mds_user_clear_cpu_buffers(); ++ amd_clear_divider(); + } + #define arch_exit_to_user_mode arch_exit_to_user_mode + +diff --git a/arch/x86/include/asm/nospec-branch.h b/arch/x86/include/asm/nospec-branch.h +index 31fa631c8587c..2f123d4fb85b5 100644 +--- a/arch/x86/include/asm/nospec-branch.h b/arch/x86/include/asm/nospec-branch.h +@@ -168,9 +168,9 @@ + .endm + + #ifdef CONFIG_CPU_UNRET_ENTRY +-#define CALL_ZEN_UNTRAIN_RET "call zen_untrain_ret" ++#define CALL_UNTRAIN_RET "call entry_untrain_ret" + #else +-#define CALL_ZEN_UNTRAIN_RET "" ++#define CALL_UNTRAIN_RET "" + #endif + + /* +@@ -178,7 +178,7 @@ + * return thunk isn't mapped into the userspace tables (then again, AMD + * typically has NO_MELTDOWN). + * +- * While zen_untrain_ret() doesn't clobber anything but requires stack, ++ * While retbleed_untrain_ret() doesn't clobber anything but requires stack, + * entry_ibpb() will clobber AX, CX, DX. + * + * As such, this must be placed after every *SWITCH_TO_KERNEL_CR3 at a point +@@ -189,14 +189,9 @@ + defined(CONFIG_CPU_SRSO) + ANNOTATE_UNRET_END + ALTERNATIVE_2 "", \ +-CALL_ZEN_UNTRAIN_RET, X86_FEATURE_UNRET, \ ++CALL_UNTRAIN_RET, X86_FEATURE_UNRET, \ + "call entry_ibpb", X86_FEATURE_ENTRY_IBPB + #endif +- +-#ifdef CONFIG_CPU_SRSO +- ALTERNATIVE_2 "", "call srso_untrain_ret", X86_FEATURE_SRSO, \ +-"call srso_untrain_ret_alias", X86_FEATURE_SRSO_ALIAS +-#endif + .endm + + #else /* __ASSEMBLY__ */ +@@ -210,10 +205,21 @@ + typedef u8 retpoline_thunk_t[RETPOLINE_THUNK_SIZE]; + extern retpoline_thunk_t __x86_indirect_thunk_array[]; + ++#ifdef CONFIG_RETHUNK + extern void __x86_return_thunk(void); +-extern void zen_untrain_ret(void); ++#else ++static inline void __x86_return_thunk(void) {} ++#endif ++ ++extern void retbleed_return_thunk(void); ++extern void srso_return_thunk(void); ++extern void srso_alias_return_thunk(void); ++ ++extern void retbleed_untrain_ret(void); + extern void srso_untrain_ret(void); +-extern void srso_untrain_ret_alias(void); ++extern void srso_alias_untrain_ret(void); ++ ++extern void entry_untrain_ret(void); + extern void
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: ea90beb9c82adf6fda470602f76f36087cf9c712 Author: Mike Pagano gentoo org> AuthorDate: Wed Aug 16 18:32:22 2023 + Commit: Mike Pagano gentoo org> CommitDate: Wed Aug 16 18:32:22 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=ea90beb9 Remove redundant patch Removed: 2930_gcc-plugins-Reorg-gimple-incs-for-gcc-13.patch Signed-off-by: Mike Pagano gentoo.org> _README| 4 --- ..._gcc-plugins-Reorg-gimple-incs-for-gcc-13.patch | 41 -- 2 files changed, 45 deletions(-) diff --git a/_README b/_README index 0e741144..c1bcb313 100644 --- a/_README +++ b/_README @@ -255,10 +255,6 @@ Patch: 2920_sign-file-patch-for-libressl.patch From: https://bugs.gentoo.org/717166 Desc: sign-file: full functionality with modern LibreSSL -Patch: 2930_gcc-plugins-Reorg-gimple-incs-for-gcc-13.patch -From: https://lore.kernel.org/lkml/mhng-8bc81919-3023-4d72-bd44-2443606b4fd7@palmer-ri-x1c9a/T/ -Desc: gcc-plugins: Reorganize gimple includes for GCC 13 - Patch: 3000_Support-printing-firmware-info.patch From: https://bugs.gentoo.org/732852 Desc: Print firmware info (Reqs CONFIG_GENTOO_PRINT_FIRMWARE_INFO). Thanks to Georgy Yakovlev diff --git a/2930_gcc-plugins-Reorg-gimple-incs-for-gcc-13.patch b/2930_gcc-plugins-Reorg-gimple-incs-for-gcc-13.patch deleted file mode 100644 index 0b454ec8.. --- a/2930_gcc-plugins-Reorg-gimple-incs-for-gcc-13.patch +++ /dev/null @@ -1,41 +0,0 @@ -gcc-plugins: Reorganize gimple includes for GCC 13 - -The gimple-iterator.h header must be included before gimple-fold.h -starting with GCC 13. Reorganize gimple headers to work for all GCC -versions. - -Reported-by: Palmer Dabbelt -Link: https://lore.kernel.org/all/20230113173033.4380-1-pal...@rivosinc.com/ -Cc: linux-harden...@vger.kernel.org -Signed-off-by: Kees Cook - scripts/gcc-plugins/gcc-common.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h -index 9a1895747b15..84c730da36dd 100644 a/scripts/gcc-plugins/gcc-common.h -+++ b/scripts/gcc-plugins/gcc-common.h -@@ -71,7 +71,9 @@ - #include "varasm.h" - #include "stor-layout.h" - #include "internal-fn.h" -+#include "gimple.h" - #include "gimple-expr.h" -+#include "gimple-iterator.h" - #include "gimple-fold.h" - #include "context.h" - #include "tree-ssa-alias.h" -@@ -85,10 +87,8 @@ - #include "tree-eh.h" - #include "stmt.h" - #include "gimplify.h" --#include "gimple.h" - #include "tree-phinodes.h" - #include "tree-cfg.h" --#include "gimple-iterator.h" - #include "gimple-ssa.h" - #include "ssa-iterators.h" - --- -2.34.1
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 44bf627114eb52a75a55341e74a081912edd6c12 Author: Mike Pagano gentoo org> AuthorDate: Tue Aug 8 18:40:23 2023 + Commit: Mike Pagano gentoo org> CommitDate: Tue Aug 8 18:40:23 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=44bf6271 Linux patch 6.1.44 Signed-off-by: Mike Pagano gentoo.org> _README |4 + 1043_linux-6.1.44.patch | 2841 +++ 2 files changed, 2845 insertions(+) diff --git a/_README b/_README index c3798828..12241a14 100644 --- a/_README +++ b/_README @@ -215,6 +215,10 @@ Patch: 1042_linux-6.1.43.patch From: https://www.kernel.org Desc: Linux 6.1.43 +Patch: 1043_linux-6.1.44.patch +From: https://www.kernel.org +Desc: Linux 6.1.44 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1043_linux-6.1.44.patch b/1043_linux-6.1.44.patch new file mode 100644 index ..0c2a79ff --- /dev/null +++ b/1043_linux-6.1.44.patch @@ -0,0 +1,2841 @@ +diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu +index f54867cadb0f6..13c01b641dc70 100644 +--- a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu +@@ -513,17 +513,18 @@ Description: information about CPUs heterogeneity. + cpu_capacity: capacity of cpuX. + + What: /sys/devices/system/cpu/vulnerabilities ++ /sys/devices/system/cpu/vulnerabilities/gather_data_sampling ++ /sys/devices/system/cpu/vulnerabilities/itlb_multihit ++ /sys/devices/system/cpu/vulnerabilities/l1tf ++ /sys/devices/system/cpu/vulnerabilities/mds + /sys/devices/system/cpu/vulnerabilities/meltdown ++ /sys/devices/system/cpu/vulnerabilities/mmio_stale_data ++ /sys/devices/system/cpu/vulnerabilities/retbleed ++ /sys/devices/system/cpu/vulnerabilities/spec_store_bypass + /sys/devices/system/cpu/vulnerabilities/spectre_v1 + /sys/devices/system/cpu/vulnerabilities/spectre_v2 +- /sys/devices/system/cpu/vulnerabilities/spec_store_bypass +- /sys/devices/system/cpu/vulnerabilities/l1tf +- /sys/devices/system/cpu/vulnerabilities/mds + /sys/devices/system/cpu/vulnerabilities/srbds + /sys/devices/system/cpu/vulnerabilities/tsx_async_abort +- /sys/devices/system/cpu/vulnerabilities/itlb_multihit +- /sys/devices/system/cpu/vulnerabilities/mmio_stale_data +- /sys/devices/system/cpu/vulnerabilities/retbleed + Date: January 2018 + Contact: Linux kernel mailing list + Description: Information about CPU vulnerabilities +diff --git a/Documentation/admin-guide/hw-vuln/gather_data_sampling.rst b/Documentation/admin-guide/hw-vuln/gather_data_sampling.rst +new file mode 100644 +index 0..264bfa937f7de +--- /dev/null b/Documentation/admin-guide/hw-vuln/gather_data_sampling.rst +@@ -0,0 +1,109 @@ ++.. SPDX-License-Identifier: GPL-2.0 ++ ++GDS - Gather Data Sampling ++== ++ ++Gather Data Sampling is a hardware vulnerability which allows unprivileged ++speculative access to data which was previously stored in vector registers. ++ ++Problem ++--- ++When a gather instruction performs loads from memory, different data elements ++are merged into the destination vector register. However, when a gather ++instruction that is transiently executed encounters a fault, stale data from ++architectural or internal vector registers may get transiently forwarded to the ++destination vector register instead. This will allow a malicious attacker to ++infer stale data using typical side channel techniques like cache timing ++attacks. GDS is a purely sampling-based attack. ++ ++The attacker uses gather instructions to infer the stale vector register data. ++The victim does not need to do anything special other than use the vector ++registers. The victim does not need to use gather instructions to be ++vulnerable. ++ ++Because the buffers are shared between Hyper-Threads cross Hyper-Thread attacks ++are possible. ++ ++Attack scenarios ++ ++Without mitigation, GDS can infer stale data across virtually all ++permission boundaries: ++ ++ Non-enclaves can infer SGX enclave data ++ Userspace can infer kernel data ++ Guests can infer data from hosts ++ Guest can infer guest from other guests ++ Users can infer data from other users ++ ++Because of this, it is important to ensure that the mitigation stays enabled in ++lower-privilege contexts like guests and when running outside SGX enclaves. ++ ++The hardware enforces the mitigation for SGX. Likewise, VMMs should ensure ++that guests
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 902923f3e529e47f769727e5dcb73e64e9397029 Author: Mike Pagano gentoo org> AuthorDate: Mon Jul 24 20:26:48 2023 + Commit: Mike Pagano gentoo org> CommitDate: Mon Jul 24 20:26:48 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=902923f3 Linux patch 6.1.41 Signed-off-by: Mike Pagano gentoo.org> _README | 4 + 1040_linux-6.1.41.patch | 310 2 files changed, 314 insertions(+) diff --git a/_README b/_README index e1e77420..3a1ce4bc 100644 --- a/_README +++ b/_README @@ -203,6 +203,10 @@ Patch: 1039_linux-6.1.40.patch From: https://www.kernel.org Desc: Linux 6.1.40 +Patch: 1040_linux-6.1.41.patch +From: https://www.kernel.org +Desc: Linux 6.1.41 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1040_linux-6.1.41.patch b/1040_linux-6.1.41.patch new file mode 100644 index ..55534ffd --- /dev/null +++ b/1040_linux-6.1.41.patch @@ -0,0 +1,310 @@ +diff --git a/Makefile b/Makefile +index 2bb0c01391a98..6c940cce3656a 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 40 ++SUBLEVEL = 41 + EXTRAVERSION = + NAME = Curry Ramen + +diff --git a/arch/x86/include/asm/microcode.h b/arch/x86/include/asm/microcode.h +index 79b1d009e34e4..19a0b4005ffa8 100644 +--- a/arch/x86/include/asm/microcode.h b/arch/x86/include/asm/microcode.h +@@ -5,6 +5,7 @@ + #include + #include + #include ++#include + + struct ucode_patch { + struct list_head plist; +diff --git a/arch/x86/include/asm/microcode_amd.h b/arch/x86/include/asm/microcode_amd.h +index e6662adf3af4d..9675c621c1ca4 100644 +--- a/arch/x86/include/asm/microcode_amd.h b/arch/x86/include/asm/microcode_amd.h +@@ -48,11 +48,13 @@ extern void __init load_ucode_amd_bsp(unsigned int family); + extern void load_ucode_amd_ap(unsigned int family); + extern int __init save_microcode_in_initrd_amd(unsigned int family); + void reload_ucode_amd(unsigned int cpu); ++extern void amd_check_microcode(void); + #else + static inline void __init load_ucode_amd_bsp(unsigned int family) {} + static inline void load_ucode_amd_ap(unsigned int family) {} + static inline int __init + save_microcode_in_initrd_amd(unsigned int family) { return -EINVAL; } + static inline void reload_ucode_amd(unsigned int cpu) {} ++static inline void amd_check_microcode(void) {} + #endif + #endif /* _ASM_X86_MICROCODE_AMD_H */ +diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h +index 117e4e977b55d..846067e1ee8bb 100644 +--- a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h +@@ -543,6 +543,7 @@ + #define MSR_AMD64_DE_CFG 0xc0011029 + #define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT 1 + #define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE BIT_ULL(MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT) ++#define MSR_AMD64_DE_CFG_ZEN2_FP_BACKUP_FIX_BIT 9 + + #define MSR_AMD64_BU_CFG2 0xc001102a + #define MSR_AMD64_IBSFETCHCTL 0xc0011030 +diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c +index d2dbbc50b3a7b..7f4eb8b027cc8 100644 +--- a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c +@@ -27,11 +27,6 @@ + + #include "cpu.h" + +-static const int amd_erratum_383[]; +-static const int amd_erratum_400[]; +-static const int amd_erratum_1054[]; +-static bool cpu_has_amd_erratum(struct cpuinfo_x86 *cpu, const int *erratum); +- + /* + * nodes_per_socket: Stores the number of nodes per socket. + * Refer to Fam15h Models 00-0fh BKDG - CPUID Fn8000_001E_ECX +@@ -39,6 +34,78 @@ static bool cpu_has_amd_erratum(struct cpuinfo_x86 *cpu, const int *erratum); + */ + static u32 nodes_per_socket = 1; + ++/* ++ * AMD errata checking ++ * ++ * Errata are defined as arrays of ints using the AMD_LEGACY_ERRATUM() or ++ * AMD_OSVW_ERRATUM() macros. The latter is intended for newer errata that ++ * have an OSVW id assigned, which it takes as first argument. Both take a ++ * variable number of family-specific model-stepping ranges created by ++ * AMD_MODEL_RANGE(). ++ * ++ * Example: ++ * ++ * const int amd_erratum_319[] = ++ *AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0x4, 0x2), ++ * AMD_MODEL_RANGE(0x10, 0x8, 0x0, 0x8, 0x0), ++ * AMD_MODEL_RANGE(0x10, 0x9, 0x0, 0x9, 0x0)); ++ */ ++ ++#define AMD_LEGACY_ERRATUM(...) { -1, __VA_ARGS__, 0 } ++#define AMD_OSVW_ERRATUM(osvw_id, ...){ osvw_id, __VA_ARGS__, 0 } ++#define AMD_MODEL_RANGE(f, m_start, s_start, m_end, s_end) \ ++ ((f << 24) | (m_start << 16) | (s_start << 12) | (m_end << 4) | (s_end)) ++#define AMD_MODEL_RANGE_FAMILY(range) (((range) >> 24) & 0xff) ++#define AMD_MODEL_RANGE_START(range) (((range) >> 12) & 0xfff) ++#define
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 1bfb91f619e81be1b7ba059b62cbddf0ce837bf5 Author: Mike Pagano gentoo org> AuthorDate: Wed Jul 5 20:33:41 2023 + Commit: Mike Pagano gentoo org> CommitDate: Wed Jul 5 20:33:41 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=1bfb91f6 Remove redundant patch Removed: 1800_mm-execve-mark-stack-as-growing-down.patch Signed-off-by: Mike Pagano gentoo.org> _README | 4 -- 1800_mm-execve-mark-stack-as-growing-down.patch | 82 - 2 files changed, 86 deletions(-) diff --git a/_README b/_README index 6c8d0f22..3b5aa81d 100644 --- a/_README +++ b/_README @@ -207,10 +207,6 @@ Patch: 1700_sparc-address-warray-bound-warnings.patch From: https://github.com/KSPP/linux/issues/109 Desc: Address -Warray-bounds warnings -Patch: 1800_mm-execve-mark-stack-as-growing-down.patch -From: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git -Desc: execve: always mark stack as growing down during early stack setup - Patch: 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch From: https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-mar...@holtmann.org/raw Desc: Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. See bug #686758 diff --git a/1800_mm-execve-mark-stack-as-growing-down.patch b/1800_mm-execve-mark-stack-as-growing-down.patch deleted file mode 100644 index 7c71f7ea.. --- a/1800_mm-execve-mark-stack-as-growing-down.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 0140eae44accd0df8071de6487afe0921eb0d7fd Mon Sep 17 00:00:00 2001 -From: Linus Torvalds -Date: Sun, 2 Jul 2023 23:20:17 -0700 -Subject: execve: always mark stack as growing down during early stack setup - -commit f66066bc5136f25e36a2daff4896c768f18c211e upstream. - -While our user stacks can grow either down (all common architectures) or -up (parisc and the ia64 register stack), the initial stack setup when we -copy the argument and environment strings to the new stack at execve() -time is always done by extending the stack downwards. - -But it turns out that in commit 8d7071af8907 ("mm: always expand the -stack with the mmap write lock held"), as part of making the stack -growing code more robust, 'expand_downwards()' was now made to actually -check the vma flags: - - if (!(vma->vm_flags & VM_GROWSDOWN)) - return -EFAULT; - -and that meant that this execve-time stack expansion started failing on -parisc, because on that architecture, the stack flags do not contain the -VM_GROWSDOWN bit. - -At the same time the new check in expand_downwards() is clearly correct, -and simplified the callers, so let's not remove it. - -The solution is instead to just codify the fact that yes, during -execve(), the stack grows down. This not only matches reality, it ends -up being particularly simple: we already have special execve-time flags -for the stack (VM_STACK_INCOMPLETE_SETUP) and use those flags to avoid -page migration during this setup time (see vma_is_temporary_stack() and -invalid_migration_vma()). - -So just add VM_GROWSDOWN to that set of temporary flags, and now our -stack flags automatically match reality, and the parisc stack expansion -works again. - -Note that the VM_STACK_INCOMPLETE_SETUP bits will be cleared when the -stack is finalized, so we only add the extra VM_GROWSDOWN bit on -CONFIG_STACK_GROWSUP architectures (ie parisc) rather than adding it in -general. - -Link: https://lore.kernel.org/all/612eaa53-6904-6e16-67fc-394f4faa0...@bell.net/ -Link: https://lore.kernel.org/all/5fd98a09-4792-1433-752d-029ae3545...@gmx.de/ -Fixes: 8d7071af8907 ("mm: always expand the stack with the mmap write lock held") -Reported-by: John David Anglin -Reported-and-tested-by: Helge Deller -Reported-and-tested-by: Guenter Roeck -Signed-off-by: Linus Torvalds -Signed-off-by: Greg Kroah-Hartman - include/linux/mm.h | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/include/linux/mm.h b/include/linux/mm.h -index f5b6ef943ede2..b8ed44f401b58 100644 a/include/linux/mm.h -+++ b/include/linux/mm.h -@@ -378,7 +378,7 @@ extern unsigned int kobjsize(const void *objp); - #endif /* CONFIG_HAVE_ARCH_USERFAULTFD_MINOR */ - - /* Bits set in the VMA until the stack is in its final location */ --#define VM_STACK_INCOMPLETE_SETUP (VM_RAND_READ | VM_SEQ_READ) -+#define VM_STACK_INCOMPLETE_SETUP (VM_RAND_READ | VM_SEQ_READ | VM_STACK_EARLY) - - #define TASK_EXEC ((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) - -@@ -400,8 +400,10 @@ extern unsigned int kobjsize(const void *objp); - - #ifdef CONFIG_STACK_GROWSUP - #define VM_STACK VM_GROWSUP -+#define VM_STACK_EARLYVM_GROWSDOWN - #else - #define VM_STACK VM_GROWSDOWN -+#define VM_STACK_EARLY0 - #endif - - #define VM_STACK_FLAGS(VM_STACK | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT) ---
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 25387cd201c8d4fe72a2321d30fcdf209f84c544 Author: Mike Pagano gentoo org> AuthorDate: Wed Jul 5 20:28:46 2023 + Commit: Mike Pagano gentoo org> CommitDate: Wed Jul 5 20:28:46 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=25387cd2 Linux patch 6.1.38 Signed-off-by: Mike Pagano gentoo.org> _README | 4 + 1037_linux-6.1.38.patch | 367 2 files changed, 371 insertions(+) diff --git a/_README b/_README index 0d9f0d0b..6c8d0f22 100644 --- a/_README +++ b/_README @@ -191,6 +191,10 @@ Patch: 1036_linux-6.1.37.patch From: https://www.kernel.org Desc: Linux 6.1.37 +Patch: 1037_linux-6.1.38.patch +From: https://www.kernel.org +Desc: Linux 6.1.38 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1037_linux-6.1.38.patch b/1037_linux-6.1.38.patch new file mode 100644 index ..7a5cc22c --- /dev/null +++ b/1037_linux-6.1.38.patch @@ -0,0 +1,367 @@ +diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst +index 9844ca3a71a61..c76b02d940946 100644 +--- a/Documentation/process/changes.rst b/Documentation/process/changes.rst +@@ -60,6 +60,7 @@ openssl & libcrypto1.0.0openssl version + bc 1.06.95 bc --version + Sphinx\ [#f1]_ 1.7 sphinx-build --version + cpio any cpio --version ++gtags (optional) 6.6.5gtags --version + == === + + .. [#f1] Sphinx is needed only to build the Kernel documentation +@@ -174,6 +175,12 @@ You will need openssl to build kernels 3.7 and higher if module signing is + enabled. You will also need openssl development packages to build kernels 4.3 + and higher. + ++gtags / GNU GLOBAL (optional) ++- ++ ++The kernel build requires GNU GLOBAL version 6.6.5 or later to generate ++tag files through ``make gtags``. This is due to its use of the gtags ++``-C (--directory)`` flag. + + System utilities + +diff --git a/Makefile b/Makefile +index 26d73ce7e9267..57c891b8b13cc 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 37 ++SUBLEVEL = 38 + EXTRAVERSION = + NAME = Curry Ramen + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +index 003aa9e47085e..5a8a4cda7e987 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +@@ -2363,6 +2363,10 @@ int amdgpu_vm_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) + long timeout = msecs_to_jiffies(2000); + int r; + ++ /* No valid flags defined yet */ ++ if (args->in.flags) ++ return -EINVAL; ++ + switch (args->in.op) { + case AMDGPU_VM_OP_RESERVE_VMID: + /* We only have requirement to reserve vmid from gfxhub */ +diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c +index af7aefe285ffd..087a4838488b2 100644 +--- a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c +@@ -401,8 +401,13 @@ bool dc_stream_adjust_vmin_vmax(struct dc *dc, + { + int i; + +- if (memcmp(adjust, >adjust, sizeof(struct dc_crtc_timing_adjust)) == 0) +- return true; ++ /* ++ * Don't adjust DRR while there's bandwidth optimizations pending to ++ * avoid conflicting with firmware updates. ++ */ ++ if (dc->ctx->dce_version > DCE_VERSION_MAX) ++ if (dc->optimized_required || dc->wm_optimized_required) ++ return false; + + stream->adjust.v_total_max = adjust->v_total_max; + stream->adjust.v_total_mid = adjust->v_total_mid; +@@ -2024,27 +2029,33 @@ void dc_post_update_surfaces_to_stream(struct dc *dc) + + post_surface_trace(dc); + +- if (dc->ctx->dce_version >= DCE_VERSION_MAX) +- TRACE_DCN_CLOCK_STATE(>bw_ctx.bw.dcn.clk); +- else ++ /* ++ * Only relevant for DCN behavior where we can guarantee the optimization ++ * is safe to apply - retain the legacy behavior for DCE. ++ */ ++ ++ if (dc->ctx->dce_version < DCE_VERSION_MAX) + TRACE_DCE_CLOCK_STATE(>bw_ctx.bw.dce); ++ else { ++ TRACE_DCN_CLOCK_STATE(>bw_ctx.bw.dcn.clk); + +- if (is_flip_pending_in_pipes(dc, context)) +- return; ++ if (is_flip_pending_in_pipes(dc, context)) ++ return; + +- for (i = 0; i < dc->res_pool->pipe_count; i++) +- if (context->res_ctx.pipe_ctx[i].stream == NULL || +-
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 603da5b7208c6a4e92fdc62538021f1c3d5c7539 Author: Mike Pagano gentoo org> AuthorDate: Tue Jul 4 13:15:15 2023 + Commit: Mike Pagano gentoo org> CommitDate: Tue Jul 4 13:15:15 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=603da5b7 mm: disable CONFIG_PER_VMA_LOCK by default until its fixed Signed-off-by: Mike Pagano gentoo.org> _README | 4 ++ 1800_mm-execve-mark-stack-as-growing-down.patch | 82 + 2 files changed, 86 insertions(+) diff --git a/_README b/_README index d50ba74b..0d9f0d0b 100644 --- a/_README +++ b/_README @@ -203,6 +203,10 @@ Patch: 1700_sparc-address-warray-bound-warnings.patch From: https://github.com/KSPP/linux/issues/109 Desc: Address -Warray-bounds warnings +Patch: 1800_mm-execve-mark-stack-as-growing-down.patch +From: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git +Desc: execve: always mark stack as growing down during early stack setup + Patch: 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch From: https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-mar...@holtmann.org/raw Desc: Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. See bug #686758 diff --git a/1800_mm-execve-mark-stack-as-growing-down.patch b/1800_mm-execve-mark-stack-as-growing-down.patch new file mode 100644 index ..7c71f7ea --- /dev/null +++ b/1800_mm-execve-mark-stack-as-growing-down.patch @@ -0,0 +1,82 @@ +From 0140eae44accd0df8071de6487afe0921eb0d7fd Mon Sep 17 00:00:00 2001 +From: Linus Torvalds +Date: Sun, 2 Jul 2023 23:20:17 -0700 +Subject: execve: always mark stack as growing down during early stack setup + +commit f66066bc5136f25e36a2daff4896c768f18c211e upstream. + +While our user stacks can grow either down (all common architectures) or +up (parisc and the ia64 register stack), the initial stack setup when we +copy the argument and environment strings to the new stack at execve() +time is always done by extending the stack downwards. + +But it turns out that in commit 8d7071af8907 ("mm: always expand the +stack with the mmap write lock held"), as part of making the stack +growing code more robust, 'expand_downwards()' was now made to actually +check the vma flags: + + if (!(vma->vm_flags & VM_GROWSDOWN)) + return -EFAULT; + +and that meant that this execve-time stack expansion started failing on +parisc, because on that architecture, the stack flags do not contain the +VM_GROWSDOWN bit. + +At the same time the new check in expand_downwards() is clearly correct, +and simplified the callers, so let's not remove it. + +The solution is instead to just codify the fact that yes, during +execve(), the stack grows down. This not only matches reality, it ends +up being particularly simple: we already have special execve-time flags +for the stack (VM_STACK_INCOMPLETE_SETUP) and use those flags to avoid +page migration during this setup time (see vma_is_temporary_stack() and +invalid_migration_vma()). + +So just add VM_GROWSDOWN to that set of temporary flags, and now our +stack flags automatically match reality, and the parisc stack expansion +works again. + +Note that the VM_STACK_INCOMPLETE_SETUP bits will be cleared when the +stack is finalized, so we only add the extra VM_GROWSDOWN bit on +CONFIG_STACK_GROWSUP architectures (ie parisc) rather than adding it in +general. + +Link: https://lore.kernel.org/all/612eaa53-6904-6e16-67fc-394f4faa0...@bell.net/ +Link: https://lore.kernel.org/all/5fd98a09-4792-1433-752d-029ae3545...@gmx.de/ +Fixes: 8d7071af8907 ("mm: always expand the stack with the mmap write lock held") +Reported-by: John David Anglin +Reported-and-tested-by: Helge Deller +Reported-and-tested-by: Guenter Roeck +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman +--- + include/linux/mm.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/include/linux/mm.h b/include/linux/mm.h +index f5b6ef943ede2..b8ed44f401b58 100644 +--- a/include/linux/mm.h b/include/linux/mm.h +@@ -378,7 +378,7 @@ extern unsigned int kobjsize(const void *objp); + #endif /* CONFIG_HAVE_ARCH_USERFAULTFD_MINOR */ + + /* Bits set in the VMA until the stack is in its final location */ +-#define VM_STACK_INCOMPLETE_SETUP (VM_RAND_READ | VM_SEQ_READ) ++#define VM_STACK_INCOMPLETE_SETUP (VM_RAND_READ | VM_SEQ_READ | VM_STACK_EARLY) + + #define TASK_EXEC ((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) + +@@ -400,8 +400,10 @@ extern unsigned int kobjsize(const void *objp); + + #ifdef CONFIG_STACK_GROWSUP + #define VM_STACK VM_GROWSUP ++#define VM_STACK_EARLYVM_GROWSDOWN + #else + #define VM_STACK VM_GROWSDOWN ++#define VM_STACK_EARLY0 + #endif + + #define VM_STACK_FLAGS(VM_STACK | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT) +-- +cgit +
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: bee1a172fdd848464d7ea0df4de48778e3243e3c Author: Mike Pagano gentoo org> AuthorDate: Sat Jul 1 18:27:25 2023 + Commit: Mike Pagano gentoo org> CommitDate: Sat Jul 1 18:27:25 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=bee1a172 Linux patch 6.1.37-gentoo Signed-off-by: Mike Pagano gentoo.org> _README |4 + 1036_linux-6.1.37.patch | 2681 +++ 2 files changed, 2685 insertions(+) diff --git a/_README b/_README index 46c23470..d50ba74b 100644 --- a/_README +++ b/_README @@ -187,6 +187,10 @@ Patch: 1035_linux-6.1.36.patch From: https://www.kernel.org Desc: Linux 6.1.36 +Patch: 1036_linux-6.1.37.patch +From: https://www.kernel.org +Desc: Linux 6.1.37 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1036_linux-6.1.37.patch b/1036_linux-6.1.37.patch new file mode 100644 index ..62552bde --- /dev/null +++ b/1036_linux-6.1.37.patch @@ -0,0 +1,2681 @@ +diff --git a/Makefile b/Makefile +index cffb83d7a0fb6..26d73ce7e9267 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 36 ++SUBLEVEL = 37 + EXTRAVERSION = + NAME = Curry Ramen + +diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig +index 97fce7386b002..d95d82abdf295 100644 +--- a/arch/alpha/Kconfig b/arch/alpha/Kconfig +@@ -28,6 +28,7 @@ config ALPHA + select GENERIC_SMP_IDLE_THREAD + select HAVE_ARCH_AUDITSYSCALL + select HAVE_MOD_ARCH_SPECIFIC ++ select LOCK_MM_AND_FIND_VMA + select MODULES_USE_ELF_RELA + select ODD_RT_SIGACTION + select OLD_SIGSUSPEND +diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c +index ef427a6bdd1ab..2b49aa94e4de3 100644 +--- a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c +@@ -119,20 +119,12 @@ do_page_fault(unsigned long address, unsigned long mmcsr, + flags |= FAULT_FLAG_USER; + perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); + retry: +- mmap_read_lock(mm); +- vma = find_vma(mm, address); ++ vma = lock_mm_and_find_vma(mm, address, regs); + if (!vma) +- goto bad_area; +- if (vma->vm_start <= address) +- goto good_area; +- if (!(vma->vm_flags & VM_GROWSDOWN)) +- goto bad_area; +- if (expand_stack(vma, address)) +- goto bad_area; ++ goto bad_area_nosemaphore; + + /* Ok, we have a good vm_area for this memory access, so + we can handle it. */ +- good_area: + si_code = SEGV_ACCERR; + if (cause < 0) { + if (!(vma->vm_flags & VM_EXEC)) +@@ -189,6 +181,7 @@ retry: + bad_area: + mmap_read_unlock(mm); + ++ bad_area_nosemaphore: + if (user_mode(regs)) + goto do_sigsegv; + +diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig +index d9a13ccf89a3a..cb1074f74c3f1 100644 +--- a/arch/arc/Kconfig b/arch/arc/Kconfig +@@ -41,6 +41,7 @@ config ARC + select HAVE_PERF_EVENTS + select HAVE_SYSCALL_TRACEPOINTS + select IRQ_DOMAIN ++ select LOCK_MM_AND_FIND_VMA + select MODULES_USE_ELF_RELA + select OF + select OF_EARLY_FLATTREE +diff --git a/arch/arc/mm/fault.c b/arch/arc/mm/fault.c +index 5ca59a482632a..f59e722d147f9 100644 +--- a/arch/arc/mm/fault.c b/arch/arc/mm/fault.c +@@ -113,15 +113,9 @@ void do_page_fault(unsigned long address, struct pt_regs *regs) + + perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); + retry: +- mmap_read_lock(mm); +- +- vma = find_vma(mm, address); ++ vma = lock_mm_and_find_vma(mm, address, regs); + if (!vma) +- goto bad_area; +- if (unlikely(address < vma->vm_start)) { +- if (!(vma->vm_flags & VM_GROWSDOWN) || expand_stack(vma, address)) +- goto bad_area; +- } ++ goto bad_area_nosemaphore; + + /* +* vm_area is good, now check permissions for this memory access +@@ -161,6 +155,7 @@ retry: + bad_area: + mmap_read_unlock(mm); + ++bad_area_nosemaphore: + /* +* Major/minor page fault accounting +* (in case of retry we only land here once) +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index a08c9d092a332..0202e48e7a207 100644 +--- a/arch/arm/Kconfig b/arch/arm/Kconfig +@@ -122,6 +122,7 @@ config ARM + select HAVE_UID16 + select HAVE_VIRT_CPU_ACCOUNTING_GEN + select IRQ_FORCED_THREADING ++ select LOCK_MM_AND_FIND_VMA + select MODULES_USE_ELF_REL + select NEED_DMA_MAP_STATE + select OF_EARLY_FLATTREE if OF +diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c +index de988cba9a4b1..b0db853103317 100644 +--- a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c +@@
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 3c90be0a17c6a8daaa7786f407058de578bb1dec Author: Mike Pagano gentoo org> AuthorDate: Fri Jun 9 12:01:57 2023 + Commit: Mike Pagano gentoo org> CommitDate: Fri Jun 9 12:01:57 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=3c90be0a Remove redundant patch Removed: 2100_io-uring-undeprecate-epoll-ctl-support.patch Signed-off-by: Mike Pagano gentoo.org> _README | 4 2100_io-uring-undeprecate-epoll-ctl-support.patch | 21 - 2 files changed, 25 deletions(-) diff --git a/_README b/_README index 20dddfc3..5b332006 100644 --- a/_README +++ b/_README @@ -187,10 +187,6 @@ Patch: 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch From: https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-mar...@holtmann.org/raw Desc: Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. See bug #686758 -Patch: 2100_io-uring-undeprecate-epoll-ctl-support.patch -From: https://patchwork.kernel.org/project/io-uring/patch/20230506095502.13401-1-i...@bnoordhuis.nl/ -Desc: io_uring: undeprecate epoll_ctl support - Patch: 2900_tmp513-Fix-build-issue-by-selecting-CONFIG_REG.patch From: https://bugs.gentoo.org/710790 Desc: tmp513 requies REGMAP_I2C to build. Select it by default in Kconfig. See bug #710790. Thanks to Phil Stracchino diff --git a/2100_io-uring-undeprecate-epoll-ctl-support.patch b/2100_io-uring-undeprecate-epoll-ctl-support.patch deleted file mode 100644 index 4c3d3904.. --- a/2100_io-uring-undeprecate-epoll-ctl-support.patch +++ /dev/null @@ -1,21 +0,0 @@ -io_uring: undeprecate epoll_ctl support - - io_uring/epoll.c | 4 - 1 file changed, 4 deletions(-) - -diff --git a/io_uring/epoll.c b/io_uring/epoll.c -index 9aa74d2c80bc..89bff2068a19 100644 a/io_uring/epoll.c -+++ b/io_uring/epoll.c -@@ -25,10 +25,6 @@ int io_epoll_ctl_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) - { - struct io_epoll *epoll = io_kiocb_to_cmd(req, struct io_epoll); - -- pr_warn_once("%s: epoll_ctl support in io_uring is deprecated and will " -- "be removed in a future Linux kernel version.\n", -- current->comm); -- - if (sqe->buf_index || sqe->splice_fd_in) - return -EINVAL; -
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 2ff50bda111e1adfbafd70658521dcaf0e8537ef Author: Mike Pagano gentoo org> AuthorDate: Mon Jun 5 11:48:34 2023 + Commit: Mike Pagano gentoo org> CommitDate: Mon Jun 5 11:48:34 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=2ff50bda Linux patch 6.1.32 Signed-off-by: Mike Pagano gentoo.org> _README |4 + 1031_linux-6.1.32.patch | 2421 +++ 2 files changed, 2425 insertions(+) diff --git a/_README b/_README index f6e14669..a242f865 100644 --- a/_README +++ b/_README @@ -163,6 +163,10 @@ Patch: 1030_linux-6.1.31.patch From: https://www.kernel.org Desc: Linux 6.1.31 +Patch: 1031_linux-6.1.32.patch +From: https://www.kernel.org +Desc: Linux 6.1.32 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1031_linux-6.1.32.patch b/1031_linux-6.1.32.patch new file mode 100644 index ..f4ef09a2 --- /dev/null +++ b/1031_linux-6.1.32.patch @@ -0,0 +1,2421 @@ +diff --git a/Makefile b/Makefile +index 902a6b598c73b..a0c3d8809e93a 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 31 ++SUBLEVEL = 32 + EXTRAVERSION = + NAME = Curry Ramen + +diff --git a/block/blk-map.c b/block/blk-map.c +index 34735626b00f3..66da9e2b19abf 100644 +--- a/block/blk-map.c b/block/blk-map.c +@@ -246,7 +246,7 @@ static struct bio *blk_rq_map_bio_alloc(struct request *rq, + { + struct bio *bio; + +- if (rq->cmd_flags & REQ_POLLED) { ++ if (rq->cmd_flags & REQ_POLLED && (nr_vecs <= BIO_INLINE_VECS)) { + blk_opf_t opf = rq->cmd_flags | REQ_ALLOC_CACHE; + + bio = bio_alloc_bioset(NULL, nr_vecs, opf, gfp_mask, +diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c +index 9eb968e14d31f..a80d7c62bdfe6 100644 +--- a/block/blk-mq-tag.c b/block/blk-mq-tag.c +@@ -41,16 +41,20 @@ void __blk_mq_tag_busy(struct blk_mq_hw_ctx *hctx) + { + unsigned int users; + ++ /* ++ * calling test_bit() prior to test_and_set_bit() is intentional, ++ * it avoids dirtying the cacheline if the queue is already active. ++ */ + if (blk_mq_is_shared_tags(hctx->flags)) { + struct request_queue *q = hctx->queue; + +- if (test_bit(QUEUE_FLAG_HCTX_ACTIVE, >queue_flags)) ++ if (test_bit(QUEUE_FLAG_HCTX_ACTIVE, >queue_flags) || ++ test_and_set_bit(QUEUE_FLAG_HCTX_ACTIVE, >queue_flags)) + return; +- set_bit(QUEUE_FLAG_HCTX_ACTIVE, >queue_flags); + } else { +- if (test_bit(BLK_MQ_S_TAG_ACTIVE, >state)) ++ if (test_bit(BLK_MQ_S_TAG_ACTIVE, >state) || ++ test_and_set_bit(BLK_MQ_S_TAG_ACTIVE, >state)) + return; +- set_bit(BLK_MQ_S_TAG_ACTIVE, >state); + } + + users = atomic_inc_return(>tags->active_queues); +diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c +index c17bd845f5fcb..f8d2bba9173d8 100644 +--- a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c +@@ -249,9 +249,8 @@ static int amd_pstate_verify(struct cpufreq_policy_data *policy) + return 0; + } + +-static int amd_pstate_target(struct cpufreq_policy *policy, +- unsigned int target_freq, +- unsigned int relation) ++static int amd_pstate_update_freq(struct cpufreq_policy *policy, ++unsigned int target_freq, bool fast_switch) + { + struct cpufreq_freqs freqs; + struct amd_cpudata *cpudata = policy->driver_data; +@@ -270,26 +269,50 @@ static int amd_pstate_target(struct cpufreq_policy *policy, + des_perf = DIV_ROUND_CLOSEST(target_freq * cap_perf, +cpudata->max_freq); + +- cpufreq_freq_transition_begin(policy, ); +- amd_pstate_update(cpudata, min_perf, des_perf, +-max_perf, false); +- cpufreq_freq_transition_end(policy, , false); ++ WARN_ON(fast_switch && !policy->fast_switch_enabled); ++ /* ++ * If fast_switch is desired, then there aren't any registered ++ * transition notifiers. See comment for ++ * cpufreq_enable_fast_switch(). ++ */ ++ if (!fast_switch) ++ cpufreq_freq_transition_begin(policy, ); ++ ++ amd_pstate_update(cpudata, min_perf, des_perf, max_perf, fast_switch); ++ ++ if (!fast_switch) ++ cpufreq_freq_transition_end(policy, , false); + + return 0; + } + ++static int amd_pstate_target(struct cpufreq_policy *policy, ++ unsigned int target_freq, ++ unsigned int relation) ++{ ++ return amd_pstate_update_freq(policy, target_freq,
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 02b803e1a984fd5e611a5146f52aef31b7a523c0 Author: Mike Pagano gentoo org> AuthorDate: Fri Jun 2 15:07:00 2023 + Commit: Mike Pagano gentoo org> CommitDate: Fri Jun 2 15:07:00 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=02b803e1 io_uring: undeprecate epoll_ctl support Signed-off-by: Mike Pagano gentoo.org> _README | 4 2100_io-uring-undeprecate-epoll-ctl-support.patch | 21 + 2 files changed, 25 insertions(+) diff --git a/_README b/_README index 68130982..f6e14669 100644 --- a/_README +++ b/_README @@ -179,6 +179,10 @@ Patch: 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch From: https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-mar...@holtmann.org/raw Desc: Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. See bug #686758 +Patch: 2100_io-uring-undeprecate-epoll-ctl-support.patch +From: https://patchwork.kernel.org/project/io-uring/patch/20230506095502.13401-1-i...@bnoordhuis.nl/ +Desc: io_uring: undeprecate epoll_ctl support + Patch: 2900_tmp513-Fix-build-issue-by-selecting-CONFIG_REG.patch From: https://bugs.gentoo.org/710790 Desc: tmp513 requies REGMAP_I2C to build. Select it by default in Kconfig. See bug #710790. Thanks to Phil Stracchino diff --git a/2100_io-uring-undeprecate-epoll-ctl-support.patch b/2100_io-uring-undeprecate-epoll-ctl-support.patch new file mode 100644 index ..4c3d3904 --- /dev/null +++ b/2100_io-uring-undeprecate-epoll-ctl-support.patch @@ -0,0 +1,21 @@ +io_uring: undeprecate epoll_ctl support + +--- + io_uring/epoll.c | 4 + 1 file changed, 4 deletions(-) + +diff --git a/io_uring/epoll.c b/io_uring/epoll.c +index 9aa74d2c80bc..89bff2068a19 100644 +--- a/io_uring/epoll.c b/io_uring/epoll.c +@@ -25,10 +25,6 @@ int io_epoll_ctl_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) + { + struct io_epoll *epoll = io_kiocb_to_cmd(req, struct io_epoll); + +- pr_warn_once("%s: epoll_ctl support in io_uring is deprecated and will " +- "be removed in a future Linux kernel version.\n", +- current->comm); +- + if (sqe->buf_index || sqe->splice_fd_in) + return -EINVAL; +
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: ca9160a5400fac4d1f0c0fb82f42c9c481e63aa3 Author: Mike Pagano gentoo org> AuthorDate: Thu May 11 16:07:47 2023 + Commit: Mike Pagano gentoo org> CommitDate: Thu May 11 16:07:47 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=ca9160a5 Remove redundant patch Removed: 1520_nf-tables-make-deleted-anon-sets-inactive.patch Signed-off-by: Mike Pagano gentoo.org> _README| 4 - ...nf-tables-make-deleted-anon-sets-inactive.patch | 121 - 2 files changed, 125 deletions(-) diff --git a/_README b/_README index c442268b..dd54d67d 100644 --- a/_README +++ b/_README @@ -163,10 +163,6 @@ Patch: 1510_fs-enable-link-security-restrictions-by-default.patch From: http://sources.debian.net/src/linux/3.16.7-ckt4-3/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch/ Desc: Enable link security restrictions by default. -Patch: 1520_fs-enable-link-security-restrictions-by-default.patch -From: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=c1592a89942e9678f7d9c8030efa777c0d57edab -Desc: netfilter: nf_tables: deactivate anonymous set from preparation phase - Patch: 1700_sparc-address-warray-bound-warnings.patch From: https://github.com/KSPP/linux/issues/109 Desc: Address -Warray-bounds warnings diff --git a/1520_nf-tables-make-deleted-anon-sets-inactive.patch b/1520_nf-tables-make-deleted-anon-sets-inactive.patch deleted file mode 100644 index cd75de5c.. --- a/1520_nf-tables-make-deleted-anon-sets-inactive.patch +++ /dev/null @@ -1,121 +0,0 @@ -From c1592a89942e9678f7d9c8030efa777c0d57edab Mon Sep 17 00:00:00 2001 -From: Pablo Neira Ayuso -Date: Tue, 2 May 2023 10:25:24 +0200 -Subject: netfilter: nf_tables: deactivate anonymous set from preparation phase - -Toggle deleted anonymous sets as inactive in the next generation, so -users cannot perform any update on it. Clear the generation bitmask -in case the transaction is aborted. - -The following KASAN splat shows a set element deletion for a bound -anonymous set that has been already removed in the same transaction. - -[ 64.921510] == -[ 64.923123] BUG: KASAN: wild-memory-access in nf_tables_commit+0xa24/0x1490 [nf_tables] -[ 64.924745] Write of size 8 at addr dead0122 by task test/890 -[ 64.927903] CPU: 3 PID: 890 Comm: test Not tainted 6.3.0+ #253 -[ 64.931120] Call Trace: -[ 64.932699] -[ 64.934292] dump_stack_lvl+0x33/0x50 -[ 64.935908] ? nf_tables_commit+0xa24/0x1490 [nf_tables] -[ 64.937551] kasan_report+0xda/0x120 -[ 64.939186] ? nf_tables_commit+0xa24/0x1490 [nf_tables] -[ 64.940814] nf_tables_commit+0xa24/0x1490 [nf_tables] -[ 64.942452] ? __kasan_slab_alloc+0x2d/0x60 -[ 64.944070] ? nf_tables_setelem_notify+0x190/0x190 [nf_tables] -[ 64.945710] ? kasan_set_track+0x21/0x30 -[ 64.947323] nfnetlink_rcv_batch+0x709/0xd90 [nfnetlink] -[ 64.948898] ? nfnetlink_rcv_msg+0x480/0x480 [nfnetlink] - -Signed-off-by: Pablo Neira Ayuso - include/net/netfilter/nf_tables.h | 1 + - net/netfilter/nf_tables_api.c | 12 - net/netfilter/nft_dynset.c| 2 +- - net/netfilter/nft_lookup.c| 2 +- - net/netfilter/nft_objref.c| 2 +- - 5 files changed, 16 insertions(+), 3 deletions(-) - -diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h -index 3ed21d2d56590..2e24ea1d744c2 100644 a/include/net/netfilter/nf_tables.h -+++ b/include/net/netfilter/nf_tables.h -@@ -619,6 +619,7 @@ struct nft_set_binding { - }; - - enum nft_trans_phase; -+void nf_tables_activate_set(const struct nft_ctx *ctx, struct nft_set *set); - void nf_tables_deactivate_set(const struct nft_ctx *ctx, struct nft_set *set, - struct nft_set_binding *binding, - enum nft_trans_phase phase); -diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c -index 8b6c61a2196cb..59fb8320ab4d7 100644 a/net/netfilter/nf_tables_api.c -+++ b/net/netfilter/nf_tables_api.c -@@ -5127,12 +5127,24 @@ static void nf_tables_unbind_set(const struct nft_ctx *ctx, struct nft_set *set, - } - } - -+void nf_tables_activate_set(const struct nft_ctx *ctx, struct nft_set *set) -+{ -+ if (nft_set_is_anonymous(set)) -+ nft_clear(ctx->net, set); -+ -+ set->use++; -+} -+EXPORT_SYMBOL_GPL(nf_tables_activate_set); -+ - void nf_tables_deactivate_set(const struct nft_ctx *ctx, struct nft_set *set, - struct nft_set_binding *binding, - enum nft_trans_phase phase) - { - switch (phase) { - case NFT_TRANS_PREPARE: -+ if (nft_set_is_anonymous(set)) -+ nft_deactivate_next(ctx->net, set); -+ - set->use--; -
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: c2a4766b45c38541eebdfb6ce7b55bcce87c962d Author: Mike Pagano gentoo org> AuthorDate: Wed May 10 17:53:24 2023 + Commit: Mike Pagano gentoo org> CommitDate: Wed May 10 17:53:24 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=c2a4766b netfilter: nf_tables: deactivate anonymous set from preparation phase Bug: https://bugs.gentoo.org/90606 Signed-off-by: Mike Pagano gentoo.org> _README| 4 + ...nf-tables-make-deleted-anon-sets-inactive.patch | 121 + 2 files changed, 125 insertions(+) diff --git a/_README b/_README index 5e14a47f..1f28562c 100644 --- a/_README +++ b/_README @@ -159,6 +159,10 @@ Patch: 1510_fs-enable-link-security-restrictions-by-default.patch From: http://sources.debian.net/src/linux/3.16.7-ckt4-3/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch/ Desc: Enable link security restrictions by default. +Patch: 1520_fs-enable-link-security-restrictions-by-default.patch +From: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=c1592a89942e9678f7d9c8030efa777c0d57edab +Desc: netfilter: nf_tables: deactivate anonymous set from preparation phase + Patch: 1700_sparc-address-warray-bound-warnings.patch From: https://github.com/KSPP/linux/issues/109 Desc: Address -Warray-bounds warnings diff --git a/1520_nf-tables-make-deleted-anon-sets-inactive.patch b/1520_nf-tables-make-deleted-anon-sets-inactive.patch new file mode 100644 index ..cd75de5c --- /dev/null +++ b/1520_nf-tables-make-deleted-anon-sets-inactive.patch @@ -0,0 +1,121 @@ +From c1592a89942e9678f7d9c8030efa777c0d57edab Mon Sep 17 00:00:00 2001 +From: Pablo Neira Ayuso +Date: Tue, 2 May 2023 10:25:24 +0200 +Subject: netfilter: nf_tables: deactivate anonymous set from preparation phase + +Toggle deleted anonymous sets as inactive in the next generation, so +users cannot perform any update on it. Clear the generation bitmask +in case the transaction is aborted. + +The following KASAN splat shows a set element deletion for a bound +anonymous set that has been already removed in the same transaction. + +[ 64.921510] == +[ 64.923123] BUG: KASAN: wild-memory-access in nf_tables_commit+0xa24/0x1490 [nf_tables] +[ 64.924745] Write of size 8 at addr dead0122 by task test/890 +[ 64.927903] CPU: 3 PID: 890 Comm: test Not tainted 6.3.0+ #253 +[ 64.931120] Call Trace: +[ 64.932699] +[ 64.934292] dump_stack_lvl+0x33/0x50 +[ 64.935908] ? nf_tables_commit+0xa24/0x1490 [nf_tables] +[ 64.937551] kasan_report+0xda/0x120 +[ 64.939186] ? nf_tables_commit+0xa24/0x1490 [nf_tables] +[ 64.940814] nf_tables_commit+0xa24/0x1490 [nf_tables] +[ 64.942452] ? __kasan_slab_alloc+0x2d/0x60 +[ 64.944070] ? nf_tables_setelem_notify+0x190/0x190 [nf_tables] +[ 64.945710] ? kasan_set_track+0x21/0x30 +[ 64.947323] nfnetlink_rcv_batch+0x709/0xd90 [nfnetlink] +[ 64.948898] ? nfnetlink_rcv_msg+0x480/0x480 [nfnetlink] + +Signed-off-by: Pablo Neira Ayuso +--- + include/net/netfilter/nf_tables.h | 1 + + net/netfilter/nf_tables_api.c | 12 + net/netfilter/nft_dynset.c| 2 +- + net/netfilter/nft_lookup.c| 2 +- + net/netfilter/nft_objref.c| 2 +- + 5 files changed, 16 insertions(+), 3 deletions(-) + +diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h +index 3ed21d2d56590..2e24ea1d744c2 100644 +--- a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h +@@ -619,6 +619,7 @@ struct nft_set_binding { + }; + + enum nft_trans_phase; ++void nf_tables_activate_set(const struct nft_ctx *ctx, struct nft_set *set); + void nf_tables_deactivate_set(const struct nft_ctx *ctx, struct nft_set *set, + struct nft_set_binding *binding, + enum nft_trans_phase phase); +diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c +index 8b6c61a2196cb..59fb8320ab4d7 100644 +--- a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c +@@ -5127,12 +5127,24 @@ static void nf_tables_unbind_set(const struct nft_ctx *ctx, struct nft_set *set, + } + } + ++void nf_tables_activate_set(const struct nft_ctx *ctx, struct nft_set *set) ++{ ++ if (nft_set_is_anonymous(set)) ++ nft_clear(ctx->net, set); ++ ++ set->use++; ++} ++EXPORT_SYMBOL_GPL(nf_tables_activate_set); ++ + void nf_tables_deactivate_set(const struct nft_ctx *ctx, struct nft_set *set, + struct nft_set_binding *binding, + enum nft_trans_phase phase) + { + switch (phase) { + case NFT_TRANS_PREPARE: ++ if (nft_set_is_anonymous(set)) ++ nft_deactivate_next(ctx->net, set); ++ +
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 0e55467b3ca9ea55712b0ccee496a00d8a5c007f Author: Mike Pagano gentoo org> AuthorDate: Wed May 10 16:11:31 2023 + Commit: Mike Pagano gentoo org> CommitDate: Wed May 10 16:11:31 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=0e55467b sched/alt: Remove psi support Bug: https://bugs.gentoo.org/904514 Signed-off-by: Mike Pagano gentoo.org> _README | 4 ++ 5022_BMQ-and-PDS-remove-psi-support.patch | 94 +++ 2 files changed, 98 insertions(+) diff --git a/_README b/_README index 92e8a587..5e14a47f 100644 --- a/_README +++ b/_README @@ -206,3 +206,7 @@ Desc: BMQ(BitMap Queue) Scheduler. A new CPU scheduler developed from PDS(incl Patch: 5021_BMQ-and-PDS-gentoo-defaults.patch From: https://gitweb.gentoo.org/proj/linux-patches.git/ Desc: Set defaults for BMQ. Add archs as people test, default to N + +Patch: 5022_BMQ-and-PDS-remove-psi-support.patch +From: https://gitweb.gentoo.org/proj/linux-patches.git/ +Desc: Sched/alt: Remove psi support diff --git a/5022_BMQ-and-PDS-remove-psi-support.patch b/5022_BMQ-and-PDS-remove-psi-support.patch new file mode 100644 index ..4390e2d5 --- /dev/null +++ b/5022_BMQ-and-PDS-remove-psi-support.patch @@ -0,0 +1,94 @@ +From 542887ccaeadc65843ec171bccc87f8aa8bbca95 Mon Sep 17 00:00:00 2001 +From: Alfred Chen +Date: Wed, 26 Apr 2023 16:38:14 + +Subject: [PATCH] sched/alt: Remove psi support + +There are issues(#70, #72, #79) with psi support. Removing the +support of psi as it doesn't bring much gain. +--- + init/Kconfig | 1 + + kernel/sched/alt_core.c | 8 + kernel/sched/alt_sched.h | 1 - + 3 files changed, 1 insertion(+), 9 deletions(-) + +diff --git a/init/Kconfig b/init/Kconfig +index 454f792df9dd..dff86592555a 100644 +--- a/init/Kconfig b/init/Kconfig +@@ -629,6 +629,7 @@ config TASK_IO_ACCOUNTING + + config PSI + bool "Pressure stall information tracking" ++ depends on !SCHED_ALT + help + Collect metrics that indicate how overcommitted the CPU, memory, + and IO capacity are in the system. +diff --git a/kernel/sched/alt_core.c b/kernel/sched/alt_core.c +index af4d840d4bb7..37dfdc41d2a7 100644 +--- a/kernel/sched/alt_core.c b/kernel/sched/alt_core.c +@@ -588,7 +588,6 @@ static void update_rq_clock_task(struct rq *rq, s64 delta) + + rq->prev_irq_time += irq_delta; + delta -= irq_delta; +- psi_account_irqtime(rq->curr, irq_delta); + #endif + #ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING + if (static_key_false((_steal_rq_enabled))) { +@@ -769,7 +768,6 @@ unsigned long get_wchan(struct task_struct *p) + */ + #define __SCHED_DEQUEUE_TASK(p, rq, flags, func) \ + sched_info_dequeue(rq, p); \ +- psi_dequeue(p, flags & DEQUEUE_SLEEP); \ + \ + list_del(>sq_node); \ + if (list_empty(>queue.heads[p->sq_idx])) { \ +@@ -779,7 +777,6 @@ unsigned long get_wchan(struct task_struct *p) + + #define __SCHED_ENQUEUE_TASK(p, rq, flags)\ + sched_info_enqueue(rq, p); \ +- psi_enqueue(p, flags & ENQUEUE_WAKEUP); \ + \ + p->sq_idx = task_sched_prio_idx(p, rq); \ + list_add_tail(>sq_node, >queue.heads[p->sq_idx]);\ +@@ -2954,7 +2951,6 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, + } + + wake_flags |= WF_MIGRATED; +- psi_ttwu_dequeue(p); + set_task_cpu(p, cpu); + } + #else +@@ -4828,8 +4824,6 @@ static void __sched notrace __schedule(unsigned int sched_mode) +*/ + ++*switch_count; + +- psi_sched_switch(prev, next, !task_on_rq_queued(prev)); +- + trace_sched_switch(sched_mode & SM_MASK_PREEMPT, prev, next, prev_state); + + /* Also unlocks the rq: */ +@@ -7689,8 +7683,6 @@ void __init sched_init(void) + sched_init_topology_cpumask_early(); + #endif /* SMP */ + +- psi_init(); +- + preempt_dynamic_init(); + } + +diff --git a/kernel/sched/alt_sched.h b/kernel/sched/alt_sched.h +index 9fe45bf0cedf..55a15b806e87 100644 +--- a/kernel/sched/alt_sched.h b/kernel/sched/alt_sched.h +@@ -3,7 +3,6 @@ + + #include + #include +-#include + #include + #include + #include +-- +GitLab +
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 2a437e58f60cda8d56e9fc7d09c27b88d0f319f6 Author: Alice Ferrazzi gentoo org> AuthorDate: Sun Apr 30 23:50:47 2023 + Commit: Alice Ferrazzi gentoo org> CommitDate: Sun Apr 30 23:50:47 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=2a437e58 Linux patch 6.1.27 Signed-off-by: Alice Ferrazzi gentoo.org> _README | 4 + 1026_linux-6.1.27.patch | 914 2 files changed, 918 insertions(+) diff --git a/_README b/_README index 2dab4c18..92e8a587 100644 --- a/_README +++ b/_README @@ -147,6 +147,10 @@ Patch: 1025_linux-6.1.26.patch From: https://www.kernel.org Desc: Linux 6.1.26 +Patch: 1026_linux-6.1.27.patch +From: https://www.kernel.org +Desc: Linux 6.1.27 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1026_linux-6.1.27.patch b/1026_linux-6.1.27.patch new file mode 100644 index ..be1b81be --- /dev/null +++ b/1026_linux-6.1.27.patch @@ -0,0 +1,914 @@ +diff --git a/Documentation/riscv/vm-layout.rst b/Documentation/riscv/vm-layout.rst +index 5b36e45fef60b..edb5331287126 100644 +--- a/Documentation/riscv/vm-layout.rst b/Documentation/riscv/vm-layout.rst +@@ -47,7 +47,7 @@ RISC-V Linux Kernel SV39 + | Kernel-space virtual memory, shared between all processes: + |___ + || | | +- ffc6fee0 | -228GB | ffc6feff |2 MB | fixmap ++ ffc6fea0 | -228GB | ffc6feff |6 MB | fixmap +ffc6ff00 | -228GB | ffc6 | 16 MB | PCI io +ffc7 | -228GB | ffc7 |4 GB | vmemmap +ffc8 | -224GB | ffd7 | 64 GB | vmalloc/ioremap space +@@ -83,7 +83,7 @@ RISC-V Linux Kernel SV48 + | Kernel-space virtual memory, shared between all processes: + |___ + || | | +- 8d7ffee0 | -114.5 TB | 8d7ffeff |2 MB | fixmap ++ 8d7ffea0 | -114.5 TB | 8d7ffeff |6 MB | fixmap +8d7fff00 | -114.5 TB | 8d7f | 16 MB | PCI io +8d80 | -114.5 TB | 8f7f |2 TB | vmemmap +8f80 | -112.5 TB | af7f | 32 TB | vmalloc/ioremap space +diff --git a/Makefile b/Makefile +index d2eff3747f2f7..a5cfcd0a85a9e 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 26 ++SUBLEVEL = 27 + EXTRAVERSION = + NAME = Hurr durr I'ma ninja sloth + +diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c +index 019472dd98ff7..54ccdcc2dbdf7 100644 +--- a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c +@@ -1178,6 +1178,20 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, + return -EFAULT; + } + ++ /* ++ * Permission faults just need to update the existing leaf entry, ++ * and so normally don't require allocations from the memcache. The ++ * only exception to this is when dirty logging is enabled at runtime ++ * and a write fault needs to collapse a block entry into a table. ++ */ ++ if (fault_status != FSC_PERM || ++ (logging_active && write_fault)) { ++ ret = kvm_mmu_topup_memory_cache(memcache, ++ kvm_mmu_cache_min_pages(kvm)); ++ if (ret) ++ return ret; ++ } ++ + /* +* Let's check if we will get back a huge page backed by hugetlbfs, or +* get block mapping for device MMIO region. +@@ -1234,36 +1248,17 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, + fault_ipa &= ~(vma_pagesize - 1); + + gfn = fault_ipa >> PAGE_SHIFT; +- mmap_read_unlock(current->mm); +- +- /* +- * Permission faults just need to update the existing leaf entry, +- * and so normally don't require allocations from the memcache. The +- * only exception to this is when dirty logging is enabled at runtime +- * and a write fault needs to collapse a block entry into a table. +- */ +- if (fault_status != FSC_PERM || (logging_active && write_fault)) { +- ret = kvm_mmu_topup_memory_cache(memcache, +- kvm_mmu_cache_min_pages(kvm)); +- if (ret) +-
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 9d02faaed4123c2992080e3366d6b7caa044c9ce Author: Mike Pagano gentoo org> AuthorDate: Wed Apr 26 13:19:39 2023 + Commit: Mike Pagano gentoo org> CommitDate: Wed Apr 26 13:19:39 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=9d02faae Linux patch 6.1.26 Signed-off-by: Mike Pagano gentoo.org> _README |4 + 1025_linux-6.1.26.patch | 3310 +++ 2 files changed, 3314 insertions(+) diff --git a/_README b/_README index 7c4d9865..2dab4c18 100644 --- a/_README +++ b/_README @@ -143,6 +143,10 @@ Patch: 1024_linux-6.1.25.patch From: https://www.kernel.org Desc: Linux 6.1.25 +Patch: 1025_linux-6.1.26.patch +From: https://www.kernel.org +Desc: Linux 6.1.26 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1025_linux-6.1.26.patch b/1025_linux-6.1.26.patch new file mode 100644 index ..f8f558ac --- /dev/null +++ b/1025_linux-6.1.26.patch @@ -0,0 +1,3310 @@ +diff --git a/Makefile b/Makefile +index 1a4c4af370db8..d2eff3747f2f7 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 25 ++SUBLEVEL = 26 + EXTRAVERSION = + NAME = Hurr durr I'ma ninja sloth + +diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi +index 2ca76b69add78..511ca864c1b2d 100644 +--- a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi +@@ -942,7 +942,7 @@ + status = "disabled"; + }; + +- spdif: sound@ff88b { ++ spdif: sound@ff8b { + compatible = "rockchip,rk3288-spdif", "rockchip,rk3066-spdif"; + reg = <0x0 0xff8b 0x0 0x1>; + #sound-dai-cells = <0>; +diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +index 131a8a5a9f5a0..88b848c65b0d2 100644 +--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +@@ -1571,10 +1571,9 @@ + + dmc: bus@38000 { + compatible = "simple-bus"; +- reg = <0x0 0x38000 0x0 0x400>; + #address-cells = <2>; + #size-cells = <2>; +- ranges = <0x0 0x0 0x0 0x38000 0x0 0x400>; ++ ranges = <0x0 0x0 0x0 0x38000 0x0 0x2000>; + + canvas: video-lut@48 { + compatible = "amlogic,canvas"; +diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi +index 7d6317d95b131..1dd0617477fdf 100644 +--- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi +@@ -193,7 +193,7 @@ + rohm,reset-snvs-powered; + + #clock-cells = <0>; +- clocks = <_32k 0>; ++ clocks = <_32k>; + clock-output-names = "clk-32k-out"; + + regulators { +diff --git a/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi +index 59445f916d7fa..b4aef79650c69 100644 +--- a/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi +@@ -95,7 +95,7 @@ + compatible = "regulator-fixed"; + enable-active-high; + gpio = < 20 GPIO_ACTIVE_HIGH>; /* PMIC_EN_ETH */ +- off-on-delay = <50>; ++ off-on-delay-us = <50>; + pinctrl-names = "default"; + pinctrl-0 = <_reg_eth>; + regulator-always-on; +@@ -135,7 +135,7 @@ + enable-active-high; + /* Verdin SD_1_PWR_EN (SODIMM 76) */ + gpio = < 5 GPIO_ACTIVE_HIGH>; +- off-on-delay = <10>; ++ off-on-delay-us = <10>; + pinctrl-names = "default"; + pinctrl-0 = <_usdhc2_pwr_en>; + regulator-max-microvolt = <330>; +diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin-dev.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-verdin-dev.dtsi +index cefabe65b2520..c8b521d45fca1 100644 +--- a/arch/arm64/boot/dts/freescale/imx8mp-verdin-dev.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-verdin-dev.dtsi +@@ -12,7 +12,7 @@ + compatible = "regulator-fixed"; + enable-active-high; + gpio = <_expander_21 4 GPIO_ACTIVE_HIGH>; /* ETH_PWR_EN */ +- off-on-delay = <50>; ++ off-on-delay-us = <50>; + regulator-max-microvolt = <330>; + regulator-min-microvolt = <330>; + regulator-name =
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 62cea8d31c808e0c987542d8c03499614e657b30 Author: Mike Pagano gentoo org> AuthorDate: Thu Mar 30 20:52:42 2023 + Commit: Mike Pagano gentoo org> CommitDate: Thu Mar 30 20:52:42 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=62cea8d3 Update namespace user.pax.* on tmpfs patch Bug: https://bugs.gentoo.org/show_bug.cgi?id=903513 Signed-off-by: Mike Pagano gentoo.org> 1500_XATTR_USER_PREFIX.patch | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/1500_XATTR_USER_PREFIX.patch b/1500_XATTR_USER_PREFIX.patch index fac3eed7..1d1a9301 100644 --- a/1500_XATTR_USER_PREFIX.patch +++ b/1500_XATTR_USER_PREFIX.patch @@ -26,12 +26,12 @@ the XATTR_PAX flags preserved. +#define XATTR_NAME_PAX_FLAGS XATTR_PAX_PREFIX XATTR_PAX_FLAGS_SUFFIX #endif /* _UAPI_LINUX_XATTR_H */ a/mm/shmem.c 2022-11-22 05:57:29.011626215 -0500 -+++ b/mm/shmem.c 2022-11-22 06:03:33.165939400 -0500 -@@ -3297,6 +3297,14 @@ static int shmem_xattr_handler_set(const - struct shmem_inode_info *info = SHMEM_I(inode); +--- a/mm/shmem.c 2023-03-29 18:54:52.431866914 -0400 b/mm/shmem.c 2023-03-29 18:57:55.145689335 -0400 +@@ -3310,6 +3310,14 @@ static int shmem_xattr_handler_set(const int err; + name = xattr_full_name(handler, name); + + if (!strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)) { + if (strcmp(name, XATTR_NAME_PAX_FLAGS)) @@ -40,10 +40,10 @@ the XATTR_PAX flags preserved. + return -EINVAL; + } + - name = xattr_full_name(handler, name); err = simple_xattr_set(>xattrs, name, value, size, flags, NULL); if (!err) { -@@ -3312,6 +3320,12 @@ static const struct xattr_handler shmem_ + inode->i_ctime = current_time(inode); +@@ -3324,6 +3332,12 @@ static const struct xattr_handler shmem_ .set = shmem_xattr_handler_set, }; @@ -56,7 +56,7 @@ the XATTR_PAX flags preserved. static const struct xattr_handler shmem_trusted_xattr_handler = { .prefix = XATTR_TRUSTED_PREFIX, .get = shmem_xattr_handler_get, -@@ -3325,6 +3339,7 @@ static const struct xattr_handler *shmem +@@ -3337,6 +3351,7 @@ static const struct xattr_handler *shmem #endif _security_xattr_handler, _trusted_xattr_handler,
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 3bfe7b2e69232e514f1e7d6f7ed8302bf4878467 Author: Mike Pagano gentoo org> AuthorDate: Tue Mar 21 12:58:39 2023 + Commit: Mike Pagano gentoo org> CommitDate: Tue Mar 21 13:31:49 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=3bfe7b2e Fix config change from X86_X32 to X86_X32_ABI Thanks to Frank Limpert Bug: https://bugs.gentoo.org/902443 Signed-off-by: Mike Pagano gentoo.org> 4567_distro-Gentoo-Kconfig.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/4567_distro-Gentoo-Kconfig.patch b/4567_distro-Gentoo-Kconfig.patch index 9e0701dd..9cb1eb0c 100644 --- a/4567_distro-Gentoo-Kconfig.patch +++ b/4567_distro-Gentoo-Kconfig.patch @@ -185,7 +185,7 @@ +config GENTOO_KERNEL_SELF_PROTECTION_COMMON + bool "Enable Kernel Self Protection Project Recommendations" + -+ depends on GENTOO_LINUX && !ACPI_CUSTOM_METHOD && !COMPAT_BRK && !PROC_KCORE && !COMPAT_VDSO && !KEXEC && !HIBERNATION && !LEGACY_PTYS && !X86_X32 && !MODIFY_LDT_SYSCALL && GCC_PLUGINS && !IOMMU_DEFAULT_DMA_LAZY && !IOMMU_DEFAULT_PASSTHROUGH && IOMMU_DEFAULT_DMA_STRICT && SECURITY && !ARCH_EPHEMERAL_INODES && RANDSTRUCT_PERFORMANCE ++ depends on GENTOO_LINUX && !ACPI_CUSTOM_METHOD && !COMPAT_BRK && !PROC_KCORE && !COMPAT_VDSO && !KEXEC && !HIBERNATION && !LEGACY_PTYS && !X86_X32_ABI && !MODIFY_LDT_SYSCALL && GCC_PLUGINS && !IOMMU_DEFAULT_DMA_LAZY && !IOMMU_DEFAULT_PASSTHROUGH && IOMMU_DEFAULT_DMA_STRICT && SECURITY && !ARCH_EPHEMERAL_INODES && RANDSTRUCT_PERFORMANCE + + select BUG + select STRICT_KERNEL_RWX
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: dc5364316903f1ae5699ba6756944fdb1d6a2dde Author: Alice Ferrazzi gentoo org> AuthorDate: Mon Mar 13 10:45:23 2023 + Commit: Alice Ferrazzi gentoo org> CommitDate: Mon Mar 13 10:45:23 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=dc536431 Linux patch 6.1.19 Signed-off-by: Alice Ferrazzi gentoo.org> _README | 4 + 1018_linux-6.1.19.patch | 264 2 files changed, 268 insertions(+) diff --git a/_README b/_README index e3d2c14c..3728b6a9 100644 --- a/_README +++ b/_README @@ -115,6 +115,10 @@ Patch: 1017_linux-6.1.18.patch From: https://www.kernel.org Desc: Linux 6.1.18 +Patch: 1018_linux-6.1.19.patch +From: https://www.kernel.org +Desc: Linux 6.1.19 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1018_linux-6.1.19.patch b/1018_linux-6.1.19.patch new file mode 100644 index ..617404d5 --- /dev/null +++ b/1018_linux-6.1.19.patch @@ -0,0 +1,264 @@ +diff --git a/Makefile b/Makefile +index a825361f71625..ea18c4c20738c 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 18 ++SUBLEVEL = 19 + EXTRAVERSION = + NAME = Hurr durr I'ma ninja sloth + +diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c +index 783d65fc71f07..409682d063098 100644 +--- a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c +@@ -507,6 +507,63 @@ static int tpm_add_legacy_sysfs(struct tpm_chip *chip) + return 0; + } + ++/* ++ * Some AMD fTPM versions may cause stutter ++ * https://www.amd.com/en/support/kb/faq/pa-410 ++ * ++ * Fixes are available in two series of fTPM firmware: ++ * 6.x.y.z series: 6.0.18.6 + ++ * 3.x.y.z series: 3.57.y.5 + ++ */ ++static bool tpm_amd_is_rng_defective(struct tpm_chip *chip) ++{ ++ u32 val1, val2; ++ u64 version; ++ int ret; ++ ++ if (!(chip->flags & TPM_CHIP_FLAG_TPM2)) ++ return false; ++ ++ ret = tpm_request_locality(chip); ++ if (ret) ++ return false; ++ ++ ret = tpm2_get_tpm_pt(chip, TPM2_PT_MANUFACTURER, , NULL); ++ if (ret) ++ goto release; ++ if (val1 != 0x414D4400U /* AMD */) { ++ ret = -ENODEV; ++ goto release; ++ } ++ ret = tpm2_get_tpm_pt(chip, TPM2_PT_FIRMWARE_VERSION_1, , NULL); ++ if (ret) ++ goto release; ++ ret = tpm2_get_tpm_pt(chip, TPM2_PT_FIRMWARE_VERSION_2, , NULL); ++ ++release: ++ tpm_relinquish_locality(chip); ++ ++ if (ret) ++ return false; ++ ++ version = ((u64)val1 << 32) | val2; ++ if ((version >> 48) == 6) { ++ if (version >= 0x000600180006ULL) ++ return false; ++ } else if ((version >> 48) == 3) { ++ if (version >= 0x000300570005ULL) ++ return false; ++ } else { ++ return false; ++ } ++ ++ dev_warn(>dev, ++ "AMD fTPM version 0x%llx causes system stutter; hwrng disabled\n", ++ version); ++ ++ return true; ++} ++ + static int tpm_hwrng_read(struct hwrng *rng, void *data, size_t max, bool wait) + { + struct tpm_chip *chip = container_of(rng, struct tpm_chip, hwrng); +@@ -516,7 +573,8 @@ static int tpm_hwrng_read(struct hwrng *rng, void *data, size_t max, bool wait) + + static int tpm_add_hwrng(struct tpm_chip *chip) + { +- if (!IS_ENABLED(CONFIG_HW_RANDOM_TPM) || tpm_is_firmware_upgrade(chip)) ++ if (!IS_ENABLED(CONFIG_HW_RANDOM_TPM) || tpm_is_firmware_upgrade(chip) || ++ tpm_amd_is_rng_defective(chip)) + return 0; + + snprintf(chip->hwrng_name, sizeof(chip->hwrng_name), +diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h +index 24ee4e1cc452a..830014a266090 100644 +--- a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h +@@ -150,6 +150,79 @@ enum tpm_sub_capabilities { + TPM_CAP_PROP_TIS_DURATION = 0x120, + }; + ++enum tpm2_pt_props { ++ TPM2_PT_NONE = 0x, ++ TPM2_PT_GROUP = 0x0100, ++ TPM2_PT_FIXED = TPM2_PT_GROUP * 1, ++ TPM2_PT_FAMILY_INDICATOR = TPM2_PT_FIXED + 0, ++ TPM2_PT_LEVEL = TPM2_PT_FIXED + 1, ++ TPM2_PT_REVISION = TPM2_PT_FIXED + 2, ++ TPM2_PT_DAY_OF_YEAR = TPM2_PT_FIXED + 3, ++ TPM2_PT_YEAR = TPM2_PT_FIXED + 4, ++ TPM2_PT_MANUFACTURER = TPM2_PT_FIXED + 5, ++ TPM2_PT_VENDOR_STRING_1 = TPM2_PT_FIXED + 6, ++ TPM2_PT_VENDOR_STRING_2 = TPM2_PT_FIXED + 7, ++ TPM2_PT_VENDOR_STRING_3 = TPM2_PT_FIXED + 8, ++ TPM2_PT_VENDOR_STRING_4 = TPM2_PT_FIXED + 9, ++ TPM2_PT_VENDOR_TPM_TYPE = TPM2_PT_FIXED + 10, ++ TPM2_PT_FIRMWARE_VERSION_1 = TPM2_PT_FIXED + 11, ++ TPM2_PT_FIRMWARE_VERSION_2 = TPM2_PT_FIXED + 12, ++
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 9399b06afe40f694ceac26c67c236144f76a5274 Author: Mike Pagano gentoo org> AuthorDate: Sat Mar 11 11:19:31 2023 + Commit: Mike Pagano gentoo org> CommitDate: Sat Mar 11 11:19:31 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=9399b06a Linux patch 6.1.17 Signed-off-by: Mike Pagano gentoo.org> _README | 4 ++ 1016_linux-6.1.17.patch | 123 2 files changed, 127 insertions(+) diff --git a/_README b/_README index aab72b3b..e2811191 100644 --- a/_README +++ b/_README @@ -107,6 +107,10 @@ Patch: 1015_linux-6.1.16.patch From: https://www.kernel.org Desc: Linux 6.1.16 +Patch: 1016_linux-6.1.17.patch +From: https://www.kernel.org +Desc: Linux 6.1.17 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1016_linux-6.1.17.patch b/1016_linux-6.1.17.patch new file mode 100644 index ..fb9f6cec --- /dev/null +++ b/1016_linux-6.1.17.patch @@ -0,0 +1,123 @@ +diff --git a/Makefile b/Makefile +index 5ac6895229e9c..db482a420dcaf 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 16 ++SUBLEVEL = 17 + EXTRAVERSION = + NAME = Hurr durr I'ma ninja sloth + +diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c +index f8b21bead6552..7c91d9195da8d 100644 +--- a/block/blk-cgroup.c b/block/blk-cgroup.c +@@ -87,32 +87,14 @@ static void blkg_free_workfn(struct work_struct *work) + { + struct blkcg_gq *blkg = container_of(work, struct blkcg_gq, +free_work); +- struct request_queue *q = blkg->q; + int i; + +- /* +- * pd_free_fn() can also be called from blkcg_deactivate_policy(), +- * in order to make sure pd_free_fn() is called in order, the deletion +- * of the list blkg->q_node is delayed to here from blkg_destroy(), and +- * blkcg_mutex is used to synchronize blkg_free_workfn() and +- * blkcg_deactivate_policy(). +- */ +- if (q) +- mutex_lock(>blkcg_mutex); +- + for (i = 0; i < BLKCG_MAX_POLS; i++) + if (blkg->pd[i]) + blkcg_policy[i]->pd_free_fn(blkg->pd[i]); + +- if (blkg->parent) +- blkg_put(blkg->parent); +- +- if (q) { +- list_del_init(>q_node); +- mutex_unlock(>blkcg_mutex); +- blk_put_queue(q); +- } +- ++ if (blkg->q) ++ blk_put_queue(blkg->q); + free_percpu(blkg->iostat_cpu); + percpu_ref_exit(>refcnt); + kfree(blkg); +@@ -145,6 +127,8 @@ static void __blkg_release(struct rcu_head *rcu) + + /* release the blkcg and parent blkg refs this blkg has been holding */ + css_put(>blkcg->css); ++ if (blkg->parent) ++ blkg_put(blkg->parent); + blkg_free(blkg); + } + +@@ -441,14 +425,9 @@ static void blkg_destroy(struct blkcg_gq *blkg) + lockdep_assert_held(>q->queue_lock); + lockdep_assert_held(>lock); + +- /* +- * blkg stays on the queue list until blkg_free_workfn(), see details in +- * blkg_free_workfn(), hence this function can be called from +- * blkcg_destroy_blkgs() first and again from blkg_destroy_all() before +- * blkg_free_workfn(). +- */ +- if (hlist_unhashed(>blkcg_node)) +- return; ++ /* Something wrong if we are trying to remove same group twice */ ++ WARN_ON_ONCE(list_empty(>q_node)); ++ WARN_ON_ONCE(hlist_unhashed(>blkcg_node)); + + for (i = 0; i < BLKCG_MAX_POLS; i++) { + struct blkcg_policy *pol = blkcg_policy[i]; +@@ -460,6 +439,7 @@ static void blkg_destroy(struct blkcg_gq *blkg) + blkg->online = false; + + radix_tree_delete(>blkg_tree, blkg->q->id); ++ list_del_init(>q_node); + hlist_del_init_rcu(>blkcg_node); + + /* +@@ -1246,7 +1226,6 @@ int blkcg_init_disk(struct gendisk *disk) + int ret; + + INIT_LIST_HEAD(>blkg_list); +- mutex_init(>blkcg_mutex); + + new_blkg = blkg_alloc(_root, disk, GFP_KERNEL); + if (!new_blkg) +@@ -1484,7 +1463,6 @@ void blkcg_deactivate_policy(struct request_queue *q, + if (queue_is_mq(q)) + blk_mq_freeze_queue(q); + +- mutex_lock(>blkcg_mutex); + spin_lock_irq(>queue_lock); + + __clear_bit(pol->plid, q->blkcg_pols); +@@ -1503,7 +1481,6 @@ void blkcg_deactivate_policy(struct request_queue *q, + } + + spin_unlock_irq(>queue_lock); +- mutex_unlock(>blkcg_mutex); + + if (queue_is_mq(q)) + blk_mq_unfreeze_queue(q); +diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h +index 1680b6e1e5362..891f8cbcd0436 100644 +--- a/include/linux/blkdev.h b/include/linux/blkdev.h +@@ -487,7
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 26d009b2414a6db78ba638c98a35d8fa1874665a Author: Mike Pagano gentoo org> AuthorDate: Fri Mar 10 12:57:30 2023 + Commit: Mike Pagano gentoo org> CommitDate: Fri Mar 10 12:57:30 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=26d009b2 Remove redundant patch Removed: 2940_gcc-plugins-drop-std-gnu-plus-plus-to-fix-GCC-13-build.patch Signed-off-by: Mike Pagano gentoo.org> _README| 4 -- ...rop-std-gnu-plus-plus-to-fix-GCC-13-build.patch | 46 -- 2 files changed, 50 deletions(-) diff --git a/_README b/_README index f2ba9399..aab72b3b 100644 --- a/_README +++ b/_README @@ -139,10 +139,6 @@ Patch: 2930_gcc-plugins-Reorg-gimple-incs-for-gcc-13.patch From: https://lore.kernel.org/lkml/mhng-8bc81919-3023-4d72-bd44-2443606b4fd7@palmer-ri-x1c9a/T/ Desc: gcc-plugins: Reorganize gimple includes for GCC 13 -Patch: 2940_gcc-plugins-drop-std-gnu-plus-plus-to-fix-GCC-13-build.patch -From: https://lore.kernel.org/all/20230201230009.2252783-1-...@gentoo.org/ -Desc: gcc-plugins: drop -std=gnu++11 to fix GCC 13 build - Patch: 3000_Support-printing-firmware-info.patch From: https://bugs.gentoo.org/732852 Desc: Print firmware info (Reqs CONFIG_GENTOO_PRINT_FIRMWARE_INFO). Thanks to Georgy Yakovlev diff --git a/2940_gcc-plugins-drop-std-gnu-plus-plus-to-fix-GCC-13-build.patch b/2940_gcc-plugins-drop-std-gnu-plus-plus-to-fix-GCC-13-build.patch deleted file mode 100644 index 55797805.. --- a/2940_gcc-plugins-drop-std-gnu-plus-plus-to-fix-GCC-13-build.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 5a6b64adc18d9adfb497a529ff004d59b6df151f Mon Sep 17 00:00:00 2001 -From: Sam James -Date: Wed, 1 Feb 2023 23:00:09 + -Subject: gcc-plugins: drop -std=gnu++11 to fix GCC 13 build - -The latest GCC 13 snapshot (13.0.1 20230129) gives the following: -``` -cc1: error: cannot load plugin ./scripts/gcc-plugins/randomize_layout_plugin.so - :./scripts/gcc-plugins/randomize_layout_plugin.so: undefined symbol: tree_code_type -``` - -This ends up being because of https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=b0241ce6e37031 -upstream in GCC which changes the visibility of some types used by the kernel's -plugin infrastructure like tree_code_type. - -After discussion with the GCC folks, we found that the kernel needs to be building -plugins with the same flags used to build GCC - and GCC defaults to gnu++17 -right now. The minimum GCC version needed to build the kernel is GCC 5.1 -and GCC 5.1 already defaults to gnu++14 anyway, so just drop the flag, as -all GCCs that could be used to build GCC already default to an acceptable -version which was >= the version we forced via flags until now. - -Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108634 -Signed-off-by: Sam James -Signed-off-by: Kees Cook -Link: https://lore.kernel.org/r/20230201230009.2252783-1-...@gentoo.org - scripts/gcc-plugins/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/scripts/gcc-plugins/Makefile b/scripts/gcc-plugins/Makefile -index b34d11e226366..320afd3cf8e82 100644 a/scripts/gcc-plugins/Makefile -+++ b/scripts/gcc-plugins/Makefile -@@ -29,7 +29,7 @@ GCC_PLUGINS_DIR = $(shell $(CC) -print-file-name=plugin) - plugin_cxxflags = -Wp,-MMD,$(depfile) $(KBUILD_HOSTCXXFLAGS) -fPIC \ - -include $(srctree)/include/linux/compiler-version.h \ - -DPLUGIN_VERSION=$(call stringify,$(KERNELVERSION)) \ ---I $(GCC_PLUGINS_DIR)/include -I $(obj) -std=gnu++11 \ -+-I $(GCC_PLUGINS_DIR)/include -I $(obj) \ - -fno-rtti -fno-exceptions -fasynchronous-unwind-tables \ - -ggdb -Wno-narrowing -Wno-unused-variable \ - -Wno-format-diag --- -cgit -
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 66dd8dbc053422be2cf35862fe70e7996615c0e8 Author: Mike Pagano gentoo org> AuthorDate: Mon Mar 6 17:29:51 2023 + Commit: Mike Pagano gentoo org> CommitDate: Mon Mar 6 17:29:51 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=66dd8dbc Add shifts back Signed-off-by: Mike Pagano gentoo.org> _README|4 + 5000_shiftfs-6.1.patch | 2249 2 files changed, 2253 insertions(+) diff --git a/_README b/_README index dca64867..6e5b60b1 100644 --- a/_README +++ b/_README @@ -147,6 +147,10 @@ Patch: 4567_distro-Gentoo-Kconfig.patch From: Tom Wijsman Desc: Add Gentoo Linux support config settings and defaults. +Patch: 5000_shiftfs-6.1.patch +From: https://github.com/toby63/shiftfs-dkms +Desc: Kernel fs for Linux that provides easier uid/gid-shifting for containers + Patch: 5010_enable-cpu-optimizations-universal.patch From: https://github.com/graysky2/kernel_compiler_patch Desc: Kernel >= 5.15 patch enables gcc = v11.1+ optimizations for additional CPUs. diff --git a/5000_shiftfs-6.1.patch b/5000_shiftfs-6.1.patch new file mode 100644 index ..f0c715e3 --- /dev/null +++ b/5000_shiftfs-6.1.patch @@ -0,0 +1,2249 @@ +--- /dev/null 2023-03-06 07:06:05.852282227 -0500 b/fs/shiftfs.c 2023-03-06 11:58:38.389647656 -0500 +@@ -0,0 +1,2203 @@ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++struct shiftfs_super_info { ++ struct vfsmount *mnt; ++ struct user_namespace *userns; ++ /* creds of process who created the super block */ ++ const struct cred *creator_cred; ++ bool mark; ++ unsigned int passthrough; ++ unsigned int passthrough_mark; ++}; ++ ++static void shiftfs_fill_inode(struct inode *inode, unsigned long ino, ++ umode_t mode, dev_t dev, struct dentry *dentry); ++ ++#define SHIFTFS_PASSTHROUGH_NONE 0 ++#define SHIFTFS_PASSTHROUGH_STAT 1 ++#define SHIFTFS_PASSTHROUGH_IOCTL 2 ++#define SHIFTFS_PASSTHROUGH_ALL \ ++ (SHIFTFS_PASSTHROUGH_STAT | SHIFTFS_PASSTHROUGH_IOCTL) ++ ++static inline bool shiftfs_passthrough_ioctls(struct shiftfs_super_info *info) ++{ ++ if (!(info->passthrough & SHIFTFS_PASSTHROUGH_IOCTL)) ++ return false; ++ ++ return true; ++} ++ ++static inline bool shiftfs_passthrough_statfs(struct shiftfs_super_info *info) ++{ ++ if (!(info->passthrough & SHIFTFS_PASSTHROUGH_STAT)) ++ return false; ++ ++ return true; ++} ++ ++enum { ++ OPT_MARK, ++ OPT_PASSTHROUGH, ++ OPT_LAST, ++}; ++ ++/* global filesystem options */ ++static const match_table_t tokens = { ++ { OPT_MARK, "mark" }, ++ { OPT_PASSTHROUGH, "passthrough=%u" }, ++ { OPT_LAST, NULL } ++}; ++ ++static const struct cred *shiftfs_override_creds(const struct super_block *sb) ++{ ++ struct shiftfs_super_info *sbinfo = sb->s_fs_info; ++ ++ return override_creds(sbinfo->creator_cred); ++} ++ ++static inline void shiftfs_revert_object_creds(const struct cred *oldcred, ++ struct cred *newcred) ++{ ++ revert_creds(oldcred); ++ put_cred(newcred); ++} ++ ++static kuid_t shift_kuid(struct user_namespace *from, struct user_namespace *to, ++ kuid_t kuid) ++{ ++ uid_t uid = from_kuid(from, kuid); ++ return make_kuid(to, uid); ++} ++ ++static kgid_t shift_kgid(struct user_namespace *from, struct user_namespace *to, ++ kgid_t kgid) ++{ ++ gid_t gid = from_kgid(from, kgid); ++ return make_kgid(to, gid); ++} ++ ++static int shiftfs_override_object_creds(const struct super_block *sb, ++ const struct cred **oldcred, ++ struct cred **newcred, ++ struct dentry *dentry, umode_t mode, ++ bool hardlink) ++{ ++ struct shiftfs_super_info *sbinfo = sb->s_fs_info; ++ kuid_t fsuid = current_fsuid(); ++ kgid_t fsgid = current_fsgid(); ++ ++ *oldcred = shiftfs_override_creds(sb); ++ ++ *newcred = prepare_creds(); ++ if (!*newcred) { ++ revert_creds(*oldcred); ++ return -ENOMEM; ++ } ++ ++ (*newcred)->fsuid = shift_kuid(sb->s_user_ns, sbinfo->userns, fsuid); ++ (*newcred)->fsgid = shift_kgid(sb->s_user_ns, sbinfo->userns, fsgid); ++ ++ if (!hardlink) { ++ int err = security_dentry_create_files_as(dentry, mode, ++>d_name, ++
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: cc989ca8dddb899405562c2fe5e9567d03aee7fe Author: Mike Pagano gentoo org> AuthorDate: Fri Mar 3 12:28:17 2023 + Commit: Mike Pagano gentoo org> CommitDate: Fri Mar 3 12:28:17 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=cc989ca8 Linux patch 6.1.15 Signed-off-by: Mike Pagano gentoo.org> _README |4 + 1014_linux-6.1.15.patch | 1648 +++ 2 files changed, 1652 insertions(+) diff --git a/_README b/_README index aa47ca9b..328fcd23 100644 --- a/_README +++ b/_README @@ -99,6 +99,10 @@ Patch: 1013_linux-6.1.14.patch From: https://www.kernel.org Desc: Linux 6.1.14 +Patch: 1014_linux-6.1.15.patch +From: https://www.kernel.org +Desc: Linux 6.1.15 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1014_linux-6.1.15.patch b/1014_linux-6.1.15.patch new file mode 100644 index ..03dcc23c --- /dev/null +++ b/1014_linux-6.1.15.patch @@ -0,0 +1,1648 @@ +diff --git a/Documentation/trace/ftrace.rst b/Documentation/trace/ftrace.rst +index 60bceb018d6a9..21f01d32c9598 100644 +--- a/Documentation/trace/ftrace.rst b/Documentation/trace/ftrace.rst +@@ -2940,7 +2940,7 @@ Produces:: + bash-1994 [000] 4342.324898: ima_get_action <-process_measurement + bash-1994 [000] 4342.324898: ima_match_policy <-ima_get_action + bash-1994 [000] 4342.324899: do_truncate <-do_last +- bash-1994 [000] 4342.324899: should_remove_suid <-do_truncate ++ bash-1994 [000] 4342.324899: setattr_should_drop_suidgid <-do_truncate + bash-1994 [000] 4342.324899: notify_change <-do_truncate + bash-1994 [000] 4342.324900: current_fs_time <-notify_change + bash-1994 [000] 4342.324900: current_kernel_time <-current_fs_time +diff --git a/Makefile b/Makefile +index 3e82a32243626..4dfe902b7f193 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 14 ++SUBLEVEL = 15 + EXTRAVERSION = + NAME = Hurr durr I'ma ninja sloth + +diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi +index 487b0e03d4b43..2ca76b69add78 100644 +--- a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi +@@ -1181,6 +1181,7 @@ + clock-names = "dp", "pclk"; + phys = <_phy>; + phy-names = "dp"; ++ power-domains = < RK3288_PD_VIO>; + resets = < SRST_EDP>; + reset-names = "dp"; + rockchip,grf = <>; +diff --git a/arch/arm/boot/dts/stihxxx-b2120.dtsi b/arch/arm/boot/dts/stihxxx-b2120.dtsi +index 2aa94605d3d47..d52a7aaa10743 100644 +--- a/arch/arm/boot/dts/stihxxx-b2120.dtsi b/arch/arm/boot/dts/stihxxx-b2120.dtsi +@@ -178,7 +178,7 @@ + tsin-num = <0>; + serial-not-parallel; + i2c-bus = <>; +- reset-gpios = < 4 GPIO_ACTIVE_HIGH>; ++ reset-gpios = < 4 GPIO_ACTIVE_LOW>; + dvb-card = ; + }; + }; +diff --git a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts +index aa22a0c222655..5d5d9574088ca 100644 +--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts +@@ -96,7 +96,6 @@ + linux,default-trigger = "heartbeat"; + gpios = < 1 GPIO_ACTIVE_LOW>; + default-state = "on"; +- mode = <0x23>; + }; + + user_led: led-1 { +@@ -104,7 +103,6 @@ + linux,default-trigger = "mmc1"; + gpios = < 0 GPIO_ACTIVE_LOW>; + default-state = "off"; +- mode = <0x05>; + }; + }; + }; +diff --git a/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi +index 6e29e74f6fc68..783120e9cebeb 100644 +--- a/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi +@@ -111,7 +111,7 @@ + }; + }; + +- dmc_opp_table: dmc_opp_table { ++ dmc_opp_table: opp-table-3 { + compatible = "operating-points-v2"; + + opp00 { +diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +index 2e058c3150256..fccc2b2f327df 100644 +--- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +@@
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 1d867d0c7f9d9b4d9082b1bc7a326c5b7e136a0c Author: Mike Pagano gentoo org> AuthorDate: Mon Feb 27 16:59:22 2023 + Commit: Mike Pagano gentoo org> CommitDate: Mon Feb 27 16:59:22 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=1d867d0c Fix typo in README Signed-off-by: Mike Pagano gentoo.org> _README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_README b/_README index c6d94abc..aa47ca9b 100644 --- a/_README +++ b/_README @@ -152,7 +152,7 @@ From: https://github.com/graysky2/kernel_compiler_patch Desc: Kernel >= 5.15 patch enables gcc = v11.1+ optimizations for additional CPUs. Patch: 5020_BMQ-and-PDS-io-scheduler-v6.1-r4-linux-tkg.patch -From: https://github.com/Frogging-Family/linux-tkghttps://gitlab.com/alfredchen/projectc +From: https://github.com/Frogging-Family/linux-tkg https://gitlab.com/alfredchen/projectc Desc: BMQ(BitMap Queue) Scheduler. A new CPU scheduler developed from PDS(incld). Inspired by the scheduler in zircon. Patch: 5021_BMQ-and-PDS-gentoo-defaults.patch
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 458c4e0f9c4e70e70c669eaf74f3bb990312db59 Author: Mike Pagano gentoo org> AuthorDate: Sun Feb 26 18:23:44 2023 + Commit: Mike Pagano gentoo org> CommitDate: Sun Feb 26 18:23:44 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=458c4e0f Update CPU Opt patch, add Emerald Rapids and update Sapphire Rapids Signed-off-by: Mike Pagano gentoo.org> 5010_enable-cpu-optimizations-universal.patch | 125 ++ 1 file changed, 69 insertions(+), 56 deletions(-) diff --git a/5010_enable-cpu-optimizations-universal.patch b/5010_enable-cpu-optimizations-universal.patch index 0841340b..7a1b717a 100644 --- a/5010_enable-cpu-optimizations-universal.patch +++ b/5010_enable-cpu-optimizations-universal.patch @@ -1,7 +1,6 @@ -From a0825feea3f100656d58446885b5f190284fd219 +From 70d4906b87983ed2ed5da78930a701625d881dd0 Mon Sep 17 00:00:00 2001 From: graysky -Date: Fri, 4 Nov 2022 15:34:36 -0400 -Subject: [PATCH] more uarches for kernel 5.17+ +Date: Thu, 5 Jan 2023 14:29:37 -0500 FEATURES This patch adds additional CPU options to the Linux kernel accessible under: @@ -50,11 +49,12 @@ CPU-specific microarchitectures include: • Intel Xeon (Cascade Lake) • Intel Xeon (Cooper Lake)* • Intel 3rd Gen 10nm++ i3/i5/i7/i9-family (Tiger Lake)* -• Intel 3rd Gen 10nm++ Xeon (Sapphire Rapids)‡ +• Intel 4th Gen 10nm++ Xeon (Sapphire Rapids)‡ • Intel 11th Gen i3/i5/i7/i9-family (Rocket Lake)‡ • Intel 12th Gen i3/i5/i7/i9-family (Alder Lake)‡ • Intel 13th Gen i3/i5/i7/i9-family (Raptor Lake)§ • Intel 14th Gen i3/i5/i7/i9-family (Meteor Lake)§ +• Intel 5th Gen 10nm++ Xeon (Emerald Rapids)§ Notes: If not otherwise noted, gcc >=9.1 is required for support. *Requires gcc >=10.1 or clang >=10.0 @@ -99,20 +99,19 @@ REFERENCES 3. https://bugzilla.kernel.org/show_bug.cgi?id=77461 4. https://github.com/graysky2/kernel_gcc_patch/issues/15 5. http://www.linuxforge.net/docs/linux/linux-gcc.php - --- - arch/x86/Kconfig.cpu| 416 ++-- - arch/x86/Makefile | 43 +++- - arch/x86/include/asm/vermagic.h | 72 ++ - 3 files changed, 514 insertions(+), 17 deletions(-) + arch/x86/Kconfig.cpu| 427 ++-- + arch/x86/Makefile | 44 +++- + arch/x86/include/asm/vermagic.h | 74 ++ + 3 files changed, 528 insertions(+), 17 deletions(-) diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu -index 542377cd419d..08d887d1220d 100644 +index 542377cd419d..f589971df2d3 100644 --- a/arch/x86/Kconfig.cpu +++ b/arch/x86/Kconfig.cpu @@ -157,7 +157,7 @@ config MPENTIUM4 - - + + config MK6 - bool "K6/K6-II/K6-III" + bool "AMD K6/K6-II/K6-III" @@ -121,7 +120,7 @@ index 542377cd419d..08d887d1220d 100644 Select this for an AMD K6-family processor. Enables use of @@ -165,7 +165,7 @@ config MK6 flags to GCC. - + config MK7 - bool "Athlon/Duron/K7" + bool "AMD Athlon/Duron/K7" @@ -130,7 +129,7 @@ index 542377cd419d..08d887d1220d 100644 Select this for an AMD Athlon K7-family processor. Enables use of @@ -173,12 +173,106 @@ config MK7 flags to GCC. - + config MK8 - bool "Opteron/Athlon64/Hammer/K8" + bool "AMD Opteron/Athlon64/Hammer/K8" @@ -138,7 +137,7 @@ index 542377cd419d..08d887d1220d 100644 Select this for an AMD Opteron or Athlon64 Hammer-family processor. Enables use of some extended instructions, and passes appropriate optimization flags to GCC. - + +config MK8SSE3 + bool "AMD Opteron/Athlon64/Hammer/K8 with SSE3" + help @@ -227,7 +226,7 @@ index 542377cd419d..08d887d1220d 100644 + +config MZEN4 + bool "AMD Zen 4" -+ depends on (CC_IS_GCC && GCC_VERSION >= 13) || (CC_IS_CLANG && CLANG_VERSION >= 150500) ++ depends on (CC_IS_GCC && GCC_VERSION >= 13) || (CC_IS_CLANG && CLANG_VERSION >= 16) + help +Select this for AMD Family 19h Zen 4 processors. + @@ -238,26 +237,26 @@ index 542377cd419d..08d887d1220d 100644 depends on X86_32 @@ -270,7 +364,7 @@ config MPSC in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one. - + config MCORE2 - bool "Core 2/newer Xeon" + bool "Intel Core 2" help - + Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and @@ -278,6 +372,8 @@ config MCORE2 family in /proc/cpuinfo. Newer ones have 6 and older ones 15 (not a typo) - + +Enables -march=core2 + config MATOM bool "Intel Atom" help -@@ -287,6 +383,202 @@ config MATOM +@@ -287,6 +383,212 @@ config MATOM accordingly optimized code. Use a recent GCC with specific Atom support in order to fully benefit from selecting this option. - + +config MNEHALEM + bool "Intel Nehalem" + select X86_P6_NOP @@ -410,7 +409,7 @@ index
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 7ddeb328a51014d4b4d5cdf6a4f691d982aa06ad Author: Alice Ferrazzi gentoo org> AuthorDate: Sat Feb 25 10:58:21 2023 + Commit: Alice Ferrazzi gentoo org> CommitDate: Sat Feb 25 10:58:21 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=7ddeb328 Linux patch 6.1.14 Signed-off-by: Alice Ferrazzi gentoo.org> _README |4 + 1013_linux-6.1.14.patch | 2813 +++ 2 files changed, 2817 insertions(+) diff --git a/_README b/_README index dee78b52..4604bf4f 100644 --- a/_README +++ b/_README @@ -95,6 +95,10 @@ Patch: 1012_linux-6.1.13.patch From: https://www.kernel.org Desc: Linux 6.1.13 +Patch: 1013_linux-6.1.14.patch +From: https://www.kernel.org +Desc: Linux 6.1.14 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1013_linux-6.1.14.patch b/1013_linux-6.1.14.patch new file mode 100644 index ..ed2de6e9 --- /dev/null +++ b/1013_linux-6.1.14.patch @@ -0,0 +1,2813 @@ +diff --git a/Documentation/admin-guide/perf/hisi-pcie-pmu.rst b/Documentation/admin-guide/perf/hisi-pcie-pmu.rst +index 294ebbdb22af8..bbe66480ff851 100644 +--- a/Documentation/admin-guide/perf/hisi-pcie-pmu.rst b/Documentation/admin-guide/perf/hisi-pcie-pmu.rst +@@ -15,10 +15,10 @@ HiSilicon PCIe PMU driver + The PCIe PMU driver registers a perf PMU with the name of its sicl-id and PCIe + Core id.:: + +- /sys/bus/event_source/hisi_pcie_ ++ /sys/bus/event_source/hisi_pcie_core + + PMU driver provides description of available events and filter options in sysfs, +-see /sys/bus/event_source/devices/hisi_pcie_. ++see /sys/bus/event_source/devices/hisi_pcie_core. + + The "format" directory describes all formats of the config (events) and config1 + (filter options) fields of the perf_event_attr structure. The "events" directory +@@ -33,13 +33,13 @@ monitored by PMU. + Example usage of perf:: + + $# perf list +- hisi_pcie0_0/rx_mwr_latency/ [kernel PMU event] +- hisi_pcie0_0/rx_mwr_cnt/ [kernel PMU event] ++ hisi_pcie0_core0/rx_mwr_latency/ [kernel PMU event] ++ hisi_pcie0_core0/rx_mwr_cnt/ [kernel PMU event] + -- + +- $# perf stat -e hisi_pcie0_0/rx_mwr_latency/ +- $# perf stat -e hisi_pcie0_0/rx_mwr_cnt/ +- $# perf stat -g -e hisi_pcie0_0/rx_mwr_latency/ -e hisi_pcie0_0/rx_mwr_cnt/ ++ $# perf stat -e hisi_pcie0_core0/rx_mwr_latency/ ++ $# perf stat -e hisi_pcie0_core0/rx_mwr_cnt/ ++ $# perf stat -g -e hisi_pcie0_core0/rx_mwr_latency/ -e hisi_pcie0_core0/rx_mwr_cnt/ + + The current driver does not support sampling. So "perf record" is unsupported. + Also attach to a task is unsupported for PCIe PMU. +@@ -64,7 +64,7 @@ bit8 is set, port=0x100; if these two Root Ports are both monitored, port=0x101. + + Example usage of perf:: + +- $# perf stat -e hisi_pcie0_0/rx_mwr_latency,port=0x1/ sleep 5 ++ $# perf stat -e hisi_pcie0_core0/rx_mwr_latency,port=0x1/ sleep 5 + + -bdf + +@@ -76,7 +76,7 @@ For example, "bdf=0x3900" means BDF of target Endpoint is :39:00.0. + + Example usage of perf:: + +- $# perf stat -e hisi_pcie0_0/rx_mrd_flux,bdf=0x3900/ sleep 5 ++ $# perf stat -e hisi_pcie0_core0/rx_mrd_flux,bdf=0x3900/ sleep 5 + + 2. Trigger filter + Event statistics start when the first time TLP length is greater/smaller +@@ -90,7 +90,7 @@ means start when TLP length < condition. + + Example usage of perf:: + +- $# perf stat -e hisi_pcie0_0/rx_mrd_flux,trig_len=0x4,trig_mode=1/ sleep 5 ++ $# perf stat -e hisi_pcie0_core0/rx_mrd_flux,trig_len=0x4,trig_mode=1/ sleep 5 + + 3. Threshold filter + Counter counts when TLP length within the specified range. You can set the +@@ -103,4 +103,4 @@ when TLP length < threshold. + + Example usage of perf:: + +- $# perf stat -e hisi_pcie0_0/rx_mrd_flux,thr_len=0x4,thr_mode=1/ sleep 5 ++ $# perf stat -e hisi_pcie0_core0/rx_mrd_flux,thr_len=0x4,thr_mode=1/ sleep 5 +diff --git a/MAINTAINERS b/MAINTAINERS +index d4822ae39e396..350d7e3ba94f9 100644 +--- a/MAINTAINERS b/MAINTAINERS +@@ -3444,7 +3444,7 @@ F: drivers/net/ieee802154/atusb.h + AUDIT SUBSYSTEM + M:Paul Moore + M:Eric Paris +-L:linux-au...@redhat.com (moderated for non-subscribers) ++L:au...@vger.kernel.org + S:Supported + W:https://github.com/linux-audit + T:git git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git +diff --git a/Makefile b/Makefile +index e51356b982f90..3e82a32243626 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 13 ++SUBLEVEL = 14 + EXTRAVERSION = + NAME = Hurr durr I'ma ninja sloth + +diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-2.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-2.dtsi +new file mode 100644 +index 0..437dab3fc0176
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 5ae3ab31650bb433a32d16f5f1a157d0013400a3 Author: Alice Ferrazzi gentoo org> AuthorDate: Fri Feb 24 02:56:16 2023 + Commit: Alice Ferrazzi gentoo org> CommitDate: Fri Feb 24 02:58:32 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=5ae3ab31 _README: use https:// instead of http:// by default Signed-off-by: Alice Ferrazzi gentoo.org> _README | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/_README b/_README index 8acd931c..dee78b52 100644 --- a/_README +++ b/_README @@ -44,55 +44,55 @@ Individual Patch Descriptions: -- Patch: 1000_linux-6.1.1.patch -From: http://www.kernel.org +From: https://www.kernel.org Desc: Linux 6.1.1 Patch: 1001_linux-6.1.2.patch -From: http://www.kernel.org +From: https://www.kernel.org Desc: Linux 6.1.2 Patch: 1002_linux-6.1.3.patch -From: http://www.kernel.org +From: https://www.kernel.org Desc: Linux 6.1.3 Patch: 1003_linux-6.1.4.patch -From: http://www.kernel.org +From: https://www.kernel.org Desc: Linux 6.1.4 Patch: 1004_linux-6.1.5.patch -From: http://www.kernel.org +From: https://www.kernel.org Desc: Linux 6.1.5 Patch: 1005_linux-6.1.6.patch -From: http://www.kernel.org +From: https://www.kernel.org Desc: Linux 6.1.6 Patch: 1006_linux-6.1.7.patch -From: http://www.kernel.org +From: https://www.kernel.org Desc: Linux 6.1.7 Patch: 1007_linux-6.1.8.patch -From: http://www.kernel.org +From: https://www.kernel.org Desc: Linux 6.1.8 Patch: 1008_linux-6.1.9.patch -From: http://www.kernel.org +From: https://www.kernel.org Desc: Linux 6.1.9 Patch: 1009_linux-6.1.10.patch -From: http://www.kernel.org +From: https://www.kernel.org Desc: Linux 6.1.10 Patch: 1010_linux-6.1.11.patch -From: http://www.kernel.org +From: https://www.kernel.org Desc: Linux 6.1.11 Patch: 1011_linux-6.1.12.patch -From: http://www.kernel.org +From: https://www.kernel.org Desc: Linux 6.1.12 Patch: 1012_linux-6.1.13.patch -From: http://www.kernel.org +From: https://www.kernel.org Desc: Linux 6.1.13 Patch: 1500_XATTR_USER_PREFIX.patch
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: bdd82fbe515cff9a65127ab3ad72a41da18f870b Author: Mike Pagano gentoo org> AuthorDate: Thu Feb 9 12:52:02 2023 + Commit: Mike Pagano gentoo org> CommitDate: Thu Feb 9 12:52:02 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=bdd82fbe Remove unneeded patch Removed: 1800_maple-tree-fix-mas-empty-area-rev-lower-bound-val.patch Signed-off-by: Mike Pagano gentoo.org> _README| 4 -- ...ee-fix-mas-empty-area-rev-lower-bound-val.patch | 82 -- 2 files changed, 86 deletions(-) diff --git a/_README b/_README index 2a0b727d..e9f79f14 100644 --- a/_README +++ b/_README @@ -99,10 +99,6 @@ Patch: 1700_sparc-address-warray-bound-warnings.patch From: https://github.com/KSPP/linux/issues/109 Desc: Address -Warray-bounds warnings -Patch: 1800_maple-tree-fix-mas-empty-area-rev-lower-bound-val.patch -From: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git -Desc: maple_tree: fix mas_empty_area_rev() lower bound validation - Patch: 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch From: https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-mar...@holtmann.org/raw Desc: Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. See bug #686758 diff --git a/1800_maple-tree-fix-mas-empty-area-rev-lower-bound-val.patch b/1800_maple-tree-fix-mas-empty-area-rev-lower-bound-val.patch deleted file mode 100644 index 53075739.. --- a/1800_maple-tree-fix-mas-empty-area-rev-lower-bound-val.patch +++ /dev/null @@ -1,82 +0,0 @@ -From ebc4c1bcc2a513bb2292dc73aa247b046bc846ce Mon Sep 17 00:00:00 2001 -From: Liam Howlett -Date: Wed, 11 Jan 2023 20:02:07 + -Subject: maple_tree: fix mas_empty_area_rev() lower bound validation - -mas_empty_area_rev() was not correctly validating the start of a gap -against the lower limit. This could lead to the range starting lower than -the requested minimum. - -Fix the issue by better validating a gap once one is found. - -This commit also adds tests to the maple tree test suite for this issue -and tests the mas_empty_area() function for similar bound checking. - -Link: https://lkml.kernel.org/r/20230111200136.1851322-1-liam.howl...@oracle.com -Link: https://bugzilla.kernel.org/show_bug.cgi?id=216911 -Fixes: 54a611b60590 ("Maple Tree: add new data structure") -Signed-off-by: Liam R. Howlett -Reported-by: - Link: https://lore.kernel.org/linux-mm/0b9f5425-08d4-8013-aa4c-e620c3b10...@leemhuis.info/ -Tested-by: Holger Hoffsttte -Cc: -Signed-off-by: Andrew Morton - lib/maple_tree.c | 17 - - 1 file changed, 8 insertions(+), 9 deletions(-) - -(limited to 'lib/maple_tree.c') - -diff --git a/lib/maple_tree.c b/lib/maple_tree.c -index 26e2045d3cda9..b990ccea454ec 100644 a/lib/maple_tree.c -+++ b/lib/maple_tree.c -@@ -4887,7 +4887,7 @@ static bool mas_rev_awalk(struct ma_state *mas, unsigned long size) - unsigned long *pivots, *gaps; - void __rcu **slots; - unsigned long gap = 0; -- unsigned long max, min, index; -+ unsigned long max, min; - unsigned char offset; - - if (unlikely(mas_is_err(mas))) -@@ -4909,8 +4909,7 @@ static bool mas_rev_awalk(struct ma_state *mas, unsigned long size) - min = mas_safe_min(mas, pivots, --offset); - - max = mas_safe_pivot(mas, pivots, offset, type); -- index = mas->index; -- while (index <= max) { -+ while (mas->index <= max) { - gap = 0; - if (gaps) - gap = gaps[offset]; -@@ -4941,10 +4940,8 @@ static bool mas_rev_awalk(struct ma_state *mas, unsigned long size) - min = mas_safe_min(mas, pivots, offset); - } - -- if (unlikely(index > max)) { -- mas_set_err(mas, -EBUSY); -- return false; -- } -+ if (unlikely((mas->index > max) || (size - 1 > max - mas->index))) -+ goto no_space; - - if (unlikely(ma_is_leaf(type))) { - mas->offset = offset; -@@ -4961,9 +4958,11 @@ static bool mas_rev_awalk(struct ma_state *mas, unsigned long size) - return false; - - ascend: -- if (mte_is_root(mas->node)) -- mas_set_err(mas, -EBUSY); -+ if (!mte_is_root(mas->node)) -+ return false; - -+no_space: -+ mas_set_err(mas, -EBUSY); - return false; - } - --- -cgit -
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 85941b985a0a1a23d17486db978bd18577b97dcc Author: Mike Pagano gentoo org> AuthorDate: Thu Feb 9 12:47:03 2023 + Commit: Mike Pagano gentoo org> CommitDate: Thu Feb 9 12:47:03 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=85941b98 Remove BMQ Fix patch Signed-off-by: Mike Pagano gentoo.org> 5021_sched-alt-missing-rq-lock-irq-function.patch | 30 --- 1 file changed, 30 deletions(-) diff --git a/5021_sched-alt-missing-rq-lock-irq-function.patch b/5021_sched-alt-missing-rq-lock-irq-function.patch deleted file mode 100644 index 04cca612.. --- a/5021_sched-alt-missing-rq-lock-irq-function.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 4157360d2e1cbdfb8065f151dbe057b17188a23f Mon Sep 17 00:00:00 2001 -From: Tor Vic -Date: Mon, 7 Nov 2022 15:11:54 +0100 -Subject: [PATCH] sched/alt: Add missing rq_lock_irq() function to header file - - kernel/sched/alt_sched.h | 7 +++ - 1 file changed, 7 insertions(+) - -diff --git a/kernel/sched/alt_sched.h b/kernel/sched/alt_sched.h -index 93ff3bddd36f..a00bc84b93b2 100644 a/kernel/sched/alt_sched.h -+++ b/kernel/sched/alt_sched.h -@@ -387,6 +387,13 @@ task_rq_unlock(struct rq *rq, struct task_struct *p, struct rq_flags *rf) - raw_spin_unlock_irqrestore(>pi_lock, rf->flags); - } - -+static inline void -+rq_lock_irq(struct rq *rq, struct rq_flags *rf) -+ __acquires(rq->lock) -+{ -+ raw_spin_lock_irq(>lock); -+} -+ - static inline void - rq_lock(struct rq *rq, struct rq_flags *rf) - __acquires(rq->lock) --- -GitLab -
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: aa99b5941813b8267a0dee6085aadda60385aede Author: Mike Pagano gentoo org> AuthorDate: Thu Feb 9 12:39:52 2023 + Commit: Mike Pagano gentoo org> CommitDate: Thu Feb 9 12:39:52 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=aa99b594 Bump BMQ Patch to 6.1-r4 Signed-off-by: Mike Pagano gentoo.org> _README| 2 +- ... => 5020_BMQ-and-PDS-io-scheduler-v6.1-r4.patch | 216 ++--- 2 files changed, 148 insertions(+), 70 deletions(-) diff --git a/_README b/_README index 1fb22543..62ade3e6 100644 --- a/_README +++ b/_README @@ -139,6 +139,6 @@ Patch: 5010_enable-cpu-optimizations-universal.patch From: https://github.com/graysky2/kernel_compiler_patch Desc: Kernel >= 5.15 patch enables gcc = v11.1+ optimizations for additional CPUs. -Patch: 5020_BMQ-and-PDS-io-scheduler-v6.1-r0.patch +Patch: 5020_BMQ-and-PDS-io-scheduler-v6.1-r4.patch From: https://gitlab.com/alfredchen/projectc Desc: BMQ(BitMap Queue) Scheduler. A new CPU scheduler developed from PDS(incld). Inspired by the scheduler in zircon. diff --git a/5020_BMQ-and-PDS-io-scheduler-v6.1-r0.patch b/5020_BMQ-and-PDS-io-scheduler-v6.1-r4.patch similarity index 98% rename from 5020_BMQ-and-PDS-io-scheduler-v6.1-r0.patch rename to 5020_BMQ-and-PDS-io-scheduler-v6.1-r4.patch index 783f3bca..7c2a77d3 100644 --- a/5020_BMQ-and-PDS-io-scheduler-v6.1-r0.patch +++ b/5020_BMQ-and-PDS-io-scheduler-v6.1-r4.patch @@ -369,7 +369,7 @@ index 94125d3b6893..c87ba766d354 100644 +menuconfig SCHED_ALT + bool "Alternative CPU Schedulers" -+ default n ++ default y + help +This feature enable alternative CPU scheduler" + @@ -632,10 +632,10 @@ index 976092b7bd45..31d587c16ec1 100644 obj-y += build_utility.o diff --git a/kernel/sched/alt_core.c b/kernel/sched/alt_core.c new file mode 100644 -index ..4bea0c025475 +index ..a9e906b229eb --- /dev/null +++ b/kernel/sched/alt_core.c -@@ -0,0 +1,7912 @@ +@@ -0,0 +1,7982 @@ +/* + * kernel/sched/alt_core.c + * @@ -665,7 +665,6 @@ index ..4bea0c025475 +#include +#include +#include -+#include +#include +#include + @@ -706,7 +705,7 @@ index ..4bea0c025475 +#define sched_feat(x) (0) +#endif /* CONFIG_SCHED_DEBUG */ + -+#define ALT_SCHED_VERSION "v6.1-r0" ++#define ALT_SCHED_VERSION "v6.1-r4" + +/* rt_prio(prio) defined in include/linux/sched/rt.h */ +#define rt_task(p)rt_prio((p)->prio) @@ -786,7 +785,8 @@ index ..4bea0c025475 +#ifdef CONFIG_SCHED_SMT +static cpumask_t sched_sg_idle_mask cacheline_aligned_in_smp; +#endif -+static cpumask_t sched_rq_watermark[SCHED_QUEUE_BITS] cacheline_aligned_in_smp; ++static cpumask_t sched_preempt_mask[SCHED_QUEUE_BITS] cacheline_aligned_in_smp; ++static cpumask_t *const sched_idle_mask = _preempt_mask[0]; + +/* sched_queue related functions */ +static inline void sched_queue_init(struct sched_queue *q) @@ -810,44 +810,66 @@ index ..4bea0c025475 + list_add(>sq_node, >heads[idle->sq_idx]); +} + ++static inline void ++clear_recorded_preempt_mask(int pr, int low, int high, int cpu) ++{ ++ if (low < pr && pr <= high) ++ cpumask_clear_cpu(cpu, sched_preempt_mask + SCHED_QUEUE_BITS - pr); ++} ++ ++static inline void ++set_recorded_preempt_mask(int pr, int low, int high, int cpu) ++{ ++ if (low < pr && pr <= high) ++ cpumask_set_cpu(cpu, sched_preempt_mask + SCHED_QUEUE_BITS - pr); ++} ++ ++static atomic_t sched_prio_record = ATOMIC_INIT(0); ++ +/* water mark related functions */ -+static inline void update_sched_rq_watermark(struct rq *rq) ++static inline void update_sched_preempt_mask(struct rq *rq) +{ -+ unsigned long watermark = find_first_bit(rq->queue.bitmap, SCHED_QUEUE_BITS); -+ unsigned long last_wm = rq->watermark; -+ unsigned long i; -+ int cpu; ++ unsigned long prio = find_first_bit(rq->queue.bitmap, SCHED_QUEUE_BITS); ++ unsigned long last_prio = rq->prio; ++ int cpu, pr; + -+ if (watermark == last_wm) ++ if (prio == last_prio) + return; + -+ rq->watermark = watermark; ++ rq->prio = prio; + cpu = cpu_of(rq); -+ if (watermark < last_wm) { -+ for (i = last_wm; i > watermark; i--) -+ cpumask_clear_cpu(cpu, sched_rq_watermark + SCHED_QUEUE_BITS - i); ++ pr = atomic_read(_prio_record); ++ ++ if (prio < last_prio) { ++ if (IDLE_TASK_SCHED_PRIO == last_prio) { ++ cpumask_clear_cpu(cpu, sched_idle_mask); ++ last_prio -= 2; +#ifdef CONFIG_SCHED_SMT -+ if (static_branch_likely(_smt_present) && -+ IDLE_TASK_SCHED_PRIO == last_wm) -+ cpumask_andnot(_sg_idle_mask, -+
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: a2caeaa3d282040a954d3b967fa62e1b3bbbd71b Author: Mike Pagano gentoo org> AuthorDate: Mon Feb 6 12:46:18 2023 + Commit: Mike Pagano gentoo org> CommitDate: Mon Feb 6 12:46:18 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=a2caeaa3 Linux patch 6.1.10 Signed-off-by: Mike Pagano gentoo.org> _README | 4 + 1009_linux-6.1.10.patch | 855 2 files changed, 859 insertions(+) diff --git a/_README b/_README index 1f899f11..10671afd 100644 --- a/_README +++ b/_README @@ -79,6 +79,10 @@ Patch: 1008_linux-6.1.9.patch From: http://www.kernel.org Desc: Linux 6.1.9 +Patch: 1009_linux-6.1.10.patch +From: http://www.kernel.org +Desc: Linux 6.1.10 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1009_linux-6.1.10.patch b/1009_linux-6.1.10.patch new file mode 100644 index ..3d6ca3ee --- /dev/null +++ b/1009_linux-6.1.10.patch @@ -0,0 +1,855 @@ +diff --git a/Makefile b/Makefile +index 3778b422fa113..6e34c942744e3 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 9 ++SUBLEVEL = 10 + EXTRAVERSION = + NAME = Hurr durr I'ma ninja sloth + +diff --git a/arch/arm/boot/dts/imx53-ppd.dts b/arch/arm/boot/dts/imx53-ppd.dts +index 37d0cffea99c5..70c4a4852256c 100644 +--- a/arch/arm/boot/dts/imx53-ppd.dts b/arch/arm/boot/dts/imx53-ppd.dts +@@ -488,7 +488,7 @@ + scl-gpios = < 21 GPIO_ACTIVE_HIGH>; + status = "okay"; + +- i2c-switch@70 { ++ i2c-mux@70 { + compatible = "nxp,pca9547"; + #address-cells = <1>; + #size-cells = <0>; +diff --git a/arch/arm/boot/dts/vf610-zii-dev-rev-b.dts b/arch/arm/boot/dts/vf610-zii-dev-rev-b.dts +index 42ed4a04a12e2..6280c5e86a124 100644 +--- a/arch/arm/boot/dts/vf610-zii-dev-rev-b.dts b/arch/arm/boot/dts/vf610-zii-dev-rev-b.dts +@@ -345,7 +345,7 @@ + }; + + { +- tca9548@70 { ++ i2c-mux@70 { + compatible = "nxp,pca9548"; + pinctrl-0 = <_i2c_mux_reset>; + pinctrl-names = "default"; +diff --git a/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts b/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts +index de79dcfd32e62..ba2001f373158 100644 +--- a/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts b/arch/arm/boot/dts/vf610-zii-dev-rev-c.dts +@@ -340,7 +340,7 @@ + }; + + { +- tca9548@70 { ++ i2c-mux@70 { + compatible = "nxp,pca9548"; + pinctrl-0 = <_i2c_mux_reset>; + pinctrl-names = "default"; +diff --git a/arch/arm/mach-omap1/gpio15xx.c b/arch/arm/mach-omap1/gpio15xx.c +index c675f11de99db..61fa26efd8653 100644 +--- a/arch/arm/mach-omap1/gpio15xx.c b/arch/arm/mach-omap1/gpio15xx.c +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + + #include "irqs.h" + +diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts +index 5a8d85a7d1612..bbdf989058ff7 100644 +--- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts +@@ -110,7 +110,7 @@ + { + status = "okay"; + +- pca9547@77 { ++ i2c-mux@77 { + compatible = "nxp,pca9547"; + reg = <0x77>; + #address-cells = <1>; +diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts +index 9b726c2a48426..dda27ed7aaf2b 100644 +--- a/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1043a-qds.dts +@@ -89,7 +89,7 @@ + { + status = "okay"; + +- pca9547@77 { ++ i2c-mux@77 { + compatible = "nxp,pca9547"; + reg = <0x77>; + #address-cells = <1>; +diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts +index b2fcbba60d3ac..3b0ed9305f2bd 100644 +--- a/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1046a-qds.dts +@@ -88,7 +88,7 @@ + { + status = "okay"; + +- pca9547@77 { ++ i2c-mux@77 { + compatible = "nxp,pca9547"; + reg = <0x77>; + #address-cells = <1>; +diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts +index 41d8b15f25a54..aa52ff73ff9e0 100644 +--- a/arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts +@@ -53,7 +53,7 @@ + { + status = "okay"; + +- i2c-switch@77 { ++ i2c-mux@77 { + compatible = "nxp,pca9547"; + reg = <0x77>; + #address-cells = <1>; +diff --git
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: e34c0cb7d58c06e7245d9f5347d5da8e817b95ce Author: Mike Pagano gentoo org> AuthorDate: Thu Feb 2 19:01:33 2023 + Commit: Mike Pagano gentoo org> CommitDate: Thu Feb 2 19:01:33 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=e34c0cb7 gcc-plugins: drop -std=gnu++11 to fix GCC 13 build See: https://lore.kernel.org/all/20230201230009.2252783-1-sam gentoo.org/ Signed-off-by: Mike Pagano gentoo.org> _README| 4 ++ ...rop-std-gnu-plus-plus-to-fix-GCC-13-build.patch | 46 ++ 2 files changed, 50 insertions(+) diff --git a/_README b/_README index 0965d9a9..1f899f11 100644 --- a/_README +++ b/_README @@ -115,6 +115,10 @@ Patch: 2930_gcc-plugins-Reorg-gimple-incs-for-gcc-13.patch From: https://lore.kernel.org/lkml/mhng-8bc81919-3023-4d72-bd44-2443606b4fd7@palmer-ri-x1c9a/T/ Desc: gcc-plugins: Reorganize gimple includes for GCC 13 +Patch: 2940_gcc-plugins-drop-std-gnu-plus-plus-to-fix-GCC-13-build.patch +From: https://lore.kernel.org/all/20230201230009.2252783-1-...@gentoo.org/ +Desc: gcc-plugins: drop -std=gnu++11 to fix GCC 13 build + Patch: 3000_Support-printing-firmware-info.patch From: https://bugs.gentoo.org/732852 Desc: Print firmware info (Reqs CONFIG_GENTOO_PRINT_FIRMWARE_INFO). Thanks to Georgy Yakovlev diff --git a/2940_gcc-plugins-drop-std-gnu-plus-plus-to-fix-GCC-13-build.patch b/2940_gcc-plugins-drop-std-gnu-plus-plus-to-fix-GCC-13-build.patch new file mode 100644 index ..55797805 --- /dev/null +++ b/2940_gcc-plugins-drop-std-gnu-plus-plus-to-fix-GCC-13-build.patch @@ -0,0 +1,46 @@ +From 5a6b64adc18d9adfb497a529ff004d59b6df151f Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Wed, 1 Feb 2023 23:00:09 + +Subject: gcc-plugins: drop -std=gnu++11 to fix GCC 13 build + +The latest GCC 13 snapshot (13.0.1 20230129) gives the following: +``` +cc1: error: cannot load plugin ./scripts/gcc-plugins/randomize_layout_plugin.so + :./scripts/gcc-plugins/randomize_layout_plugin.so: undefined symbol: tree_code_type +``` + +This ends up being because of https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=b0241ce6e37031 +upstream in GCC which changes the visibility of some types used by the kernel's +plugin infrastructure like tree_code_type. + +After discussion with the GCC folks, we found that the kernel needs to be building +plugins with the same flags used to build GCC - and GCC defaults to gnu++17 +right now. The minimum GCC version needed to build the kernel is GCC 5.1 +and GCC 5.1 already defaults to gnu++14 anyway, so just drop the flag, as +all GCCs that could be used to build GCC already default to an acceptable +version which was >= the version we forced via flags until now. + +Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108634 +Signed-off-by: Sam James +Signed-off-by: Kees Cook +Link: https://lore.kernel.org/r/20230201230009.2252783-1-...@gentoo.org +--- + scripts/gcc-plugins/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/gcc-plugins/Makefile b/scripts/gcc-plugins/Makefile +index b34d11e226366..320afd3cf8e82 100644 +--- a/scripts/gcc-plugins/Makefile b/scripts/gcc-plugins/Makefile +@@ -29,7 +29,7 @@ GCC_PLUGINS_DIR = $(shell $(CC) -print-file-name=plugin) + plugin_cxxflags = -Wp,-MMD,$(depfile) $(KBUILD_HOSTCXXFLAGS) -fPIC \ + -include $(srctree)/include/linux/compiler-version.h \ + -DPLUGIN_VERSION=$(call stringify,$(KERNELVERSION)) \ +--I $(GCC_PLUGINS_DIR)/include -I $(obj) -std=gnu++11 \ ++-I $(GCC_PLUGINS_DIR)/include -I $(obj) \ + -fno-rtti -fno-exceptions -fasynchronous-unwind-tables \ + -ggdb -Wno-narrowing -Wno-unused-variable \ + -Wno-format-diag +-- +cgit +
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: f659ca60651a53d186ce854c3eefa8ad024cd0ba Author: Mike Pagano gentoo org> AuthorDate: Sun Jan 22 14:59:31 2023 + Commit: Mike Pagano gentoo org> CommitDate: Sun Jan 22 14:59:31 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=f659ca60 gcc-plugins: Reorganize gimple includes for GCC 13 Signed-off-by: Mike Pagano gentoo.org> _README| 4 +++ ..._gcc-plugins-Reorg-gimple-incs-for-gcc-13.patch | 41 ++ 2 files changed, 45 insertions(+) diff --git a/_README b/_README index eb8a606b..b3e83a42 100644 --- a/_README +++ b/_README @@ -103,6 +103,10 @@ Patch: 2920_sign-file-patch-for-libressl.patch From: https://bugs.gentoo.org/717166 Desc: sign-file: full functionality with modern LibreSSL +Patch: 2930_gcc-plugins-Reorg-gimple-incs-for-gcc-13.patch +From: https://lore.kernel.org/lkml/mhng-8bc81919-3023-4d72-bd44-2443606b4fd7@palmer-ri-x1c9a/T/ +Desc: gcc-plugins: Reorganize gimple includes for GCC 13 + Patch: 3000_Support-printing-firmware-info.patch From: https://bugs.gentoo.org/732852 Desc: Print firmware info (Reqs CONFIG_GENTOO_PRINT_FIRMWARE_INFO). Thanks to Georgy Yakovlev diff --git a/2930_gcc-plugins-Reorg-gimple-incs-for-gcc-13.patch b/2930_gcc-plugins-Reorg-gimple-incs-for-gcc-13.patch new file mode 100644 index ..0b454ec8 --- /dev/null +++ b/2930_gcc-plugins-Reorg-gimple-incs-for-gcc-13.patch @@ -0,0 +1,41 @@ +gcc-plugins: Reorganize gimple includes for GCC 13 + +The gimple-iterator.h header must be included before gimple-fold.h +starting with GCC 13. Reorganize gimple headers to work for all GCC +versions. + +Reported-by: Palmer Dabbelt +Link: https://lore.kernel.org/all/20230113173033.4380-1-pal...@rivosinc.com/ +Cc: linux-harden...@vger.kernel.org +Signed-off-by: Kees Cook +--- + scripts/gcc-plugins/gcc-common.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h +index 9a1895747b15..84c730da36dd 100644 +--- a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h +@@ -71,7 +71,9 @@ + #include "varasm.h" + #include "stor-layout.h" + #include "internal-fn.h" ++#include "gimple.h" + #include "gimple-expr.h" ++#include "gimple-iterator.h" + #include "gimple-fold.h" + #include "context.h" + #include "tree-ssa-alias.h" +@@ -85,10 +87,8 @@ + #include "tree-eh.h" + #include "stmt.h" + #include "gimplify.h" +-#include "gimple.h" + #include "tree-phinodes.h" + #include "tree-cfg.h" +-#include "gimple-iterator.h" + #include "gimple-ssa.h" + #include "ssa-iterators.h" + +-- +2.34.1
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 5018f7dec55afd5e3c786f4a2b0c2977ec6ead0c Author: Mike Pagano gentoo org> AuthorDate: Sat Jan 14 13:48:30 2023 + Commit: Mike Pagano gentoo org> CommitDate: Sat Jan 14 13:48:30 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=5018f7de Linux patch 6.1.6 Signed-off-by: Mike Pagano gentoo.org> _README| 4 + 1005_linux-6.1.6.patch | 861 + 2 files changed, 865 insertions(+) diff --git a/_README b/_README index f47a205a..9e9a8d04 100644 --- a/_README +++ b/_README @@ -63,6 +63,10 @@ Patch: 1004_linux-6.1.5.patch From: http://www.kernel.org Desc: Linux 6.1.5 +Patch: 1005_linux-6.1.6.patch +From: http://www.kernel.org +Desc: Linux 6.1.6 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1005_linux-6.1.6.patch b/1005_linux-6.1.6.patch new file mode 100644 index ..ad3754e5 --- /dev/null +++ b/1005_linux-6.1.6.patch @@ -0,0 +1,861 @@ +diff --git a/Makefile b/Makefile +index ddbd2fc917c59..19e8c6dec6e54 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 5 ++SUBLEVEL = 6 + EXTRAVERSION = + NAME = Hurr durr I'ma ninja sloth + +diff --git a/arch/parisc/include/uapi/asm/mman.h b/arch/parisc/include/uapi/asm/mman.h +index 22133a6a506ef..68c44f99bc931 100644 +--- a/arch/parisc/include/uapi/asm/mman.h b/arch/parisc/include/uapi/asm/mman.h +@@ -49,6 +49,19 @@ + #define MADV_DONTFORK 10 /* don't inherit across fork */ + #define MADV_DOFORK 11 /* do inherit across fork */ + ++#define MADV_MERGEABLE 12 /* KSM may merge identical pages */ ++#define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ ++ ++#define MADV_HUGEPAGE 14 /* Worth backing with hugepages */ ++#define MADV_NOHUGEPAGE 15/* Not worth backing with hugepages */ ++ ++#define MADV_DONTDUMP 16/* Explicity exclude from the core dump, ++ overrides the coredump filter bits */ ++#define MADV_DODUMP 17 /* Clear the MADV_NODUMP flag */ ++ ++#define MADV_WIPEONFORK 18/* Zero memory on fork, child only */ ++#define MADV_KEEPONFORK 19/* Undo MADV_WIPEONFORK */ ++ + #define MADV_COLD 20 /* deactivate these pages */ + #define MADV_PAGEOUT 21 /* reclaim these pages */ + +@@ -57,27 +70,13 @@ + + #define MADV_DONTNEED_LOCKED 24 /* like DONTNEED, but drop locked pages too */ + +-#define MADV_MERGEABLE 65 /* KSM may merge identical pages */ +-#define MADV_UNMERGEABLE 66 /* KSM may not merge identical pages */ +- +-#define MADV_HUGEPAGE 67 /* Worth backing with hugepages */ +-#define MADV_NOHUGEPAGE 68 /* Not worth backing with hugepages */ +- +-#define MADV_DONTDUMP 69/* Explicity exclude from the core dump, +- overrides the coredump filter bits */ +-#define MADV_DODUMP 70 /* Clear the MADV_NODUMP flag */ +- +-#define MADV_WIPEONFORK 71/* Zero memory on fork, child only */ +-#define MADV_KEEPONFORK 72/* Undo MADV_WIPEONFORK */ +- +-#define MADV_COLLAPSE 73 /* Synchronous hugepage collapse */ ++#define MADV_COLLAPSE 25 /* Synchronous hugepage collapse */ + + #define MADV_HWPOISON 100 /* poison a page for testing */ + #define MADV_SOFT_OFFLINE 101 /* soft offline page for testing */ + + /* compatibility flags */ + #define MAP_FILE 0 +-#define MAP_VARIABLE 0 + + #define PKEY_DISABLE_ACCESS 0x1 + #define PKEY_DISABLE_WRITE0x2 +diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c +index 848b0702005d6..09a34b07f02e6 100644 +--- a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c +@@ -465,3 +465,31 @@ asmlinkage long parisc_inotify_init1(int flags) + flags = FIX_O_NONBLOCK(flags); + return sys_inotify_init1(flags); + } ++ ++/* ++ * madvise() wrapper ++ * ++ * Up to kernel v6.1 parisc has different values than all other ++ * platforms for the MADV_xxx flags listed below. ++ * To keep binary compatibility with existing userspace programs ++ * translate the former values to the new values. ++ * ++ * XXX: Remove this wrapper in year 2025 (or later) ++ */ ++ ++asmlinkage notrace long parisc_madvise(unsigned long start, size_t len_in, int behavior) ++{ ++ switch (behavior) { ++ case 65: behavior = MADV_MERGEABLE; break; ++ case 66: behavior = MADV_UNMERGEABLE; break; ++ case 67: behavior = MADV_HUGEPAGE; break; ++ case 68: behavior = MADV_NOHUGEPAGE;break; ++ case 69: behavior = MADV_DONTDUMP;
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: cfad7fa18e7a38299e446e09aedf44360ddd829d Author: Mike Pagano gentoo org> AuthorDate: Thu Jan 12 15:25:25 2023 + Commit: Mike Pagano gentoo org> CommitDate: Thu Jan 12 15:25:25 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=cfad7fa1 maple_tree: fix mas_empty_area_rev() lower bound validation Signed-off-by: Mike Pagano gentoo.org> _README| 4 ++ ...ee-fix-mas-empty-area-rev-lower-bound-val.patch | 82 ++ 2 files changed, 86 insertions(+) diff --git a/_README b/_README index e8c453f1..f47a205a 100644 --- a/_README +++ b/_README @@ -75,6 +75,10 @@ Patch: 1700_sparc-address-warray-bound-warnings.patch From: https://github.com/KSPP/linux/issues/109 Desc: Address -Warray-bounds warnings +Patch: 1800_maple-tree-fix-mas-empty-area-rev-lower-bound-val.patch +From: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git +Desc: maple_tree: fix mas_empty_area_rev() lower bound validation + Patch: 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch From: https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-mar...@holtmann.org/raw Desc: Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. See bug #686758 diff --git a/1800_maple-tree-fix-mas-empty-area-rev-lower-bound-val.patch b/1800_maple-tree-fix-mas-empty-area-rev-lower-bound-val.patch new file mode 100644 index ..53075739 --- /dev/null +++ b/1800_maple-tree-fix-mas-empty-area-rev-lower-bound-val.patch @@ -0,0 +1,82 @@ +From ebc4c1bcc2a513bb2292dc73aa247b046bc846ce Mon Sep 17 00:00:00 2001 +From: Liam Howlett +Date: Wed, 11 Jan 2023 20:02:07 + +Subject: maple_tree: fix mas_empty_area_rev() lower bound validation + +mas_empty_area_rev() was not correctly validating the start of a gap +against the lower limit. This could lead to the range starting lower than +the requested minimum. + +Fix the issue by better validating a gap once one is found. + +This commit also adds tests to the maple tree test suite for this issue +and tests the mas_empty_area() function for similar bound checking. + +Link: https://lkml.kernel.org/r/20230111200136.1851322-1-liam.howl...@oracle.com +Link: https://bugzilla.kernel.org/show_bug.cgi?id=216911 +Fixes: 54a611b60590 ("Maple Tree: add new data structure") +Signed-off-by: Liam R. Howlett +Reported-by: + Link: https://lore.kernel.org/linux-mm/0b9f5425-08d4-8013-aa4c-e620c3b10...@leemhuis.info/ +Tested-by: Holger Hoffsttte +Cc: +Signed-off-by: Andrew Morton +--- + lib/maple_tree.c | 17 - + 1 file changed, 8 insertions(+), 9 deletions(-) + +(limited to 'lib/maple_tree.c') + +diff --git a/lib/maple_tree.c b/lib/maple_tree.c +index 26e2045d3cda9..b990ccea454ec 100644 +--- a/lib/maple_tree.c b/lib/maple_tree.c +@@ -4887,7 +4887,7 @@ static bool mas_rev_awalk(struct ma_state *mas, unsigned long size) + unsigned long *pivots, *gaps; + void __rcu **slots; + unsigned long gap = 0; +- unsigned long max, min, index; ++ unsigned long max, min; + unsigned char offset; + + if (unlikely(mas_is_err(mas))) +@@ -4909,8 +4909,7 @@ static bool mas_rev_awalk(struct ma_state *mas, unsigned long size) + min = mas_safe_min(mas, pivots, --offset); + + max = mas_safe_pivot(mas, pivots, offset, type); +- index = mas->index; +- while (index <= max) { ++ while (mas->index <= max) { + gap = 0; + if (gaps) + gap = gaps[offset]; +@@ -4941,10 +4940,8 @@ static bool mas_rev_awalk(struct ma_state *mas, unsigned long size) + min = mas_safe_min(mas, pivots, offset); + } + +- if (unlikely(index > max)) { +- mas_set_err(mas, -EBUSY); +- return false; +- } ++ if (unlikely((mas->index > max) || (size - 1 > max - mas->index))) ++ goto no_space; + + if (unlikely(ma_is_leaf(type))) { + mas->offset = offset; +@@ -4961,9 +4958,11 @@ static bool mas_rev_awalk(struct ma_state *mas, unsigned long size) + return false; + + ascend: +- if (mte_is_root(mas->node)) +- mas_set_err(mas, -EBUSY); ++ if (!mte_is_root(mas->node)) ++ return false; + ++no_space: ++ mas_set_err(mas, -EBUSY); + return false; + } + +-- +cgit +
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 7c26232904d6e8afce4197aacf2e2fa2a2afdcf1 Author: Mike Pagano gentoo org> AuthorDate: Wed Jan 4 11:37:35 2023 + Commit: Mike Pagano gentoo org> CommitDate: Wed Jan 4 11:37:35 2023 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=7c262329 Linux patch 6.1.3 Signed-off-by: Mike Pagano gentoo.org> _README|4 + 1002_linux-6.1.3.patch | 2606 2 files changed, 2610 insertions(+) diff --git a/_README b/_README index 7f1d2ce2..1fe5b8d9 100644 --- a/_README +++ b/_README @@ -51,6 +51,10 @@ Patch: 1001_linux-6.1.2.patch From: http://www.kernel.org Desc: Linux 6.1.2 +Patch: 1002_linux-6.1.3.patch +From: http://www.kernel.org +Desc: Linux 6.1.3 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1002_linux-6.1.3.patch b/1002_linux-6.1.3.patch new file mode 100644 index ..6909dce5 --- /dev/null +++ b/1002_linux-6.1.3.patch @@ -0,0 +1,2606 @@ +diff --git a/Documentation/trace/kprobes.rst b/Documentation/trace/kprobes.rst +index 48cf778a24680..fc7ce76eab655 100644 +--- a/Documentation/trace/kprobes.rst b/Documentation/trace/kprobes.rst +@@ -131,8 +131,7 @@ For example, if the function is non-recursive and is called with a + spinlock held, maxactive = 1 should be enough. If the function is + non-recursive and can never relinquish the CPU (e.g., via a semaphore + or preemption), NR_CPUS should be enough. If maxactive <= 0, it is +-set to a default value. If CONFIG_PREEMPT is enabled, the default +-is max(10, 2*NR_CPUS). Otherwise, the default is NR_CPUS. ++set to a default value: max(10, 2*NR_CPUS). + + It's not a disaster if you set maxactive too low; you'll just miss + some probes. In the kretprobe struct, the nmissed field is set to +diff --git a/Makefile b/Makefile +index 2ecc568c779fa..a69d14983a489 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 2 ++SUBLEVEL = 3 + EXTRAVERSION = + NAME = Hurr durr I'ma ninja sloth + +diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c +index e847f9b1c5b9f..767ab166933ba 100644 +--- a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c +@@ -889,6 +889,7 @@ void __noreturn rtas_halt(void) + + /* Must be in the RMO region, so we place it here */ + static char rtas_os_term_buf[2048]; ++static s32 ibm_os_term_token = RTAS_UNKNOWN_SERVICE; + + void rtas_os_term(char *str) + { +@@ -900,16 +901,20 @@ void rtas_os_term(char *str) +* this property may terminate the partition which we want to avoid +* since it interferes with panic_timeout. +*/ +- if (RTAS_UNKNOWN_SERVICE == rtas_token("ibm,os-term") || +- RTAS_UNKNOWN_SERVICE == rtas_token("ibm,extended-os-term")) ++ if (ibm_os_term_token == RTAS_UNKNOWN_SERVICE) + return; + + snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str); + ++ /* ++ * Keep calling as long as RTAS returns a "try again" status, ++ * but don't use rtas_busy_delay(), which potentially ++ * schedules. ++ */ + do { +- status = rtas_call(rtas_token("ibm,os-term"), 1, 1, NULL, ++ status = rtas_call(ibm_os_term_token, 1, 1, NULL, + __pa(rtas_os_term_buf)); +- } while (rtas_busy_delay(status)); ++ } while (rtas_busy_delay_time(status)); + + if (status != 0) + printk(KERN_EMERG "ibm,os-term call failed %d\n", status); +@@ -1277,6 +1282,13 @@ void __init rtas_initialize(void) + no_entry = of_property_read_u32(rtas.dev, "linux,rtas-entry", ); + rtas.entry = no_entry ? rtas.base : entry; + ++ /* ++ * Discover these now to avoid device tree lookups in the ++ * panic path. ++ */ ++ if (of_property_read_bool(rtas.dev, "ibm,extended-os-term")) ++ ibm_os_term_token = rtas_token("ibm,os-term"); ++ + /* If RTAS was found, allocate the RMO buffer for it and look for +* the stop-self token if any +*/ +diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c +index 3e3bd1a466464..7b894df32e320 100644 +--- a/block/bfq-iosched.c b/block/bfq-iosched.c +@@ -5383,8 +5383,8 @@ static void bfq_exit_icq_bfqq(struct bfq_io_cq *bic, bool is_sync) + unsigned long flags; + + spin_lock_irqsave(>lock, flags); +- bfq_exit_bfqq(bfqd, bfqq); + bic_set_bfqq(bic, NULL, is_sync); ++ bfq_exit_bfqq(bfqd, bfqq); + spin_unlock_irqrestore(>lock, flags); + } + } +diff --git a/block/blk.h b/block/blk.h +index a186ea20f39d8..8b75a95b28d60 100644 +--- a/block/blk.h b/block/blk.h +@@ -436,7 +436,7 @@ static inline struct kmem_cache
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: d9693e00e43bce95a9104cba1f4e710ba0918f36 Author: Alice Ferrazzi gentoo org> AuthorDate: Wed Dec 21 18:56:47 2022 + Commit: Alice Ferrazzi gentoo org> CommitDate: Wed Dec 21 18:57:43 2022 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=d9693e00 Linux patch 6.1.1 Signed-off-by: Alice Ferrazzi gentoo.org> _README|4 + 1000_linux-6.1.1.patch | 1127 2 files changed, 1131 insertions(+) diff --git a/_README b/_README index acaedd58..d85dd44f 100644 --- a/_README +++ b/_README @@ -43,6 +43,10 @@ EXPERIMENTAL Individual Patch Descriptions: -- +Patch: 1000_linux-6.1.1.patch +From: http://www.kernel.org +Desc: Linux 6.1.1 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1000_linux-6.1.1.patch b/1000_linux-6.1.1.patch new file mode 100644 index ..391da5ed --- /dev/null +++ b/1000_linux-6.1.1.patch @@ -0,0 +1,1127 @@ +diff --git a/Documentation/security/keys/trusted-encrypted.rst b/Documentation/security/keys/trusted-encrypted.rst +index 0bfb4c3397489..9bc9db8ec6517 100644 +--- a/Documentation/security/keys/trusted-encrypted.rst b/Documentation/security/keys/trusted-encrypted.rst +@@ -350,7 +350,8 @@ Load an encrypted key "evm" from saved blob:: + + Instantiate an encrypted key "evm" using user-provided decrypted data:: + +-$ keyctl add encrypted evm "new default user:kmk 32 `cat evm_decrypted_data.blob`" @u ++$ evmkey=$(dd if=/dev/urandom bs=1 count=32 | xxd -c32 -p) ++$ keyctl add encrypted evm "new default user:kmk 32 $evmkey" @u + 794890253 + + $ keyctl print 794890253 +diff --git a/Makefile b/Makefile +index 997b677222920..7307ae6c2ef72 100644 +--- a/Makefile b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 6 + PATCHLEVEL = 1 +-SUBLEVEL = 0 ++SUBLEVEL = 1 + EXTRAVERSION = + NAME = Hurr durr I'ma ninja sloth + +diff --git a/arch/mips/include/asm/mach-ralink/mt7621.h b/arch/mips/include/asm/mach-ralink/mt7621.h +index 6bbf082dd149e..79d5bb0e06d63 100644 +--- a/arch/mips/include/asm/mach-ralink/mt7621.h b/arch/mips/include/asm/mach-ralink/mt7621.h +@@ -7,10 +7,12 @@ + #ifndef _MT7621_REGS_H_ + #define _MT7621_REGS_H_ + ++#define IOMEM(x) ((void __iomem *)(KSEG1ADDR(x))) ++ + #define MT7621_PALMBUS_BASE 0x1C00 + #define MT7621_PALMBUS_SIZE 0x03FF + +-#define MT7621_SYSC_BASE 0x1E00 ++#define MT7621_SYSC_BASE IOMEM(0x1E00) + + #define SYSC_REG_CHIP_NAME0 0x00 + #define SYSC_REG_CHIP_NAME1 0x04 +diff --git a/arch/mips/ralink/mt7621.c b/arch/mips/ralink/mt7621.c +index fb0565bc34fda..bbf5811afbf2c 100644 +--- a/arch/mips/ralink/mt7621.c b/arch/mips/ralink/mt7621.c +@@ -25,6 +25,7 @@ + #define MT7621_MEM_TEST_PATTERN 0xaaaa + + static u32 detect_magic __initdata; ++static struct ralink_soc_info *soc_info_ptr; + + int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) + { +@@ -97,41 +98,83 @@ void __init ralink_of_remap(void) + panic("Failed to remap core resources"); + } + +-static void soc_dev_init(struct ralink_soc_info *soc_info, u32 rev) ++static unsigned int __init mt7621_get_soc_name0(void) ++{ ++ return __raw_readl(MT7621_SYSC_BASE + SYSC_REG_CHIP_NAME0); ++} ++ ++static unsigned int __init mt7621_get_soc_name1(void) ++{ ++ return __raw_readl(MT7621_SYSC_BASE + SYSC_REG_CHIP_NAME1); ++} ++ ++static bool __init mt7621_soc_valid(void) ++{ ++ if (mt7621_get_soc_name0() == MT7621_CHIP_NAME0 && ++ mt7621_get_soc_name1() == MT7621_CHIP_NAME1) ++ return true; ++ else ++ return false; ++} ++ ++static const char __init *mt7621_get_soc_id(void) ++{ ++ if (mt7621_soc_valid()) ++ return "MT7621"; ++ else ++ return "invalid"; ++} ++ ++static unsigned int __init mt7621_get_soc_rev(void) ++{ ++ return __raw_readl(MT7621_SYSC_BASE + SYSC_REG_CHIP_REV); ++} ++ ++static unsigned int __init mt7621_get_soc_ver(void) ++{ ++ return (mt7621_get_soc_rev() >> CHIP_REV_VER_SHIFT) & CHIP_REV_VER_MASK; ++} ++ ++static unsigned int __init mt7621_get_soc_eco(void) ++{ ++ return (mt7621_get_soc_rev() & CHIP_REV_ECO_MASK); ++} ++ ++static const char __init *mt7621_get_soc_revision(void) ++{ ++ if (mt7621_get_soc_rev() == 1 && mt7621_get_soc_eco() == 1) ++ return "E2"; ++ else ++ return "E1"; ++} ++ ++static int __init mt7621_soc_dev_init(void) + { + struct soc_device *soc_dev; + struct soc_device_attribute *soc_dev_attr; + + soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); + if (!soc_dev_attr) +-
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 13932c5603ee74cb23015e86fe92af652c8cad09 Author: Mike Pagano gentoo org> AuthorDate: Fri Dec 16 19:43:32 2022 + Commit: Mike Pagano gentoo org> CommitDate: Fri Dec 16 19:43:32 2022 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=13932c56 Update CPU optimization patch Signed-off-by: Mike Pagano gentoo.org> 5010_enable-cpu-optimizations-universal.patch | 217 +++--- 1 file changed, 159 insertions(+), 58 deletions(-) diff --git a/5010_enable-cpu-optimizations-universal.patch b/5010_enable-cpu-optimizations-universal.patch index b9c03cb6..0841340b 100644 --- a/5010_enable-cpu-optimizations-universal.patch +++ b/5010_enable-cpu-optimizations-universal.patch @@ -1,10 +1,7 @@ -From b5892719c43f739343c628e3d357471a3bdaa368 Mon Sep 17 00:00:00 2001 -From: graysky -Date: Tue, 15 Mar 2022 05:58:43 -0400 +From a0825feea3f100656d58446885b5f190284fd219 +From: graysky +Date: Fri, 4 Nov 2022 15:34:36 -0400 Subject: [PATCH] more uarches for kernel 5.17+ -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit FEATURES This patch adds additional CPU options to the Linux kernel accessible under: @@ -36,6 +33,7 @@ CPU-specific microarchitectures include: • AMD Family 17h (Zen) • AMD Family 17h (Zen 2) • AMD Family 19h (Zen 3)† +• AMD Family 19h (Zen 4)§ • Intel Silvermont low-power processors • Intel Goldmont low-power processors (Apollo Lake and Denverton) • Intel Goldmont Plus low-power processors (Gemini Lake) @@ -55,11 +53,14 @@ CPU-specific microarchitectures include: • Intel 3rd Gen 10nm++ Xeon (Sapphire Rapids)‡ • Intel 11th Gen i3/i5/i7/i9-family (Rocket Lake)‡ • Intel 12th Gen i3/i5/i7/i9-family (Alder Lake)‡ +• Intel 13th Gen i3/i5/i7/i9-family (Raptor Lake)§ +• Intel 14th Gen i3/i5/i7/i9-family (Meteor Lake)§ Notes: If not otherwise noted, gcc >=9.1 is required for support. *Requires gcc >=10.1 or clang >=10.0 †Required gcc >=10.3 or clang >=12.0 ‡Required gcc >=11.1 or clang >=12.0 + §Required gcc >=13.0 or clang >=15.0.5 It also offers to compile passing the 'native' option which, "selects the CPU to generate code for at compilation time by determining the processor type of @@ -99,20 +100,19 @@ REFERENCES 4. https://github.com/graysky2/kernel_gcc_patch/issues/15 5. http://www.linuxforge.net/docs/linux/linux-gcc.php -Signed-off-by: graysky --- - arch/x86/Kconfig.cpu| 332 ++-- - arch/x86/Makefile | 40 +++- - arch/x86/include/asm/vermagic.h | 66 +++ - 3 files changed, 424 insertions(+), 14 deletions(-) + arch/x86/Kconfig.cpu| 416 ++-- + arch/x86/Makefile | 43 +++- + arch/x86/include/asm/vermagic.h | 72 ++ + 3 files changed, 514 insertions(+), 17 deletions(-) diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu -index 542377cd419d..22b919cdb6d1 100644 +index 542377cd419d..08d887d1220d 100644 --- a/arch/x86/Kconfig.cpu +++ b/arch/x86/Kconfig.cpu @@ -157,7 +157,7 @@ config MPENTIUM4 - - + + config MK6 - bool "K6/K6-II/K6-III" + bool "AMD K6/K6-II/K6-III" @@ -121,16 +121,16 @@ index 542377cd419d..22b919cdb6d1 100644 Select this for an AMD K6-family processor. Enables use of @@ -165,7 +165,7 @@ config MK6 flags to GCC. - + config MK7 - bool "Athlon/Duron/K7" + bool "AMD Athlon/Duron/K7" depends on X86_32 help Select this for an AMD Athlon K7-family processor. Enables use of -@@ -173,12 +173,98 @@ config MK7 +@@ -173,12 +173,106 @@ config MK7 flags to GCC. - + config MK8 - bool "Opteron/Athlon64/Hammer/K8" + bool "AMD Opteron/Athlon64/Hammer/K8" @@ -138,7 +138,7 @@ index 542377cd419d..22b919cdb6d1 100644 Select this for an AMD Opteron or Athlon64 Hammer-family processor. Enables use of some extended instructions, and passes appropriate optimization flags to GCC. - + +config MK8SSE3 + bool "AMD Opteron/Athlon64/Hammer/K8 with SSE3" + help @@ -224,32 +224,40 @@ index 542377cd419d..22b919cdb6d1 100644 +Select this for AMD Family 19h Zen 3 processors. + +Enables -march=znver3 ++ ++config MZEN4 ++ bool "AMD Zen 4" ++ depends on (CC_IS_GCC && GCC_VERSION >= 13) || (CC_IS_CLANG && CLANG_VERSION >= 150500) ++ help ++Select this for AMD Family 19h Zen 4 processors. ++ ++Enables -march=znver4 + config MCRUSOE bool "Crusoe" depends on X86_32 -@@ -270,7 +356,7 @@ config MPSC +@@ -270,7 +364,7 @@ config MPSC in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one. - + config MCORE2 - bool "Core 2/newer Xeon" + bool "Intel Core 2" help - + Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and -@@ -278,6 +364,8 @@ config MCORE2 +@@ -278,6
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: b3e9a3f6269e7e72eb6a51ca19dc85e2201fb843 Author: Mike Pagano gentoo org> AuthorDate: Sun Dec 11 23:32:12 2022 + Commit: Mike Pagano gentoo org> CommitDate: Sun Dec 11 23:32:12 2022 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=b3e9a3f6 Remove redundant patch Removed: 2010_netfilter-ctnetlink-compilation-fix.patch Signed-off-by: Mike Pagano gentoo.org> _README| 4 -- 2010_netfilter-ctnetlink-compilation-fix.patch | 90 -- 2 files changed, 94 deletions(-) diff --git a/_README b/_README index 528708c1..5e68531e 100644 --- a/_README +++ b/_README @@ -59,10 +59,6 @@ Patch: 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch From: https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-mar...@holtmann.org/raw Desc: Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. See bug #686758 -Patch: 2010_netfilter-ctnetlink-compilation-fix.patch -From: https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git -Desc: netfilter: ctnetlink: fix compilation warning after data race fixes in ct mark - Patch: 2900_tmp513-Fix-build-issue-by-selecting-CONFIG_REG.patch From: https://bugs.gentoo.org/710790 Desc: tmp513 requies REGMAP_I2C to build. Select it by default in Kconfig. See bug #710790. Thanks to Phil Stracchino diff --git a/2010_netfilter-ctnetlink-compilation-fix.patch b/2010_netfilter-ctnetlink-compilation-fix.patch deleted file mode 100644 index b7bd4dee.. --- a/2010_netfilter-ctnetlink-compilation-fix.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 1feeae071507ad65cf9f462a1bdd543a4bf89e71 Mon Sep 17 00:00:00 2001 -From: Pablo Neira Ayuso -Date: Mon, 28 Nov 2022 10:58:53 +0100 -Subject: netfilter: ctnetlink: fix compilation warning after data race fixes - in ct mark - -All warnings (new ones prefixed by >>): - - net/netfilter/nf_conntrack_netlink.c: In function '__ctnetlink_glue_build': ->> net/netfilter/nf_conntrack_netlink.c:2674:13: warning: unused variable 'mark' [-Wunused-variable] -2674 | u32 mark; - | ^~~~ - -Fixes: 52d1aa8b8249 ("netfilter: conntrack: Fix data-races around ct mark") -Reported-by: kernel test robot -Tested-by: Ivan Babrou -Signed-off-by: Pablo Neira Ayuso - net/netfilter/nf_conntrack_netlink.c | 19 ++- - 1 file changed, 10 insertions(+), 9 deletions(-) - -diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c -index d71150a40fb08..1286ae7d46096 100644 a/net/netfilter/nf_conntrack_netlink.c -+++ b/net/netfilter/nf_conntrack_netlink.c -@@ -328,8 +328,13 @@ nla_put_failure: - } - - #ifdef CONFIG_NF_CONNTRACK_MARK --static int ctnetlink_dump_mark(struct sk_buff *skb, u32 mark) -+static int ctnetlink_dump_mark(struct sk_buff *skb, const struct nf_conn *ct) - { -+ u32 mark = READ_ONCE(ct->mark); -+ -+ if (!mark) -+ return 0; -+ - if (nla_put_be32(skb, CTA_MARK, htonl(mark))) - goto nla_put_failure; - return 0; -@@ -543,7 +548,7 @@ static int ctnetlink_dump_extinfo(struct sk_buff *skb, - static int ctnetlink_dump_info(struct sk_buff *skb, struct nf_conn *ct) - { - if (ctnetlink_dump_status(skb, ct) < 0 || -- ctnetlink_dump_mark(skb, READ_ONCE(ct->mark)) < 0 || -+ ctnetlink_dump_mark(skb, ct) < 0 || - ctnetlink_dump_secctx(skb, ct) < 0 || - ctnetlink_dump_id(skb, ct) < 0 || - ctnetlink_dump_use(skb, ct) < 0 || -@@ -722,7 +727,6 @@ ctnetlink_conntrack_event(unsigned int events, const struct nf_ct_event *item) - struct sk_buff *skb; - unsigned int type; - unsigned int flags = 0, group; -- u32 mark; - int err; - - if (events & (1 << IPCT_DESTROY)) { -@@ -827,9 +831,8 @@ ctnetlink_conntrack_event(unsigned int events, const struct nf_ct_event *item) - } - - #ifdef CONFIG_NF_CONNTRACK_MARK -- mark = READ_ONCE(ct->mark); -- if ((events & (1 << IPCT_MARK) || mark) && -- ctnetlink_dump_mark(skb, mark) < 0) -+ if (events & (1 << IPCT_MARK) && -+ ctnetlink_dump_mark(skb, ct) < 0) - goto nla_put_failure; - #endif - nlmsg_end(skb, nlh); -@@ -2671,7 +2674,6 @@ static int __ctnetlink_glue_build(struct sk_buff *skb, struct nf_conn *ct) - { - const struct nf_conntrack_zone *zone; - struct nlattr *nest_parms; -- u32 mark; - - zone = nf_ct_zone(ct); - -@@ -2733,8 +2735,7 @@ static int __ctnetlink_glue_build(struct sk_buff *skb, struct nf_conn *ct) - goto nla_put_failure; - - #ifdef CONFIG_NF_CONNTRACK_MARK -- mark = READ_ONCE(ct->mark); -- if (mark && ctnetlink_dump_mark(skb, mark) < 0) -+ if (ctnetlink_dump_mark(skb, ct) < 0) - goto nla_put_failure; - #endif - if (ctnetlink_dump_labels(skb, ct) < 0) --- -cgit -
[gentoo-commits] proj/linux-patches:6.1 commit in: /
commit: 2009fbd52bfcd103d36a829e6d8f6ded19de3fdf Author: Mike Pagano gentoo org> AuthorDate: Sun Dec 11 14:28:34 2022 + Commit: Mike Pagano gentoo org> CommitDate: Sun Dec 11 14:28:34 2022 + URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=2009fbd5 netfilter: ctnetlink fix compl. warning after data race fixes in ct mark Bug: https://bugs.gentoo.org/884585 Signed-off-by: Mike Pagano gentoo.org> _README| 4 ++ 2010_netfilter-ctnetlink-compilation-fix.patch | 90 ++ 2 files changed, 94 insertions(+) diff --git a/_README b/_README index 5e68531e..528708c1 100644 --- a/_README +++ b/_README @@ -59,6 +59,10 @@ Patch: 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch From: https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-mar...@holtmann.org/raw Desc: Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. See bug #686758 +Patch: 2010_netfilter-ctnetlink-compilation-fix.patch +From: https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git +Desc: netfilter: ctnetlink: fix compilation warning after data race fixes in ct mark + Patch: 2900_tmp513-Fix-build-issue-by-selecting-CONFIG_REG.patch From: https://bugs.gentoo.org/710790 Desc: tmp513 requies REGMAP_I2C to build. Select it by default in Kconfig. See bug #710790. Thanks to Phil Stracchino diff --git a/2010_netfilter-ctnetlink-compilation-fix.patch b/2010_netfilter-ctnetlink-compilation-fix.patch new file mode 100644 index ..b7bd4dee --- /dev/null +++ b/2010_netfilter-ctnetlink-compilation-fix.patch @@ -0,0 +1,90 @@ +From 1feeae071507ad65cf9f462a1bdd543a4bf89e71 Mon Sep 17 00:00:00 2001 +From: Pablo Neira Ayuso +Date: Mon, 28 Nov 2022 10:58:53 +0100 +Subject: netfilter: ctnetlink: fix compilation warning after data race fixes + in ct mark + +All warnings (new ones prefixed by >>): + + net/netfilter/nf_conntrack_netlink.c: In function '__ctnetlink_glue_build': +>> net/netfilter/nf_conntrack_netlink.c:2674:13: warning: unused variable 'mark' [-Wunused-variable] +2674 | u32 mark; + | ^~~~ + +Fixes: 52d1aa8b8249 ("netfilter: conntrack: Fix data-races around ct mark") +Reported-by: kernel test robot +Tested-by: Ivan Babrou +Signed-off-by: Pablo Neira Ayuso +--- + net/netfilter/nf_conntrack_netlink.c | 19 ++- + 1 file changed, 10 insertions(+), 9 deletions(-) + +diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c +index d71150a40fb08..1286ae7d46096 100644 +--- a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c +@@ -328,8 +328,13 @@ nla_put_failure: + } + + #ifdef CONFIG_NF_CONNTRACK_MARK +-static int ctnetlink_dump_mark(struct sk_buff *skb, u32 mark) ++static int ctnetlink_dump_mark(struct sk_buff *skb, const struct nf_conn *ct) + { ++ u32 mark = READ_ONCE(ct->mark); ++ ++ if (!mark) ++ return 0; ++ + if (nla_put_be32(skb, CTA_MARK, htonl(mark))) + goto nla_put_failure; + return 0; +@@ -543,7 +548,7 @@ static int ctnetlink_dump_extinfo(struct sk_buff *skb, + static int ctnetlink_dump_info(struct sk_buff *skb, struct nf_conn *ct) + { + if (ctnetlink_dump_status(skb, ct) < 0 || +- ctnetlink_dump_mark(skb, READ_ONCE(ct->mark)) < 0 || ++ ctnetlink_dump_mark(skb, ct) < 0 || + ctnetlink_dump_secctx(skb, ct) < 0 || + ctnetlink_dump_id(skb, ct) < 0 || + ctnetlink_dump_use(skb, ct) < 0 || +@@ -722,7 +727,6 @@ ctnetlink_conntrack_event(unsigned int events, const struct nf_ct_event *item) + struct sk_buff *skb; + unsigned int type; + unsigned int flags = 0, group; +- u32 mark; + int err; + + if (events & (1 << IPCT_DESTROY)) { +@@ -827,9 +831,8 @@ ctnetlink_conntrack_event(unsigned int events, const struct nf_ct_event *item) + } + + #ifdef CONFIG_NF_CONNTRACK_MARK +- mark = READ_ONCE(ct->mark); +- if ((events & (1 << IPCT_MARK) || mark) && +- ctnetlink_dump_mark(skb, mark) < 0) ++ if (events & (1 << IPCT_MARK) && ++ ctnetlink_dump_mark(skb, ct) < 0) + goto nla_put_failure; + #endif + nlmsg_end(skb, nlh); +@@ -2671,7 +2674,6 @@ static int __ctnetlink_glue_build(struct sk_buff *skb, struct nf_conn *ct) + { + const struct nf_conntrack_zone *zone; + struct nlattr *nest_parms; +- u32 mark; + + zone = nf_ct_zone(ct); + +@@ -2733,8 +2735,7 @@ static int __ctnetlink_glue_build(struct sk_buff *skb, struct nf_conn *ct) + goto nla_put_failure; + + #ifdef CONFIG_NF_CONNTRACK_MARK +- mark = READ_ONCE(ct->mark); +- if (mark && ctnetlink_dump_mark(skb, mark) < 0) ++ if (ctnetlink_dump_mark(skb, ct) < 0) + goto nla_put_failure; + #endif + if (ctnetlink_dump_labels(skb, ct) <