Skip to content

Commit 78ef553

Browse files
authored
Merge pull request torvalds#214 from zandrey/5.10.x+fslc
Update 5.10.x+fslc to v5.10.7
2 parents d306e6b + a995e24 commit 78ef553

File tree

160 files changed

+1211
-667
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+1211
-667
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 5
33
PATCHLEVEL = 10
4-
SUBLEVEL = 6
4+
SUBLEVEL = 7
55
EXTRAVERSION =
66
NAME = Kleptomaniac Octopus
77

@@ -450,7 +450,7 @@ LEX = flex
450450
YACC = bison
451451
AWK = awk
452452
INSTALLKERNEL := installkernel
453-
DEPMOD = /sbin/depmod
453+
DEPMOD = depmod
454454
PERL = perl
455455
PYTHON = python
456456
PYTHON3 = python3

arch/alpha/include/asm/local64.h

Lines changed: 0 additions & 1 deletion
This file was deleted.

arch/arc/include/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0
22
generic-y += extable.h
33
generic-y += kvm_para.h
4-
generic-y += local64.h
54
generic-y += mcs_spinlock.h
65
generic-y += parport.h
76
generic-y += user.h

arch/arm/boot/dts/omap3-n950-n9.dtsi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,3 +494,11 @@
494494
clock-names = "sysclk";
495495
};
496496
};
497+
498+
&aes1_target {
499+
status = "disabled";
500+
};
501+
502+
&aes2_target {
503+
status = "disabled";
504+
};

arch/arm/include/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
generic-y += early_ioremap.h
33
generic-y += extable.h
44
generic-y += flat.h
5-
generic-y += local64.h
65
generic-y += parport.h
76
generic-y += seccomp.h
87

arch/arm64/Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# Copyright (C) 1995-2001 by Russell King
1212

13-
LDFLAGS_vmlinux :=--no-undefined -X -z norelro
13+
LDFLAGS_vmlinux :=--no-undefined -X
1414

1515
ifeq ($(CONFIG_RELOCATABLE), y)
1616
# Pass --no-apply-dynamic-relocs to restore pre-binutils-2.27 behaviour
@@ -110,16 +110,20 @@ KBUILD_CPPFLAGS += -mbig-endian
110110
CHECKFLAGS += -D__AARCH64EB__
111111
# Prefer the baremetal ELF build target, but not all toolchains include
112112
# it so fall back to the standard linux version if needed.
113-
KBUILD_LDFLAGS += -EB $(call ld-option, -maarch64elfb, -maarch64linuxb)
113+
KBUILD_LDFLAGS += -EB $(call ld-option, -maarch64elfb, -maarch64linuxb -z norelro)
114114
UTS_MACHINE := aarch64_be
115115
else
116116
KBUILD_CPPFLAGS += -mlittle-endian
117117
CHECKFLAGS += -D__AARCH64EL__
118118
# Same as above, prefer ELF but fall back to linux target if needed.
119-
KBUILD_LDFLAGS += -EL $(call ld-option, -maarch64elf, -maarch64linux)
119+
KBUILD_LDFLAGS += -EL $(call ld-option, -maarch64elf, -maarch64linux -z norelro)
120120
UTS_MACHINE := aarch64
121121
endif
122122

123+
ifeq ($(CONFIG_LD_IS_LLD), y)
124+
KBUILD_LDFLAGS += -z norelro
125+
endif
126+
123127
CHECKFLAGS += -D__aarch64__
124128

125129
ifeq ($(CONFIG_DYNAMIC_FTRACE_WITH_REGS),y)

arch/arm64/include/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# SPDX-License-Identifier: GPL-2.0
22
generic-y += early_ioremap.h
3-
generic-y += local64.h
43
generic-y += mcs_spinlock.h
54
generic-y += qrwlock.h
65
generic-y += qspinlock.h

arch/csky/include/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
generic-y += asm-offsets.h
33
generic-y += gpio.h
44
generic-y += kvm_para.h
5-
generic-y += local64.h
65
generic-y += qrwlock.h
76
generic-y += seccomp.h
87
generic-y += user.h

arch/h8300/include/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
generic-y += asm-offsets.h
33
generic-y += extable.h
44
generic-y += kvm_para.h
5-
generic-y += local64.h
65
generic-y += mcs_spinlock.h
76
generic-y += parport.h
87
generic-y += spinlock.h

arch/hexagon/include/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
generic-y += extable.h
33
generic-y += iomap.h
44
generic-y += kvm_para.h
5-
generic-y += local64.h
65
generic-y += mcs_spinlock.h

arch/ia64/include/asm/local64.h

Lines changed: 0 additions & 1 deletion
This file was deleted.

arch/m68k/include/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
generated-y += syscall_table.h
33
generic-y += extable.h
44
generic-y += kvm_para.h
5-
generic-y += local64.h
65
generic-y += mcs_spinlock.h
76
generic-y += spinlock.h

arch/microblaze/include/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
generated-y += syscall_table.h
33
generic-y += extable.h
44
generic-y += kvm_para.h
5-
generic-y += local64.h
65
generic-y += mcs_spinlock.h
76
generic-y += parport.h
87
generic-y += syscalls.h

