Merge 77a5ed6b03 ("platform/x86/amd/pmf: Update PMF Driver for Compatibility with new PMF-TA") into android16-6.12
Steps on the way to 6.12.23 Change-Id: Ia4e42360874d99819127adfdbb6078e166f7377c Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -375,8 +375,8 @@ config CMDLINE_BOOTLOADER
|
||||
config CMDLINE_EXTEND
|
||||
bool "Use built-in to extend bootloader kernel arguments"
|
||||
help
|
||||
The command-line arguments provided during boot will be
|
||||
appended to the built-in command line. This is useful in
|
||||
The built-in command line will be appended to the command-
|
||||
line arguments provided during boot. This is useful in
|
||||
cases where the provided arguments are insufficient and
|
||||
you don't want to or cannot modify them.
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <asm/asm.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/loongarch.h>
|
||||
#include <asm/unwind_hints.h>
|
||||
#include <linux/stringify.h>
|
||||
|
||||
enum stack_type {
|
||||
@@ -43,6 +44,7 @@ int get_stack_info(unsigned long stack, struct task_struct *task, struct stack_i
|
||||
static __always_inline void prepare_frametrace(struct pt_regs *regs)
|
||||
{
|
||||
__asm__ __volatile__(
|
||||
UNWIND_HINT_SAVE
|
||||
/* Save $ra */
|
||||
STORE_ONE_REG(1)
|
||||
/* Use $ra to save PC */
|
||||
@@ -80,6 +82,7 @@ static __always_inline void prepare_frametrace(struct pt_regs *regs)
|
||||
STORE_ONE_REG(29)
|
||||
STORE_ONE_REG(30)
|
||||
STORE_ONE_REG(31)
|
||||
UNWIND_HINT_RESTORE
|
||||
: "=m" (regs->csr_era)
|
||||
: "r" (regs->regs)
|
||||
: "memory");
|
||||
|
||||
@@ -23,6 +23,14 @@
|
||||
UNWIND_HINT sp_reg=ORC_REG_SP type=UNWIND_HINT_TYPE_CALL
|
||||
.endm
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#else /* !__ASSEMBLY__ */
|
||||
|
||||
#define UNWIND_HINT_SAVE \
|
||||
UNWIND_HINT(UNWIND_HINT_TYPE_SAVE, 0, 0, 0)
|
||||
|
||||
#define UNWIND_HINT_RESTORE \
|
||||
UNWIND_HINT(UNWIND_HINT_TYPE_RESTORE, 0, 0, 0)
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
#endif /* _ASM_LOONGARCH_UNWIND_HINTS_H */
|
||||
|
||||
@@ -68,6 +68,8 @@ static int __init fdt_cpu_clk_init(void)
|
||||
return -ENODEV;
|
||||
|
||||
clk = of_clk_get(np, 0);
|
||||
of_node_put(np);
|
||||
|
||||
if (IS_ERR(clk))
|
||||
return -ENODEV;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <linux/hw_breakpoint.h>
|
||||
#include <linux/kdebug.h>
|
||||
#include <linux/kgdb.h>
|
||||
#include <linux/objtool.h>
|
||||
#include <linux/processor.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/sched.h>
|
||||
@@ -224,13 +225,13 @@ void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc)
|
||||
regs->csr_era = pc;
|
||||
}
|
||||
|
||||
void arch_kgdb_breakpoint(void)
|
||||
noinline void arch_kgdb_breakpoint(void)
|
||||
{
|
||||
__asm__ __volatile__ ( \
|
||||
".globl kgdb_breakinst\n\t" \
|
||||
"nop\n" \
|
||||
"kgdb_breakinst:\tbreak 2\n\t"); /* BRK_KDB = 2 */
|
||||
}
|
||||
STACK_FRAME_NON_STANDARD(arch_kgdb_breakpoint);
|
||||
|
||||
/*
|
||||
* Calls linux_debug_hook before the kernel dies. If KGDB is enabled,
|
||||
|
||||
@@ -268,6 +268,10 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
|
||||
ACPI_CX_DESC_LEN, "ACPI P_LVL3 IOPORT 0x%x",
|
||||
pr->power.states[ACPI_STATE_C3].address);
|
||||
|
||||
if (!pr->power.states[ACPI_STATE_C2].address &&
|
||||
!pr->power.states[ACPI_STATE_C3].address)
|
||||
return -ENODEV;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -284,7 +284,7 @@ static int i2c_hid_get_report(struct i2c_hid *ihid,
|
||||
ihid->rawbuf, recv_len + sizeof(__le16));
|
||||
if (error) {
|
||||
dev_err(&ihid->client->dev,
|
||||
"failed to set a report to device: %d\n", error);
|
||||
"failed to get a report from device: %d\n", error);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ config NET_DSA_REALTEK_RTL8366RB
|
||||
Select to enable support for Realtek RTL8366RB.
|
||||
|
||||
config NET_DSA_REALTEK_RTL8366RB_LEDS
|
||||
bool "Support RTL8366RB LED control"
|
||||
bool
|
||||
depends on (LEDS_CLASS=y || LEDS_CLASS=NET_DSA_REALTEK_RTL8366RB)
|
||||
depends on NET_DSA_REALTEK_RTL8366RB
|
||||
default NET_DSA_REALTEK_RTL8366RB
|
||||
|
||||
@@ -2634,7 +2634,7 @@ static irqreturn_t rvu_mbox_intr_handler(int irq, void *rvu_irq)
|
||||
rvupf_write64(rvu, RVU_PF_VFPF_MBOX_INTX(1), intr);
|
||||
|
||||
rvu_queue_work(&rvu->afvf_wq_info, 64, vfs, intr);
|
||||
vfs -= 64;
|
||||
vfs = 64;
|
||||
}
|
||||
|
||||
intr = rvupf_read64(rvu, RVU_PF_VFPF_MBOX_INTX(0));
|
||||
|
||||
@@ -207,7 +207,7 @@ static void rvu_nix_unregister_interrupts(struct rvu *rvu)
|
||||
rvu->irq_allocated[offs + NIX_AF_INT_VEC_RVU] = false;
|
||||
}
|
||||
|
||||
for (i = NIX_AF_INT_VEC_AF_ERR; i < NIX_AF_INT_VEC_CNT; i++)
|
||||
for (i = NIX_AF_INT_VEC_GEN; i < NIX_AF_INT_VEC_CNT; i++)
|
||||
if (rvu->irq_allocated[offs + i]) {
|
||||
free_irq(pci_irq_vector(rvu->pdev, offs + i), rvu_dl);
|
||||
rvu->irq_allocated[offs + i] = false;
|
||||
|
||||
@@ -423,7 +423,7 @@ u8 mlx5e_shampo_get_log_pkt_per_rsrv(struct mlx5_core_dev *mdev,
|
||||
struct mlx5e_params *params)
|
||||
{
|
||||
u32 resrv_size = BIT(mlx5e_shampo_get_log_rsrv_size(mdev, params)) *
|
||||
PAGE_SIZE;
|
||||
MLX5E_SHAMPO_WQ_BASE_RESRV_SIZE;
|
||||
|
||||
return order_base_2(DIV_ROUND_UP(resrv_size, params->sw_mtu));
|
||||
}
|
||||
@@ -827,7 +827,8 @@ static u32 mlx5e_shampo_get_log_cq_size(struct mlx5_core_dev *mdev,
|
||||
struct mlx5e_params *params,
|
||||
struct mlx5e_xsk_param *xsk)
|
||||
{
|
||||
int rsrv_size = BIT(mlx5e_shampo_get_log_rsrv_size(mdev, params)) * PAGE_SIZE;
|
||||
int rsrv_size = BIT(mlx5e_shampo_get_log_rsrv_size(mdev, params)) *
|
||||
MLX5E_SHAMPO_WQ_BASE_RESRV_SIZE;
|
||||
u16 num_strides = BIT(mlx5e_mpwqe_get_log_num_strides(mdev, params, xsk));
|
||||
int pkt_per_rsrv = BIT(mlx5e_shampo_get_log_pkt_per_rsrv(mdev, params));
|
||||
u8 log_stride_sz = mlx5e_mpwqe_get_log_stride_size(mdev, params, xsk);
|
||||
@@ -1036,7 +1037,8 @@ u32 mlx5e_shampo_hd_per_wqe(struct mlx5_core_dev *mdev,
|
||||
struct mlx5e_params *params,
|
||||
struct mlx5e_rq_param *rq_param)
|
||||
{
|
||||
int resv_size = BIT(mlx5e_shampo_get_log_rsrv_size(mdev, params)) * PAGE_SIZE;
|
||||
int resv_size = BIT(mlx5e_shampo_get_log_rsrv_size(mdev, params)) *
|
||||
MLX5E_SHAMPO_WQ_BASE_RESRV_SIZE;
|
||||
u16 num_strides = BIT(mlx5e_mpwqe_get_log_num_strides(mdev, params, NULL));
|
||||
int pkt_per_resv = BIT(mlx5e_shampo_get_log_pkt_per_rsrv(mdev, params));
|
||||
u8 log_stride_sz = mlx5e_mpwqe_get_log_stride_size(mdev, params, NULL);
|
||||
|
||||
@@ -859,7 +859,7 @@ static int brcm_fet_config_init(struct phy_device *phydev)
|
||||
return reg;
|
||||
|
||||
/* Unmask events we are interested in and mask interrupts globally. */
|
||||
if (phydev->phy_id == PHY_ID_BCM5221)
|
||||
if (phydev->drv->phy_id == PHY_ID_BCM5221)
|
||||
reg = MII_BRCM_FET_IR_ENABLE |
|
||||
MII_BRCM_FET_IR_MASK;
|
||||
else
|
||||
@@ -888,7 +888,7 @@ static int brcm_fet_config_init(struct phy_device *phydev)
|
||||
return err;
|
||||
}
|
||||
|
||||
if (phydev->phy_id != PHY_ID_BCM5221) {
|
||||
if (phydev->drv->phy_id != PHY_ID_BCM5221) {
|
||||
/* Set the LED mode */
|
||||
reg = __phy_read(phydev, MII_BRCM_FET_SHDW_AUXMODE4);
|
||||
if (reg < 0) {
|
||||
@@ -1009,7 +1009,7 @@ static int brcm_fet_suspend(struct phy_device *phydev)
|
||||
return err;
|
||||
}
|
||||
|
||||
if (phydev->phy_id == PHY_ID_BCM5221)
|
||||
if (phydev->drv->phy_id == PHY_ID_BCM5221)
|
||||
/* Force Low Power Mode with clock enabled */
|
||||
reg = BCM5221_SHDW_AM4_EN_CLK_LPM | BCM5221_SHDW_AM4_FORCE_LPM;
|
||||
else
|
||||
|
||||
@@ -630,6 +630,16 @@ static const struct driver_info zte_rndis_info = {
|
||||
.tx_fixup = rndis_tx_fixup,
|
||||
};
|
||||
|
||||
static const struct driver_info wwan_rndis_info = {
|
||||
.description = "Mobile Broadband RNDIS device",
|
||||
.flags = FLAG_WWAN | FLAG_POINTTOPOINT | FLAG_FRAMING_RN | FLAG_NO_SETINT,
|
||||
.bind = rndis_bind,
|
||||
.unbind = rndis_unbind,
|
||||
.status = rndis_status,
|
||||
.rx_fixup = rndis_rx_fixup,
|
||||
.tx_fixup = rndis_tx_fixup,
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
static const struct usb_device_id products [] = {
|
||||
@@ -666,9 +676,11 @@ static const struct usb_device_id products [] = {
|
||||
USB_INTERFACE_INFO(USB_CLASS_WIRELESS_CONTROLLER, 1, 3),
|
||||
.driver_info = (unsigned long) &rndis_info,
|
||||
}, {
|
||||
/* Novatel Verizon USB730L */
|
||||
/* Mobile Broadband Modem, seen in Novatel Verizon USB730L and
|
||||
* Telit FN990A (RNDIS)
|
||||
*/
|
||||
USB_INTERFACE_INFO(USB_CLASS_MISC, 4, 1),
|
||||
.driver_info = (unsigned long) &rndis_info,
|
||||
.driver_info = (unsigned long)&wwan_rndis_info,
|
||||
},
|
||||
{ }, // END
|
||||
};
|
||||
|
||||
@@ -1167,6 +1167,7 @@ static int brcmf_ops_sdio_suspend(struct device *dev)
|
||||
struct brcmf_bus *bus_if;
|
||||
struct brcmf_sdio_dev *sdiodev;
|
||||
mmc_pm_flag_t sdio_flags;
|
||||
bool cap_power_off;
|
||||
int ret = 0;
|
||||
|
||||
func = container_of(dev, struct sdio_func, dev);
|
||||
@@ -1174,19 +1175,23 @@ static int brcmf_ops_sdio_suspend(struct device *dev)
|
||||
if (func->num != 1)
|
||||
return 0;
|
||||
|
||||
cap_power_off = !!(func->card->host->caps & MMC_CAP_POWER_OFF_CARD);
|
||||
|
||||
bus_if = dev_get_drvdata(dev);
|
||||
sdiodev = bus_if->bus_priv.sdio;
|
||||
|
||||
if (sdiodev->wowl_enabled) {
|
||||
if (sdiodev->wowl_enabled || !cap_power_off) {
|
||||
brcmf_sdiod_freezer_on(sdiodev);
|
||||
brcmf_sdio_wd_timer(sdiodev->bus, 0);
|
||||
|
||||
sdio_flags = MMC_PM_KEEP_POWER;
|
||||
if (sdiodev->settings->bus.sdio.oob_irq_supported)
|
||||
enable_irq_wake(sdiodev->settings->bus.sdio.oob_irq_nr);
|
||||
else
|
||||
sdio_flags |= MMC_PM_WAKE_SDIO_IRQ;
|
||||
|
||||
if (sdiodev->wowl_enabled) {
|
||||
if (sdiodev->settings->bus.sdio.oob_irq_supported)
|
||||
enable_irq_wake(sdiodev->settings->bus.sdio.oob_irq_nr);
|
||||
else
|
||||
sdio_flags |= MMC_PM_WAKE_SDIO_IRQ;
|
||||
}
|
||||
|
||||
if (sdio_set_host_pm_flags(sdiodev->func1, sdio_flags))
|
||||
brcmf_err("Failed to set pm_flags %x\n", sdio_flags);
|
||||
@@ -1208,18 +1213,19 @@ static int brcmf_ops_sdio_resume(struct device *dev)
|
||||
struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
|
||||
struct sdio_func *func = container_of(dev, struct sdio_func, dev);
|
||||
int ret = 0;
|
||||
bool cap_power_off = !!(func->card->host->caps & MMC_CAP_POWER_OFF_CARD);
|
||||
|
||||
brcmf_dbg(SDIO, "Enter: F%d\n", func->num);
|
||||
if (func->num != 2)
|
||||
return 0;
|
||||
|
||||
if (!sdiodev->wowl_enabled) {
|
||||
if (!sdiodev->wowl_enabled && cap_power_off) {
|
||||
/* bus was powered off and device removed, probe again */
|
||||
ret = brcmf_sdiod_probe(sdiodev);
|
||||
if (ret)
|
||||
brcmf_err("Failed to probe device on resume\n");
|
||||
} else {
|
||||
if (sdiodev->settings->bus.sdio.oob_irq_supported)
|
||||
if (sdiodev->wowl_enabled && sdiodev->settings->bus.sdio.oob_irq_supported)
|
||||
disable_irq_wake(sdiodev->settings->bus.sdio.oob_irq_nr);
|
||||
|
||||
brcmf_sdiod_freezer_off(sdiodev);
|
||||
|
||||
@@ -558,41 +558,71 @@ static void iwl_dump_prph(struct iwl_fw_runtime *fwrt,
|
||||
}
|
||||
|
||||
/*
|
||||
* alloc_sgtable - allocates scallerlist table in the given size,
|
||||
* fills it with pages and returns it
|
||||
* alloc_sgtable - allocates (chained) scatterlist in the given size,
|
||||
* fills it with pages and returns it
|
||||
* @size: the size (in bytes) of the table
|
||||
*/
|
||||
static struct scatterlist *alloc_sgtable(int size)
|
||||
*/
|
||||
static struct scatterlist *alloc_sgtable(ssize_t size)
|
||||
{
|
||||
int alloc_size, nents, i;
|
||||
struct page *new_page;
|
||||
struct scatterlist *iter;
|
||||
struct scatterlist *table;
|
||||
struct scatterlist *result = NULL, *prev;
|
||||
int nents, i, n_prev;
|
||||
|
||||
nents = DIV_ROUND_UP(size, PAGE_SIZE);
|
||||
table = kcalloc(nents, sizeof(*table), GFP_KERNEL);
|
||||
if (!table)
|
||||
return NULL;
|
||||
sg_init_table(table, nents);
|
||||
iter = table;
|
||||
for_each_sg(table, iter, sg_nents(table), i) {
|
||||
new_page = alloc_page(GFP_KERNEL);
|
||||
if (!new_page) {
|
||||
/* release all previous allocated pages in the table */
|
||||
iter = table;
|
||||
for_each_sg(table, iter, sg_nents(table), i) {
|
||||
new_page = sg_page(iter);
|
||||
if (new_page)
|
||||
__free_page(new_page);
|
||||
}
|
||||
kfree(table);
|
||||
|
||||
#define N_ENTRIES_PER_PAGE (PAGE_SIZE / sizeof(*result))
|
||||
/*
|
||||
* We need an additional entry for table chaining,
|
||||
* this ensures the loop can finish i.e. we can
|
||||
* fit at least two entries per page (obviously,
|
||||
* many more really fit.)
|
||||
*/
|
||||
BUILD_BUG_ON(N_ENTRIES_PER_PAGE < 2);
|
||||
|
||||
while (nents > 0) {
|
||||
struct scatterlist *new, *iter;
|
||||
int n_fill, n_alloc;
|
||||
|
||||
if (nents <= N_ENTRIES_PER_PAGE) {
|
||||
/* last needed table */
|
||||
n_fill = nents;
|
||||
n_alloc = nents;
|
||||
nents = 0;
|
||||
} else {
|
||||
/* fill a page with entries */
|
||||
n_alloc = N_ENTRIES_PER_PAGE;
|
||||
/* reserve one for chaining */
|
||||
n_fill = n_alloc - 1;
|
||||
nents -= n_fill;
|
||||
}
|
||||
|
||||
new = kcalloc(n_alloc, sizeof(*new), GFP_KERNEL);
|
||||
if (!new) {
|
||||
if (result)
|
||||
_devcd_free_sgtable(result);
|
||||
return NULL;
|
||||
}
|
||||
alloc_size = min_t(int, size, PAGE_SIZE);
|
||||
size -= PAGE_SIZE;
|
||||
sg_set_page(iter, new_page, alloc_size, 0);
|
||||
sg_init_table(new, n_alloc);
|
||||
|
||||
if (!result)
|
||||
result = new;
|
||||
else
|
||||
sg_chain(prev, n_prev, new);
|
||||
prev = new;
|
||||
n_prev = n_alloc;
|
||||
|
||||
for_each_sg(new, iter, n_fill, i) {
|
||||
struct page *new_page = alloc_page(GFP_KERNEL);
|
||||
|
||||
if (!new_page) {
|
||||
_devcd_free_sgtable(result);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sg_set_page(iter, new_page, PAGE_SIZE, 0);
|
||||
}
|
||||
}
|
||||
return table;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static void iwl_fw_get_prph_len(struct iwl_fw_runtime *fwrt,
|
||||
|
||||
@@ -995,7 +995,7 @@ iwl_mvm_decode_he_phy_ru_alloc(struct iwl_mvm_rx_phy_data *phy_data,
|
||||
*/
|
||||
u8 ru = le32_get_bits(phy_data->d1, IWL_RX_PHY_DATA1_HE_RU_ALLOC_MASK);
|
||||
u32 rate_n_flags = phy_data->rate_n_flags;
|
||||
u32 he_type = rate_n_flags & RATE_MCS_HE_TYPE_MSK_V1;
|
||||
u32 he_type = rate_n_flags & RATE_MCS_HE_TYPE_MSK;
|
||||
u8 offs = 0;
|
||||
|
||||
rx_status->bw = RATE_INFO_BW_HE_RU;
|
||||
@@ -1050,13 +1050,13 @@ iwl_mvm_decode_he_phy_ru_alloc(struct iwl_mvm_rx_phy_data *phy_data,
|
||||
|
||||
if (he_mu)
|
||||
he_mu->flags2 |=
|
||||
le16_encode_bits(FIELD_GET(RATE_MCS_CHAN_WIDTH_MSK_V1,
|
||||
le16_encode_bits(FIELD_GET(RATE_MCS_CHAN_WIDTH_MSK,
|
||||
rate_n_flags),
|
||||
IEEE80211_RADIOTAP_HE_MU_FLAGS2_BW_FROM_SIG_A_BW);
|
||||
else if (he_type == RATE_MCS_HE_TYPE_TRIG_V1)
|
||||
else if (he_type == RATE_MCS_HE_TYPE_TRIG)
|
||||
he->data6 |=
|
||||
cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_KNOWN) |
|
||||
le16_encode_bits(FIELD_GET(RATE_MCS_CHAN_WIDTH_MSK_V1,
|
||||
le16_encode_bits(FIELD_GET(RATE_MCS_CHAN_WIDTH_MSK,
|
||||
rate_n_flags),
|
||||
IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW);
|
||||
}
|
||||
|
||||
+13
-8
@@ -1984,6 +1984,18 @@ static void nvme_map_cmb(struct nvme_dev *dev)
|
||||
if (offset > bar_size)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Controllers may support a CMB size larger than their BAR, for
|
||||
* example, due to being behind a bridge. Reduce the CMB to the
|
||||
* reported size of the BAR
|
||||
*/
|
||||
size = min(size, bar_size - offset);
|
||||
|
||||
if (!IS_ALIGNED(size, memremap_compat_align()) ||
|
||||
!IS_ALIGNED(pci_resource_start(pdev, bar),
|
||||
memremap_compat_align()))
|
||||
return;
|
||||
|
||||
/*
|
||||
* Tell the controller about the host side address mapping the CMB,
|
||||
* and enable CMB decoding for the NVMe 1.4+ scheme:
|
||||
@@ -1994,17 +2006,10 @@ static void nvme_map_cmb(struct nvme_dev *dev)
|
||||
dev->bar + NVME_REG_CMBMSC);
|
||||
}
|
||||
|
||||
/*
|
||||
* Controllers may support a CMB size larger than their BAR,
|
||||
* for example, due to being behind a bridge. Reduce the CMB to
|
||||
* the reported size of the BAR
|
||||
*/
|
||||
if (size > bar_size - offset)
|
||||
size = bar_size - offset;
|
||||
|
||||
if (pci_p2pdma_add_resource(pdev, bar, size, offset)) {
|
||||
dev_warn(dev->ctrl.device,
|
||||
"failed to register the CMB\n");
|
||||
hi_lo_writeq(0, dev->bar + NVME_REG_CMBMSC);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -2736,6 +2736,7 @@ static int nvme_tcp_poll(struct blk_mq_hw_ctx *hctx, struct io_comp_batch *iob)
|
||||
{
|
||||
struct nvme_tcp_queue *queue = hctx->driver_data;
|
||||
struct sock *sk = queue->sock->sk;
|
||||
int ret;
|
||||
|
||||
if (!test_bit(NVME_TCP_Q_LIVE, &queue->flags))
|
||||
return 0;
|
||||
@@ -2743,9 +2744,9 @@ static int nvme_tcp_poll(struct blk_mq_hw_ctx *hctx, struct io_comp_batch *iob)
|
||||
set_bit(NVME_TCP_Q_POLLING, &queue->flags);
|
||||
if (sk_can_busy_loop(sk) && skb_queue_empty_lockless(&sk->sk_receive_queue))
|
||||
sk_busy_loop(sk, true);
|
||||
nvme_tcp_try_recv(queue);
|
||||
ret = nvme_tcp_try_recv(queue);
|
||||
clear_bit(NVME_TCP_Q_POLLING, &queue->flags);
|
||||
return queue->nr_cqe;
|
||||
return ret < 0 ? ret : queue->nr_cqe;
|
||||
}
|
||||
|
||||
static int nvme_tcp_get_address(struct nvme_ctrl *ctrl, char *buf, int size)
|
||||
|
||||
@@ -105,9 +105,12 @@ struct cookie_header {
|
||||
#define PMF_TA_IF_VERSION_MAJOR 1
|
||||
#define TA_PMF_ACTION_MAX 32
|
||||
#define TA_PMF_UNDO_MAX 8
|
||||
#define TA_OUTPUT_RESERVED_MEM 906
|
||||
#define TA_OUTPUT_RESERVED_MEM 922
|
||||
#define MAX_OPERATION_PARAMS 4
|
||||
|
||||
#define TA_ERROR_CRYPTO_INVALID_PARAM 0x20002
|
||||
#define TA_ERROR_CRYPTO_BIN_TOO_LARGE 0x2000d
|
||||
|
||||
#define PMF_IF_V1 1
|
||||
#define PMF_IF_V2 2
|
||||
|
||||
|
||||
@@ -27,8 +27,11 @@ module_param(pb_side_load, bool, 0444);
|
||||
MODULE_PARM_DESC(pb_side_load, "Sideload policy binaries debug policy failures");
|
||||
#endif
|
||||
|
||||
static const uuid_t amd_pmf_ta_uuid = UUID_INIT(0x6fd93b77, 0x3fb8, 0x524d,
|
||||
0xb1, 0x2d, 0xc5, 0x29, 0xb1, 0x3d, 0x85, 0x43);
|
||||
static const uuid_t amd_pmf_ta_uuid[] = { UUID_INIT(0xd9b39bf2, 0x66bd, 0x4154, 0xaf, 0xb8, 0x8a,
|
||||
0xcc, 0x2b, 0x2b, 0x60, 0xd6),
|
||||
UUID_INIT(0x6fd93b77, 0x3fb8, 0x524d, 0xb1, 0x2d, 0xc5,
|
||||
0x29, 0xb1, 0x3d, 0x85, 0x43),
|
||||
};
|
||||
|
||||
static const char *amd_pmf_uevent_as_str(unsigned int state)
|
||||
{
|
||||
@@ -321,9 +324,9 @@ static int amd_pmf_start_policy_engine(struct amd_pmf_dev *dev)
|
||||
*/
|
||||
schedule_delayed_work(&dev->pb_work, msecs_to_jiffies(pb_actions_ms * 3));
|
||||
} else {
|
||||
dev_err(dev->dev, "ta invoke cmd init failed err: %x\n", res);
|
||||
dev_dbg(dev->dev, "ta invoke cmd init failed err: %x\n", res);
|
||||
dev->smart_pc_enabled = false;
|
||||
return -EIO;
|
||||
return res;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -390,12 +393,12 @@ static int amd_pmf_amdtee_ta_match(struct tee_ioctl_version_data *ver, const voi
|
||||
return ver->impl_id == TEE_IMPL_ID_AMDTEE;
|
||||
}
|
||||
|
||||
static int amd_pmf_ta_open_session(struct tee_context *ctx, u32 *id)
|
||||
static int amd_pmf_ta_open_session(struct tee_context *ctx, u32 *id, const uuid_t *uuid)
|
||||
{
|
||||
struct tee_ioctl_open_session_arg sess_arg = {};
|
||||
int rc;
|
||||
|
||||
export_uuid(sess_arg.uuid, &amd_pmf_ta_uuid);
|
||||
export_uuid(sess_arg.uuid, uuid);
|
||||
sess_arg.clnt_login = TEE_IOCTL_LOGIN_PUBLIC;
|
||||
sess_arg.num_params = 0;
|
||||
|
||||
@@ -434,7 +437,7 @@ static int amd_pmf_register_input_device(struct amd_pmf_dev *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int amd_pmf_tee_init(struct amd_pmf_dev *dev)
|
||||
static int amd_pmf_tee_init(struct amd_pmf_dev *dev, const uuid_t *uuid)
|
||||
{
|
||||
u32 size;
|
||||
int ret;
|
||||
@@ -445,7 +448,7 @@ static int amd_pmf_tee_init(struct amd_pmf_dev *dev)
|
||||
return PTR_ERR(dev->tee_ctx);
|
||||
}
|
||||
|
||||
ret = amd_pmf_ta_open_session(dev->tee_ctx, &dev->session_id);
|
||||
ret = amd_pmf_ta_open_session(dev->tee_ctx, &dev->session_id, uuid);
|
||||
if (ret) {
|
||||
dev_err(dev->dev, "Failed to open TA session (%d)\n", ret);
|
||||
ret = -EINVAL;
|
||||
@@ -489,7 +492,8 @@ static void amd_pmf_tee_deinit(struct amd_pmf_dev *dev)
|
||||
|
||||
int amd_pmf_init_smart_pc(struct amd_pmf_dev *dev)
|
||||
{
|
||||
int ret;
|
||||
bool status;
|
||||
int ret, i;
|
||||
|
||||
ret = apmf_check_smart_pc(dev);
|
||||
if (ret) {
|
||||
@@ -502,10 +506,6 @@ int amd_pmf_init_smart_pc(struct amd_pmf_dev *dev)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
ret = amd_pmf_tee_init(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
INIT_DELAYED_WORK(&dev->pb_work, amd_pmf_invoke_cmd);
|
||||
|
||||
ret = amd_pmf_set_dram_addr(dev, true);
|
||||
@@ -534,8 +534,30 @@ int amd_pmf_init_smart_pc(struct amd_pmf_dev *dev)
|
||||
goto error;
|
||||
}
|
||||
|
||||
ret = amd_pmf_start_policy_engine(dev);
|
||||
if (ret)
|
||||
for (i = 0; i < ARRAY_SIZE(amd_pmf_ta_uuid); i++) {
|
||||
ret = amd_pmf_tee_init(dev, &amd_pmf_ta_uuid[i]);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = amd_pmf_start_policy_engine(dev);
|
||||
switch (ret) {
|
||||
case TA_PMF_TYPE_SUCCESS:
|
||||
status = true;
|
||||
break;
|
||||
case TA_ERROR_CRYPTO_INVALID_PARAM:
|
||||
case TA_ERROR_CRYPTO_BIN_TOO_LARGE:
|
||||
amd_pmf_tee_deinit(dev);
|
||||
status = false;
|
||||
break;
|
||||
default:
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (status)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!status && !pb_side_load)
|
||||
goto error;
|
||||
|
||||
if (pb_side_load)
|
||||
|
||||
@@ -132,6 +132,13 @@ static const struct dmi_system_id button_array_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go 3"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.ident = "Microsoft Surface Go 4",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go 4"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
@@ -410,6 +410,11 @@ static const struct intel_vsec_platform_info oobmsm_info = {
|
||||
.caps = VSEC_CAP_TELEMETRY | VSEC_CAP_SDSI | VSEC_CAP_TPMI,
|
||||
};
|
||||
|
||||
/* DMR OOBMSM info */
|
||||
static const struct intel_vsec_platform_info dmr_oobmsm_info = {
|
||||
.caps = VSEC_CAP_TELEMETRY | VSEC_CAP_TPMI,
|
||||
};
|
||||
|
||||
/* TGL info */
|
||||
static const struct intel_vsec_platform_info tgl_info = {
|
||||
.caps = VSEC_CAP_TELEMETRY,
|
||||
@@ -426,6 +431,7 @@ static const struct intel_vsec_platform_info lnl_info = {
|
||||
#define PCI_DEVICE_ID_INTEL_VSEC_MTL_M 0x7d0d
|
||||
#define PCI_DEVICE_ID_INTEL_VSEC_MTL_S 0xad0d
|
||||
#define PCI_DEVICE_ID_INTEL_VSEC_OOBMSM 0x09a7
|
||||
#define PCI_DEVICE_ID_INTEL_VSEC_OOBMSM_DMR 0x09a1
|
||||
#define PCI_DEVICE_ID_INTEL_VSEC_RPL 0xa77d
|
||||
#define PCI_DEVICE_ID_INTEL_VSEC_TGL 0x9a0d
|
||||
#define PCI_DEVICE_ID_INTEL_VSEC_LNL_M 0x647d
|
||||
@@ -435,6 +441,7 @@ static const struct pci_device_id intel_vsec_pci_ids[] = {
|
||||
{ PCI_DEVICE_DATA(INTEL, VSEC_MTL_M, &mtl_info) },
|
||||
{ PCI_DEVICE_DATA(INTEL, VSEC_MTL_S, &mtl_info) },
|
||||
{ PCI_DEVICE_DATA(INTEL, VSEC_OOBMSM, &oobmsm_info) },
|
||||
{ PCI_DEVICE_DATA(INTEL, VSEC_OOBMSM_DMR, &dmr_oobmsm_info) },
|
||||
{ PCI_DEVICE_DATA(INTEL, VSEC_RPL, &tgl_info) },
|
||||
{ PCI_DEVICE_DATA(INTEL, VSEC_TGL, &tgl_info) },
|
||||
{ PCI_DEVICE_DATA(INTEL, VSEC_LNL_M, &lnl_info) },
|
||||
|
||||
+5
-4
@@ -596,7 +596,7 @@ affs_extent_file_ofs(struct inode *inode, u32 newsize)
|
||||
BUG_ON(tmp > bsize);
|
||||
AFFS_DATA_HEAD(bh)->ptype = cpu_to_be32(T_DATA);
|
||||
AFFS_DATA_HEAD(bh)->key = cpu_to_be32(inode->i_ino);
|
||||
AFFS_DATA_HEAD(bh)->sequence = cpu_to_be32(bidx);
|
||||
AFFS_DATA_HEAD(bh)->sequence = cpu_to_be32(bidx + 1);
|
||||
AFFS_DATA_HEAD(bh)->size = cpu_to_be32(tmp);
|
||||
affs_fix_checksum(sb, bh);
|
||||
bh->b_state &= ~(1UL << BH_New);
|
||||
@@ -724,7 +724,8 @@ static int affs_write_end_ofs(struct file *file, struct address_space *mapping,
|
||||
tmp = min(bsize - boff, to - from);
|
||||
BUG_ON(boff + tmp > bsize || tmp > bsize);
|
||||
memcpy(AFFS_DATA(bh) + boff, data + from, tmp);
|
||||
be32_add_cpu(&AFFS_DATA_HEAD(bh)->size, tmp);
|
||||
AFFS_DATA_HEAD(bh)->size = cpu_to_be32(
|
||||
max(boff + tmp, be32_to_cpu(AFFS_DATA_HEAD(bh)->size)));
|
||||
affs_fix_checksum(sb, bh);
|
||||
mark_buffer_dirty_inode(bh, inode);
|
||||
written += tmp;
|
||||
@@ -746,7 +747,7 @@ static int affs_write_end_ofs(struct file *file, struct address_space *mapping,
|
||||
if (buffer_new(bh)) {
|
||||
AFFS_DATA_HEAD(bh)->ptype = cpu_to_be32(T_DATA);
|
||||
AFFS_DATA_HEAD(bh)->key = cpu_to_be32(inode->i_ino);
|
||||
AFFS_DATA_HEAD(bh)->sequence = cpu_to_be32(bidx);
|
||||
AFFS_DATA_HEAD(bh)->sequence = cpu_to_be32(bidx + 1);
|
||||
AFFS_DATA_HEAD(bh)->size = cpu_to_be32(bsize);
|
||||
AFFS_DATA_HEAD(bh)->next = 0;
|
||||
bh->b_state &= ~(1UL << BH_New);
|
||||
@@ -780,7 +781,7 @@ static int affs_write_end_ofs(struct file *file, struct address_space *mapping,
|
||||
if (buffer_new(bh)) {
|
||||
AFFS_DATA_HEAD(bh)->ptype = cpu_to_be32(T_DATA);
|
||||
AFFS_DATA_HEAD(bh)->key = cpu_to_be32(inode->i_ino);
|
||||
AFFS_DATA_HEAD(bh)->sequence = cpu_to_be32(bidx);
|
||||
AFFS_DATA_HEAD(bh)->sequence = cpu_to_be32(bidx + 1);
|
||||
AFFS_DATA_HEAD(bh)->size = cpu_to_be32(tmp);
|
||||
AFFS_DATA_HEAD(bh)->next = 0;
|
||||
bh->b_state &= ~(1UL << BH_New);
|
||||
|
||||
+1
-1
@@ -265,7 +265,7 @@ int exfat_find_last_cluster(struct super_block *sb, struct exfat_chain *p_chain,
|
||||
clu = next;
|
||||
if (exfat_ent_get(sb, clu, &next))
|
||||
return -EIO;
|
||||
} while (next != EXFAT_EOF_CLUSTER);
|
||||
} while (next != EXFAT_EOF_CLUSTER && count <= p_chain->size);
|
||||
|
||||
if (p_chain->size != count) {
|
||||
exfat_fs_error(sb,
|
||||
|
||||
+27
-2
@@ -582,6 +582,9 @@ static ssize_t exfat_file_write_iter(struct kiocb *iocb, struct iov_iter *iter)
|
||||
loff_t pos = iocb->ki_pos;
|
||||
loff_t valid_size;
|
||||
|
||||
if (unlikely(exfat_forced_shutdown(inode->i_sb)))
|
||||
return -EIO;
|
||||
|
||||
inode_lock(inode);
|
||||
|
||||
valid_size = ei->valid_size;
|
||||
@@ -635,6 +638,16 @@ unlock:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static ssize_t exfat_file_read_iter(struct kiocb *iocb, struct iov_iter *iter)
|
||||
{
|
||||
struct inode *inode = file_inode(iocb->ki_filp);
|
||||
|
||||
if (unlikely(exfat_forced_shutdown(inode->i_sb)))
|
||||
return -EIO;
|
||||
|
||||
return generic_file_read_iter(iocb, iter);
|
||||
}
|
||||
|
||||
static vm_fault_t exfat_page_mkwrite(struct vm_fault *vmf)
|
||||
{
|
||||
int err;
|
||||
@@ -672,14 +685,26 @@ static const struct vm_operations_struct exfat_file_vm_ops = {
|
||||
|
||||
static int exfat_file_mmap(struct file *file, struct vm_area_struct *vma)
|
||||
{
|
||||
if (unlikely(exfat_forced_shutdown(file_inode(file)->i_sb)))
|
||||
return -EIO;
|
||||
|
||||
file_accessed(file);
|
||||
vma->vm_ops = &exfat_file_vm_ops;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ssize_t exfat_splice_read(struct file *in, loff_t *ppos,
|
||||
struct pipe_inode_info *pipe, size_t len, unsigned int flags)
|
||||
{
|
||||
if (unlikely(exfat_forced_shutdown(file_inode(in)->i_sb)))
|
||||
return -EIO;
|
||||
|
||||
return filemap_splice_read(in, ppos, pipe, len, flags);
|
||||
}
|
||||
|
||||
const struct file_operations exfat_file_operations = {
|
||||
.llseek = generic_file_llseek,
|
||||
.read_iter = generic_file_read_iter,
|
||||
.read_iter = exfat_file_read_iter,
|
||||
.write_iter = exfat_file_write_iter,
|
||||
.unlocked_ioctl = exfat_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
@@ -687,7 +712,7 @@ const struct file_operations exfat_file_operations = {
|
||||
#endif
|
||||
.mmap = exfat_file_mmap,
|
||||
.fsync = exfat_file_fsync,
|
||||
.splice_read = filemap_splice_read,
|
||||
.splice_read = exfat_splice_read,
|
||||
.splice_write = iter_file_splice_write,
|
||||
};
|
||||
|
||||
|
||||
+3
-1
@@ -579,8 +579,10 @@ retry:
|
||||
|
||||
while (!nfs_lock_request(head)) {
|
||||
ret = nfs_wait_on_request(head);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
nfs_release_request(head);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
}
|
||||
|
||||
/* Ensure that nobody removed the request before we locked it */
|
||||
|
||||
+19
-15
@@ -763,7 +763,7 @@ static void parse_dacl(struct smb_acl *pdacl, char *end_of_acl,
|
||||
struct cifs_fattr *fattr, bool mode_from_special_sid)
|
||||
{
|
||||
int i;
|
||||
int num_aces = 0;
|
||||
u16 num_aces = 0;
|
||||
int acl_size;
|
||||
char *acl_base;
|
||||
struct smb_ace **ppace;
|
||||
@@ -778,14 +778,15 @@ static void parse_dacl(struct smb_acl *pdacl, char *end_of_acl,
|
||||
}
|
||||
|
||||
/* validate that we do not go past end of acl */
|
||||
if (end_of_acl < (char *)pdacl + le16_to_cpu(pdacl->size)) {
|
||||
if (end_of_acl < (char *)pdacl + sizeof(struct smb_acl) ||
|
||||
end_of_acl < (char *)pdacl + le16_to_cpu(pdacl->size)) {
|
||||
cifs_dbg(VFS, "ACL too small to parse DACL\n");
|
||||
return;
|
||||
}
|
||||
|
||||
cifs_dbg(NOISY, "DACL revision %d size %d num aces %d\n",
|
||||
le16_to_cpu(pdacl->revision), le16_to_cpu(pdacl->size),
|
||||
le32_to_cpu(pdacl->num_aces));
|
||||
le16_to_cpu(pdacl->num_aces));
|
||||
|
||||
/* reset rwx permissions for user/group/other.
|
||||
Also, if num_aces is 0 i.e. DACL has no ACEs,
|
||||
@@ -795,12 +796,15 @@ static void parse_dacl(struct smb_acl *pdacl, char *end_of_acl,
|
||||
acl_base = (char *)pdacl;
|
||||
acl_size = sizeof(struct smb_acl);
|
||||
|
||||
num_aces = le32_to_cpu(pdacl->num_aces);
|
||||
num_aces = le16_to_cpu(pdacl->num_aces);
|
||||
if (num_aces > 0) {
|
||||
umode_t denied_mode = 0;
|
||||
|
||||
if (num_aces > ULONG_MAX / sizeof(struct smb_ace *))
|
||||
if (num_aces > (le16_to_cpu(pdacl->size) - sizeof(struct smb_acl)) /
|
||||
(offsetof(struct smb_ace, sid) +
|
||||
offsetof(struct smb_sid, sub_auth) + sizeof(__le16)))
|
||||
return;
|
||||
|
||||
ppace = kmalloc_array(num_aces, sizeof(struct smb_ace *),
|
||||
GFP_KERNEL);
|
||||
if (!ppace)
|
||||
@@ -937,12 +941,12 @@ unsigned int setup_special_user_owner_ACE(struct smb_ace *pntace)
|
||||
static void populate_new_aces(char *nacl_base,
|
||||
struct smb_sid *pownersid,
|
||||
struct smb_sid *pgrpsid,
|
||||
__u64 *pnmode, u32 *pnum_aces, u16 *pnsize,
|
||||
__u64 *pnmode, u16 *pnum_aces, u16 *pnsize,
|
||||
bool modefromsid,
|
||||
bool posix)
|
||||
{
|
||||
__u64 nmode;
|
||||
u32 num_aces = 0;
|
||||
u16 num_aces = 0;
|
||||
u16 nsize = 0;
|
||||
__u64 user_mode;
|
||||
__u64 group_mode;
|
||||
@@ -1050,7 +1054,7 @@ static __u16 replace_sids_and_copy_aces(struct smb_acl *pdacl, struct smb_acl *p
|
||||
u16 size = 0;
|
||||
struct smb_ace *pntace = NULL;
|
||||
char *acl_base = NULL;
|
||||
u32 src_num_aces = 0;
|
||||
u16 src_num_aces = 0;
|
||||
u16 nsize = 0;
|
||||
struct smb_ace *pnntace = NULL;
|
||||
char *nacl_base = NULL;
|
||||
@@ -1058,7 +1062,7 @@ static __u16 replace_sids_and_copy_aces(struct smb_acl *pdacl, struct smb_acl *p
|
||||
|
||||
acl_base = (char *)pdacl;
|
||||
size = sizeof(struct smb_acl);
|
||||
src_num_aces = le32_to_cpu(pdacl->num_aces);
|
||||
src_num_aces = le16_to_cpu(pdacl->num_aces);
|
||||
|
||||
nacl_base = (char *)pndacl;
|
||||
nsize = sizeof(struct smb_acl);
|
||||
@@ -1090,11 +1094,11 @@ static int set_chmod_dacl(struct smb_acl *pdacl, struct smb_acl *pndacl,
|
||||
u16 size = 0;
|
||||
struct smb_ace *pntace = NULL;
|
||||
char *acl_base = NULL;
|
||||
u32 src_num_aces = 0;
|
||||
u16 src_num_aces = 0;
|
||||
u16 nsize = 0;
|
||||
struct smb_ace *pnntace = NULL;
|
||||
char *nacl_base = NULL;
|
||||
u32 num_aces = 0;
|
||||
u16 num_aces = 0;
|
||||
bool new_aces_set = false;
|
||||
|
||||
/* Assuming that pndacl and pnmode are never NULL */
|
||||
@@ -1112,7 +1116,7 @@ static int set_chmod_dacl(struct smb_acl *pdacl, struct smb_acl *pndacl,
|
||||
|
||||
acl_base = (char *)pdacl;
|
||||
size = sizeof(struct smb_acl);
|
||||
src_num_aces = le32_to_cpu(pdacl->num_aces);
|
||||
src_num_aces = le16_to_cpu(pdacl->num_aces);
|
||||
|
||||
/* Retain old ACEs which we can retain */
|
||||
for (i = 0; i < src_num_aces; ++i) {
|
||||
@@ -1158,7 +1162,7 @@ next_ace:
|
||||
}
|
||||
|
||||
finalize_dacl:
|
||||
pndacl->num_aces = cpu_to_le32(num_aces);
|
||||
pndacl->num_aces = cpu_to_le16(num_aces);
|
||||
pndacl->size = cpu_to_le16(nsize);
|
||||
|
||||
return 0;
|
||||
@@ -1293,7 +1297,7 @@ static int build_sec_desc(struct smb_ntsd *pntsd, struct smb_ntsd *pnntsd,
|
||||
dacloffset ? dacl_ptr->revision : cpu_to_le16(ACL_REVISION);
|
||||
|
||||
ndacl_ptr->size = cpu_to_le16(0);
|
||||
ndacl_ptr->num_aces = cpu_to_le32(0);
|
||||
ndacl_ptr->num_aces = cpu_to_le16(0);
|
||||
|
||||
rc = set_chmod_dacl(dacl_ptr, ndacl_ptr, owner_sid_ptr, group_sid_ptr,
|
||||
pnmode, mode_from_sid, posix);
|
||||
@@ -1651,7 +1655,7 @@ id_mode_to_cifs_acl(struct inode *inode, const char *path, __u64 *pnmode,
|
||||
dacl_ptr = (struct smb_acl *)((char *)pntsd + dacloffset);
|
||||
if (mode_from_sid)
|
||||
nsecdesclen +=
|
||||
le32_to_cpu(dacl_ptr->num_aces) * sizeof(struct smb_ace);
|
||||
le16_to_cpu(dacl_ptr->num_aces) * sizeof(struct smb_ace);
|
||||
else /* cifsacl */
|
||||
nsecdesclen += le16_to_cpu(dacl_ptr->size);
|
||||
}
|
||||
|
||||
@@ -107,7 +107,8 @@ struct smb_sid {
|
||||
struct smb_acl {
|
||||
__le16 revision; /* revision level */
|
||||
__le16 size;
|
||||
__le32 num_aces;
|
||||
__le16 num_aces;
|
||||
__le16 reserved;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct smb_ace {
|
||||
|
||||
@@ -1217,7 +1217,7 @@ free_iv:
|
||||
free_sg:
|
||||
kfree(sg);
|
||||
free_req:
|
||||
kfree(req);
|
||||
aead_request_free(req);
|
||||
free_ctx:
|
||||
ksmbd_release_crypto_ctx(ctx);
|
||||
return rc;
|
||||
|
||||
@@ -256,6 +256,22 @@ void ksmbd_sessions_deregister(struct ksmbd_conn *conn)
|
||||
up_write(&sessions_table_lock);
|
||||
}
|
||||
|
||||
bool is_ksmbd_session_in_connection(struct ksmbd_conn *conn,
|
||||
unsigned long long id)
|
||||
{
|
||||
struct ksmbd_session *sess;
|
||||
|
||||
down_read(&conn->session_lock);
|
||||
sess = xa_load(&conn->sessions, id);
|
||||
if (sess) {
|
||||
up_read(&conn->session_lock);
|
||||
return true;
|
||||
}
|
||||
up_read(&conn->session_lock);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
struct ksmbd_session *ksmbd_session_lookup(struct ksmbd_conn *conn,
|
||||
unsigned long long id)
|
||||
{
|
||||
|
||||
@@ -87,6 +87,8 @@ void ksmbd_session_destroy(struct ksmbd_session *sess);
|
||||
struct ksmbd_session *ksmbd_session_lookup_slowpath(unsigned long long id);
|
||||
struct ksmbd_session *ksmbd_session_lookup(struct ksmbd_conn *conn,
|
||||
unsigned long long id);
|
||||
bool is_ksmbd_session_in_connection(struct ksmbd_conn *conn,
|
||||
unsigned long long id);
|
||||
int ksmbd_session_register(struct ksmbd_conn *conn,
|
||||
struct ksmbd_session *sess);
|
||||
void ksmbd_sessions_deregister(struct ksmbd_conn *conn);
|
||||
|
||||
@@ -724,8 +724,8 @@ static int smb2_oplock_break_noti(struct oplock_info *opinfo)
|
||||
work->conn = conn;
|
||||
work->sess = opinfo->sess;
|
||||
|
||||
ksmbd_conn_r_count_inc(conn);
|
||||
if (opinfo->op_state == OPLOCK_ACK_WAIT) {
|
||||
ksmbd_conn_r_count_inc(conn);
|
||||
INIT_WORK(&work->work, __smb2_oplock_break_noti);
|
||||
ksmbd_queue_work(work);
|
||||
|
||||
@@ -833,8 +833,8 @@ static int smb2_lease_break_noti(struct oplock_info *opinfo)
|
||||
work->conn = conn;
|
||||
work->sess = opinfo->sess;
|
||||
|
||||
ksmbd_conn_r_count_inc(conn);
|
||||
if (opinfo->op_state == OPLOCK_ACK_WAIT) {
|
||||
ksmbd_conn_r_count_inc(conn);
|
||||
INIT_WORK(&work->work, __smb2_lease_break_noti);
|
||||
ksmbd_queue_work(work);
|
||||
wait_for_break_ack(opinfo);
|
||||
|
||||
@@ -1704,44 +1704,38 @@ int smb2_sess_setup(struct ksmbd_work *work)
|
||||
|
||||
if (conn->dialect != sess->dialect) {
|
||||
rc = -EINVAL;
|
||||
ksmbd_user_session_put(sess);
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
if (!(req->hdr.Flags & SMB2_FLAGS_SIGNED)) {
|
||||
rc = -EINVAL;
|
||||
ksmbd_user_session_put(sess);
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
if (strncmp(conn->ClientGUID, sess->ClientGUID,
|
||||
SMB2_CLIENT_GUID_SIZE)) {
|
||||
rc = -ENOENT;
|
||||
ksmbd_user_session_put(sess);
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
if (sess->state == SMB2_SESSION_IN_PROGRESS) {
|
||||
rc = -EACCES;
|
||||
ksmbd_user_session_put(sess);
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
if (sess->state == SMB2_SESSION_EXPIRED) {
|
||||
rc = -EFAULT;
|
||||
ksmbd_user_session_put(sess);
|
||||
goto out_err;
|
||||
}
|
||||
ksmbd_user_session_put(sess);
|
||||
|
||||
if (ksmbd_conn_need_reconnect(conn)) {
|
||||
rc = -EFAULT;
|
||||
ksmbd_user_session_put(sess);
|
||||
sess = NULL;
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
sess = ksmbd_session_lookup(conn, sess_id);
|
||||
if (!sess) {
|
||||
if (is_ksmbd_session_in_connection(conn, sess_id)) {
|
||||
rc = -EACCES;
|
||||
goto out_err;
|
||||
}
|
||||
@@ -1907,6 +1901,8 @@ out_err:
|
||||
|
||||
sess->last_active = jiffies;
|
||||
sess->state = SMB2_SESSION_EXPIRED;
|
||||
ksmbd_user_session_put(sess);
|
||||
work->sess = NULL;
|
||||
if (try_delay) {
|
||||
ksmbd_conn_set_need_reconnect(conn);
|
||||
ssleep(5);
|
||||
|
||||
+16
-15
@@ -333,7 +333,7 @@ void posix_state_to_acl(struct posix_acl_state *state,
|
||||
pace->e_perm = state->other.allow;
|
||||
}
|
||||
|
||||
int init_acl_state(struct posix_acl_state *state, int cnt)
|
||||
int init_acl_state(struct posix_acl_state *state, u16 cnt)
|
||||
{
|
||||
int alloc;
|
||||
|
||||
@@ -368,7 +368,7 @@ static void parse_dacl(struct mnt_idmap *idmap,
|
||||
struct smb_fattr *fattr)
|
||||
{
|
||||
int i, ret;
|
||||
int num_aces = 0;
|
||||
u16 num_aces = 0;
|
||||
unsigned int acl_size;
|
||||
char *acl_base;
|
||||
struct smb_ace **ppace;
|
||||
@@ -389,12 +389,12 @@ static void parse_dacl(struct mnt_idmap *idmap,
|
||||
|
||||
ksmbd_debug(SMB, "DACL revision %d size %d num aces %d\n",
|
||||
le16_to_cpu(pdacl->revision), le16_to_cpu(pdacl->size),
|
||||
le32_to_cpu(pdacl->num_aces));
|
||||
le16_to_cpu(pdacl->num_aces));
|
||||
|
||||
acl_base = (char *)pdacl;
|
||||
acl_size = sizeof(struct smb_acl);
|
||||
|
||||
num_aces = le32_to_cpu(pdacl->num_aces);
|
||||
num_aces = le16_to_cpu(pdacl->num_aces);
|
||||
if (num_aces <= 0)
|
||||
return;
|
||||
|
||||
@@ -583,7 +583,7 @@ static void parse_dacl(struct mnt_idmap *idmap,
|
||||
|
||||
static void set_posix_acl_entries_dacl(struct mnt_idmap *idmap,
|
||||
struct smb_ace *pndace,
|
||||
struct smb_fattr *fattr, u32 *num_aces,
|
||||
struct smb_fattr *fattr, u16 *num_aces,
|
||||
u16 *size, u32 nt_aces_num)
|
||||
{
|
||||
struct posix_acl_entry *pace;
|
||||
@@ -704,7 +704,7 @@ static void set_ntacl_dacl(struct mnt_idmap *idmap,
|
||||
struct smb_fattr *fattr)
|
||||
{
|
||||
struct smb_ace *ntace, *pndace;
|
||||
int nt_num_aces = le32_to_cpu(nt_dacl->num_aces), num_aces = 0;
|
||||
u16 nt_num_aces = le16_to_cpu(nt_dacl->num_aces), num_aces = 0;
|
||||
unsigned short size = 0;
|
||||
int i;
|
||||
|
||||
@@ -731,7 +731,7 @@ static void set_ntacl_dacl(struct mnt_idmap *idmap,
|
||||
|
||||
set_posix_acl_entries_dacl(idmap, pndace, fattr,
|
||||
&num_aces, &size, nt_num_aces);
|
||||
pndacl->num_aces = cpu_to_le32(num_aces);
|
||||
pndacl->num_aces = cpu_to_le16(num_aces);
|
||||
pndacl->size = cpu_to_le16(le16_to_cpu(pndacl->size) + size);
|
||||
}
|
||||
|
||||
@@ -739,7 +739,7 @@ static void set_mode_dacl(struct mnt_idmap *idmap,
|
||||
struct smb_acl *pndacl, struct smb_fattr *fattr)
|
||||
{
|
||||
struct smb_ace *pace, *pndace;
|
||||
u32 num_aces = 0;
|
||||
u16 num_aces = 0;
|
||||
u16 size = 0, ace_size = 0;
|
||||
uid_t uid;
|
||||
const struct smb_sid *sid;
|
||||
@@ -795,7 +795,7 @@ static void set_mode_dacl(struct mnt_idmap *idmap,
|
||||
fattr->cf_mode, 0007);
|
||||
|
||||
out:
|
||||
pndacl->num_aces = cpu_to_le32(num_aces);
|
||||
pndacl->num_aces = cpu_to_le16(num_aces);
|
||||
pndacl->size = cpu_to_le16(le16_to_cpu(pndacl->size) + size);
|
||||
}
|
||||
|
||||
@@ -1025,8 +1025,9 @@ int smb_inherit_dacl(struct ksmbd_conn *conn,
|
||||
struct smb_sid owner_sid, group_sid;
|
||||
struct dentry *parent = path->dentry->d_parent;
|
||||
struct mnt_idmap *idmap = mnt_idmap(path->mnt);
|
||||
int inherited_flags = 0, flags = 0, i, ace_cnt = 0, nt_size = 0, pdacl_size;
|
||||
int rc = 0, num_aces, dacloffset, pntsd_type, pntsd_size, acl_len, aces_size;
|
||||
int inherited_flags = 0, flags = 0, i, nt_size = 0, pdacl_size;
|
||||
int rc = 0, dacloffset, pntsd_type, pntsd_size, acl_len, aces_size;
|
||||
u16 num_aces, ace_cnt = 0;
|
||||
char *aces_base;
|
||||
bool is_dir = S_ISDIR(d_inode(path->dentry)->i_mode);
|
||||
|
||||
@@ -1042,7 +1043,7 @@ int smb_inherit_dacl(struct ksmbd_conn *conn,
|
||||
|
||||
parent_pdacl = (struct smb_acl *)((char *)parent_pntsd + dacloffset);
|
||||
acl_len = pntsd_size - dacloffset;
|
||||
num_aces = le32_to_cpu(parent_pdacl->num_aces);
|
||||
num_aces = le16_to_cpu(parent_pdacl->num_aces);
|
||||
pntsd_type = le16_to_cpu(parent_pntsd->type);
|
||||
pdacl_size = le16_to_cpu(parent_pdacl->size);
|
||||
|
||||
@@ -1201,7 +1202,7 @@ pass:
|
||||
pdacl = (struct smb_acl *)((char *)pntsd + le32_to_cpu(pntsd->dacloffset));
|
||||
pdacl->revision = cpu_to_le16(2);
|
||||
pdacl->size = cpu_to_le16(sizeof(struct smb_acl) + nt_size);
|
||||
pdacl->num_aces = cpu_to_le32(ace_cnt);
|
||||
pdacl->num_aces = cpu_to_le16(ace_cnt);
|
||||
pace = (struct smb_ace *)((char *)pdacl + sizeof(struct smb_acl));
|
||||
memcpy(pace, aces_base, nt_size);
|
||||
pntsd_size += sizeof(struct smb_acl) + nt_size;
|
||||
@@ -1282,7 +1283,7 @@ int smb_check_perm_dacl(struct ksmbd_conn *conn, const struct path *path,
|
||||
|
||||
ace = (struct smb_ace *)((char *)pdacl + sizeof(struct smb_acl));
|
||||
aces_size = acl_size - sizeof(struct smb_acl);
|
||||
for (i = 0; i < le32_to_cpu(pdacl->num_aces); i++) {
|
||||
for (i = 0; i < le16_to_cpu(pdacl->num_aces); i++) {
|
||||
if (offsetof(struct smb_ace, access_req) > aces_size)
|
||||
break;
|
||||
ace_size = le16_to_cpu(ace->size);
|
||||
@@ -1303,7 +1304,7 @@ int smb_check_perm_dacl(struct ksmbd_conn *conn, const struct path *path,
|
||||
|
||||
ace = (struct smb_ace *)((char *)pdacl + sizeof(struct smb_acl));
|
||||
aces_size = acl_size - sizeof(struct smb_acl);
|
||||
for (i = 0; i < le32_to_cpu(pdacl->num_aces); i++) {
|
||||
for (i = 0; i < le16_to_cpu(pdacl->num_aces); i++) {
|
||||
if (offsetof(struct smb_ace, access_req) > aces_size)
|
||||
break;
|
||||
ace_size = le16_to_cpu(ace->size);
|
||||
|
||||
@@ -86,7 +86,7 @@ int parse_sec_desc(struct mnt_idmap *idmap, struct smb_ntsd *pntsd,
|
||||
int build_sec_desc(struct mnt_idmap *idmap, struct smb_ntsd *pntsd,
|
||||
struct smb_ntsd *ppntsd, int ppntsd_size, int addition_info,
|
||||
__u32 *secdesclen, struct smb_fattr *fattr);
|
||||
int init_acl_state(struct posix_acl_state *state, int cnt);
|
||||
int init_acl_state(struct posix_acl_state *state, u16 cnt);
|
||||
void free_acl_state(struct posix_acl_state *state);
|
||||
void posix_state_to_acl(struct posix_acl_state *state,
|
||||
struct posix_acl_entry *pace);
|
||||
|
||||
@@ -10,12 +10,12 @@ void ct_irq_exit_irqson(void);
|
||||
void ct_nmi_enter(void);
|
||||
void ct_nmi_exit(void);
|
||||
#else
|
||||
static inline void ct_irq_enter(void) { }
|
||||
static inline void ct_irq_exit(void) { }
|
||||
static __always_inline void ct_irq_enter(void) { }
|
||||
static __always_inline void ct_irq_exit(void) { }
|
||||
static inline void ct_irq_enter_irqson(void) { }
|
||||
static inline void ct_irq_exit_irqson(void) { }
|
||||
static inline void ct_nmi_enter(void) { }
|
||||
static inline void ct_nmi_exit(void) { }
|
||||
static __always_inline void ct_nmi_enter(void) { }
|
||||
static __always_inline void ct_nmi_exit(void) { }
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -138,7 +138,7 @@ static inline void rcu_sysrq_end(void) { }
|
||||
#if defined(CONFIG_NO_HZ_FULL) && (!defined(CONFIG_GENERIC_ENTRY) || !defined(CONFIG_KVM_XFER_TO_GUEST_WORK))
|
||||
void rcu_irq_work_resched(void);
|
||||
#else
|
||||
static inline void rcu_irq_work_resched(void) { }
|
||||
static __always_inline void rcu_irq_work_resched(void) { }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RCU_NOCB_CPU
|
||||
|
||||
@@ -12,7 +12,7 @@ static __always_inline bool sched_smt_active(void)
|
||||
return static_branch_likely(&sched_smt_present);
|
||||
}
|
||||
#else
|
||||
static inline bool sched_smt_active(void) { return false; }
|
||||
static __always_inline bool sched_smt_active(void) { return false; }
|
||||
#endif
|
||||
|
||||
void arch_smt_update(void);
|
||||
|
||||
+26
-2
@@ -11723,6 +11723,21 @@ free_dev:
|
||||
static struct lock_class_key cpuctx_mutex;
|
||||
static struct lock_class_key cpuctx_lock;
|
||||
|
||||
static bool idr_cmpxchg(struct idr *idr, unsigned long id, void *old, void *new)
|
||||
{
|
||||
void *tmp, *val = idr_find(idr, id);
|
||||
|
||||
if (val != old)
|
||||
return false;
|
||||
|
||||
tmp = idr_replace(idr, new, id);
|
||||
if (IS_ERR(tmp))
|
||||
return false;
|
||||
|
||||
WARN_ON_ONCE(tmp != val);
|
||||
return true;
|
||||
}
|
||||
|
||||
int perf_pmu_register(struct pmu *pmu, const char *name, int type)
|
||||
{
|
||||
int cpu, ret, max = PERF_TYPE_MAX;
|
||||
@@ -11749,7 +11764,7 @@ int perf_pmu_register(struct pmu *pmu, const char *name, int type)
|
||||
if (type >= 0)
|
||||
max = type;
|
||||
|
||||
ret = idr_alloc(&pmu_idr, pmu, max, 0, GFP_KERNEL);
|
||||
ret = idr_alloc(&pmu_idr, NULL, max, 0, GFP_KERNEL);
|
||||
if (ret < 0)
|
||||
goto free_pdc;
|
||||
|
||||
@@ -11757,6 +11772,7 @@ int perf_pmu_register(struct pmu *pmu, const char *name, int type)
|
||||
|
||||
type = ret;
|
||||
pmu->type = type;
|
||||
atomic_set(&pmu->exclusive_cnt, 0);
|
||||
|
||||
if (pmu_bus_running && !pmu->dev) {
|
||||
ret = pmu_dev_alloc(pmu);
|
||||
@@ -11805,14 +11821,22 @@ int perf_pmu_register(struct pmu *pmu, const char *name, int type)
|
||||
if (!pmu->event_idx)
|
||||
pmu->event_idx = perf_event_idx_default;
|
||||
|
||||
/*
|
||||
* Now that the PMU is complete, make it visible to perf_try_init_event().
|
||||
*/
|
||||
if (!idr_cmpxchg(&pmu_idr, pmu->type, NULL, pmu))
|
||||
goto free_context;
|
||||
list_add_rcu(&pmu->entry, &pmus);
|
||||
atomic_set(&pmu->exclusive_cnt, 0);
|
||||
|
||||
ret = 0;
|
||||
unlock:
|
||||
mutex_unlock(&pmus_lock);
|
||||
|
||||
return ret;
|
||||
|
||||
free_context:
|
||||
free_percpu(pmu->cpu_pmu_context);
|
||||
|
||||
free_dev:
|
||||
if (pmu->dev && pmu->dev != PMU_NULL_DEV) {
|
||||
device_del(pmu->dev);
|
||||
|
||||
@@ -7565,9 +7565,9 @@ static __init int rb_write_something(struct rb_test_data *data, bool nested)
|
||||
/* Ignore dropped events before test starts. */
|
||||
if (started) {
|
||||
if (nested)
|
||||
data->bytes_dropped += len;
|
||||
else
|
||||
data->bytes_dropped_nested += len;
|
||||
else
|
||||
data->bytes_dropped += len;
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
@@ -1005,6 +1005,9 @@ static inline int rtnl_vfinfo_size(const struct net_device *dev,
|
||||
/* IFLA_VF_STATS_TX_DROPPED */
|
||||
nla_total_size_64bit(sizeof(__u64)));
|
||||
}
|
||||
if (dev->netdev_ops->ndo_get_vf_guid)
|
||||
size += num_vfs * 2 *
|
||||
nla_total_size(sizeof(struct ifla_vf_guid));
|
||||
return size;
|
||||
} else
|
||||
return 0;
|
||||
|
||||
@@ -115,8 +115,14 @@ void drv_remove_interface(struct ieee80211_local *local,
|
||||
|
||||
sdata->flags &= ~IEEE80211_SDATA_IN_DRIVER;
|
||||
|
||||
/* Remove driver debugfs entries */
|
||||
ieee80211_debugfs_recreate_netdev(sdata, sdata->vif.valid_links);
|
||||
/*
|
||||
* Remove driver debugfs entries.
|
||||
* The virtual monitor interface doesn't get a debugfs
|
||||
* entry, so it's exempt here.
|
||||
*/
|
||||
if (sdata != local->monitor_sdata)
|
||||
ieee80211_debugfs_recreate_netdev(sdata,
|
||||
sdata->vif.valid_links);
|
||||
|
||||
trace_drv_remove_interface(local, sdata);
|
||||
local->ops->remove_interface(&local->hw, &sdata->vif);
|
||||
|
||||
@@ -1205,16 +1205,17 @@ void ieee80211_del_virtual_monitor(struct ieee80211_local *local)
|
||||
return;
|
||||
}
|
||||
|
||||
RCU_INIT_POINTER(local->monitor_sdata, NULL);
|
||||
mutex_unlock(&local->iflist_mtx);
|
||||
|
||||
synchronize_net();
|
||||
|
||||
clear_bit(SDATA_STATE_RUNNING, &sdata->state);
|
||||
ieee80211_link_release_channel(&sdata->deflink);
|
||||
|
||||
if (ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF))
|
||||
drv_remove_interface(local, sdata);
|
||||
|
||||
RCU_INIT_POINTER(local->monitor_sdata, NULL);
|
||||
mutex_unlock(&local->iflist_mtx);
|
||||
|
||||
synchronize_net();
|
||||
|
||||
kfree(sdata);
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -685,7 +685,7 @@ void __ieee80211_flush_queues(struct ieee80211_local *local,
|
||||
struct ieee80211_sub_if_data *sdata,
|
||||
unsigned int queues, bool drop)
|
||||
{
|
||||
if (!local->ops->flush)
|
||||
if (!local->ops->flush && !drop)
|
||||
return;
|
||||
|
||||
/*
|
||||
@@ -712,7 +712,8 @@ void __ieee80211_flush_queues(struct ieee80211_local *local,
|
||||
}
|
||||
}
|
||||
|
||||
drv_flush(local, sdata, queues, drop);
|
||||
if (local->ops->flush)
|
||||
drv_flush(local, sdata, queues, drop);
|
||||
|
||||
ieee80211_wake_queues_by_reason(&local->hw, queues,
|
||||
IEEE80211_QUEUE_STOP_REASON_FLUSH,
|
||||
|
||||
@@ -10717,7 +10717,9 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1043, 0x1f12, "ASUS UM5302", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x1043, 0x1f1f, "ASUS H7604JI/JV/J3D", ALC245_FIXUP_CS35L41_SPI_2),
|
||||
SND_PCI_QUIRK(0x1043, 0x1f62, "ASUS UX7602ZM", ALC245_FIXUP_CS35L41_SPI_2),
|
||||
SND_PCI_QUIRK(0x1043, 0x1f63, "ASUS P5405CSA", ALC245_FIXUP_CS35L41_SPI_2),
|
||||
SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16", ALC289_FIXUP_ASUS_GA401),
|
||||
SND_PCI_QUIRK(0x1043, 0x1fb3, "ASUS ROG Flow Z13 GZ302EA", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2),
|
||||
SND_PCI_QUIRK(0x1043, 0x31d0, "ASUS Zen AIO 27 Z272SD_A272SD", ALC274_FIXUP_ASUS_ZEN_AIO_27),
|
||||
SND_PCI_QUIRK(0x1043, 0x3a20, "ASUS G614JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
|
||||
|
||||
@@ -4153,7 +4153,7 @@ static bool ignore_unreachable_insn(struct objtool_file *file, struct instructio
|
||||
* It may also insert a UD2 after calling a __noreturn function.
|
||||
*/
|
||||
prev_insn = prev_insn_same_sec(file, insn);
|
||||
if (prev_insn->dead_end &&
|
||||
if (prev_insn && prev_insn->dead_end &&
|
||||
(insn->type == INSN_BUG ||
|
||||
(insn->type == INSN_JUMP_UNCONDITIONAL &&
|
||||
insn->jump_dest && insn->jump_dest->type == INSN_BUG)))
|
||||
@@ -4615,6 +4615,8 @@ static int disas_funcs(const char *funcs)
|
||||
char *cmd;
|
||||
|
||||
cross_compile = getenv("CROSS_COMPILE");
|
||||
if (!cross_compile)
|
||||
cross_compile = "";
|
||||
|
||||
objdump_str = "%sobjdump -wdr %s | gawk -M -v _funcs='%s' '"
|
||||
"BEGIN { split(_funcs, funcs); }"
|
||||
|
||||
Reference in New Issue
Block a user