Skip to content

Commit

Permalink
Merge tag 'v6.6.11' into 6.6-main
Browse files Browse the repository at this point in the history
This is the 6.6.11 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmWewwkACgkQONu9yGCS
# aT5D2g/9FCisf2ciRMvx7Vtx/lBzs9nVgi06+1uCr0ZGbTjktHy7scYrU6ZFbjoM
# 9ys5uUEbJP0Y2v2vmY4hTR6MPtVnQUP4ogQ5oUlgAeBx3eb0wyUFPUjNyuy8v1uM
# S74zsf/kkSHpMpzW/8xlifTyhHQHFXv5t8qUDuiPvHy4+WoZCqiccCCylGLqm7Qk
# lFhftxmmoAXTkWWuFtcaQ+lH85usVouDXto1feYTC2XBDFYsLMYU/R7Pfc+vyfcY
# tVHrqO/51nOq7XmatrQLCoc7p5PgLlde1iezCopcieS5QR7qdBKZ8q6NAQtJln+d
# +SMmLfDs8azl748h8bAs9aOiCuxA04jUlqDRi2xVgMFd7sXCpvA2zcxAMnaKPuCc
# cbd4fdKA0s9A3PDZcxSMQ11DQEzBh9l/hGLLVqk4k+y374m4/W/sHnrDePjwXEA5
# AeyUqU16jEiGfKdgzsmcxIST2T624HhYKgnKC3v5Xa3HdsebhpswzZb89HYVV4xJ
# HRuZcpuaxNLddGDHQ27cK8+WoX5/zib/xkf/Cj/uhZlTwcE2VaOgID3nmMQvT3gz
# x4h0Z0WiRY7pl+V4Ttg3LIazqa152CkXyG9cmY348t7/h8g9ZuMonIFPbhKA09G7
# 1QiTT00nAqTf9RLBYr7KJ053WnV7VpalYUW3PkwwkDEQ7IRlQws=
# =uxaN
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed Jan 10 17:17:13 2024 CET
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
  • Loading branch information
frank-w committed Jan 14, 2024
2 parents df58cf1 + 22852ea commit 8b16b7f
Show file tree
Hide file tree
Showing 135 changed files with 1,442 additions and 837 deletions.
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 = 10
SUBLEVEL = 11
EXTRAVERSION =
NAME = Hurr durr I'ma ninja sloth

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-sunxi/mc_smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,12 +807,12 @@ static int __init sunxi_mc_smp_init(void)
break;
}

is_a83t = sunxi_mc_smp_data[i].is_a83t;

of_node_put(node);
if (ret)
return -ENODEV;

is_a83t = sunxi_mc_smp_data[i].is_a83t;

if (!sunxi_mc_smp_cpu_table_init())
return -EINVAL;