arch/mips/include/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ generated-y += syscall_table_64_n64.h
66
generated-y += syscall_table_64_o32.h
77
generic-y += export.h
88
generic-y += kvm_para.h
9-
generic-y += local64.h
109
generic-y += mcs_spinlock.h
1110
generic-y += parport.h
1211
generic-y += qrwlock.h

arch/nds32/include/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ generic-y += cmpxchg.h
44
generic-y += export.h
55
generic-y += gpio.h
66
generic-y += kvm_para.h
7-
generic-y += local64.h
87
generic-y += parport.h
98
generic-y += user.h

arch/parisc/include/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ generated-y += syscall_table_32.h
33
generated-y += syscall_table_64.h
44
generated-y += syscall_table_c32.h
55
generic-y += kvm_para.h
6-
generic-y += local64.h
76
generic-y += mcs_spinlock.h
87
generic-y += seccomp.h
98
generic-y += user.h

arch/powerpc/include/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ generated-y += syscall_table_c32.h
55
generated-y += syscall_table_spu.h
66
generic-y += export.h
77
generic-y += kvm_types.h
8-
generic-y += local64.h
98
generic-y += mcs_spinlock.h
109
generic-y += qrwlock.h
1110
generic-y += vtime.h

arch/powerpc/kernel/vmlinux.lds.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ SECTIONS
8585
ALIGN_FUNCTION();
8686
#endif
8787
/* careful! __ftr_alt_* sections need to be close to .text */
88-
*(.text.hot TEXT_MAIN .text.fixup .text.unlikely .fixup __ftr_alt_* .ref.text);
88+
*(.text.hot .text.hot.* TEXT_MAIN .text.fixup .text.unlikely .text.unlikely.* .fixup __ftr_alt_* .ref.text);
8989
#ifdef CONFIG_PPC64
9090
*(.tramp.ftrace.text);
9191
#endif

arch/riscv/include/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ generic-y += early_ioremap.h
33
generic-y += extable.h
44
generic-y += flat.h
55
generic-y += kvm_para.h
6-
generic-y += local64.h
76
generic-y += user.h
87
generic-y += vmlinux.lds.h

arch/s390/include/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ generated-y += unistd_nr.h
77
generic-y += asm-offsets.h
88
generic-y += export.h
99
generic-y += kvm_types.h
10-
generic-y += local64.h
1110
generic-y += mcs_spinlock.h

arch/sh/include/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# SPDX-License-Identifier: GPL-2.0
22
generated-y += syscall_table.h
33
generic-y += kvm_para.h
4-
generic-y += local64.h
54
generic-y += mcs_spinlock.h
65
generic-y += parport.h

arch/sparc/include/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ generated-y += syscall_table_64.h
66
generated-y += syscall_table_c32.h
77
generic-y += export.h
88
generic-y += kvm_para.h
9-
generic-y += local64.h
109
generic-y += mcs_spinlock.h

arch/x86/include/asm/local64.h

Lines changed: 0 additions & 1 deletion
This file was deleted.

