Unverified Commit 0993c620 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!6859 [openEuler-24.03-LTS][linux-6.6.y sync] Backport 6.6.23-6.6.30 LTS Patches

Merge Pull Request from: @anred 
 
Backport 6.6.23-6.6.30 LTS to OLK-6.6.

The commits in this PR are all LTS patches without conflicts.

6.6.23-6.6.30
Conflicts:
Already merged(52):
 hwtracing: hisi_ptt: Move type check to the beginning of hisi_ptt_pmu_event_init()
 nfs: fix panic when nfs4_ff_layout_prepare_ds() fails
 perf/x86/amd/core: Avoid register reset when CPU is dead
 f2fs: fix to truncate meta inode pages forcely
 f2fs: introduce f2fs_invalidate_internal_cache() for cleanup
 RDMA/hns: Fix mis-modifying default congestion control algorithm
 f2fs: fix NULL pointer dereference in f2fs_submit_page_write()
 media: pvrusb2: fix uaf in pvr2_context_set_notify
 crypto: qat - fix ring to service map for dcc in 4xxx
 crypto: qat - relocate and rename get_service_enabled()
 crypto: qat - move adf_cfg_services
 crypto: qat - avoid division by zero
 erofs: fix handling kern_mount() failure
 erofs: Convert to use bdev_open_by_path()
 block: Provide bdev_open_* functions
 net: hns3: fix port duplex configure error in IMP reset
 net: hns3: fix kernel crash when 1588 is received on HIP08 devices
 net: hns3: fix wrong judgment condition issues
 sr9800: Add check for usbnet_get_endpoints
 ACPI: processor_idle: Fix memory leak in acpi_processor_power_exit()
 sched/fair: Take the scheduling domain into account in select_idle_core()
 sched/fair: Take the scheduling domain into account in select_idle_smt()
 nbd: null check for nla_nest_start
 iomap: clear the per-folio dirty bits on all writeback failures
 do_sys_name_to_handle(): use kzalloc() to fix kernel-infoleak
 Bluetooth: rfcomm: Fix null-ptr-deref in rfcomm_check_security
 btrfs: fix data race at btrfs_use_block_rsv() when accessing block reserve
 btrfs: fix data races when accessing the reserved amount of block reserves
 scsi: libsas: Fix disk not being scanned in after being removed
 scsi: libsas: Add a helper sas_get_sas_addr_and_dev_type()
 ALSA: sh: aica: reorder cleanup operations to avoid UAF bugs
 xfs: fix perag leak when growfs fails
 xfs: add lock protection when remove perag from radix tree
 tpm,tpm_tis: Avoid warning splat at shutdown
 ubi: Check for too small LEB size in VTBL code
 crypto: qat - resolve race condition during AER recovery
 scsi: hisi_sas: Modify the deadline for ata_wait_after_reset()
 perf/x86/amd/lbr: Discard erroneous branch entries
 drivers/perf: hisi: Enable HiSilicon Erratum 162700402 quirk for HIP09
 SUNRPC: Fix a slow server-side memory leak with RPC-over-TCP
 scsi: sd: Unregister device if device_add_disk() failed in sd_probe()
 modpost: Optimize symbol search from linear to binary search
 perf/x86/amd/lbr: Use freeze based on availability
 perf/x86/amd/core: Update and fix stalled-cycles-* events for Zen 2 and later
 x86/CPU/AMD: Add X86_FEATURE_ZEN1
 x86/CPU/AMD: Get rid of amd_erratum_1054[]
 x86/CPU/AMD: Move the DIV0 bug detection to the Zen1 init function
 x86/CPU/AMD: Move Zenbleed check to the Zen2 init function
 x86/CPU/AMD: Move erratum 1076 fix into the Zen1 init function
 x86/CPU/AMD: Carve out the erratum 1386 fix
 x86/CPU/AMD: Add ZenX generations flags
 quota: Fix potential NULL pointer dereference

