Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Deepin-Kernel-SIG] [Upstream] Update kernel base to 6.6.67 #526

Merged
merged 110 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
828d1f0
bpf: Fix UAF via mismatching bpf_prog/attachment RCU flavors
thejh Dec 10, 2024
c691a3a
perf/x86/intel/ds: Unconditionally drain PEBS DS when changing PEBS_D…
Nov 19, 2024
8ee95db
ksmbd: fix racy issue from session lookup and expire
namjaejeon Dec 5, 2024
5850d8c
splice: do not checksum AF_UNIX sockets
Dec 10, 2024
6db5f81
tcp: check space before adding MPTCP SYN options
Dec 9, 2024
9a12a98
riscv: Fix wrong usage of __pa() on a fixmap address
Dec 9, 2024
57b52a2
blk-cgroup: Fix UAF in blkcg_unpin_online()
htejun Dec 6, 2024
a1a8f43
ALSA: usb-audio: Add implicit feedback quirk for Yamaha THR5
jvsalo Dec 6, 2024
e8d8eee
riscv: Fix IPIs usage in kfence_protect_page()
Dec 9, 2024
77675b9
usb: host: max3421-hcd: Correctly abort a USB request.
Nov 24, 2024
9ea2531
ata: sata_highbank: fix OF node reference leak in highbank_initialize…
joehattori Dec 5, 2024
2d4974c
usb: dwc2: Fix HCD resume
lategoodbye Dec 2, 2024
339a4f8
usb: dwc2: hcd: Fix GetPortStatus & SetPortFeature
lategoodbye Dec 2, 2024
3687e67
usb: dwc2: Fix HCD port connection race
lategoodbye Dec 2, 2024
b28db21
scsi: ufs: core: Update compl_time_stamp_local_clock after completing…
Dec 6, 2024
b157afc
usb: gadget: midi2: Fix interpretation of is_midi1 bits
tiwai Nov 27, 2024
c4a8c91
usb: ehci-hcd: fix call balance of clocks handling routines
vmordan Nov 21, 2024
63b103e
usb: typec: anx7411: fix fwnode_handle reference leak
joehattori Nov 21, 2024
5005aa0
usb: typec: anx7411: fix OF node reference leaks in anx7411_typec_swi…
joehattori Nov 26, 2024
18504cf
usb: gadget: u_serial: Fix the issue that gs_start_io crashed due to …
Dec 3, 2024
49ea748
usb: dwc3: xilinx: make sure pipe clock is deselected in usb2 only mode
nealfrager Dec 2, 2024
ffa0e9a
drm/i915: Fix memory leak by correcting cache object name in error ha…
Nov 27, 2024
f307132
drm/i915: Fix NULL pointer dereference in capture_engine
eugene-kobyak Dec 3, 2024
7037425
xfs: update btree keys correctly when _insrec splits an inode root block
Dec 2, 2024
408c890
xfs: don't drop errno values when we fail to ficlone the entire range
Dec 2, 2024
f86fc58
xfs: return from xfs_symlink_verify early on V4 filesystems
Dec 2, 2024
6c83091
xfs: fix scrub tracepoints when inode-rooted btrees are involved
Dec 2, 2024
6936f58
xfs: only run precommits once per transaction object
Dec 2, 2024
bf591ed
bpf: Check size for BTF-based ctx access of pointer members
kkdwivedi Dec 12, 2024
250e3c9
bpf: Fix theoretical prog_array UAF in __uprobe_perf_func()
thejh Dec 10, 2024
70f3871
bpf,perf: Fix invalid prog_array access in perf_event_detach_bpf_prog
olsajiri Dec 8, 2024
f0e06f7
bpf, sockmap: Fix race between element replace and close()
mmhal Dec 2, 2024
38cadca
bpf, sockmap: Fix update element with same
mmhal Dec 2, 2024
fad1459
rtla/timerlat: Make timerlat_hist_cpu->*_count unsigned long long
lenticularis39 Oct 11, 2024
1ed76de
wifi: nl80211: fix NL80211_ATTR_MLO_LINK_ID off-by-one
f0rm2l1n Nov 30, 2024
3de34a6
wifi: mac80211: init cnt before accessing elem in ieee80211_copy_mbss…
learjet5 Nov 23, 2024
633798a
wifi: mac80211: clean up 'ret' in sta_link_apply_parameters()
jmberg-intel Jun 5, 2024
3acc197
wifi: mac80211: fix station NSS capability initialization order
Nov 18, 2024
673e531
acpi: nfit: vmalloc-out-of-bounds Read in acpi_nfit_ctl
SurajSonawane2415 Nov 18, 2024
a27d461
amdgpu/uvd: get ring reference from rq scheduler
davidwuAMD Dec 4, 2024
c1b3554
batman-adv: Do not send uninitialized TT changes
repk Nov 22, 2024
ba6cabf
batman-adv: Remove uninitialized data in full table TT response
repk Nov 22, 2024
9299444
batman-adv: Do not let TT changes list grows indefinitely
repk Nov 22, 2024
257f3b0
tipc: fix NULL deref in cleanup_bearer()
Dec 4, 2024
e1f7d9e
net/mlx5: DR, prevent potential error pointer dereference
Dec 4, 2024
a3d470b
wifi: cfg80211: sme: init n_channels before channels[] access
learjet5 Dec 3, 2024
ad17d5a
selftests: mlxsw: sharedbuffer: Remove h1 ingress test case
daniellerts Dec 5, 2024
b2f1a92
selftests: mlxsw: sharedbuffer: Remove duplicate test cases
daniellerts Dec 5, 2024
17d54a4
selftests: mlxsw: sharedbuffer: Ensure no extra packets are counted
daniellerts Dec 5, 2024
4978cb0
ptp: kvm: x86: Return EOPNOTSUPP instead of ENODEV from kvm_arch_ptp_…
t-8ch Dec 3, 2024
b5cfcce
net: lapb: increase LAPB_HEADER_LEN
Dec 4, 2024
e2c4b43
net: defer final 'struct net' free in netns dismantle
Dec 4, 2024
4647d6a
net: mscc: ocelot: fix memory leak on ocelot_port_add_txtstamp_skb()
vladimiroltean Dec 5, 2024
883029a
net: mscc: ocelot: improve handling of TX timestamp for unknown skb
vladimiroltean Dec 5, 2024
fb494b5
net: mscc: ocelot: ocelot->ts_id_lock and ocelot_port->tx_skbs.lock a…
vladimiroltean Dec 5, 2024
571be49
net: mscc: ocelot: be resilient to loss of PTP packets during transmi…
vladimiroltean Dec 5, 2024
49cf7cd
net: mscc: ocelot: perform error cleanup in ocelot_hwstamp_set()
vladimiroltean Dec 5, 2024
0eefe98
spi: aspeed: Fix an error handling path in aspeed_spi_[read|write]_us…
tititiou36 Nov 19, 2024
d7acf6c
net: sparx5: fix FDMA performance issue
Danielmachon Dec 5, 2024
81725cc
net: sparx5: fix the maximum frame length register
Danielmachon Dec 5, 2024
2615c10
ACPI: resource: Fix memory resource type union access
ij-intel Dec 2, 2024
c701a99
cxgb4: use port number to set mac addr
Anumula-Murali-Mohan-Reddy Dec 6, 2024
a3232f9
qca_spi: Fix clock speed for multiple QCA7000
lategoodbye Dec 6, 2024
54570fa
qca_spi: Make driver probing reliable
lategoodbye Dec 6, 2024
44d6eed
ALSA: control: Avoid WARN() for symlink errors
tiwai Dec 9, 2024
561c88b
ASoC: amd: yc: Fix the wrong return value
Venkata-Prasad-Potturu Dec 10, 2024
77e03a7
Documentation: PM: Clarify pm_runtime_resume_and_get() return value
pbrkr Dec 3, 2024
cab8294
net: rswitch: Drop unused argument/return value
shimoday Dec 8, 2023
3e45010
net: rswitch: Use unsigned int for desc related array index
shimoday Dec 8, 2023
3c5ad3f
net: rswitch: Use build_skb() for RX
shimoday Dec 8, 2023
1fcda85
net: rswitch: Add unmap_addrs instead of dma address in each desc
shimoday Dec 8, 2023
588f6df
net: rswitch: Add a setting ext descriptor function
shimoday Dec 8, 2023
61a8e5a
net: rswitch: Add jumbo frames handling for TX
shimoday Dec 8, 2023
3a7ec2b
net: renesas: rswitch: fix race window between tx start and complete
nikita-yoush Dec 8, 2024
ac4819d
net: renesas: rswitch: fix leaked pointer on error path
nikita-yoush Dec 8, 2024
6140c28
net: renesas: rswitch: avoid use-after-put for a device tree node
nikita-yoush Dec 8, 2024
49d7735
net: renesas: rswitch: handle stop vs interrupt race
nikita-yoush Dec 9, 2024
715e1d9
netfilter: IDLETIMER: Fix for possible ABBA deadlock
Dec 6, 2024
710554c
netfilter: nf_tables: do not defer rule destruction via call_rcu
Dec 7, 2024
0eb26d0
net: dsa: felix: fix stuck CPU-injected packets with short taprio win…
vladimiroltean Dec 10, 2024
2c266ec
net/sched: netem: account for backlog updates from child qdisc
martin-ottens Dec 10, 2024
405548f
bonding: Fix feature propagation of NETIF_F_GSO_ENCAP_ALL
borkmann Dec 10, 2024
07a07fc
team: Fix feature propagation of NETIF_F_GSO_ENCAP_ALL
borkmann Dec 10, 2024
7166afa
ACPICA: events/evxfregn: don't release the ContextMutex that was neve…
d-tatianin Nov 22, 2024
3752300
Bluetooth: ISO: Reassociate a socket with an active BIS
iulia-tanasescu Nov 13, 2023
e59400c
Bluetooth: hci_event: Fix using rcu_read_(un)lock while iterating
Vudentz Dec 4, 2024
f5e08e6
Bluetooth: iso: Fix recursive locking warning
iulia-tanasescu Dec 4, 2024
5f645ff
Bluetooth: SCO: Add support for 16 bits transparent voice setting
fdanis-oss Dec 5, 2024
013a1bf
Bluetooth: btmtk: avoid UAF in btmtk_process_coredump
Dec 10, 2024
051da5e
net: renesas: rswitch: fix initial MPIC register setting
nikita-yoush Dec 11, 2024
d8e4cd8
net: dsa: microchip: KSZ9896 register regmap alignment to 32 bit boun…
Jesseeee Dec 11, 2024
40bdf6d
blk-iocost: Avoid using clamp() on inuse in __propagate_weights()
nathanchance Dec 12, 2024
24a8eb5
kselftest/arm64: abi: fix SVCR detection
ownia Dec 11, 2024
91eddb7
KVM: arm64: Disable MPAM visibility by default and ignore VMM writes
Oct 30, 2024
f338d02
bpf: sync_linked_regs() must preserve subreg_def
eddyz87 Sep 24, 2024
c635d9f
tracing/kprobes: Skip symbol counting logic for module symbols in cre…
Dec 16, 2024
5785230
selftests/bpf: Add netlink helper library
borkmann Oct 24, 2023
659a971
selftests/bpf: remove use of __xlated()
shunghsiyu Dec 17, 2024
f2aecff
net: rswitch: Avoid use-after-free in rswitch_poll()
rrendec Jul 2, 2024
5ada748
xen/netfront: fix crash when removing device
jgross1 Nov 7, 2024
cdd4d3a
x86: make get_cpu_vendor() accessible from Xen code
jgross1 Oct 17, 2024
9ea02c4
objtool/x86: allow syscall instruction
jgross1 Nov 29, 2024
76c1c57
x86/static-call: provide a way to do very early static-call updates
jgross1 Nov 29, 2024
4f5b75d
x86/xen: don't do PV iret hypercall through hypercall page
jgross1 Oct 16, 2024
0af0ea7
x86/xen: add central hypercall functions
jgross1 Oct 17, 2024
36c0945
x86/xen: use new hypercall functions instead of hypercall page
jgross1 Oct 17, 2024
1b003ad
x86/xen: remove hypercall page
jgross1 Oct 17, 2024
15f6504
ALSA: usb-audio: Fix a DMA to stack memory bug
Dec 2, 2024
4020761
x86/static-call: fix 32-bit build
jgross1 Dec 18, 2024
f2f62ac
Linux 6.6.67
gregkh Dec 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Documentation/power/runtime_pm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,9 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:

`int pm_runtime_resume_and_get(struct device *dev);`
- run pm_runtime_resume(dev) and if successful, increment the device's
usage counter; return the result of pm_runtime_resume
usage counter; returns 0 on success (whether or not the device's
runtime PM status was already 'active') or the error code from
pm_runtime_resume() on failure.

`int pm_request_idle(struct device *dev);`
- submit a request to execute the subsystem-level idle callback for the
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 6
SUBLEVEL = 66
SUBLEVEL = 67
EXTRAVERSION =
NAME = Pinguïn Aangedreven

Expand Down
52 changes: 50 additions & 2 deletions arch/arm64/kvm/sys_regs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,7 @@ static u64 __kvm_read_sanitised_id_reg(const struct kvm_vcpu *vcpu,
val &= ~ARM64_FEATURE_MASK(ID_AA64PFR1_EL1_MTE);

val &= ~ARM64_FEATURE_MASK(ID_AA64PFR1_EL1_SME);
val &= ~ARM64_FEATURE_MASK(ID_AA64PFR1_EL1_MPAM_frac);
break;
case SYS_ID_AA64ISAR1_EL1:
if (!vcpu_has_ptrauth(vcpu))
Expand Down Expand Up @@ -1472,6 +1473,13 @@ static u64 read_sanitised_id_aa64pfr0_el1(struct kvm_vcpu *vcpu,

val &= ~ID_AA64PFR0_EL1_AMU_MASK;

/*
* MPAM is disabled by default as KVM also needs a set of PARTID to
* program the MPAMVPMx_EL2 PARTID remapping registers with. But some
* older kernels let the guest see the ID bit.
*/
val &= ~ID_AA64PFR0_EL1_MPAM_MASK;

return val;
}

Expand Down Expand Up @@ -1560,6 +1568,42 @@ static int set_id_dfr0_el1(struct kvm_vcpu *vcpu,
return set_id_reg(vcpu, rd, val);
}

static int set_id_aa64pfr0_el1(struct kvm_vcpu *vcpu,
const struct sys_reg_desc *rd, u64 user_val)
{
u64 hw_val = read_sanitised_ftr_reg(SYS_ID_AA64PFR0_EL1);
u64 mpam_mask = ID_AA64PFR0_EL1_MPAM_MASK;

/*
* Commit 011e5f5bf529f ("arm64/cpufeature: Add remaining feature bits
* in ID_AA64PFR0 register") exposed the MPAM field of AA64PFR0_EL1 to
* guests, but didn't add trap handling. KVM doesn't support MPAM and
* always returns an UNDEF for these registers. The guest must see 0
* for this field.
*
* But KVM must also accept values from user-space that were provided
* by KVM. On CPUs that support MPAM, permit user-space to write
* the sanitizied value to ID_AA64PFR0_EL1.MPAM, but ignore this field.
*/
if ((hw_val & mpam_mask) == (user_val & mpam_mask))
user_val &= ~ID_AA64PFR0_EL1_MPAM_MASK;

return set_id_reg(vcpu, rd, user_val);
}

static int set_id_aa64pfr1_el1(struct kvm_vcpu *vcpu,
const struct sys_reg_desc *rd, u64 user_val)
{
u64 hw_val = read_sanitised_ftr_reg(SYS_ID_AA64PFR1_EL1);
u64 mpam_mask = ID_AA64PFR1_EL1_MPAM_frac_MASK;

/* See set_id_aa64pfr0_el1 for comment about MPAM */
if ((hw_val & mpam_mask) == (user_val & mpam_mask))
user_val &= ~ID_AA64PFR1_EL1_MPAM_frac_MASK;

return set_id_reg(vcpu, rd, user_val);
}

/*
* cpufeature ID register user accessors
*
Expand Down Expand Up @@ -2018,10 +2062,14 @@ static const struct sys_reg_desc sys_reg_descs[] = {
{ SYS_DESC(SYS_ID_AA64PFR0_EL1),
.access = access_id_reg,
.get_user = get_id_reg,
.set_user = set_id_reg,
.set_user = set_id_aa64pfr0_el1,
.reset = read_sanitised_id_aa64pfr0_el1,
.val = ID_AA64PFR0_EL1_CSV2_MASK | ID_AA64PFR0_EL1_CSV3_MASK, },
ID_SANITISED(ID_AA64PFR1_EL1),
{ SYS_DESC(SYS_ID_AA64PFR1_EL1),
.access = access_id_reg,
.get_user = get_id_reg,
.set_user = set_id_aa64pfr1_el1,
.reset = kvm_read_sanitised_id_reg, },
ID_UNALLOCATED(4,2),
ID_UNALLOCATED(4,3),
ID_SANITISED(ID_AA64ZFR0_EL1),
Expand Down
4 changes: 3 additions & 1 deletion arch/riscv/include/asm/kfence.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ static inline bool kfence_protect_page(unsigned long addr, bool protect)
else
set_pte(pte, __pte(pte_val(ptep_get(pte)) | _PAGE_PRESENT));

flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
preempt_disable();
local_flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
preempt_enable();

return true;
}
Expand Down
2 changes: 1 addition & 1 deletion arch/riscv/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ static void __init init_resources(void)
static void __init parse_dtb(void)
{
/* Early scan of device tree from init memory */
if (early_init_dt_scan(dtb_early_va, __pa(dtb_early_va))) {
if (early_init_dt_scan(dtb_early_va, dtb_early_pa)) {
const char *name = of_flat_dt_get_machine_name();

if (name) {
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/events/intel/ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ void intel_pmu_pebs_enable(struct perf_event *event)
* hence we need to drain when changing said
* size.
*/
intel_pmu_drain_large_pebs(cpuc);
intel_pmu_drain_pebs_buffer();
adaptive_pebs_record_size_update();
wrmsrl(MSR_PEBS_DATA_CFG, pebs_data_cfg);
cpuc->active_pebs_data_cfg = pebs_data_cfg;
Expand Down
2 changes: 2 additions & 0 deletions arch/x86/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ static inline unsigned long long l1tf_pfn_limit(void)
return BIT_ULL(boot_cpu_data.x86_cache_bits - 1 - PAGE_SHIFT);
}

void init_cpu_devs(void);
void get_cpu_vendor(struct cpuinfo_x86 *c);
extern void early_cpu_init(void);
extern void identify_secondary_cpu(struct cpuinfo_x86 *);
extern void print_cpu_info(struct cpuinfo_x86 *);
Expand Down
15 changes: 15 additions & 0 deletions arch/x86/include/asm/static_call.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,19 @@

extern bool __static_call_fixup(void *tramp, u8 op, void *dest);

extern void __static_call_update_early(void *tramp, void *func);

#define static_call_update_early(name, _func) \
({ \
typeof(&STATIC_CALL_TRAMP(name)) __F = (_func); \
if (static_call_initialized) { \
__static_call_update(&STATIC_CALL_KEY(name), \
STATIC_CALL_TRAMP_ADDR(name), __F);\
} else { \
WRITE_ONCE(STATIC_CALL_KEY(name).func, _func); \
__static_call_update_early(STATIC_CALL_TRAMP_ADDR(name),\
__F); \
} \
})

#endif /* _ASM_STATIC_CALL_H */
6 changes: 3 additions & 3 deletions arch/x86/include/asm/sync_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <asm/special_insns.h>

#ifdef CONFIG_X86_32
static inline void iret_to_self(void)
static __always_inline void iret_to_self(void)
{
asm volatile (
"pushfl\n\t"
Expand All @@ -19,7 +19,7 @@ static inline void iret_to_self(void)
: ASM_CALL_CONSTRAINT : : "memory");
}
#else
static inline void iret_to_self(void)
static __always_inline void iret_to_self(void)
{
unsigned int tmp;

Expand Down Expand Up @@ -55,7 +55,7 @@ static inline void iret_to_self(void)
* Like all of Linux's memory ordering operations, this is a
* compiler barrier as well.
*/
static inline void sync_core(void)
static __always_inline void sync_core(void)
{
/*
* The SERIALIZE instruction is the most straightforward way to
Expand Down
36 changes: 22 additions & 14 deletions arch/x86/include/asm/xen/hypercall.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@
#include <linux/string.h>
#include <linux/types.h>
#include <linux/pgtable.h>
#include <linux/instrumentation.h>

#include <trace/events/xen.h>

#include <asm/alternative.h>
#include <asm/page.h>
#include <asm/smap.h>
#include <asm/nospec-branch.h>
Expand Down Expand Up @@ -86,11 +88,20 @@ struct xen_dm_op_buf;
* there aren't more than 5 arguments...)
*/

extern struct { char _entry[32]; } hypercall_page[];
void xen_hypercall_func(void);
DECLARE_STATIC_CALL(xen_hypercall, xen_hypercall_func);

#define __HYPERCALL "call hypercall_page+%c[offset]"
#define __HYPERCALL_ENTRY(x) \
[offset] "i" (__HYPERVISOR_##x * sizeof(hypercall_page[0]))
#ifdef MODULE
#define __ADDRESSABLE_xen_hypercall
#else
#define __ADDRESSABLE_xen_hypercall __ADDRESSABLE_ASM_STR(__SCK__xen_hypercall)
#endif

#define __HYPERCALL \
__ADDRESSABLE_xen_hypercall \
"call __SCT__xen_hypercall"

#define __HYPERCALL_ENTRY(x) "a" (x)

#ifdef CONFIG_X86_32
#define __HYPERCALL_RETREG "eax"
Expand Down Expand Up @@ -148,7 +159,7 @@ extern struct { char _entry[32]; } hypercall_page[];
__HYPERCALL_0ARG(); \
asm volatile (__HYPERCALL \
: __HYPERCALL_0PARAM \
: __HYPERCALL_ENTRY(name) \
: __HYPERCALL_ENTRY(__HYPERVISOR_ ## name) \
: __HYPERCALL_CLOBBER0); \
(type)__res; \
})
Expand All @@ -159,7 +170,7 @@ extern struct { char _entry[32]; } hypercall_page[];
__HYPERCALL_1ARG(a1); \
asm volatile (__HYPERCALL \
: __HYPERCALL_1PARAM \
: __HYPERCALL_ENTRY(name) \
: __HYPERCALL_ENTRY(__HYPERVISOR_ ## name) \
: __HYPERCALL_CLOBBER1); \
(type)__res; \
})
Expand All @@ -170,7 +181,7 @@ extern struct { char _entry[32]; } hypercall_page[];
__HYPERCALL_2ARG(a1, a2); \
asm volatile (__HYPERCALL \
: __HYPERCALL_2PARAM \
: __HYPERCALL_ENTRY(name) \
: __HYPERCALL_ENTRY(__HYPERVISOR_ ## name) \
: __HYPERCALL_CLOBBER2); \
(type)__res; \
})
Expand All @@ -181,7 +192,7 @@ extern struct { char _entry[32]; } hypercall_page[];
__HYPERCALL_3ARG(a1, a2, a3); \
asm volatile (__HYPERCALL \
: __HYPERCALL_3PARAM \
: __HYPERCALL_ENTRY(name) \
: __HYPERCALL_ENTRY(__HYPERVISOR_ ## name) \
: __HYPERCALL_CLOBBER3); \
(type)__res; \
})
Expand All @@ -192,7 +203,7 @@ extern struct { char _entry[32]; } hypercall_page[];
__HYPERCALL_4ARG(a1, a2, a3, a4); \
asm volatile (__HYPERCALL \
: __HYPERCALL_4PARAM \
: __HYPERCALL_ENTRY(name) \
: __HYPERCALL_ENTRY(__HYPERVISOR_ ## name) \
: __HYPERCALL_CLOBBER4); \
(type)__res; \
})
Expand All @@ -206,12 +217,9 @@ xen_single_call(unsigned int call,
__HYPERCALL_DECLS;
__HYPERCALL_5ARG(a1, a2, a3, a4, a5);

if (call >= PAGE_SIZE / sizeof(hypercall_page[0]))
return -EINVAL;

asm volatile(CALL_NOSPEC
asm volatile(__HYPERCALL
: __HYPERCALL_5PARAM
: [thunk_target] "a" (&hypercall_page[call])
: __HYPERCALL_ENTRY(call)
: __HYPERCALL_CLOBBER5);

return (long)__res;
Expand Down
5 changes: 0 additions & 5 deletions arch/x86/kernel/callthunks.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,6 @@ static bool skip_addr(void *dest)
if (dest >= (void *)relocate_kernel &&
dest < (void*)relocate_kernel + KEXEC_CONTROL_CODE_MAX_SIZE)
return true;
#endif
#ifdef CONFIG_XEN
if (dest >= (void *)hypercall_page &&
dest < (void*)hypercall_page + PAGE_SIZE)
return true;
#endif
return false;
}
Expand Down
38 changes: 22 additions & 16 deletions arch/x86/kernel/cpu/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ void detect_ht(struct cpuinfo_x86 *c)
#endif
}

static void get_cpu_vendor(struct cpuinfo_x86 *c)
void get_cpu_vendor(struct cpuinfo_x86 *c)
{
char *v = c->x86_vendor_id;
int i;
Expand Down Expand Up @@ -1692,36 +1692,42 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
detect_nopl();
}

void __init early_cpu_init(void)
void __init init_cpu_devs(void)
{
const struct cpu_dev *const *cdev;
int count = 0;

#ifdef CONFIG_PROCESSOR_SELECT
pr_info("KERNEL supported cpus:\n");
#endif

for (cdev = __x86_cpu_dev_start; cdev < __x86_cpu_dev_end; cdev++) {
const struct cpu_dev *cpudev = *cdev;

if (count >= X86_VENDOR_NUM)
break;
cpu_devs[count] = cpudev;
count++;
}
}

void __init early_cpu_init(void)
{
#ifdef CONFIG_PROCESSOR_SELECT
{
unsigned int j;

for (j = 0; j < 2; j++) {
if (!cpudev->c_ident[j])
continue;
pr_info(" %s %s\n", cpudev->c_vendor,
cpudev->c_ident[j]);
}
}
unsigned int i, j;

pr_info("KERNEL supported cpus:\n");
#endif

init_cpu_devs();

#ifdef CONFIG_PROCESSOR_SELECT
for (i = 0; i < X86_VENDOR_NUM && cpu_devs[i]; i++) {
for (j = 0; j < 2; j++) {
if (!cpu_devs[i]->c_ident[j])
continue;
pr_info(" %s %s\n", cpu_devs[i]->c_vendor,
cpu_devs[i]->c_ident[j]);
}
}
#endif

early_identify_cpu(&boot_cpu_data);
}

Expand Down
9 changes: 9 additions & 0 deletions arch/x86/kernel/static_call.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,15 @@ void arch_static_call_transform(void *site, void *tramp, void *func, bool tail)
}
EXPORT_SYMBOL_GPL(arch_static_call_transform);

noinstr void __static_call_update_early(void *tramp, void *func)
{
BUG_ON(system_state != SYSTEM_BOOTING);
BUG_ON(!early_boot_irqs_disabled);
BUG_ON(static_call_initialized);
__text_gen_insn(tramp, JMP32_INSN_OPCODE, tramp, func, JMP32_INSN_SIZE);
sync_core();
}

#ifdef CONFIG_RETHUNK
/*
* This is called by apply_returns() to fix up static call trampolines,
Expand Down
Loading
Loading