Skip to content

Commit b9067cd

Browse files
author
Peter Zijlstra
committed
Merge branch 'kvm/kvm-sls-fix'
Sync with the last minute SLS fix to extend it for IBT. Signed-off-by: Peter Zijlstra <[email protected]>
2 parents f6a2c2b + fe83f5e commit b9067cd

File tree

55 files changed

+231
-224
lines changed

Some content is hidden

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

55 files changed

+231
-224
lines changed

MAINTAINERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13376,6 +13376,7 @@ F: net/core/drop_monitor.c
1337613376
NETWORKING DRIVERS
1337713377
M: "David S. Miller" <[email protected]>
1337813378
M: Jakub Kicinski <[email protected]>
13379+
M: Paolo Abeni <[email protected]>
1337913380
1338013381
S: Maintained
1338113382
Q: https://patchwork.kernel.org/project/netdevbpf/list/
@@ -13422,6 +13423,7 @@ F: tools/testing/selftests/drivers/net/dsa/
1342213423
NETWORKING [GENERAL]
1342313424
M: "David S. Miller" <[email protected]>
1342413425
M: Jakub Kicinski <[email protected]>
13426+
M: Paolo Abeni <[email protected]>
1342513427
1342613428
S: Maintained
1342713429
Q: https://patchwork.kernel.org/project/netdevbpf/list/

