Skip to content

Commit cf0cec7

Browse files
committed
merge
2 parents 914bcc1 + 449d48b commit cf0cec7

37 files changed

Lines changed: 178 additions & 256 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 6
33
PATCHLEVEL = 17
4-
SUBLEVEL = 1
4+
SUBLEVEL = 2
55
EXTRAVERSION =
66
NAME = Baby Opossum Posse
77

arch/x86/kvm/emulate.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5107,12 +5107,11 @@ void init_decode_cache(struct x86_emulate_ctxt *ctxt)
51075107
ctxt->mem_read.end = 0;
51085108
}
51095109

5110-
int x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
5110+
int x86_emulate_insn(struct x86_emulate_ctxt *ctxt, bool check_intercepts)
51115111
{
51125112
const struct x86_emulate_ops *ops = ctxt->ops;
51135113
int rc = X86EMUL_CONTINUE;
51145114
int saved_dst_type = ctxt->dst.type;
5115-
bool is_guest_mode = ctxt->ops->is_guest_mode(ctxt);
51165115

51175116
ctxt->mem_read.pos = 0;
51185117

@@ -5160,7 +5159,7 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
51605159
fetch_possible_mmx_operand(&ctxt->dst);
51615160
}
51625161

5163-
if (unlikely(is_guest_mode) && ctxt->intercept) {
5162+
if (unlikely(check_intercepts) && ctxt->intercept) {
51645163
rc = emulator_check_intercept(ctxt, ctxt->intercept,
51655164
X86_ICPT_PRE_EXCEPT);
51665165
if (rc != X86EMUL_CONTINUE)
@@ -5189,7 +5188,7 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
51895188
goto done;
51905189
}
51915190

5192-
if (unlikely(is_guest_mode) && (ctxt->d & Intercept)) {
5191+
if (unlikely(check_intercepts) && (ctxt->d & Intercept)) {
51935192
rc = emulator_check_intercept(ctxt, ctxt->intercept,
51945193
X86_ICPT_POST_EXCEPT);
51955194
if (rc != X86EMUL_CONTINUE)
@@ -5243,7 +5242,7 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
52435242

52445243
special_insn:
52455244

5246-
if (unlikely(is_guest_mode) && (ctxt->d & Intercept)) {
5245+
if (unlikely(check_intercepts) && (ctxt->d & Intercept)) {
52475246
rc = emulator_check_intercept(ctxt, ctxt->intercept,
52485247
X86_ICPT_POST_MEMACCESS);
52495248
if (rc != X86EMUL_CONTINUE)

arch/x86/kvm/kvm_emulate.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ struct x86_emulate_ops {
235235
void (*set_nmi_mask)(struct x86_emulate_ctxt *ctxt, bool masked);
236236

237237
bool (*is_smm)(struct x86_emulate_ctxt *ctxt);
238-
bool (*is_guest_mode)(struct x86_emulate_ctxt *ctxt);
239238
int (*leave_smm)(struct x86_emulate_ctxt *ctxt);
240239
void (*triple_fault)(struct x86_emulate_ctxt *ctxt);
241240
int (*set_xcr)(struct x86_emulate_ctxt *ctxt, u32 index, u64 xcr);
@@ -521,7 +520,7 @@ bool x86_page_table_writing_insn(struct x86_emulate_ctxt *ctxt);
521520
#define EMULATION_RESTART 1
522521
#define EMULATION_INTERCEPTED 2
523522
void init_decode_cache(struct x86_emulate_ctxt *ctxt);
524-
int x86_emulate_insn(struct x86_emulate_ctxt *ctxt);
523+
int x86_emulate_insn(struct x86_emulate_ctxt *ctxt, bool check_intercepts);
525524
int emulator_task_switch(struct x86_emulate_ctxt *ctxt,
526525
u16 tss_selector, int idt_index, int reason,
527526
bool has_error_code, u32 error_code);

arch/x86/kvm/x86.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8470,11 +8470,6 @@ static bool emulator_is_smm(struct x86_emulate_ctxt *ctxt)
84708470
return is_smm(emul_to_vcpu(ctxt));
84718471
}
84728472

8473-
static bool emulator_is_guest_mode(struct x86_emulate_ctxt *ctxt)
8474-
{
8475-
return is_guest_mode(emul_to_vcpu(ctxt));
8476-
}
8477-
84788473
#ifndef CONFIG_KVM_SMM
84798474
static int emulator_leave_smm(struct x86_emulate_ctxt *ctxt)
84808475
{
@@ -8558,7 +8553,6 @@ static const struct x86_emulate_ops emulate_ops = {
85588553
.guest_cpuid_is_intel_compatible = emulator_guest_cpuid_is_intel_compatible,
85598554
.set_nmi_mask = emulator_set_nmi_mask,
85608555
.is_smm = emulator_is_smm,
8561-
.is_guest_mode = emulator_is_guest_mode,
85628556
.leave_smm = emulator_leave_smm,
85638557
.triple_fault = emulator_triple_fault,
85648558
.set_xcr = emulator_set_xcr,
@@ -9143,7 +9137,14 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa,
91439137
ctxt->exception.address = 0;
91449138
}
91459139

9146-
r = x86_emulate_insn(ctxt);
9140+
/*
9141+
* Check L1's instruction intercepts when emulating instructions for
9142+
* L2, unless KVM is re-emulating a previously decoded instruction,
9143+
* e.g. to complete userspace I/O, in which case KVM has already
9144+
* checked the intercepts.
9145+
*/
9146+
r = x86_emulate_insn(ctxt, is_guest_mode(vcpu) &&
9147+
!(emulation_type & EMULTYPE_NO_DECODE));
91479148

91489149
if (r == EMULATION_INTERCEPTED)
91499150
return 1;

crypto/rng.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ int crypto_del_default_rng(void)
168168
EXPORT_SYMBOL_GPL(crypto_del_default_rng);
169169
#endif
170170

171+
static void rng_default_set_ent(struct crypto_rng *tfm, const u8 *data,
172+
unsigned int len)
173+
{
174+
}
175+
171176
int crypto_register_rng(struct rng_alg *alg)
172177
{
173178
struct crypto_alg *base = &alg->base;
@@ -179,6 +184,9 @@ int crypto_register_rng(struct rng_alg *alg)
179184
base->cra_flags &= ~CRYPTO_ALG_TYPE_MASK;
180185
base->cra_flags |= CRYPTO_ALG_TYPE_RNG;
181186

187+
if (!alg->set_ent)
188+
alg->set_ent = rng_default_set_ent;
189+
182190
return crypto_register_alg(base);
183191
}
184192
EXPORT_SYMBOL_GPL(crypto_register_rng);

crypto/testmgr.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4186,6 +4186,7 @@ static const struct alg_test_desc alg_test_descs[] = {
41864186
.alg = "authenc(hmac(sha1),cbc(aes))",
41874187
.generic_driver = "authenc(hmac-sha1-lib,cbc(aes-generic))",
41884188
.test = alg_test_aead,
4189+
.fips_allowed = 1,
41894190
.suite = {
41904191
.aead = __VECS(hmac_sha1_aes_cbc_tv_temp)
41914192
}
@@ -4206,6 +4207,7 @@ static const struct alg_test_desc alg_test_descs[] = {
42064207
}, {
42074208
.alg = "authenc(hmac(sha1),ctr(aes))",
42084209
.test = alg_test_null,
4210+
.fips_allowed = 1,
42094211
}, {
42104212
.alg = "authenc(hmac(sha1),ecb(cipher_null))",
42114213
.generic_driver = "authenc(hmac-sha1-lib,ecb-cipher_null)",
@@ -4216,6 +4218,7 @@ static const struct alg_test_desc alg_test_descs[] = {
42164218
}, {
42174219
.alg = "authenc(hmac(sha1),rfc3686(ctr(aes)))",
42184220
.test = alg_test_null,
4221+
.fips_allowed = 1,
42194222
}, {
42204223
.alg = "authenc(hmac(sha224),cbc(des))",
42214224
.generic_driver = "authenc(hmac-sha224-lib,cbc(des-generic))",
@@ -5078,6 +5081,7 @@ static const struct alg_test_desc alg_test_descs[] = {
50785081
.alg = "hmac(sha1)",
50795082
.generic_driver = "hmac-sha1-lib",
50805083
.test = alg_test_hash,
5084+
.fips_allowed = 1,
50815085
.suite = {
50825086
.hash = __VECS(hmac_sha1_tv_template)
50835087
}
@@ -5448,6 +5452,7 @@ static const struct alg_test_desc alg_test_descs[] = {
54485452
.alg = "sha1",
54495453
.generic_driver = "sha1-lib",
54505454
.test = alg_test_hash,
5455+
.fips_allowed = 1,
54515456
.suite = {
54525457
.hash = __VECS(sha1_tv_template)
54535458
}

crypto/zstd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static void zstd_exit(struct crypto_acomp *acomp_tfm)
8383
static int zstd_compress_one(struct acomp_req *req, struct zstd_ctx *ctx,
8484
const void *src, void *dst, unsigned int *dlen)
8585
{
86-
unsigned int out_len;
86+
size_t out_len;
8787

8888
ctx->cctx = zstd_init_cctx(ctx->wksp, ctx->wksp_size);
8989
if (!ctx->cctx)

drivers/android/dbitmap.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ static inline void dbitmap_free(struct dbitmap *dmap)
3737
{
3838
dmap->nbits = 0;
3939
kfree(dmap->map);
40+
dmap->map = NULL;
4041
}
4142

4243
/* Returns the nbits that a dbitmap can shrink to, 0 if not possible. */

drivers/base/faux.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ struct faux_device *faux_device_create_with_groups(const char *name,
155155
dev->parent = &faux_bus_root;
156156
dev->bus = &faux_bus_type;
157157
dev_set_name(dev, "%s", name);
158+
device_set_pm_not_required(dev);
158159

159160
ret = device_add(dev);
160161
if (ret) {

drivers/bluetooth/btusb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,8 @@ static const struct usb_device_id quirks_table[] = {
522522
/* Realtek 8851BU Bluetooth devices */
523523
{ USB_DEVICE(0x3625, 0x010b), .driver_info = BTUSB_REALTEK |
524524
BTUSB_WIDEBAND_SPEECH },
525+
{ USB_DEVICE(0x2001, 0x332a), .driver_info = BTUSB_REALTEK |
526+
BTUSB_WIDEBAND_SPEECH },
525527

526528
/* Realtek 8852AE Bluetooth devices */
527529
{ USB_DEVICE(0x0bda, 0x2852), .driver_info = BTUSB_REALTEK |

0 commit comments

Comments
 (0)