Rejected(21):
 x86/resctrl: Implement new mba_MBps throttling heuristic 
 x86/resctrl: Read supported bandwidth sources from CPUID
 x86/resctrl: Remove hard-coded memory bandwidth limit
 workqueue: Don't call cpumask_test_cpu() with -1 CPU in wq_update_node_max_active()
 workqueue: Implement system-wide nr_active enforcement for unbound workqueues
 workqueue: RCU protect wq->dfl_pwq and implement accessors for it
 efi/libstub: Cast away type warning in use of max()
 efi/libstub: fix efi_random_alloc() to allocate memory at alloc_min or higher address
 Revert "workqueue: RCU protect wq->dfl_pwq and implement accessors for it"
 Revert "workqueue: Implement system-wide nr_active enforcement for unbound workqueues"
 Revert "workqueue: Don't call cpumask_test_cpu() with -1 CPU in wq_update_node_max_active()"
 mm: turn folio_test_hugetlb into a PageType
 mm/hugetlb: fix missing hugetlb_lock for resv uncharge
 fork: defer linking file vma until vma is fully initialized
 drm/ttm: stop pooling cached NUMA pages v2
 mm, treewide: introduce NR_PAGE_ORDERS
 netfilter: br_netfilter: skip conntrack input hook for promisc packets
 kernfs: RCU protect kernfs_nodes and avoid kernfs_idr_lock in kernfs_find_and_get_node_by_id()
 bpf: support deferring bpf_link dealloc to after RCU grace period
 x86/cpufeatures: Add CPUID_LNX_5 to track recently added Linux-defined word
 x86/cpufeatures: Add new word for scattered features

Tag Commit(8):
 Linux 6.6.23
 Linux 6.6.24
 Linux 6.6.25
 Linux 6.6.26
 Linux 6.6.27
 Linux 6.6.28
 Linux 6.6.29
 Linux 6.6.30

update oedefconfig(1):
 x86: update openeuler_defconfig for x86_64

```
git log --oneline v6.6.22..v6.6.30 | wc -l
1873
```

Total patches: 1873 - 8 - 52 - 21 + 1 = 1792

Build and boot test passed for arm64 & x86. 
 
Link:https://gitee.com/openeuler/kernel/pulls/6859

 

Reviewed-by: default avatarsanglipeng <sanglipeng1@jd.com>
Reviewed-by: default avatarJason Zeng <jason.zeng@intel.com>
Signed-off-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parents afd82dd9 44c29bcd
Loading
Loading
Loading
Loading
+38 −6
Original line number Diff line number Diff line
@@ -138,11 +138,10 @@ associated with the source address of the indirect branch. Specifically,
the BHB might be shared across privilege levels even in the presence of
Enhanced IBRS.

Currently the only known real-world BHB attack vector is via
unprivileged eBPF. Therefore, it's highly recommended to not enable
unprivileged eBPF, especially when eIBRS is used (without retpolines).
For a full mitigation against BHB attacks, it's recommended to use
retpolines (or eIBRS combined with retpolines).
Previously the only known real-world BHB attack vector was via unprivileged
eBPF. Further research has found attacks that don't require unprivileged eBPF.
For a full mitigation against BHB attacks it is recommended to set BHI_DIS_S or
use the BHB clearing sequence.

Attack scenarios
----------------
@@ -430,6 +429,23 @@ The possible values in this file are:
  'PBRSB-eIBRS: Not affected'  CPU is not affected by PBRSB
  ===========================  =======================================================

  - Branch History Injection (BHI) protection status:

.. list-table::

 * - BHI: Not affected
   - System is not affected
 * - BHI: Retpoline
   - System is protected by retpoline
 * - BHI: BHI_DIS_S
   - System is protected by BHI_DIS_S
 * - BHI: SW loop, KVM SW loop
   - System 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
report vulnerability.
@@ -484,7 +500,11 @@ Spectre variant 2

   Systems which support enhanced IBRS (eIBRS) enable IBRS protection once at
   boot, by setting the IBRS bit, and they're automatically protected against
   Spectre v2 variant attacks.
   some Spectre v2 variant attacks. The BHB can still influence the choice of
   indirect branch predictor entry, and although branch predictor entries are
   isolated between modes when eIBRS is enabled, the BHB itself is not isolated
   between modes. Systems which support BHI_DIS_S will set it to protect against
   BHI attacks.

   On Intel's enhanced IBRS systems, this includes cross-thread branch target
   injections on SMT systems (STIBP). In other words, Intel eIBRS enables
