Unverified Commit 96abc38d authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!390 Backport 5.10.142 LTS

Merge Pull Request from: @zhangjialin11 
 
Backport 5.10.142 LTS patches from upstream.

Conflicts:

Already merged(5):
abe3cfb7a7c8 USB: core: Prevent nested device-reset calls
587f793c64d9 media: mceusb: Use new usb_control_msg_*() routines
9629f2dfdb1d binder: fix UAF of ref->proc caused by race condition
19e3f69d1980 staging: rtl8712: fix use after free bugs
c5f975e3ebfa bpf, cgroup: Fix kernel BUG in purge_effective_progs

Context conflict(1):
d71a1c9fce18 net: Use u64_stats_fetch_begin_irq() for stats fetch.

Total patches: 80 - 5 - 1 = 74 
 
Link:https://gitee.com/openeuler/kernel/pulls/390

 

Reviewed-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parents 0c2046e0 113d5314
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
	.p2align	3
#define __SYSCALL(nr, entry)	.8byte entry
#else
	.p2align	2
#define __SYSCALL(nr, entry)	.long entry
#endif

+2 −2
Original line number Diff line number Diff line
@@ -118,10 +118,10 @@ static int __set_memory(unsigned long addr, int numpages, pgprot_t set_mask,
	if (!numpages)
		return 0;

	mmap_read_lock(&init_mm);
	mmap_write_lock(&init_mm);
	ret =  walk_page_range_novma(&init_mm, start, end, &pageattr_ops, NULL,
				     &masks);
	mmap_read_unlock(&init_mm);
	mmap_write_unlock(&init_mm);

	flush_tlb_kernel_range(start, end);

+4 −2
Original line number Diff line number Diff line
@@ -28,9 +28,11 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
static inline int prepare_hugepage_range(struct file *file,
			unsigned long addr, unsigned long len)
{
	if (len & ~HPAGE_MASK)
	struct hstate *h = hstate_file(file);

	if (len & ~huge_page_mask(h))
		return -EINVAL;
	if (addr & ~HPAGE_MASK)
	if (addr & ~huge_page_mask(h))
		return -EINVAL;
	return 0;
}
+1 −0
Original line number Diff line number Diff line
@@ -122,6 +122,7 @@ SECTIONS
	/*
	 * Table with the patch locations to undo expolines
	*/
	. = ALIGN(4);
	.nospec_call_table : {
		__nospec_call_start = . ;
		*(.s390_indirect*)
+21 −4
Original line number Diff line number Diff line
@@ -1435,12 +1435,32 @@ static const u32 msr_based_features_all[] = {
static u32 msr_based_features[ARRAY_SIZE(msr_based_features_all)];
static unsigned int num_msr_based_features;

/*
 * Some IA32_ARCH_CAPABILITIES bits have dependencies on MSRs that KVM
 * does not yet virtualize. These include:
 *   10 - MISC_PACKAGE_CTRLS
 *   11 - ENERGY_FILTERING_CTL
 *   12 - DOITM
 *   18 - FB_CLEAR_CTRL
 *   21 - XAPIC_DISABLE_STATUS
 *   23 - OVERCLOCKING_STATUS
 */

#define KVM_SUPPORTED_ARCH_CAP \
	(ARCH_CAP_RDCL_NO | ARCH_CAP_IBRS_ALL | ARCH_CAP_RSBA | \
	 ARCH_CAP_SKIP_VMENTRY_L1DFLUSH | ARCH_CAP_SSB_NO | ARCH_CAP_MDS_NO | \
	 ARCH_CAP_PSCHANGE_MC_NO | ARCH_CAP_TSX_CTRL_MSR | ARCH_CAP_TAA_NO | \
	 ARCH_CAP_SBDR_SSDP_NO | ARCH_CAP_FBSDP_NO | ARCH_CAP_PSDP_NO | \
	 ARCH_CAP_FB_CLEAR | ARCH_CAP_RRSBA | ARCH_CAP_PBRSB_NO)

static u64 kvm_get_arch_capabilities(void)
{
	u64 data = 0;

	if (boot_cpu_has(X86_FEATURE_ARCH_CAPABILITIES))
	if (boot_cpu_has(X86_FEATURE_ARCH_CAPABILITIES)) {
		rdmsrl(MSR_IA32_ARCH_CAPABILITIES, data);
		data &= KVM_SUPPORTED_ARCH_CAP;
	}

	/*
	 * If nx_huge_pages is enabled, KVM's shadow paging will ensure that
@@ -1488,9 +1508,6 @@ static u64 kvm_get_arch_capabilities(void)
		 */
	}

	/* Guests don't need to know "Fill buffer clear control" exists */
	data &= ~ARCH_CAP_FB_CLEAR_CTRL;

	return data;
}

Loading