Linux 4.9.142
Greg KH
maintainerI'm announcing the release of the 4.9.142 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/sysctl/fs.txt | 36 MAINTAINERS | 1 Makefile | 2 arch/arm64/Makefile | 2 arch/powerpc/include/asm/io.h | 20 arch/powerpc/kvm/trace.h | 8 arch/powerpc/kvm/trace_booke.h | 9 arch/powerpc/kvm/trace_hv.h | 9 arch/powerpc/kvm/trace_pr.h | 9 arch/powerpc/mm/numa.c | 2 arch/s390/mm/gmap.c | 2 arch/x86/events/intel/uncore_snb.c | 115 ++ drivers/block/floppy.c | 3 drivers/cpufreq/imx6q-cpufreq.c | 7 drivers/firmware/efi/arm-init.c | 4 drivers/firmware/efi/arm-runtime.c | 2 drivers/firmware/efi/memmap.c | 3 drivers/gpio/gpiolib.c | 5 drivers/gpu/drm/ast/ast_drv.c | 21 drivers/gpu/drm/ast/ast_mode.c | 3 drivers/infiniband/core/verbs.c | 4 drivers/infiniband/hw/hfi1/user_sdma.c | 106 +- drivers/input/joystick/xpad.c | 471 +++++++++--- drivers/net/can/dev.c | 48 - drivers/net/ethernet/broadcom/genet/bcmmii.c | 2 drivers/net/usb/lan78xx.c | 42 - drivers/net/wireless/ath/ath10k/mac.c | 6 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 12 drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 5 drivers/net/wireless/marvell/mwifiex/cfg80211.c | 10 drivers/net/wireless/marvell/mwifiex/pcie.c | 19 drivers/net/wireless/marvell/mwifiex/wmm.c | 12 drivers/net/wireless/st/cw1200/wsm.c | 16 drivers/nfc/nfcmrvl/uart.c | 5 drivers/of/base.c | 25 drivers/pinctrl/meson/pinctrl-meson.c | 2 drivers/rtc/rtc-pcf2127.c | 3 drivers/scsi/ufs/ufs.h | 3 drivers/scsi/ufs/ufshcd-pci.c | 2 drivers/scsi/ufs/ufshcd-pltfrm.c | 5 drivers/scsi/ufs/ufshcd.c | 75 + drivers/tty/n_tty.c | 20 drivers/tty/tty_buffer.c | 2 drivers/usb/core/hub.c | 4 drivers/usb/dwc3/core.c | 1 drivers/usb/host/xhci-hub.c | 66 + drivers/usb/host/xhci-ring.c | 2 drivers/usb/host/xhci.h | 2 fs/9p/vfs_dir.c | 11 fs/bfs/inode.c | 9 fs/gfs2/ops_fstype.c | 2 fs/namei.c | 53 + include/linux/can/dev.h | 1 include/linux/fs.h | 2 include/linux/integrity.h | 1 include/linux/of.h | 8 include/linux/pfn_t.h | 2 kernel/debug/kdb/kdb_io.c | 15 kernel/debug/kdb/kdb_private.h | 2 kernel/debug/kdb/kdb_support.c | 10 kernel/sched/core.c | 4 kernel/sysctl.c | 18 mm/shmem.c | 4 mm/slab.c | 4 mm/slab_common.c | 12 net/ieee802154/6lowpan/6lowpan_i.h | 4 net/ieee802154/6lowpan/reassembly.c | 14 net/llc/af_llc.c | 11 net/sctp/associola.c | 10 net/sunrpc/auth_generic.c | 8 security/integrity/evm/evm.h | 2 security/integrity/evm/evm_crypto.c | 87 +- security/integrity/evm/evm_main.c | 29 security/integrity/iint.c | 3 security/integrity/ima/ima_api.c | 67 + security/integrity/ima/ima_appraise.c | 31 security/integrity/ima/ima_crypto.c | 10 security/integrity/ima/ima_main.c | 77 + security/integrity/integrity.h | 18 security/selinux/ss/policydb.c | 2 tools/power/cpupower/bench/Makefile | 2 tools/power/cpupower/lib/cpufreq.c | 2 tools/power/cpupower/lib/cpuidle.c | 2 tools/power/cpupower/lib/cpupower.c | 4 tools/power/cpupower/lib/cpupower_intern.h | 2 86 files changed, 1317 insertions(+), 462 deletions(-)
Aaron Ma (2):
usb: xhci: fix timeout for transition from RExit to U0
usb: xhci: fix uninitialized completion when USB3 port got wrong status
Alex Estrin (1):
IB/core: Fix for core panic
Alexander Aring (1):
net: ieee802154: 6lowpan: fix frag reassembly
Amitkumar Karwar (3):
mwifiex: prevent register accesses after host is sleeping
mwifiex: report error to PCIe for suspend failure
mwifiex: Fix NULL pointer dereference in skb_dequeue()
Andrew Price (1):
gfs2: Don't leave s_fs_info pointing to freed memory in init_sbd
Andy Shevchenko (1):
usb: dwc3: core: Clean up ULPI device
Anson Huang (1):
cpufreq: imx6q: add return value check for voltage scale
Ard Biesheuvel (1):
efi/arm: Revert deferred unmap of early memmap mapping
Arvind Yadav (1):
Input: xpad - constify usb_device_id
Benjamin Valentin (5):
Input: xpad - sort supported devices by USB ID
Input: xpad - sync supported devices with xboxdrv
Input: xpad - add USB IDs for Mad Catz Brawlstick and Razer Sabertooth
Input: xpad - sync supported devices with 360Controller
Input: xpad - sync supported devices with XBCD
Cameron Gutman (8):
Input: xpad - add product ID for Xbox One S pad
Input: xpad - fix Xbox One rumble stopping after 2.5 secs
Input: xpad - don't depend on endpoint order
Input: xpad - fix stuck mode button on Xbox One S pad
Input: xpad - restore LED state after device resume
Input: xpad - support some quirky Xbox One pads
Input: xpad - fix PowerA init quirk for some gamepad models
Input: xpad - validate USB endpoint type during probe
Daniel Tobias (2):
Input: xpad - correctly sort vendor id's
Input: xpad - move reporting xbox one home button to common function
Dennis Wassenberg (1):
usb: core: Fix hub port connection events lost
Dmitry Kasatkin (1):
ima: re-introduce own integrity cache lock
Dmitry Vyukov (1):
mm: don't warn about large allocations for slab
Dominique Martinet (1):
v9fs_dir_readdir: fix double-free on p9stat_read error
Emmanuel Grumbach (2):
iwlwifi: mvm: support sta_statistics() even on older firmware
iwlwifi: mvm: fix regulatory domain update when the firmware starts
Enno Boland (1):
Input: xpad - fix GPD Win 2 controller name
Eric Dumazet (1):
llc: do not use sk_eat_skb()
Eric W. Biederman (1):
Revert "evm: Translate user/group ids relative to s_user_ns when computing HMAC"
Ethan Lee (1):
Input: xpad - add GPD Win 2 Controller USB IDs
Francis Therien (1):
Input: xpad - add PDP device id 0x02a4
Greg Hackmann (1):
arm64: remove no-op -p linker flag
Greg Kroah-Hartman (3):
MAINTAINERS: Add Sasha as a stable branch maintainer
tty: wipe buffer if not echoing data
Linux 4.9.142
Janosch Frank (1):
s390/mm: Check for valid vma before zapping in gmap_discard
Jens Axboe (1):
floppy: fix race condition in __floppy_read_block_0()
Jerome Brunet (1):
pinctrl: meson: fix pinconf bias disable
Johan Hovold (3):
of: add helper to lookup compatible child node
NFC: nfcmrvl_uart: fix OF child-node lookup
net: bcmgenet: fix OF child-node lookup
Johannes Thumshirn (1):
cw1200: Don't leak memory if krealloc failes
Kan Liang (1):
perf/x86/intel/uncore: Add more IMC PCI IDs for KabyLake and CoffeeLake CPUs
Karthik D A (1):
mwifiex: fix p2p device doesn't find in scan problem
Konstantin Khlebnikov (1):
tools/power/cpupower: fix compilation with STATIC=true
Leo Sperling (1):
Input: xpad - fix some coding style issues
Linus Torvalds (1):
tty: wipe buffer.
Marc Kleine-Budde (4):
can: dev: can_get_echo_skb(): factor out non sending code to __can_get_echo_skb()
can: dev: __can_get_echo_skb(): replace struct can_frame by canfd_frame to access frame length
can: dev: __can_get_echo_skb(): Don't crash the kernel if can_priv::echo_skb is accessed out of bounds
can: dev: __can_get_echo_skb(): print error message, if trying to echo non existing skb
Marcus Folkesson (1):
Input: xpad - avoid using __set_bit() for capabilities
Mark Furneaux (1):
Input: xpad - add support for PDP Xbox One controllers
Mathias Nyman (1):
usb: xhci: Prevent bus suspend if a port connect change or polling state is detected
Matthew Garrett (1):
EVM: Add support for portable signature format
Michael Ellerman (1):
powerpc/io: Fix the IO workarounds code to work with Radix
Michael J. Ruhl (1):
IB/hfi1: Eliminate races in the SDMA send error path
Mimi Zohar (2):
ima: always measure and audit files in policy
ima: re-initialize iint->atomic_flags
Pavel Rojtberg (1):
Input: xpad - simplify error condition in init_output
Phil Elwell (1):
lan78xx: Read MAC address from DT if present
Prarit Bhargava (1):
kdb: Use strscpy with destination buffer size
Rafał Miłecki (1):
brcmfmac: fix reporting support for 160 MHz channels
Ramses Ramírez (1):
Input: xpad - add support for Xbox1 PDP Camo series gamepad
Salvatore Mesoraca (1):
namei: allow restricted O_CREAT of FIFOs and regular files
Satheesh Rajendran (1):
powerpc/numa: Suppress "VPHN is not supported" messages
Scott Wood (1):
KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE
Sebastien Boisvert (1):
include/linux/pfn_t.h: force '~' to be parsed as an unary operator
Steven Rostedt (VMware) (1):
sched/core: Allow __sched_setscheduler() in interrupts when PI is not used
Subhash Jadavani (2):
scsi: ufs: fix race between clock gating and devfreq scaling work
scsi: ufshcd: release resources if probe fails
Tetsuo Handa (2):
selinux: Add __GFP_NOWARN to allocation at str_read()
bfs: add sanity check at bfs_fill_super()
Thomas Zimmermann (1):
drm/ast: Remove existing framebuffers before loading driver
Trond Myklebust (1):
SUNRPC: Fix a bogus get/put in generic_key_to_expire()
Vasanthakumar Thiagarajan (1):
ath10k: fix kernel panic due to race in accessing arvif list
Venkat Gopalakrishnan (1):
scsi: ufshcd: Fix race between clk scaling and ungate work
Vladimir Zapolskiy (1):
gpio: don't free unallocated ida on gpiochip_add_data_with_key() error path
Xin Long (1):
sctp: clear the transport of some out_chunk_list chunks in sctp_assoc_rm_peer
Xulin Sun (1):
rtc: pcf2127: fix a kmemleak caused in pcf2127_i2c_gather_write
Y.C. Chen (2):
drm/ast: change resolution may cause screen blurred drm/ast: fixed cursor may disappear sometimes
Yaniv Gardi (1):
scsi: ufs: fix bugs related to null pointer access and array size
Yufen Yu (1):
tmpfs: make lseek(SEEK_DATA/SEK_HOLE) return ENXIO with a negative offset
Greg KH
maintainerDocumentation/sysctl/fs.txt +36 -0
@@ -34,7 +34,9 @@ Currently, these files are in /proc/sys/fs: - overflowgid - pipe-user-pages-hard - pipe-user-pages-soft +- protected_fifos - protected_hardlinks +- protected_regular - protected_symlinks - suid_dumpable - super-max
@@ -182,6 +184,24 @@ applied. ============================================================== +protected_fifos: + +The intent of this protection is to avoid unintentional writes to +an attacker-controlled FIFO, where a program expected to create a regular +file. + +When set to "0", writing to FIFOs is unrestricted. + +When set to "1" don't allow O_CREAT open on FIFOs that we don't own +in world writable sticky directories, unless they are owned by the +owner of the directory. + +When set to "2" it also applies to group writable sticky directories. + +This protection is based on the restrictions in Openwall. + +============================================================== + protected_hardlinks: A long-standing class of security issues is the hardlink-based
@@ -202,6 +222,22 @@ This protection is based on the restrictions in Openwall and grsecurity. ============================================================== +protected_regular: + +This protection is similar to protected_fifos, but it +avoids writes to an attacker-controlled regular file, where a program +expected to create one. + +When set to "0", writing to regular files is unrestricted. + +When set to "1" don't allow O_CREAT open on regular files that we +don't own in world writable sticky directories, unless they are +owned by the owner of the directory. + +When set to "2" it also applies to group writable sticky directories. + +============================================================== + protected_symlinks: A long-standing class of security issues is the symlink-based
MAINTAINERS +1 -0
@@ -11469,6 +11469,7 @@ F: arch/alpha/kernel/srm_env.c STABLE BRANCH M: Greg Kroah-Hartman <[email protected]> +M: Sasha Levin <[email protected]> L: [email protected] S: Supported F: Documentation/stable_kernel_rules.txt
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 141 +SUBLEVEL = 142 EXTRAVERSION = NAME = Roaring Lionus
arch/arm64/Makefile +1 -1
@@ -10,7 +10,7 @@ # # Copyright (C) 1995-2001 by Russell King -LDFLAGS_vmlinux :=-p --no-undefined -X +LDFLAGS_vmlinux :=--no-undefined -X CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET) GZFLAGS :=-9
arch/powerpc/include/asm/io.h +7 -13
@@ -333,19 +333,13 @@ extern void _memcpy_toio(volatile void __iomem *dest, const void *src,* their hooks, a bitfield is reserved for use by the platform near the * top of MMIO addresses (not PIO, those have to cope the hard way). * -* This bit field is 12 bits and is at the top of the IO virtual -* addresses PCI_IO_INDIRECT_TOKEN_MASK. +* The highest address in the kernel virtual space are: * -* The kernel virtual space is thus: +* d0003fffffffffff # with Hash MMU +* c00fffffffffffff # with Radix MMU * -* 0xD000000000000000 : vmalloc -* 0xD000080000000000 : PCI PHB IO space -* 0xD000080080000000 : ioremap -* 0xD0000fffffffffff : end of ioremap region -* -* Since the top 4 bits are reserved as the region ID, we use thus -* the next 12 bits and keep 4 bits available for the future if the -* virtual address space is ever to be extended. +* The top 4 bits are reserved as the region ID on hash, leaving us 8 bits +* that can be used for the field. * * The direct IO mapping operations will then mask off those bits * before doing the actual access, though that only happen when
@@ -357,8 +351,8 @@ extern void _memcpy_toio(volatile void __iomem *dest, const void *src,*/ #ifdef CONFIG_PPC_INDIRECT_MMIO -#define PCI_IO_IND_TOKEN_MASK 0x0fff000000000000ul -#define PCI_IO_IND_TOKEN_SHIFT 48 +#define PCI_IO_IND_TOKEN_SHIFT 52 +#define PCI_IO_IND_TOKEN_MASK (0xfful << PCI_IO_IND_TOKEN_SHIFT)#define PCI_FIX_ADDR (addr) \ ((PCI_IO_ADDR)(((unsigned long)(addr)) & ~PCI_IO_IND_TOKEN_MASK))#define PCI_GET_ADDR_TOKEN (addr) \
arch/powerpc/kvm/trace.h +6 -2
@@ -5,8 +5,6 @@#undef TRACE_SYSTEM#define TRACE_SYSTEM kvm -#define TRACE_INCLUDE_PATH . -#define TRACE_INCLUDE_FILE trace/* * Tracepoint for guest mode entry.
@@ -119,4 +117,10 @@ TRACE_EVENT(kvm_check_requests,#endif /* _TRACE_KVM_H */ /* This part must be outside protection */ +#undef TRACE_INCLUDE_PATH +#undef TRACE_INCLUDE_FILE + +#define TRACE_INCLUDE_PATH . +#define TRACE_INCLUDE_FILE trace +#include <trace/define_trace.h>
arch/powerpc/kvm/trace_booke.h +7 -2
@@ -5,8 +5,6 @@#undef TRACE_SYSTEM#define TRACE_SYSTEM kvm_booke -#define TRACE_INCLUDE_PATH . -#define TRACE_INCLUDE_FILE trace_booke#define kvm_trace_symbol_exit \ {0, "CRITICAL"}, \
@@ -217,4 +215,11 @@ TRACE_EVENT(kvm_booke_queue_irqprio,#endif /* This part must be outside protection */ + +#undef TRACE_INCLUDE_PATH +#undef TRACE_INCLUDE_FILE + +#define TRACE_INCLUDE_PATH . +#define TRACE_INCLUDE_FILE trace_booke +#include <trace/define_trace.h>
arch/powerpc/kvm/trace_hv.h +7 -2
@@ -8,8 +8,6 @@#undef TRACE_SYSTEM#define TRACE_SYSTEM kvm_hv -#define TRACE_INCLUDE_PATH . -#define TRACE_INCLUDE_FILE trace_hv#define kvm_trace_symbol_hcall \ {H_REMOVE, "H_REMOVE"}, \
@@ -496,4 +494,11 @@ TRACE_EVENT(kvmppc_run_vcpu_exit,#endif /* _TRACE_KVM_HV_H */ /* This part must be outside protection */ + +#undef TRACE_INCLUDE_PATH +#undef TRACE_INCLUDE_FILE + +#define TRACE_INCLUDE_PATH . +#define TRACE_INCLUDE_FILE trace_hv +#include <trace/define_trace.h>
arch/powerpc/kvm/trace_pr.h +7 -2
@@ -7,8 +7,6 @@#undef TRACE_SYSTEM#define TRACE_SYSTEM kvm_pr -#define TRACE_INCLUDE_PATH . -#define TRACE_INCLUDE_FILE trace_pr TRACE_EVENT(kvm_book3s_reenter, TP_PROTO(int r, struct kvm_vcpu *vcpu),
@@ -271,4 +269,11 @@ TRACE_EVENT(kvm_unmap_hva,#endif /* _TRACE_KVM_H */ /* This part must be outside protection */ + +#undef TRACE_INCLUDE_PATH +#undef TRACE_INCLUDE_FILE + +#define TRACE_INCLUDE_PATH . +#define TRACE_INCLUDE_FILE trace_pr +#include <trace/define_trace.h>
arch/powerpc/mm/numa.c +1 -1
@@ -1289,7 +1289,7 @@ static long vphn_get_associativity(unsigned long cpu,switch (rc) {case H_FUNCTION : -printk (KERN_INFO +printk_once (KERN_INFO "VPHN is not supported. Disabling polling...\n" );stop_topology_update ();break ;
arch/s390/mm/gmap.c +2 -0
@@ -686,6 +686,8 @@ void gmap_discard(struct gmap *gmap, unsigned long from, unsigned long to) vmaddr |= gaddr & ~PMD_MASK ;/* Find vma in the parent mm */ vma =find_vma (gmap->mm, vmaddr); +if (!vma) +continue ; size =min (to - gaddr,PMD_SIZE - (gaddr & ~PMD_MASK ));zap_page_range (vma, vmaddr, size,NULL ); }
arch/x86/events/intel/uncore_snb.c +114 -1
133 lines not on this page · raw message
drivers/block/floppy.c +2 -1
@@ -3823,10 +3823,11 @@ static int __floppy_read_block_0(struct block_device *bdev, int drive) bio.bi_end_io = floppy_rb0_cb;bio_set_op_attrs (&bio,REQ_OP_READ ,0 ); +init_completion (&cbdata.complete); +submit_bio (&bio);process_fd_request (); -init_completion (&cbdata.complete);wait_for_completion (&cbdata.complete);__free_page (page);
drivers/cpufreq/imx6q-cpufreq.c +6 -1
@@ -130,8 +130,13 @@ static int imx6q_set_target(struct cpufreq_policy *policy, unsigned int index)/* Ensure the arm clock divider is what we expect */ ret =clk_set_rate (arm_clk, new_freq *1000 );if (ret) { +int ret1; +dev_err (cpu_dev,"failed to set clock rate: %d\n" , ret); -regulator_set_voltage_tol (arm_reg, volt_old,0 ); + ret1 =regulator_set_voltage_tol (arm_reg, volt_old,0 ); +if (ret1) +dev_warn (cpu_dev, +"failed to restore vddarm voltage: %d\n" , ret1);return ret; }
drivers/firmware/efi/arm-init.c +4 -0
@@ -256,6 +256,10 @@ void __init efi_init(void) (params.mmap & ~PAGE_MASK)));init_screen_info (); + +/* ARM does not permit early mappings to persist across paging_init() */ +if (IS_ENABLED (CONFIG_ARM )) +efi_memmap_unmap (); }static int __init register_gop_device (void )
drivers/firmware/efi/arm-runtime.c +1 -1
@@ -118,7 +118,7 @@ static int __init arm_enable_runtime_services(void) {u64 mapsize; -if (!efi_enabled (EFI_BOOT ) || !efi_enabled (EFI_MEMMAP )) { +if (!efi_enabled (EFI_BOOT )) {pr_info ("EFI services will not be available.\n" );return 0 ; }
drivers/firmware/efi/memmap.c +3 -0
@@ -117,6 +117,9 @@ int __init efi_memmap_init_early(struct efi_memory_map_data *data)void __init efi_memmap_unmap (void ) { +if (!efi_enabled (EFI_MEMMAP )) +return ; +if (!efi.memmap.late) {unsigned long size;
drivers/gpio/gpiolib.c +3 -2
@@ -1153,7 +1153,7 @@ int gpiochip_add_data(struct gpio_chip *chip, void *data) gdev->descs =kcalloc (chip->ngpio,sizeof (gdev->descs[0 ]),GFP_KERNEL );if (!gdev->descs) { status = -ENOMEM ; - goto err_free_gdev; + goto err_free_ida; }if (chip->ngpio ==0 ) {
@@ -1285,8 +1285,9 @@ int gpiochip_add_data(struct gpio_chip *chip, void *data)kfree (gdev->label); err_free_descs:kfree (gdev->descs); -err_free_gdev: +err_free_ida:ida_simple_remove (&gpio_ida, gdev->id); +err_free_gdev:/* failures here can mean systems won't boot... */ pr_err("%s: GPIOs %d..%d (%s) failed to register\n", __func__, gdev->base, gdev->base + gdev->ngpio - 1,
drivers/gpu/drm/ast/ast_drv.c +21 -0
@@ -60,8 +60,29 @@ static const struct pci_device_id pciidlist[] = {MODULE_DEVICE_TABLE (pci, pciidlist); +static void ast_kick_out_firmware_fb (struct pci_dev *pdev) +{ +struct apertures_struct *ap; +bool primary = false; + + ap =alloc_apertures (1 ); +if (!ap) +return ; + + ap->ranges[0 ].base =pci_resource_start (pdev,0 ); + ap->ranges[0 ].size =pci_resource_len (pdev,0 ); + +#ifdef CONFIG_X86 + primary = pdev->resource[PCI_ROM_RESOURCE ].flags &IORESOURCE_ROM_SHADOW ; +#endif +drm_fb_helper_remove_conflicting_framebuffers (ap,"astdrmfb" , primary); +kfree (ap); +} +static int ast_pci_probe (struct pci_dev *pdev,const struct pci_device_id *ent) { +ast_kick_out_firmware_fb (pdev); +return drm_get_pci_dev (pdev, ent, &driver); }
drivers/gpu/drm/ast/ast_mode.c +2 -1
@@ -545,6 +545,7 @@ static int ast_crtc_do_set_base(struct drm_crtc *crtc, }ast_bo_unreserve (bo); +ast_set_offset_reg (crtc);ast_set_start_address_crt1 (crtc, (u32 )gpu_addr);return 0 ;
@@ -1235,7 +1236,7 @@ static int ast_cursor_move(struct drm_crtc *crtc,ast_set_index_reg (ast,AST_IO_CRTC_PORT ,0xc7 , ((y >>8 ) &0x07 ));/* dummy write to fire HWC */ -ast_set_index_reg_mask (ast,AST_IO_CRTC_PORT ,0xCB ,0xFF ,0x00 ); +ast_show_cursor (crtc);return 0 ; }
drivers/infiniband/core/verbs.c +2 -2
@@ -1522,7 +1522,7 @@ static bool is_valid_mcast_lid(struct ib_qp *qp, u16 lid)*/ if (!ib_query_qp (qp, &attr,IB_QP_STATE |IB_QP_PORT , &init_attr)) {if (attr.qp_state >=IB_QPS_INIT ) { -if (qp->device->get_link_layer (qp->device, attr.port_num) != +if (rdma_port_get_link_layer (qp->device, attr.port_num) !=IB_LINK_LAYER_INFINIBAND )return true; goto lid_check;
@@ -1531,7 +1531,7 @@ static bool is_valid_mcast_lid(struct ib_qp *qp, u16 lid)/* Can't get a quick answer, iterate over all ports */ for (port =0 ; port < qp->device->phys_port_cnt; port++) -if (qp->device->get_link_layer (qp->device, port) != +if (rdma_port_get_link_layer (qp->device, port) !=IB_LINK_LAYER_INFINIBAND ) num_eth_ports++;
drivers/infiniband/hw/hfi1/user_sdma.c +45 -61
212 lines not on this page · raw message
drivers/input/joystick/xpad.c +372 -99
777 lines not on this page · raw message
drivers/net/can/dev.c +35 -13
63 lines not on this page · raw message
drivers/net/ethernet/broadcom/genet/bcmmii.c +1 -1
@@ -483,7 +483,7 @@ static int bcmgenet_mii_of_init(struct bcmgenet_priv *priv)if (!compat)return -ENOMEM ; - priv->mdio_dn =of_find_compatible_node (dn,NULL , compat); + priv->mdio_dn =of_get_compatible_child (dn, compat);kfree (compat);if (!priv->mdio_dn) {dev_err (kdev,"unable to find MDIO bus node\n" );
drivers/net/usb/lan78xx.c +20 -22
60 lines not on this page · raw message
drivers/net/wireless/ath/ath10k/mac.c +6 -0
@@ -4967,7 +4967,9 @@ static int ath10k_add_interface(struct ieee80211_hw *hw, } ar->free_vdev_map &= ~(1LL << arvif->vdev_id); +spin_lock_bh (&ar->data_lock);list_add (&arvif->list, &ar->arvifs); +spin_unlock_bh (&ar->data_lock);/* It makes no sense to have firmware do keepalives. mac80211 already * takes care of this with idle connection polling.
@@ -5118,7 +5120,9 @@ static int ath10k_add_interface(struct ieee80211_hw *hw, err_vdev_delete:ath10k_wmi_vdev_delete (ar, arvif->vdev_id); ar->free_vdev_map |=1LL << arvif->vdev_id; +spin_lock_bh (&ar->data_lock);list_del (&arvif->list); +spin_unlock_bh (&ar->data_lock); err:if (arvif->beacon_buf) {
@@ -5164,7 +5168,9 @@ static void ath10k_remove_interface(struct ieee80211_hw *hw, arvif->vdev_id, ret); ar->free_vdev_map |=1LL << arvif->vdev_id; +spin_lock_bh (&ar->data_lock);list_del (&arvif->list); +spin_unlock_bh (&ar->data_lock);if (arvif->vdev_type ==WMI_VDEV_TYPE_AP || arvif->vdev_type ==WMI_VDEV_TYPE_IBSS ) {
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +2 -1
@@ -5990,7 +5990,8 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg,* for subsequent chanspecs. */ channel->flags =IEEE80211_CHAN_NO_HT40 | -IEEE80211_CHAN_NO_80MHZ ; +IEEE80211_CHAN_NO_80MHZ | +IEEE80211_CHAN_NO_160MHZ ; ch.bw =BRCMU_CHAN_BW_20 ; cfg->d11inf.encchspec (&ch); chaninfo = ch.chspec;
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +6 -6
@@ -327,8 +327,12 @@ struct ieee80211_regdomain *iwl_mvm_get_regdomain(struct wiphy *wiphy, goto out; } -if (changed) - *changed = (resp->status ==MCC_RESP_NEW_CHAN_PROFILE ); +if (changed) { +u32 status =le32_to_cpu (resp->status); + + *changed = (status ==MCC_RESP_NEW_CHAN_PROFILE || + status ==MCC_RESP_ILLEGAL ); + } regd = iwl_parse_nvm_mcc_info(mvm->trans->dev, mvm->cfg, __le32_to_cpu(resp->n_channels),
@@ -3976,10 +3980,6 @@ static void iwl_mvm_mac_sta_statistics(struct ieee80211_hw *hw, sinfo->filled |=BIT (NL80211_STA_INFO_SIGNAL_AVG ); } -if (!fw_has_capa (&mvm->fw->ucode_capa, -IWL_UCODE_TLV_CAPA_RADIO_BEACON_STATS )) -return ; -/* if beacon filtering isn't on mac80211 does it anyway */ if (!(vif->driver_flags &IEEE80211_VIF_BEACON_FILTER ))return ;
drivers/net/wireless/intel/iwlwifi/mvm/nvm.c +2 -3
@@ -739,9 +739,8 @@ iwl_mvm_update_mcc(struct iwl_mvm *mvm, const char *alpha2, }IWL_DEBUG_LAR (mvm, -"MCC response status: 0x%x. new MCC: 0x%x ('%c%c') change: %d n_chans: %d\n" , - status, mcc, mcc >>8 , mcc &0xff , - !!(status ==MCC_RESP_NEW_CHAN_PROFILE ), n_channels); +"MCC response status: 0x%x. new MCC: 0x%x ('%c%c') n_chans: %d\n" , + status, mcc, mcc >>8 , mcc &0xff , n_channels); exit:iwl_free_resp (&cmd);
drivers/net/wireless/marvell/mwifiex/cfg80211.c +9 -1
@@ -1209,6 +1209,12 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, priv->adapter->curr_iface_comb.p2p_intf--; priv->adapter->curr_iface_comb.sta_intf++; dev->ieee80211_ptr->iftype = type; +if (mwifiex_deinit_priv_params (priv)) +return -1 ; +if (mwifiex_init_new_priv_params (priv, dev, type)) +return -1 ; +if (mwifiex_sta_init_cmd (priv, false, false)) +return -1 ;break ;case NL80211_IFTYPE_ADHOC :if (mwifiex_cfg80211_deinit_p2p (priv))
@@ -3079,8 +3085,10 @@ int mwifiex_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev)mwifiex_stop_net_dev_queue (priv->netdev, adapter); - skb_queue_walk_safe(&priv->bypass_txq, skb, tmp) + skb_queue_walk_safe(&priv->bypass_txq, skb, tmp) { +skb_unlink (skb, &priv->bypass_txq);mwifiex_write_data_complete (priv->adapter, skb,0 ,-1 ); + }if (netif_carrier_ok (priv->netdev))netif_carrier_off (priv->netdev);
drivers/net/wireless/marvell/mwifiex/pcie.c +14 -5
@@ -101,7 +101,6 @@ static int mwifiex_pcie_suspend(struct device *dev) {struct mwifiex_adapter *adapter;struct pcie_service_card *card; -int hs_actived;struct pci_dev *pdev =to_pci_dev (dev);if (pdev) {
@@ -117,7 +116,15 @@ static int mwifiex_pcie_suspend(struct device *dev) adapter = card->adapter; - hs_actived =mwifiex_enable_hs (adapter); +/* Enable the Host Sleep */ +if (!mwifiex_enable_hs (adapter)) { +mwifiex_dbg (adapter,ERROR , +"cmd: failed to suspend\n" ); + adapter->hs_enabling = false; +return -EFAULT ; + } + +flush_workqueue (adapter->workqueue);/* Indicate device suspended */ adapter->is_suspended = true;
@@ -1676,9 +1683,6 @@ static int mwifiex_pcie_process_cmd_complete(struct mwifiex_adapter *adapter)if (!adapter->curr_cmd) {if (adapter->ps_state ==PS_STATE_SLEEP_CFM ) { -mwifiex_process_sleep_confirm_resp (adapter, skb->data, - skb->len); -mwifiex_pcie_enable_host_int (adapter);if (mwifiex_write_reg (adapter,PCIE_CPU_INT_EVENT ,CPU_INTR_SLEEP_CFM_DONE )) {
@@ -1691,6 +1695,9 @@ static int mwifiex_pcie_process_cmd_complete(struct mwifiex_adapter *adapter)while (reg->sleep_cookie && (count++ <10 ) &&mwifiex_pcie_ok_to_access_hw (adapter))usleep_range (50 ,60 ); +mwifiex_pcie_enable_host_int (adapter); +mwifiex_process_sleep_confirm_resp (adapter, skb->data, + skb->len); }else {mwifiex_dbg (adapter,ERROR ,"There is no command but got cmdrsp\n" );
@@ -2329,6 +2336,8 @@ static int mwifiex_process_pcie_int(struct mwifiex_adapter *adapter) ret =mwifiex_pcie_process_cmd_complete (adapter);if (ret)return ret; +if (adapter->hs_activated) +return ret; }if (card->msi_enable) {
drivers/net/wireless/marvell/mwifiex/wmm.c +9 -3
@@ -503,8 +503,10 @@ mwifiex_wmm_del_pkts_in_ralist_node(struct mwifiex_private *priv,struct mwifiex_adapter *adapter = priv->adapter;struct sk_buff *skb, *tmp; - skb_queue_walk_safe(&ra_list->skb_head, skb, tmp) + skb_queue_walk_safe(&ra_list->skb_head, skb, tmp) { +skb_unlink (skb, &ra_list->skb_head);mwifiex_write_data_complete (adapter, skb,0 ,-1 ); + } }/*
@@ -600,11 +602,15 @@ mwifiex_clean_txrx(struct mwifiex_private *priv) priv->adapter->if_ops.clean_pcie_ring (priv->adapter);spin_unlock_irqrestore (&priv->wmm.ra_list_spinlock, flags); - skb_queue_walk_safe(&priv->tdls_txq, skb, tmp) + skb_queue_walk_safe(&priv->tdls_txq, skb, tmp) { +skb_unlink (skb, &priv->tdls_txq);mwifiex_write_data_complete (priv->adapter, skb,0 ,-1 ); + } - skb_queue_walk_safe(&priv->bypass_txq, skb, tmp) + skb_queue_walk_safe(&priv->bypass_txq, skb, tmp) { +skb_unlink (skb, &priv->bypass_txq);mwifiex_write_data_complete (priv->adapter, skb,0 ,-1 ); + }atomic_set (&priv->adapter->bypass_tx_pending,0 );idr_for_each (&priv->ack_status_frames, mwifiex_free_ack_frame,NULL );
drivers/net/wireless/st/cw1200/wsm.c +9 -7
@@ -1805,16 +1805,18 @@ static int wsm_buf_reserve(struct wsm_buf *buf, size_t extra_size) {size_t pos = buf->data - buf->begin;size_t size = pos + extra_size; +u8 *tmp; size =round_up (size,FWLOAD_BLOCK_SIZE ); - buf->begin =krealloc (buf->begin, size,GFP_KERNEL |GFP_DMA ); -if (buf->begin) { - buf->data = &buf->begin[pos]; - buf->end = &buf->begin[size]; -return 0 ; - }else { - buf->end = buf->data = buf->begin; + tmp =krealloc (buf->begin, size,GFP_KERNEL |GFP_DMA ); +if (!tmp) { +wsm_buf_deinit (buf);return -ENOMEM ; } + + buf->begin = tmp; + buf->data = &buf->begin[pos]; + buf->end = &buf->begin[size]; +return 0 ; }
drivers/nfc/nfcmrvl/uart.c +2 -3
@@ -73,10 +73,9 @@ static int nfcmrvl_uart_parse_dt(struct device_node *node,struct device_node *matched_node;int ret; - matched_node =of_find_compatible_node (node,NULL ,"marvell,nfc-uart" ); + matched_node =of_get_compatible_child (node,"marvell,nfc-uart" );if (!matched_node) { - matched_node =of_find_compatible_node (node,NULL , -"mrvl,nfc-uart" ); + matched_node =of_get_compatible_child (node,"mrvl,nfc-uart" );if (!matched_node)return -ENODEV ; }
drivers/of/base.c +25 -0
@@ -738,6 +738,31 @@ struct device_node *of_get_next_available_child(const struct device_node *node, }EXPORT_SYMBOL (of_get_next_available_child); +/** +* of_get_compatible_child - Find compatible child node +* @parent: parent node +* @compatible: compatible string +* +* Lookup child node whose compatible property contains the given compatible +* string. +* +* Returns a node pointer with refcount incremented, use of_node_put() on it +* when done; or NULL if not found. +*/ +struct device_node *of_get_compatible_child (const struct device_node *parent, +const char *compatible) +{ +struct device_node *child; + +for_each_child_of_node (parent, child) { +if (of_device_is_compatible (child, compatible)) +break ; + } + +return child; +} +EXPORT_SYMBOL (of_get_compatible_child); +/** * of_get_child_by_name - Find the child node by name for a given parent * @node: parent node
drivers/pinctrl/meson/pinctrl-meson.c +1 -1
@@ -275,7 +275,7 @@ static int meson_pinconf_set(struct pinctrl_dev *pcdev, unsigned int pin,dev_dbg (pc->dev,"pin %u: disable bias\n" , pin);meson_calc_reg_and_bit (bank, pin,REG_PULL , ®, &bit); - ret =regmap_update_bits (pc->reg_pull, reg, + ret =regmap_update_bits (pc->reg_pullen, reg,BIT (bit),0 );if (ret)return ret;
drivers/rtc/rtc-pcf2127.c +3 -0
@@ -237,6 +237,9 @@ static int pcf2127_i2c_gather_write(void *context,memcpy (buf +1 , val, val_size); ret =i2c_master_send (client, buf, val_size +1 ); + +kfree (buf); +if (ret != val_size +1 )return ret <0 ? ret : -EIO ;
drivers/scsi/ufs/ufs.h +2 -1
@@ -46,6 +46,7 @@#define QUERY_DESC_HDR_SIZE 2#define QUERY_OSF_SIZE (GENERAL_UPIU_REQUEST_SIZE - \ (sizeof(struct utp_upiu_header))) +#define RESPONSE_UPIU_SENSE_DATA_LENGTH 18#define UPIU_HEADER_DWORD (byte3, byte2, byte1, byte0)\ cpu_to_be32((byte3 << 24) | (byte2 << 16) |\
@@ -410,7 +411,7 @@ struct utp_cmd_rsp {__be32 residual_transfer_count;__be32 reserved[4 ];__be16 sense_data_len; -u8 sense_data[18 ]; +u8 sense_data[RESPONSE_UPIU_SENSE_DATA_LENGTH ]; };/**
drivers/scsi/ufs/ufshcd-pci.c +2 -0
@@ -104,6 +104,7 @@ static void ufshcd_pci_remove(struct pci_dev *pdev)pm_runtime_forbid (&pdev->dev);pm_runtime_get_noresume (&pdev->dev);ufshcd_remove (hba); +ufshcd_dealloc_host (hba); }/**
@@ -147,6 +148,7 @@ ufshcd_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) err =ufshcd_init (hba, mmio_base, pdev->irq);if (err) {dev_err (&pdev->dev,"Initialization failed\n" ); +ufshcd_dealloc_host (hba);return err; }
drivers/scsi/ufs/ufshcd-pltfrm.c +1 -4
@@ -163,7 +163,7 @@ static int ufshcd_populate_vreg(struct device *dev, const char *name,if (ret) {dev_err (dev,"%s: unable to find %s err %d\n" , __func__, prop_name, ret); - goto out_free; + goto out; } vreg->min_uA =0 ;
@@ -185,9 +185,6 @@ static int ufshcd_populate_vreg(struct device *dev, const char *name, goto out; -out_free: -devm_kfree (dev, vreg); - vreg =NULL ; out:if (!ret) *out_vreg = vreg;
drivers/scsi/ufs/ufshcd.c +66 -9
136 lines not on this page · raw message
drivers/tty/n_tty.c +17 -3
@@ -154,17 +154,28 @@ static inline unsigned char *echo_buf_addr(struct n_tty_data *ldata, size_t i)return &ldata->echo_buf[i & (N_TTY_BUF_SIZE -1 )]; } +/* If we are not echoing the data, perhaps this is a secret so erase it */ +static void zero_buffer (struct tty_struct *tty,u8 *buffer,int size) +{ +bool icanon = !!L_ICANON (tty); +bool no_echo = !L_ECHO (tty); + +if (icanon && no_echo) +memset (buffer,0x00 , size); +} +static int tty_copy_to_user (struct tty_struct *tty,void __user *to,size_t tail,size_t n) {struct n_tty_data *ldata = tty->disc_data;size_t size =N_TTY_BUF_SIZE - tail; -const void *from =read_buf_addr (ldata, tail); +void *from =read_buf_addr (ldata, tail);int uncopied;if (n > size) {tty_audit_add_data (tty, from, size); uncopied =copy_to_user (to, from, size); +zero_buffer (tty, from, size - uncopied);if (uncopied)return uncopied; to += size;
@@ -173,7 +184,9 @@ static int tty_copy_to_user(struct tty_struct *tty, void __user *to, }tty_audit_add_data (tty, from, n); -return copy_to_user (to, from, n); + uncopied =copy_to_user (to, from, n); +zero_buffer (tty, from, n - uncopied); +return uncopied; }/**
@@ -1962,11 +1975,12 @@ static int copy_from_read_buf(struct tty_struct *tty, n =min (head - ldata->read_tail,N_TTY_BUF_SIZE - tail); n =min (*nr, n);if (n) { -const unsigned char *from =read_buf_addr (ldata, tail); +unsigned char *from =read_buf_addr (ldata, tail); retval =copy_to_user (*b, from, n); n -= retval; is_eof = n ==1 && *from ==EOF_CHAR (tty);tty_audit_add_data (tty, from, n); +zero_buffer (tty, from, n);smp_store_release (&ldata->read_tail, ldata->read_tail + n);/* Turn single EOF into zero-length read */ if (L_EXTPROC(tty) && ldata->icanon && is_eof &&
drivers/tty/tty_buffer.c +2 -0
@@ -458,6 +458,8 @@ int tty_ldisc_receive_buf(struct tty_ldisc *ld, unsigned char *p,if (count && ld->ops->receive_buf) ld->ops->receive_buf (ld->tty, p, f, count); } +if (count >0 ) +memset (p,0 , count);return count; }EXPORT_SYMBOL_GPL (tty_ldisc_receive_buf);
drivers/usb/core/hub.c +3 -1
@@ -2809,7 +2809,9 @@ static int hub_port_reset(struct usb_hub *hub, int port1, USB_PORT_FEAT_C_BH_PORT_RESET);usb_clear_port_feature (hub->hdev, port1,USB_PORT_FEAT_C_PORT_LINK_STATE ); -usb_clear_port_feature (hub->hdev, port1, + +if (udev) +usb_clear_port_feature (hub->hdev, port1,USB_PORT_FEAT_C_CONNECTION );/*
drivers/usb/dwc3/core.c +1 -0
@@ -1145,6 +1145,7 @@ static int dwc3_probe(struct platform_device *pdev) err5:dwc3_event_buffers_cleanup (dwc); +dwc3_ulpi_exit (dwc); err4:dwc3_free_scratch_buffers (dwc);
drivers/usb/host/xhci-hub.c +49 -17
123 lines not on this page · raw message
drivers/usb/host/xhci-ring.c +1 -1
@@ -1676,7 +1676,7 @@ static void handle_port_status(struct xhci_hcd *xhci,* RExit to a disconnect state). If so, let the the driver know it's * out of the RExit state. */ -if (!DEV_SUPERSPEED_ANY (temp) && +if (!DEV_SUPERSPEED_ANY (temp) && hcd->speed <HCD_USB3 &&test_and_clear_bit (faked_port_index, &bus_state->rexit_ports)) {complete (&bus_state->rexit_done[faked_port_index]);
drivers/usb/host/xhci.h +1 -1
@@ -1509,7 +1509,7 @@ struct xhci_bus_state {* It can take up to 20 ms to transition from RExit to U0 on the * Intel Lynx Point LP xHCI host. */ -#define XHCI_MAX_REXIT_TIMEOUT (20 * 1000) +#define XHCI_MAX_REXIT_TIMEOUT_MS 20static inline unsigned int hcd_index (struct usb_hcd *hcd) {
fs/9p/vfs_dir.c +0 -11
@@ -76,15 +76,6 @@ static inline int dt_type(struct p9_wstat *mistat)return rettype; } -static void p9stat_init (struct p9_wstat *stbuf) -{ - stbuf->name =NULL ; - stbuf->uid =NULL ; - stbuf->gid =NULL ; - stbuf->muid =NULL ; - stbuf->extension =NULL ; -} -/** * v9fs_alloc_rdir_buf - Allocate buffer used for read and readdir * @filp: opened file structure
@@ -145,12 +136,10 @@ static int v9fs_dir_readdir(struct file *file, struct dir_context *ctx) rdir->tail = n; }while (rdir->head < rdir->tail) { -p9stat_init (&st); err =p9stat_read (fid->clnt, rdir->buf + rdir->head, rdir->tail - rdir->head, &st);if (err) {p9_debug (P9_DEBUG_VFS ,"returned %d\n" , err); -p9stat_free (&st);return -EIO ; } reclen = st.size+2 ;
fs/bfs/inode.c +6 -3
@@ -350,7 +350,8 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent) s->s_magic =BFS_MAGIC ; -if (le32_to_cpu (bfs_sb->s_start) >le32_to_cpu (bfs_sb->s_end)) { +if (le32_to_cpu (bfs_sb->s_start) >le32_to_cpu (bfs_sb->s_end) || +le32_to_cpu (bfs_sb->s_start) <BFS_BSIZE ) {printf ("Superblock is corrupted\n" ); goto out1; }
@@ -359,9 +360,11 @@ static int bfs_fill_super(struct super_block *s, void *data, int silent)sizeof (struct bfs_inode ) +BFS_ROOT_INO -1 ; imap_len = (info->si_lasti /8 ) +1 ; - info->si_imap =kzalloc (imap_len,GFP_KERNEL ); -if (!info->si_imap) + info->si_imap =kzalloc (imap_len,GFP_KERNEL | __GFP_NOWARN); +if (!info->si_imap) { +printf ("Cannot allocate %u bytes\n" , imap_len); goto out1; + }for (i =0 ; i <BFS_ROOT_INO ; i++)set_bit (i, info->si_imap);
fs/gfs2/ops_fstype.c +1 -1
@@ -71,13 +71,13 @@ static struct gfs2_sbd *init_sbd(struct super_block *sb)if (!sdp)return NULL ; - sb->s_fs_info = sdp; sdp->sd_vfs = sb; sdp->sd_lkstats = alloc_percpu(struct gfs2_pcpu_lkstats);if (!sdp->sd_lkstats) {kfree (sdp);return NULL ; } + sb->s_fs_info = sdp;set_bit (SDF_NOJOURNALID , &sdp->sd_flags);gfs2_tune_init (&sdp->sd_tune);
fs/namei.c +50 -3
71 lines not on this page · raw message
include/linux/can/dev.h +1 -0
@@ -154,6 +154,7 @@ void can_change_state(struct net_device *dev, struct can_frame *cf,void can_put_echo_skb (struct sk_buff *skb,struct net_device *dev,unsigned int idx); +struct sk_buff *__can_get_echo_skb (struct net_device *dev,unsigned int idx,u8 *len_ptr);unsigned int can_get_echo_skb (struct net_device *dev,unsigned int idx);void can_free_echo_skb (struct net_device *dev,unsigned int idx);
include/linux/fs.h +2 -0
@@ -69,6 +69,8 @@ extern struct inodes_stat_t inodes_stat;extern int leases_enable, lease_break_time;extern int sysctl_protected_symlinks;extern int sysctl_protected_hardlinks; +extern int sysctl_protected_fifos; +extern int sysctl_protected_regular;struct buffer_head ; typedef int (get_block_t)(struct inode *inode, sector_t iblock,
include/linux/integrity.h +1 -0
@@ -14,6 +14,7 @@enum integrity_status {INTEGRITY_PASS =0 , +INTEGRITY_PASS_IMMUTABLE ,INTEGRITY_FAIL ,INTEGRITY_NOLABEL ,INTEGRITY_NOXATTRS ,
include/linux/of.h +8 -0
@@ -275,6 +275,8 @@ extern struct device_node *of_get_next_child(const struct device_node *node,extern struct device_node *of_get_next_available_child (const struct device_node *node,struct device_node *prev); +extern struct device_node *of_get_compatible_child (const struct device_node *parent, +const char *compatible);extern struct device_node *of_get_child_by_name (const struct device_node *node,const char *name);
@@ -606,6 +608,12 @@ static inline bool of_have_populated_dt(void)return false; } +static inline struct device_node *of_get_compatible_child (const struct device_node *parent, +const char *compatible) +{ +return NULL ; +} +static inline struct device_node *of_get_child_by_name (const struct device_node *node,const char *name)
include/linux/pfn_t.h +1 -1
@@ -9,7 +9,7 @@* PFN_DEV - pfn is not covered by system memmap by default * PFN_MAP - pfn has a dynamic page mapping established by a device driver */ -#define PFN_FLAGS_MASK (((u64) ~PAGE_MASK) << (BITS_PER_LONG_LONG - PAGE_SHIFT)) +#define PFN_FLAGS_MASK (((u64) (~PAGE_MASK)) << (BITS_PER_LONG_LONG - PAGE_SHIFT))#define PFN_SG_CHAIN (1ULL << (BITS_PER_LONG_LONG - 1))#define PFN_SG_LAST (1ULL << (BITS_PER_LONG_LONG - 2))#define PFN_DEV (1ULL << (BITS_PER_LONG_LONG - 3))
kernel/debug/kdb/kdb_io.c +9 -6
@@ -215,7 +215,7 @@ static char *kdb_read(char *buffer, size_t bufsize)int count;int i;int diag, dtab_count; -int key; +int key, buf_size, ret; diag =kdbgetintenv ("DTABCOUNT" , &dtab_count);
@@ -335,9 +335,8 @@ static char *kdb_read(char *buffer, size_t bufsize)else p_tmp = tmpbuffer; len =strlen (p_tmp); - count =kallsyms_symbol_complete (p_tmp, -sizeof (tmpbuffer) - - (p_tmp - tmpbuffer)); + buf_size =sizeof (tmpbuffer) - (p_tmp - tmpbuffer); + count =kallsyms_symbol_complete (p_tmp, buf_size);if (tab ==2 && count >0 ) {kdb_printf ("\n%d symbols are found." , count);if (count > dtab_count) {
@@ -349,9 +348,13 @@ static char *kdb_read(char *buffer, size_t bufsize) }kdb_printf ("\n" );for (i =0 ; i < count; i++) { -if (WARN_ON (!kallsyms_symbol_next (p_tmp, i))) + ret =kallsyms_symbol_next (p_tmp, i, buf_size); +if (WARN_ON (!ret))break ; -kdb_printf ("%s " , p_tmp); +if (ret != -E2BIG ) +kdb_printf ("%s " , p_tmp); +else +kdb_printf ("%s... " , p_tmp); *(p_tmp + len) ='\0' ; }if (i >= dtab_count)
kernel/debug/kdb/kdb_private.h +1 -1
@@ -83,7 +83,7 @@ typedef struct __ksymtab {unsigned long sym_start;unsigned long sym_end; } kdb_symtab_t; -extern int kallsyms_symbol_next (char *prefix_name,int flag); +extern int kallsyms_symbol_next (char *prefix_name,int flag,int buf_size);extern int kallsyms_symbol_complete (char *prefix_name,int max_len);/* Exported Symbols for kernel loadable modules to use. */
kernel/debug/kdb/kdb_support.c +5 -5
@@ -221,11 +221,13 @@ int kallsyms_symbol_complete(char *prefix_name, int max_len)* Parameters: * prefix_name prefix of a symbol name to lookup * flag 0 means search from the head, 1 means continue search. +* buf_size maximum length that can be written to prefix_name +* buffer * Returns: * 1 if a symbol matches the given prefix. * 0 if no string found */ -int kallsyms_symbol_next (char *prefix_name,int flag) +int kallsyms_symbol_next (char *prefix_name,int flag,int buf_size) {int prefix_len =strlen (prefix_name);static loff_t pos;
@@ -235,10 +237,8 @@ int kallsyms_symbol_next(char *prefix_name, int flag) pos =0 ;while ((name =kdb_walk_kallsyms (&pos))) { -if (strncmp (name, prefix_name, prefix_len) ==0 ) { -strncpy (prefix_name, name,strlen (name)+1 ); -return 1 ; - } +if (!strncmp (name, prefix_name, prefix_len)) +return strscpy (prefix_name, name, buf_size); }return 0 ; }
kernel/sched/core.c +2 -2
@@ -4087,8 +4087,8 @@ static int __sched_setscheduler(struct task_struct *p,int queue_flags =DEQUEUE_SAVE |DEQUEUE_MOVE ;struct rq *rq; -/* may grab non-irq protected spin_locks */ -BUG_ON (in_interrupt ()); +/* The pi code expects interrupts enabled */ +BUG_ON (pi &&in_interrupt ()); recheck:/* double check policy once rq lock held */ if (policy <0 ) {
kernel/sysctl.c +18 -0
@@ -1794,6 +1794,24 @@ static struct ctl_table fs_table[] = { .extra1 = &zero, .extra2 = &one, }, + { + .procname = "protected_fifos", + .data = &sysctl_protected_fifos, + .maxlen = sizeof(int), + .mode = 0600, + .proc_handler = proc_dointvec_minmax, + .extra1 = &zero, + .extra2 = &two, + }, + { + .procname = "protected_regular", + .data = &sysctl_protected_regular, + .maxlen = sizeof(int), + .mode = 0600, + .proc_handler = proc_dointvec_minmax, + .extra1 = &zero, + .extra2 = &two, + }, { .procname = "suid_dumpable", .data = &suid_dumpable,
mm/shmem.c +1 -3
@@ -2414,9 +2414,7 @@ static loff_t shmem_file_llseek(struct file *file, loff_t offset, int whence)inode_lock (inode);/* We're holding i_mutex so we can access i_size directly */ -if (offset <0 ) - offset = -EINVAL ; -else if (offset >= inode->i_size) +if (offset <0 || offset >= inode->i_size) offset = -ENXIO ;else { start = offset >>PAGE_SHIFT ;
mm/slab.c +4 -0
@@ -3690,6 +3690,8 @@ __do_kmalloc_node(size_t size, gfp_t flags, int node, unsigned long caller)struct kmem_cache *cachep;void *ret; +if (unlikely (size >KMALLOC_MAX_CACHE_SIZE )) +return NULL ; cachep =kmalloc_slab (size, flags);if (unlikely (ZERO_OR_NULL_PTR (cachep)))return cachep;
@@ -3725,6 +3727,8 @@ static __always_inline void *__do_kmalloc(size_t size, gfp_t flags,struct kmem_cache *cachep;void *ret; +if (unlikely (size >KMALLOC_MAX_CACHE_SIZE )) +return NULL ; cachep =kmalloc_slab (size, flags);if (unlikely (ZERO_OR_NULL_PTR (cachep)))return cachep;
mm/slab_common.c +6 -6
@@ -883,18 +883,18 @@ struct kmem_cache *kmalloc_slab(size_t size, gfp_t flags) {int index; -if (unlikely (size >KMALLOC_MAX_SIZE )) { -WARN_ON_ONCE (!(flags & __GFP_NOWARN)); -return NULL ; - } -if (size <=192 ) {if (!size)return ZERO_SIZE_PTR ; index = size_index[size_index_elem (size)]; - }else + }else { +if (unlikely (size >KMALLOC_MAX_CACHE_SIZE )) { +WARN_ON (1 ); +return NULL ; + } index =fls (size -1 ); + }#ifdef CONFIG_ZONE_DMA if (unlikely ((flags &GFP_DMA )))
net/ieee802154/6lowpan/6lowpan_i.h +2 -2
@@ -19,8 +19,8 @@ typedef unsigned __bitwise__ lowpan_rx_result;struct frag_lowpan_compare_key {u16 tag;u16 d_size; -const struct ieee802154_addr src; -const struct ieee802154_addr dst; +struct ieee802154_addr src; +struct ieee802154_addr dst; };/* Equivalent of ipv4 struct ipq
net/ieee802154/6lowpan/reassembly.c +7 -7
@@ -74,14 +74,14 @@ fq_find(struct net *net, const struct lowpan_802154_cb *cb, {struct netns_ieee802154_lowpan *ieee802154_lowpan =net_ieee802154_lowpan (net); -struct frag_lowpan_compare_key key = { - .tag = cb->d_tag, - .d_size = cb->d_size, - .src = *src, - .dst = *dst, - }; +struct frag_lowpan_compare_key key = {};struct inet_frag_queue *q; + key.tag = cb->d_tag; + key.d_size = cb->d_size; + key.src = *src; + key.dst = *dst; + q =inet_frag_find (&ieee802154_lowpan->frags, &key);if (!q)return NULL ;
@@ -371,7 +371,7 @@ int lowpan_frag_rcv(struct sk_buff *skb, u8 frag_type)struct lowpan_frag_queue *fq;struct net *net =dev_net (skb->dev);struct lowpan_802154_cb *cb =lowpan_802154_cb (skb); -struct ieee802154_hdr hdr; +struct ieee802154_hdr hdr = {};int err;if (ieee802154_hdr_peek_addrs (skb, &hdr) <0 )
net/llc/af_llc.c +4 -7
@@ -726,7 +726,6 @@ static int llc_ui_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,struct sk_buff *skb =NULL ;struct sock *sk = sock->sk;struct llc_sock *llc =llc_sk (sk); -unsigned long cpu_flags;size_t copied =0 ;u32 peek_seq =0 ;u32 *seq, skb_len;
@@ -851,9 +850,8 @@ static int llc_ui_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, goto copy_uaddr;if (!(flags &MSG_PEEK )) { -spin_lock_irqsave (&sk->sk_receive_queue.lock, cpu_flags); -sk_eat_skb (sk, skb); -spin_unlock_irqrestore (&sk->sk_receive_queue.lock, cpu_flags); +skb_unlink (skb, &sk->sk_receive_queue); +kfree_skb (skb); *seq =0 ; }
@@ -874,9 +872,8 @@ static int llc_ui_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,llc_cmsg_rcv (msg, skb);if (!(flags &MSG_PEEK )) { -spin_lock_irqsave (&sk->sk_receive_queue.lock, cpu_flags); -sk_eat_skb (sk, skb); -spin_unlock_irqrestore (&sk->sk_receive_queue.lock, cpu_flags); +skb_unlink (skb, &sk->sk_receive_queue); +kfree_skb (skb); *seq =0 ; }
net/sctp/associola.c +7 -3
@@ -488,8 +488,9 @@ void sctp_assoc_set_primary(struct sctp_association *asoc,void sctp_assoc_rm_peer (struct sctp_association *asoc,struct sctp_transport *peer) { -struct list_head *pos; -struct sctp_transport *transport; +struct sctp_transport *transport; +struct list_head *pos; +struct sctp_chunk *ch;pr_debug ("%s: association:%p addr:%pISpc\n" , __func__, asoc, &peer->ipaddr.sa);
@@ -547,7 +548,6 @@ void sctp_assoc_rm_peer(struct sctp_association *asoc,*/ if (!list_empty (&peer->transmitted)) {struct sctp_transport *active = asoc->peer.active_path; -struct sctp_chunk *ch;/* Reset the transport of each chunk on this list */ list_for_each_entry(ch, &peer->transmitted,
@@ -569,6 +569,10 @@ void sctp_assoc_rm_peer(struct sctp_association *asoc,sctp_transport_hold (active); } +list_for_each_entry (ch, &asoc->outqueue.out_chunk_list, list) +if (ch->transport == peer) + ch->transport =NULL ; + asoc->peer.transport_count--;sctp_transport_free (peer);
net/sunrpc/auth_generic.c +1 -7
@@ -281,13 +281,7 @@ static bool generic_key_to_expire(struct rpc_cred *cred) { struct auth_cred *acred = &container_of(cred, struct generic_cred, gc_base)->acred; -bool ret; - -get_rpccred (cred); - ret =test_bit (RPC_CRED_KEY_EXPIRE_SOON , &acred->ac_flags); -put_rpccred (cred); - -return ret; +return test_bit (RPC_CRED_KEY_EXPIRE_SOON , &acred->ac_flags); }static const struct rpc_credops generic_credops = {
security/integrity/evm/evm.h +1 -1
@@ -48,7 +48,7 @@ int evm_calc_hmac(struct dentry *dentry, const char *req_xattr_name, size_t req_xattr_value_len, char *digest);int evm_calc_hash (struct dentry *dentry,const char *req_xattr_name,const char *req_xattr_value, -size_t req_xattr_value_len,char *digest); +size_t req_xattr_value_len,char type,char *digest);int evm_init_hmac (struct inode *inode,const struct xattr *xattr,char *hmac_val);int evm_init_secfs (void );
security/integrity/evm/evm_crypto.c +76 -11
152 lines not on this page · raw message
security/integrity/evm/evm_main.c +19 -10
@@ -29,7 +29,7 @@int evm_initialized;static char *integrity_status_msg[] = { -"pass" ,"fail" ,"no_label" ,"no_xattrs" ,"unknown" +"pass" ,"pass_immutable" ,"fail" ,"no_label" ,"no_xattrs" ,"unknown" };char *evm_hmac ="hmac(sha1)" ;char *evm_hash ="sha1" ;
@@ -118,7 +118,8 @@ static enum integrity_status evm_verify_hmac(struct dentry *dentry,enum integrity_status evm_status =INTEGRITY_PASS ;int rc, xattr_len; -if (iint && iint->evm_status ==INTEGRITY_PASS ) +if (iint && (iint->evm_status ==INTEGRITY_PASS || + iint->evm_status ==INTEGRITY_PASS_IMMUTABLE ))return iint->evm_status;/* if status is not PASS, try to check again - against -ENOMEM */
@@ -155,22 +156,26 @@ static enum integrity_status evm_verify_hmac(struct dentry *dentry, rc = -EINVAL ;break ;case EVM_IMA_XATTR_DIGSIG : +case EVM_XATTR_PORTABLE_DIGSIG : rc =evm_calc_hash (dentry, xattr_name, xattr_value, - xattr_value_len, calc.digest); + xattr_value_len, xattr_data->type, + calc.digest);if (rc)break ; rc =integrity_digsig_verify (INTEGRITY_KEYRING_EVM , (const char *)xattr_data, xattr_len, calc.digest,sizeof (calc.digest));if (!rc) { -/* Replace RSA with HMAC if not mounted readonly and -* not immutable -*/ -if (!IS_RDONLY (d_backing_inode (dentry)) && - !IS_IMMUTABLE (d_backing_inode (dentry))) +if (xattr_data->type ==EVM_XATTR_PORTABLE_DIGSIG ) { +if (iint) + iint->flags |=EVM_IMMUTABLE_DIGSIG ; + evm_status =INTEGRITY_PASS_IMMUTABLE ; + }else if (!IS_RDONLY (d_backing_inode (dentry)) && + !IS_IMMUTABLE (d_backing_inode (dentry))) {evm_update_evmxattr (dentry, xattr_name, xattr_value, xattr_value_len); + } }break ;default :
@@ -271,7 +276,7 @@ static enum integrity_status evm_verify_current_integrity(struct dentry *dentry)* affect security.evm. An interesting side affect of writing posix xattr * acls is their modifying of the i_mode, which is included in security.evm. * For posix xattr acls only, permit security.evm, even if it currently -* doesn't exist, to be updated. +* doesn't exist, to be updated unless the EVM signature is immutable. */ static int evm_protect_xattr (struct dentry *dentry,const char *xattr_name,const void *xattr_value,size_t xattr_value_len)
@@ -339,7 +344,8 @@ int evm_inode_setxattr(struct dentry *dentry, const char *xattr_name,if (strcmp (xattr_name,XATTR_NAME_EVM ) ==0 ) {if (!xattr_value_len)return -EINVAL ; -if (xattr_data->type !=EVM_IMA_XATTR_DIGSIG ) +if (xattr_data->type !=EVM_IMA_XATTR_DIGSIG && + xattr_data->type !=EVM_XATTR_PORTABLE_DIGSIG )return -EPERM ; } return evm_protect_xattr(dentry, xattr_name, xattr_value,
@@ -416,6 +422,9 @@ void evm_inode_post_removexattr(struct dentry *dentry, const char *xattr_name)/** * evm_inode_setattr - prevent updating an invalid EVM extended attribute * @dentry: pointer to the affected dentry +* +* Permit update of file attributes when files have a valid EVM signature, +* except in the case of them having an immutable portable signature. */ int evm_inode_setattr (struct dentry *dentry,struct iattr *attr) {
security/integrity/iint.c +3 -0
@@ -74,6 +74,7 @@ static void iint_free(struct integrity_iint_cache *iint) iint->ima_hash =NULL ; iint->version =0 ; iint->flags =0UL ; + iint->atomic_flags =0UL ; iint->ima_file_status =INTEGRITY_UNKNOWN ; iint->ima_mmap_status =INTEGRITY_UNKNOWN ; iint->ima_bprm_status =INTEGRITY_UNKNOWN ;
@@ -155,12 +156,14 @@ static void init_once(void *foo)memset (iint,0 ,sizeof (*iint)); iint->version =0 ; iint->flags =0UL ; + iint->atomic_flags =0 ; iint->ima_file_status =INTEGRITY_UNKNOWN ; iint->ima_mmap_status =INTEGRITY_UNKNOWN ; iint->ima_bprm_status =INTEGRITY_UNKNOWN ; iint->ima_read_status =INTEGRITY_UNKNOWN ; iint->evm_status =INTEGRITY_UNKNOWN ; iint->measured_pcrs =0 ; +mutex_init (&iint->mutex); }static int __init integrity_iintcache_init (void )
security/integrity/ima/ima_api.c +42 -25
59 lines not on this page · raw message
security/integrity/ima/ima_appraise.c +17 -14
Lines of this file are not shown. View the raw message.
security/integrity/ima/ima_main.c +51 -26
77 lines not on this page · raw message
tools/power/cpupower/lib/cpupower_intern.h +1 -1
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.