Expand Down
51 changes: 44 additions & 7 deletions arch/powerpc/platforms/pseries/vas.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,15 @@ static struct vas_window *vas_allocate_window(int vas_id, u64 flags,
* same fault IRQ is not freed by the OS before.
*/
mutex_lock(&vas_pseries_mutex);
if (migration_in_progress)
if (migration_in_progress) {
rc = -EBUSY;
else
} else {
rc = allocate_setup_window(txwin, (u64 *)&domain[0],
cop_feat_caps->win_type);
if (!rc)
caps->nr_open_wins_progress++;
}

mutex_unlock(&vas_pseries_mutex);
if (rc)
goto out;
Expand All @@ -404,18 +408,29 @@ static struct vas_window *vas_allocate_window(int vas_id, u64 flags,
goto out_free;

txwin->win_type = cop_feat_caps->win_type;
mutex_lock(&vas_pseries_mutex);

/*
* The migration SUSPEND thread sets migration_in_progress and
* closes all open windows from the list. But the window is
* added to the list after open and modify HCALLs. So possible
* that migration_in_progress is set before modify HCALL which
* may cause some windows are still open when the hypervisor
* initiates the migration.
* So checks the migration_in_progress flag again and close all
* open windows.
*
* Possible to lose the acquired credit with DLPAR core
* removal after the window is opened. So if there are any
* closed windows (means with lost credits), do not give new
* window to user space. New windows will be opened only
* after the existing windows are reopened when credits are
* available.
*/
if (!caps->nr_close_wins) {
mutex_lock(&vas_pseries_mutex);
if (!caps->nr_close_wins && !migration_in_progress) {
list_add(&txwin->win_list, &caps->list);
caps->nr_open_windows++;
caps->nr_open_wins_progress--;
mutex_unlock(&vas_pseries_mutex);
vas_user_win_add_mm_context(&txwin->vas_win.task_ref);
return &txwin->vas_win;
Expand All @@ -433,6 +448,12 @@ static struct vas_window *vas_allocate_window(int vas_id, u64 flags,
*/
free_irq_setup(txwin);
h_deallocate_vas_window(txwin->vas_win.winid);
/*
* Hold mutex and reduce nr_open_wins_progress counter.
*/
mutex_lock(&vas_pseries_mutex);
caps->nr_open_wins_progress--;
mutex_unlock(&vas_pseries_mutex);
out:
atomic_dec(&cop_feat_caps->nr_used_credits);
kfree(txwin);
Expand Down Expand Up @@ -937,14 +958,14 @@ int vas_migration_handler(int action)
struct vas_caps *vcaps;
int i, rc = 0;

pr_info("VAS migration event %d\n", action);

/*
* NX-GZIP is not enabled. Nothing to do for migration.
*/
if (!copypaste_feat)
return rc;

mutex_lock(&vas_pseries_mutex);

if (action == VAS_SUSPEND)
migration_in_progress = true;
else
Expand Down Expand Up @@ -990,12 +1011,27 @@ int vas_migration_handler(int action)

switch (action) {
case VAS_SUSPEND:
mutex_lock(&vas_pseries_mutex);
rc = reconfig_close_windows(vcaps, vcaps->nr_open_windows,
true);
/*
* Windows are included in the list after successful
* open. So wait for closing these in-progress open
* windows in vas_allocate_window() which will be
* done if the migration_in_progress is set.
*/
while (vcaps->nr_open_wins_progress) {
mutex_unlock(&vas_pseries_mutex);
msleep(10);
mutex_lock(&vas_pseries_mutex);
}
mutex_unlock(&vas_pseries_mutex);
break;
case VAS_RESUME:
mutex_lock(&vas_pseries_mutex);
atomic_set(&caps->nr_total_credits, new_nr_creds);
rc = reconfig_open_windows(vcaps, new_nr_creds, true);
mutex_unlock(&vas_pseries_mutex);
break;
default:
/* should not happen */
Expand All @@ -1011,8 +1047,9 @@ int vas_migration_handler(int action)
goto out;
}

pr_info("VAS migration event (%d) successful\n", action);

out:
mutex_unlock(&vas_pseries_mutex);
return rc;
}

Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/platforms/pseries/vas.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ struct vas_cop_feat_caps {
struct vas_caps {
struct vas_cop_feat_caps caps;
struct list_head list; /* List of open windows */
int nr_open_wins_progress; /* Number of open windows in */
/* progress. Used in migration */
int nr_close_wins; /* closed windows in the hypervisor for DLPAR */
int nr_open_windows; /* Number of successful open windows */
u8 feat; /* Feature type */
Expand Down
4 changes: 4 additions & 0 deletions arch/riscv/kernel/cpufeature.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,10 @@ void check_unaligned_access(int cpu)
void *src;
long speed = RISCV_HWPROBE_MISALIGNED_SLOW;

/* We are already set since the last check */
if (per_cpu(misaligned_access_speed, cpu) != RISCV_HWPROBE_MISALIGNED_UNKNOWN)
return;

page = alloc_pages(GFP_NOWAIT, get_order(MISALIGNED_BUFFER_SIZE));
if (!page) {
pr_warn("Can't alloc pages to measure memcpy performance");
Expand Down
13 changes: 13 additions & 0 deletions arch/riscv/kvm/aia_imsic.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ struct imsic {
/* IMSIC SW-file */
struct imsic_mrif *swfile;
phys_addr_t swfile_pa;
spinlock_t swfile_extirq_lock;
};

#define imsic_vs_csr_read(__c) \
Expand Down Expand Up @@ -613,12 +614,23 @@ static void imsic_swfile_extirq_update(struct kvm_vcpu *vcpu)
{
struct imsic *imsic = vcpu->arch.aia_context.imsic_state;
struct imsic_mrif *mrif = imsic->swfile;
unsigned long flags;

/*
* The critical section is necessary during external interrupt
* updates to avoid the risk of losing interrupts due to potential
* interruptions between reading topei and updating pending status.
*/

spin_lock_irqsave(&imsic->swfile_extirq_lock, flags);

if (imsic_mrif_atomic_read(mrif, &mrif->eidelivery) &&
imsic_mrif_topei(mrif, imsic->nr_eix, imsic->nr_msis))
kvm_riscv_vcpu_set_interrupt(vcpu, IRQ_VS_EXT);
else
kvm_riscv_vcpu_unset_interrupt(vcpu, IRQ_VS_EXT);

spin_unlock_irqrestore(&imsic->swfile_extirq_lock, flags);
}

static void imsic_swfile_read(struct kvm_vcpu *vcpu, bool clear,
Expand Down Expand Up @@ -1039,6 +1051,7 @@ int kvm_riscv_vcpu_aia_imsic_init(struct kvm_vcpu *vcpu)
}
imsic->swfile = page_to_virt(swfile_page);
imsic->swfile_pa = page_to_phys(swfile_page);
spin_lock_init(&imsic->swfile_extirq_lock);

/* Setup IO device */
kvm_iodevice_init(&imsic->iodev, &imsic_iodoev_ops);
Expand Down
4 changes: 0 additions & 4 deletions arch/s390/kvm/vsie.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,10 +587,6 @@ void kvm_s390_vsie_gmap_notifier(struct gmap *gmap, unsigned long start,

if (!gmap_is_shadow(gmap))
return;
if (start >= 1UL << 31)
/* We are only interested in prefix pages */
return;

/*
* Only new shadow blocks are added to the list during runtime,
* therefore we can safely reference them all the time.
Expand Down
7 changes: 6 additions & 1 deletion arch/x86/events/intel/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4062,12 +4062,17 @@ static struct perf_guest_switch_msr *intel_guest_get_msrs(int *nr, void *data)
u64 pebs_mask = cpuc->pebs_enabled & x86_pmu.pebs_capable;
int global_ctrl, pebs_enable;

/*
* In addition to obeying exclude_guest/exclude_host, remove bits being
* used for PEBS when running a guest, because PEBS writes to virtual
* addresses (not physical addresses).
*/
*nr = 0;
global_ctrl = (*nr)++;
arr[global_ctrl] = (struct perf_guest_switch_msr){
.msr = MSR_CORE_PERF_GLOBAL_CTRL,
.host = intel_ctrl & ~cpuc->intel_ctrl_guest_mask,
.guest = intel_ctrl & (~cpuc->intel_ctrl_host_mask | ~pebs_mask),
.guest = intel_ctrl & ~cpuc->intel_ctrl_host_mask & ~pebs_mask,
};

if (!x86_pmu.pebs)
Expand Down
3 changes: 2 additions & 1 deletion arch/x86/kernel/kprobes/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,8 @@ static void kprobe_emulate_call_indirect(struct kprobe *p, struct pt_regs *regs)
{
unsigned long offs = addrmode_regoffs[p->ainsn.indirect.reg];

int3_emulate_call(regs, regs_get_register(regs, offs));
int3_emulate_push(regs, regs->ip - INT3_INSN_SIZE + p->ainsn.size);
int3_emulate_jmp(regs, regs_get_register(regs, offs));
}
NOKPROBE_SYMBOL(kprobe_emulate_call_indirect);

Expand Down
23 changes: 15 additions & 8 deletions crypto/xts.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct xts_tfm_ctx {

struct xts_instance_ctx {
struct crypto_skcipher_spawn spawn;
char name[CRYPTO_MAX_ALG_NAME];
struct crypto_cipher_spawn tweak_spawn;
};

struct xts_request_ctx {
Expand Down Expand Up @@ -306,7 +306,7 @@ static int xts_init_tfm(struct crypto_skcipher *tfm)

ctx->child = child;

tweak = crypto_alloc_cipher(ictx->name, 0, 0);
tweak = crypto_spawn_cipher(&ictx->tweak_spawn);
if (IS_ERR(tweak)) {
crypto_free_skcipher(ctx->child);
return PTR_ERR(tweak);
Expand All @@ -333,11 +333,13 @@ static void xts_free_instance(struct skcipher_instance *inst)
struct xts_instance_ctx *ictx = skcipher_instance_ctx(inst);

crypto_drop_skcipher(&ictx->spawn);
crypto_drop_cipher(&ictx->tweak_spawn);
kfree(inst);
}

static int xts_create(struct crypto_template *tmpl, struct rtattr **tb)
{
char name[CRYPTO_MAX_ALG_NAME];
struct skcipher_instance *inst;
struct xts_instance_ctx *ctx;
struct skcipher_alg *alg;
Expand All @@ -363,13 +365,13 @@ static int xts_create(struct crypto_template *tmpl, struct rtattr **tb)
cipher_name, 0, mask);
if (err == -ENOENT) {
err = -ENAMETOOLONG;
if (snprintf(ctx->name, CRYPTO_MAX_ALG_NAME, "ecb(%s)",
if (snprintf(name, CRYPTO_MAX_ALG_NAME, "ecb(%s)",
cipher_name) >= CRYPTO_MAX_ALG_NAME)
goto err_free_inst;

err = crypto_grab_skcipher(&ctx->spawn,
skcipher_crypto_instance(inst),
ctx->name, 0, mask);
name, 0, mask);
}

if (err)
Expand Down Expand Up @@ -398,23 +400,28 @@ static int xts_create(struct crypto_template *tmpl, struct rtattr **tb)
if (!strncmp(cipher_name, "ecb(", 4)) {
int len;

len = strscpy(ctx->name, cipher_name + 4, sizeof(ctx->name));
len = strscpy(name, cipher_name + 4, sizeof(name));
if (len < 2)
goto err_free_inst;

if (ctx->name[len - 1] != ')')
if (name[len - 1] != ')')
goto err_free_inst;

ctx->name[len - 1] = 0;
name[len - 1] = 0;

if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME,
"xts(%s)", ctx->name) >= CRYPTO_MAX_ALG_NAME) {
"xts(%s)", name) >= CRYPTO_MAX_ALG_NAME) {
err = -ENAMETOOLONG;
goto err_free_inst;
}
} else
goto err_free_inst;

err = crypto_grab_cipher(&ctx->tweak_spawn,
skcipher_crypto_instance(inst), name, 0, mask);
if (err)
goto err_free_inst;

inst->alg.base.cra_priority = alg->base.cra_priority;
inst->alg.base.cra_blocksize = XTS_BLOCK_SIZE;
inst->alg.base.cra_alignmask = alg->base.cra_alignmask |
Expand Down
15 changes: 14 additions & 1 deletion drivers/accel/qaic/mhi_controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,21 @@ static struct mhi_controller_config aic100_config = {

static int mhi_read_reg(struct mhi_controller *mhi_cntrl, void __iomem *addr, u32 *out)
{
u32 tmp = readl_relaxed(addr);
u32 tmp;

/*
* SOC_HW_VERSION quirk
* The SOC_HW_VERSION register (offset 0x224) is not reliable and
* may contain uninitialized values, including 0xFFFFFFFF. This could
* cause a false positive link down error. Instead, intercept any
* reads and provide the correct value of the register.
*/
if (addr - mhi_cntrl->regs == 0x224) {
*out = 0x60110200;
return 0;
}

tmp = readl_relaxed(addr);
if (tmp == U32_MAX)
return -EIO;

Expand Down
6 changes: 2 additions & 4 deletions drivers/accel/qaic/qaic_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,6 @@ struct drm_gem_object *qaic_gem_prime_import(struct drm_device *dev, struct dma_
struct dma_buf_attachment *attach;
struct drm_gem_object *obj;
struct qaic_bo *bo;
size_t size;
int ret;

bo = qaic_alloc_init_bo();
Expand All @@ -784,13 +783,12 @@ struct drm_gem_object *qaic_gem_prime_import(struct drm_device *dev, struct dma_
goto attach_fail;
}

size = PAGE_ALIGN(attach->dmabuf->size);
if (size == 0) {
if (!attach->dmabuf->size) {
ret = -EINVAL;
goto size_align_fail;
}

drm_gem_private_object_init(dev, obj, size);
drm_gem_private_object_init(dev, obj, attach->dmabuf->size);
/*
* skipping dma_buf_map_attachment() as we do not know the direction
* just yet. Once the direction is known in the subsequent IOCTL to
Expand Down
4 changes: 2 additions & 2 deletions drivers/acpi/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,9 +778,9 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)

static void acpi_thermal_unregister_thermal_zone(struct acpi_thermal *tz)
{
thermal_zone_device_disable(tz->thermal_zone);
acpi_thermal_zone_sysfs_remove(tz);
thermal_zone_device_unregister(tz->thermal_zone);
kfree(tz->trip_table);
tz->thermal_zone = NULL;
}

Expand Down Expand Up @@ -985,7 +985,7 @@ static void acpi_thermal_remove(struct acpi_device *device)

flush_workqueue(acpi_thermal_pm_queue);
acpi_thermal_unregister_thermal_zone(tz);

kfree(tz->trip_table);
kfree(tz);
}

Expand Down

0 comments on commit 8b16b7f

Please sign in to comment.