@@ -638,6 +658,18 @@ kernel command line.
		spectre_v2=off. Spectre variant 1 mitigations
		cannot be disabled.

	spectre_bhi=

		[X86] Control mitigation of Branch History Injection
		(BHI) vulnerability.  This setting affects the deployment
		of the HW BHI control and the SW BHB clearing sequence.

		on
			(default) Enable the HW or SW mitigation as
			needed.
		off
			Disable the mitigation.

For spectre_v2_user see Documentation/admin-guide/kernel-parameters.txt

Mitigation selection guide
+14 −3
Original line number Diff line number Diff line
@@ -3343,9 +3343,7 @@

	mem_encrypt=	[X86-64] AMD Secure Memory Encryption (SME) control
			Valid arguments: on, off
			Default (depends on kernel configuration option):
			  on  (CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT=y)
			  off (CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT=n)
			Default: off
			mem_encrypt=on:		Activate SME
			mem_encrypt=off:	Do not activate SME

@@ -3424,6 +3422,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]
@@ -6041,6 +6040,15 @@
	sonypi.*=	[HW] Sony Programmable I/O Control Device driver
			See Documentation/admin-guide/laptops/sonypi.rst

	spectre_bhi=	[X86] Control mitigation of Branch History Injection
			(BHI) vulnerability.  This setting affects the
			deployment of the HW BHI control and the SW BHB
			clearing sequence.

			on   - (default) Enable the HW or SW mitigation
			       as needed.
			off  - Disable the mitigation.

	spectre_v2=	[X86] Control mitigation of Spectre variant 2
			(indirect branch speculation) vulnerability.
			The default operation protects the kernel from
@@ -6964,6 +6972,9 @@
					pause after every control message);
				o = USB_QUIRK_HUB_SLOW_RESET (Hub needs extra
					delay after resetting its port);
				p = USB_QUIRK_SHORT_SET_ADDRESS_REQ_TIMEOUT
					(Reduce timeout of the SET_ADDRESS
					request from 5000 ms to 500 ms);
			Example: quirks=0781:5580:bk,0a5c:5834:gij

	usbhid.mousepoll=
+5 −0
Original line number Diff line number Diff line
@@ -205,6 +205,11 @@ Will increase power usage.

Default: 0 (off)

mem_pcpu_rsv
------------

Per-cpu reserved forward alloc cache size in page units. Default 1MB per CPU.

rmem_default
------------

+8 −8
Original line number Diff line number Diff line
@@ -87,14 +87,14 @@ The state of SME in the Linux kernel can be documented as follows:
	  kernel is non-zero).

SME can also be enabled and activated in the BIOS. If SME is enabled and
activated in the BIOS, then all memory accesses will be encrypted and it will
not be necessary to activate the Linux memory encryption support.  If the BIOS
merely enables SME (sets bit 23 of the MSR_AMD64_SYSCFG), then Linux can activate
memory encryption by default (CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT=y) or
by supplying mem_encrypt=on on the kernel command line.  However, if BIOS does
not enable SME, then Linux will not be able to activate memory encryption, even
if configured to do so by default or the mem_encrypt=on command line parameter
is specified.
activated in the BIOS, then all memory accesses will be encrypted and it
will not be necessary to activate the Linux memory encryption support.

If the BIOS merely enables SME (sets bit 23 of the MSR_AMD64_SYSCFG),
then memory encryption can be enabled by supplying mem_encrypt=on on the
kernel command line.  However, if BIOS does not enable SME, then Linux
will not be able to activate memory encryption, even if configured to do
so by default or the mem_encrypt=on command line parameter is specified.

Secure Nested Paging (SNP)
==========================
+3 −3
Original line number Diff line number Diff line
@@ -345,9 +345,9 @@ sys.stderr.write("Using %s theme\n" % html_theme)
html_static_path = ['sphinx-static']

# If true, Docutils "smart quotes" will be used to convert quotes and dashes
# to typographically correct entities.  This will convert "--" to "—",
# which is not always what we want, so disable it.
smartquotes = False
# to typographically correct entities.  However, conversion of "--" to "—"
# is not always what we want, so enable only quotes.
smartquotes_action = 'q'

# Custom sidebar templates, maps document names to template names.
# Note that the RTD theme ignores this
Loading