Merge 55fba69fbf ("rust: kernel: Mark rust_fmt_argument as extern "C"") into android14-6.1
Steps on the way to 6.1.26 Change-Id: Idedac255abf3273edfdc8e1c3a88cc97c7af1f41 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
d31ed3d059
56 changed files with 399 additions and 192 deletions
|
|
@ -942,7 +942,7 @@
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
spdif: sound@ff88b0000 {
|
||||
spdif: sound@ff8b0000 {
|
||||
compatible = "rockchip,rk3288-spdif", "rockchip,rk3066-spdif";
|
||||
reg = <0x0 0xff8b0000 0x0 0x10000>;
|
||||
#sound-dai-cells = <0>;
|
||||
|
|
|
|||
|
|
@ -1571,10 +1571,9 @@
|
|||
|
||||
dmc: bus@38000 {
|
||||
compatible = "simple-bus";
|
||||
reg = <0x0 0x38000 0x0 0x400>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges = <0x0 0x0 0x0 0x38000 0x0 0x400>;
|
||||
ranges = <0x0 0x0 0x0 0x38000 0x0 0x2000>;
|
||||
|
||||
canvas: video-lut@48 {
|
||||
compatible = "amlogic,canvas";
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@
|
|||
rohm,reset-snvs-powered;
|
||||
|
||||
#clock-cells = <0>;
|
||||
clocks = <&osc_32k 0>;
|
||||
clocks = <&osc_32k>;
|
||||
clock-output-names = "clk-32k-out";
|
||||
|
||||
regulators {
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@
|
|||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpio = <&gpio2 20 GPIO_ACTIVE_HIGH>; /* PMIC_EN_ETH */
|
||||
off-on-delay = <500000>;
|
||||
off-on-delay-us = <500000>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_reg_eth>;
|
||||
regulator-always-on;
|
||||
|
|
@ -135,7 +135,7 @@
|
|||
enable-active-high;
|
||||
/* Verdin SD_1_PWR_EN (SODIMM 76) */
|
||||
gpio = <&gpio3 5 GPIO_ACTIVE_HIGH>;
|
||||
off-on-delay = <100000>;
|
||||
off-on-delay-us = <100000>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_usdhc2_pwr_en>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpio = <&gpio_expander_21 4 GPIO_ACTIVE_HIGH>; /* ETH_PWR_EN */
|
||||
off-on-delay = <500000>;
|
||||
off-on-delay-us = <500000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-name = "+V3.3_ETH";
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@
|
|||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpio = <&gpio2 20 GPIO_ACTIVE_HIGH>; /* PMIC_EN_ETH */
|
||||
off-on-delay = <500000>;
|
||||
off-on-delay-us = <500000>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_reg_eth>;
|
||||
regulator-always-on;
|
||||
|
|
@ -127,7 +127,7 @@
|
|||
enable-active-high;
|
||||
/* Verdin SD_1_PWR_EN (SODIMM 76) */
|
||||
gpio = <&gpio4 22 GPIO_ACTIVE_HIGH>;
|
||||
off-on-delay = <100000>;
|
||||
off-on-delay-us = <100000>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_usdhc2_pwr_en>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
|
|
|||
|
|
@ -59,11 +59,11 @@
|
|||
perst-gpios = <&tlmm 58 0x1>;
|
||||
};
|
||||
|
||||
&pcie_phy0 {
|
||||
&pcie_qmp0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie_phy1 {
|
||||
&pcie_qmp1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
};
|
||||
|
||||
&blsp1_spi1 {
|
||||
status = "ok";
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
#address-cells = <1>;
|
||||
|
|
@ -34,33 +34,33 @@
|
|||
};
|
||||
|
||||
&blsp1_uart5 {
|
||||
status = "ok";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
status = "ok";
|
||||
status = "okay";
|
||||
perst-gpios = <&tlmm 58 0x1>;
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
status = "ok";
|
||||
status = "okay";
|
||||
perst-gpios = <&tlmm 61 0x1>;
|
||||
};
|
||||
|
||||
&pcie_phy0 {
|
||||
status = "ok";
|
||||
&pcie_qmp0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie_phy1 {
|
||||
status = "ok";
|
||||
&pcie_qmp1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&qpic_bam {
|
||||
status = "ok";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&qpic_nand {
|
||||
status = "ok";
|
||||
status = "okay";
|
||||
|
||||
nand@0 {
|
||||
reg = <0>;
|
||||
|
|
|
|||
|
|
@ -15,8 +15,9 @@
|
|||
#size-cells = <0>;
|
||||
|
||||
pmk8280_pon: pon@1300 {
|
||||
compatible = "qcom,pm8998-pon";
|
||||
reg = <0x1300>;
|
||||
compatible = "qcom,pmk8350-pon";
|
||||
reg = <0x1300>, <0x800>;
|
||||
reg-names = "hlos", "pbs";
|
||||
|
||||
pmk8280_pon_pwrkey: pwrkey {
|
||||
compatible = "qcom,pmk8350-pwrkey";
|
||||
|
|
|
|||
|
|
@ -540,7 +540,7 @@
|
|||
non-removable;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
|
||||
sd-uhs-sdr104;
|
||||
sd-uhs-sdr50;
|
||||
vmmc-supply = <&vcc3v3_sys>;
|
||||
vqmmc-supply = <&vcc_1v8>;
|
||||
status = "okay";
|
||||
|
|
|
|||
|
|
@ -474,9 +474,7 @@ long arch_ptrace(struct task_struct *child, long request,
|
|||
}
|
||||
return 0;
|
||||
case PTRACE_GET_LAST_BREAK:
|
||||
put_user(child->thread.last_break,
|
||||
(unsigned long __user *) data);
|
||||
return 0;
|
||||
return put_user(child->thread.last_break, (unsigned long __user *)data);
|
||||
case PTRACE_ENABLE_TE:
|
||||
if (!MACHINE_HAS_TE)
|
||||
return -EIO;
|
||||
|
|
@ -824,9 +822,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
|
|||
}
|
||||
return 0;
|
||||
case PTRACE_GET_LAST_BREAK:
|
||||
put_user(child->thread.last_break,
|
||||
(unsigned int __user *) data);
|
||||
return 0;
|
||||
return put_user(child->thread.last_break, (unsigned int __user *)data);
|
||||
}
|
||||
return compat_ptrace_request(child, request, addr, data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include <linux/firmware.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/debugfs.h>
|
||||
#include <drm/drm_drv.h>
|
||||
|
|
@ -84,6 +85,7 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
|
|||
{
|
||||
unsigned long bo_size;
|
||||
const char *fw_name;
|
||||
const char *bios_ver;
|
||||
const struct common_firmware_header *hdr;
|
||||
unsigned char fw_check;
|
||||
unsigned int fw_shared_size, log_offset;
|
||||
|
|
@ -159,6 +161,21 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
|
|||
if ((adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) &&
|
||||
(adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG))
|
||||
adev->vcn.indirect_sram = true;
|
||||
/*
|
||||
* Some Steam Deck's BIOS versions are incompatible with the
|
||||
* indirect SRAM mode, leading to amdgpu being unable to get
|
||||
* properly probed (and even potentially crashing the kernel).
|
||||
* Hence, check for these versions here - notice this is
|
||||
* restricted to Vangogh (Deck's APU).
|
||||
*/
|
||||
bios_ver = dmi_get_system_info(DMI_BIOS_VERSION);
|
||||
|
||||
if (bios_ver && (!strncmp("F7A0113", bios_ver, 7) ||
|
||||
!strncmp("F7A0114", bios_ver, 7))) {
|
||||
adev->vcn.indirect_sram = false;
|
||||
dev_info(adev->dev,
|
||||
"Steam Deck quirk: indirect SRAM disabled on BIOS %s\n", bios_ver);
|
||||
}
|
||||
break;
|
||||
case IP_VERSION(3, 0, 16):
|
||||
fw_name = FIRMWARE_DIMGREY_CAVEFISH;
|
||||
|
|
|
|||
|
|
@ -146,8 +146,8 @@ int drm_buddy_init(struct drm_buddy *mm, u64 size, u64 chunk_size)
|
|||
unsigned int order;
|
||||
u64 root_size;
|
||||
|
||||
root_size = rounddown_pow_of_two(size);
|
||||
order = ilog2(root_size) - ilog2(chunk_size);
|
||||
order = ilog2(size) - ilog2(chunk_size);
|
||||
root_size = chunk_size << order;
|
||||
|
||||
root = drm_block_alloc(mm, NULL, order, offset);
|
||||
if (!root)
|
||||
|
|
|
|||
|
|
@ -89,7 +89,8 @@ static int check_block(struct kunit *test, struct drm_buddy *mm,
|
|||
err = -EINVAL;
|
||||
}
|
||||
|
||||
if (!is_power_of_2(block_size)) {
|
||||
/* We can't use is_power_of_2() for a u64 on 32-bit systems. */
|
||||
if (block_size & (block_size - 1)) {
|
||||
kunit_err(test, "block size not power of two\n");
|
||||
err = -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -802,6 +802,7 @@ static struct ad5755_platform_data *ad5755_parse_fw(struct device *dev)
|
|||
return pdata;
|
||||
|
||||
error_out:
|
||||
fwnode_handle_put(pp);
|
||||
devm_kfree(dev, pdata);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -601,6 +601,7 @@ static int tsl2772_read_prox_diodes(struct tsl2772_chip *chip)
|
|||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
chip->settings.prox_diode = prox_diode_mask;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3272,7 +3272,19 @@ static struct spi_mem_driver spi_nor_driver = {
|
|||
.remove = spi_nor_remove,
|
||||
.shutdown = spi_nor_shutdown,
|
||||
};
|
||||
module_spi_mem_driver(spi_nor_driver);
|
||||
|
||||
static int __init spi_nor_module_init(void)
|
||||
{
|
||||
return spi_mem_driver_register(&spi_nor_driver);
|
||||
}
|
||||
module_init(spi_nor_module_init);
|
||||
|
||||
static void __exit spi_nor_module_exit(void)
|
||||
{
|
||||
spi_mem_driver_unregister(&spi_nor_driver);
|
||||
spi_nor_debugfs_shutdown();
|
||||
}
|
||||
module_exit(spi_nor_module_exit);
|
||||
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_AUTHOR("Huang Shijie <shijie8@gmail.com>");
|
||||
|
|
|
|||
|
|
@ -709,8 +709,10 @@ static inline struct spi_nor *mtd_to_spi_nor(struct mtd_info *mtd)
|
|||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
void spi_nor_debugfs_register(struct spi_nor *nor);
|
||||
void spi_nor_debugfs_shutdown(void);
|
||||
#else
|
||||
static inline void spi_nor_debugfs_register(struct spi_nor *nor) {}
|
||||
static inline void spi_nor_debugfs_shutdown(void) {}
|
||||
#endif
|
||||
|
||||
#endif /* __LINUX_MTD_SPI_NOR_INTERNAL_H */
|
||||
|
|
|
|||
|
|
@ -226,13 +226,13 @@ static void spi_nor_debugfs_unregister(void *data)
|
|||
nor->debugfs_root = NULL;
|
||||
}
|
||||
|
||||
static struct dentry *rootdir;
|
||||
|
||||
void spi_nor_debugfs_register(struct spi_nor *nor)
|
||||
{
|
||||
struct dentry *rootdir, *d;
|
||||
struct dentry *d;
|
||||
int ret;
|
||||
|
||||
/* Create rootdir once. Will never be deleted again. */
|
||||
rootdir = debugfs_lookup(SPI_NOR_DEBUGFS_ROOT, NULL);
|
||||
if (!rootdir)
|
||||
rootdir = debugfs_create_dir(SPI_NOR_DEBUGFS_ROOT, NULL);
|
||||
|
||||
|
|
@ -247,3 +247,8 @@ void spi_nor_debugfs_register(struct spi_nor *nor)
|
|||
debugfs_create_file("capabilities", 0444, d, nor,
|
||||
&spi_nor_capabilities_fops);
|
||||
}
|
||||
|
||||
void spi_nor_debugfs_shutdown(void)
|
||||
{
|
||||
debugfs_remove(rootdir);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1776,14 +1776,15 @@ void bond_lower_state_changed(struct slave *slave)
|
|||
|
||||
/* The bonding driver uses ether_setup() to convert a master bond device
|
||||
* to ARPHRD_ETHER, that resets the target netdevice's flags so we always
|
||||
* have to restore the IFF_MASTER flag, and only restore IFF_SLAVE if it was set
|
||||
* have to restore the IFF_MASTER flag, and only restore IFF_SLAVE and IFF_UP
|
||||
* if they were set
|
||||
*/
|
||||
static void bond_ether_setup(struct net_device *bond_dev)
|
||||
{
|
||||
unsigned int slave_flag = bond_dev->flags & IFF_SLAVE;
|
||||
unsigned int flags = bond_dev->flags & (IFF_SLAVE | IFF_UP);
|
||||
|
||||
ether_setup(bond_dev);
|
||||
bond_dev->flags |= IFF_MASTER | slave_flag;
|
||||
bond_dev->flags |= IFF_MASTER | flags;
|
||||
bond_dev->priv_flags &= ~IFF_TX_SKB_SHARING;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -216,6 +216,18 @@ static int b53_mmap_write64(struct b53_device *dev, u8 page, u8 reg,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int b53_mmap_phy_read16(struct b53_device *dev, int addr, int reg,
|
||||
u16 *value)
|
||||
{
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static int b53_mmap_phy_write16(struct b53_device *dev, int addr, int reg,
|
||||
u16 value)
|
||||
{
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static const struct b53_io_ops b53_mmap_ops = {
|
||||
.read8 = b53_mmap_read8,
|
||||
.read16 = b53_mmap_read16,
|
||||
|
|
@ -227,6 +239,8 @@ static const struct b53_io_ops b53_mmap_ops = {
|
|||
.write32 = b53_mmap_write32,
|
||||
.write48 = b53_mmap_write48,
|
||||
.write64 = b53_mmap_write64,
|
||||
.phy_read16 = b53_mmap_phy_read16,
|
||||
.phy_write16 = b53_mmap_phy_write16,
|
||||
};
|
||||
|
||||
static int b53_mmap_probe_of(struct platform_device *pdev,
|
||||
|
|
|
|||
|
|
@ -7597,7 +7597,7 @@ static int __bnxt_hwrm_ptp_qcfg(struct bnxt *bp)
|
|||
u8 flags;
|
||||
int rc;
|
||||
|
||||
if (bp->hwrm_spec_code < 0x10801) {
|
||||
if (bp->hwrm_spec_code < 0x10801 || !BNXT_CHIP_P5_THOR(bp)) {
|
||||
rc = -ENODEV;
|
||||
goto no_ptp;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5293,31 +5293,6 @@ static void e1000_watchdog_task(struct work_struct *work)
|
|||
ew32(TARC(0), tarc0);
|
||||
}
|
||||
|
||||
/* disable TSO for pcie and 10/100 speeds, to avoid
|
||||
* some hardware issues
|
||||
*/
|
||||
if (!(adapter->flags & FLAG_TSO_FORCE)) {
|
||||
switch (adapter->link_speed) {
|
||||
case SPEED_10:
|
||||
case SPEED_100:
|
||||
e_info("10/100 speed: disabling TSO\n");
|
||||
netdev->features &= ~NETIF_F_TSO;
|
||||
netdev->features &= ~NETIF_F_TSO6;
|
||||
break;
|
||||
case SPEED_1000:
|
||||
netdev->features |= NETIF_F_TSO;
|
||||
netdev->features |= NETIF_F_TSO6;
|
||||
break;
|
||||
default:
|
||||
/* oops */
|
||||
break;
|
||||
}
|
||||
if (hw->mac.type == e1000_pch_spt) {
|
||||
netdev->features &= ~NETIF_F_TSO;
|
||||
netdev->features &= ~NETIF_F_TSO6;
|
||||
}
|
||||
}
|
||||
|
||||
/* enable transmits in the hardware, need to do this
|
||||
* after setting TARC(0)
|
||||
*/
|
||||
|
|
@ -7532,6 +7507,32 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
NETIF_F_RXCSUM |
|
||||
NETIF_F_HW_CSUM);
|
||||
|
||||
/* disable TSO for pcie and 10/100 speeds to avoid
|
||||
* some hardware issues and for i219 to fix transfer
|
||||
* speed being capped at 60%
|
||||
*/
|
||||
if (!(adapter->flags & FLAG_TSO_FORCE)) {
|
||||
switch (adapter->link_speed) {
|
||||
case SPEED_10:
|
||||
case SPEED_100:
|
||||
e_info("10/100 speed: disabling TSO\n");
|
||||
netdev->features &= ~NETIF_F_TSO;
|
||||
netdev->features &= ~NETIF_F_TSO6;
|
||||
break;
|
||||
case SPEED_1000:
|
||||
netdev->features |= NETIF_F_TSO;
|
||||
netdev->features |= NETIF_F_TSO6;
|
||||
break;
|
||||
default:
|
||||
/* oops */
|
||||
break;
|
||||
}
|
||||
if (hw->mac.type == e1000_pch_spt) {
|
||||
netdev->features &= ~NETIF_F_TSO;
|
||||
netdev->features &= ~NETIF_F_TSO6;
|
||||
}
|
||||
}
|
||||
|
||||
/* Set user-changeable features (subset of all device features) */
|
||||
netdev->hw_features = netdev->features;
|
||||
netdev->hw_features |= NETIF_F_RXFCS;
|
||||
|
|
|
|||
|
|
@ -11058,8 +11058,11 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)
|
|||
pf->hw.aq.asq_last_status));
|
||||
}
|
||||
/* reinit the misc interrupt */
|
||||
if (pf->flags & I40E_FLAG_MSIX_ENABLED)
|
||||
if (pf->flags & I40E_FLAG_MSIX_ENABLED) {
|
||||
ret = i40e_setup_misc_vector(pf);
|
||||
if (ret)
|
||||
goto end_unlock;
|
||||
}
|
||||
|
||||
/* Add a filter to drop all Flow control frames from any VSI from being
|
||||
* transmitted. By doing so we stop a malicious VF from sending out
|
||||
|
|
@ -14098,15 +14101,15 @@ static int i40e_add_vsi(struct i40e_vsi *vsi)
|
|||
vsi->id = ctxt.vsi_number;
|
||||
}
|
||||
|
||||
vsi->active_filters = 0;
|
||||
clear_bit(__I40E_VSI_OVERFLOW_PROMISC, vsi->state);
|
||||
spin_lock_bh(&vsi->mac_filter_hash_lock);
|
||||
vsi->active_filters = 0;
|
||||
/* If macvlan filters already exist, force them to get loaded */
|
||||
hash_for_each_safe(vsi->mac_filter_hash, bkt, h, f, hlist) {
|
||||
f->state = I40E_FILTER_NEW;
|
||||
f_count++;
|
||||
}
|
||||
spin_unlock_bh(&vsi->mac_filter_hash_lock);
|
||||
clear_bit(__I40E_VSI_OVERFLOW_PROMISC, vsi->state);
|
||||
|
||||
if (f_count) {
|
||||
vsi->flags |= I40E_VSI_FLAG_FILTER_CHANGED;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ mlxfw_mfa2_tlv_next(const struct mlxfw_mfa2_file *mfa2_file,
|
|||
|
||||
if (tlv->type == MLXFW_MFA2_TLV_MULTI_PART) {
|
||||
multi = mlxfw_mfa2_tlv_multi_get(mfa2_file, tlv);
|
||||
if (!multi)
|
||||
return NULL;
|
||||
tlv_len = NLA_ALIGN(tlv_len + be16_to_cpu(multi->total_len));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#define MLXSW_PCI_CIR_TIMEOUT_MSECS 1000
|
||||
|
||||
#define MLXSW_PCI_SW_RESET_TIMEOUT_MSECS 900000
|
||||
#define MLXSW_PCI_SW_RESET_WAIT_MSECS 200
|
||||
#define MLXSW_PCI_SW_RESET_WAIT_MSECS 400
|
||||
#define MLXSW_PCI_FW_READY 0xA1844
|
||||
#define MLXSW_PCI_FW_READY_MASK 0xFFFF
|
||||
#define MLXSW_PCI_FW_READY_MAGIC 0x5E
|
||||
|
|
|
|||
|
|
@ -541,7 +541,6 @@ int efx_net_open(struct net_device *net_dev)
|
|||
else
|
||||
efx->state = STATE_NET_UP;
|
||||
|
||||
efx_selftest_async_start(efx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -544,6 +544,8 @@ void efx_start_all(struct efx_nic *efx)
|
|||
/* Start the hardware monitor if there is one */
|
||||
efx_start_monitor(efx);
|
||||
|
||||
efx_selftest_async_start(efx);
|
||||
|
||||
/* Link state detection is normally event-driven; we have
|
||||
* to poll now because we could have missed a change
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -724,8 +724,13 @@ static struct page *xdp_linearize_page(struct receive_queue *rq,
|
|||
int page_off,
|
||||
unsigned int *len)
|
||||
{
|
||||
struct page *page = alloc_page(GFP_ATOMIC);
|
||||
int tailroom = SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
|
||||
struct page *page;
|
||||
|
||||
if (page_off + *len + tailroom > PAGE_SIZE)
|
||||
return NULL;
|
||||
|
||||
page = alloc_page(GFP_ATOMIC);
|
||||
if (!page)
|
||||
return NULL;
|
||||
|
||||
|
|
@ -733,7 +738,6 @@ static struct page *xdp_linearize_page(struct receive_queue *rq,
|
|||
page_off += *len;
|
||||
|
||||
while (--*num_buf) {
|
||||
int tailroom = SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
|
||||
unsigned int buflen;
|
||||
void *buf;
|
||||
int off;
|
||||
|
|
|
|||
|
|
@ -996,10 +996,8 @@ static void xenvif_tx_build_gops(struct xenvif_queue *queue,
|
|||
|
||||
/* No crossing a page as the payload mustn't fragment. */
|
||||
if (unlikely((txreq.offset + txreq.size) > XEN_PAGE_SIZE)) {
|
||||
netdev_err(queue->vif->dev,
|
||||
"txreq.offset: %u, size: %u, end: %lu\n",
|
||||
txreq.offset, txreq.size,
|
||||
(unsigned long)(txreq.offset&~XEN_PAGE_MASK) + txreq.size);
|
||||
netdev_err(queue->vif->dev, "Cross page boundary, txreq.offset: %u, size: %u\n",
|
||||
txreq.offset, txreq.size);
|
||||
xenvif_fatal_tx_err(queue->vif);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1604,22 +1604,7 @@ static int nvme_tcp_alloc_queue(struct nvme_ctrl *nctrl, int qid)
|
|||
if (ret)
|
||||
goto err_init_connect;
|
||||
|
||||
queue->rd_enabled = true;
|
||||
set_bit(NVME_TCP_Q_ALLOCATED, &queue->flags);
|
||||
nvme_tcp_init_recv_ctx(queue);
|
||||
|
||||
write_lock_bh(&queue->sock->sk->sk_callback_lock);
|
||||
queue->sock->sk->sk_user_data = queue;
|
||||
queue->state_change = queue->sock->sk->sk_state_change;
|
||||
queue->data_ready = queue->sock->sk->sk_data_ready;
|
||||
queue->write_space = queue->sock->sk->sk_write_space;
|
||||
queue->sock->sk->sk_data_ready = nvme_tcp_data_ready;
|
||||
queue->sock->sk->sk_state_change = nvme_tcp_state_change;
|
||||
queue->sock->sk->sk_write_space = nvme_tcp_write_space;
|
||||
#ifdef CONFIG_NET_RX_BUSY_POLL
|
||||
queue->sock->sk->sk_ll_usec = 1;
|
||||
#endif
|
||||
write_unlock_bh(&queue->sock->sk->sk_callback_lock);
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
@ -1639,7 +1624,7 @@ err_destroy_mutex:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void nvme_tcp_restore_sock_calls(struct nvme_tcp_queue *queue)
|
||||
static void nvme_tcp_restore_sock_ops(struct nvme_tcp_queue *queue)
|
||||
{
|
||||
struct socket *sock = queue->sock;
|
||||
|
||||
|
|
@ -1654,7 +1639,7 @@ static void nvme_tcp_restore_sock_calls(struct nvme_tcp_queue *queue)
|
|||
static void __nvme_tcp_stop_queue(struct nvme_tcp_queue *queue)
|
||||
{
|
||||
kernel_sock_shutdown(queue->sock, SHUT_RDWR);
|
||||
nvme_tcp_restore_sock_calls(queue);
|
||||
nvme_tcp_restore_sock_ops(queue);
|
||||
cancel_work_sync(&queue->io_work);
|
||||
}
|
||||
|
||||
|
|
@ -1672,21 +1657,42 @@ static void nvme_tcp_stop_queue(struct nvme_ctrl *nctrl, int qid)
|
|||
mutex_unlock(&queue->queue_lock);
|
||||
}
|
||||
|
||||
static void nvme_tcp_setup_sock_ops(struct nvme_tcp_queue *queue)
|
||||
{
|
||||
write_lock_bh(&queue->sock->sk->sk_callback_lock);
|
||||
queue->sock->sk->sk_user_data = queue;
|
||||
queue->state_change = queue->sock->sk->sk_state_change;
|
||||
queue->data_ready = queue->sock->sk->sk_data_ready;
|
||||
queue->write_space = queue->sock->sk->sk_write_space;
|
||||
queue->sock->sk->sk_data_ready = nvme_tcp_data_ready;
|
||||
queue->sock->sk->sk_state_change = nvme_tcp_state_change;
|
||||
queue->sock->sk->sk_write_space = nvme_tcp_write_space;
|
||||
#ifdef CONFIG_NET_RX_BUSY_POLL
|
||||
queue->sock->sk->sk_ll_usec = 1;
|
||||
#endif
|
||||
write_unlock_bh(&queue->sock->sk->sk_callback_lock);
|
||||
}
|
||||
|
||||
static int nvme_tcp_start_queue(struct nvme_ctrl *nctrl, int idx)
|
||||
{
|
||||
struct nvme_tcp_ctrl *ctrl = to_tcp_ctrl(nctrl);
|
||||
struct nvme_tcp_queue *queue = &ctrl->queues[idx];
|
||||
int ret;
|
||||
|
||||
queue->rd_enabled = true;
|
||||
nvme_tcp_init_recv_ctx(queue);
|
||||
nvme_tcp_setup_sock_ops(queue);
|
||||
|
||||
if (idx)
|
||||
ret = nvmf_connect_io_queue(nctrl, idx);
|
||||
else
|
||||
ret = nvmf_connect_admin_queue(nctrl);
|
||||
|
||||
if (!ret) {
|
||||
set_bit(NVME_TCP_Q_LIVE, &ctrl->queues[idx].flags);
|
||||
set_bit(NVME_TCP_Q_LIVE, &queue->flags);
|
||||
} else {
|
||||
if (test_bit(NVME_TCP_Q_ALLOCATED, &ctrl->queues[idx].flags))
|
||||
__nvme_tcp_stop_queue(&ctrl->queues[idx]);
|
||||
if (test_bit(NVME_TCP_Q_ALLOCATED, &queue->flags))
|
||||
__nvme_tcp_stop_queue(queue);
|
||||
dev_err(nctrl->device,
|
||||
"failed to connect queue: %d ret=%d\n", idx, ret);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -464,7 +464,8 @@ static const struct dmi_system_id asus_quirks[] = {
|
|||
.ident = "ASUS ROG FLOW X13",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "GV301Q"),
|
||||
/* Match GV301** */
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "GV301"),
|
||||
},
|
||||
.driver_data = &quirk_asus_tablet_mode,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -140,6 +140,7 @@ static u8 gigabyte_wmi_detect_sensor_usability(struct wmi_device *wdev)
|
|||
}}
|
||||
|
||||
static const struct dmi_system_id gigabyte_wmi_known_working_platforms[] = {
|
||||
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("A320M-S2H V2-CF"),
|
||||
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B450M DS3H-CF"),
|
||||
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B450M DS3H WIFI-CF"),
|
||||
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B450M S2H V2"),
|
||||
|
|
@ -150,6 +151,7 @@ static const struct dmi_system_id gigabyte_wmi_known_working_platforms[] = {
|
|||
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550I AORUS PRO AX"),
|
||||
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550M AORUS PRO-P"),
|
||||
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B550M DS3H"),
|
||||
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B650 AORUS ELITE AX"),
|
||||
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B660 GAMING X DDR4"),
|
||||
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("B660I AORUS PRO DDR4"),
|
||||
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("Z390 I AORUS PRO WIFI-CF"),
|
||||
|
|
@ -159,6 +161,7 @@ static const struct dmi_system_id gigabyte_wmi_known_working_platforms[] = {
|
|||
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("X570 GAMING X"),
|
||||
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("X570 I AORUS PRO WIFI"),
|
||||
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("X570 UD"),
|
||||
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("X570S AORUS ELITE"),
|
||||
DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME("Z690M AORUS ELITE AX DDR4"),
|
||||
{ }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -141,6 +141,7 @@ static int intel_vsec_add_aux(struct pci_dev *pdev, struct intel_vsec_device *in
|
|||
|
||||
ret = ida_alloc(intel_vsec_dev->ida, GFP_KERNEL);
|
||||
if (ret < 0) {
|
||||
kfree(intel_vsec_dev->resource);
|
||||
kfree(intel_vsec_dev);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,18 +8,19 @@
|
|||
// Copyright (c) 2012 Marvell Technology Ltd.
|
||||
// Yunfan Zhang <yfzhang@marvell.com>
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/param.h>
|
||||
#include <linux/bits.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/param.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/regulator/driver.h>
|
||||
#include <linux/regulator/fan53555.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
#include <linux/regulator/of_regulator.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/regulator/fan53555.h>
|
||||
|
||||
/* Voltage setting */
|
||||
#define FAN53555_VSEL0 0x00
|
||||
|
|
@ -60,7 +61,7 @@
|
|||
#define TCS_VSEL1_MODE (1 << 6)
|
||||
|
||||
#define TCS_SLEW_SHIFT 3
|
||||
#define TCS_SLEW_MASK (0x3 < 3)
|
||||
#define TCS_SLEW_MASK GENMASK(4, 3)
|
||||
|
||||
enum fan53555_vendor {
|
||||
FAN53526_VENDOR_FAIRCHILD = 0,
|
||||
|
|
|
|||
|
|
@ -3298,7 +3298,7 @@ fw_crash_buffer_show(struct device *cdev,
|
|||
|
||||
spin_lock_irqsave(&instance->crashdump_lock, flags);
|
||||
buff_offset = instance->fw_crash_buffer_offset;
|
||||
if (!instance->crash_dump_buf &&
|
||||
if (!instance->crash_dump_buf ||
|
||||
!((instance->fw_crash_state == AVAILABLE) ||
|
||||
(instance->fw_crash_state == COPYING))) {
|
||||
dev_err(&instance->pdev->dev,
|
||||
|
|
|
|||
|
|
@ -314,11 +314,18 @@ static int scsi_vpd_inquiry(struct scsi_device *sdev, unsigned char *buffer,
|
|||
if (result)
|
||||
return -EIO;
|
||||
|
||||
/* Sanity check that we got the page back that we asked for */
|
||||
/*
|
||||
* Sanity check that we got the page back that we asked for and that
|
||||
* the page size is not 0.
|
||||
*/
|
||||
if (buffer[1] != page)
|
||||
return -EIO;
|
||||
|
||||
return get_unaligned_be16(&buffer[2]) + 4;
|
||||
result = get_unaligned_be16(&buffer[2]);
|
||||
if (!result)
|
||||
return -EIO;
|
||||
|
||||
return result + 4;
|
||||
}
|
||||
|
||||
static int scsi_get_vpd_size(struct scsi_device *sdev, u8 page)
|
||||
|
|
|
|||
|
|
@ -632,7 +632,7 @@ static int rockchip_sfc_probe(struct platform_device *pdev)
|
|||
if (ret) {
|
||||
dev_err(dev, "Failed to request irq\n");
|
||||
|
||||
return ret;
|
||||
goto err_irq;
|
||||
}
|
||||
|
||||
ret = rockchip_sfc_init(sfc);
|
||||
|
|
|
|||
|
|
@ -523,7 +523,7 @@ void replace_extent_mapping(struct extent_map_tree *tree,
|
|||
setup_extent_mapping(tree, new, modified);
|
||||
}
|
||||
|
||||
static struct extent_map *next_extent_map(struct extent_map *em)
|
||||
static struct extent_map *next_extent_map(const struct extent_map *em)
|
||||
{
|
||||
struct rb_node *next;
|
||||
|
||||
|
|
@ -533,6 +533,35 @@ static struct extent_map *next_extent_map(struct extent_map *em)
|
|||
return container_of(next, struct extent_map, rb_node);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the extent map that immediately follows another one.
|
||||
*
|
||||
* @tree: The extent map tree that the extent map belong to.
|
||||
* Holding read or write access on the tree's lock is required.
|
||||
* @em: An extent map from the given tree. The caller must ensure that
|
||||
* between getting @em and between calling this function, the
|
||||
* extent map @em is not removed from the tree - for example, by
|
||||
* holding the tree's lock for the duration of those 2 operations.
|
||||
*
|
||||
* Returns the extent map that immediately follows @em, or NULL if @em is the
|
||||
* last extent map in the tree.
|
||||
*/
|
||||
struct extent_map *btrfs_next_extent_map(const struct extent_map_tree *tree,
|
||||
const struct extent_map *em)
|
||||
{
|
||||
struct extent_map *next;
|
||||
|
||||
/* The lock must be acquired either in read mode or write mode. */
|
||||
lockdep_assert_held(&tree->lock);
|
||||
ASSERT(extent_map_in_tree(em));
|
||||
|
||||
next = next_extent_map(em);
|
||||
if (next)
|
||||
refcount_inc(&next->refs);
|
||||
|
||||
return next;
|
||||
}
|
||||
|
||||
static struct extent_map *prev_extent_map(struct extent_map *em)
|
||||
{
|
||||
struct rb_node *prev;
|
||||
|
|
|
|||
|
|
@ -87,6 +87,8 @@ static inline u64 extent_map_block_end(struct extent_map *em)
|
|||
void extent_map_tree_init(struct extent_map_tree *tree);
|
||||
struct extent_map *lookup_extent_mapping(struct extent_map_tree *tree,
|
||||
u64 start, u64 len);
|
||||
struct extent_map *btrfs_next_extent_map(const struct extent_map_tree *tree,
|
||||
const struct extent_map *em);
|
||||
int add_extent_mapping(struct extent_map_tree *tree,
|
||||
struct extent_map *em, int modified);
|
||||
void remove_extent_mapping(struct extent_map_tree *tree, struct extent_map *em);
|
||||
|
|
|
|||
|
|
@ -3248,40 +3248,50 @@ static bool find_delalloc_subrange(struct btrfs_inode *inode, u64 start, u64 end
|
|||
*/
|
||||
read_lock(&em_tree->lock);
|
||||
em = lookup_extent_mapping(em_tree, start, len);
|
||||
read_unlock(&em_tree->lock);
|
||||
if (!em) {
|
||||
read_unlock(&em_tree->lock);
|
||||
return (delalloc_len > 0);
|
||||
}
|
||||
|
||||
/* extent_map_end() returns a non-inclusive end offset. */
|
||||
em_end = em ? extent_map_end(em) : 0;
|
||||
em_end = extent_map_end(em);
|
||||
|
||||
/*
|
||||
* If we have a hole/prealloc extent map, check the next one if this one
|
||||
* ends before our range's end.
|
||||
*/
|
||||
if (em && (em->block_start == EXTENT_MAP_HOLE ||
|
||||
test_bit(EXTENT_FLAG_PREALLOC, &em->flags)) && em_end < end) {
|
||||
if ((em->block_start == EXTENT_MAP_HOLE ||
|
||||
test_bit(EXTENT_FLAG_PREALLOC, &em->flags)) && em_end < end) {
|
||||
struct extent_map *next_em;
|
||||
|
||||
read_lock(&em_tree->lock);
|
||||
next_em = lookup_extent_mapping(em_tree, em_end, len - em_end);
|
||||
read_unlock(&em_tree->lock);
|
||||
|
||||
next_em = btrfs_next_extent_map(em_tree, em);
|
||||
free_extent_map(em);
|
||||
em_end = next_em ? extent_map_end(next_em) : 0;
|
||||
|
||||
/*
|
||||
* There's no next extent map or the next one starts beyond our
|
||||
* range, return the range found in the io tree (if any).
|
||||
*/
|
||||
if (!next_em || next_em->start > end) {
|
||||
read_unlock(&em_tree->lock);
|
||||
free_extent_map(next_em);
|
||||
return (delalloc_len > 0);
|
||||
}
|
||||
|
||||
em_end = extent_map_end(next_em);
|
||||
em = next_em;
|
||||
}
|
||||
|
||||
if (em && (em->block_start == EXTENT_MAP_HOLE ||
|
||||
test_bit(EXTENT_FLAG_PREALLOC, &em->flags))) {
|
||||
free_extent_map(em);
|
||||
em = NULL;
|
||||
}
|
||||
read_unlock(&em_tree->lock);
|
||||
|
||||
/*
|
||||
* No extent map or one for a hole or prealloc extent. Use the delalloc
|
||||
* range we found in the io tree if we have one.
|
||||
* We have a hole or prealloc extent that ends at or beyond our range's
|
||||
* end, return the range found in the io tree (if any).
|
||||
*/
|
||||
if (!em)
|
||||
if (em->block_start == EXTENT_MAP_HOLE ||
|
||||
test_bit(EXTENT_FLAG_PREALLOC, &em->flags)) {
|
||||
free_extent_map(em);
|
||||
return (delalloc_len > 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* We don't have any range as EXTENT_DELALLOC in the io tree, so the
|
||||
|
|
|
|||
|
|
@ -1966,8 +1966,10 @@ static int userfaultfd_api(struct userfaultfd_ctx *ctx,
|
|||
ret = -EFAULT;
|
||||
if (copy_from_user(&uffdio_api, buf, sizeof(uffdio_api)))
|
||||
goto out;
|
||||
/* Ignore unsupported features (userspace built against newer kernel) */
|
||||
features = uffdio_api.features & UFFD_API_FEATURES;
|
||||
features = uffdio_api.features;
|
||||
ret = -EINVAL;
|
||||
if (uffdio_api.api != UFFD_API || (features & ~UFFD_API_FEATURES))
|
||||
goto err_out;
|
||||
ret = -EPERM;
|
||||
if ((features & UFFD_FEATURE_EVENT_FORK) && !capable(CAP_SYS_PTRACE))
|
||||
goto err_out;
|
||||
|
|
|
|||
|
|
@ -291,6 +291,7 @@ struct nf_bridge_info {
|
|||
u8 pkt_otherhost:1;
|
||||
u8 in_prerouting:1;
|
||||
u8 bridged_dnat:1;
|
||||
u8 sabotage_in_done:1;
|
||||
__u16 frag_max_size;
|
||||
struct net_device *physindev;
|
||||
|
||||
|
|
@ -4684,7 +4685,7 @@ static inline void nf_reset_ct(struct sk_buff *skb)
|
|||
|
||||
static inline void nf_reset_trace(struct sk_buff *skb)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || defined(CONFIG_NF_TABLES)
|
||||
#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || IS_ENABLED(CONFIG_NF_TABLES)
|
||||
skb->nf_trace = 0;
|
||||
#endif
|
||||
}
|
||||
|
|
@ -4704,7 +4705,7 @@ static inline void __nf_copy(struct sk_buff *dst, const struct sk_buff *src,
|
|||
dst->_nfct = src->_nfct;
|
||||
nf_conntrack_get(skb_nfct(src));
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || defined(CONFIG_NF_TABLES)
|
||||
#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || IS_ENABLED(CONFIG_NF_TABLES)
|
||||
if (copy)
|
||||
dst->nf_trace = src->nf_trace;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1078,6 +1078,10 @@ struct nft_chain {
|
|||
};
|
||||
|
||||
int nft_chain_validate(const struct nft_ctx *ctx, const struct nft_chain *chain);
|
||||
int nft_setelem_validate(const struct nft_ctx *ctx, struct nft_set *set,
|
||||
const struct nft_set_iter *iter,
|
||||
struct nft_set_elem *elem);
|
||||
int nft_set_catchall_validate(const struct nft_ctx *ctx, struct nft_set *set);
|
||||
|
||||
enum nft_chain_types {
|
||||
NFT_CHAIN_T_DEFAULT = 0,
|
||||
|
|
|
|||
|
|
@ -2682,6 +2682,21 @@ static int backtrack_insn(struct bpf_verifier_env *env, int idx,
|
|||
}
|
||||
} else if (opcode == BPF_EXIT) {
|
||||
return -ENOTSUPP;
|
||||
} else if (BPF_SRC(insn->code) == BPF_X) {
|
||||
if (!(*reg_mask & (dreg | sreg)))
|
||||
return 0;
|
||||
/* dreg <cond> sreg
|
||||
* Both dreg and sreg need precision before
|
||||
* this insn. If only sreg was marked precise
|
||||
* before it would be equally necessary to
|
||||
* propagate it to dreg.
|
||||
*/
|
||||
*reg_mask |= (sreg | dreg);
|
||||
/* else dreg <cond> K
|
||||
* Only dreg still needs precision before
|
||||
* this insn, so for the K-based conditional
|
||||
* there is nothing new to be marked.
|
||||
*/
|
||||
}
|
||||
} else if (class == BPF_LD) {
|
||||
if (!(*reg_mask & dreg))
|
||||
|
|
|
|||
|
|
@ -868,12 +868,17 @@ static unsigned int ip_sabotage_in(void *priv,
|
|||
{
|
||||
struct nf_bridge_info *nf_bridge = nf_bridge_info_get(skb);
|
||||
|
||||
if (nf_bridge && !nf_bridge->in_prerouting &&
|
||||
!netif_is_l3_master(skb->dev) &&
|
||||
!netif_is_l3_slave(skb->dev)) {
|
||||
nf_bridge_info_free(skb);
|
||||
state->okfn(state->net, state->sk, skb);
|
||||
return NF_STOLEN;
|
||||
if (nf_bridge) {
|
||||
if (nf_bridge->sabotage_in_done)
|
||||
return NF_ACCEPT;
|
||||
|
||||
if (!nf_bridge->in_prerouting &&
|
||||
!netif_is_l3_master(skb->dev) &&
|
||||
!netif_is_l3_slave(skb->dev)) {
|
||||
nf_bridge->sabotage_in_done = 1;
|
||||
state->okfn(state->net, state->sk, skb);
|
||||
return NF_STOLEN;
|
||||
}
|
||||
}
|
||||
|
||||
return NF_ACCEPT;
|
||||
|
|
|
|||
|
|
@ -146,6 +146,17 @@ br_switchdev_fdb_notify(struct net_bridge *br,
|
|||
{
|
||||
struct switchdev_notifier_fdb_info item;
|
||||
|
||||
/* Entries with these flags were created using ndm_state == NUD_REACHABLE,
|
||||
* ndm_flags == NTF_MASTER( | NTF_STICKY), ext_flags == 0 by something
|
||||
* equivalent to 'bridge fdb add ... master dynamic (sticky)'.
|
||||
* Drivers don't know how to deal with these, so don't notify them to
|
||||
* avoid confusing them.
|
||||
*/
|
||||
if (test_bit(BR_FDB_ADDED_BY_USER, &fdb->flags) &&
|
||||
!test_bit(BR_FDB_STATIC, &fdb->flags) &&
|
||||
!test_bit(BR_FDB_ADDED_BY_EXT_LEARN, &fdb->flags))
|
||||
return;
|
||||
|
||||
br_switchdev_fdb_populate(br, &item, fdb, NULL);
|
||||
|
||||
switch (type) {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@ static void *ipv6_rpl_segdata_pos(const struct ipv6_rpl_sr_hdr *hdr, int i)
|
|||
size_t ipv6_rpl_srh_size(unsigned char n, unsigned char cmpri,
|
||||
unsigned char cmpre)
|
||||
{
|
||||
return (n * IPV6_PFXTAIL_LEN(cmpri)) + IPV6_PFXTAIL_LEN(cmpre);
|
||||
return sizeof(struct ipv6_rpl_sr_hdr) + (n * IPV6_PFXTAIL_LEN(cmpri)) +
|
||||
IPV6_PFXTAIL_LEN(cmpre);
|
||||
}
|
||||
|
||||
void ipv6_rpl_srh_decompress(struct ipv6_rpl_sr_hdr *outhdr,
|
||||
|
|
|
|||
|
|
@ -3391,6 +3391,64 @@ static int nft_table_validate(struct net *net, const struct nft_table *table)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int nft_setelem_validate(const struct nft_ctx *ctx, struct nft_set *set,
|
||||
const struct nft_set_iter *iter,
|
||||
struct nft_set_elem *elem)
|
||||
{
|
||||
const struct nft_set_ext *ext = nft_set_elem_ext(set, elem->priv);
|
||||
struct nft_ctx *pctx = (struct nft_ctx *)ctx;
|
||||
const struct nft_data *data;
|
||||
int err;
|
||||
|
||||
if (nft_set_ext_exists(ext, NFT_SET_EXT_FLAGS) &&
|
||||
*nft_set_ext_flags(ext) & NFT_SET_ELEM_INTERVAL_END)
|
||||
return 0;
|
||||
|
||||
data = nft_set_ext_data(ext);
|
||||
switch (data->verdict.code) {
|
||||
case NFT_JUMP:
|
||||
case NFT_GOTO:
|
||||
pctx->level++;
|
||||
err = nft_chain_validate(ctx, data->verdict.chain);
|
||||
if (err < 0)
|
||||
return err;
|
||||
pctx->level--;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct nft_set_elem_catchall {
|
||||
struct list_head list;
|
||||
struct rcu_head rcu;
|
||||
void *elem;
|
||||
};
|
||||
|
||||
int nft_set_catchall_validate(const struct nft_ctx *ctx, struct nft_set *set)
|
||||
{
|
||||
u8 genmask = nft_genmask_next(ctx->net);
|
||||
struct nft_set_elem_catchall *catchall;
|
||||
struct nft_set_elem elem;
|
||||
struct nft_set_ext *ext;
|
||||
int ret = 0;
|
||||
|
||||
list_for_each_entry_rcu(catchall, &set->catchall_list, list) {
|
||||
ext = nft_set_elem_ext(set, catchall->elem);
|
||||
if (!nft_set_elem_active(ext, genmask))
|
||||
continue;
|
||||
|
||||
elem.priv = catchall->elem;
|
||||
ret = nft_setelem_validate(ctx, set, NULL, &elem);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct nft_rule *nft_rule_lookup_byid(const struct net *net,
|
||||
const struct nft_chain *chain,
|
||||
const struct nlattr *nla);
|
||||
|
|
@ -4695,12 +4753,6 @@ err_set_name:
|
|||
return err;
|
||||
}
|
||||
|
||||
struct nft_set_elem_catchall {
|
||||
struct list_head list;
|
||||
struct rcu_head rcu;
|
||||
void *elem;
|
||||
};
|
||||
|
||||
static void nft_set_catchall_destroy(const struct nft_ctx *ctx,
|
||||
struct nft_set *set)
|
||||
{
|
||||
|
|
@ -5988,7 +6040,8 @@ static int nft_add_set_elem(struct nft_ctx *ctx, struct nft_set *set,
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (!nla[NFTA_SET_ELEM_KEY] && !(flags & NFT_SET_ELEM_CATCHALL))
|
||||
if (((flags & NFT_SET_ELEM_CATCHALL) && nla[NFTA_SET_ELEM_KEY]) ||
|
||||
(!(flags & NFT_SET_ELEM_CATCHALL) && !nla[NFTA_SET_ELEM_KEY]))
|
||||
return -EINVAL;
|
||||
|
||||
if (flags != 0) {
|
||||
|
|
@ -6980,7 +7033,7 @@ static int nf_tables_newobj(struct sk_buff *skb, const struct nfnl_info *info,
|
|||
}
|
||||
|
||||
if (nla[NFTA_OBJ_USERDATA]) {
|
||||
obj->udata = nla_memdup(nla[NFTA_OBJ_USERDATA], GFP_KERNEL);
|
||||
obj->udata = nla_memdup(nla[NFTA_OBJ_USERDATA], GFP_KERNEL_ACCOUNT);
|
||||
if (obj->udata == NULL)
|
||||
goto err_userdata;
|
||||
|
||||
|
|
|
|||
|
|
@ -198,37 +198,6 @@ nla_put_failure:
|
|||
return -1;
|
||||
}
|
||||
|
||||
static int nft_lookup_validate_setelem(const struct nft_ctx *ctx,
|
||||
struct nft_set *set,
|
||||
const struct nft_set_iter *iter,
|
||||
struct nft_set_elem *elem)
|
||||
{
|
||||
const struct nft_set_ext *ext = nft_set_elem_ext(set, elem->priv);
|
||||
struct nft_ctx *pctx = (struct nft_ctx *)ctx;
|
||||
const struct nft_data *data;
|
||||
int err;
|
||||
|
||||
if (nft_set_ext_exists(ext, NFT_SET_EXT_FLAGS) &&
|
||||
*nft_set_ext_flags(ext) & NFT_SET_ELEM_INTERVAL_END)
|
||||
return 0;
|
||||
|
||||
data = nft_set_ext_data(ext);
|
||||
switch (data->verdict.code) {
|
||||
case NFT_JUMP:
|
||||
case NFT_GOTO:
|
||||
pctx->level++;
|
||||
err = nft_chain_validate(ctx, data->verdict.chain);
|
||||
if (err < 0)
|
||||
return err;
|
||||
pctx->level--;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int nft_lookup_validate(const struct nft_ctx *ctx,
|
||||
const struct nft_expr *expr,
|
||||
const struct nft_data **d)
|
||||
|
|
@ -244,9 +213,12 @@ static int nft_lookup_validate(const struct nft_ctx *ctx,
|
|||
iter.skip = 0;
|
||||
iter.count = 0;
|
||||
iter.err = 0;
|
||||
iter.fn = nft_lookup_validate_setelem;
|
||||
iter.fn = nft_setelem_validate;
|
||||
|
||||
priv->set->ops->walk(ctx, priv->set, &iter);
|
||||
if (!iter.err)
|
||||
iter.err = nft_set_catchall_validate(ctx, priv->set);
|
||||
|
||||
if (iter.err < 0)
|
||||
return iter.err;
|
||||
|
||||
|
|
|
|||
|
|
@ -421,15 +421,16 @@ static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
|
|||
} else
|
||||
weight = 1;
|
||||
|
||||
if (tb[TCA_QFQ_LMAX]) {
|
||||
if (tb[TCA_QFQ_LMAX])
|
||||
lmax = nla_get_u32(tb[TCA_QFQ_LMAX]);
|
||||
if (lmax < QFQ_MIN_LMAX || lmax > (1UL << QFQ_MTU_SHIFT)) {
|
||||
pr_notice("qfq: invalid max length %u\n", lmax);
|
||||
return -EINVAL;
|
||||
}
|
||||
} else
|
||||
else
|
||||
lmax = psched_mtu(qdisc_dev(sch));
|
||||
|
||||
if (lmax < QFQ_MIN_LMAX || lmax > (1UL << QFQ_MTU_SHIFT)) {
|
||||
pr_notice("qfq: invalid max length %u\n", lmax);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
inv_w = ONE_FP / weight;
|
||||
weight = ONE_FP / inv_w;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,11 @@ use crate::bindings;
|
|||
|
||||
// Called from `vsprintf` with format specifier `%pA`.
|
||||
#[no_mangle]
|
||||
unsafe fn rust_fmt_argument(buf: *mut c_char, end: *mut c_char, ptr: *const c_void) -> *mut c_char {
|
||||
unsafe extern "C" fn rust_fmt_argument(
|
||||
buf: *mut c_char,
|
||||
end: *mut c_char,
|
||||
ptr: *const c_void,
|
||||
) -> *mut c_char {
|
||||
use fmt::Write;
|
||||
// SAFETY: The C contract guarantees that `buf` is valid if it's less than `end`.
|
||||
let mut w = unsafe { RawFormatter::from_ptrs(buf.cast(), end.cast()) };
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ impl RawFormatter {
|
|||
/// If `pos` is less than `end`, then the region between `pos` (inclusive) and `end`
|
||||
/// (exclusive) must be valid for writes for the lifetime of the returned [`RawFormatter`].
|
||||
pub(crate) unsafe fn from_ptrs(pos: *mut u8, end: *mut u8) -> Self {
|
||||
// INVARIANT: The safety requierments guarantee the type invariants.
|
||||
// INVARIANT: The safety requirements guarantee the type invariants.
|
||||
Self {
|
||||
beg: pos as _,
|
||||
pos: pos as _,
|
||||
|
|
|
|||
|
|
@ -9468,6 +9468,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
|||
SND_PCI_QUIRK(0x103c, 0x8b47, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8b5d, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
|
||||
SND_PCI_QUIRK(0x103c, 0x8b5e, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
|
||||
SND_PCI_QUIRK(0x103c, 0x8b65, "HP ProBook 455 15.6 inch G10 Notebook PC", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
|
||||
SND_PCI_QUIRK(0x103c, 0x8b66, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
|
||||
SND_PCI_QUIRK(0x103c, 0x8b7a, "HP", ALC236_FIXUP_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8b7d, "HP", ALC236_FIXUP_HP_GPIO_LED),
|
||||
|
|
|
|||
23
tools/testing/selftests/sigaltstack/current_stack_pointer.h
Normal file
23
tools/testing/selftests/sigaltstack/current_stack_pointer.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
|
||||
#if __alpha__
|
||||
register unsigned long sp asm("$30");
|
||||
#elif __arm__ || __aarch64__ || __csky__ || __m68k__ || __mips__ || __riscv
|
||||
register unsigned long sp asm("sp");
|
||||
#elif __i386__
|
||||
register unsigned long sp asm("esp");
|
||||
#elif __loongarch64
|
||||
register unsigned long sp asm("$sp");
|
||||
#elif __ppc__
|
||||
register unsigned long sp asm("r1");
|
||||
#elif __s390x__
|
||||
register unsigned long sp asm("%15");
|
||||
#elif __sh__
|
||||
register unsigned long sp asm("r15");
|
||||
#elif __x86_64__
|
||||
register unsigned long sp asm("rsp");
|
||||
#elif __XTENSA__
|
||||
register unsigned long sp asm("a1");
|
||||
#else
|
||||
#error "implement current_stack_pointer equivalent"
|
||||
#endif
|
||||
|
|
@ -20,6 +20,7 @@
|
|||
#include <sys/auxv.h>
|
||||
|
||||
#include "../kselftest.h"
|
||||
#include "current_stack_pointer.h"
|
||||
|
||||
#ifndef SS_AUTODISARM
|
||||
#define SS_AUTODISARM (1U << 31)
|
||||
|
|
@ -46,12 +47,6 @@ void my_usr1(int sig, siginfo_t *si, void *u)
|
|||
stack_t stk;
|
||||
struct stk_data *p;
|
||||
|
||||
#if __s390x__
|
||||
register unsigned long sp asm("%15");
|
||||
#else
|
||||
register unsigned long sp asm("sp");
|
||||
#endif
|
||||
|
||||
if (sp < (unsigned long)sstack ||
|
||||
sp >= (unsigned long)sstack + stack_size) {
|
||||
ksft_exit_fail_msg("SP is not on sigaltstack\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue