Linux 5.4.117
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.117 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 - arch/mips/include/asm/vdso/gettimeofday.h | 26 +++++++++++-- arch/x86/kernel/acpi/boot.c | 25 ++++++------- arch/x86/kernel/setup.c | 7 +-- drivers/acpi/tables.c | 42 ++++++++++++++++++++-- drivers/net/ethernet/intel/igb/igb_main.c | 3 - drivers/net/usb/ax88179_178a.c | 4 +- drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 7 ++- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 7 ++- drivers/platform/x86/thinkpad_acpi.c | 31 +++++++++++----- drivers/scsi/ufs/ufshcd.c | 14 +++++-- drivers/usb/core/quirks.c | 4 ++ drivers/vfio/Kconfig | 2 - fs/overlayfs/super.c | 12 +++--- include/linux/acpi.h | 9 ++++ include/linux/bpf_verifier.h | 5 +- kernel/bpf/verifier.c | 33 +++++++++-------- kernel/events/core.c | 12 +++--- lib/Makefile | 4 +- sound/usb/quirks-table.h | 10 +++++ tools/perf/builtin-ftrace.c | 2 - tools/perf/util/data.c | 5 +- 22 files changed, 181 insertions(+), 85 deletions(-)
Arnd Bergmann (1):
avoid __memcat_p link failure
Chris Chiu (1):
USB: Add reset-resume quirk for WD19's Realtek Hub
Dan Carpenter (1):
scsi: ufs: Unlock on a couple error paths
Daniel Borkmann (2):
bpf: Fix masking negation logic upon negative dst register
bpf: Fix leakage of uninitialized bpf stack under speculation
Greg Kroah-Hartman (1):
Linux 5.4.117
Jason Gunthorpe (1):
vfio: Depend on MMU
Jiri Kosina (2):
iwlwifi: Fix softirq/hardirq disabling in iwl_pcie_enqueue_hcmd()
iwlwifi: Fix softirq/hardirq disabling in iwl_pcie_gen2_enqueue_hcmd()
Kai-Heng Feng (1):
USB: Add LPM quirk for Lenovo ThinkPad USB-C Dock Gen2 Ethernet
Mark Pearson (1):
platform/x86: thinkpad_acpi: Correct thermal sensor allocation
Miklos Szeredi (1):
ovl: allow upperdir inside lowerdir
Nick Lowe (1):
igb: Enable RSS for Intel I211 Ethernet Controller
Ondrej Mosnacek (1):
perf/core: Fix unconditional security_locked_down() call
Phillip Potter (1):
net: usb: ax88179_178a: initialize local variables before use
Rafael J. Wysocki (2):
ACPI: tables: x86: Reserve memory occupied by ACPI tables
ACPI: x86: Call acpi_boot_table_init() after acpi_table_upgrade()
Romain Naour (1):
mips: Do not include hi and lo in clobber list for R6
Takashi Iwai (1):
ALSA: usb-audio: Add MIDI quirk for Vox ToneLab EX
Thomas Richter (1):
perf ftrace: Fix access to pid in array when setting a pid filter
Zhen Lei (1):
perf data: Fix error return code in perf_data__create_dir()
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 116 +SUBLEVEL = 117 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/mips/include/asm/vdso/gettimeofday.h +21 -5
@@ -26,6 +26,12 @@#define __VDSO_USE_SYSCALL ULLONG_MAX +#if MIPS_ISA_REV <6 +#define VDSO_SYSCALL_CLOBBERS "hi", "lo", +#else +#define VDSO_SYSCALL_CLOBBERS +#endif +static __always_inline long gettimeofday_fallback (struct __kernel_old_timeval *_tv,struct timezone *_tz)
@@ -41,7 +47,9 @@ static __always_inline long gettimeofday_fallback( : "=r" (ret), "=r" (error) : "r" (tv), "r" (tz), "r" (nr) : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", - "$14", "$15", "$24", "$25", "hi", "lo", "memory"); +"$14" ,"$15" ,"$24" ,"$25" , +VDSO_SYSCALL_CLOBBERS + "memory");return error ? -ret : ret; }
@@ -65,7 +73,9 @@ static __always_inline long clock_gettime_fallback( : "=r" (ret), "=r" (error) : "r" (clkid), "r" (ts), "r" (nr) : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", - "$14", "$15", "$24", "$25", "hi", "lo", "memory"); +"$14" ,"$15" ,"$24" ,"$25" , +VDSO_SYSCALL_CLOBBERS + "memory");return error ? -ret : ret; }
@@ -89,7 +99,9 @@ static __always_inline int clock_getres_fallback( : "=r" (ret), "=r" (error) : "r" (clkid), "r" (ts), "r" (nr) : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", - "$14", "$15", "$24", "$25", "hi", "lo", "memory"); +"$14" ,"$15" ,"$24" ,"$25" , +VDSO_SYSCALL_CLOBBERS + "memory");return error ? -ret : ret; }
@@ -113,7 +125,9 @@ static __always_inline long clock_gettime32_fallback( : "=r" (ret), "=r" (error) : "r" (clkid), "r" (ts), "r" (nr) : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", - "$14", "$15", "$24", "$25", "hi", "lo", "memory"); +"$14" ,"$15" ,"$24" ,"$25" , +VDSO_SYSCALL_CLOBBERS + "memory");return error ? -ret : ret; }
@@ -133,7 +147,9 @@ static __always_inline int clock_getres32_fallback( : "=r" (ret), "=r" (error) : "r" (clkid), "r" (ts), "r" (nr) : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", - "$14", "$15", "$24", "$25", "hi", "lo", "memory"); +"$14" ,"$15" ,"$24" ,"$25" , +VDSO_SYSCALL_CLOBBERS + "memory");return error ? -ret : ret; }
arch/x86/kernel/acpi/boot.c +12 -13
@@ -1553,10 +1553,18 @@ void __init acpi_boot_table_init(void)/* * Initialize the ACPI boot-time table parser. */ -if (acpi_table_init ()) { +if (acpi_locate_initial_tables ())disable_acpi (); -return ; - } +else +acpi_reserve_initial_tables (); +} + +int __init early_acpi_boot_init (void ) +{ +if (acpi_disabled) +return 1 ; + +acpi_table_init_complete ();acpi_table_parse (ACPI_SIG_BOOT , acpi_parse_sbf);
@@ -1569,18 +1577,9 @@ void __init acpi_boot_table_init(void) }else { printk(KERN_WARNING PREFIX "Disabling ACPI support\n");disable_acpi (); -return ; +return 1 ; } } -} - -int __init early_acpi_boot_init (void ) -{ -/* -* If acpi_disabled, bail out -*/ -if (acpi_disabled) -return 1 ;/* * Process the Multiple APIC Description Table (MADT), if present
arch/x86/kernel/setup.c +2 -5
@@ -1196,6 +1196,8 @@ void __init setup_arch(char **cmdline_p)reserve_initrd ();acpi_table_upgrade (); +/* Look for ACPI tables and reserve memory occupied by them. */ +acpi_boot_table_init ();vsmp_init ();
@@ -1203,11 +1205,6 @@ void __init setup_arch(char **cmdline_p)early_platform_quirks (); -/* -* Parse the ACPI tables for possible boot-time SMP configuration. -*/ -acpi_boot_table_init (); -early_acpi_boot_init ();initmem_init ();
drivers/acpi/tables.c +39 -3
62 lines not on this page · raw message
drivers/net/ethernet/intel/igb/igb_main.c +1 -2
@@ -4326,8 +4326,7 @@ static void igb_setup_mrqc(struct igb_adapter *adapter)else mrqc |=E1000_MRQC_ENABLE_VMDQ ; }else { -if (hw->mac.type != e1000_i211) - mrqc |=E1000_MRQC_ENABLE_RSS_MQ ; + mrqc |=E1000_MRQC_ENABLE_RSS_MQ ; }igb_vmm_control (adapter);
drivers/net/usb/ax88179_178a.c +2 -2
@@ -295,12 +295,12 @@ static int ax88179_read_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,int ret;if (2 == size) { -u16 buf; +u16 buf =0 ; ret =__ax88179_read_cmd (dev, cmd, value, index, size, &buf,0 );le16_to_cpus (&buf); *((u16 *)data) = buf; }else if (4 == size) { -u32 buf; +u32 buf =0 ; ret =__ax88179_read_cmd (dev, cmd, value, index, size, &buf,0 );le32_to_cpus (&buf); *((u32 *)data) = buf;
drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c +4 -3
@@ -705,6 +705,7 @@ static int iwl_pcie_gen2_enqueue_hcmd(struct iwl_trans *trans,const u8 *cmddata[IWL_MAX_CMD_TBS_PER_TFD ];u16 cmdlen[IWL_MAX_CMD_TBS_PER_TFD ];struct iwl_tfh_tfd *tfd; +unsigned long flags2; copy_size =sizeof (struct iwl_cmd_header_wide ); cmd_size =sizeof (struct iwl_cmd_header_wide );
@@ -773,14 +774,14 @@ static int iwl_pcie_gen2_enqueue_hcmd(struct iwl_trans *trans, goto free_dup_buf; } -spin_lock_bh (&txq->lock); +spin_lock_irqsave (&txq->lock, flags2); idx =iwl_pcie_get_cmd_index (txq, txq->write_ptr); tfd =iwl_pcie_get_tfd (trans, txq, txq->write_ptr);memset (tfd,0 ,sizeof (*tfd));if (iwl_queue_space (trans, txq) < ((cmd->flags &CMD_ASYNC ) ?2 :1 )) { -spin_unlock_bh (&txq->lock); +spin_unlock_irqrestore (&txq->lock, flags2);IWL_ERR (trans,"No space in command queue\n" );iwl_op_mode_cmd_queue_full (trans->op_mode);
@@ -915,7 +916,7 @@ static int iwl_pcie_gen2_enqueue_hcmd(struct iwl_trans *trans,spin_unlock_irqrestore (&trans_pcie->reg_lock, flags); out: -spin_unlock_bh (&txq->lock); +spin_unlock_irqrestore (&txq->lock, flags2); free_dup_buf:if (idx <0 )kfree (dup_buf);
drivers/net/wireless/intel/iwlwifi/pcie/tx.c +4 -3
@@ -1544,6 +1544,7 @@ static int iwl_pcie_enqueue_hcmd(struct iwl_trans *trans,u32 cmd_pos;const u8 *cmddata[IWL_MAX_CMD_TBS_PER_TFD ];u16 cmdlen[IWL_MAX_CMD_TBS_PER_TFD ]; +unsigned long flags2; if (WARN(!trans->wide_cmd_header && group_id > IWL_ALWAYS_LONG_GROUP,
@@ -1627,10 +1628,10 @@ static int iwl_pcie_enqueue_hcmd(struct iwl_trans *trans, goto free_dup_buf; } -spin_lock_bh (&txq->lock); +spin_lock_irqsave (&txq->lock, flags2);if (iwl_queue_space (trans, txq) < ((cmd->flags &CMD_ASYNC ) ?2 :1 )) { -spin_unlock_bh (&txq->lock); +spin_unlock_irqrestore (&txq->lock, flags2);IWL_ERR (trans,"No space in command queue\n" );iwl_op_mode_cmd_queue_full (trans->op_mode);
@@ -1791,7 +1792,7 @@ static int iwl_pcie_enqueue_hcmd(struct iwl_trans *trans,spin_unlock_irqrestore (&trans_pcie->reg_lock, flags); out: -spin_unlock_bh (&txq->lock); +spin_unlock_irqrestore (&txq->lock, flags2); free_dup_buf:if (idx <0 )kfree (dup_buf);
drivers/platform/x86/thinkpad_acpi.c +22 -9
@@ -6284,6 +6284,7 @@ enum thermal_access_mode {enum {/* TPACPI_THERMAL_TPEC_* */ TP_EC_THERMAL_TMP0 =0x78 ,/* ACPI EC regs TMP 0..7 */ TP_EC_THERMAL_TMP8 =0xC0 ,/* ACPI EC regs TMP 8..15 */ +TP_EC_FUNCREV =0xEF ,/* ACPI EC Functional revision */ TP_EC_THERMAL_TMP_NA =-128 ,/* ACPI EC sensor not available */ TPACPI_THERMAL_SENSOR_NA =-128000 ,/* Sensor not available */
@@ -6482,7 +6483,7 @@ static const struct attribute_group thermal_temp_input8_group = {static int __init thermal_init (struct ibm_init_struct *iibm) { -u8 t, ta1, ta2; +u8 t, ta1, ta2, ver =0 ;int i;int acpi_tmp7;int res;
@@ -6497,7 +6498,14 @@ static int __init thermal_init(struct ibm_init_struct *iibm)* 0x78-0x7F, 0xC0-0xC7. Registers return 0x00 for * non-implemented, thermal sensors return 0x80 when * not available +* The above rule is unfortunately flawed. This has been seen with +* 0xC2 (power supply ID) causing thermal control problems. +* The EC version can be determined by offset 0xEF and at least for +* version 3 the Lenovo firmware team confirmed that registers 0xC0-0xC7 +* are not thermal registers. */ +if (!acpi_ec_read (TP_EC_FUNCREV , &ver)) +pr_warn ("Thinkpad ACPI EC unable to access EC version\n" ); ta1 = ta2 =0 ;for (i =0 ; i <8 ; i++) {
@@ -6507,11 +6515,13 @@ static int __init thermal_init(struct ibm_init_struct *iibm) ta1 =0 ;break ; } -if (acpi_ec_read (TP_EC_THERMAL_TMP8 + i, &t)) { - ta2 |= t; - }else { - ta1 =0 ; -break ; +if (ver <3 ) { +if (acpi_ec_read (TP_EC_THERMAL_TMP8 + i, &t)) { + ta2 |= t; + }else { + ta1 =0 ; +break ; + } } }if (ta1 ==0 ) {
@@ -6524,9 +6534,12 @@ static int __init thermal_init(struct ibm_init_struct *iibm) thermal_read_mode =TPACPI_THERMAL_NONE ; } }else { - thermal_read_mode = - (ta2 !=0 ) ? -TPACPI_THERMAL_TPEC_16 :TPACPI_THERMAL_TPEC_8 ; +if (ver >=3 ) + thermal_read_mode =TPACPI_THERMAL_TPEC_8 ; +else + thermal_read_mode = + (ta2 !=0 ) ? +TPACPI_THERMAL_TPEC_16 :TPACPI_THERMAL_TPEC_8 ; } }else if (acpi_tmp7) { if (tpacpi_is_ibm() &&
drivers/scsi/ufs/ufshcd.c +10 -4
@@ -2639,8 +2639,10 @@ static int ufshcd_exec_dev_cmd(struct ufs_hba *hba,* the maximum wait time is bounded by SCSI request timeout. */ req =blk_get_request (q,REQ_OP_DRV_OUT ,0 ); -if (IS_ERR (req)) -return PTR_ERR (req); +if (IS_ERR (req)) { + err =PTR_ERR (req); + goto out_unlock; + } tag = req->tag;WARN_ON_ONCE (!ufshcd_valid_tag (hba, tag));
@@ -2668,6 +2670,7 @@ static int ufshcd_exec_dev_cmd(struct ufs_hba *hba, out_put_tag:blk_put_request (req); +out_unlock:up_read (&hba->clk_scaling_lock);return err; }
@@ -5842,8 +5845,10 @@ static int ufshcd_issue_devman_upiu_cmd(struct ufs_hba *hba,down_read (&hba->clk_scaling_lock); req =blk_get_request (q,REQ_OP_DRV_OUT ,0 ); -if (IS_ERR (req)) -return PTR_ERR (req); +if (IS_ERR (req)) { + err =PTR_ERR (req); + goto out_unlock; + } tag = req->tag;WARN_ON_ONCE (!ufshcd_valid_tag (hba, tag));
@@ -5920,6 +5925,7 @@ static int ufshcd_issue_devman_upiu_cmd(struct ufs_hba *hba, }blk_put_request (req); +out_unlock:up_read (&hba->clk_scaling_lock);return err; }
drivers/usb/core/quirks.c +4 -0
@@ -406,6 +406,7 @@ static const struct usb_device_id usb_quirk_list[] = {/* Realtek hub in Dell WD19 (Type-C) */ { USB_DEVICE(0x0bda, 0x0487), .driver_info = USB_QUIRK_NO_LPM }, + { USB_DEVICE(0x0bda, 0x5487), .driver_info = USB_QUIRK_RESET_RESUME }, /* Generic RTL8153 based ethernet adapters */ { USB_DEVICE(0x0bda, 0x8153), .driver_info = USB_QUIRK_NO_LPM },
@@ -438,6 +439,9 @@ static const struct usb_device_id usb_quirk_list[] = { { USB_DEVICE(0x17ef, 0xa012), .driver_info = USB_QUIRK_DISCONNECT_SUSPEND }, + /* Lenovo ThinkPad USB-C Dock Gen2 Ethernet (RTL8153 GigE) */ + { USB_DEVICE(0x17ef, 0xa387), .driver_info = USB_QUIRK_NO_LPM }, + /* BUILDWIN Photo Frame */ { USB_DEVICE(0x1908, 0x1315), .driver_info = USB_QUIRK_HONOR_BNUMINTERFACES },
drivers/vfio/Kconfig +1 -1
@@ -22,7 +22,7 @@ config VFIO_VIRQFD menuconfig VFIO tristate "VFIO Non-Privileged userspace driver framework" select IOMMU_API - select VFIO_IOMMU_TYPE1 if (X86 || S390 || ARM || ARM64) + select VFIO_IOMMU_TYPE1 if MMU && (X86 || S390 || ARM || ARM64) help VFIO provides a framework for secure userspace device drivers. See Documentation/driver-api/vfio.rst for more details.
fs/overlayfs/super.c +7 -5
@@ -1525,7 +1525,8 @@ static struct ovl_entry *ovl_get_lowerstack(struct super_block *sb,* - upper/work dir of any overlayfs instance */ static int ovl_check_layer (struct super_block *sb,struct ovl_fs *ofs, -struct dentry *dentry,const char *name) +struct dentry *dentry,const char *name, +bool is_lower) {struct dentry *next = dentry, *parent;int err =0 ;
@@ -1537,7 +1538,7 @@ static int ovl_check_layer(struct super_block *sb, struct ovl_fs *ofs,/* Walk back ancestors to root (inclusive) looking for traps */ while (!err && parent != next) { -if (ovl_lookup_trap_inode (sb, parent)) { +if (is_lower &&ovl_lookup_trap_inode (sb, parent)) { err = -ELOOP ;pr_err ("overlayfs: overlapping %s path\n" , name); }else if (ovl_is_inuse (parent)) {
@@ -1563,7 +1564,7 @@ static int ovl_check_overlapping_layers(struct super_block *sb,if (ofs->upper_mnt) { err =ovl_check_layer (sb, ofs, ofs->upper_mnt->mnt_root, -"upperdir" ); +"upperdir" , false);if (err)return err;
@@ -1574,7 +1575,8 @@ static int ovl_check_overlapping_layers(struct super_block *sb,* workbasedir. In that case, we already have their traps in * inode cache and we will catch that case on lookup. */ - err =ovl_check_layer (sb, ofs, ofs->workbasedir,"workdir" ); + err =ovl_check_layer (sb, ofs, ofs->workbasedir,"workdir" , + false);if (err)return err; }
@@ -1582,7 +1584,7 @@ static int ovl_check_overlapping_layers(struct super_block *sb,for (i =0 ; i < ofs->numlower; i++) { err =ovl_check_layer (sb, ofs, ofs->lower_layers[i].mnt->mnt_root, -"lowerdir" ); +"lowerdir" , true);if (err)return err; }
include/linux/acpi.h +8 -1
@@ -222,10 +222,14 @@ void __iomem *__acpi_map_table(unsigned long phys, unsigned long size);void __acpi_unmap_table (void __iomem *map,unsigned long size);int early_acpi_boot_init (void );int acpi_boot_init (void ); +void acpi_boot_table_prepare (void );void acpi_boot_table_init (void );int acpi_mps_check (void );int acpi_numa_init (void ); +int acpi_locate_initial_tables (void ); +void acpi_reserve_initial_tables (void ); +void acpi_table_init_complete (void );int acpi_table_init (void );int acpi_table_parse (char *id,acpi_tbl_table_handler handler); int __init acpi_table_parse_entries(char *id, unsigned long table_size,
@@ -759,9 +763,12 @@ static inline int acpi_boot_init(void)return 0 ; } +static inline void acpi_boot_table_prepare (void ) +{ +} +static inline void acpi_boot_table_init (void ) { -return ; }static inline int acpi_mps_check (void )
include/linux/bpf_verifier.h +3 -2
@@ -281,10 +281,11 @@ struct bpf_verifier_state_list { };/* Possible states for alu_state member. */ -#define BPF_ALU_SANITIZE_SRC 1U -#define BPF_ALU_SANITIZE_DST 2U +#define BPF_ALU_SANITIZE_SRC (1U << 0) +#define BPF_ALU_SANITIZE_DST (1U << 1)#define BPF_ALU_NEG_VALUE (1U << 2)#define BPF_ALU_NON_POINTER (1U << 3) +#define BPF_ALU_IMMEDIATE (1U << 4)#define BPF_ALU_SANITIZE (BPF_ALU_SANITIZE_SRC | \ BPF_ALU_SANITIZE_DST)
kernel/bpf/verifier.c +18 -15
@@ -4359,6 +4359,7 @@ static int sanitize_ptr_alu(struct bpf_verifier_env *env, {struct bpf_insn_aux_data *aux = commit_window ?cur_aux (env) : tmp_aux;struct bpf_verifier_state *vstate = env->cur_state; +bool off_is_imm =tnum_is_const (off_reg->var_off);bool off_is_neg = off_reg->smin_value <0 ;bool ptr_is_dst_reg = ptr_reg == dst_reg;u8 opcode =BPF_OP (insn->code);
@@ -4389,6 +4390,7 @@ static int sanitize_ptr_alu(struct bpf_verifier_env *env, alu_limit =abs (tmp_aux->alu_limit - alu_limit); }else { alu_state = off_is_neg ?BPF_ALU_NEG_VALUE :0 ; + alu_state |= off_is_imm ?BPF_ALU_IMMEDIATE :0 ; alu_state |= ptr_is_dst_reg ?BPF_ALU_SANITIZE_SRC :BPF_ALU_SANITIZE_DST ; }
@@ -9156,7 +9158,7 @@ static int fixup_bpf_calls(struct bpf_verifier_env *env)const u8 code_sub =BPF_ALU64 |BPF_SUB |BPF_X ;struct bpf_insn insn_buf[16 ];struct bpf_insn *patch = &insn_buf[0 ]; -bool issrc, isneg; +bool issrc, isneg, isimm;u32 off_reg; aux = &env->insn_aux_data[i + delta];
@@ -9167,28 +9169,29 @@ static int fixup_bpf_calls(struct bpf_verifier_env *env) isneg = aux->alu_state &BPF_ALU_NEG_VALUE ; issrc = (aux->alu_state &BPF_ALU_SANITIZE ) ==BPF_ALU_SANITIZE_SRC ; + isimm = aux->alu_state &BPF_ALU_IMMEDIATE ; off_reg = issrc ? insn->src_reg : insn->dst_reg; -if (isneg) - *patch++ =BPF_ALU64_IMM (BPF_MUL , off_reg,-1 ); - *patch++ =BPF_MOV32_IMM (BPF_REG_AX , aux->alu_limit); - *patch++ =BPF_ALU64_REG (BPF_SUB ,BPF_REG_AX , off_reg); - *patch++ =BPF_ALU64_REG (BPF_OR ,BPF_REG_AX , off_reg); - *patch++ =BPF_ALU64_IMM (BPF_NEG ,BPF_REG_AX ,0 ); - *patch++ =BPF_ALU64_IMM (BPF_ARSH ,BPF_REG_AX ,63 ); -if (issrc) { - *patch++ =BPF_ALU64_REG (BPF_AND ,BPF_REG_AX , - off_reg); - insn->src_reg =BPF_REG_AX ; +if (isimm) { + *patch++ =BPF_MOV32_IMM (BPF_REG_AX , aux->alu_limit); }else { - *patch++ =BPF_ALU64_REG (BPF_AND , off_reg, -BPF_REG_AX ); +if (isneg) + *patch++ =BPF_ALU64_IMM (BPF_MUL , off_reg,-1 ); + *patch++ =BPF_MOV32_IMM (BPF_REG_AX , aux->alu_limit); + *patch++ =BPF_ALU64_REG (BPF_SUB ,BPF_REG_AX , off_reg); + *patch++ =BPF_ALU64_REG (BPF_OR ,BPF_REG_AX , off_reg); + *patch++ =BPF_ALU64_IMM (BPF_NEG ,BPF_REG_AX ,0 ); + *patch++ =BPF_ALU64_IMM (BPF_ARSH ,BPF_REG_AX ,63 ); + *patch++ =BPF_ALU64_REG (BPF_AND ,BPF_REG_AX , off_reg); } +if (!issrc) + *patch++ =BPF_MOV64_REG (insn->dst_reg, insn->src_reg); + insn->src_reg =BPF_REG_AX ;if (isneg) insn->code = insn->code == code_add ? code_sub : code_add; *patch++ = *insn; -if (issrc && isneg) +if (issrc && isneg && !isimm) *patch++ =BPF_ALU64_IMM (BPF_MUL , off_reg,-1 ); cnt = patch - insn_buf;
kernel/events/core.c +6 -6
@@ -10953,12 +10953,12 @@ SYSCALL_DEFINE5(perf_event_open, perf_paranoid_kernel() && !capable(CAP_SYS_ADMIN))return -EACCES ; - err =security_locked_down (LOCKDOWN_PERF ); -if (err && (attr.sample_type &PERF_SAMPLE_REGS_INTR )) -/* REGS_INTR can leak data, lockdown must prevent this */ -return err; - - err =0 ; +/* REGS_INTR can leak data, lockdown must prevent this */ +if (attr.sample_type &PERF_SAMPLE_REGS_INTR ) { + err =security_locked_down (LOCKDOWN_PERF ); +if (err) +return err; + }/* * In cgroup mode, the pid argument is used to pass the fd
lib/Makefile +2 -2
@@ -31,7 +31,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \ flex_proportions.o ratelimit.o show_mem.o \ is_single_threaded.o plist.o decompress.o kobject_uevent.o \ earlycpio.o seq_buf.o siphash.o dec_and_lock.o \ - nmi_backtrace.o nodemask.o win_minmax.o memcat_p.o + nmi_backtrace.o nodemask.o win_minmax.o lib-$(CONFIG_PRINTK) += dump_stack.o lib-$(CONFIG_MMU) += ioremap.o
@@ -46,7 +46,7 @@ obj-y += bcd.o sort.o parser.o debug_locks.o random32.o \ bsearch.o find_bit.o llist.o memweight.o kfifo.o \ percpu-refcount.o rhashtable.o \ once.o refcount.o usercopy.o errseq.o bucket_locks.o \ - generic-radix-tree.o + generic-radix-tree.o memcat_p.o obj-$(CONFIG_STRING_SELFTEST) += test_string.o obj-y += string_helpers.o obj-$(CONFIG_TEST_STRING_HELPERS) += test-string_helpers.o
sound/usb/quirks-table.h +10 -0
@@ -2485,6 +2485,16 @@ YAMAHA_DEVICE(0x7010, "UB99"), } }, +{ + USB_DEVICE_VENDOR_SPEC(0x0944, 0x0204), + .driver_info = (unsigned long ) & (const struct snd_usb_audio_quirk ) { + .vendor_name ="KORG, Inc." , +/* .product_name = "ToneLab EX", */ + .ifnum =3 , + .type =QUIRK_MIDI_STANDARD_INTERFACE , + } +}, +/* AKAI devices */ { USB_DEVICE(0x09e8, 0x0062),
tools/perf/builtin-ftrace.c +1 -1
@@ -161,7 +161,7 @@ static int set_tracing_pid(struct perf_ftrace *ftrace)for (i =0 ; i <perf_thread_map__nr (ftrace->evlist->core.threads); i++) {scnprintf (buf,sizeof (buf),"%d" , - ftrace->evlist->core.threads->map[i]); +perf_thread_map__pid (ftrace->evlist->core.threads, i));if (append_tracing_file ("set_ftrace_pid" , buf) <0 )return -1 ; }
tools/perf/util/data.c +3 -2
@@ -35,7 +35,7 @@ void perf_data__close_dir(struct perf_data *data)int perf_data__create_dir (struct perf_data *data,int nr) {struct perf_data_file *files =NULL ; -int i, ret =-1 ; +int i, ret;if (WARN_ON (!data->is_dir))return -EINVAL ;
@@ -51,7 +51,8 @@ int perf_data__create_dir(struct perf_data *data, int nr)for (i =0 ; i < nr; i++) {struct perf_data_file *file = &files[i]; -if (asprintf (&file->path,"%s/data.%d" , data->path, i) <0 ) + ret =asprintf (&file->path,"%s/data.%d" , data->path, i); +if (ret <0 ) goto out_err; ret =open (file->path,O_RDWR |O_CREAT |O_TRUNC ,S_IRUSR |S_IWUSR );