arch/arm64/include/asm/vectors.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ enum arm64_bp_harden_el1_vectors {
5656
DECLARE_PER_CPU_READ_MOSTLY(const char *, this_cpu_vector);
5757

5858
#ifndef CONFIG_UNMAP_KERNEL_AT_EL0
59-
#define TRAMP_VALIAS 0
59+
#define TRAMP_VALIAS 0ul
6060
#endif
6161

6262
static inline const char *
6363
arm64_get_bp_hardening_vector(enum arm64_bp_harden_el1_vectors slot)
6464
{
6565
if (arm64_kernel_unmapped_at_el0())
66-
return (char *)TRAMP_VALIAS + SZ_2K * slot;
66+
return (char *)(TRAMP_VALIAS + SZ_2K * slot);
6767

6868
WARN_ON_ONCE(slot == EL1_VECTOR_KPTI);
6969

arch/arm64/kernel/cpu_errata.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,6 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
611611
{
612612
.desc = "ARM erratum 2077057",
613613
.capability = ARM64_WORKAROUND_2077057,
614-
.type = ARM64_CPUCAP_LOCAL_CPU_ERRATUM,
615614
ERRATA_MIDR_REV_RANGE(MIDR_CORTEX_A510, 0, 0, 2),
616615
},
617616
#endif

arch/x86/kvm/emulate.c

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,23 @@ static int fastop(struct x86_emulate_ctxt *ctxt, fastop_t fop);
430430
FOP_END
431431

432432
/* Special case for SETcc - 1 instruction per cc */
433+
434+
/*
435+
* Depending on .config the SETcc functions look like:
436+
*
437+
* SETcc %al [3 bytes]
438+
* RET [1 byte]
439+
* INT3 [1 byte; CONFIG_SLS]
440+
*
441+
* Which gives possible sizes 4 or 5. When rounded up to the
442+
* next power-of-two alignment they become 4 or 8.
443+
*/
444+
#define SETCC_LENGTH (4 + IS_ENABLED(CONFIG_SLS))
445+
#define SETCC_ALIGN (4 << IS_ENABLED(CONFIG_SLS))
446+
static_assert(SETCC_LENGTH <= SETCC_ALIGN);
447+
433448
#define FOP_SETCC(op) \
434-
".align 4 \n\t" \
449+
".align " __stringify(SETCC_ALIGN) " \n\t" \
435450
".type " #op ", @function \n\t" \
436451
#op ": \n\t" \
437452
ASM_ENDBR \
@@ -1049,7 +1064,7 @@ static int em_bsr_c(struct x86_emulate_ctxt *ctxt)
10491064
static __always_inline u8 test_cc(unsigned int condition, unsigned long flags)
10501065
{
10511066
u8 rc;
1052-
void (*fop)(void) = (void *)em_setcc + 4 * (condition & 0xf);
1067+
void (*fop)(void) = (void *)em_setcc + SETCC_ALIGN * (condition & 0xf);
10531068

10541069
flags = (flags & EFLAGS_MASK) | X86_EFLAGS_IF;
10551070
asm("push %[flags]; popf; " CALL_NOSPEC

block/blk-core.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
#include "blk-mq-sched.h"
5151
#include "blk-pm.h"
5252
#include "blk-throttle.h"
53+
#include "blk-rq-qos.h"
5354

5455
struct dentry *blk_debugfs_root;
5556

@@ -314,6 +315,9 @@ void blk_cleanup_queue(struct request_queue *q)
314315
*/
315316
blk_freeze_queue(q);
316317

318+
/* cleanup rq qos structures for queue without disk */
319+
rq_qos_exit(q);
320+
317321
blk_queue_flag_set(QUEUE_FLAG_DEAD, q);
318322

319323
blk_sync_queue(q);

drivers/acpi/scan.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,11 +1377,11 @@ static void acpi_set_pnp_ids(acpi_handle handle, struct acpi_device_pnp *pnp,
13771377
if (info->valid & ACPI_VALID_HID) {
13781378
acpi_add_id(pnp, info->hardware_id.string);
13791379
pnp->type.platform_id = 1;
1380-
if (info->valid & ACPI_VALID_CID) {
1381-
cid_list = &info->compatible_id_list;
1382-
for (i = 0; i < cid_list->count; i++)
1383-
acpi_add_id(pnp, cid_list->ids[i].string);
1384-
}
1380+
}
1381+
if (info->valid & ACPI_VALID_CID) {
1382+
cid_list = &info->compatible_id_list;
1383+
for (i = 0; i < cid_list->count; i++)
1384+
acpi_add_id(pnp, cid_list->ids[i].string);
13851385
}
13861386
if (info->valid & ACPI_VALID_ADR) {
13871387
pnp->bus_address = info->address;

drivers/atm/eni.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,6 +1112,8 @@ DPRINTK("iovcnt = %d\n",skb_shinfo(skb)->nr_frags);
11121112
skb_data3 = skb->data[3];
11131113
paddr = dma_map_single(&eni_dev->pci_dev->dev,skb->data,skb->len,
11141114
DMA_TO_DEVICE);
1115+
if (dma_mapping_error(&eni_dev->pci_dev->dev, paddr))
1116+
return enq_next;
11151117
ENI_PRV_PADDR(skb) = paddr;
11161118
/* prepare DMA queue entries */
11171119
j = 0;

drivers/crypto/qcom-rng.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <linux/clk.h>
99
#include <linux/crypto.h>
1010
#include <linux/io.h>
11+
#include <linux/iopoll.h>
1112
#include <linux/module.h>
1213
#include <linux/of.h>
1314
#include <linux/platform_device.h>
@@ -43,16 +44,19 @@ static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max)
4344
{
4445
unsigned int currsize = 0;
4546
u32 val;
47+
int ret;
4648

4749
/* read random data from hardware */
4850
do {
49-
val = readl_relaxed(rng->base + PRNG_STATUS);
50-
if (!(val & PRNG_STATUS_DATA_AVAIL))
51-
break;
51+
ret = readl_poll_timeout(rng->base + PRNG_STATUS, val,
52+
val & PRNG_STATUS_DATA_AVAIL,
53+
200, 10000);
54+
if (ret)
55+
return ret;
5256

5357
val = readl_relaxed(rng->base + PRNG_DATA_OUT);
5458
if (!val)
55-
break;
59+
return -EINVAL;
5660

5761
if ((max - currsize) >= WORD_SZ) {
5862
memcpy(data, &val, WORD_SZ);
@@ -61,11 +65,10 @@ static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max)
6165
} else {
6266
/* copy only remaining bytes */
6367
memcpy(data, &val, max - currsize);
64-
break;
6568
}
6669
} while (currsize < max);
6770

68-
return currsize;
71+
return 0;
6972
}
7073

7174
static int qcom_rng_generate(struct crypto_rng *tfm,
@@ -87,7 +90,7 @@ static int qcom_rng_generate(struct crypto_rng *tfm,
8790
mutex_unlock(&rng->lock);
8891
clk_disable_unprepare(rng->clk);
8992

90-
return 0;
93+
return ret;
9194
}
9295

9396
static int qcom_rng_seed(struct crypto_rng *tfm, const u8 *seed,

drivers/firmware/efi/apple-properties.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ static bool dump_properties __initdata;
2424
static int __init dump_properties_enable(char *arg)
2525
{
2626
dump_properties = true;
27-
return 0;
27+
return 1;
2828
}
2929

3030
__setup("dump_apple_properties", dump_properties_enable);

drivers/firmware/efi/efi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ static int __init efivar_ssdt_setup(char *str)
212212
memcpy(efivar_ssdt, str, strlen(str));
213213
else
214214
pr_warn("efivar_ssdt: name too long: %s\n", str);
215-
return 0;
215+
return 1;
216216
}
217217
__setup("efivar_ssdt=", efivar_ssdt_setup);
218218

0 commit comments

Comments
 (0)