arch/x86/kernel/cpu/mtrr/generic.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,6 @@ static u8 mtrr_type_lookup_variable(u64 start, u64 end, u64 *partial_end,
167167
*repeat = 0;
168168
*uniform = 1;
169169

170-
/* Make end inclusive instead of exclusive */
171-
end--;
172-
173170
prev_match = MTRR_TYPE_INVALID;
174171
for (i = 0; i < num_var_ranges; ++i) {
175172
unsigned short start_state, end_state, inclusive;
@@ -261,6 +258,9 @@ u8 mtrr_type_lookup(u64 start, u64 end, u8 *uniform)
261258
int repeat;
262259
u64 partial_end;
263260

261+
/* Make end inclusive instead of exclusive */
262+
end--;
263+
264264
if (!mtrr_state_set)
265265
return MTRR_TYPE_INVALID;
266266

arch/x86/kernel/cpu/resctrl/rdtgroup.c

Lines changed: 49 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -525,89 +525,70 @@ static void rdtgroup_remove(struct rdtgroup *rdtgrp)
525525
kfree(rdtgrp);
526526
}
527527

528-
struct task_move_callback {
529-
struct callback_head work;
530-
struct rdtgroup *rdtgrp;
531-
};
532-
533-
static void move_myself(struct callback_head *head)
528+
static void _update_task_closid_rmid(void *task)
534529
{
535-
struct task_move_callback *callback;
536-
struct rdtgroup *rdtgrp;
537-
538-
callback = container_of(head, struct task_move_callback, work);
539-
rdtgrp = callback->rdtgrp;
540-
541530
/*
542-
* If resource group was deleted before this task work callback
543-
* was invoked, then assign the task to root group and free the
544-
* resource group.
531+
* If the task is still current on this CPU, update PQR_ASSOC MSR.
532+
* Otherwise, the MSR is updated when the task is scheduled in.
545533
*/
546-
if (atomic_dec_and_test(&rdtgrp->waitcount) &&
547-
(rdtgrp->flags & RDT_DELETED)) {
548-
current->closid = 0;
549-
current->rmid = 0;
550-
rdtgroup_remove(rdtgrp);
551-
}
552-
553-
if (unlikely(current->flags & PF_EXITING))
554-
goto out;
555-
556-
preempt_disable();
557-
/* update PQR_ASSOC MSR to make resource group go into effect */
558-
resctrl_sched_in();
559-
preempt_enable();
534+
if (task == current)
535+
resctrl_sched_in();
536+
}
560537

561-
out:
562-
kfree(callback);
538+
static void update_task_closid_rmid(struct task_struct *t)
539+
{
540+
if (IS_ENABLED(CONFIG_SMP) && task_curr(t))
541+
smp_call_function_single(task_cpu(t), _update_task_closid_rmid, t, 1);
542+
else
543+
_update_task_closid_rmid(t);
563544
}
564545

565546
static int __rdtgroup_move_task(struct task_struct *tsk,
566547
struct rdtgroup *rdtgrp)
567548
{
568-
struct task_move_callback *callback;
569-
int ret;
570-
571-
callback = kzalloc(sizeof(*callback), GFP_KERNEL);
572-
if (!callback)
573-
return -ENOMEM;
574-
callback->work.func = move_myself;
575-
callback->rdtgrp = rdtgrp;
549+
/* If the task is already in rdtgrp, no need to move the task. */
550+
if ((rdtgrp->type == RDTCTRL_GROUP && tsk->closid == rdtgrp->closid &&
551+
tsk->rmid == rdtgrp->mon.rmid) ||
552+
(rdtgrp->type == RDTMON_GROUP && tsk->rmid == rdtgrp->mon.rmid &&
553+
tsk->closid == rdtgrp->mon.parent->closid))
554+
return 0;
576555

577556
/*
578-
* Take a refcount, so rdtgrp cannot be freed before the
579-
* callback has been invoked.
557+
* Set the task's closid/rmid before the PQR_ASSOC MSR can be
558+
* updated by them.
559+
*
560+
* For ctrl_mon groups, move both closid and rmid.
561+
* For monitor groups, can move the tasks only from
562+
* their parent CTRL group.
580563
*/
581-
atomic_inc(&rdtgrp->waitcount);
582-
ret = task_work_add(tsk, &callback->work, TWA_RESUME);
583-
if (ret) {
584-
/*
585-
* Task is exiting. Drop the refcount and free the callback.
586-
* No need to check the refcount as the group cannot be
587-
* deleted before the write function unlocks rdtgroup_mutex.
588-
*/
589-
atomic_dec(&rdtgrp->waitcount);
590-
kfree(callback);
591-
rdt_last_cmd_puts("Task exited\n");
592-
} else {
593-
/*
594-
* For ctrl_mon groups move both closid and rmid.
595-
* For monitor groups, can move the tasks only from
596-
* their parent CTRL group.
597-
*/
598-
if (rdtgrp->type == RDTCTRL_GROUP) {
599-
tsk->closid = rdtgrp->closid;
564+
565+
if (rdtgrp->type == RDTCTRL_GROUP) {
566+
tsk->closid = rdtgrp->closid;
567+
tsk->rmid = rdtgrp->mon.rmid;
568+
} else if (rdtgrp->type == RDTMON_GROUP) {
569+
if (rdtgrp->mon.parent->closid == tsk->closid) {
600570
tsk->rmid = rdtgrp->mon.rmid;
601-
} else if (rdtgrp->type == RDTMON_GROUP) {
602-
if (rdtgrp->mon.parent->closid == tsk->closid) {
603-
tsk->rmid = rdtgrp->mon.rmid;
604-
} else {
605-
rdt_last_cmd_puts("Can't move task to different control group\n");
606-
ret = -EINVAL;
607-
}
571+
} else {
572+
rdt_last_cmd_puts("Can't move task to different control group\n");
573+
return -EINVAL;
608574
}
609575
}
610-
return ret;
576+
577+
/*
578+
* Ensure the task's closid and rmid are written before determining if
579+
* the task is current that will decide if it will be interrupted.
580+
*/
581+
barrier();
582+
583+
/*
584+
* By now, the task's closid and rmid are set. If the task is current
585+
* on a CPU, the PQR_ASSOC MSR needs to be updated to make the resource
586+
* group go into effect. If the task is not current, the MSR will be
587+
* updated when the task is scheduled in.
588+
*/
589+
update_task_closid_rmid(tsk);
590+
591+
return 0;
611592
}
612593

613594
static bool is_closid_match(struct task_struct *t, struct rdtgroup *r)

arch/x86/kvm/mmu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static inline u64 rsvd_bits(int s, int e)
4949
if (e < s)
5050
return 0;
5151

52-
return ((1ULL << (e - s + 1)) - 1) << s;
52+
return ((2ULL << (e - s)) - 1) << s;
5353
}
5454

5555
void kvm_mmu_set_mmio_spte_mask(u64 mmio_value, u64 access_mask);

0 commit comments

Comments
 (0)