This is the 5.10.59 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmEZAfkACgkQONu9yGCS aT4SSQ//YEY7KT3w83wnXUP3HuN9GS5DCXNheyHjX0AdvM23HFiKbCBrmpIDBujz USJnkESAaAHp3iT22HfW5n4ZTgcv11AXUeytB6VENGoYsg+HwwT4KXtVXxWBjGAU RNBQEXyuSnEKJo4MNfaFXmhxYaToTYHXxns+JKzjsPuzKt5p4j+Gcr1DdtP/T+3w 6o94C+8tUaGd2Y4Zzs9FIp2vl7j3wKf8JQ+Yzhf7iSaZL3PBfD2wreX7lo0n2x2O rmFcnSZpXNkDmatRY0wRtNZrQrr7XJCyc53+F4m4KW/YlPvPxFDHRJ+GEAkkv6FR RUkbzfi6ym9LYC+BdMlUotEvxlLBavsh3JYuHmuZlxstXpEL4Hj1u3Dm1xVITyhZ ktmzeQZAIvOcLMghQlqLa6go0EUt4OpvbJTtLYPWp3mbwASDKHEKrD2R1XekHlOm QKRclgsbqdJff63FMMtWo0HdkDg+a3EQoXzvY+/Ecy72MeyjdvaPdmGs8kaYzYkx 4EeKluH4c9quM2K73D9qFd3JydIyoXmeZYSEy1yemBQjjumYF+AjxcohATErFvKx KyLR/VNjEQ59ZR+/M+49wnIkqRgbvr2jIMYubKouNLXy5Rzw3imJuLvcTRvn7TEu 7YBEYBaS95Q44vlWAoU25Jr4bUcBJGrPLYeZNNWU6QygsWMsbXo= =jOIx -----END PGP SIGNATURE----- Merge 5.10.59 into android12-5.10-lts Changes in 5.10.59 KVM: SVM: Fix off-by-one indexing when nullifying last used SEV VMCB tee: Correct inappropriate usage of TEE_SHM_DMA_BUF flag firmware: tee_bnxt: Release TEE shm, session, and context during kexec bpf: Add lockdown check for probe_write_user helper Revert "selftests/resctrl: Use resctrl/info for feature detection" mm: make zone_to_nid() and zone_set_nid() available for DISCONTIGMEM arm64: dts: renesas: rzg2: Add usb2_clksel to RZ/G2 M/N/H arm64: dts: renesas: beacon: Fix USB extal reference arm64: dts: renesas: beacon: Fix USB ref clock references vboxsf: Honor excl flag to the dir-inode create op vboxsf: Make vboxsf_dir_create() return the handle for the created file USB:ehci:fix Kunpeng920 ehci hardware problem ALSA: pcm: Fix mmap breakage without explicit buffer setup ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 650 G8 Notebook PC ALSA: hda: Add quirk for ASUS Flow x13 ppp: Fix generating ppp unit id when ifname is not specified ovl: prevent private clone if bind mount is not allowed net: xilinx_emaclite: Do not print real IOMEM pointer Linux 5.10.59 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ie4ba3880d1be4c29acc83453ad89a621ad046b7c
This commit is contained in:
commit
46f161a1b2
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 58
|
||||
SUBLEVEL = 59
|
||||
EXTRAVERSION =
|
||||
NAME = Dare mighty things
|
||||
|
||||
|
@ -271,12 +271,12 @@ &du_out_rgb {
|
||||
&ehci0 {
|
||||
dr_mode = "otg";
|
||||
status = "okay";
|
||||
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
|
||||
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>, <&usb2_clksel>, <&versaclock5 3>;
|
||||
};
|
||||
|
||||
&ehci1 {
|
||||
status = "okay";
|
||||
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
|
||||
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>, <&usb2_clksel>, <&versaclock5 3>;
|
||||
};
|
||||
|
||||
&hdmi0 {
|
||||
|
@ -295,8 +295,10 @@ &sdhi3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_extal_clk {
|
||||
clock-frequency = <50000000>;
|
||||
&usb2_clksel {
|
||||
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>,
|
||||
<&versaclock5 3>, <&usb3s0_clk>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb3s0_clk {
|
||||
|
@ -836,6 +836,21 @@ hsusb: usb@e6590000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
usb2_clksel: clock-controller@e6590630 {
|
||||
compatible = "renesas,r8a774a1-rcar-usb2-clock-sel",
|
||||
"renesas,rcar-gen3-usb2-clock-sel";
|
||||
reg = <0 0xe6590630 0 0x02>;
|
||||
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>,
|
||||
<&usb_extal_clk>, <&usb3s0_clk>;
|
||||
clock-names = "ehci_ohci", "hs-usb-if",
|
||||
"usb_extal", "usb_xtal";
|
||||
#clock-cells = <0>;
|
||||
power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>;
|
||||
resets = <&cpg 703>, <&cpg 704>;
|
||||
reset-names = "ehci_ohci", "hs-usb-if";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
usb_dmac0: dma-controller@e65a0000 {
|
||||
compatible = "renesas,r8a774a1-usb-dmac",
|
||||
"renesas,usb-dmac";
|
||||
|
@ -709,6 +709,21 @@ hsusb: usb@e6590000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
usb2_clksel: clock-controller@e6590630 {
|
||||
compatible = "renesas,r8a774b1-rcar-usb2-clock-sel",
|
||||
"renesas,rcar-gen3-usb2-clock-sel";
|
||||
reg = <0 0xe6590630 0 0x02>;
|
||||
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>,
|
||||
<&usb_extal_clk>, <&usb3s0_clk>;
|
||||
clock-names = "ehci_ohci", "hs-usb-if",
|
||||
"usb_extal", "usb_xtal";
|
||||
#clock-cells = <0>;
|
||||
power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
|
||||
resets = <&cpg 703>, <&cpg 704>;
|
||||
reset-names = "ehci_ohci", "hs-usb-if";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
usb_dmac0: dma-controller@e65a0000 {
|
||||
compatible = "renesas,r8a774b1-usb-dmac",
|
||||
"renesas,usb-dmac";
|
||||
|
@ -890,6 +890,21 @@ hsusb: usb@e6590000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
usb2_clksel: clock-controller@e6590630 {
|
||||
compatible = "renesas,r8a774e1-rcar-usb2-clock-sel",
|
||||
"renesas,rcar-gen3-usb2-clock-sel";
|
||||
reg = <0 0xe6590630 0 0x02>;
|
||||
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>,
|
||||
<&usb_extal_clk>, <&usb3s0_clk>;
|
||||
clock-names = "ehci_ohci", "hs-usb-if",
|
||||
"usb_extal", "usb_xtal";
|
||||
#clock-cells = <0>;
|
||||
power-domains = <&sysc R8A774E1_PD_ALWAYS_ON>;
|
||||
resets = <&cpg 703>, <&cpg 704>;
|
||||
reset-names = "ehci_ohci", "hs-usb-if";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
usb_dmac0: dma-controller@e65a0000 {
|
||||
compatible = "renesas,r8a774e1-usb-dmac",
|
||||
"renesas,usb-dmac";
|
||||
|
@ -124,7 +124,7 @@ static void sev_asid_free(int asid)
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
sd = per_cpu(svm_data, cpu);
|
||||
sd->sev_vmcbs[pos] = NULL;
|
||||
sd->sev_vmcbs[asid] = NULL;
|
||||
}
|
||||
|
||||
mutex_unlock(&sev_bitmap_lock);
|
||||
|
@ -212,10 +212,9 @@ static int tee_bnxt_fw_probe(struct device *dev)
|
||||
|
||||
pvt_data.dev = dev;
|
||||
|
||||
fw_shm_pool = tee_shm_alloc(pvt_data.ctx, MAX_SHM_MEM_SZ,
|
||||
TEE_SHM_MAPPED | TEE_SHM_DMA_BUF);
|
||||
fw_shm_pool = tee_shm_alloc_kernel_buf(pvt_data.ctx, MAX_SHM_MEM_SZ);
|
||||
if (IS_ERR(fw_shm_pool)) {
|
||||
dev_err(pvt_data.dev, "tee_shm_alloc failed\n");
|
||||
dev_err(pvt_data.dev, "tee_shm_alloc_kernel_buf failed\n");
|
||||
err = PTR_ERR(fw_shm_pool);
|
||||
goto out_sess;
|
||||
}
|
||||
@ -242,6 +241,14 @@ static int tee_bnxt_fw_remove(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void tee_bnxt_fw_shutdown(struct device *dev)
|
||||
{
|
||||
tee_shm_free(pvt_data.fw_shm_pool);
|
||||
tee_client_close_session(pvt_data.ctx, pvt_data.session_id);
|
||||
tee_client_close_context(pvt_data.ctx);
|
||||
pvt_data.ctx = NULL;
|
||||
}
|
||||
|
||||
static const struct tee_client_device_id tee_bnxt_fw_id_table[] = {
|
||||
{UUID_INIT(0x6272636D, 0x2019, 0x0716,
|
||||
0x42, 0x43, 0x4D, 0x5F, 0x53, 0x43, 0x48, 0x49)},
|
||||
@ -257,6 +264,7 @@ static struct tee_client_driver tee_bnxt_fw_driver = {
|
||||
.bus = &tee_bus_type,
|
||||
.probe = tee_bnxt_fw_probe,
|
||||
.remove = tee_bnxt_fw_remove,
|
||||
.shutdown = tee_bnxt_fw_shutdown,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -1191,9 +1191,8 @@ static int xemaclite_of_probe(struct platform_device *ofdev)
|
||||
}
|
||||
|
||||
dev_info(dev,
|
||||
"Xilinx EmacLite at 0x%08X mapped to 0x%08X, irq=%d\n",
|
||||
(unsigned int __force)ndev->mem_start,
|
||||
(unsigned int __force)lp->base_addr, ndev->irq);
|
||||
"Xilinx EmacLite at 0x%08X mapped to 0x%p, irq=%d\n",
|
||||
(unsigned int __force)ndev->mem_start, lp->base_addr, ndev->irq);
|
||||
return 0;
|
||||
|
||||
error:
|
||||
|
@ -283,7 +283,7 @@ static struct channel *ppp_find_channel(struct ppp_net *pn, int unit);
|
||||
static int ppp_connect_channel(struct channel *pch, int unit);
|
||||
static int ppp_disconnect_channel(struct channel *pch);
|
||||
static void ppp_destroy_channel(struct channel *pch);
|
||||
static int unit_get(struct idr *p, void *ptr);
|
||||
static int unit_get(struct idr *p, void *ptr, int min);
|
||||
static int unit_set(struct idr *p, void *ptr, int n);
|
||||
static void unit_put(struct idr *p, int n);
|
||||
static void *unit_find(struct idr *p, int n);
|
||||
@ -1045,9 +1045,20 @@ static int ppp_unit_register(struct ppp *ppp, int unit, bool ifname_is_set)
|
||||
mutex_lock(&pn->all_ppp_mutex);
|
||||
|
||||
if (unit < 0) {
|
||||
ret = unit_get(&pn->units_idr, ppp);
|
||||
ret = unit_get(&pn->units_idr, ppp, 0);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
if (!ifname_is_set) {
|
||||
while (1) {
|
||||
snprintf(ppp->dev->name, IFNAMSIZ, "ppp%i", ret);
|
||||
if (!__dev_get_by_name(ppp->ppp_net, ppp->dev->name))
|
||||
break;
|
||||
unit_put(&pn->units_idr, ret);
|
||||
ret = unit_get(&pn->units_idr, ppp, ret + 1);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* Caller asked for a specific unit number. Fail with -EEXIST
|
||||
* if unavailable. For backward compatibility, return -EEXIST
|
||||
@ -3378,9 +3389,9 @@ static int unit_set(struct idr *p, void *ptr, int n)
|
||||
}
|
||||
|
||||
/* get new free unit number and associate pointer with it */
|
||||
static int unit_get(struct idr *p, void *ptr)
|
||||
static int unit_get(struct idr *p, void *ptr, int min)
|
||||
{
|
||||
return idr_alloc(p, ptr, 0, 0, GFP_KERNEL);
|
||||
return idr_alloc(p, ptr, min, 0, GFP_KERNEL);
|
||||
}
|
||||
|
||||
/* put unit number back to a pool */
|
||||
|
@ -181,7 +181,7 @@ static struct tee_shm *get_msg_arg(struct tee_context *ctx, size_t num_params,
|
||||
struct optee_msg_arg *ma;
|
||||
|
||||
shm = tee_shm_alloc(ctx, OPTEE_MSG_GET_ARG_SIZE(num_params),
|
||||
TEE_SHM_MAPPED);
|
||||
TEE_SHM_MAPPED | TEE_SHM_PRIV);
|
||||
if (IS_ERR(shm))
|
||||
return shm;
|
||||
|
||||
|
@ -278,7 +278,8 @@ static void optee_release(struct tee_context *ctx)
|
||||
if (!ctxdata)
|
||||
return;
|
||||
|
||||
shm = tee_shm_alloc(ctx, sizeof(struct optee_msg_arg), TEE_SHM_MAPPED);
|
||||
shm = tee_shm_alloc(ctx, sizeof(struct optee_msg_arg),
|
||||
TEE_SHM_MAPPED | TEE_SHM_PRIV);
|
||||
if (!IS_ERR(shm)) {
|
||||
arg = tee_shm_get_va(shm, 0);
|
||||
/*
|
||||
|
@ -313,7 +313,7 @@ static void handle_rpc_func_cmd_shm_alloc(struct tee_context *ctx,
|
||||
shm = cmd_alloc_suppl(ctx, sz);
|
||||
break;
|
||||
case OPTEE_MSG_RPC_SHM_TYPE_KERNEL:
|
||||
shm = tee_shm_alloc(ctx, sz, TEE_SHM_MAPPED);
|
||||
shm = tee_shm_alloc(ctx, sz, TEE_SHM_MAPPED | TEE_SHM_PRIV);
|
||||
break;
|
||||
default:
|
||||
arg->ret = TEEC_ERROR_BAD_PARAMETERS;
|
||||
@ -501,7 +501,8 @@ void optee_handle_rpc(struct tee_context *ctx, struct optee_rpc_param *param,
|
||||
|
||||
switch (OPTEE_SMC_RETURN_GET_RPC_FUNC(param->a0)) {
|
||||
case OPTEE_SMC_RPC_FUNC_ALLOC:
|
||||
shm = tee_shm_alloc(ctx, param->a1, TEE_SHM_MAPPED);
|
||||
shm = tee_shm_alloc(ctx, param->a1,
|
||||
TEE_SHM_MAPPED | TEE_SHM_PRIV);
|
||||
if (!IS_ERR(shm) && !tee_shm_get_pa(shm, 0, &pa)) {
|
||||
reg_pair_from_64(¶m->a1, ¶m->a2, pa);
|
||||
reg_pair_from_64(¶m->a4, ¶m->a5,
|
||||
|
@ -27,7 +27,11 @@ static int pool_op_alloc(struct tee_shm_pool_mgr *poolm,
|
||||
shm->paddr = page_to_phys(page);
|
||||
shm->size = PAGE_SIZE << order;
|
||||
|
||||
if (shm->flags & TEE_SHM_DMA_BUF) {
|
||||
/*
|
||||
* Shared memory private to the OP-TEE driver doesn't need
|
||||
* to be registered with OP-TEE.
|
||||
*/
|
||||
if (!(shm->flags & TEE_SHM_PRIV)) {
|
||||
unsigned int nr_pages = 1 << order, i;
|
||||
struct page **pages;
|
||||
|
||||
@ -60,7 +64,7 @@ static int pool_op_alloc(struct tee_shm_pool_mgr *poolm,
|
||||
static void pool_op_free(struct tee_shm_pool_mgr *poolm,
|
||||
struct tee_shm *shm)
|
||||
{
|
||||
if (shm->flags & TEE_SHM_DMA_BUF)
|
||||
if (!(shm->flags & TEE_SHM_PRIV))
|
||||
optee_shm_unregister(shm->ctx, shm);
|
||||
|
||||
free_pages((unsigned long)shm->kaddr, get_order(shm->size));
|
||||
|
@ -117,7 +117,7 @@ struct tee_shm *tee_shm_alloc(struct tee_context *ctx, size_t size, u32 flags)
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
if ((flags & ~(TEE_SHM_MAPPED | TEE_SHM_DMA_BUF))) {
|
||||
if ((flags & ~(TEE_SHM_MAPPED | TEE_SHM_DMA_BUF | TEE_SHM_PRIV))) {
|
||||
dev_err(teedev->dev.parent, "invalid shm flags 0x%x", flags);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
@ -207,7 +207,7 @@ EXPORT_SYMBOL_GPL(tee_shm_alloc);
|
||||
*/
|
||||
struct tee_shm *tee_shm_alloc_kernel_buf(struct tee_context *ctx, size_t size)
|
||||
{
|
||||
return tee_shm_alloc(ctx, size, TEE_SHM_MAPPED | TEE_SHM_DMA_BUF);
|
||||
return tee_shm_alloc(ctx, size, TEE_SHM_MAPPED);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tee_shm_alloc_kernel_buf);
|
||||
|
||||
|
@ -297,6 +297,9 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
|
||||
if (pdev->vendor == PCI_VENDOR_ID_STMICRO
|
||||
&& pdev->device == PCI_DEVICE_ID_STMICRO_USB_HOST)
|
||||
; /* ConneXT has no sbrn register */
|
||||
else if (pdev->vendor == PCI_VENDOR_ID_HUAWEI
|
||||
&& pdev->device == 0xa239)
|
||||
; /* HUAWEI Kunpeng920 USB EHCI has no sbrn register */
|
||||
else
|
||||
pci_read_config_byte(pdev, 0x60, &ehci->sbrn);
|
||||
|
||||
|
@ -1919,6 +1919,20 @@ void drop_collected_mounts(struct vfsmount *mnt)
|
||||
namespace_unlock();
|
||||
}
|
||||
|
||||
static bool has_locked_children(struct mount *mnt, struct dentry *dentry)
|
||||
{
|
||||
struct mount *child;
|
||||
|
||||
list_for_each_entry(child, &mnt->mnt_mounts, mnt_child) {
|
||||
if (!is_subdir(child->mnt_mountpoint, dentry))
|
||||
continue;
|
||||
|
||||
if (child->mnt.mnt_flags & MNT_LOCKED)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* clone_private_mount - create a private clone of a path
|
||||
*
|
||||
@ -1933,10 +1947,19 @@ struct vfsmount *clone_private_mount(const struct path *path)
|
||||
struct mount *old_mnt = real_mount(path->mnt);
|
||||
struct mount *new_mnt;
|
||||
|
||||
down_read(&namespace_sem);
|
||||
if (IS_MNT_UNBINDABLE(old_mnt))
|
||||
return ERR_PTR(-EINVAL);
|
||||
goto invalid;
|
||||
|
||||
if (!check_mnt(old_mnt))
|
||||
goto invalid;
|
||||
|
||||
if (has_locked_children(old_mnt, path->dentry))
|
||||
goto invalid;
|
||||
|
||||
new_mnt = clone_mnt(old_mnt, path->dentry, CL_PRIVATE);
|
||||
up_read(&namespace_sem);
|
||||
|
||||
if (IS_ERR(new_mnt))
|
||||
return ERR_CAST(new_mnt);
|
||||
|
||||
@ -1944,6 +1967,10 @@ struct vfsmount *clone_private_mount(const struct path *path)
|
||||
new_mnt->mnt_ns = MNT_NS_INTERNAL;
|
||||
|
||||
return &new_mnt->mnt;
|
||||
|
||||
invalid:
|
||||
up_read(&namespace_sem);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(clone_private_mount);
|
||||
|
||||
@ -2295,19 +2322,6 @@ static int do_change_type(struct path *path, int ms_flags)
|
||||
return err;
|
||||
}
|
||||
|
||||
static bool has_locked_children(struct mount *mnt, struct dentry *dentry)
|
||||
{
|
||||
struct mount *child;
|
||||
list_for_each_entry(child, &mnt->mnt_mounts, mnt_child) {
|
||||
if (!is_subdir(child->mnt_mountpoint, dentry))
|
||||
continue;
|
||||
|
||||
if (child->mnt.mnt_flags & MNT_LOCKED)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static struct mount *__do_loopback(struct path *old_path, int recurse)
|
||||
{
|
||||
struct mount *mnt = ERR_PTR(-EINVAL), *old = real_mount(old_path->mnt);
|
||||
|
@ -253,7 +253,7 @@ static int vboxsf_dir_instantiate(struct inode *parent, struct dentry *dentry,
|
||||
}
|
||||
|
||||
static int vboxsf_dir_create(struct inode *parent, struct dentry *dentry,
|
||||
umode_t mode, int is_dir)
|
||||
umode_t mode, bool is_dir, bool excl, u64 *handle_ret)
|
||||
{
|
||||
struct vboxsf_inode *sf_parent_i = VBOXSF_I(parent);
|
||||
struct vboxsf_sbi *sbi = VBOXSF_SBI(parent->i_sb);
|
||||
@ -261,10 +261,12 @@ static int vboxsf_dir_create(struct inode *parent, struct dentry *dentry,
|
||||
int err;
|
||||
|
||||
params.handle = SHFL_HANDLE_NIL;
|
||||
params.create_flags = SHFL_CF_ACT_CREATE_IF_NEW |
|
||||
SHFL_CF_ACT_FAIL_IF_EXISTS |
|
||||
SHFL_CF_ACCESS_READWRITE |
|
||||
(is_dir ? SHFL_CF_DIRECTORY : 0);
|
||||
params.create_flags = SHFL_CF_ACT_CREATE_IF_NEW | SHFL_CF_ACCESS_READWRITE;
|
||||
if (is_dir)
|
||||
params.create_flags |= SHFL_CF_DIRECTORY;
|
||||
if (excl)
|
||||
params.create_flags |= SHFL_CF_ACT_FAIL_IF_EXISTS;
|
||||
|
||||
params.info.attr.mode = (mode & 0777) |
|
||||
(is_dir ? SHFL_TYPE_DIRECTORY : SHFL_TYPE_FILE);
|
||||
params.info.attr.additional = SHFLFSOBJATTRADD_NOTHING;
|
||||
@ -276,28 +278,32 @@ static int vboxsf_dir_create(struct inode *parent, struct dentry *dentry,
|
||||
if (params.result != SHFL_FILE_CREATED)
|
||||
return -EPERM;
|
||||
|
||||
vboxsf_close(sbi->root, params.handle);
|
||||
|
||||
err = vboxsf_dir_instantiate(parent, dentry, ¶ms.info);
|
||||
if (err)
|
||||
return err;
|
||||
goto out;
|
||||
|
||||
/* parent directory access/change time changed */
|
||||
sf_parent_i->force_restat = 1;
|
||||
|
||||
return 0;
|
||||
out:
|
||||
if (err == 0 && handle_ret)
|
||||
*handle_ret = params.handle;
|
||||
else
|
||||
vboxsf_close(sbi->root, params.handle);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static int vboxsf_dir_mkfile(struct inode *parent, struct dentry *dentry,
|
||||
umode_t mode, bool excl)
|
||||
{
|
||||
return vboxsf_dir_create(parent, dentry, mode, 0);
|
||||
return vboxsf_dir_create(parent, dentry, mode, false, excl, NULL);
|
||||
}
|
||||
|
||||
static int vboxsf_dir_mkdir(struct inode *parent, struct dentry *dentry,
|
||||
umode_t mode)
|
||||
{
|
||||
return vboxsf_dir_create(parent, dentry, mode, 1);
|
||||
return vboxsf_dir_create(parent, dentry, mode, true, true, NULL);
|
||||
}
|
||||
|
||||
static int vboxsf_dir_unlink(struct inode *parent, struct dentry *dentry)
|
||||
|
@ -448,7 +448,7 @@ struct zone {
|
||||
*/
|
||||
long lowmem_reserve[MAX_NR_ZONES];
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
#ifdef CONFIG_NEED_MULTIPLE_NODES
|
||||
int node;
|
||||
#endif
|
||||
struct pglist_data *zone_pgdat;
|
||||
@ -922,7 +922,7 @@ static inline bool populated_zone(struct zone *zone)
|
||||
return zone->present_pages;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
#ifdef CONFIG_NEED_MULTIPLE_NODES
|
||||
static inline int zone_to_nid(struct zone *zone)
|
||||
{
|
||||
return zone->node;
|
||||
|
@ -120,6 +120,7 @@ enum lockdown_reason {
|
||||
LOCKDOWN_MMIOTRACE,
|
||||
LOCKDOWN_DEBUGFS,
|
||||
LOCKDOWN_XMON_WR,
|
||||
LOCKDOWN_BPF_WRITE_USER,
|
||||
LOCKDOWN_INTEGRITY_MAX,
|
||||
LOCKDOWN_KCORE,
|
||||
LOCKDOWN_KPROBES,
|
||||
|
@ -27,6 +27,7 @@
|
||||
#define TEE_SHM_USER_MAPPED BIT(4) /* Memory mapped in user space */
|
||||
#define TEE_SHM_POOL BIT(5) /* Memory allocated from pool */
|
||||
#define TEE_SHM_KERNEL_MAPPED BIT(6) /* Memory mapped in kernel space */
|
||||
#define TEE_SHM_PRIV BIT(7) /* Memory private to TEE driver */
|
||||
|
||||
struct device;
|
||||
struct tee_device;
|
||||
|
@ -1272,12 +1272,13 @@ bpf_tracing_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
|
||||
return &bpf_get_numa_node_id_proto;
|
||||
case BPF_FUNC_perf_event_read:
|
||||
return &bpf_perf_event_read_proto;
|
||||
case BPF_FUNC_probe_write_user:
|
||||
return bpf_get_probe_write_proto();
|
||||
case BPF_FUNC_current_task_under_cgroup:
|
||||
return &bpf_current_task_under_cgroup_proto;
|
||||
case BPF_FUNC_get_prandom_u32:
|
||||
return &bpf_get_prandom_u32_proto;
|
||||
case BPF_FUNC_probe_write_user:
|
||||
return security_locked_down(LOCKDOWN_BPF_WRITE_USER) < 0 ?
|
||||
NULL : bpf_get_probe_write_proto();
|
||||
case BPF_FUNC_probe_read_user:
|
||||
return &bpf_probe_read_user_proto;
|
||||
case BPF_FUNC_probe_read_kernel:
|
||||
|
@ -33,6 +33,7 @@ static const char *const lockdown_reasons[LOCKDOWN_CONFIDENTIALITY_MAX+1] = {
|
||||
[LOCKDOWN_MMIOTRACE] = "unsafe mmio",
|
||||
[LOCKDOWN_DEBUGFS] = "debugfs access",
|
||||
[LOCKDOWN_XMON_WR] = "xmon write access",
|
||||
[LOCKDOWN_BPF_WRITE_USER] = "use of bpf to write user RAM",
|
||||
[LOCKDOWN_INTEGRITY_MAX] = "integrity",
|
||||
[LOCKDOWN_KCORE] = "/proc/kcore access",
|
||||
[LOCKDOWN_KPROBES] = "use of kprobes",
|
||||
|
@ -251,7 +251,10 @@ static bool hw_support_mmap(struct snd_pcm_substream *substream)
|
||||
|
||||
switch (substream->dma_buffer.dev.type) {
|
||||
case SNDRV_DMA_TYPE_UNKNOWN:
|
||||
return false;
|
||||
/* we can't know the device, so just assume that the driver does
|
||||
* everything right
|
||||
*/
|
||||
return true;
|
||||
case SNDRV_DMA_TYPE_CONTINUOUS:
|
||||
case SNDRV_DMA_TYPE_VMALLOC:
|
||||
return true;
|
||||
|
@ -8357,6 +8357,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x103c, 0x87f4, "HP", ALC287_FIXUP_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
|
||||
SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8847, "HP EliteBook x360 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
|
||||
@ -8389,6 +8390,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC),
|
||||
SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS),
|
||||
SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK),
|
||||
SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK),
|
||||
SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS),
|
||||
SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC),
|
||||
|
@ -28,10 +28,6 @@
|
||||
#define RESCTRL_PATH "/sys/fs/resctrl"
|
||||
#define PHYS_ID_PATH "/sys/devices/system/cpu/cpu"
|
||||
#define CBM_MASK_PATH "/sys/fs/resctrl/info"
|
||||
#define L3_PATH "/sys/fs/resctrl/info/L3"
|
||||
#define MB_PATH "/sys/fs/resctrl/info/MB"
|
||||
#define L3_MON_PATH "/sys/fs/resctrl/info/L3_MON"
|
||||
#define L3_MON_FEATURES_PATH "/sys/fs/resctrl/info/L3_MON/mon_features"
|
||||
|
||||
#define PARENT_EXIT(err_msg) \
|
||||
do { \
|
||||
@ -83,7 +79,7 @@ int remount_resctrlfs(bool mum_resctrlfs);
|
||||
int get_resource_id(int cpu_no, int *resource_id);
|
||||
int umount_resctrlfs(void);
|
||||
int validate_bw_report_request(char *bw_report);
|
||||
bool validate_resctrl_feature_request(const char *resctrl_val);
|
||||
bool validate_resctrl_feature_request(char *resctrl_val);
|
||||
char *fgrep(FILE *inf, const char *str);
|
||||
int taskset_benchmark(pid_t bm_pid, int cpu_no);
|
||||
void run_benchmark(int signum, siginfo_t *info, void *ucontext);
|
||||
|
@ -616,56 +616,26 @@ char *fgrep(FILE *inf, const char *str)
|
||||
* validate_resctrl_feature_request - Check if requested feature is valid.
|
||||
* @resctrl_val: Requested feature
|
||||
*
|
||||
* Return: True if the feature is supported, else false
|
||||
* Return: 0 on success, non-zero on failure
|
||||
*/
|
||||
bool validate_resctrl_feature_request(const char *resctrl_val)
|
||||
bool validate_resctrl_feature_request(char *resctrl_val)
|
||||
{
|
||||
struct stat statbuf;
|
||||
FILE *inf = fopen("/proc/cpuinfo", "r");
|
||||
bool found = false;
|
||||
char *res;
|
||||
FILE *inf;
|
||||
|
||||
if (!resctrl_val)
|
||||
return false;
|
||||
|
||||
if (remount_resctrlfs(false))
|
||||
return false;
|
||||
|
||||
if (!strncmp(resctrl_val, CAT_STR, sizeof(CAT_STR))) {
|
||||
if (!stat(L3_PATH, &statbuf))
|
||||
return true;
|
||||
} else if (!strncmp(resctrl_val, MBA_STR, sizeof(MBA_STR))) {
|
||||
if (!stat(MB_PATH, &statbuf))
|
||||
return true;
|
||||
} else if (!strncmp(resctrl_val, MBM_STR, sizeof(MBM_STR)) ||
|
||||
!strncmp(resctrl_val, CMT_STR, sizeof(CMT_STR))) {
|
||||
if (!stat(L3_MON_PATH, &statbuf)) {
|
||||
inf = fopen(L3_MON_FEATURES_PATH, "r");
|
||||
if (!inf)
|
||||
return false;
|
||||
|
||||
if (!strncmp(resctrl_val, CMT_STR, sizeof(CMT_STR))) {
|
||||
res = fgrep(inf, "llc_occupancy");
|
||||
if (res) {
|
||||
found = true;
|
||||
free(res);
|
||||
}
|
||||
}
|
||||
res = fgrep(inf, "flags");
|
||||
|
||||
if (!strncmp(resctrl_val, MBM_STR, sizeof(MBM_STR))) {
|
||||
res = fgrep(inf, "mbm_total_bytes");
|
||||
if (res) {
|
||||
char *s = strchr(res, ':');
|
||||
|
||||
found = s && !strstr(s, resctrl_val);
|
||||
free(res);
|
||||
res = fgrep(inf, "mbm_local_bytes");
|
||||
if (res) {
|
||||
found = true;
|
||||
free(res);
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose(inf);
|
||||
}
|
||||
}
|
||||
|
||||
return found;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user