aboutsummaryrefslogtreecommitdiff
path: root/Documentation/filesystems
Commit message (Collapse)AuthorAgeFilesLines
* Merge android-4.9-q (4.9.281) into android-msm-pixel-4.9-sc-ltsLucas Wei2021-09-141-0/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge 4.9.281 into android-4.9-q Linux 4.9.281 * fs: warn about impending deprecation of mandatory locks fs/namespace.c * locks: print a warning when mount fails due to lack of "mand" support fs/namespace.c ASoC: intel: atom: Fix breakage for PCM buffer address setup btrfs: prevent rename2 from exchanging a subvol with a directory from different parents ipack: tpci200: fix many double free issues in tpci200_pci_probe ALSA: hda - fix the 'Capture Switch' value change notifications mmc: dw_mmc: Fix hang on data CRC error mmc: dw_mmc: call the dw_mci_prep_stop_abort() by default net: qlcnic: add missed unlock in qlcnic_83xx_flash_read32 net: 6pack: fix slab-out-of-bounds in decode_data vhost: Fix the calculation in vhost_overflow() dccp: add do-while-0 stubs for dccp_pr_debug macros Bluetooth: hidp: use correct wait queue when removing ctrl_wait ARM: dts: nomadik: Fix up interrupt controller node names * scsi: core: Avoid printing an error if target_alloc() returns -ENXIO drivers/scsi/scsi_scan.c scsi: scsi_dh_rdac: Avoid crash during rdac_bus_attach() scsi: megaraid_mm: Fix end of loop tests for list_for_each_entry() * dmaengine: of-dma: router_xlate to return -EPROBE_DEFER if controller is not yet available drivers/dma/of-dma.c ARM: dts: am43x-epos-evm: Reduce i2c0 bus speed for tps65218 dmaengine: usb-dmac: Fix PM reference leak in usb_dmac_probe() x86/fpu: Make init_fpstate correct with optimized XSAVE KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) mac80211: drop data frames without key on encrypted links * vmlinux.lds.h: Handle clang's module.{c,d}tor sections include/asm-generic/vmlinux.lds.h * PCI/MSI: Enforce MSI[X] entry updates to be visible drivers/pci/msi.c * PCI/MSI: Enforce that MSI-X table entry is masked for update drivers/pci/msi.c * PCI/MSI: Mask all unused MSI-X entries drivers/pci/msi.c * PCI/MSI: Protect msi_desc::masked for multi-MSI drivers/base/core.c drivers/pci/msi.c include/linux/device.h include/linux/msi.h * PCI/MSI: Use msi_mask_irq() in pci_msi_shutdown() drivers/pci/msi.c * PCI/MSI: Correct misleading comments drivers/pci/msi.c * PCI/MSI: Do not set invalid bits in MSI mask drivers/pci/msi.c * PCI/MSI: Enable and mask MSI-X early drivers/pci/msi.c x86/tools: Fix objdump version check again xen/events: Fix race in set_evtchn_to_irq tcp_bbr: fix u32 wrap bug in round logic if bbr_init() called after 2B packets * net: bridge: fix memleak in br_add_if() net/bridge/br_if.c net: Fix memory leak in ieee802154_raw_deliver * ppp: Fix generating ifname when empty IFLA_IFNAME is specified drivers/net/ppp/ppp_generic.c ACPI: NFIT: Fix support for virtual SPA ranges * i2c: dev: zero out array used for i2c reads from userspace drivers/i2c/i2c-dev.c ASoC: intel: atom: Fix reference to PCM buffer address iio: adc: Fix incorrect exit of for-loop * ANDROID: xt_quota2: set usersize in xt_match registration object net/netfilter/xt_quota2.c * ANDROID: xt_quota2: clear quota2_log message before sending net/netfilter/xt_quota2.c * ANDROID: xt_quota2: remove trailing junk which might have a digit in it net/netfilter/xt_quota2.c * UPSTREAM: netfilter: x_tables: fix pointer leaks to userspace net/netfilter/xt_IDLETIMER.c net/netfilter/xt_limit.c net/netfilter/xt_statistic.c Merge 4.9.280 into android-4.9-q Linux 4.9.280 * ovl: prevent private clone if bind mount is not allowed fs/namespace.c net: xilinx_emaclite: Do not print real IOMEM pointer * ppp: Fix generating ppp unit id when ifname is not specified drivers/net/ppp/ppp_generic.c USB:ehci:fix Kunpeng920 ehci hardware problem net/qla3xxx: fix schedule while atomic in ql_wait_for_drvr_lock and ql_adapter_reset alpha: Send stop IPI to send to online CPUs reiserfs: check directory items on read from disk reiserfs: add check for root_inode in reiserfs_fill_super perf/x86/amd: Don't touch the AMD64_EVENTSEL_HOSTONLY bit inside the guest pcmcia: i82092: fix a null pointer dereference bug MIPS: Malta: Do not byte-swap accesses to the CBUS UART serial: 8250: Mask out floating 16/32-bit bus bits * pipe: increase minimum default pipe size to 2 pages fs/pipe.c media: rtl28xxu: fix zero-length control request scripts/tracing: fix the bug that can't parse raw_trace_func usb: otg-fsm: Fix hrtimer list corruption USB: serial: ftdi_sio: add device ID for Auto-M3 OP-COM v2 USB: serial: ch341: fix character loss at high transfer rates USB: serial: option: add Telit FD980 composition 0x1056 USB: usbtmc: Fix RCU stall warning * Bluetooth: defer cleanup of resources in hci_unregister_dev() include/net/bluetooth/hci_core.h net/bluetooth/hci_core.c net/bluetooth/hci_sock.c net/bluetooth/hci_sysfs.c net: vxge: fix use-after-free in vxge_device_unregister net: fec: fix use-after-free in fec_drv_remove net: pegasus: fix uninit-value in get_interrupt_interval bnx2x: fix an error code in bnx2x_nic_load() mips: Fix non-POSIX regexp net: natsemi: Fix missing pci_disable_device() in probe and remove * media: videobuf2-core: dequeue if start_streaming fails drivers/media/v4l2-core/videobuf2-core.c scsi: sr: Return correct event when media event code is 3 ALSA: seq: Fix racy deletion of subscriber * ANDROID: staging: ion: move buffer kmap from begin/end_cpu_access() drivers/staging/android/ion/ion.c Bug: 198416225 Change-Id: I2efbc084ad1a47825c9adcaa51cf2c716e1afb2c Signed-off-by: Lucas Wei <lucaswei@google.com>
| * Merge 4.9.281 into android-4.9-qGreg Kroah-Hartman2021-08-271-0/+10
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes in 4.9.281 iio: adc: Fix incorrect exit of for-loop ASoC: intel: atom: Fix reference to PCM buffer address i2c: dev: zero out array used for i2c reads from userspace ACPI: NFIT: Fix support for virtual SPA ranges ppp: Fix generating ifname when empty IFLA_IFNAME is specified net: Fix memory leak in ieee802154_raw_deliver net: bridge: fix memleak in br_add_if() tcp_bbr: fix u32 wrap bug in round logic if bbr_init() called after 2B packets xen/events: Fix race in set_evtchn_to_irq x86/tools: Fix objdump version check again PCI/MSI: Enable and mask MSI-X early PCI/MSI: Do not set invalid bits in MSI mask PCI/MSI: Correct misleading comments PCI/MSI: Use msi_mask_irq() in pci_msi_shutdown() PCI/MSI: Protect msi_desc::masked for multi-MSI PCI/MSI: Mask all unused MSI-X entries PCI/MSI: Enforce that MSI-X table entry is masked for update PCI/MSI: Enforce MSI[X] entry updates to be visible vmlinux.lds.h: Handle clang's module.{c,d}tor sections mac80211: drop data frames without key on encrypted links KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) x86/fpu: Make init_fpstate correct with optimized XSAVE dmaengine: usb-dmac: Fix PM reference leak in usb_dmac_probe() ARM: dts: am43x-epos-evm: Reduce i2c0 bus speed for tps65218 dmaengine: of-dma: router_xlate to return -EPROBE_DEFER if controller is not yet available scsi: megaraid_mm: Fix end of loop tests for list_for_each_entry() scsi: scsi_dh_rdac: Avoid crash during rdac_bus_attach() scsi: core: Avoid printing an error if target_alloc() returns -ENXIO ARM: dts: nomadik: Fix up interrupt controller node names Bluetooth: hidp: use correct wait queue when removing ctrl_wait dccp: add do-while-0 stubs for dccp_pr_debug macros vhost: Fix the calculation in vhost_overflow() net: 6pack: fix slab-out-of-bounds in decode_data net: qlcnic: add missed unlock in qlcnic_83xx_flash_read32 mmc: dw_mmc: call the dw_mci_prep_stop_abort() by default mmc: dw_mmc: Fix hang on data CRC error ALSA: hda - fix the 'Capture Switch' value change notifications ipack: tpci200: fix many double free issues in tpci200_pci_probe btrfs: prevent rename2 from exchanging a subvol with a directory from different parents ASoC: intel: atom: Fix breakage for PCM buffer address setup locks: print a warning when mount fails due to lack of "mand" support fs: warn about impending deprecation of mandatory locks Linux 4.9.281 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I0f50adb340b9ef3eb12acf7f244b283ab16ae3bf
| | * locks: print a warning when mount fails due to lack of "mand" supportJeff Layton2021-08-261-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ Upstream commit df2474a22c42ce419b67067c52d71da06c385501 ] Since 9e8925b67a ("locks: Allow disabling mandatory locking at compile time"), attempts to mount filesystems with "-o mand" will fail. Unfortunately, there is no other indiciation of the reason for the failure. Change how the function is defined for better readability. When CONFIG_MANDATORY_FILE_LOCKING is disabled, printk a warning when someone attempts to mount with -o mand. Also, add a blurb to the mandatory-locking.txt file to explain about the "mand" option, and the behavior one should expect when it is disabled. Reported-by: Jan Kara <jack@suse.cz> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
* | | Merge android-4.9-q (4.9.264) into android-msm-pixel-4.9-ltsLucas Wei2021-04-261-5/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge 4.9.264 into android-4.9-q Linux 4.9.264 xen-blkback: don't leak persistent grants from xen_blkbk_map() mac80211: fix double free in ibss_leave net: qrtr: fix a kernel-infoleak in qrtr_recvmsg() net: sched: validate stab values * can: dev: Move device back to init netns on owning netns delete include/net/rtnetlink.h net/core/dev.c * futex: Handle transient "ownerless" rtmutex state correctly kernel/futex.c * futex: Fix incorrect should_fail_futex() handling kernel/futex.c * futex: Prevent robust futex exit race kernel/futex.c * arm64: futex: Bound number of LDXR/STXR loops in FUTEX_WAKE_OP arch/arm64/include/asm/futex.h * locking/futex: Allow low-level atomic operations to return -EAGAIN kernel/futex.c * futex: Fix (possible) missed wakeup kernel/futex.c * futex: Handle early deadlock return correctly kernel/futex.c kernel/locking/rtmutex.c * futex,rt_mutex: Fix rt_mutex_cleanup_proxy_lock() kernel/locking/rtmutex.c * futex: Avoid freeing an active timer kernel/futex.c * futex: Drop hb->lock before enqueueing on the rtmutex kernel/futex.c kernel/locking/rtmutex.c kernel/locking/rtmutex_common.h * futex: Rework futex_lock_pi() to use rt_mutex_*_proxy_lock() kernel/futex.c kernel/locking/rtmutex.c kernel/locking/rtmutex_common.h * futex,rt_mutex: Introduce rt_mutex_init_waiter() kernel/futex.c kernel/locking/rtmutex.c kernel/locking/rtmutex_common.h * futex: Use smp_store_release() in mark_wake_futex() kernel/futex.c * idr: add ida_is_empty drivers/usb/gadget/function/f_hid.c include/linux/idr.h perf auxtrace: Fix auxtrace queue conflict ACPI: scan: Use unique number for instance_no ACPI: scan: Rearrange memory allocation in acpi_device_add() RDMA/cxgb4: Fix adapter LE hash errors while destroying ipv6 listening server net: cdc-phonet: fix data-interface release on probe failure mac80211: fix rate mask reset can: m_can: m_can_do_rx_poll(): fix extraneous msg loss warning can: c_can: move runtime PM enable/disable to c_can_platform can: c_can_pci: c_can_pci_remove(): fix use-after-free net/qlcnic: Fix a use after free in qlcnic_83xx_get_minidump_template e1000e: Fix error handling in e1000_set_d0_lplu_state_82571 e1000e: add rtnl_lock() to e1000_reset_task net: dsa: bcm_sf2: Qualify phydev->dev_flags based on port * macvlan: macvlan_count_rx() needs to be aware of preemption include/linux/if_macvlan.h bus: omap_l3_noc: mark l3 irqs as IRQF_NO_THREAD arm64: dts: ls1043a: mark crypto engine dma coherent squashfs: fix xattr id and id lookup sanity checks * squashfs: fix inode lookup sanity checks fs/squashfs/squashfs_fs.h x86/tlb: Flush global mappings when KAISER is disabled ia64: fix ptrace(PTRACE_SYSCALL_INFO_EXIT) sign ia64: fix ia64_syscall_get_set_arguments() for break-based syscalls nfs: we don't support removing system.nfs4_acl * u64_stats,lockdep: Fix u64_stats_init() vs lockdep include/linux/u64_stats_sync.h atm: idt77252: fix null-ptr-dereference atm: uPD98402: fix incorrect allocation net: wan: fix error return code of uhdlc_init() NFS: Correct size calculation for create reply length * nfs: fix PNFS_FLEXFILE_LAYOUT Kconfig default fs/nfs/Kconfig sun/niu: fix wrong RXMAC_BC_FRM_CNT_COUNT count net: tehuti: fix error return code in bdx_probe() ixgbe: Fix memleak in ixgbe_configure_clsu32 atm: lanai: dont run lanai_dev_close if not open atm: eni: dont release is never initialized powerpc/4xx: Fix build errors from mfdcr() net: fec: ptp: avoid register access when ipg clock is disabled ANDROID: Make vsock virtio packet buff size configurable Merge 4.9.263 into android-4.9-q Linux 4.9.263 * genirq: Disable interrupts for force threaded handlers kernel/irq/manage.c * ext4: fix potential error in ext4_do_update_inode fs/ext4/inode.c * ext4: find old entry again if failed to rename whiteout fs/ext4/namei.c x86: Introduce TS_COMPAT_RESTART to fix get_nr_restart_syscall() x86: Move TS_COMPAT back to asm/thread_info.h * kernel, fs: Introduce and use set_restart_fn() and arch_set_restart_data() fs/select.c include/linux/thread_info.h kernel/futex.c kernel/time/alarmtimer.c kernel/time/hrtimer.c kernel/time/posix-cpu-timers.c x86/ioapic: Ignore IRQ2 again perf/x86/intel: Fix a crash caused by zero PEBS status PCI: rpadlpar: Fix potential drc_name corruption in store functions iio: adis16400: Fix an error code in adis16400_initial_setup() * usb: gadget: configfs: Fix KASAN use-after-free drivers/usb/gadget/configfs.c * USB: replace hardcode maximum usb string length by definition drivers/usb/gadget/composite.c drivers/usb/gadget/configfs.c drivers/usb/gadget/usbstring.c include/uapi/linux/usb/ch9.h scsi: lpfc: Fix some error codes in debugfs net/qrtr: fix __netdev_alloc_skb call sunrpc: fix refcount leak for rpc auth modules svcrdma: disable timeouts on rdma backchannel NFSD: Repair misuse of sv_lock in 5.10.16-rt30. nvmet: don't check iosqes,iocqes for discovery controllers btrfs: fix race when cloning extent buffer during rewind of an old root ixgbe: prevent ptp_rx_hang from running when in FILTER_ALL mode ixgbe: check for Tx timestamp timeouts during watchdog net: dsa: b53: Support setting learning on port * ext4: check journal inode extents more carefully fs/ext4/block_validity.c fs/ext4/ext4.h fs/ext4/extents.c fs/ext4/indirect.c fs/ext4/inode.c fs/ext4/mballoc.c * ext4: don't allow overlapping system zones fs/ext4/block_validity.c * ext4: handle error of ext4_setup_system_zone() on remount fs/ext4/super.c Merge 4.9.262 into android-4.9-q * FROMGIT: configfs: fix a use-after-free in __configfs_open_file fs/configfs/file.c Linux 4.9.262 xen/events: avoid handling the same event on two cpus at the same time xen/events: don't unmask an event channel when an eoi is pending xen/events: reset affinity of 2-level event when tearing it down iio: imu: adis16400: fix memory leak iio: imu: adis16400: release allocated memory on failure KVM: arm64: Fix exclusive limit for IPA size hwmon: (lm90) Fix max6658 sporadic wrong temperature reading binfmt_misc: fix possible deadlock in bm_register_write powerpc/64s: Fix instruction encoding for lis in ppc_function_entry() alpha: switch __copy_user() and __do_clean_user() to normal calling conventions alpha: Package string routines together alpha: make short build log available for division routines alpha: merge build rules of division routines alpha: add $(src)/ rather than $(obj)/ to make source file path * configfs: fix a use-after-free in __configfs_open_file fs/configfs/file.c block: rsxx: fix error return code of rsxx_pci_probe() NFSv4.2: fix return value of _nfs4_get_security_label() sh_eth: fix TRSCER mask for R7S72100 staging: comedi: pcl818: Fix endian problem for AI command data staging: comedi: pcl711: Fix endian problem for AI command data staging: comedi: me4000: Fix endian problem for AI command data staging: comedi: dmm32at: Fix endian problem for AI command data staging: comedi: das800: Fix endian problem for AI command data staging: comedi: das6402: Fix endian problem for AI command data staging: comedi: adv_pci1710: Fix endian problem for AI command data staging: comedi: addi_apci_1500: Fix endian problem for command sample staging: comedi: addi_apci_1032: Fix endian problem for COS sample staging: rtl8192e: Fix possible buffer overflow in _rtl92e_wx_set_scan staging: rtl8712: Fix possible buffer overflow in r8712_sitesurvey_cmd staging: ks7010: prevent buffer overflow in ks_wlan_set_scan() staging: rtl8188eu: fix potential memory corruption in rtw_check_beacon_data() staging: rtl8712: unterminated string leads to read overflow staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan() staging: rtl8192u: fix ->ssid overflow in r8192_wx_set_scan() usbip: fix vhci_hcd attach_store() races leading to gpf usbip: fix stub_dev usbip_sockfd_store() races leading to gpf usbip: fix vudc to check for stream socket usbip: fix vhci_hcd to check for stream socket usbip: fix stub_dev to check for stream socket USB: serial: cp210x: add some more GE USB IDs USB: serial: cp210x: add ID for Acuity Brands nLight Air Adapter USB: serial: ch341: add new Product ID USB: serial: io_edgeport: fix memory leak in edge_startup * xhci: Improve detection of device initiated wake signal. drivers/usb/host/xhci.c usb: renesas_usbhs: Clear PIPECFG for re-enabling pipe with other EPNUM usb: gadget: f_uac2: always increase endpoint max_packet_size by one audio slot Goodix Fingerprint device is not a modem scripts/recordmcount.{c,pl}: support -ffunction-sections .text.* section names * mmc: core: Fix partition switch time for eMMC drivers/mmc/core/mmc.c s390/dasd: fix hanging DASD driver unbind * ALSA: usb-audio: Fix "cannot get freq eq" errors on Dell AE515 sound bar sound/usb/quirks.c ALSA: hda: Avoid spurious unsol event handling during S3/S4 ALSA: hda/hdmi: Cancel pending works before suspend scsi: libiscsi: Fix iscsi_prep_scsi_cmd_pdu() error handling s390/smp: __smp_rescan_cpus() - move cpumask away from stack PCI: xgene-msi: Fix race in installing chained irq handler powerpc/perf: Record counter overflow always if SAMPLE_IP is unset mmc: mediatek: fix race condition between msdc_request_timeout and irq mmc: mxs-mmc: Fix a resource leak in an error handling path in 'mxs_mmc_probe()' udf: fix silent AED tagLocation corruption media: usbtv: Fix deadlock on suspend net: davicom: Fix regulator not turned off on driver removal net: davicom: Fix regulator not turned off on failed probe net: lapbether: Remove netif_start_queue / netif_stop_queue * net: sched: avoid duplicates in classes dump net/sched/sch_api.c net/mlx4_en: update moderation when config reset * Revert "mm, slub: consider rest of partial list if acquire_slab() fails" mm/slub.c cifs: return proper error code in statfs(2) * netfilter: x_tables: gpf inside xt_find_revision() net/netfilter/x_tables.c can: flexcan: enable RX FIFO after FRZ/HALT valid can: flexcan: assert FRZ bit in flexcan_chip_freeze() can: skb: can_skb_set_owner(): fix ref counting if socket was closed before setting skb ownership net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0 * net: Fix gro aggregation for udp encaps with zero csum net/ipv4/udp_offload.c ath9k: fix transmitting to stations in dynamic SMPS mode ethernet: alx: fix order of calls on resume uapi: nfnetlink_cthelper.h: fix userspace compilation error Merge 4.9.261 into android-4.9-q Linux 4.9.261 misc: eeprom_93xx46: Add quirk to support Microchip 93LC46B eeprom * PCI: Add function 1 DMA alias quirk for Marvell 9215 SATA controller drivers/pci/quirks.c platform/x86: acer-wmi: Add new force_caps module parameter iommu/amd: Fix sleeping in atomic in increase_address_space() * dm table: fix DAX iterate_devices based device capability checks drivers/md/dm-table.c * dm table: fix iterate_devices based device capability checks drivers/md/dm-table.c rsxx: Return -EFAULT if copy_to_user() fails ALSA: ctxfi: cthw20k2: fix mask on conf to allow 4 bits usbip: tools: fix build error for multiple definition btrfs: fix raid6 qstripe kmap btrfs: raid56: simplify tracking of Q stripe presence Merge 4.9.260 into android-4.9-q Linux 4.9.260 * media: v4l: ioctl: Fix memory leak in video_usercopy drivers/media/v4l2-core/v4l2-ioctl.c * swap: fix swapfile read/write offset mm/page_io.c mm/swapfile.c * zsmalloc: account the number of compacted pages correctly drivers/block/zram/zram_drv.c include/linux/zsmalloc.h mm/zsmalloc.c xen-netback: respect gnttab_map_refs()'s return value Xen/gnttab: handle p2m update errors on a per-slot basis scsi: iscsi: Verify lengths on passthrough PDUs scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE * sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output fs/sysfs/file.c include/linux/sysfs.h scsi: iscsi: Restrict sessions and handles to admin capabilities media: uvcvideo: Allow entities with no pads staging: most: sound: add sanity check for function argument * Bluetooth: Fix null pointer dereference in amp_read_loc_assoc_final_data net/bluetooth/amp.c x86/build: Treat R_386_PLT32 relocation as R_386_PC32 ath10k: fix wmi mgmt tx queue full due to race condition pktgen: fix misuse of BUG_ON() in pktgen_thread_worker() wlcore: Fix command execute failure 19 for wl12xx * vt/consolemap: do font sum unsigned drivers/tty/vt/consolemap.c x86/reboot: Add Zotac ZBOX CI327 nano PCI reboot quirk staging: fwserial: Fix error handling in fwserial_create mm/hugetlb.c: fix unnecessary address expansion of pmd sharing * net: fix up truesize of cloned skb in skb_prepare_for_shift() net/core/skbuff.c * smackfs: restrict bytes count in smackfs write functions security/smack/smackfs.c xfs: Fix assert failure in xfs_setattr_size() JFS: more checks for invalid superblock * arm64: Use correct ll/sc atomic constraints arch/arm64/include/asm/atomic_ll_sc.h * arm64: cmpxchg: Use "K" instead of "L" for ll/sc immediate constraint arch/arm64/include/asm/atomic_ll_sc.h * arm64: Avoid redundant type conversions in xchg() and cmpxchg() arch/arm64/include/asm/atomic_ll_sc.h arch/arm64/include/asm/cmpxchg.h * arm64: Remove redundant mov from LL/SC cmpxchg arch/arm64/include/asm/atomic_ll_sc.h printk: fix deadlock when kernel panic hugetlb: fix update_and_free_page contig page struct assumption * scripts: set proper OpenSSL include dir also for sign-file scripts/Makefile * scripts: use pkg-config to locate libcrypto scripts/Makefile arm: kprobes: Allow to handle reentered kprobe on single-stepping net: usb: qmi_wwan: support ZTE P685M modem * futex: Don't enable IRQs unconditionally in put_pi_state() kernel/futex.c * futex: Fix more put_pi_state() vs. exit_pi_state_list() races kernel/futex.c * futex: Fix pi_state->owner serialization kernel/futex.c * futex: Futex_unlock_pi() determinism kernel/futex.c * futex: Pull rt_mutex_futex_unlock() out from under hb->lock kernel/futex.c * futex: Cleanup refcounting kernel/futex.c * futex: Cleanup variable names for futex_top_waiter() kernel/futex.c Merge 4.9.259 into android-4.9-q Linux 4.9.259 dm era: Update in-core bitset after committing the metadata * net: icmp: pass zeroed opts from icmp{,v6}_ndo_send before sending include/linux/icmpv6.h include/linux/ipv6.h include/net/icmp.h net/ipv4/icmp.c net/ipv6/icmp.c net/ipv6/ip6_icmp.c * ipv6: silence compilation warning for non-IPV6 builds include/linux/icmpv6.h * ipv6: icmp6: avoid indirect call for icmpv6_send() include/linux/icmpv6.h net/ipv6/icmp.c net/ipv6/ip6_icmp.c sunvnet: use icmp_ndo_send helper gtp: use icmp_ndo_send helper * icmp: allow icmpv6_ndo_send to work with CONFIG_IPV6=n include/linux/icmpv6.h * icmp: introduce helper for nat'd source address in network device context include/linux/icmpv6.h include/net/icmp.h net/ipv4/icmp.c net/ipv6/ip6_icmp.c * futex: fix dead code in attach_to_pi_owner() kernel/futex.c * futex: Fix OWNER_DEAD fixup kernel/futex.c dm era: only resize metadata in preresume dm era: Reinitialize bitset cache before digesting a new writeset dm era: Use correct value size in equality function of writeset tree dm era: Fix bitset memory leaks dm era: Verify the data block size hasn't changed dm era: Recover committed writeset after crash gfs2: Don't skip dlm unlock if glock has an lvb sparc32: fix a user-triggerable oops in clear_user() * f2fs: fix out-of-repair __setattr_copy() fs/f2fs/file.c gpio: pcf857x: Fix missing first interrupt mmc: sdhci-esdhc-imx: fix kernel panic when remove module * module: Ignore _GLOBAL_OFFSET_TABLE_ when warning for undefined symbols kernel/module.c libnvdimm/dimm: Avoid race between probe and available_slots_show() usb: renesas_usbhs: Clear pipe running flag in usbhs_pkt_pop() mm: hugetlb: fix a race between freeing and dissolving the page mtd: spi-nor: hisi-sfc: Put child node np on error path floppy: reintroduce O_NDELAY fix x86/reboot: Force all cpus to exit VMX root if VMX is supported staging: rtl8188eu: Add Edimax EW-7811UN V2 to device table drivers/misc/vmw_vmci: restrict too big queue size in qp_host_alloc_queue * seccomp: Add missing return in non-void function kernel/seccomp.c btrfs: fix extent buffer leak on failure to copy root btrfs: fix reloc root leak with 0 ref reloc roots on recovery btrfs: abort the transaction if we fail to inc ref in btrfs_copy_root KEYS: trusted: Fix migratable=1 failing * usb: dwc3: gadget: Fix dep->interval for fullspeed interrupt drivers/usb/dwc3/gadget.c * usb: dwc3: gadget: Fix setting of DEPCFG.bInterval_m1 drivers/usb/dwc3/gadget.c USB: serial: mos7720: fix error code in mos7720_write() USB: serial: mos7840: fix error code in mos7840_write() usb: musb: Fix runtime PM race in musb_queue_resume_work USB: serial: option: update interface mapping for ZTE P685M Input: i8042 - add ASUS Zenbook Flip to noselftest list Input: joydev - prevent potential read overflow in ioctl * Input: xpad - add support for PowerA Enhanced Wired Controller for Xbox Series X|S drivers/input/joystick/xpad.c Input: raydium_ts_i2c - do not send zero length ACPI: configfs: add missing check after configfs_register_default_group() * blk-settings: align max_sectors on "logical_block_size" boundary block/blk-settings.c * scsi: bnx2fc: Fix Kconfig warning & CNIC build errors drivers/scsi/bnx2fc/Kconfig i2c: brcmstb: Fix brcmstd_send_i2c_cmd condition * arm64: Add missing ISB after invalidating TLB in __primary_switch arch/arm64/kernel/head.S mm/hugetlb: fix potential double free in hugetlb_register_node() error path * mm/memory.c: fix potential pte_unmap_unlock pte error mm/memory.c ocfs2: fix a use after free on error net/mlx4_core: Add missed mlx4_free_cmd_mailbox() i40e: Fix flow for IPv6 next header (extension header) drm/msm/dsi: Correct io_start for MSM8994 (20nm PHY) * PCI: Align checking of syscall user config accessors drivers/pci/syscall.c VMCI: Use set_page_dirty_lock() when unregistering guest memory pwm: rockchip: rockchip_pwm_probe(): Remove superfluous clk_unprepare() misc: eeprom_93xx46: Add module alias to avoid breaking support for non device tree users misc: eeprom_93xx46: Fix module alias to enable module autoprobe sparc64: only select COMPAT_BINFMT_ELF if BINFMT_ELF is set Input: elo - fix an error code in elo_connect() perf test: Fix unaligned access in sample parsing test perf intel-pt: Fix missing CYC processing in PSB spi: pxa2xx: Fix the controller numbering for Wildcat Point powerpc/pseries/dlpar: handle ibm, configure-connector delay status mfd: wm831x-auxadc: Prevent use after free in wm831x_auxadc_read_irq() RDMA/rxe: Fix coding error in rxe_recv.c perf tools: Fix DSO filtering when not finding a map for a sampled address * tracepoint: Do not fail unregistering a probe due to memory failure kernel/tracepoint.c * amba: Fix resource leak for drivers without .remove drivers/amba/bus.c ARM: 9046/1: decompressor: Do not clear SCTLR.nTLSMD for ARMv7+ cores mmc: usdhi6rol0: Fix a resource leak in the error handling path of the probe powerpc/47x: Disable 256k page size IB/umad: Return EIO in case of when device disassociated isofs: release buffer head before return regulator: axp20x: Fix reference cout leak clocksource/drivers/mxs_timer: Add missing semicolon when DEBUG is defined power: reset: at91-sama5d2_shdwc: fix wkupdbc mask * of/fdt: Make sure no-map does not remove already reserved regions drivers/of/fdt.c * fdt: Properly handle "no-map" field in the memory region drivers/of/fdt.c dmaengine: fsldma: Fix a resource leak in an error handling path of the probe function dmaengine: fsldma: Fix a resource leak in the remove function * HID: core: detect and skip invalid inputs to snto32() drivers/hid/hid-core.c spi: cadence-quadspi: Abort read if dummy cycles required are too many clk: meson: clk-pll: fix initializing the old rate (fallback) for a PLL jffs2: fix use after free in jffs2_sum_write_data() fs/jfs: fix potential integer overflow on shift of a int crypto: ecdh_helper - Ensure 'len >= secret.len' in decode_key() btrfs: clarify error returns values in __load_free_space_cache ata: ahci_brcm: Add back regulators management media: uvcvideo: Accept invalid bFormatIndex and bFrameIndex values media: pxa_camera: declare variable when DEBUG is defined media: cx25821: Fix a bug when reallocating some dma memory media: qm1d1c0042: fix error return code in qm1d1c0042_init() media: lmedm04: Fix misuse of comma ASoC: cs42l56: fix up error handling in probe media: tm6000: Fix memleak in tm6000_start_stream media: media/pci: Fix memleak in empress_init media: vsp1: Fix an error handling path in the probe function MIPS: lantiq: Explicitly compare LTQ_EBU_PCC_ISTAT against 0 MIPS: c-r4k: Fix section mismatch for loongson2_sc_init gma500: clean up error handling in init drm/gma500: Fix error return code in psb_driver_load() * fbdev: aty: SPARC64 requires FB_ATY_CT drivers/video/fbdev/Kconfig b43: N-PHY: Fix the update of coef for the PHY revision >= 3case mac80211: fix potential overflow when multiplying to u32 integers xen/netback: fix spurious event detection for common event case bnxt_en: reverse order of TX disable and carrier off ARM: s3c: fix fiq for clang IAS arm64: dts: msm8916: Fix reserved and rfsa nodes unit address usb: dwc2: Make "trimming xfer length" a debug message usb: dwc2: Abort transaction after errors with unknown reason usb: dwc2: Do not update data length if it is 0 on inbound transfers ARM: dts: Configure missing thermal interrupt for 4430 * Bluetooth: Put HCI device if inquiry procedure interrupts net/bluetooth/hci_core.c * Bluetooth: drop HCI device reference before return net/bluetooth/a2mp.c arm64: dts: exynos: correct PMIC interrupt trigger level on Espresso ARM: dts: exynos: correct PMIC interrupt trigger level on Arndale Octa ARM: dts: exynos: correct PMIC interrupt trigger level on Spring * Bluetooth: Fix initializing response id after clearing struct net/bluetooth/a2mp.c mm, thp: make do_huge_pmd_wp_page() lock page for testing mapcount * random: fix the RNDRESEEDCRNG ioctl drivers/char/random.c MIPS: vmlinux.lds.S: add missing PAGE_ALIGNED_DATA() section * kdb: Make memory allocations more robust kernel/debug/kdb/kdb_private.h scripts/recordmcount.pl: support big endian for ARCH sh cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting cifs_sb->prepath. NET: usb: qmi_wwan: Adding support for Cinterion MV31 arm64: tegra: Add power-domain for Tegra210 HDA igb: Remove incorrect "unexpected SYS WRAP" log message ntfs: check for valid standard information attribute * usb: quirks: add quirk to start video capture on ELMO L-12F document camera reliable drivers/usb/core/quirks.c * HID: make arrays usage and value to be the same drivers/hid/hid-core.c Bug: 184596728 Change-Id: I50e867d3e8d2d62938b73e54b8d6e614bb3f2d1b Signed-off-by: Lucas Wei <lucaswei@google.com>
| * | Merge 4.9.260 into android-4.9-qGreg Kroah-Hartman2021-03-071-5/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes in 4.9.260 futex: Cleanup variable names for futex_top_waiter() futex: Cleanup refcounting futex: Pull rt_mutex_futex_unlock() out from under hb->lock futex: Futex_unlock_pi() determinism futex: Fix pi_state->owner serialization futex: Fix more put_pi_state() vs. exit_pi_state_list() races futex: Don't enable IRQs unconditionally in put_pi_state() net: usb: qmi_wwan: support ZTE P685M modem arm: kprobes: Allow to handle reentered kprobe on single-stepping scripts: use pkg-config to locate libcrypto scripts: set proper OpenSSL include dir also for sign-file hugetlb: fix update_and_free_page contig page struct assumption printk: fix deadlock when kernel panic arm64: Remove redundant mov from LL/SC cmpxchg arm64: Avoid redundant type conversions in xchg() and cmpxchg() arm64: cmpxchg: Use "K" instead of "L" for ll/sc immediate constraint arm64: Use correct ll/sc atomic constraints JFS: more checks for invalid superblock xfs: Fix assert failure in xfs_setattr_size() smackfs: restrict bytes count in smackfs write functions net: fix up truesize of cloned skb in skb_prepare_for_shift() mm/hugetlb.c: fix unnecessary address expansion of pmd sharing staging: fwserial: Fix error handling in fwserial_create x86/reboot: Add Zotac ZBOX CI327 nano PCI reboot quirk vt/consolemap: do font sum unsigned wlcore: Fix command execute failure 19 for wl12xx pktgen: fix misuse of BUG_ON() in pktgen_thread_worker() ath10k: fix wmi mgmt tx queue full due to race condition x86/build: Treat R_386_PLT32 relocation as R_386_PC32 Bluetooth: Fix null pointer dereference in amp_read_loc_assoc_final_data staging: most: sound: add sanity check for function argument media: uvcvideo: Allow entities with no pads scsi: iscsi: Restrict sessions and handles to admin capabilities sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE scsi: iscsi: Verify lengths on passthrough PDUs Xen/gnttab: handle p2m update errors on a per-slot basis xen-netback: respect gnttab_map_refs()'s return value zsmalloc: account the number of compacted pages correctly swap: fix swapfile read/write offset media: v4l: ioctl: Fix memory leak in video_usercopy Linux 4.9.260 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I36c2dd54eec10fff4b30d04830dbf0c3928ec088
| | * sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs outputJoe Perches2021-03-071-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 2efc459d06f1630001e3984854848a5647086232 upstream. Output defects can exist in sysfs content using sprintf and snprintf. sprintf does not know the PAGE_SIZE maximum of the temporary buffer used for outputting sysfs content and it's possible to overrun the PAGE_SIZE buffer length. Add a generic sysfs_emit function that knows that the size of the temporary buffer and ensures that no overrun is done. Add a generic sysfs_emit_at function that can be used in multiple call situations that also ensures that no overrun is done. Validate the output buffer argument to be page aligned. Validate the offset len argument to be within the PAGE_SIZE buf. Signed-off-by: Joe Perches <joe@perches.com> Link: https://lore.kernel.org/r/884235202216d464d61ee975f7465332c86f76b2.1600285923.git.joe@perches.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | | Merge android-4.9-q (4.9.237) into android-msm-pixel-4.9-ltslucaswei2020-10-201-6/+10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge 4.9.237 into android-4.9-q Linux 4.9.237 x86/defconfig: Enable CONFIG_USB_XHCI_HCD=y powerpc/dma: Fix dma_map_ops::get_required_mask ehci-hcd: Move include to keep CRC stable serial: 8250_pci: Add Realtek 816a and 816b Input: i8042 - add Entroware Proteus EL07R4 to nomux and reset lists usblp: fix race between disconnect() and read() USB: UAS: fix disconnect by unplugging a hub * USB: quirks: Add USB_QUIRK_IGNORE_REMOTE_WAKEUP quirk for BYD zhaoxin notebook drivers/usb/core/quirks.c drm/mediatek: Add exception handing in mtk_drm_probe() if component init fail MIPS: SNI: Fix spurious interrupts fbcon: Fix user font detection test at fbcon_resize(). perf test: Free formats for perf pmu parse test MIPS: SNI: Fix MIPS_L1_CACHE_SHIFT Drivers: hv: vmbus: Add timeout to vmbus_wait_for_unload clk: rockchip: Fix initialization of mux_pll_src_4plls_p i2c: algo: pca: Reapply i2c bus settings after reset rapidio: Replace 'select' DMAENGINES 'with depends on' SUNRPC: stop printk reading past end of string spi: spi-loopback-test: Fix out-of-bounds read scsi: lpfc: Fix FLOGI/PLOGI receive race condition in pt2pt discovery scsi: pm8001: Fix memleak in pm8001_exec_internal_task_abort NFSv4.1 handle ERR_DELAY error reclaiming locking state on delegation recall * net: handle the return value of pskb_carve_frag_list() correctly net/core/skbuff.c * gcov: add support for GCC 10.1 kernel/gcov/Kconfig RDMA/rxe: Fix the parent sysfs read when the interface has 15 chars IB/rxe: Remove a pointless indirection layer * usb: Fix out of sync data toggle if a configured device is reconfigured drivers/usb/core/message.c USB: serial: option: add support for SIM7070/SIM7080/SIM7090 modules USB: serial: ftdi_sio: add IDs for Xsens Mti USB converter * usb: core: fix slab-out-of-bounds Read in read_descriptors drivers/usb/core/sysfs.c staging: greybus: audio: fix uninitialized value issue video: fbdev: fix OOB read in vga_8planes_imageblit() KVM: VMX: Don't freeze guest when event delivery causes an APIC-access exit * vgacon: remove software scrollback support drivers/video/console/Kconfig fbcon: remove now unusued 'softback_lines' cursor() argument fbcon: remove soft scrollback code rbd: require global CAP_SYS_ADMIN for mapping and unmapping scsi: target: iscsi: Fix hang in iscsit_access_np() when getting tpg->np_login_sem scsi: target: iscsi: Fix data digest calculation * regulator: push allocation in set_consumer_device_supply() out of lock drivers/regulator/core.c btrfs: fix wrong address when faulting in pages in the search ioctl staging: wlan-ng: fix out of bounds read in prism2sta_probe_usb() * USB: core: add helpers to retrieve endpoints drivers/usb/core/usb.c include/linux/usb.h iio:accel:mma8452: Fix timestamp alignment and prevent data leak. iio:accel:mma7455: Fix timestamp alignment and prevent data leak. iio: accel: kxsd9: Fix alignment of local buffer. iio:light:max44000 Fix timestamp alignment and prevent data leak. iio:magnetometer:ak8975 Fix alignment and data leak issues. drivers: iio: magnetometer: Fix sparse endianness warnings cast to restricted __be16 iio:adc:ti-adc081c Fix alignment and data leak issues iio:adc:ina2xx Fix timestamp alignment issue. iio:accel:bmc150-accel: Fix timestamp alignment and prevent data leak. iio:light:ltr501 Fix timestamp alignment issue. iio: adc: ti-ads1015: fix conversion when CONFIG_PM is not set iio: adc: mcp3422: fix locking on error path iio: adc: mcp3422: fix locking scope * gcov: Disable gcov build with GCC 10 kernel/gcov/Kconfig ALSA: hda: fix a runtime pm issue in SOF when integrated GPU is disabled drivers/net/wan/hdlc_cisco: Add hard_header_len irqchip/eznps: Fix build error for !ARC700 builds xfs: initialize the shortform attr header padding entry drivers/net/wan/lapbether: Set network_header before transmitting ALSA: hda: Fix 2 channel swapping for Tegra firestream: Fix memleak in fs_open NFC: st95hf: Fix memleak in st95hf_in_send_cmd drivers/net/wan/lapbether: Added needed_tailroom scsi: libsas: Set data_dir as DMA_NONE if libata marks qc as NODATA RDMA/rxe: Drop pointless checks in rxe_init_ports RDMA/rxe: Fix memleak in rxe_mem_init_user ARM: dts: socfpga: fix register entry for timer3 on Arria10 Merge 4.9.236 into android-4.9-q Linux 4.9.236 * net: disable netpoll on fresh napis net/core/dev.c sctp: not disable bh in the whole sctp_get_port_local() net: usb: dm9601: Add USB ID of Keenetic Plus DSL * netlabel: fix problems with mapping removal net/netlabel/netlabel_domainhash.c bnxt: don't enable NAPI until rings are ready net: ethernet: mlx4: Fix memory allocation in mlx4_buddy_init() affs: fix basic permission bits to actually work fs/affs: use octal for permissions ALSA; firewire-tascam: exclude Tascam FE-8 from detection * net: usb: Fix uninit-was-stored issue in asix_read_phy_addr() drivers/net/usb/asix_common.c * cfg80211: regulatory: reject invalid hints net/wireless/reg.c mm/hugetlb: fix a race between hugetlb sysctl handlers checkpatch: fix the usage of capture group ( ... ) vfio/pci: Fix SR-IOV VF handling with MMIO blocking * net: initialize fastreuse on inet_inherit_port net/ipv4/inet_hashtables.c * net: refactor bind_bucket fastreuse into helper include/net/inet_connection_sock.h net/ipv4/inet_connection_sock.c * KVM: arm64: Set HCR_EL2.PTW to prevent AT taking synchronous exception arch/arm64/include/asm/kvm_arm.h * KVM: arm64: Survive synchronous exceptions caused by AT instructions arch/arm64/include/asm/kvm_asm.h KVM: arm64: Defer guest entry when an asynchronous exception is pending * KVM: arm64: Add kvm_extable for vaxorcism code arch/arm64/include/asm/kvm_asm.h arch/arm64/kernel/vmlinux.lds.S vfio-pci: Invalidate mmaps and block MMIO access on disabled memory vfio-pci: Fault mmaps to enable vma tracking vfio/type1: Support faulting PFNMAP vmas * mm: slub: fix conversion of freelist_corrupted() mm/slub.c dm thin metadata: Avoid returning cmd->bm wild pointer on error dm cache metadata: Avoid returning cmd->bm wild pointer on error libata: implement ATA_HORKAGE_MAX_TRIM_128M and apply to Sandisks * block: Move SECTOR_SIZE and SECTOR_SHIFT definitions into <linux/blkdev.h> drivers/block/brd.c drivers/block/zram/zram_drv.h include/linux/blkdev.h include/linux/device-mapper.h include/uapi/linux/msdos_fs.h * block: allow for_each_bvec to support zero len bvec include/linux/bvec.h ALSA: firewire-digi00x: exclude Avid Adrenaline from detection ALSA: pcm: oss: Remove superfluous WARN_ON() for mulaw sanity check ALSA: ca0106: fix error code handling usb: qmi_wwan: add D-Link DWM-222 A2 device ID qmi_wwan: new Telewell and Sierra device IDs drivers: net: usb: qmi_wwan: add QMI_QUIRK_SET_DTR for Telit PID 0x1201 net: usb: qmi_wwan: add Telit 0x1050 composition btrfs: fix potential deadlock in the search ioctl * uaccess: Add non-pagefault user-space write function include/linux/uaccess.h mm/maccess.c * uaccess: Add non-pagefault user-space read functions include/linux/uaccess.h mm/maccess.c btrfs: set the lockdep class for log tree extent buffers btrfs: Remove extraneous extent_buffer_get from tree_mod_log_rewind btrfs: Remove redundant extent_buffer_get in get_old_root btrfs: drop path before adding new uuid tree entry * include/linux/log2.h: add missing () around n in roundup_pow_of_two() include/linux/log2.h thermal: ti-soc-thermal: Fix bogus thermal shutdowns for omap4430 iommu/vt-d: Serialize IOMMU GCMD register modifications tg3: Fix soft lockup when tg3_reset_task() fails. * fix regression in "epoll: Keep a reference on files added to the check list" fs/eventpoll.c bnxt_en: Fix PCI AER error recovery flow bnxt_en: Check for zero dir entries in NVRAM. dmaengine: pl330: Fix burst length if burst size is smaller than bus width net: arc_emac: Fix memleak in arc_mdio_probe ravb: Fixed to be able to unload modules net: hns: Fix memleak in hns_nic_dev_probe netfilter: nf_tables: fix destination register zeroing netfilter: nf_tables: incorrect enum nft_list_attributes definition netfilter: nf_tables: add NFTA_SET_USERDATA if not null MIPS: BMIPS: Also call bmips_cpu_setup() for secondary cores MIPS: mm: BMIPS5000 has inclusive physical caches dmaengine: at_hdmac: check return value of of_find_device_by_node() in at_dma_xlate() batman-adv: bla: use netif_rx_ni when not in interrupt context batman-adv: Avoid uninitialized chaddr when handling DHCP * dmaengine: of-dma: Fix of_dma_router_xlate's of_dma_xlate handling drivers/dma/of-dma.c xen/xenbus: Fix granting of vmalloc'd memory s390: don't trace preemption in percpu macros ceph: don't allow setlease on cephfs nvmet: Disable keep-alive timer when kato is cleared to 0h hwmon: (applesmc) check status earlier. perf record/stat: Explicitly call out event modifiers in the documentation * HID: core: Sanitize event code and type when mapping input drivers/hid/hid-input.c drivers/hid/hid-multitouch.c include/linux/hid.h * HID: core: Correctly handle ReportSize being zero drivers/hid/hid-core.c * ANDROID: overflow.h: fix merge issue with 4.9.235 include/linux/overflow.h Merge 4.9.235 into android-4.9-q Linux 4.9.235 * ALSA: usb-audio: Update documentation comment for MS2109 quirk sound/usb/quirks-table.h * HID: hiddev: Fix slab-out-of-bounds write in hiddev_ioctl_usage() drivers/hid/usbhid/hiddev.c btrfs: check the right error variable in btrfs_del_dir_entries_in_log usb: storage: Add unusual_uas entry for Sony PSZ drives * USB: gadget: u_f: Unbreak offset calculation in VLAs drivers/usb/gadget/u_f.h USB: gadget: f_ncm: add bounds checks to ncm_unwrap_ntb() * USB: gadget: u_f: add overflow checks to VLA macros drivers/usb/gadget/u_f.h * overflow.h: Add allocation size calculation helpers drivers/md/dm-table.c include/linux/overflow.h usb: host: ohci-exynos: Fix error handling in exynos_ohci_probe() * USB: Ignore UAS for JMicron JMS567 ATA/ATAPI Bridge drivers/usb/storage/unusual_devs.h * USB: quirks: Add no-lpm quirk for another Raydium touchscreen drivers/usb/core/quirks.c usb: uas: Add quirk for PNY Pro Elite USB: yurex: Fix bad gfp argument * device property: Fix the secondary firmware node handling in set_primary_fwnode() drivers/base/core.c * PM: sleep: core: Fix the handling of pending runtime resume requests drivers/base/power/main.c * xhci: Do warm-reset when both CAS and XDEV_RESUME are set drivers/usb/host/xhci-hub.c XEN uses irqdesc::irq_data_common::handler_data to store a per interrupt XEN data pointer which contains XEN specific information. * writeback: Fix sync livelock due to b_dirty_time processing fs/fs-writeback.c include/trace/events/writeback.h * writeback: Avoid skipping inode writeback fs/fs-writeback.c include/linux/fs.h * writeback: Protect inode->i_io_list with inode->i_lock fs/fs-writeback.c serial: 8250: change lock order in serial8250_do_startup() serial: pl011: Don't leak amba_ports entry on driver register error serial: pl011: Fix oops on -EPROBE_DEFER serial: samsung: Removes the IRQ not found warning * vt_ioctl: change VT_RESIZEX ioctl to check for error return from vc_resize() drivers/tty/vt/vt_ioctl.c * vt: defer kfree() of vc_screenbuf in vc_do_resize() drivers/tty/vt/vt.c * USB: lvtest: return proper error code in probe drivers/usb/misc/lvstest.c fbcon: prevent user font height or width change from causing potential out-of-bounds access btrfs: fix space cache memory leak after transaction abort HID: i2c-hid: Always sleep 60ms after I2C_HID_PWR_ON commands powerpc/perf: Fix soft lockups due to missed interrupt accounting net: gianfar: Add of_node_put() before goto statement * scsi: ufs: Improve interrupt handling for shared interrupts drivers/scsi/ufs/ufshcd.c * scsi: ufs: Fix possible infinite loop in ufshcd_hold drivers/scsi/ufs/ufshcd.c s390/cio: add cond_resched() in the slow_eval_known_fn() loop * fs: prevent BUG_ON in submit_bh_wbc() fs/buffer.c fs/ext4/super.c * jbd2: abort journal if free a async write error metadata buffer fs/jbd2/transaction.c * jbd2: make sure jh have b_transaction set in refile/unfile_buffer fs/jbd2/transaction.c usb: gadget: f_tcm: Fix some resource leaks in some error paths i2c: rcar: in slave mode, clear NACK earlier Revert "ath10k: fix DMA related firmware crashes on multiple devices" * efi: provide empty efi_enter_virtual_mode implementation include/linux/efi.h USB: sisusbvga: Fix a potential UB casued by left shifting a negative value powerpc/spufs: add CONFIG_COREDUMP dependency KVM: arm64: Fix symbol dependency in __hyp_call_panic_nvhe media: davinci: vpif_capture: fix potential double free EDAC/ie31200: Fallback if host bridge device is already initialized scsi: fcoe: Memory leak fix in fcoe_sysfs_fcf_del() ceph: fix potential mdsc use-after-free crash scsi: iscsi: Do not put host in iscsi_set_flashnode_param() locking/lockdep: Fix overflow in presentation of average lock-time drm/nouveau: Fix reference count leak in nouveau_connector_detect drm/nouveau/drm/noveau: fix reference count leak in nouveau_fbcon_open cec-api: prevent leaking memory through hole in structure mips/vdso: Fix resource leaks in genvdso.c rtlwifi: rtl8192cu: Prevent leaking urb * PCI: Fix pci_create_slot() reference count leak drivers/pci/slot.c omapfb: fix multiple reference count leaks due to pm_runtime_get_sync selftests/powerpc: Purge extra count_pmc() calls of ebb selftests scsi: lpfc: Fix shost refcount mismatch when deleting vport drm/amdgpu/display: fix ref count leak when pm_runtime_get_sync fails drm/amdgpu: fix ref count leak in amdgpu_display_crtc_set_config drm/amd/display: fix ref count leak in amdgpu_drm_ioctl drm/amdgpu: fix ref count leak in amdgpu_driver_open_kms drm/radeon: fix multiple reference count leak drm/amdkfd: Fix reference count leaks. * iommu/iova: Don't BUG on invalid PFNs drivers/iommu/iova.c scsi: target: tcmu: Fix crash on ARM during cmd completion media: pci: ttpci: av7110: fix possible buffer overflow caused by bad DMA value in debiirq() arm64: dts: qcom: msm8916: Pull down PDM GPIOs during sleep ASoC: tegra: Fix reference count leaks. ALSA: pci: delete repeated words in comments * gre6: Fix reception with IP6_TNL_F_RCV_DSCP_COPY net/ipv6/ip6_tunnel.c ipvlan: fix device features tipc: fix uninit skb->data in tipc_nl_compat_dumpit() * net: Fix potential wrong skb->protocol in skb_vlan_untag() net/core/skbuff.c * bonding: show saner speed for broadcast mode drivers/net/bonding/bond_main.c * bonding: fix a potential double-unregister drivers/net/bonding/bond_main.c Change-Id: Ic5e975d213782585fedbf8a5869b9b0aaad0bf66 Signed-off-by: lucaswei <lucaswei@google.com>
| * | Merge 4.9.236 into android-4.9-qGreg Kroah-Hartman2020-09-121-6/+10
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes in 4.9.236 HID: core: Correctly handle ReportSize being zero HID: core: Sanitize event code and type when mapping input perf record/stat: Explicitly call out event modifiers in the documentation hwmon: (applesmc) check status earlier. nvmet: Disable keep-alive timer when kato is cleared to 0h ceph: don't allow setlease on cephfs s390: don't trace preemption in percpu macros xen/xenbus: Fix granting of vmalloc'd memory dmaengine: of-dma: Fix of_dma_router_xlate's of_dma_xlate handling batman-adv: Avoid uninitialized chaddr when handling DHCP batman-adv: bla: use netif_rx_ni when not in interrupt context dmaengine: at_hdmac: check return value of of_find_device_by_node() in at_dma_xlate() MIPS: mm: BMIPS5000 has inclusive physical caches MIPS: BMIPS: Also call bmips_cpu_setup() for secondary cores netfilter: nf_tables: add NFTA_SET_USERDATA if not null netfilter: nf_tables: incorrect enum nft_list_attributes definition netfilter: nf_tables: fix destination register zeroing net: hns: Fix memleak in hns_nic_dev_probe ravb: Fixed to be able to unload modules net: arc_emac: Fix memleak in arc_mdio_probe dmaengine: pl330: Fix burst length if burst size is smaller than bus width bnxt_en: Check for zero dir entries in NVRAM. bnxt_en: Fix PCI AER error recovery flow fix regression in "epoll: Keep a reference on files added to the check list" tg3: Fix soft lockup when tg3_reset_task() fails. iommu/vt-d: Serialize IOMMU GCMD register modifications thermal: ti-soc-thermal: Fix bogus thermal shutdowns for omap4430 include/linux/log2.h: add missing () around n in roundup_pow_of_two() btrfs: drop path before adding new uuid tree entry btrfs: Remove redundant extent_buffer_get in get_old_root btrfs: Remove extraneous extent_buffer_get from tree_mod_log_rewind btrfs: set the lockdep class for log tree extent buffers uaccess: Add non-pagefault user-space read functions uaccess: Add non-pagefault user-space write function btrfs: fix potential deadlock in the search ioctl net: usb: qmi_wwan: add Telit 0x1050 composition drivers: net: usb: qmi_wwan: add QMI_QUIRK_SET_DTR for Telit PID 0x1201 qmi_wwan: new Telewell and Sierra device IDs usb: qmi_wwan: add D-Link DWM-222 A2 device ID ALSA: ca0106: fix error code handling ALSA: pcm: oss: Remove superfluous WARN_ON() for mulaw sanity check ALSA: firewire-digi00x: exclude Avid Adrenaline from detection block: allow for_each_bvec to support zero len bvec block: Move SECTOR_SIZE and SECTOR_SHIFT definitions into <linux/blkdev.h> libata: implement ATA_HORKAGE_MAX_TRIM_128M and apply to Sandisks dm cache metadata: Avoid returning cmd->bm wild pointer on error dm thin metadata: Avoid returning cmd->bm wild pointer on error mm: slub: fix conversion of freelist_corrupted() vfio/type1: Support faulting PFNMAP vmas vfio-pci: Fault mmaps to enable vma tracking vfio-pci: Invalidate mmaps and block MMIO access on disabled memory KVM: arm64: Add kvm_extable for vaxorcism code KVM: arm64: Defer guest entry when an asynchronous exception is pending KVM: arm64: Survive synchronous exceptions caused by AT instructions KVM: arm64: Set HCR_EL2.PTW to prevent AT taking synchronous exception net: refactor bind_bucket fastreuse into helper net: initialize fastreuse on inet_inherit_port vfio/pci: Fix SR-IOV VF handling with MMIO blocking checkpatch: fix the usage of capture group ( ... ) mm/hugetlb: fix a race between hugetlb sysctl handlers cfg80211: regulatory: reject invalid hints net: usb: Fix uninit-was-stored issue in asix_read_phy_addr() ALSA; firewire-tascam: exclude Tascam FE-8 from detection fs/affs: use octal for permissions affs: fix basic permission bits to actually work net: ethernet: mlx4: Fix memory allocation in mlx4_buddy_init() bnxt: don't enable NAPI until rings are ready netlabel: fix problems with mapping removal net: usb: dm9601: Add USB ID of Keenetic Plus DSL sctp: not disable bh in the whole sctp_get_port_local() net: disable netpoll on fresh napis Linux 4.9.236 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I707909fadc45a09f6ecdacb81a294421af163664
| | * affs: fix basic permission bits to actually workMax Staudt2020-09-121-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ Upstream commit d3a84a8d0dde4e26bc084b36ffcbdc5932ac85e2 ] The basic permission bits (protection bits in AmigaOS) have been broken in Linux' AFFS - it would only set bits, but never delete them. Also, contrary to the documentation, the Archived bit was not handled. Let's fix this for good, and set the bits such that Linux and classic AmigaOS can coexist in the most peaceful manner. Also, update the documentation to represent the current state of things. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Max Staudt <max@enpas.org> Signed-off-by: David Sterba <dsterba@suse.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
* | | Merge android-4.9-q (4.9.219) into android-msm-pixel-4.9-ltslucaswei2020-04-241-0/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge 4.9.219 into android-4.9-q Linux 4.9.219 * drm/msm: Use the correct dma_sync calls in msm_gem drivers/gpu/drm/msm/msm_gem.c * drm_dp_mst_topology: fix broken drm_dp_sideband_parse_remote_dpcd_read() drivers/gpu/drm/drm_dp_mst_topology.c * usb: dwc3: don't set gadget->is_otg flag drivers/usb/dwc3/gadget.c * arm64: Fix size of __early_cpu_boot_status arch/arm64/kernel/head.S * drm/msm: stop abusing dma_map/unmap for cache drivers/gpu/drm/msm/msm_gem.c * clk: qcom: rcg: Return failure for RCG update drivers/clk/qcom/clk-rcg2.c RDMA/cm: Update num_paths in cma_resolve_iboe_route error flow Bluetooth: RFCOMM: fix ODEBUG bug in rfcomm_dev_ioctl ceph: canonicalize server path in place ceph: remove the extra slashes in the server path IB/hfi1: Fix memory leaks in sysfs registration and unregistration IB/hfi1: Call kobject_put() when kobject_init_and_add() fails ASoC: jz4740-i2s: Fix divider written at incorrect offset in register tools/accounting/getdelays.c: fix netlink attribute length * random: always use batched entropy for get_random_u{32,64} drivers/char/random.c net: phy: micrel: kszphy_resume(): add delay after genphy_resume() before accessing PHY registers slcan: Don't transmit uninitialized stack data in padding net: stmmac: dwmac1000: fix out-of-bounds mac address reg setting net: dsa: bcm_sf2: Ensure correct sub-node is parsed mm: mempolicy: require at least one nodeid for MPOL_PREFERRED padata: always acquire cpu_hotplug_lock before pinst->lock net: dsa: tag_brcm: Fix skb->fwd_offload_mark location * coresight: do not use the BIT() macro in the UAPI header include/uapi/linux/coresight-stm.h * blk-mq: Allow blocking queue tag iter callbacks block/blk-mq-tag.c * blk-mq: sync the update nr_hw_queues with blk_mq_queue_tag_busy_iter block/blk-mq-tag.c block/blk-mq.c drm/etnaviv: replace MMU flush marker with flush sequence sctp: fix possibly using a bad saddr with a given dst sctp: fix refcount bug in sctp_wfree * net, ip_tunnel: fix interface lookup with no key net/ipv4/ip_tunnel.c * ipv4: fix a RCU-list lock in fib_triestat_seq_show net/ipv4/fib_trie.c drm/bochs: downgrade pci_request_region failure from error to warning * l2tp: fix race between l2tp_session_delete() and l2tp_tunnel_closeall() net/l2tp/l2tp_core.c net/l2tp/l2tp_core.h * l2tp: ensure sessions are freed after their PPPOL2TP socket net/l2tp/l2tp_ppp.c ANDROID: cuttlefish_defconfig: Minimally enable EFI Merge 4.9.218 into android-4.9-q Linux 4.9.218 perf map: Fix off by one in strncpy() size argument * arm64: alternative: fix build with clang integrated assembler arch/arm64/include/asm/alternative.h net: ks8851-ml: Fix IO operations, again * bpf: Explicitly memset the bpf_attr structure kernel/bpf/syscall.c * vt: vt_ioctl: fix use-after-free in vt_in_use() drivers/tty/vt/vt_ioctl.c * locking/atomic, kref: Add kref_read() include/linux/kref.h * vt: vt_ioctl: fix VT_DISALLOCATE freeing in-use virtual console drivers/tty/vt/vt.c drivers/tty/vt/vt_ioctl.c * vt: vt_ioctl: remove unnecessary console allocation checks drivers/tty/vt/vt_ioctl.c * vt: switch vt_dont_switch to bool drivers/tty/vt/vt_ioctl.c include/linux/vt_kern.h * vt: ioctl, switch VT_IS_IN_USE and VT_BUSY to inlines drivers/tty/vt/vt_ioctl.c * vt: selection, introduce vc_is_sel drivers/tty/vt/selection.c drivers/tty/vt/vt.c drivers/tty/vt/vt_ioctl.c include/linux/selection.h mac80211: fix authentication with iwlwifi/mvm mac80211: Check port authorization in the ieee80211_tx_dequeue() case media: xirlink_cit: add missing descriptor sanity checks media: stv06xx: add missing descriptor sanity checks media: dib0700: fix rc endpoint lookup media: ov519: add missing endpoint sanity checks * libfs: fix infoleak in simple_attr_read() fs/libfs.c staging: wlan-ng: fix use-after-free Read in hfa384x_usbin_callback staging: wlan-ng: fix ODEBUG bug in prism2sta_disconnect_usb staging: rtl8188eu: Add ASUS USB-N10 Nano B1 to device table media: usbtv: fix control-message timeouts media: flexcop-usb: fix endpoint sanity check usb: musb: fix crash with highmen PIO and usbmon USB: serial: io_edgeport: fix slab-out-of-bounds read in edge_interrupt_callback USB: cdc-acm: restore capability check order USB: serial: option: add Wistron Neweb D19Q1 USB: serial: option: add BroadMobi BM806U USB: serial: option: add support for ASKEY WWHC050 tools: Let O= makes handle a relative path with -C option Input: raydium_i2c_ts - fix error codes in raydium_i2c_boot_trigger() Input: raydium_i2c_ts - use true and false for boolean values * vti6: Fix memory leak of skb if input policy check fails net/ipv6/ip6_vti.c netfilter: nft_fwd_netdev: validate family and chain type * xfrm: policy: Fix doulbe free in xfrm_policy_timer net/xfrm/xfrm_policy.c * xfrm: add the missing verify_sec_ctx_len check in xfrm_add_acquire net/xfrm/xfrm_user.c * xfrm: fix uctx len check in verify_sec_ctx_len net/xfrm/xfrm_user.c * vti[6]: fix packet tx through bpf_redirect() in XinY cases net/ipv4/Kconfig net/ipv4/ip_vti.c net/ipv6/ip6_vti.c * genirq: Fix reference leaks on irq affinity notifiers kernel/irq/manage.c mac80211: mark station unauthorized before key removal * scsi: sd: Fix optimal I/O size for devices that change reported values drivers/scsi/sd.c scripts/dtc: Remove redundant YYLOC global declaration perf probe: Do not depend on dwfl_module_addrsym() ARM: dts: omap5: Add bus_dma_limit for L3 bus ARM: dts: dra7: Add bus_dma_limit for L3 bus i2c: hix5hd2: add missed clk_disable_unprepare in remove sxgbe: Fix off by one in samsung driver strncpy size arg mac80211: Do not send mesh HWMP PREQ if HWMP is disabled scsi: ipr: Fix softlockup when rescanning devices in petitboot dt-bindings: net: FMan erratum A050385 cpupower: avoid multiple definition with gcc -fno-common * net: ipv4: don't let PMTU updates increase route MTU net/ipv4/route.c KVM: VMX: Do not allow reexecute_instruction() when skipping MMIO instr hsr: set .netnsok flag hsr: add restart routine into hsr_get_node_list() hsr: use rcu_read_lock() in hsr_get_node_{list/status}() net: mvneta: Fix the case where the last poll did not process all rx vxlan: check return value of gro_cells_init() slcan: not call free_netdev before rtnl_unlock in slcan_open NFC: fdp: Fix a signedness bug in fdp_nci_send_patch() net_sched: keep alloc_hash updated after hash allocation net_sched: cls_route: remove the right filter from hashtable net: dsa: Fix duplicate frames flooded by learning macsec: restrict to ethernet devices hsr: fix general protection fault in hsr_addr_is_self() * Revert "drm/dp_mst: Skip validating ports during destruction, just ref" drivers/gpu/drm/drm_dp_mst_topology.c staging: greybus: loopback_test: fix potential path truncations staging: greybus: loopback_test: fix potential path truncation * arm64: smp: fix smp_send_stop() behaviour arch/arm64/kernel/smp.c ALSA: hda/realtek: Fix pop noise on ALC225 * futex: Unbreak futex hashing kernel/futex.c * futex: Fix inode life-time issue fs/inode.c include/linux/fs.h include/linux/futex.h kernel/futex.c * kbuild: Disable -Wpointer-to-enum-cast scripts/Makefile.extrawarn USB: cdc-acm: fix rounding error in TIOCSSERIAL USB: cdc-acm: fix close_delay and closing_wait units in TIOCSSERIAL * x86/mm: split vmalloc_sync_all() include/linux/vmalloc.h kernel/notifier.c mm/vmalloc.c * mm, slub: prevent kmalloc_node crashes and memory leaks mm/slub.c * mm: slub: be more careful about the double cmpxchg of freelist mm/slub.c * memcg: fix NULL pointer dereference in __mem_cgroup_usage_unregister_event mm/memcontrol.c * rtc: max8907: add missing select REGMAP_IRQ drivers/rtc/Kconfig intel_th: Fix user-visible error codes staging/speakup: fix get_word non-space look-ahead staging: rtl8188eu: Add device id for MERCUSYS MW150US v2 mmc: sdhci-of-at91: fix cd-gpios for SAMA5D2 iio: magnetometer: ak8974: Fix negative raw values in sysfs ALSA: pcm: oss: Remove WARNING from snd_pcm_plug_alloc() checks ALSA: pcm: oss: Avoid plugin buffer overflow ALSA: seq: oss: Fix running status after receiving sysex ALSA: seq: virmidi: Fix running status after receiving sysex ALSA: line6: Fix endless MIDI read loop USB: serial: pl2303: add device-id for HP LD381 * usb: host: xhci-plat: add a shutdown drivers/usb/host/xhci-plat.c USB: serial: option: add ME910G1 ECM composition 0x110b * usb: quirks: add NO_LPM quirk for RTL8153 based ethernet adapters drivers/usb/core/quirks.c * USB: Disable LPM on WD19's Realtek Hub drivers/usb/core/quirks.c altera-stapl: altera_get_note: prevent write beyond end of 'key' drm/exynos: dsi: fix workaround for the legacy clock name drm/exynos: dsi: propagate error value and silence meaningless warning spi/zynqmp: remove entry that causes a cs glitch ARM: dts: dra7: Add "dma-ranges" property to PCIe RC DT nodes powerpc: Include .BTF section * spi: qup: call spi_qup_pm_resume_runtime before suspending drivers/spi/spi-qup.c * UPSTREAM: ipv6: ndisc: add support for 'PREF64' dns64 prefix identifier include/net/ndisc.h net/ipv6/ndisc.c ANDROID: dm-bow: Fix free_show value is incorrect * UPSTREAM: bpf: Explicitly memset the bpf_attr structure kernel/bpf/syscall.c Merge 4.9.217 into android-4.9-q Linux 4.9.217 * ipv4: ensure rcu_read_lock() in cipso_v4_error() net/ipv4/cipso_ipv4.c * mm: slub: add missing TID bump in kmem_cache_alloc_bulk() mm/slub.c ARM: 8958/1: rename missed uaccess .fixup section ARM: 8957/1: VDSO: Match ARMv8 timer in cntvct_functional() * jbd2: fix data races at struct journal_head fs/jbd2/transaction.c * signal: avoid double atomic counter increments for user accounting kernel/signal.c mac80211: rx: avoid RCU list traversal under mutex net: ks8851-ml: Fix IRQ handling and locking * cfg80211: check reg_rule for NULL in handle_channel_custom() net/wireless/reg.c HID: i2c-hid: add Trekstor Surfbook E11B to descriptor override * HID: apple: Add support for recent firmware on Magic Keyboards drivers/hid/hid-apple.c ACPI: watchdog: Allow disabling WDAT at boot perf/amd/uncore: Replace manual sampling check with CAP_NO_INTERRUPT flag batman-adv: Use explicit tvlv padding for ELP packets batman-adv: Avoid probe ELP information leak batman-adv: update data pointers after skb_cow() batman-adv: Don't schedule OGM for disabled interface batman-adv: Avoid free/alloc race when handling OGM buffer batman-adv: Avoid free/alloc race when handling OGM2 buffer batman-adv: Fix duplicated OGMs on NETDEV_UP batman-adv: Prevent duplicated gateway_node entry batman-adv: Fix multicast TT issues with bogus ROAM flags batman-adv: Avoid storing non-TT-sync flags on singular entries too batman-adv: Fix debugfs path for renamed softif batman-adv: Fix debugfs path for renamed hardif batman-adv: prevent TT request storms by not sending inconsistent TT TLVLs batman-adv: Fix TT sync flags for intermediate TT responses batman-adv: Avoid race in TT TVLV allocator helper batman-adv: Fix internal interface indices types batman-adv: Fix lock for ogm cnt access in batadv_iv_ogm_calc_tq batman-adv: Fix check of retrieved orig_gw in batadv_v_gw_is_eligible batman-adv: Always initialize fragment header priority batman-adv: Avoid spurious warnings from bat_v neigh_cmp implementation batman-adv: fix TT sync flag inconsistencies batman-adv: Accept only filled wifi station info batman-adv: Use default throughput value on cfg80211 error batman-adv: Fix rx packet/bytes stats on local ARP reply batman-adv: Initialize gw sel_class via batadv_algo batman-adv: Fix transmission of final, 16th fragment batman-adv: Fix double free during fragment merge error efi: Add a sanity check to efivar_store_raw() * ipv6: restrict IPV6_ADDRFORM operation net/ipv6/ipv6_sockglue.c iommu/vt-d: Ignore devices with out-of-spec domain number iommu/vt-d: Fix the wrong printing in RHSA parsing mwifiex: Fix heap overflow in mmwifiex_process_tdls_action_frame() netfilter: cthelper: add missing attribute validation for cthelper * nl80211: add missing attribute validation for channel switch net/wireless/nl80211.c * nl80211: add missing attribute validation for beacon report scanning net/wireless/nl80211.c * nl80211: add missing attribute validation for critical protocol indication net/wireless/nl80211.c iommu/vt-d: Fix a bug in intel_iommu_iova_to_phys() for huge page iommu/vt-d: dmar: replace WARN_TAINT with pr_warn + add_taint efi: Fix a race and a buffer overflow while reading efivars via sysfs ARC: define __ALIGN_STR and __ALIGN symbols for ARC KVM: x86: clear stale x86_emulate_ctxt->intercept value gfs2_atomic_open(): fix O_EXCL|O_CREAT handling on cold dcache * cifs_atomic_open(): fix double-put on late allocation failure fs/open.c drm/amd/display: remove duplicated assignment to grph_obj_type * workqueue: don't use wq_select_unbound_cpu() for bound works kernel/workqueue.c iommu/vt-d: quirk_ioat_snb_local_iommu: replace WARN_TAINT with pr_warn + add_taint virtio-blk: fix hw_queue stopped on arbitrary error * net: phy: fix MDIO bus PM PHY resuming drivers/net/phy/phy_device.c include/linux/phy.h * cgroup: memcg: net: do not associate sock with unrelated cgroup kernel/cgroup.c mm/memcontrol.c * bonding/alb: make sure arp header is pulled before accessing it drivers/net/bonding/bond_alb.c * slip: make slhc_compress() more robust against malicious packets drivers/net/slip/slhc.c net: fec: validate the new settings in fec_enet_set_coalesce() macvlan: add cond_resched() during multicast processing ipvlan: don't deref eth hdr before checking it's set ipvlan: do not use cond_resched_rcu() in ipvlan_process_multicast() ipvlan: egress mcast packets are not exceptional ipvlan: do not add hardware address of master to its unicast filter list ipvlan: add cond_resched_rcu() while processing muticast backlog nfc: add missing attribute validation for vendor subcommand nfc: add missing attribute validation for SE API team: add missing attribute validation for array index team: add missing attribute validation for port ifindex net: fq: add missing attribute validation for orphan mask macsec: add missing attribute validation for port nl802154: add missing attribute validation for dev_type nl802154: add missing attribute validation * fib: add missing attribute validation for tun_id include/net/fib_rules.h bnxt_en: reinitialize IRQs when MTU is modified * r8152: check disconnect status after long sleep drivers/net/usb/r8152.c net: nfc: fix bounds checking bugs on "pipe" net: macsec: update SCI upon MAC address change. * ipv6/addrconf: call ipv6_mc_up() for non-Ethernet interface net/ipv6/addrconf.c gre: fix uninit-value in __iptunnel_pull_header cgroup, netclassid: periodically release file_lock on classid updating * net: phy: Avoid multiple suspends drivers/net/phy/phy_device.c * phy: Revert toggling reset changes. drivers/net/phy/phy_device.c NFS: Remove superfluous kmap in nfs_readdir_xdr_to_array Merge 4.9.216 into android-4.9-q Linux 4.9.216 crypto: algif_skcipher - use ZERO_OR_NULL_PTR in skcipher_recvmsg_async dm cache: fix a crash due to incorrect work item cancelling powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems dmaengine: coh901318: Fix a double lock bug in dma_tc_handle() hwmon: (adt7462) Fix an error return in ADT7462_REG_VOLT() ARM: imx: build v7_cpu_resume() unconditionally RMDA/cm: Fix missing ib_cm_destroy_id() in ib_cm_insert_listen() RDMA/iwcm: Fix iwcm work deallocation * ASoC: dapm: Correct DAPM handling of active widgets during shutdown sound/soc/soc-dapm.c ASoC: pcm512x: Fix unbalanced regulator enable call in probe error path * ASoC: pcm: Fix possible buffer overflow in dpcm state sysfs output sound/soc/soc-pcm.c ARM: dts: ls1021a: Restore MDIO compatible to gianfar dmaengine: tegra-apb: Prevent race conditions of tasklet vs free list dmaengine: tegra-apb: Fix use-after-free x86/pkeys: Manually set X86_FEATURE_OSPKE to preserve existing changes * vt: selection, push sel_lock up drivers/tty/vt/selection.c * vt: selection, push console lock down drivers/tty/vt/selection.c drivers/tty/vt/vt.c * vt: selection, close sel_buffer race drivers/tty/vt/selection.c tty:serial:mvebu-uart:fix a wrong return * fat: fix uninit-memory access for partial initialized inode fs/fat/inode.c vgacon: Fix a UAF in vgacon_invert_region * usb: core: port: do error out if usb_autopm_get_interface() fails drivers/usb/core/port.c * usb: core: hub: do error out if usb_autopm_get_interface() fails drivers/usb/core/hub.c * usb: quirks: add NO_LPM quirk for Logitech Screen Share drivers/usb/core/quirks.c * usb: storage: Add quirk for Samsung Fit flash drivers/usb/storage/unusual_devs.h cifs: don't leak -EAGAIN for stat() during reconnect s390/cio: cio_ignore_proc_seq_next should increase position index watchdog: da9062: do not ping the hw during stop() net: ks8851-ml: Fix 16-bit IO operation net: ks8851-ml: Fix 16-bit data access net: ks8851-ml: Remove 8-bit bus accessors drm/msm/dsi: save pll state before dsi host is powered off drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI usb: gadget: serial: fix Tx stall after buffer overflow * usb: gadget: ffs: ffs_aio_cancel(): Save/restore IRQ flags drivers/usb/gadget/function/f_fs.c * usb: gadget: composite: Support more than 500mA MaxPower drivers/usb/gadget/composite.c serial: ar933x_uart: set UART_CS_{RX,TX}_READY_ORIDE vhost: Check docket sk_family instead of call getname * audit: always check the netlink payload length in audit_receive_msg() kernel/audit.c mm/huge_memory.c: use head to check huge zero page perf hists browser: Restore ESC as "Zoom out" of DSO/thread/etc drivers: net: xgene: Fix the order of the arguments of 'alloc_etherdev_mqs()' * tuntap: correctly set SOCKWQ_ASYNC_NOSPACE drivers/net/tun.c slip: stop double free sl->dev in slip_open KVM: Check for a bad hva before dropping into the ghc slow path * namei: only return -ECHILD from follow_dotdot_rcu() fs/namei.c net: ena: make ena rxfh support ETH_RSS_HASH_NO_CHANGE * net: netlink: cap max groups which will be considered in netlink_bind() net/netlink/af_netlink.c * include/linux/bitops.h: introduce BITS_PER_TYPE include/linux/bitops.h serial: 8250: Check UPF_IRQ_SHARED in advance * ecryptfs: Fix up bad backport of fe2e082f5da5b4a0a92ae32978f81507ef37ec66 fs/ecryptfs/keystore.c i2c: jz4780: silence log flood on txabrt MIPS: VPE: Fix a double free and a memory leak in 'release_vpe()' * HID: hiddev: Fix race in in hiddev_disconnect() drivers/hid/usbhid/hiddev.c * HID: core: increase HID report buffer size to 8KiB include/linux/hid.h * HID: core: fix off-by-one memset in hid_report_raw_event() drivers/hid/hid-core.c ACPI: watchdog: Fix gas->access_width usage * ACPICA: Introduce ACPI_ACCESS_BYTE_WIDTH() macro include/acpi/actypes.h * audit: fix error handling in audit_data_to_entry() kernel/auditfilter.c * ext4: potential crash on allocation error in ext4_alloc_flex_bg_array() fs/ext4/super.c * net: sched: correct flower port blocking include/net/flow_dissector.h nfc: pn544: Fix occasional HW initialization failure sctp: move the format error check out of __sctp_sf_do_9_1_abort * ipv6: Fix route replacement with dev-only route net/ipv6/ip6_fib.c * ipv6: Fix nlmsg_flags when splitting a multipath route net/ipv6/route.c net: phy: restore mdio regs in the iproc mdio driver * net: fib_rules: Correctly set table field when table number exceeds 8 bits net/core/fib_rules.c * sysrq: Remove duplicated sysrq message drivers/tty/sysrq.c * sysrq: Restore original console_loglevel when sysrq disabled drivers/tty/sysrq.c * cfg80211: add missing policy for NL80211_ATTR_STATUS_CODE net/wireless/nl80211.c cifs: Fix mode output in debugging statements net: ena: ena-com.c: prevent NULL pointer dereference net: ena: fix incorrectly saving queue numbers when setting RSS indirection table net: ena: rss: store hash function as values and not bits net: ena: rss: fix failure to get indirection table net: ena: fix incorrect default RSS key net: ena: add missing ethtool TX timestamping indication net: ena: fix potential crash when rxfh key is NULL qmi_wwan: re-add DW5821e pre-production variant * cfg80211: check wiphy driver existence for drvinfo report net/wireless/ethtool.c mac80211: consider more elements in parsing CRC * drm/msm: Set dma maximum segment size for mdss drivers/gpu/drm/msm/msm_drv.c ipmi:ssif: Handle a possible NULL pointer reference * ext4: fix potential race between s_group_info online resizing and access fs/ext4/ext4.h fs/ext4/mballoc.c * ext4: fix potential race between s_flex_groups online resizing and access fs/ext4/ext4.h fs/ext4/ialloc.c fs/ext4/mballoc.c fs/ext4/resize.c fs/ext4/super.c * ext4: fix potential race between online resizing and write operations fs/ext4/balloc.c fs/ext4/ext4.h fs/ext4/resize.c fs/ext4/super.c iwlwifi: pcie: fix rb_allocator workqueue allocation * FROMLIST: HID: nintendo: add nintendo switch controller driver drivers/hid/Kconfig drivers/hid/Makefile drivers/hid/hid-core.c drivers/hid/hid-ids.h drivers/hid/hid-nintendo.c Merge 4.9.215 into android-4.9-q * UPSTREAM: sched/psi: Fix OOB write when writing 0 bytes to PSI files kernel/sched/psi.c * UPSTREAM: psi: Fix a division error in psi poll() kernel/sched/psi.c * UPSTREAM: sched/psi: Fix sampling error and rare div0 crashes with cgroups and high uptime kernel/sched/psi.c * UPSTREAM: sched/psi: Correct overly pessimistic size calculation kernel/sched/psi.c Linux 4.9.215 s390/mm: Explicitly compare PAGE_DEFAULT_KEY against zero in storage_key_init_range xen: Enable interrupts when calling _cond_resched() ata: ahci: Add shutdown to freeze hardware resources of ahci * netfilter: xt_hashlimit: limit the max size of hashtable net/netfilter/xt_hashlimit.c ALSA: seq: Fix concurrent access to queue current tick/time ALSA: seq: Avoid concurrent access to queue flags * ALSA: rawmidi: Avoid bit fields for state flags include/sound/rawmidi.h * ecryptfs: replace BUG_ON with error handling code fs/ecryptfs/crypto.c staging: greybus: use after free in gb_audio_manager_remove_all() * usb: gadget: composite: Fix bMaxPower for SuperSpeedPlus drivers/usb/gadget/composite.c scsi: Revert "target: iscsi: Wait for all commands to finish before freeing a session" scsi: Revert "RDMA/isert: Fix a recently introduced regression related to logout" Btrfs: fix btrfs_wait_ordered_range() so that it waits for all ordered extents KVM: apic: avoid calculating pending eoi from an uninitialized val KVM: nVMX: Check IO instruction VM-exit conditions KVM: nVMX: Refactor IO bitmap checks into helper function * ext4: fix race between writepages and enabling EXT4_EXTENTS_FL fs/ext4/ext4.h fs/ext4/migrate.c * ext4: rename s_journal_flag_rwsem to s_writepages_rwsem fs/ext4/ext4.h fs/ext4/inode.c fs/ext4/super.c * ext4: fix mount failure with quota configured as module fs/ext4/super.c * ext4: add cond_resched() to __ext4_find_entry() fs/ext4/namei.c * ext4: fix a data race in EXT4_I(inode)->i_disksize fs/ext4/ext4.h fs/ext4/inode.c * netfilter: xt_bpf: add overflow checks net/netfilter/xt_bpf.c KVM: nVMX: Don't emulate instructions in guest mode lib/stackdepot.c: fix global out-of-bounds in stack_slabs * vt: vt_ioctl: fix race in VT_RESIZEX drivers/tty/vt/vt_ioctl.c * VT_RESIZEX: get rid of field-by-field copyin drivers/tty/vt/vt_ioctl.c KVM: x86: don't notify userspace IOAPIC on edge-triggered interrupt EOI * xhci: apply XHCI_PME_STUCK_QUIRK to Intel Comet Lake platforms drivers/usb/host/xhci-pci.c Revert "ipc,sem: remove uneeded sem_undo_list lock usage in exit_sem()" tty: serial: imx: setup the correct sg entry for tx dma tty/serial: atmel: manage shutdown in case of RS485 or ISO7816 mode x86/mce/amd: Fix kobject lifetime x86/mce/amd: Publish the bank pointer only after setup has succeeded staging: rtl8188eu: Fix potential overuse of kernel memory staging: rtl8188eu: Fix potential security hole * USB: hub: Don't record a connect-change event during reset-resume drivers/usb/core/hub.c * USB: Fix novation SourceControl XL after suspend drivers/usb/core/quirks.c usb: uas: fix a plug & unplug racing * xhci: Force Maximum Packet size for Full-speed bulk devices to valid range. drivers/usb/host/xhci-mem.c staging: vt6656: fix sign of rx_dbm to bb_pre_ed_rssi. * staging: android: ashmem: Disallow ashmem memory from being remapped drivers/staging/android/ashmem.c * vt: selection, handle pending signals in paste_selection drivers/tty/vt/selection.c floppy: check FDC index for errors before assigning it net/sched: flower: add missing validation of TCA_FLOWER_FLAGS net/sched: matchall: add missing validation of TCA_MATCHALL_FLAGS enic: prevent waking up stopped tx queues over watchdog reset * selinux: ensure we cleanup the internal AVC counters on error in avc_update() security/selinux/avc.c help_next should increase position index * brd: check and limit max_part par drivers/block/brd.c microblaze: Prevent the overflow of the start iwlwifi: mvm: Fix thermal zone registration * irqchip/gic-v3-its: Reference to its_invall_cmd descriptor when building INVALL drivers/irqchip/irq-gic-v3-its.c bcache: explicity type cast in bset_bkey_last() reiserfs: prevent NULL pointer dereference in reiserfs_insert_item() * lib/scatterlist.c: adjust indentation in __sg_alloc_table lib/scatterlist.c ocfs2: fix a NULL pointer dereference when call ocfs2_update_inode_fsync_trans() radeon: insert 10ms sleep in dce5_crtc_load_lut * trigger_next should increase position index kernel/trace/trace_events_trigger.c ftrace: fpid_next() should increase position index drm/nouveau/disp/nv50-: prevent oops when no channel method map provided * irqchip/gic-v3: Only provision redistributors that are enabled in ACPI drivers/irqchip/irq-gic-v3.c cifs: fix NULL dereference in match_prepath iwlegacy: ensure loop counter addr does not wrap and cause an infinite loop hostap: Adjust indentation in prism2_hostapd_add_sta ARM: 8951/1: Fix Kexec compilation issue. * jbd2: switch to use jbd2_journal_abort() when failed to submit the commit record fs/jbd2/commit.c powerpc/sriov: Remove VF eeh_dev state when disabling SR-IOV ALSA: hda - Add docking station support for Lenovo Thinkpad T420s * driver core: platform: fix u32 greater or equal to zero comparison drivers/base/platform.c s390/ftrace: generate traced function stack frame x86/decoder: Add TEST opcode to Group3-2 remoteproc: Initialize rproc_class before use ide: serverworks: potential overflow in svwks_set_pio_mode() cmd64x: potential buffer overflow in cmd64x_program_timings() pwm: omap-dmtimer: Remove PWM chip in .remove before making it unfunctional * arm64: fix alternatives with LLVM's integrated assembler arch/arm64/include/asm/alternative.h scsi: iscsi: Don't destroy session if there are outstanding connections iommu/arm-smmu-v3: Use WRITE_ONCE() when changing validity of an STE usb: musb: omap2430: Get rid of musb .set_vbus for omap2430 glue drm/vmwgfx: prevent memory leak in vmw_cmdbuf_res_add drm/nouveau: Fix copy-paste error in nouveau_fence_wait_uevent_handler drm/nouveau/gr/gk20a,gm200-: add terminators to method lists read from fw vme: bridges: reduce stack usage * driver core: Print device when resources present in really_probe() drivers/base/dd.c * driver core: platform: Prevent resouce overflow from causing infinite loops drivers/base/platform.c tty: synclink_gt: Adjust indentation in several functions tty: synclinkmp: Adjust indentation in several functions * ASoC: atmel: fix build error with CONFIG_SND_ATMEL_SOC_DMA=m sound/soc/atmel/Kconfig wan: ixp4xx_hss: fix compile-testing on 64-bit Input: edt-ft5x06 - work around first register access error * rcu: Use WRITE_ONCE() for assignments to ->pprev for hlist_nulls include/linux/list_nulls.h include/linux/rculist_nulls.h soc/tegra: fuse: Correct straps' address for older Tegra124 device trees udf: Fix free space reporting for metadata and virtual partitions usbip: Fix unsafe unaligned pointer usage tools lib api fs: Fix gcc9 stringop-truncation compilation error ALSA: sh: Fix compile warning wrt const RDMA/rxe: Fix error type of mmap_offset pinctrl: sh-pfc: sh7269: Fix CAN function GPIOs * PM / devfreq: rk3399_dmc: Add COMPILE_TEST and HAVE_ARM_SMCCC dependency drivers/devfreq/Kconfig drivers/devfreq/event/Kconfig x86/vdso: Provide missing include file ARM: dts: r8a7779: Add device node for ARM global timer drm/mediatek: handle events when enabling/disabling crtc scsi: aic7xxx: Adjust indentation in ahc_find_syncrate ACPICA: Disassembler: create buffer fields in ACPI_PARSE_LOAD_PASS1 orinoco: avoid assertion in case of NULL pointer rtlwifi: rtl_pci: Fix -Wcast-function-type iwlegacy: Fix -Wcast-function-type ipw2x00: Fix -Wcast-function-type b43legacy: Fix -Wcast-function-type ALSA: usx2y: Adjust indentation in snd_usX2Y_hwdep_dsp_status reiserfs: Fix spurious unlock in reiserfs_fill_super() error handling * media: v4l2-device.h: Explicitly compare grp{id,mask} to zero in v4l2_device macros include/media/v4l2-device.h NFC: port100: Convert cpu_to_le16(le16_to_cpu(E1) + E2) to use le16_add_cpu(). PCI/IOV: Fix memory leak in pci_iov_add_virtfn() net/wan/fsl_ucc_hdlc: reject muram offsets above 64K regulator: rk808: Lower log level on optional GPIOs being not available drm/amdgpu: remove 4 set but not used variable in amdgpu_atombios_get_connector_info_from_object_table * clk: qcom: rcg2: Don't crash if our parent can't be found; return an error drivers/clk/qcom/clk-rcg2.c * kconfig: fix broken dependency in randconfig-generated .config scripts/kconfig/confdata.c * ext4, jbd2: ensure panic when aborting with zero errno fs/jbd2/checkpoint.c fs/jbd2/journal.c * tracing: Fix very unlikely race of registering two stat tracers kernel/trace/trace_stat.c * tracing: Fix tracing_stat return values in error handling paths kernel/trace/trace_stat.c x86/sysfb: Fix check for bad VRAM size * jbd2: clear JBD2_ABORT flag before journal_reset to update log tail info when load journal fs/jbd2/journal.c usb: gadget: udc: fix possible sleep-in-atomic-context bugs in gr_probe() uio: fix a sleep-in-atomic-context bug in uio_dmem_genirq_irqcontrol() sparc: Add .exit.data section. MIPS: Loongson: Fix potential NULL dereference in loongson3_platform_init() efi/x86: Map the entire EFI vendor string before copying it pinctrl: baytrail: Do not clear IRQ flags on direct-irq enabled pins media: sti: bdisp: fix a possible sleep-in-atomic-context bug in bdisp_device_run() gpio: gpio-grgpio: fix possible sleep-in-atomic-context bugs in grgpio_irq_map/unmap() powerpc/powernv/iov: Ensure the pdn for VFs always contains a valid PE number media: i2c: mt9v032: fix enum mbus codes and frame sizes pxa168fb: Fix the function used to release some memory in an error handling path pinctrl: sh-pfc: sh7264: Fix CAN function GPIOs gianfar: Fix TX timestamping with a stacked DSA driver brcmfmac: Fix use after free in brcmf_sdio_readframes() * cpu/hotplug, stop_machine: Fix stop_machine vs hotplug order kernel/cpu.c drm/gma500: Fixup fbdev stolen size usage evaluation Revert "KVM: VMX: Add non-canonical check on writes to RTIT address MSRs" scsi: qla2xxx: fix a potential NULL pointer dereference btrfs: print message when tree-log replay starts * jbd2: do not clear the BH_Mapped flag when forgetting a metadata buffer fs/jbd2/commit.c * jbd2: move the clearing of b_modified flag to the journal_unmap_buffer() fs/jbd2/commit.c fs/jbd2/transaction.c hwmon: (pmbus/ltc2978) Fix PMBus polling of MFR_COMMON definitions. perf/x86/intel: Fix inaccurate period in context switch for auto-reload s390/time: Fix clk type in get_tod_clock padata: Remove broken queue flushing perf/x86/amd: Add missing L2 misses event spec to AMD Family 17h's event map btrfs: log message when rw remount is attempted with unclean tree-log Btrfs: fix race between using extent maps and merging them * ext4: improve explanation of a mount failure caused by a misconfigured kernel fs/ext4/super.c * ext4: fix checksum errors with indexed dirs fs/ext4/dir.c fs/ext4/ext4.h fs/ext4/inode.c fs/ext4/namei.c * ext4: don't assume that mmp_nodename/bdevname have NUL fs/ext4/mmp.c * ALSA: usb-audio: Apply sample rate quirk for Audioengine D1 sound/usb/quirks.c * ecryptfs: fix a memory leak bug in ecryptfs_init_messaging() fs/ecryptfs/messaging.c * ecryptfs: fix a memory leak bug in parse_tag_1_packet() fs/ecryptfs/keystore.c ALSA: hda: Use scnprintf() for printing texts for sysfs/procfs KVM: x86: emulate RDPID x86/vdso: Use RDPID in preference to LSL when available Merge 4.9.214 into android-4.9-q Linux 4.9.214 libertas: make lbs_ibss_join_existing() return error code on rates overflow libertas: don't exit from lbs_ibss_join_existing() with RCU read lock held mwifiex: Fix possible buffer overflows in mwifiex_cmd_append_vsie_tlv() mwifiex: Fix possible buffer overflows in mwifiex_ret_wmm_get_status() * dm: fix potential for q->make_request_fn NULL pointer drivers/md/dm.c scsi: megaraid_sas: Do not initiate OCR if controller is not in ready state pinctrl: sh-pfc: r8a7778: Fix duplicate SDSELF_B and SD1_CLK_B powerpc/pseries: Allow not having ibm, hypertas-functions::hcall-multi-tce for DDW tools/power/acpi: fix compilation error ARM: dts: at91: sama5d3: define clock rate range for tcb1 ARM: dts: at91: sama5d3: fix maximum peripheral clock rates ARC: [plat-axs10x]: Add missing multicast filter number to GMAC node rtc: cmos: Stop using shared IRQ rtc: hym8563: Return -EINVAL if the time is known to be invalid NFSv4: try lease recovery on NFS4ERR_EXPIRED * nfs: NFS_SWAP should depend on SWAP fs/nfs/Kconfig * PCI: Don't disable bridge BARs when assigning bus resources drivers/pci/setup-bus.c * scsi: ufs: Fix ufshcd_probe_hba() reture value in case ufshcd_scsi_add_wlus() fails drivers/scsi/ufs/ufshcd.c RDMA/netlink: Do not always generate an ACK for some netlink operations * ASoC: pcm: update FE/BE trigger order based on the command sound/soc/soc-pcm.c rxrpc: Fix service call disconnection * perf/core: Fix mlock accounting in perf_mmap() kernel/events/core.c * clocksource: Prevent double add_timer_on() for watchdog_timer kernel/time/clocksource.c cifs: fail i/o on soft mounts if sessionsetup errors out KVM: nVMX: vmread should not set rflags to specify success in case of #PF KVM: VMX: Add non-canonical check on writes to RTIT address MSRs KVM: x86/mmu: Apply max PA check for MMIO sptes to 32-bit KVM btrfs: flush write bio if we loop in extent_write_cache_pages KVM: x86: Protect pmu_intel.c from Spectre-v1/L1TF attacks drm: atmel-hlcdc: enable clock before configuring timing engine Btrfs: fix race between adding and putting tree mod seq elements and nodes btrfs: remove trivial locking wrappers of tree mod log btrfs: use bool argument in free_root_pointers() Btrfs: fix assertion failure on fsync with NO_HOLES enabled * ext4: fix deadlock allocating crypto bounce page from mempool fs/ext4/page-io.c NFS: Directory page cache pages need to be locked when read NFS: Fix bool initialization/comparison NFS: Fix memory leaks and corruption in readdir NFS: switch back to to ->iterate() * bonding/alb: properly access headers in bond_alb_xmit() drivers/net/bonding/bond_alb.c net: systemport: Avoid RBUF stuck in Wake-on-LAN mode mfd: rn5t618: Mark ADC control register volatile mfd: da9062: Fix watchdog compatible string ubi: Fix an error pointer dereference in error handling code ubi: fastmap: Fix inverted logic in seen selfcheck nfsd: fix jiffies/time_t mixup in LRU list nfsd: fix delay timer on 32-bit architectures IB/mlx5: Fix outstanding_pi index for GSI qps net: tulip: Adjust indentation in {dmfe, uli526x}_init_module net: smc911x: Adjust indentation in smc911x_phy_configure * ppp: Adjust indentation into ppp_async_input drivers/net/ppp/ppp_async.c NFC: pn544: Adjust indentation in pn544_hci_check_presence powerpc/44x: Adjust indentation in ibm4xx_denali_fixup_memsize ext2: Adjust indentation in ext2_fill_super scsi: qla4xxx: Adjust indentation in qla4xxx_mem_free scsi: csiostor: Adjust indentation in csio_device_reset scsi: qla2xxx: Fix the endianness of the qla82xx_get_fw_size() return type clk: tegra: Mark fuse clock as critical KVM: x86: Free wbinvd_dirty_mask if vCPU creation fails KVM: PPC: Book3S PR: Free shared page if mmu initialization fails KVM: PPC: Book3S HV: Uninit vCPU if vcore creation fails KVM: x86: Protect MSR-based index computations in fixed_msr_to_seg_unit() from Spectre-v1/L1TF attacks KVM: x86: Protect x86_decode_insn from Spectre-v1/L1TF attacks KVM: x86: Protect MSR-based index computations from Spectre-v1/L1TF attacks in x86.c KVM: x86: Protect ioapic_read_indirect() from Spectre-v1/L1TF attacks KVM: x86: Protect MSR-based index computations in pmu.h from Spectre-v1/L1TF attacks KVM: x86: Protect ioapic_write_indirect() from Spectre-v1/L1TF attacks KVM: x86: Protect kvm_hv_msr_[get|set]_crash_data() from Spectre-v1/L1TF attacks KVM: x86: Protect kvm_lapic_reg_write() from Spectre-v1/L1TF attacks KVM: x86: Protect DR-based index computations from Spectre-v1/L1TF attacks KVM: x86: Refactor prefix decoding to prevent Spectre-v1/L1TF attacks sunrpc: expiry_time should be seconds not timeval mwifiex: fix unbalanced locking in mwifiex_process_country_ie() ARM: tegra: Enable PLLP bypass during Tegra124 LP1 btrfs: set trans->drity in btrfs_commit_transaction crypto: picoxcell - adjust the position of tasklet_init and fix missed tasklet_kill * crypto: api - Fix race condition in crypto_spawn_alg crypto/algapi.c crypto/api.c crypto/internal.h crypto: atmel-aes - Fix counter overflow in CTR mode crypto: pcrypt - Do not clear MAY_SLEEP flag in original request dm space map common: fix to ensure new block isn't already in use * of: Add OF_DMA_DEFAULT_COHERENT & select it on powerpc drivers/of/Kconfig drivers/of/address.c power: supply: ltc2941-battery-gauge: fix use-after-free scsi: qla2xxx: Fix mtcp dump collection failure * crypto: api - Check spawn->alg under lock in crypto_drop_spawn crypto/algapi.c ubifs: Fix deadlock in concurrent bulk-read and writepage ubifs: Change gfp flags in page allocation for bulk read PCI: keystone: Fix link training retries initiation mmc: spi: Toggle SPI polarity, do not hardcode it powerpc/pseries: Advance pfn if section is not present in lmb_is_removable() lib/test_kasan.c: fix memory leak in kmalloc_oob_krealloc_more() media: v4l2-rect.h: fix v4l2_rect_map_inside() top/left adjustments media/v4l2-core: set pages dirty upon releasing DMA buffers ALSA: dummy: Fix PCM format loop in proc output usb: gadget: f_ecm: Use atomic_t to track in-flight request usb: gadget: f_ncm: Use atomic_t to track in-flight request usb: gadget: legacy: set max_speed to super-speed brcmfmac: Fix memory leak in brcmf_usbdev_qinit mfd: dln2: More sanity checking for endpoints media: uvcvideo: Avoid cyclic entity chains due to malformed USB descriptors * tcp: clear tp->segs_{in|out} in tcp_disconnect() net/ipv4/tcp.c * tcp: clear tp->data_segs{in|out} in tcp_disconnect() net/ipv4/tcp.c * tcp: clear tp->delivered in tcp_disconnect() net/ipv4/tcp.c * tcp: clear tp->total_retrans in tcp_disconnect() net/ipv4/tcp.c rxrpc: Fix NULL pointer deref due to call->conn being cleared on disconnect rxrpc: Fix insufficient receive notification generation net_sched: fix an OOB access in cls_tcindex net: hsr: fix possible NULL deref in hsr_handle_frame() gtp: use __GFP_NOWARN to avoid memalloc warning cls_rsvp: fix rsvp_policy ASoC: qcom: Fix of-node refcount unbalance to link->codec_of_node sparc32: fix struct ipc64_perm type definition x86/cpu: Update cached HLE state on write to TSX_CTRL_CPUID_CLEAR media: iguanair: fix endpoint sanity check Merge 4.9.213 into android-4.9-q Linux 4.9.213 btrfs: do not zero f_bavail if we have available space * net: Fix skb->csum update in inet_proto_csum_replace16(). net/core/utils.c l2t_seq_next should increase position index seq_tab_next() should increase position index net/sonic: Quiesce SONIC before re-initializing descriptor memory net/sonic: Fix receive buffer handling net/sonic: Use MMIO accessors net/sonic: Add mutual exclusion for accessing shared state net: fsl/fman: rename IF_MODE_XGMII to IF_MODE_10G net/fsl: treat fsl,erratum-a011043 powerpc/fsl/dts: add fsl,erratum-a011043 qlcnic: Fix CPU soft lockup while collecting firmware dump * r8152: get default setting of WOL before initializing drivers/net/usb/r8152.c airo: Add missing CAP_NET_ADMIN check in AIROOLDIOCTL/SIOCDEVPRIVATE airo: Fix possible info leak in AIROOLDIOCTL/SIOCDEVPRIVATE scsi: fnic: do not queue commands during fwreset * vti[6]: fix packet tx through bpf_redirect() net/ipv4/ip_vti.c net/ipv6/ip6_vti.c * wireless: wext: avoid gcc -O3 warning net/wireless/wext-core.c mac80211: Fix TKIP replay protection immediately after key setup * wireless: fix enabling channel 12 for custom regulatory domain net/wireless/reg.c ixgbe: Fix calculation of queue with VFs and flow director on interface flap ixgbevf: Remove limit of 10 entries for unicast filter list clk: mmp2: Fix the order of timer mux parents mac80211: mesh: restrict airtime metric to peered established plinks soc: ti: wkup_m3_ipc: Fix race condition with rproc_boot ARM: dts: beagle-x15-common: Model 5V0 regulator media: si470x-i2c: Move free() past last use of 'radio' * usb: dwc3: turn off VBUS when leaving host mode drivers/usb/dwc3/core.c * Bluetooth: Fix race condition in hci_release_sock() net/bluetooth/hci_sock.c ttyprintk: fix a potential deadlock in interrupt context issue media: dvb-usb/dvb-usb-urb.c: initialize actlen to 0 media: gspca: zero usb_buf media: af9005: uninitialized variable printked media: digitv: don't continue if remote control state can't be read reiserfs: Fix memory leak of journal device string mm/mempolicy.c: fix out of bounds write in mpol_parse_str() * arm64: kbuild: remove compressed images on 'make ARCH=arm64 (dist)clean' arch/arm64/boot/Makefile tools lib: Fix builds when glibc contains strlcpy() iio: gyro: st_gyro: fix L3GD20H support iio: gyro: st_gyro: inline per-sensor data crypto: pcrypt - Fix user-after-free on module unload * vfs: fix do_last() regression fs/namei.c crypto: af_alg - Use bh_lock_sock in sk_destruct * net_sched: ematch: reject invalid TCF_EM_SIMPLE net/sched/ematch.c usb-storage: Disable UAS on JMicron SATA enclosure atm: eni: fix uninitialized variable warning * gpio: max77620: Add missing dependency on GPIOLIB_IRQCHIP drivers/gpio/Kconfig net: wan: sdla: Fix cast from pointer to integer of different size drivers/net/b44: Change to non-atomic bit operations on pwol_mask watchdog: rn5t618_wdt: fix module aliases arc: eznps: fix allmodconfig kconfig warning zd1211rw: fix storage endpoint lookup rtl8xxxu: fix interface sanity check brcmfmac: fix interface sanity check ath9k: fix storage endpoint lookup serial: 8250_bcm2835aux: Fix line mismatch on driver unbind staging: vt6656: Fix false Tx excessive retries reporting. staging: vt6656: use NULLFUCTION stack on mac80211 staging: vt6656: correct packet types for CTS protect, mode. staging: wlan-ng: ensure error return is actually returned staging: most: net: fix buffer overflow USB: serial: ir-usb: fix IrLAP framing USB: serial: ir-usb: fix link-speed handling USB: serial: ir-usb: add missing endpoint sanity check rsi_91x_usb: fix interface sanity check orinoco_usb: fix interface sanity check * ALSA: pcm: Add missing copy ops check before clearing buffer sound/core/pcm_native.c UPSTREAM: staging: most: net: fix buffer overflow * UPSTREAM: ALSA: pcm: Add missing copy ops check before clearing buffer sound/core/pcm_native.c Merge 4.9.212 into android-4.9-q Linux 4.9.212 net/x25: fix nonblocking connect netfilter: ipset: use bitmap infrastructure completely * bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free() include/linux/bitmap.h lib/bitmap.c md: Avoid namespace collision with bitmap API scsi: iscsi: Avoid potential deadlock in iscsi_if_rx func bcache: silence static checker warning libertas: Fix two buffer overflows at parsing bss descriptor coresight: tmc-etf: Do not call smp_processor_id from preemptible coresight: etb10: Do not call smp_processor_id from preemptible * arm64: kpti: Whitelist Cortex-A CPUs that don't implement the CSV3 field arch/arm64/kernel/cpufeature.c Documentation: Document arm64 kpti control * do_last(): fetch directory ->i_mode and ->i_uid before it's too late fs/namei.c tracing: xen: Ordered comparison of function pointers scsi: RDMA/isert: Fix a recently introduced regression related to logout hwmon: (nct7802) Fix voltage limits to wrong registers Input: sun4i-ts - add a check for devm_thermal_zone_of_sensor_register Input: pegasus_notetaker - fix endpoint sanity check Input: aiptek - fix endpoint sanity check Input: gtco - fix endpoint sanity check Input: sur40 - fix interface sanity checks * mmc: sdhci: fix minimum clock rate for v3 controller drivers/mmc/host/sdhci.c mmc: tegra: fix SDR50 tuning override ARM: 8950/1: ftrace/recordmcount: filter relocation types Input: keyspan-remote - fix control-message timeouts * hwmon: (core) Do not use device managed functions for memory allocations drivers/hwmon/hwmon.c * hwmon: (core) Fix double-free in __hwmon_device_register() drivers/hwmon/hwmon.c * hwmon: Deal with errors from the thermal subsystem drivers/hwmon/hwmon.c * hwmon: (core) Simplify sysfs attribute name allocation drivers/hwmon/hwmon.c hwmon: (adt7475) Make volt2reg return same reg as reg2volt input gtp: make sure only SOCK_DGRAM UDP sockets are accepted net: usb: lan78xx: Add .ndo_features_check tcp_bbr: improve arithmetic division in bbr_update_bw() * net_sched: fix datalen for ematch net/sched/ematch.c * net, ip_tunnel: fix namespaces move net/ipv4/ip_tunnel.c * net, ip6_tunnel: fix namespaces move net/ipv6/ip6_tunnel.c net: cxgb3_main: Add CAP_NET_ADMIN check to CHELSIO_GET_MEM firestream: fix memory leaks can, slip: Protect tty->disc_data in write_wakeup and close with RCU * net: phy: Keep reporting transceiver type drivers/net/phy/phy.c * net: ethtool: Add back transceiver type include/uapi/linux/ethtool.h net/core/ethtool.c m68k: Call timer_interrupt() with interrupts disabled IB/iser: Fix dma_nents type definition arm64: dts: juno: Fix UART frequency drm/radeon: fix bad DMA from INTERRUPT_CNTL2 dmaengine: ti: edma: fix missed failure handling * packet: fix data-race in fanout_flow_is_huge() net/packet/af_packet.c * net: neigh: use long type to store jiffies delta net/core/neighbour.c MIPS: Loongson: Fix return value of loongson_hwmon_init media: ov6650: Fix .get_fmt() V4L2_SUBDEV_FORMAT_TRY support media: ov6650: Fix some format attributes not under control media: ov6650: Fix incorrect use of JPEG colorspace afs: Fix large file support net: qca_spi: Move reset_count to struct qcaspi * net: netem: correct the parent's backlog when corrupted packet was dropped net/sched/sch_netem.c * net: netem: fix error path for corrupted GSO frames net/sched/sch_netem.c dmaengine: imx-sdma: fix size check for sdma script_number drm/msm/dsi: Implement reset correctly * act_mirred: Fix mirred_init_module error handling net/sched/act_mirred.c net: stmmac: fix length of PTP clock's name string llc: fix sk_buff refcounting in llc_conn_state_process() llc: fix another potential sk_buff leak in llc_ui_sendmsg() mac80211: accept deauth frames in IBSS mode net: stmmac: gmac4+: Not all Unicast addresses may be available nvme: retain split access workaround for capability reads net: ethernet: stmmac: Fix signedness bug in ipq806x_gmac_of_parse() * of: mdio: Fix a signedness bug in of_phy_get_and_connect() drivers/of/of_mdio.c net: stmmac: dwmac-meson8b: Fix signedness bug in probe net: broadcom/bcmsysport: Fix signedness in bcm_sysport_probe() net: hisilicon: Fix signedness bug in hix5hd2_dev_probe() iommu/amd: Wait for completion of IOTLB flush in attach_device net/rds: Fix 'ib_evt_handler_call' element in 'rds_ib_stat_names' net: sonic: replace dev_kfree_skb in sonic_send_packet hwmon: (shtc1) fix shtc1 and shtw1 id mask Btrfs: fix hang when loading existing inode cache off disk net: sonic: return NETDEV_TX_OK if failed to map buffer ath9k: dynack: fix possible deadlock in ath_dynack_node_{de}init iio: dac: ad5380: fix incorrect assignment to val bcma: fix incorrect update of BCMA_CORE_PCI_MDIO_DATA staging: greybus: light: fix a couple double frees x86, perf: Fix the dependency of the x86 insn decoder selftest * power: supply: Init device wakeup after device_add() drivers/power/supply/power_supply_core.c hwmon: (lm75) Fix write operations for negative temperatures * Partially revert "kfifo: fix kfifo_alloc() and kfifo_init()" lib/kfifo.c ahci: Do not export local variable ahci_em_messages mips: avoid explicit UB in assignment of mips_io_port_base mac80211: minstrel_ht: fix per-group max throughput rate initialization dmaengine: dw: platform: Switch to acpi_dma_controller_register() ASoC: sun4i-i2s: RX and TX counter registers are swapped * signal: Allow cifs and drbd to receive their terminating signals include/linux/signal.h kernel/signal.c ASoC: wm8737: Fix copy-paste error in wm8737_snd_controls ASoC: cs4349: Use PM ops 'cs4349_runtime_pm' ASoC: es8328: Fix copy-paste error in es8328_right_line_controls * ext4: set error return correctly when ext4_htree_store_dirent fails fs/ext4/inline.c crypto: caam - free resources in case caam_rng registration failed cifs: fix rmmod regression in cifs.ko caused by force_sig changes net/mlx5: Fix mlx5_ifc_query_lag_out_bits ALSA: aoa: onyx: always initialize register read value x86/kgbd: Use NMI_VECTOR not APIC_DM_NMI mic: avoid statically declaring a 'struct device'. * usb: host: xhci-hub: fix extra endianness conversion drivers/usb/host/xhci-hub.c qed: reduce maximum stack frame size libertas_tf: Use correct channel range in lbtf_geo_init scsi: libfc: fix null pointer dereference on a null lport net: pasemi: fix an use-after-free in pasemi_mac_phy_init() RDMA/hns: Fixs hw access invalid dma memory error * devres: allow const resource arguments include/linux/device.h lib/devres.c rxrpc: Fix uninitialized error code in rxrpc_send_data_packet() mfd: intel-lpss: Release IDA resources iommu/amd: Make iommu_disable safer clk: qcom: Fix -Wunused-const-variable dmaengine: hsu: Revert "set HSU_CH_MTSR to memory width" * perf/ioctl: Add check for the sample_period value kernel/events/core.c drm/msm/a3xx: remove TPL1 regs from snapshot rtc: pcf8563: Clear event flags and disable interrupts before requesting irq ASoC: ti: davinci-mcasp: Fix slot mask settings when using multiple AXRs net/af_iucv: always register net_device notifier * net: netem: fix backlog accounting for corrupted GSO frames net/sched/sch_netem.c drm/msm/mdp5: Fix mdp5_cfg_init error return powerpc/cacheinfo: add cacheinfo_teardown, cacheinfo_rebuild media: vivid: fix incorrect assignment operation when setting video mode * inet: frags: call inet_frags_fini() after unregister_pernet_subsys() net/ipv6/reassembly.c signal/cifs: Fix cifs_put_tcp_session to call send_sig instead of force_sig * iommu: Use right function to get group for device drivers/iommu/iommu.c misc: sgi-xp: Properly initialize buf in xpc_get_rsvd_page_pa serial: stm32: fix transmit_chars when tx is stopped crypto: ccp - fix AES CFB error exposed by new test vectors spi: spi-fsl-spi: call spi_finalize_current_message() at the end dmaengine: tegra210-adma: Fix crash during probe * thermal: cpu_cooling: Actually trace CPU load in thermal_power_cpu_get_power drivers/thermal/cpu_cooling.c backlight: lm3630a: Return 0 on success in update_status functions * kdb: do a sanity check on the cpu in kdb_per_cpu() kernel/debug/kdb/kdb_main.c ARM: riscpc: fix lack of keyboard interrupts after irq conversion pwm: meson: Don't disable PWM when setting duty repeatedly * netfilter: ebtables: CONFIG_COMPAT: reject trailing data after last rule net/bridge/netfilter/ebtables.c platform/x86: alienware-wmi: printing the wrong error code media: davinci/vpbe: array underflow in vpbe_enum_outputs() media: omap_vout: potential buffer overflow in vidioc_dqbuf() * l2tp: Fix possible NULL pointer dereference net/l2tp/l2tp_core.c dmaengine: tegra210-adma: restore channel status net: ena: fix ena_com_fill_hash_function() implementation net: ena: fix incorrect test of supported hash function net: ena: fix: Free napi resources when ena_up() fails net: ena: fix swapped parameters when calling ena_com_indirect_table_fill_entry iommu/vt-d: Make kernel parameter igfx_off work with vIOMMU IB/mlx5: Add missing XRC options to QP optional params mask * usb: gadget: fsl: fix link error against usb-gadget module drivers/usb/phy/Kconfig * ASoC: fix valid stream condition sound/soc/soc-pcm.c * packet: in recvmsg msg_name return at least sizeof sockaddr_ll net/packet/af_packet.c * ALSA: usb-audio: Handle the error from snd_usb_mixer_apply_create_quirk() sound/usb/mixer.c dmaengine: axi-dmac: Don't check the number of frames for alignment 6lowpan: Off by one handling ->nexthdr media: ov2659: fix unbalanced mutex_lock/unlock ARM: dts: ls1021: Fix SGMII PCS link remaining down after PHY disconnect powerpc: vdso: Make vdso32 installation conditional in vdso_install tipc: set sysctl_tipc_rmem and named_timeout right range hwmon: (w83627hf) Use request_muxed_region for Super-IO accesses ARM: pxa: ssp: Fix "WARNING: invalid free of devm_ allocated data" scsi: qla2xxx: Unregister chrdev if module initialization fails ehea: Fix a copy-paste err in ehea_init_port_res spi: bcm2835aux: fix driver to not allow 65535 (=-1) cs-gpios soc/fsl/qe: Fix an error code in qe_pin_request() spi: tegra114: fix for unpacked mode transfers spi: tegra114: clear packed bit for unpacked mode media: tw5864: Fix possible NULL pointer dereference in tw5864_handle_frame media: davinci-isif: avoid uninitialized variable use ARM: OMAP2+: Fix potentially uninitialized return value for _setup_reset() m68k: mac: Fix VIA timer counter accesses tipc: tipc clang warning jfs: fix bogus variable self-initialization regulator: tps65086: Fix tps65086_ldoa1_ranges for selector 0xB media: cx23885: check allocation return media: wl128x: Fix an error code in fm_download_firmware() media: cx18: update *pos correctly in cx18_read_pos() media: ivtv: update *pos correctly in ivtv_read_pos() net: sh_eth: fix a missing check of of_get_phy_mode xen, cpu_hotplug: Prevent an out of bounds access drivers/rapidio/rio_cm.c: fix potential oops in riocm_ch_listen() scsi: megaraid_sas: reduce module load time nios2: ksyms: Add missing symbol exports regulator: wm831x-dcdc: Fix list of wm831x_dcdc_ilim from mA to uA ARM: 8848/1: virt: Align GIC version check with arm64 counterpart ARM: 8847/1: pm: fix HYP/SVC mode mismatch when MCPM is used mmc: sdhci-brcmstb: handle mmc_of_parse() errors during probe clocksource/drivers/exynos_mct: Fix error path in timer resources initialization clocksource/drivers/sun5i: Fail gracefully when clock rate is unavailable NFS: Fix a soft lockup in the delegation recovery code fs/nfs: Fix nfs_parse_devname to not modify it's argument ASoC: qcom: Fix of-node refcount unbalance in apq8016_sbc_parse_of() drm/nouveau/pmu: don't print reply values if exec is false drm/nouveau/bios/ramcfg: fix missing parentheses when calculating RON net: dsa: qca8k: Enable delay for RGMII_ID mode regulator: pv88090: Fix array out-of-bounds access regulator: pv88080: Fix array out-of-bounds access regulator: pv88060: Fix array out-of-bounds access cdc-wdm: pass return value of recover_from_urb_loss dmaengine: mv_xor: Use correct device for DMA API vfio_pci: Enable memory accesses before calling pci_map_rom * keys: Timestamp new keys security/keys/key.c * block: don't use bio->bi_vcnt to figure out segment number block/blk-merge.c usb: phy: twl6030-usb: fix possible use-after-free on remove pinctrl: sh-pfc: sh73a0: Fix fsic_spdif pin groups pinctrl: sh-pfc: r8a7792: Fix vin1_data18_b pin group pinctrl: sh-pfc: r8a7791: Fix scifb2_data_c pin group pinctrl: sh-pfc: emev2: Add missing pinmux functions iw_cxgb4: use tos when finding ipv6 routes iw_cxgb4: use tos when importing the endpoint fbdev: chipsfb: remove set but not used variable 'size' rtc: pm8xxx: fix unintended sign extension rtc: 88pm80x: fix unintended sign extension rtc: 88pm860x: fix unintended sign extension * net: phy: fixed_phy: Fix fixed_phy not checking GPIO drivers/net/phy/fixed_phy.c thermal: mediatek: fix register index error rtc: ds1672: fix unintended sign extension staging: most: cdev: add missing check for cdev_add failure iwlwifi: mvm: fix RSS config command ARM: dts: lpc32xx: phy3250: fix SD card regulator voltage ARM: dts: lpc32xx: fix ARM PrimeCell LCD controller clocks property ARM: dts: lpc32xx: fix ARM PrimeCell LCD controller variant ARM: dts: lpc32xx: reparent keypad controller to SIC1 ARM: dts: lpc32xx: add required clocks property to keypad device node crypto: crypto4xx - Fix wrong ppc4xx_trng_probe()/ppc4xx_trng_remove() arguments tty: ipwireless: Fix potential NULL pointer dereference iwlwifi: mvm: fix A-MPDU reference assignment clk: sunxi-ng: sun8i-a23: Enable PLL-MIPI LDOs when ungating it rtc: cmos: ignore bogus century byte IB/iser: Pass the correct number of entries for dma mapped SGL ASoC: imx-sgtl5000: put of nodes if finding codec fails crypto: tgr192 - fix unaligned memory access media: s5p-jpeg: Correct step and max values for V4L2_CID_JPEG_RESTART_INTERVAL drm/etnaviv: NULL vs IS_ERR() buf in etnaviv_core_dump() arm64: dts: apq8016-sbc: Increase load on l11 for SDCARD RDMA/qedr: Fix out of bounds index check in query pkey RDMA/ocrdma: Fix out of bounds index check in query pkey IB/usnic: Fix out of bounds index check in query pkey clk: dove: fix refcount leak in dove_clk_init() clk: armada-xp: fix refcount leak in axp_clk_init() clk: kirkwood: fix refcount leak in kirkwood_clk_init() clk: armada-370: fix refcount leak in a370_clk_init() clk: vf610: fix refcount leak in vf610_clocks_init() clk: imx7d: fix refcount leak in imx7d_clocks_init() clk: imx6sx: fix refcount leak in imx6sx_clocks_init() clk: imx6q: fix refcount leak in imx6q_clocks_init() clk: samsung: exynos4: fix refcount leak in exynos4_get_xom() clk: socfpga: fix refcount leak clk: qoriq: fix refcount leak in clockgen_init() clk: highbank: fix refcount leak in hb_clk_init() Input: nomadik-ske-keypad - fix a loop timeout test pinctrl: sh-pfc: sh7734: Remove bogus IPSR10 value pinctrl: sh-pfc: sh7269: Add missing PCIOR0 field pinctrl: sh-pfc: sh7734: Add missing IPSR11 field pinctrl: sh-pfc: r8a7794: Remove bogus IPSR9 field pinctrl: sh-pfc: sh73a0: Add missing TO pin to tpu4_to3 group pinctrl: sh-pfc: r8a7791: Remove bogus marks from vin1_b_data18 group pinctrl: sh-pfc: r8a7791: Remove bogus ctrl marks from qspi_data4_b group pinctrl: sh-pfc: r8a7740: Add missing LCD0 marks to lcd0_data24_1 group pinctrl: sh-pfc: r8a7740: Add missing REF125CK pin to gether_gmii group * net: phy: Fix not to call phy_resume() if PHY is not attached drivers/net/phy/phy_device.c * drm/dp_mst: Skip validating ports during destruction, just ref drivers/gpu/drm/drm_dp_mst_topology.c exportfs: fix 'passing zero to ERR_PTR()' warning pcrypt: use format specifier in kobject_add mlxsw: reg: QEEC: Add minimum shaper fields pwm: lpss: Release runtime-pm reference from the driver's remove callback staging: comedi: ni_mio_common: protect register write overflow * ALSA: usb-audio: update quirk for B&W PX to remove microphone sound/usb/quirks-table.h IB/rxe: replace kvfree with vfree ALSA: hda: fix unused variable warning drm/virtio: fix bounds check in virtio_gpu_cmd_get_capset() drm/sti: do not remove the drm_bridge that was never added mt7601u: fix bbp version check in mt7601u_wait_bbp_ready powerpc/archrandom: fix arch_get_random_seed_int() xfs: Sanity check flags of Q_XQUOTARM call * UPSTREAM: mm/page_io.c: annotate refault stalls from swap_readpage mm/page_io.c * ANDROID: selinux: modify RTM_GETLINK permission security/selinux/include/classmap.h security/selinux/include/security.h security/selinux/nlmsgtab.c security/selinux/ss/policydb.c security/selinux/ss/policydb.h security/selinux/ss/services.c Merge 4.9.211 into android-4.9-q Linux 4.9.211 regulator: ab8500: Remove SYSCLKREQ from enum ab8505_regulator_id perf probe: Fix wrong address verification * scsi: core: scsi_trace: Use get_unaligned_be*() drivers/scsi/scsi_trace.c scsi: target: core: Fix a pr_debug() argument scsi: bnx2i: fix potential use after free scsi: qla4xxx: fix double free bug scsi: esas2r: unlock on error in esas2r_nvram_read_direct() reiserfs: fix handling of -EOPNOTSUPP in reiserfs_for_each_xattr * cfg80211: check for set_wiphy_params net/wireless/rdev-ops.h cw1200: Fix a signedness bug in cw1200_load_firmware() xen/blkfront: Adjust indentation in xlvbd_alloc_gendisk net: usb: lan78xx: limit size of local TSO packets * tcp: fix marked lost packets not being retransmitted net/ipv4/tcp_input.c * r8152: add missing endpoint sanity check drivers/net/usb/r8152.c net/wan/fsl_ucc_hdlc: fix out of bounds write on array utdm_info net: dsa: tag_qca: fix doubled Tx statistics macvlan: use skb_reset_mac_header() in macvlan_queue_xmit() batman-adv: Fix DAT candidate selection on little endian systems * netfilter: arp_tables: init netns pointer in xt_tgdtor_param struct net/ipv4/netfilter/arp_tables.c netfilter: fix a use-after-free in mtype_destroy() * cfg80211: fix page refcount issue in A-MSDU decap net/wireless/util.c arm64: dts: agilex/stratix10: fix pmu interrupt numbers scsi: fnic: fix invalid stack access scsi: fnic: use kernel's '%pM' format option to print MAC USB: serial: keyspan: handle unbound ports USB: serial: io_edgeport: handle unbound ports on URB completion USB: serial: io_edgeport: use irqsave() in USB's complete callback net: stmmac: Enable 16KB buffer size net: stmmac: 16KB buffer must be 16 byte aligned * mm/page-writeback.c: avoid potential division by zero in wb_min_max_ratio() mm/page-writeback.c perf report: Fix incorrectly added dimensions as switch perf data file perf hists: Fix variable name's inconsistency in hists__for_each() macro x86/efistub: Disable paging at mixed mode entry * usb: core: hub: Improved device recognition on remote wakeup drivers/usb/core/hub.c scsi: mptfusion: Fix double fetch bug in ioctl USB: serial: quatech2: handle unbound ports USB: serial: io_edgeport: add missing active-port sanity check USB: serial: ch341: handle unbound port at reset_resume USB: serial: suppress driver bind attributes USB: serial: opticon: fix control-message timeouts USB: serial: simple: Add Motorola Solutions TETRA MTP3xxx and MTP85xx iio: buffer: align the size of scan bytes to size of the largest element * block: fix an integer overflow in logical block size block/blk-settings.c include/linux/blkdev.h * Fix built-in early-load Intel microcode alignment firmware/Makefile ALSA: seq: Fix racy access for queue timer in proc read * clk: Don't try to enable critical clocks if prepare failed drivers/clk/clk.c dt-bindings: reset: meson8b: fix duplicate reset IDs ocfs2: call journal flush to mark journal as empty after journal recovery when mount hexagon: work around compiler crash hexagon: parenthesize registers in asm predicates ioat: ioat_alloc_ring() failure handling. MIPS: Prevent link failure with kcov instrumentation rseq/selftests: Turn off timeout setting scsi: libcxgbi: fix NULL pointer dereference in cxgbi_device_destroy() gpio: mpc8xxx: Add platform device to gpiochip->parent rtc: msm6242: Fix reading of 10-hour digit * f2fs: fix potential overflow fs/f2fs/data.c fs/f2fs/file.c rtlwifi: Remove unnecessary NULL check in rtl_regd_init spi: atmel: fix handling of cs_change set on non-last xfer mtd: spi-nor: fix silent truncation in spi_nor_read() media: exynos4-is: Fix recursive locking in isp_video_release() tty: serial: pch_uart: correct usage of dma_unmap_sg tty: serial: imx: use the sg count from dma_map_sg powerpc/powernv: Disable native PCIe port management PCI/PTM: Remove spurious "d" from granularity message * compat_ioctl: handle SIOCOUTQNSD net/socket.c clk: samsung: exynos5420: Preserve CPU clocks configuration during suspend/resume mei: fix modalias documentation iio: imu: adis16480: assign bias value only if operation succeeded platform/x86: asus-wmi: Fix keyboard brightness cannot be set to 0 * scsi: sd: Clear sdkp->protection_type if disk is reformatted without PI drivers/scsi/sd.c scsi: enclosure: Fix stale device oops with hot replug RDMA/srpt: Report the SCSI residual to the initiator cifs: Adjust indentation in smb2_open_file hsr: reset network header when supervision frame is created * gpio: Fix error message on out-of-range GPIO in lookup table drivers/gpio/gpiolib.c * iommu: Remove device link to group on failure drivers/iommu/iommu.c rtc: mt6397: fix alarm register overwrite dccp: Fix memleak in __feat_register_sp * ext4: add more paranoia checking in ext4_expand_extra_isize handling fs/ext4/inode.c fs/ext4/super.c * ext4: fix use-after-free race with debug_want_extra_isize fs/ext4/super.c wimax: i2400: Fix memory leak in i2400m_op_rfkill_sw_toggle wimax: i2400: fix memory leak media: usb:zr364xx:Fix KASAN:null-ptr-deref Read in zr364xx_vidioc_querycap mac80211: Do not send Layer 2 Update frame before authorization * cfg80211/mac80211: make ieee80211_send_layer2_update a public function include/net/cfg80211.h net/wireless/util.c * arm64: Make sure permission updates happen for pmd/pud arch/arm64/mm/mmu.c * arm64: Enforce BBM for huge IO/VMAP mappings arch/arm64/mm/mmu.c * arm64: mm: Change page table pointer name in p[md]_set_huge() arch/arm64/mm/mmu.c * arm64: don't open code page table entry creation arch/arm64/include/asm/pgtable.h arch/arm64/mm/mmu.c * arm64: mm: BUG on unsupported manipulations of live kernel mappings arch/arm64/mm/mmu.c rsi: add fix for crash during assertions * fs/select: avoid clang stack usage warning include/linux/poll.h * ethtool: reduce stack usage with clang net/core/ethtool.c * HID: hidraw, uhid: Always report EPOLLOUT drivers/hid/uhid.c HID: hidraw: Fix returning EPOLLOUT from hidraw_poll hidraw: Return EPOLLOUT from hidraw_poll Change-Id: I65d36338fa1ba89ad6ec2ff878fb4c89ff79b0be Signed-off-by: lucaswei <lucaswei@google.com>
| * | Merge 4.9.217 into android-4.9-qGreg Kroah-Hartman2020-03-201-0/+7
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes in 4.9.217 NFS: Remove superfluous kmap in nfs_readdir_xdr_to_array phy: Revert toggling reset changes. net: phy: Avoid multiple suspends cgroup, netclassid: periodically release file_lock on classid updating gre: fix uninit-value in __iptunnel_pull_header ipv6/addrconf: call ipv6_mc_up() for non-Ethernet interface net: macsec: update SCI upon MAC address change. net: nfc: fix bounds checking bugs on "pipe" r8152: check disconnect status after long sleep bnxt_en: reinitialize IRQs when MTU is modified fib: add missing attribute validation for tun_id nl802154: add missing attribute validation nl802154: add missing attribute validation for dev_type macsec: add missing attribute validation for port net: fq: add missing attribute validation for orphan mask team: add missing attribute validation for port ifindex team: add missing attribute validation for array index nfc: add missing attribute validation for SE API nfc: add missing attribute validation for vendor subcommand ipvlan: add cond_resched_rcu() while processing muticast backlog ipvlan: do not add hardware address of master to its unicast filter list ipvlan: egress mcast packets are not exceptional ipvlan: do not use cond_resched_rcu() in ipvlan_process_multicast() ipvlan: don't deref eth hdr before checking it's set macvlan: add cond_resched() during multicast processing net: fec: validate the new settings in fec_enet_set_coalesce() slip: make slhc_compress() more robust against malicious packets bonding/alb: make sure arp header is pulled before accessing it cgroup: memcg: net: do not associate sock with unrelated cgroup net: phy: fix MDIO bus PM PHY resuming virtio-blk: fix hw_queue stopped on arbitrary error iommu/vt-d: quirk_ioat_snb_local_iommu: replace WARN_TAINT with pr_warn + add_taint workqueue: don't use wq_select_unbound_cpu() for bound works drm/amd/display: remove duplicated assignment to grph_obj_type cifs_atomic_open(): fix double-put on late allocation failure gfs2_atomic_open(): fix O_EXCL|O_CREAT handling on cold dcache KVM: x86: clear stale x86_emulate_ctxt->intercept value ARC: define __ALIGN_STR and __ALIGN symbols for ARC efi: Fix a race and a buffer overflow while reading efivars via sysfs iommu/vt-d: dmar: replace WARN_TAINT with pr_warn + add_taint iommu/vt-d: Fix a bug in intel_iommu_iova_to_phys() for huge page nl80211: add missing attribute validation for critical protocol indication nl80211: add missing attribute validation for beacon report scanning nl80211: add missing attribute validation for channel switch netfilter: cthelper: add missing attribute validation for cthelper mwifiex: Fix heap overflow in mmwifiex_process_tdls_action_frame() iommu/vt-d: Fix the wrong printing in RHSA parsing iommu/vt-d: Ignore devices with out-of-spec domain number ipv6: restrict IPV6_ADDRFORM operation efi: Add a sanity check to efivar_store_raw() batman-adv: Fix double free during fragment merge error batman-adv: Fix transmission of final, 16th fragment batman-adv: Initialize gw sel_class via batadv_algo batman-adv: Fix rx packet/bytes stats on local ARP reply batman-adv: Use default throughput value on cfg80211 error batman-adv: Accept only filled wifi station info batman-adv: fix TT sync flag inconsistencies batman-adv: Avoid spurious warnings from bat_v neigh_cmp implementation batman-adv: Always initialize fragment header priority batman-adv: Fix check of retrieved orig_gw in batadv_v_gw_is_eligible batman-adv: Fix lock for ogm cnt access in batadv_iv_ogm_calc_tq batman-adv: Fix internal interface indices types batman-adv: Avoid race in TT TVLV allocator helper batman-adv: Fix TT sync flags for intermediate TT responses batman-adv: prevent TT request storms by not sending inconsistent TT TLVLs batman-adv: Fix debugfs path for renamed hardif batman-adv: Fix debugfs path for renamed softif batman-adv: Avoid storing non-TT-sync flags on singular entries too batman-adv: Fix multicast TT issues with bogus ROAM flags batman-adv: Prevent duplicated gateway_node entry batman-adv: Fix duplicated OGMs on NETDEV_UP batman-adv: Avoid free/alloc race when handling OGM2 buffer batman-adv: Avoid free/alloc race when handling OGM buffer batman-adv: Don't schedule OGM for disabled interface batman-adv: update data pointers after skb_cow() batman-adv: Avoid probe ELP information leak batman-adv: Use explicit tvlv padding for ELP packets perf/amd/uncore: Replace manual sampling check with CAP_NO_INTERRUPT flag ACPI: watchdog: Allow disabling WDAT at boot HID: apple: Add support for recent firmware on Magic Keyboards HID: i2c-hid: add Trekstor Surfbook E11B to descriptor override cfg80211: check reg_rule for NULL in handle_channel_custom() net: ks8851-ml: Fix IRQ handling and locking mac80211: rx: avoid RCU list traversal under mutex signal: avoid double atomic counter increments for user accounting jbd2: fix data races at struct journal_head ARM: 8957/1: VDSO: Match ARMv8 timer in cntvct_functional() ARM: 8958/1: rename missed uaccess .fixup section mm: slub: add missing TID bump in kmem_cache_alloc_bulk() ipv4: ensure rcu_read_lock() in cipso_v4_error() Linux 4.9.217 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ia7aeed273cd7548dc8d0dfaaad8b96bedfe499b1
| | * cifs_atomic_open(): fix double-put on late allocation failureAl Viro2020-03-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit d9a9f4849fe0c9d560851ab22a85a666cddfdd24 upstream. several iterations of ->atomic_open() calling conventions ago, we used to need fput() if ->atomic_open() failed at some point after successful finish_open(). Now (since 2016) it's not needed - struct file carries enough state to make fput() work regardless of the point in struct file lifecycle and discarding it on failure exits in open() got unified. Unfortunately, I'd missed the fact that we had an instance of ->atomic_open() (cifs one) that used to need that fput(), as well as the stale comment in finish_open() demanding such late failure handling. Trivially fixed... Fixes: fe9ec8291fca "do_last(): take fput() on error after opening to out:" Cc: stable@kernel.org # v4.7+ Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | Merge upstream-f2fs-stable-linux-4.9.y into android-4.9Jaegeuk Kim2019-03-281-0/+3
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/upstream-f2fs-stable-linux-4.9.y: f2fs: set pin_file under CAP_SYS_ADMIN f2fs: fix to avoid deadlock in f2fs_read_inline_dir() f2fs: fix to adapt small inline xattr space in __find_inline_xattr() f2fs: fix to do sanity check with inode.i_inline_xattr_size f2fs: give some messages for inline_xattr_size f2fs: don't trigger read IO for beyond EOF page f2fs: fix to add refcount once page is tagged PG_private f2fs: remove wrong comment in f2fs_invalidate_page() f2fs: fix to use kvfree instead of kzfree f2fs: print more parameters in trace_f2fs_map_blocks f2fs: trace f2fs_ioc_shutdown f2fs: fix to avoid deadlock of atomic file operations f2fs: fix to dirty inode for i_mode recovery f2fs: give random value to i_generation f2fs: no need to take page lock in readdir f2fs: fix to update iostat correctly in IPU path f2fs: fix encrypted page memory leak f2fs: make fault injection covering __submit_flush_wait() f2fs: fix to retry fill_super only if recovery failed f2fs: silence VM_WARN_ON_ONCE in mempool_alloc f2fs: correct spelling mistake f2fs: fix wrong #endif f2fs: don't clear CP_QUOTA_NEED_FSCK_FLAG f2fs: don't allow negative ->write_io_size_bits f2fs: fix to check inline_xattr_size boundary correctly Revert "f2fs: fix to avoid deadlock of atomic file operations" Revert "f2fs: fix to check inline_xattr_size boundary correctly" f2fs: do not use mutex lock in atomic context f2fs: fix potential data inconsistence of checkpoint f2fs: fix to avoid deadlock of atomic file operations f2fs: fix to check inline_xattr_size boundary correctly f2fs: jump to label 'free_node_inode' when failing from d_make_root() f2fs: fix to document inline_xattr_size option f2fs: fix to data block override node segment by mistake f2fs: fix typos in code comments f2fs: use xattr_prefix to wrap up f2fs: sync filesystem after roll-forward recovery fs: export evict_inodes f2fs: flush quota blocks after turnning it off f2fs: avoid null pointer exception in dcc_info f2fs: don't wake up too frequently, if there is lots of IOs f2fs: try to keep CP_TRIMMED_FLAG after successful umount f2fs: add quick mode of checkpoint=disable for QA f2fs: run discard jobs when put_super f2fs: fix to set sbi dirty correctly f2fs: UBSAN: set boolean value iostat_enable correctly f2fs: add brackets for macros f2fs: check if file namelen exceeds max value f2fs: fix to trigger fsck if dirent.name_len is zero f2fs: no need to check return value of debugfs_create functions f2fs: export FS_NOCOW_FL flag to user f2fs: check inject_rate validity during configuring f2fs: remove set but not used variable 'err' f2fs: fix compile warnings: 'struct *' declared inside parameter list f2fs: change error code to -ENOMEM from -EINVAL Change-Id: I25bc1bcf41e7ddef513f180da52fe18a1ebe4245 Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
| | * | f2fs: fix to document inline_xattr_size optionChao Yu2019-02-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We missed to add document for inline_xattr_size mount option in f2fs.txt, add it. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| * | | ANDROID: overlayfs: override_creds=off option bypass creator_credMark Salyzyn2019-03-051-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, all access to the upper, lower and work directories is the recorded mounter's MAC and DAC credentials. The incoming accesses are checked against the caller's credentials. If the principles of least privilege are applied, the mounter's credentials might not overlap the credentials of the caller's when accessing the overlayfs filesystem. For example, a file that a lower DAC privileged caller can execute, is MAC denied to the generally higher DAC privileged mounter, to prevent an attack vector. We add the option to turn off override_creds in the mount options; all subsequent operations after mount on the filesystem will be only the caller's credentials. The module boolean parameter and mount option override_creds is also added as a presence check for this "feature", existence of /sys/module/overlay/parameters/override_creds. It was not always this way. Circa 4.6 there was no recorded mounter's credentials, instead privileged access to upper or work directories were temporarily increased to perform the operations. The MAC (selinux) policies were caller's in all cases. override_creds=off partially returns us to this older access model minus the insecure temporary credential increases. This is to permit use in a system with non-overlapping security models for each executable including the agent that mounts the overlayfs filesystem. In Android this is the case since init, which performs the mount operations, has a minimal MAC set of privileges to reduce any attack surface, and services that use the content have a different set of MAC privileges (eg: read, for vendor labelled configuration, execute for vendor libraries and modules). The caveats are not a problem in the Android usage model, however they should be fixed for completeness and for general use in time. Signed-off-by: Mark Salyzyn <salyzyn@android.com> Cc: Miklos Szeredi <miklos@szeredi.hu> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Amir Goldstein <amir73il@gmail.com> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Stephen Smalley <sds@tycho.nsa.gov> Cc: linux-unionfs@vger.kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: kernel-team@android.com --- v9: - Add to the caveats v8: - drop pr_warn message after straw poll to remove it. - added a use case in the commit message v7: - change name of internal parameter to ovl_override_creds_def - report override_creds only if different than default v6: - Drop CONFIG_OVERLAY_FS_OVERRIDE_CREDS. - Do better with the documentation. - pr_warn message adjusted to report consequences. v5: - beefed up the caveats in the Documentation - Is dependent on "overlayfs: check CAP_DAC_READ_SEARCH before issuing exportfs_decode_fh" "overlayfs: check CAP_MKNOD before issuing vfs_whiteout" - Added prwarn when override_creds=off v4: - spelling and grammar errors in text v3: - Change name from caller_credentials / creator_credentials to the boolean override_creds. - Changed from creator to mounter credentials. - Updated and fortified the documentation. - Added CONFIG_OVERLAY_FS_OVERRIDE_CREDS v2: - Forward port changed attr to stat, resulting in a build error. - altered commit message. Signed-off-by: Mark Salyzyn <salyzyn@google.com> (cherry picked from https://lore.kernel.org/patchwork/patch/1009299) Bug: 109821005 Bug: 112955896 Bug: 127298877 Change-Id: I1d99298ec5e71174734481be3497763c6b9d42e1
| * | | Build breakMark Salyzyn2019-02-221-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert "FROMLIST: BACKPORT: overlayfs: override_creds=off option bypass creator_cred" This reverts commit 3bc419d8deb2e3d76af538c2f0994676cb59e741. Reason for revert: <INSERT REASONING HERE> Change-Id: I44312d18aeb84ace19f7d27ec3bcb219183d95fa
| * | | FROMLIST: BACKPORT: overlayfs: override_creds=off option bypass creator_credMark Salyzyn2019-02-211-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, all access to the upper, lower and work directories is the recorded mounter's MAC and DAC credentials. The incoming accesses are checked against the caller's credentials. If the principles of least privilege are applied, the mounter's credentials might not overlap the credentials of the caller's when accessing the overlayfs filesystem. For example, a file that a lower DAC privileged caller can execute, is MAC denied to the generally higher DAC privileged mounter, to prevent an attack vector. We add the option to turn off override_creds in the mount options; all subsequent operations after mount on the filesystem will be only the caller's credentials. The module boolean parameter and mount option override_creds is also added as a presence check for this "feature", existence of /sys/module/overlay/parameters/override_creds. It was not always this way. Circa 4.6 there was no recorded mounter's credentials, instead privileged access to upper or work directories were temporarily increased to perform the operations. The MAC (selinux) policies were caller's in all cases. override_creds=off partially returns us to this older access model minus the insecure temporary credential increases. This is to permit use in a system with non-overlapping security models for each executable including the agent that mounts the overlayfs filesystem. In Android this is the case since init, which performs the mount operations, has a minimal MAC set of privileges to reduce any attack surface, and services that use the content have a different set of MAC privileges (eg: read, for vendor labelled configuration, execute for vendor libraries and modules). The caveats are not a problem in the Android usage model, however they should be fixed for completeness and for general use in time. Signed-off-by: Mark Salyzyn <salyzyn@android.com> Cc: Miklos Szeredi <miklos@szeredi.hu> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Amir Goldstein <amir73il@gmail.com> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Stephen Smalley <sds@tycho.nsa.gov> Cc: linux-unionfs@vger.kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: kernel-team@android.com --- v9: - Add to the caveats v8: - drop pr_warn message after straw poll to remove it. - added a use case in the commit message v7: - change name of internal parameter to ovl_override_creds_def - report override_creds only if different than default v6: - Drop CONFIG_OVERLAY_FS_OVERRIDE_CREDS. - Do better with the documentation. - pr_warn message adjusted to report consequences. v5: - beefed up the caveats in the Documentation - Is dependent on "overlayfs: check CAP_DAC_READ_SEARCH before issuing exportfs_decode_fh" "overlayfs: check CAP_MKNOD before issuing vfs_whiteout" - Added prwarn when override_creds=off v4: - spelling and grammar errors in text v3: - Change name from caller_credentials / creator_credentials to the boolean override_creds. - Changed from creator to mounter credentials. - Updated and fortified the documentation. - Added CONFIG_OVERLAY_FS_OVERRIDE_CREDS v2: - Forward port changed attr to stat, resulting in a build error. - altered commit message. Signed-off-by: Mark Salyzyn <salyzyn@google.com> (cherry picked from https://lore.kernel.org/patchwork/patch/1009299) Bug: 109821005 Bug: 112955896 Change-Id: Ie43b0c7dfd64f4cfc27dfe5e1622ea01f3b000cf
* | | | Merge remote-tracking branch 'origin/upstream-f2fs-stable-linux-4.9.y' into ↵Jaegeuk Kim2019-08-191-10/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | android-4.9 Fix build errors. * origin/upstream-f2fs-stable-linux-4.9.y: f2fs: use EINVAL for superblock with invalid magic f2fs: fix to read source block before invalidating it f2fs: remove redundant check from f2fs_setflags_common() f2fs: use generic checking and prep function for FS_IOC_SETFLAGS vfs: use READ_ONCE() to access ->i_link fs, fscrypt: clear DCACHE_ENCRYPTED_NAME when unaliasing directory fscrypt: cache decrypted symlink target in ->i_link fscrypt: fix race where ->lookup() marks plaintext dentry as ciphertext ext4: remove unused d_name argument from ext4_search_dir() et al. fscrypt: only set dentry_operations on ciphertext dentries fscrypt: fix race allowing rename() and link() of ciphertext dentries fscrypt: clean up and improve dentry revalidation fscrypt: use READ_ONCE() to access ->i_crypt_info fscrypt: remove WARN_ON_ONCE() when decryption fails fscrypt: drop inode argument from fscrypt_get_ctx() f2fs: improve print log in f2fs_sanity_check_ckpt() f2fs: avoid out-of-range memory access f2fs: fix to avoid long latency during umount f2fs: allow all the users to pin a file f2fs: support swap file w/ DIO f2fs: allocate blocks for pinned file f2fs: fix is_idle() check for discard type f2fs: add a rw_sem to cover quota flag changes f2fs: set SBI_NEED_FSCK for xattr corruption case f2fs: use generic EFSBADCRC/EFSCORRUPTED f2fs: Use DIV_ROUND_UP() instead of open-coding f2fs: print kernel message if filesystem is inconsistent f2fs: introduce f2fs_<level> macros to wrap f2fs_printk() f2fs: avoid get_valid_blocks() for cleanup f2fs: ioctl for removing a range from F2FS f2fs: only set project inherit bit for directory f2fs: separate f2fs i_flags from fs_flags and ext4 i_flags f2fs: Add option to limit required GC for checkpoint=disable f2fs: Fix accounting for unusable blocks f2fs: Fix root reserved on remount f2fs: Lower threshold for disable_cp_again f2fs: fix sparse warning f2fs: fix f2fs_show_options to show nodiscard mount option f2fs: add error prints for debugging mount failure f2fs: fix to do sanity check on segment bitmap of LFS curseg f2fs: add missing sysfs entries in documentation f2fs: fix to avoid deadloop if data_flush is on f2fs: always assume that the device is idle under gc_urgent f2fs: add bio cache for IPU f2fs: allow ssr block allocation during checkpoint=disable period f2fs: fix to check layout on last valid checkpoint park Change-Id: I7ec07950386e32e3955b6a8192804b7d3174fd18 Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
* | | | fscrypt: remove filesystem specific build config optionChandan Rajendra2019-05-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to have a common code base for fscrypt "post read" processing for all filesystems which support encryption, this commit removes filesystem specific build config option (e.g. CONFIG_EXT4_FS_ENCRYPTION) and replaces it with a build option (i.e. CONFIG_FS_ENCRYPTION) whose value affects all the filesystems making use of fscrypt. Change-Id: If3c1effb67f36c8656f87d3a8135be04eff10a0a Reviewed-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com> Signed-off-by: Eric Biggers <ebiggers@google.com>
* | | | fscrypt: return -EXDEV for incompatible rename or link into encrypted dirEric Biggers2019-05-151-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, trying to rename or link a regular file, directory, or symlink into an encrypted directory fails with EPERM when the source file is unencrypted or is encrypted with a different encryption policy, and is on the same mountpoint. It is correct for the operation to fail, but the choice of EPERM breaks tools like 'mv' that know to copy rather than rename if they see EXDEV, but don't know what to do with EPERM. Our original motivation for EPERM was to encourage users to securely handle their data. Encrypting files by "moving" them into an encrypted directory can be insecure because the unencrypted data may remain in free space on disk, where it can later be recovered by an attacker. It's much better to encrypt the data from the start, or at least try to securely delete the source data e.g. using the 'shred' program. However, the current behavior hasn't been effective at achieving its goal because users tend to be confused, hack around it, and complain; see e.g. https://github.com/google/fscrypt/issues/76. And in some cases it's actually inconsistent or unnecessary. For example, 'mv'-ing files between differently encrypted directories doesn't work even in cases where it can be secure, such as when in userspace the same passphrase protects both directories. Yet, you *can* already 'mv' unencrypted files into an encrypted directory if the source files are on a different mountpoint, even though doing so is often insecure. There are probably better ways to teach users to securely handle their files. For example, the 'fscrypt' userspace tool could provide a command that migrates unencrypted files into an encrypted directory, acting like 'shred' on the source files and providing appropriate warnings depending on the type of the source filesystem and disk. Receiving errors on unimportant files might also force some users to disable encryption, thus making the behavior counterproductive. It's desirable to make encryption as unobtrusive as possible. Therefore, change the error code from EPERM to EXDEV so that tools looking for EXDEV will fall back to a copy. This, of course, doesn't prevent users from still doing the right things to securely manage their files. Note that this also matches the behavior when a file is renamed between two project quota hierarchies; so there's precedent for using EXDEV for things other than mountpoints. xfstests generic/398 will require an update with this change. [Rewritten from an earlier patch series by Michael Halcrow.] Cc: Michael Halcrow <mhalcrow@google.com> Cc: Joe Richey <joerichey@google.com> Signed-off-by: Eric Biggers <ebiggers@google.com>
* | | | Merge branch 'android-msm-bluecross-4.9' into android-msm-pixel-4.9Robin Peng2019-03-081-1/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/arm64/boot/dts/qcom/sdm845-670-usb-common.dtsi block/bio.c build.config.common drivers/char/adsprpc.c drivers/gpu/drm/msm/sde/sde_encoder.c drivers/media/platform/msm/camera/cam_core/cam_context.c drivers/media/platform/msm/camera/cam_core/cam_node.c drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c drivers/media/platform/msm/camera/cam_sensor_module/cam_eeprom/cam_eeprom_core.c drivers/media/platform/msm/camera/cam_sensor_module/cam_ois/cam_ois_core.c drivers/media/platform/msm/camera/cam_sensor_module/cam_sensor_utils/cam_sensor_util.c drivers/regulator/qpnp-labibb-regulator.c drivers/usb/dwc3/dwc3-msm.c fs/crypto/Makefile fs/crypto/fscrypt_ice.h fs/crypto/fscrypt_private.h fs/crypto/keyinfo.c fs/direct-io.c fs/f2fs/f2fs.h fs/f2fs/file.c fs/f2fs/sysfs.c include/linux/blk_types.h kernel/events/core.c security/pfe/pfk.c security/pfe/pfk_ecryptfs.h security/pfe/pfk_fscrypt.c security/pfe/pfk_fscrypt.h Bug: 119540871 Change-Id: I3ce34ab630c7272e1a250e6d917724f96a01b37e Signed-off-by: Robin Peng <robinpeng@google.com> Signed-off-by: Ocean Chen <oceanchen@google.com>
| * | | | Merge upstream-f2fs-stable-linux-4.9.y into android-4.9Jaegeuk Kim2019-02-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/upstream-f2fs-stable-linux-4.9.y: f2fs: do not use mutex lock in atomic context f2fs: fix potential data inconsistence of checkpoint f2fs: fix to avoid deadlock of atomic file operations f2fs: fix to check inline_xattr_size boundary correctly f2fs: jump to label 'free_node_inode' when failing from d_make_root() f2fs: fix to document inline_xattr_size option f2fs: fix to data block override node segment by mistake f2fs: fix typos in code comments f2fs: use xattr_prefix to wrap up f2fs: sync filesystem after roll-forward recovery fs: export evict_inodes f2fs: flush quota blocks after turnning it off f2fs: avoid null pointer exception in dcc_info f2fs: don't wake up too frequently, if there is lots of IOs f2fs: try to keep CP_TRIMMED_FLAG after successful umount f2fs: add quick mode of checkpoint=disable for QA f2fs: run discard jobs when put_super f2fs: fix to set sbi dirty correctly f2fs: UBSAN: set boolean value iostat_enable correctly f2fs: add brackets for macros f2fs: check if file namelen exceeds max value f2fs: fix to trigger fsck if dirent.name_len is zero f2fs: no need to check return value of debugfs_create functions f2fs: export FS_NOCOW_FL flag to user f2fs: check inject_rate validity during configuring f2fs: remove set but not used variable 'err' f2fs: fix compile warnings: 'struct *' declared inside parameter list f2fs: change error code to -ENOMEM from -EINVAL Change-Id: I6fda0c468b699339d99b2018b30618e7280f7bee Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
| * | | | Merge android-4.9 (4.9.153) into android-msm-bluecross-4.9-ltsPetri Gynther2019-01-281-1/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge 4.9.153 into android-4.9 Linux 4.9.153 locking/qspinlock: Pull in asm/byteorder.h to ensure correct endianness ipmi:ssif: Fix handling of multi-part return messages mm, proc: be more verbose about unstable VMA flags in /proc/<pid>/smaps * mm/page-writeback.c: don't break integrity writeback on ->writepage() error mm/page-writeback.c ocfs2: fix panic due to unrecovered local alloc scsi: megaraid: fix out-of-bound array accesses scsi: smartpqi: correct lun reset issues * sysfs: Disable lockdep for driver bind/unbind files drivers/base/bus.c ALSA: bebob: fix model-id of unit for Apogee Ensemble dm snapshot: Fix excessive memory usage and workqueue stalls tools lib subcmd: Don't add the kernel sources to the include path * dm kcopyd: Fix bug causing workqueue stalls drivers/md/dm-kcopyd.c perf parse-events: Fix unchecked usage of strncpy() perf svghelper: Fix unchecked usage of strncpy() perf intel-pt: Fix error with config term "pt=0" * tty/serial: do not free trasnmit buffer page under port lock drivers/tty/serial/serial_core.c mmc: atmel-mci: do not assume idle after atmci_request_end kconfig: fix memory leak when EOF is encountered in quotation kconfig: fix file name and line number of warn_ignored_character() clk: imx6q: reset exclusive gates on init scsi: target: use consistent left-aligned ASCII INQUIRY data * net: call sk_dst_reset when set SO_DONTROUTE net/core/sock.c media: firewire: Fix app_info parameter type in avc_ca{,_app}_info powerpc/pseries/cpuidle: Fix preempt warning powerpc/xmon: Fix invocation inside lock region * pstore/ram: Do not treat empty buffers as valid fs/pstore/ram_core.c jffs2: Fix use of uninitialized delayed_work, lockdep breakage rxe: IB_WR_REG_MR does not capture MR's iova field * selinux: always allow mounting submounts security/selinux/hooks.c * arm64: perf: set suppress_bind_attrs flag to true arch/arm64/kernel/perf_event.c MIPS: SiByte: Enable swiotlb for SWARM, LittleSur and BigSur * ALSA: oxfw: add support for APOGEE duet FireWire sound/firewire/Kconfig serial: set suppress_bind_attrs flag only if builtin * writeback: don't decrement wb->refcnt if !wb->bdi include/linux/backing-dev-defs.h e1000e: allow non-monotonic SYSTIM readings platform/x86: asus-wmi: Tell the EC the OS will handle the display off hotkey * ipv6: Take rcu_read_lock in __inet6_bind for mapped addresses net/ipv6/af_inet6.c * ipv6: Consider sk_bound_dev_if when binding a socket to a v4 mapped address net/ipv6/af_inet6.c r8169: Add support for new Realtek Ethernet * ANDROID: cfi: fix shadow rebasing kernel/cfi.c UPSTREAM: dm: do not allow readahead to limit IO size * UPSTREAM: readahead: stricter check for bdi io_pages mm/readahead.c * UPSTREAM: mm: don't cap request size based on read-ahead setting block/blk-settings.c block/blk-sysfs.c include/linux/backing-dev-defs.h mm/readahead.c * Revert "UPSTREAM: dm: do not allow readahead to limit IO size" drivers/md/dm-table.c * UPSTREAM: dm: do not allow readahead to limit IO size drivers/md/dm-table.c * UPSTREAM: ppp: Move PFC decompression to PPP generic layer drivers/net/ppp/ppp_async.c drivers/net/ppp/ppp_generic.c drivers/net/ppp/ppp_synctty.c net/l2tp/l2tp_ppp.c * UPSTREAM: l2tp: Add protocol field decompression net/l2tp/l2tp_ppp.c * BACKPORT: l2tp: remove ->recv_payload_hook net/l2tp/l2tp_core.c net/l2tp/l2tp_core.h net/l2tp/l2tp_ip.c net/l2tp/l2tp_ip6.c net/l2tp/l2tp_ppp.c Merge 4.9.152 into android-4.9 Linux 4.9.152 nbd: Use set_blocksize() to set device blocksize nbd: set the logical and physical blocksize properly * media: vb2: be sure to unlock mutex on errors drivers/media/v4l2-core/videobuf2-core.c * mm, memcg: fix reclaim deadlock with writeback mm/memory.c drm/fb-helper: Ignore the value of fb_var_screeninfo.pixclock * loop: Fix double mutex_unlock(&loop_ctl_mutex) in loop_control_ioctl() drivers/block/loop.c * loop: Get rid of loop_index_mutex drivers/block/loop.c * loop: Fold __loop_release into loop_release drivers/block/loop.c * block/loop: Use global lock for ioctl() operation. drivers/block/loop.c drivers/block/loop.h tipc: fix uninit-value in tipc_nl_compat_doit tipc: fix uninit-value in tipc_nl_compat_name_table_dump tipc: fix uninit-value in tipc_nl_compat_link_set tipc: fix uninit-value in tipc_nl_compat_bearer_enable tipc: fix uninit-value in tipc_nl_compat_link_reset_stats sctp: allocate sctp_sockaddr_entry with kzalloc * blockdev: Fix livelocks on loop device fs/block_dev.c * selinux: fix GPF on invalid policy security/selinux/ss/policydb.c * netfilter: ebtables: account ebt_table_info to kmemcg net/bridge/netfilter/ebtables.c sunrpc: handle ENOMEM in rpcb_getport_async * media: vb2: vb2_mmap: move lock up drivers/media/v4l2-core/videobuf2-core.c * LSM: Check for NULL cred-security on free security/security.c media: vivid: set min width/height to a value > 0 media: vivid: fix error handling of kthread_run omap2fb: Fix stack memory disclosure Disable MSI also when pcie-octeon.pcie_disable on * arm64: kaslr: ensure randomized quantities are clean to the PoC arch/arm64/kernel/kaslr.c mfd: tps6586x: Handle interrupts on suspend mips: fix n32 compat_ipc_parse_version crypto: talitos - fix ablkcipher for CONFIG_VMAP_STACK crypto: talitos - reorder code in talitos_edesc_alloc() * scsi: sd: Fix cache_type_store() drivers/scsi/sd.c * scsi: core: Synchronize request queue PM status only on successful resume drivers/scsi/scsi_pm.c Yama: Check for pid death before checking ancestry btrfs: wait on ordered extents on abort cleanup * crypto: authenc - fix parsing key with misaligned rta_len crypto/authenc.c * crypto: authencesn - Avoid twice completion call in decrypt path crypto/authencesn.c crypto: caam - fix zero-length buffer DMA mapping * ip: on queued skb use skb_header_pointer instead of pskb_may_pull net/ipv4/ip_sockglue.c net/ipv6/datagram.c * bonding: update nest level on unlink drivers/net/bonding/bond_main.c * packet: Do not leak dev refcounts on error exit net/packet/af_packet.c net: bridge: fix a bug on using a neighbour cache entry without checking its state * ipv6: fix kernel-infoleak in ipv6_local_error() net/ipv6/datagram.c * arm64: Don't trap host pointer auth use to EL2 arch/arm64/include/asm/kvm_arm.h * arm64/kvm: consistently handle host HCR_EL2 flags arch/arm64/include/asm/kvm_arm.h arch/arm64/kernel/head.S scsi: target: iscsi: cxgbit: fix csk leak Revert "scsi: target: iscsi: cxgbit: fix csk leak" * proc: Remove empty line in /proc/self/status fs/proc/array.c media: em28xx: Fix misplaced reset of dev->v4l::field_count * Revert "f2fs: do not recover from previous remained wrong dnodes" fs/f2fs/recovery.c can: gw: ensure DLC boundaries after CAN frame modification * tty: Don't hold ldisc lock in tty_reopen() if ldisc present drivers/tty/tty_io.c * tty: Simplify tty->count math in tty_reopen() drivers/tty/tty_io.c * tty: Hold tty_ldisc_lock() during tty_reopen() drivers/tty/tty_io.c * tty/ldsem: Wake up readers after timed out down_write() drivers/tty/tty_ldsem.c ANDROID: cuttlefish_defconfig: Enable vsock options * ANDROID: mnt: Propagate remount correctly fs/pnode.c * UPSTREAM: loop: drop caches if offset or block_size are changed drivers/block/loop.c UPSTREAM: crypto: adiantum - initialize crypto_spawn::inst UPSTREAM: crypto: adiantum - fix leaking reference to hash algorithm UPSTREAM: crypto: adiantum - adjust some comments to match latest paper UPSTREAM: crypto: adiantum - propagate CRYPTO_ALG_ASYNC flag to instance Merge 4.9.151 into android-4.9 Linux 4.9.151 sunrpc: use-after-free in svc_process_common() * ext4: avoid kernel warning when writing the superblock to a dead device fs/ext4/super.c * ext4: fix a potential fiemap/page fault deadlock w/ inline_data fs/ext4/inline.c * ext4: make sure enough credits are reserved for dioread_nolock writes fs/ext4/inode.c rbd: don't return 0 on unmap if RBD_DEV_FLAG_REMOVING is set * i2c: dev: prevent adapter retries and timeout being set as minus value drivers/i2c/i2c-dev.c ACPI: power: Skip duplicate power resource references in _PRx * mm: page_mapped: don't assume compound page is huge or THP mm/util.c slab: alien caches must not be initialized if the allocation of the alien cache failed * USB: Add USB_QUIRK_DELAY_CTRL_MSG quirk for Corsair K70 RGB drivers/usb/core/quirks.c * USB: storage: add quirk for SMI SM3350 drivers/usb/storage/unusual_devs.h * USB: storage: don't insert sane sense for SPC3+ when bad sense specified drivers/usb/storage/scsiglue.c usb: cdc-acm: send ZLP for Telit 3G Intel based modems cifs: Fix potential OOB access of lock element array CIFS: Do not hide EINTR after sending network packets ALSA: hda/realtek - Disable headset Mic VREF for headset mode of ALC225 Change-Id: I3eebfcb9f894c004b276f22a1e9928df873823a6 Signed-off-by: Petri Gynther <pgynther@google.com>
| | * | | Merge 4.9.153 into android-4.9Greg Kroah-Hartman2019-01-261-1/+3
| | |\ \ \ | | | | |/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes in 4.9.153 r8169: Add support for new Realtek Ethernet ipv6: Consider sk_bound_dev_if when binding a socket to a v4 mapped address ipv6: Take rcu_read_lock in __inet6_bind for mapped addresses platform/x86: asus-wmi: Tell the EC the OS will handle the display off hotkey e1000e: allow non-monotonic SYSTIM readings writeback: don't decrement wb->refcnt if !wb->bdi serial: set suppress_bind_attrs flag only if builtin ALSA: oxfw: add support for APOGEE duet FireWire MIPS: SiByte: Enable swiotlb for SWARM, LittleSur and BigSur arm64: perf: set suppress_bind_attrs flag to true selinux: always allow mounting submounts rxe: IB_WR_REG_MR does not capture MR's iova field jffs2: Fix use of uninitialized delayed_work, lockdep breakage pstore/ram: Do not treat empty buffers as valid powerpc/xmon: Fix invocation inside lock region powerpc/pseries/cpuidle: Fix preempt warning media: firewire: Fix app_info parameter type in avc_ca{,_app}_info net: call sk_dst_reset when set SO_DONTROUTE scsi: target: use consistent left-aligned ASCII INQUIRY data clk: imx6q: reset exclusive gates on init kconfig: fix file name and line number of warn_ignored_character() kconfig: fix memory leak when EOF is encountered in quotation mmc: atmel-mci: do not assume idle after atmci_request_end tty/serial: do not free trasnmit buffer page under port lock perf intel-pt: Fix error with config term "pt=0" perf svghelper: Fix unchecked usage of strncpy() perf parse-events: Fix unchecked usage of strncpy() dm kcopyd: Fix bug causing workqueue stalls tools lib subcmd: Don't add the kernel sources to the include path dm snapshot: Fix excessive memory usage and workqueue stalls ALSA: bebob: fix model-id of unit for Apogee Ensemble sysfs: Disable lockdep for driver bind/unbind files scsi: smartpqi: correct lun reset issues scsi: megaraid: fix out-of-bound array accesses ocfs2: fix panic due to unrecovered local alloc mm/page-writeback.c: don't break integrity writeback on ->writepage() error mm, proc: be more verbose about unstable VMA flags in /proc/<pid>/smaps ipmi:ssif: Fix handling of multi-part return messages locking/qspinlock: Pull in asm/byteorder.h to ensure correct endianness Linux 4.9.153 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
| | | * | mm, proc: be more verbose about unstable VMA flags in /proc/<pid>/smapsMichal Hocko2019-01-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ Upstream commit 7550c6079846a24f30d15ac75a941c8515dbedfb ] Patch series "THP eligibility reporting via proc". This series of three patches aims at making THP eligibility reporting much more robust and long term sustainable. The trigger for the change is a regression report [2] and the long follow up discussion. In short the specific application didn't have good API to query whether a particular mapping can be backed by THP so it has used VMA flags to workaround that. These flags represent a deep internal state of VMAs and as such they should be used by userspace with a great deal of caution. A similar has happened for [3] when users complained that VM_MIXEDMAP is no longer set on DAX mappings. Again a lack of a proper API led to an abuse. The first patch in the series tries to emphasise that that the semantic of flags might change and any application consuming those should be really careful. The remaining two patches provide a more suitable interface to address [2] and provide a consistent API to query the THP status both for each VMA and process wide as well. [1] http://lkml.kernel.org/r/20181120103515.25280-1-mhocko@kernel.org [2] http://lkml.kernel.org/r/http://lkml.kernel.org/r/alpine.DEB.2.21.1809241054050.224429@chino.kir.corp.google.com [3] http://lkml.kernel.org/r/20181002100531.GC4135@quack2.suse.cz This patch (of 3): Even though vma flags exported via /proc/<pid>/smaps are explicitly documented to be not guaranteed for future compatibility the warning doesn't go far enough because it doesn't mention semantic changes to those flags. And they are important as well because these flags are a deep implementation internal to the MM code and the semantic might change at any time. Let's consider two recent examples: http://lkml.kernel.org/r/20181002100531.GC4135@quack2.suse.cz : commit e1fb4a086495 "dax: remove VM_MIXEDMAP for fsdax and device dax" has : removed VM_MIXEDMAP flag from DAX VMAs. Now our testing shows that in the : mean time certain customer of ours started poking into /proc/<pid>/smaps : and looks at VMA flags there and if VM_MIXEDMAP is missing among the VMA : flags, the application just fails to start complaining that DAX support is : missing in the kernel. http://lkml.kernel.org/r/alpine.DEB.2.21.1809241054050.224429@chino.kir.corp.google.com : Commit 1860033237d4 ("mm: make PR_SET_THP_DISABLE immediately active") : introduced a regression in that userspace cannot always determine the set : of vmas where thp is ineligible. : Userspace relies on the "nh" flag being emitted as part of /proc/pid/smaps : to determine if a vma is eligible to be backed by hugepages. : Previous to this commit, prctl(PR_SET_THP_DISABLE, 1) would cause thp to : be disabled and emit "nh" as a flag for the corresponding vmas as part of : /proc/pid/smaps. After the commit, thp is disabled by means of an mm : flag and "nh" is not emitted. : This causes smaps parsing libraries to assume a vma is eligible for thp : and ends up puzzling the user on why its memory is not backed by thp. In both cases userspace was relying on a semantic of a specific VMA flag. The primary reason why that happened is a lack of a proper interface. While this has been worked on and it will be fixed properly, it seems that our wording could see some refinement and be more vocal about semantic aspect of these flags as well. Link: http://lkml.kernel.org/r/20181211143641.3503-2-mhocko@kernel.org Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Jan Kara <jack@suse.cz> Acked-by: Dan Williams <dan.j.williams@intel.com> Acked-by: David Rientjes <rientjes@google.com> Acked-by: Mike Rapoport <rppt@linux.ibm.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Dan Williams <dan.j.williams@intel.com> Cc: David Rientjes <rientjes@google.com> Cc: Paul Oppenheimer <bepvte@gmail.com> Cc: William Kucharski <william.kucharski@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
| | * | | BACKPORT, FROMGIT: fscrypt: add Adiantum supportEric Biggers2018-12-131-0/+641
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the Adiantum encryption mode to fscrypt. Adiantum is a tweakable, length-preserving encryption mode with security provably reducible to that of XChaCha12 and AES-256, subject to a security bound. It's also a true wide-block mode, unlike XTS. See the paper "Adiantum: length-preserving encryption for entry-level processors" (https://eprint.iacr.org/2018/720.pdf) for more details. Also see commit 059c2a4d8e16 ("crypto: adiantum - add Adiantum support"). On sufficiently long messages, Adiantum's bottlenecks are XChaCha12 and the NH hash function. These algorithms are fast even on processors without dedicated crypto instructions. Adiantum makes it feasible to enable storage encryption on low-end mobile devices that lack AES instructions; currently such devices are unencrypted. On ARM Cortex-A7, on 4096-byte messages Adiantum encryption is about 4 times faster than AES-256-XTS encryption; decryption is about 5 times faster. In fscrypt, Adiantum is suitable for encrypting both file contents and names. With filenames, it fixes a known weakness: when two filenames in a directory share a common prefix of >= 16 bytes, with CTS-CBC their encrypted filenames share a common prefix too, leaking information. Adiantum does not have this problem. Since Adiantum also accepts long tweaks (IVs), it's also safe to use the master key directly for Adiantum encryption rather than deriving per-file keys, provided that the per-file nonce is included in the IVs and the master key isn't used for any other encryption mode. This configuration saves memory and improves performance. A new fscrypt policy flag is added to allow users to opt-in to this configuration. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> (cherry picked from commit 889645b87e96cecbdf7d76ab86447d1f1c6b41d3 https://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt.git master) Conflicts: Documentation/filesystems/fscrypt.rst include/uapi/linux/fs.h (replaced refcount_t with atomic_t) Bug: 112008522 Test: For regression testing, built the kernel for x86_64 KVM and ran the encryption xfstests using kvm-xfstests: kvm-xfstests -c ext4,f2fs -g encrypt Tests for the Adiantum mode and "direct key" specifically aren't yet included in xfstests, but I also tried it manually with the following (run in the kvm-xfstests test appliance): cd / umount /vdc &> /dev/null mkfs.f2fs -O encrypt -f /dev/vdc mount /vdc cd /vdc rm -rf edir mkdir edir . ~/xfstests/common/encrypt KEYCTL_PROG=keyctl FSTYP=fscrypt _new_session_keyring k=$(_generate_encryption_key) xfs_io -c "set_encpolicy -c 9 -n 9 -f 0x4 $k" edir/ cp -a /usr edir/ diff -r /usr edir/usr/ dmesg should show that Adiantum is being used: fscrypt: Adiantum using implementation "adiantum(xchacha12-generic,aes-aesni,nhpoly1305-generic)" Change-Id: I29ffaa7ef9cbd23d2f6ed428814c607227241ce9 Signed-off-by: Eric Biggers <ebiggers@google.com>
| | * | | Merge 4.20-rc1-4.9 into android-4.9Jaegeuk Kim2018-11-031-1/+7
| | |\ \ \ | | | | |/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/upstream-f2fs-stable-linux-4.9.y: f2fs: guarantee journalled quota data by checkpoint f2fs: cleanup dirty pages if recover failed f2fs: fix data corruption issue with hardware encryption f2fs: fix to recover inode->i_flags of inode block during POR f2fs: spread f2fs_set_inode_flags() f2fs: fix to spread clear_cold_data() Revert "f2fs: fix to clear PG_checked flag in set_page_dirty()" f2fs: account read IOs and use IO counts for is_idle f2fs: fix to account IO correctly for cgroup writeback f2fs: fix to account IO correctly f2fs: remove request_list check in is_idle() f2fs: allow to mount, if quota is failed f2fs: update REQ_TIME in f2fs_cross_rename() f2fs: do not update REQ_TIME in case of error conditions f2fs: remove unneeded disable_nat_bits() f2fs: remove unused sbi->trigger_ssr_threshold f2fs: shrink sbi->sb_lock coverage in set_file_temperature() f2fs: fix to recover cold bit of inode block during POR f2fs: submit cached bio to avoid endless PageWriteback f2fs: checkpoint disabling f2fs: clear PageError on the read path f2fs: allow out-place-update for direct IO in LFS mode f2fs: refactor ->page_mkwrite() flow Revert: "f2fs: check last page index in cached bio to decide submission" f2fs: support superblock checksum f2fs: add to account skip count of background GC f2fs: add to account meta IO f2fs: keep lazytime on remount f2fs: fix missing up_read f2fs: return correct errno in f2fs_gc f2fs: avoid f2fs_bug_on if f2fs_get_meta_page_nofail got EIO f2fs: mark inode dirty explicitly in recover_inode() f2fs: fix to recover inode's crtime during POR f2fs: fix to recover inode's i_gc_failures during POR f2fs: fix to recover inode's i_flags during POR f2fs: fix to recover inode's project id during POR f2fs: update i_size after DIO completion f2fs: report ENOENT correctly in f2fs_rename f2fs: fix remount problem of option io_bits f2fs: fix to recover inode's uid/gid during POR f2fs: avoid infinite loop in f2fs_alloc_nid f2fs: add new idle interval timing for discard and gc paths f2fs: split IO error injection according to RW f2fs: add SPDX license identifiers f2fs: surround fault_injection related option parsing using CONFIG_F2FS_FAULT_INJECTION f2fs: avoid sleeping under spin_lock f2fs: plug readahead IO in readdir() f2fs: fix to do sanity check with current segment number f2fs: fix memory leak of percpu counter in fill_super() f2fs: fix memory leak of write_io in fill_super() f2fs: cache NULL when both default_acl and acl are NULL f2fs: fix to flush all dirty inodes recovered in readonly fs f2fs: report error if quota off error during umount f2fs: submit bio after shutdown f2fs: avoid wrong decrypted data from disk Revert "f2fs: use printk_ratelimited for f2fs_msg" f2fs: fix unnecessary periodic wakeup of discard thread when dev is busy f2fs: fix to avoid NULL pointer dereference on se->discard_map f2fs: add additional sanity check in f2fs_acl_from_disk() Change-Id: Iaf9fc5081065224c87e0987e82f0bb61a6e1b9ac Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
| | | * | f2fs: checkpoint disablingDaniel Rosenberg2018-10-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that, it requires "f2fs: return correct errno in f2fs_gc". This adds a lightweight non-persistent snapshotting scheme to f2fs. To use, mount with the option checkpoint=disable, and to return to normal operation, remount with checkpoint=enable. If the filesystem is shut down before remounting with checkpoint=enable, it will revert back to its apparent state when it was first mounted with checkpoint=disable. This is useful for situations where you wish to be able to roll back the state of the disk in case of some critical failure. Signed-off-by: Daniel Rosenberg <drosen@google.com> [Jaegeuk Kim: use SB_RDONLY instead of MS_RDONLY] Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| | | * | f2fs: split IO error injection according to RWChao Yu2018-10-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds to support injecting error for write IO, this can simulate IO error like fail_make_request or dm_flakey does. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| | * | | Revert "fscrypt: add Speck128/256 support"Alistair Strachan2018-10-221-626/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c16d27ebb94346d08c441e70f77e52b2ed4a758a. Resolves conflicts with a later CL, a4842a18697e "fscrypt: log the crypto algorithm implementations". Also leaves the include/uapi/linux/fs.h constants in place to prevent future accidental re-use. Bug: 116008047 Change-Id: I2d64d8d3e384400b7bdfc06a353c3844d4ebb377 Signed-off-by: Alistair Strachan <astrachan@google.com>
| | * | | Merge remote-tracking branch 'origin/upstream-f2fs-stable-linux-4.9.y' into ↵Jaegeuk Kim2018-09-271-0/+20
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | android-4.9 * origin/upstream-f2fs-stable-linux-4.9.y: f2fs: readahead encrypted block during GC f2fs: avoid fi->i_gc_rwsem[WRITE] lock in f2fs_gc f2fs: fix performance issue observed with multi-thread sequential read f2fs: fix to skip verifying block address for non-regular inode f2fs: rework fault injection handling to avoid a warning f2fs: support fault_type mount option f2fs: fix to return success when trimming meta area f2fs: fix use-after-free of dicard command entry f2fs: support discard submission error injection f2fs: split discard command in prior to block layer f2fs: wake up gc thread immediately when gc_urgent is set f2fs: fix incorrect range->len in f2fs_trim_fs() f2fs: refresh recent accessed nat entry in lru list f2fs: fix avoid race between truncate and background GC f2fs: avoid race between zero_range and background GC f2fs: fix to do sanity check with block address in main area v2 f2fs: fix to do sanity check with inline flags f2fs: fix to reset i_gc_failures correctly f2fs: fix invalid memory access f2fs: fix to avoid broken of dnode block list f2fs: use true and false for boolean values f2fs: fix to do sanity check with cp_pack_start_sum f2fs: avoid f2fs_bug_on() in cp_error case f2fs: fix to clear PG_checked flag in set_page_dirty() f2fs: fix to active page in lru list for read path f2fs: don't keep meta pages used for block migration f2fs: fix to restrict mount condition when without CONFIG_QUOTA f2fs: quota: do not mount as RDWR without QUOTA if quota feature enabled f2fs: quota: fix incorrect comments f2fs: add proc entry to show victim_secmap bitmap f2fs: let checkpoint flush dnode page of regular f2fs: issue discard align to section in LFS mode f2fs: don't allow any writes on aborted atomic writes f2fs: restrict setting up inode.i_advise f2fs: fix wrong kernel message when recover fsync data on ro fs f2fs: clean up ioctl interface naming f2fs: clean up with f2fs_is_{atomic,volatile}_file() f2fs: clean up with f2fs_encrypted_inode() f2fs: clean up with get_current_nat_page f2fs: kill EXT_TREE_VEC_SIZE f2fs: avoid duplicated permission check for "trusted." xattrs f2fs: fix to propagate error from __get_meta_page() f2fs: fix to do sanity check with i_extra_isize f2fs: blk_finish_plug of submit_bio in lfs mode f2fs: do not set free of current section f2fs: Keep alloc_valid_block_count in sync f2fs: issue small discard by LBA order f2fs: stop issuing discard immediately if there is queued IO f2fs: clean up with IS_INODE() f2fs: detect bug_on in f2fs_wait_discard_bios f2fs: fix defined but not used build warnings f2fs: enable real-time discard by default f2fs: fix to detect looped node chain correctly f2fs: fix to do sanity check with block address in main area f2fs: fix to skip GC if type in SSA and SIT is inconsistent f2fs: try grabbing node page lock aggressively in sync scenario f2fs: show the fsync_mode=nobarrier mount option f2fs: check the right return value of memory alloc function f2fs: Replace strncpy with memcpy f2fs: avoid the global name 'fault_name' f2fs: fix to do sanity check with reserved blkaddr of inline inode f2fs: fix to do sanity check with node footer and iblocks f2fs: Allocate and stat mem used by free nid bitmap more accurately f2fs: fix to do sanity check with user_block_count f2fs: fix to do sanity check with extra_attr feature f2fs: fix to correct return value of f2fs_trim_fs f2fs: fix to do sanity check with {sit,nat}_ver_bitmap_bytesize f2fs: fix to do sanity check with secs_per_zone f2fs: disable f2fs_check_rb_tree_consistence f2fs: introduce and spread verify_blkaddr f2fs: use timespec64 for inode timestamps f2fs: fix to wait on page writeback before updating page f2fs: assign REQ_RAHEAD to bio for ->readpages f2fs: fix a hungtask problem caused by congestion_wait f2fs: Fix uninitialized return in f2fs_ioc_shutdown() f2fs: don't issue discard commands in online discard is on f2fs: fix to propagate return value of scan_nat_page() f2fs: support in-memory inode checksum when checking consistency f2fs: fix error path of fill_super f2fs: relocate readdir_ra configure initialization f2fs: move s_res{u,g}id initialization to default_options() f2fs: don't acquire orphan ino during recovery f2fs: avoid potential deadlock in f2fs_sbi_store f2fs: indicate shutdown f2fs to allow unmount successfully f2fs: keep meta pages in cp_error state f2fs: do checkpoint in kill_sb f2fs: allow wrong configured dio to buffered write f2fs: flush journal nat entries for nat_bits during unmount Change-Id: Idf605de5a231be53449a783dc042f590a6e6fd77 Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
| | | * | f2fs: support fault_type mount optionChao Yu2018-09-181-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, once fault injection is on, by default, all kind of faults will be injected to f2fs, if we want to trigger single or specified combined type during the test, we need to configure sysfs entry, it will be a little inconvenient to integrate sysfs configuring into testsuit, such as xfstest. So this patch introduces a new mount option 'fault_type' to assist old option 'fault_injection', with these two mount options, we can specify any fault rate/type at mount-time. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| | * | | Merge remote-tracking branch 'origin/upstream-f2fs-stable-linux-4.9.y' into ↵Jaegeuk Kim2018-07-301-0/+626
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | android-4.9 Cherry-picked from origin/upstream-f2fs-stable-linux-4.9.y: f950fa4816e0 treewide: Use array_size in f2fs_kvzalloc() 61f4864691a7 treewide: Use array_size() in f2fs_kzalloc() c4eb50dac312 treewide: Use array_size() in f2fs_kmalloc() 96a232926b41 overflow.h: Add allocation size calculation helpers 9a857bde9fdb f2fs: fix to clear FI_VOLATILE_FILE correctly deb78d4c9ae2 f2fs: let sync node IO interrupt async one 7507ad250a67 f2fs: don't change wbc->sync_mode accb4064fb32 f2fs: fix to update mtime correctly 6285d972c331 fs: f2fs: insert space around that ':' and ', ' 9ef10313f5f1 fs: f2fs: add missing blank lines after declarations ee62ea28d5ad fs: f2fs: changed variable type of offset "unsigned" to "loff_t" 6b4d6a815006 f2fs: clean up symbol namespace 6de81c8d5e2c f2fs: make set_de_type() static fdd569a78f2f f2fs: make __f2fs_write_data_pages() static 48fa534336c9 f2fs: fix to avoid accessing cross the boundary 34880e00cfed f2fs: fix to let caller retry allocating block address 8c46965183b6 disable loading f2fs module on PAGE_SIZE > 4KB 408285a40a72 f2fs: fix error path of move_data_page 9780d68db869 f2fs: don't drop dentry pages after fs shutdown b9921f022b30 f2fs: fix to avoid race during access gc_thread pointer bcbcda43c3d8 f2fs: clean up with clear_radix_tree_dirty_tag 4636af963f1c f2fs: fix to don't trigger writeback during recovery 5bc68f305080 f2fs: clear discard_wake earlier 8d74ddc1b201 f2fs: let discard thread wait a little longer if dev is busy caf10c6f127f f2fs: avoid stucking GC due to atomic write 0390d83fddaa f2fs: introduce sbi->gc_mode to determine the policy bbab2dcb226f f2fs: keep migration IO order in LFS mode 2f7e488b70f0 f2fs: fix to wait page writeback during revoking atomic write 664de5990a73 f2fs: Fix deadlock in shutdown ioctl 458e47f3b223 f2fs: detect synchronous writeback more earlier 4d93a43dafda mm: remove nr_pages argument from pagevec_lookup_{,range}_tag() 12034c751db0 ceph: use pagevec_lookup_range_nr_tag() 565d7441b910 mm: add variant of pagevec_lookup_range_tag() taking number of pages bef1c39148d6 mm: use pagevec_lookup_range_tag() in write_cache_pages() 7e95dd50c6c2 mm: use pagevec_lookup_range_tag() in __filemap_fdatawait_range() 88c6c1f24756 nilfs2: use pagevec_lookup_range_tag() aa70b7019e82 gfs2: use pagevec_lookup_range_tag() c4464307d48d f2fs: use find_get_pages_tag() for looking up single page 45ec63b247d3 f2fs: simplify page iteration loops e06736589bf1 f2fs: use pagevec_lookup_range_tag() d7a592f66047 ext4: use pagevec_lookup_range_tag() b433151665c6 ceph: use pagevec_lookup_range_tag() e286666cb13e btrfs: use pagevec_lookup_range_tag() fb296a23c286 mm: implement find_get_pages_range_tag() 158d9bbbe159 f2fs: clean up with is_valid_blkaddr() 20893172b7ee f2fs: fix to initialize min_mtime with ULLONG_MAX a301e76180de f2fs: fix to let checkpoint guarantee atomic page persistence 2d96ad5b28a3 f2fs: fix to initialize i_current_depth according to inode type 6b7c7b417193 Revert "f2fs: add ovp valid_blocks check for bg gc victim to fg_gc" 04fa5dce0312 f2fs: don't drop any page on f2fs_cp_error() case 0aca14fc01ec f2fs: fix spelling mistake: "extenstion" -> "extension" 6abb03385b5c f2fs: enhance sanity_check_raw_super() to avoid potential overflows f921fa849686 f2fs: treat volatile file's data as hot one a2cbd9b5ee56 f2fs: introduce release_discard_addr() for cleanup 54f43787c97f f2fs: fix potential overflow f6bd7d451ab7 f2fs: rename dio_rwsem to i_gc_rwsem 48698e46f355 f2fs: move mnt_want_write_file after range check 707f7ae7db6d f2fs: fix missing clear FI_NO_PREALLOC in some error case d487b1588e61 f2fs: enforce fsync_mode=strict for renamed directory 1c7d5f02bfe2 f2fs: sanity check for total valid node blocks 0f0b18adcd80 f2fs: sanity check on sit entry 60143bfdb3b9 f2fs: avoid bug_on on corrupted inode b733d0175e7c f2fs: give message and set need_fsck given broken node id 0b4d0d03c96c f2fs: clean up commit_inmem_pages() 80ee152c0581 f2fs: do not check F2FS_INLINE_DOTS in recover 78d089f531a2 f2fs: remove duplicated dquot_initialize and fix error handling 198f637cdfdb f2fs: stop issue discard if something wrong with f2fs 2f903ef932c0 f2fs: fix return value in f2fs_ioc_commit_atomic_write 5bdfc7ee960c f2fs: allocate hot_data for atomic write more strictly 51ad1795a5ee f2fs: check if inmem_pages list is empty correctly 72823f4c7aec f2fs: fix race in between GC and atomic open 97d0c4e72c9d f2fs: change le32 to le16 of f2fs_inode->i_extra_size 5a60d4cde910 f2fs: check cur_valid_map_mir & raw_sit block count when flush sit entries aa8b4b9926de f2fs: correct return value of f2fs_trim_fs 03a22433da7a f2fs: fix to show missing bits in FS_IOC_GETFLAGS a0bbb362383b f2fs: remove unneeded F2FS_PROJINHERIT_FL 7aee058b663a f2fs: don't use GFP_ZERO for page caches addb448b7e6e f2fs: issue all big range discards in umount process dc93e586b349 f2fs: remove redundant block plug d1aee08aab18 f2fs: remove unmatched zero_user_segment when convert inline dentry 9bafde62f512 f2fs: introduce private inode status mapping a4842a18697e fscrypt: log the crypto algorithm implementations c16d27ebb943 fscrypt: add Speck128/256 support 08ac7224b566 fscrypt: only derive the needed portion of the key 24cc7a8cbbac fscrypt: separate key lookup from key derivation 78275d80f7db fscrypt: use a common logging function 56733c6207c0 fscrypt: remove internal key size constants 9add02d5c6c1 fscrypt: remove unnecessary check for non-logon key type 4ddc3a807e24 fscrypt: make fscrypt_operations.max_namelen an integer 6cf4ea2a0cb0 fscrypt: drop empty name check from fname_decrypt() e2a57840e17e fscrypt: drop max_namelen check from fname_decrypt() d3679390f97c fscrypt: don't special-case EOPNOTSUPP from fscrypt_get_encryption_info() 1cfd158268eb fscrypt: don't clear flags on crypto transform cfd1d7bab1b7 fscrypt: remove stale comment from fscrypt_d_revalidate() 1e04ac8a2056 fscrypt: remove error messages for skcipher_request_alloc() failure c6b42b9bc7f7 fscrypt: remove unnecessary NULL check when allocating skcipher 3866025c17b1 fscrypt: clean up after fscrypt_prepare_lookup() conversions b711ad8a21c0 ext4: switch to fscrypt_prepare_lookup() f9866debb56a fscrypt: use unbound workqueue for decryption Change-Id: Ia9a47ef30e9e47c4c3e1e9e91e37ae1dc018384f Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
| | | * | fscrypt: add Speck128/256 supportEric Biggers2018-06-281-0/+626
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fscrypt currently only supports AES encryption. However, many low-end mobile devices have older CPUs that don't have AES instructions, e.g. the ARMv8 Cryptography Extensions. Currently, user data on such devices is not encrypted at rest because AES is too slow, even when the NEON bit-sliced implementation of AES is used. Unfortunately, it is infeasible to encrypt these devices at all when AES is the only option. Therefore, this patch updates fscrypt to support the Speck block cipher, which was recently added to the crypto API. The C implementation of Speck is not especially fast, but Speck can be implemented very efficiently with general-purpose vector instructions, e.g. ARM NEON. For example, on an ARMv7 processor, we measured the NEON-accelerated Speck128/256-XTS at 69 MB/s for both encryption and decryption, while AES-256-XTS with the NEON bit-sliced implementation was only 22 MB/s encryption and 19 MB/s decryption. There are multiple variants of Speck. This patch only adds support for Speck128/256, which is the variant with a 128-bit block size and 256-bit key size -- the same as AES-256. This is believed to be the most secure variant of Speck, and it's only about 6% slower than Speck128/128. Speck64/128 would be at least 20% faster because it has 20% rounds, and it can be even faster on CPUs that can't efficiently do the 64-bit operations needed for Speck128. However, Speck64's 64-bit block size is not preferred security-wise. ARM NEON also supports the needed 64-bit operations even on 32-bit CPUs, resulting in Speck128 being fast enough for our targeted use cases so far. The chosen modes of operation are XTS for contents and CTS-CBC for filenames. These are the same modes of operation that fscrypt defaults to for AES. Note that as with the other fscrypt modes, Speck will not be used unless userspace chooses to use it. Nor are any of the existing modes (which are all AES-based) being removed, of course. We intentionally don't make CONFIG_FS_ENCRYPTION select CONFIG_CRYPTO_SPECK, so people will have to enable Speck support themselves if they need it. This is because we shouldn't bloat the FS_ENCRYPTION dependencies with every new cipher, especially ones that aren't recommended for most users. Moreover, CRYPTO_SPECK is just the generic implementation, which won't be fast enough for many users; in practice, they'll need to enable CRYPTO_SPECK_NEON to get acceptable performance. More details about our choice of Speck can be found in our patches that added Speck to the crypto API, and the follow-on discussion threads. We're planning a publication that explains the choice in more detail. But briefly, we can't use ChaCha20 as we previously proposed, since it would be insecure to use a stream cipher in this context, with potential IV reuse during writes on f2fs and/or on wear-leveling flash storage. We also evaluated many other lightweight and/or ARX-based block ciphers such as Chaskey-LTS, RC5, LEA, CHAM, Threefish, RC6, NOEKEON, SPARX, and XTEA. However, all had disadvantages vs. Speck, such as insufficient performance with NEON, much less published cryptanalysis, or an insufficient security level. Various design choices in Speck make it perform better with NEON than competing ciphers while still having a security margin similar to AES, and in the case of Speck128 also the same available security levels. Unfortunately, Speck does have some political baggage attached -- it's an NSA designed cipher, and was rejected from an ISO standard (though for context, as far as I know none of the above-mentioned alternatives are ISO standards either). Nevertheless, we believe it is a good solution to the problem from a technical perspective. Certain algorithms constructed from ChaCha or the ChaCha permutation, such as MEM (Masked Even-Mansour) or HPolyC, may also meet our performance requirements. However, these are new constructions that need more time to receive the cryptographic review and acceptance needed to be confident in their security. HPolyC hasn't been published yet, and we are concerned that MEM makes stronger assumptions about the underlying permutation than the ChaCha stream cipher does. In contrast, the XTS mode of operation is relatively well accepted, and Speck has over 70 cryptanalysis papers. Of course, these ChaCha-based algorithms can still be added later if they become ready. The best known attack on Speck128/256 is a differential cryptanalysis attack on 25 of 34 rounds with 2^253 time complexity and 2^125 chosen plaintexts, i.e. only marginally faster than brute force. There is no known attack on the full 34 rounds. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| | | * | f2fs: add fsync_mode=nobarrier for non-atomic filesJaegeuk Kim2018-05-301-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For non-atomic files, this patch adds an option to give nobarrier which doesn't issue flush commands to the device. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| | | * | f2fs: introduce a new mount option test_dummy_encryptionSheng Yong2018-04-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a new mount option `test_dummy_encryption' to allow fscrypt to create a fake fscrypt context. This is used by xfstests. Signed-off-by: Sheng Yong <shengyong1@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| | | * | f2fs: introduce mount option for fsync modeJunling Zheng2018-04-081-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit "0a007b97aad6"(f2fs: recover directory operations by fsync) fixed xfstest generic/342 case, but it also increased the written data and caused the performance degradation. In most cases, there's no need to do so heavy fsync actually. So we introduce new mount option "fsync_mode={posix,strict}" to control the policy of fsync. "fsync_mode=posix" is set by default, and means that f2fs uses a light fsync, which follows POSIX semantics. And "fsync_mode=strict" means that it's a heavy fsync, which behaves in line with xfs, ext4 and btrfs, where generic/342 will pass, but the performance will regress. Signed-off-by: Junling Zheng <zhengjunling@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| | | * | f2fs: add mount option for segment allocation policyJaegeuk Kim2018-04-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds an mount option, "alloc_mode=%s" having two options, "default" and "reuse". In "alloc_mode=reuse" case, f2fs starts to allocate segments from 0'th segment all the time to reassign segments. It'd be useful for small-sized eMMC parts. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| | | * | f2fs: support journalled quotaChao Yu2017-09-211-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch supports to enable f2fs to accept quota information through mount option: - {usr,grp,prj}jquota=<quota file path> - jqfmt=<quota type> Then, in ->mount flow, we can recover quota file during log replaying, by this, journelled quota can be supported. Signed-off-by: Chao Yu <yuchao0@huawei.com> [Jaegeuk Kim: Fix wrong return values.] Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| | | * | f2fs: introduce gc_urgent mode for background GCJaegeuk Kim2017-09-211-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a sysfs entry to control urgent mode for background GC. If this is set, background GC thread conducts GC with gc_urgent_sleep_time all the time. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| | | * | f2fs: support project quotaChao Yu2017-09-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds to support plain project quota. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| | | * | f2fs: support plain user/group quotaChao Yu2017-07-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds to support plain user/group quota. Change Note by Jaegeuk Kim. - Use f2fs page cache for quota files in order to consider garbage collection. so, quota files are not tolerable for sudden power-cuts, so user needs to do quotacheck. - setattr() calls dquot_transfer which will transfer inode->i_blocks. We can't reclaim that during f2fs_evict_inode(). So, we need to count node blocks as well in order to match i_blocks with dquot's space. Note that, Chao wrote a patch to count inode->i_blocks without inode block. (f2fs: don't count inode block in in-memory inode.i_blocks) - in f2fs_remount, we need to make RW in prior to dquot_resume. - handle fault_injection case during f2fs_quota_off_umount - TODO: Project quota Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| | * | | FROMLIST: f2fs: early updates queued for v4.18-rc1Jaegeuk Kim2018-05-301-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cherry-picked from: origin/upstream-f2fs-stable-linux-4.9.y cea3ae5716a2 ("f2fs: turn down IO priority of discard from background") 0357a0faca5c ("f2fs: don't split checkpoint in fstrim") 41059095317d ("f2fs: issue discard commands proactively in high fs utilization") 3a38cf1525f5 ("f2fs: add fsync_mode=nobarrier for non-atomic files") 8f6a2e7a6669 ("f2fs: let fstrim issue discard commands in lower priority") Change-Id: Id7bfb0e31103b42b0eb87928d2d6bc34f18f555c Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
| | * | | f2fs/fscrypt: updates to v4.17-rc1Jaegeuk Kim2018-04-121-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull f2fs update from Jaegeuk Kim: "In this round, we've mainly focused on performance tuning and critical bug fixes occurred in low-end devices. Sheng Yong introduced lost_found feature to keep missing files during recovery instead of thrashing them. We're preparing coming fsverity implementation. And, we've got more features to communicate with users for better performance. In low-end devices, some memory-related issues were fixed, and subtle race condtions and corner cases were addressed as well. Enhancements: - large nat bitmaps for more free node ids - add three block allocation policies to pass down write hints given by user - expose extension list to user and introduce hot file extension - tune small devices seamlessly for low-end devices - set readdir_ra by default - give more resources under gc_urgent mode regarding to discard and cleaning - introduce fsync_mode to enforce posix or not - nowait aio support - add lost_found feature to keep dangling inodes - reserve bits for future fsverity feature - add test_dummy_encryption for FBE Bug fixes: - don't use highmem for dentry pages - align memory boundary for bitops - truncate preallocated blocks in write errors - guarantee i_times on fsync call - clear CP_TRIMMED_FLAG correctly - prevent node chain loop during recovery - avoid data race between atomic write and background cleaning - avoid unnecessary selinux violation warnings on resgid option - GFP_NOFS to avoid deadlock in quota and read paths - fix f2fs_skip_inode_update to allow i_size recovery In addition to the above, there are several minor bug fixes and clean-ups" Cherry-pick from origin/upstream-f2fs-stable-linux-4.9.y: ac389af190fb f2fs: remain written times to update inode during fsync 270deeb87125 f2fs: make assignment of t->dentry_bitmap more readable a4fa11c8da10 f2fs: truncate preallocated blocks in error case 4478970f0e73 f2fs: fix a wrong condition in f2fs_skip_inode_update 29cead58f5ea f2fs: reserve bits for fs-verity 848b293a5d95 f2fs: Add a segment type check in inplace write 2dc8f5a3a640 f2fs: no need to initialize zero value for GFP_F2FS_ZERO 83b9bb95a628 f2fs: don't track new nat entry in nat set a33ce03ac477 f2fs: clean up with F2FS_BLK_ALIGN a3f8ec8082e3 f2fs: check blkaddr more accuratly before issue a bio 034f11eadb16 f2fs: Set GF_NOFS in read_cache_page_gfp while doing f2fs_quota_read aa5bcfd8f488 f2fs: introduce a new mount option test_dummy_encryption 9b880fe6e6e2 f2fs: introduce F2FS_FEATURE_LOST_FOUND feature 80d6489a08c1 f2fs: release locks before return in f2fs_ioc_gc_range() 9f1896c490eb f2fs: align memory boundary for bitops c7930ee88334 f2fs: remove unneeded set_cold_node() 355d2346409a f2fs: add nowait aio support e9a50e6b9479 f2fs: wrap all options with f2fs_sb_info.mount_opt b6d2ec83e0c0 f2fs: Don't overwrite all types of node to keep node chain 9a954816298c f2fs: introduce mount option for fsync mode 4ce4eb697068 f2fs: fix to restore old mount option in ->remount_fs 8f711c344e61 f2fs: wrap sb_rdonly with f2fs_readonly c07478ee84bf f2fs: avoid selinux denial on CAP_SYS_RESOURCE ac734c416fa9 f2fs: support hot file extension f4f10221accc f2fs: fix to avoid race in between atomic write and background GC e87b13ec160b f2fs: do gc in greedy mode for whole range if gc_urgent mode is set e9878588de94 f2fs: issue discard aggressively in the gc_urgent mode ad3ce479e6e4 f2fs: set readdir_ra by default 5aae2026bbd2 f2fs: add auto tuning for small devices 78c1fc2d8f27 f2fs: add mount option for segment allocation policy ecd02f564631 f2fs: don't stop GC if GC is contended 1e72cb27d2d6 f2fs: expose extension_list sysfs entry 061839d178ab f2fs: fix to set KEEP_SIZE bit in f2fs_zero_range 4951ebcbc4e2 f2fs: introduce sb_lock to make encrypt pwsalt update exclusive 939f6be0420f f2fs: remove redundant initialization of pointer 'p' 39bea4bc8ef2 f2fs: flush cp pack except cp pack 2 page at first 770611eb2ab4 f2fs: clean up f2fs_sb_has_xxx functions 4d8e4a8965f9 f2fs: remove redundant check of page type when submit bio e9878588de94 f2fs: issue discard aggressively in the gc_urgent mode ad3ce479e6e4 f2fs: set readdir_ra by default 5aae2026bbd2 f2fs: add auto tuning for small devices 78c1fc2d8f27 f2fs: add mount option for segment allocation policy ecd02f564631 f2fs: don't stop GC if GC is contended 1e72cb27d2d6 f2fs: expose extension_list sysfs entry 061839d178ab f2fs: fix to set KEEP_SIZE bit in f2fs_zero_range 4951ebcbc4e2 f2fs: introduce sb_lock to make encrypt pwsalt update exclusive 939f6be0420f f2fs: remove redundant initialization of pointer 'p' 39bea4bc8ef2 f2fs: flush cp pack except cp pack 2 page at first 770611eb2ab4 f2fs: clean up f2fs_sb_has_xxx functions 4d8e4a8965f9 f2fs: remove redundant check of page type when submit bio b57a37f01fda f2fs: fix to handle looped node chain during recovery 9ac5b8c54083 f2fs: handle quota for orphan inodes 87c18066016a f2fs: support passing down write hints to block layer with F2FS policy bcdc571e8d8b f2fs: support passing down write hints given by users to block layer 92413bc12e32 f2fs: fix to clear CP_TRIMMED_FLAG a1afb55f9784 f2fs: support large nat bitmap 636039140493 f2fs: fix to check extent cache in f2fs_drop_extent_tree 7de4fccdbce1 f2fs: restrict inline_xattr_size configuration aae506a8b704 f2fs: fix heap mode to reset it back 8fa455bb6ea0 f2fs: fix potential corruption in area before F2FS_SUPER_OFFSET 9d9cb0ef73f9 fscrypt: fix build with pre-4.6 gcc versions 401052ffc6b4 fscrypt: remove 'ci' parameter from fscrypt_put_encryption_info() 549b2061b3b5 fscrypt: fix up fscrypt_fname_encrypted_size() for internal use c440b5091a0c fscrypt: define fscrypt_fname_alloc_buffer() to be for presented names 7d82f0e1c39a ext4: switch to fscrypt ->symlink() helper functions ba4efe560438 ext4: switch to fscrypt_get_symlink() b0edc2f22d24 fscrypt: calculate NUL-padding length in one place only 62cfdd9868c7 fscrypt: move fscrypt_symlink_data to fscrypt_private.h e4e6776522bc fscrypt: remove fscrypt_fname_usr_to_disk() 45028b5aaa4e f2fs: switch to fscrypt_get_symlink() f62d3d31e0c7 f2fs: switch to fscrypt ->symlink() helper functions da32a1633ad3 fscrypt: new helper function - fscrypt_get_symlink() a7e05c731d11 fscrypt: new helper functions for ->symlink() eb9c5fd896de fscrypt: trim down fscrypt.h includes 0a02472d8ae2 fscrypt: move fscrypt_is_dot_dotdot() to fs/crypto/fname.c 9d51ca80274c fscrypt: move fscrypt_valid_enc_modes() to fscrypt_private.h efbfa8c6a056 fscrypt: move fscrypt_operations declaration to fscrypt_supp.h 616dbd2bdc6a fscrypt: split fscrypt_dummy_context_enabled() into supp/notsupp versions f0c472bcbf1c fscrypt: move fscrypt_ctx declaration to fscrypt_supp.h bc76f39109b1 fscrypt: move fscrypt_info_cachep declaration to fscrypt_private.h b67b07ec4964 fscrypt: move fscrypt_control_page() to supp/notsupp headers d8dfb89961d0 fscrypt: move fscrypt_has_encryption_key() to supp/notsupp headers Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
| * | | | BACKPORT, FROMGIT: fscrypt: add Adiantum supportEric Biggers2019-01-221-0/+641
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the Adiantum encryption mode to fscrypt. Adiantum is a tweakable, length-preserving encryption mode with security provably reducible to that of XChaCha12 and AES-256, subject to a security bound. It's also a true wide-block mode, unlike XTS. See the paper "Adiantum: length-preserving encryption for entry-level processors" (https://eprint.iacr.org/2018/720.pdf) for more details. Also see commit 059c2a4d8e16 ("crypto: adiantum - add Adiantum support"). On sufficiently long messages, Adiantum's bottlenecks are XChaCha12 and the NH hash function. These algorithms are fast even on processors without dedicated crypto instructions. Adiantum makes it feasible to enable storage encryption on low-end mobile devices that lack AES instructions; currently such devices are unencrypted. On ARM Cortex-A7, on 4096-byte messages Adiantum encryption is about 4 times faster than AES-256-XTS encryption; decryption is about 5 times faster. In fscrypt, Adiantum is suitable for encrypting both file contents and names. With filenames, it fixes a known weakness: when two filenames in a directory share a common prefix of >= 16 bytes, with CTS-CBC their encrypted filenames share a common prefix too, leaking information. Adiantum does not have this problem. Since Adiantum also accepts long tweaks (IVs), it's also safe to use the master key directly for Adiantum encryption rather than deriving per-file keys, provided that the per-file nonce is included in the IVs and the master key isn't used for any other encryption mode. This configuration saves memory and improves performance. A new fscrypt policy flag is added to allow users to opt-in to this configuration. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> (cherry picked from commit 889645b87e96cecbdf7d76ab86447d1f1c6b41d3 https://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt.git master) Conflicts: Documentation/filesystems/fscrypt.rst include/uapi/linux/fs.h (replaced refcount_t with atomic_t) Bug: 112008522 Test: For regression testing, built the kernel for x86_64 KVM and ran the encryption xfstests using kvm-xfstests: kvm-xfstests -c ext4,f2fs -g encrypt Tests for the Adiantum mode and "direct key" specifically aren't yet included in xfstests, but I also tried it manually with the following (run in the kvm-xfstests test appliance): cd / umount /vdc &> /dev/null mkfs.f2fs -O encrypt -f /dev/vdc mount /vdc cd /vdc rm -rf edir mkdir edir . ~/xfstests/common/encrypt KEYCTL_PROG=keyctl FSTYP=fscrypt _new_session_keyring k=$(_generate_encryption_key) xfs_io -c "set_encpolicy -c 9 -n 9 -f 0x4 $k" edir/ cp -a /usr edir/ diff -r /usr edir/usr/ dmesg should show that Adiantum is being used: fscrypt: Adiantum using implementation "adiantum(xchacha12-generic,aes-aesni,nhpoly1305-generic)" Signed-off-by: Eric Biggers <ebiggers@google.com> (cherry picked from android-4.9 commit e33fa31e300e4f3e6092a95dacf40d23a4e12790) Conflicts: fs/crypto/fscrypt_private.h fs/crypto/keyinfo.c include/uapi/linux/fs.h (resolved conflicts with ICE support) Change-Id: I29ffaa7ef9cbd23d2f6ed428814c607227241ce9 Signed-off-by: Eric Biggers <ebiggers@google.com>
* | | | | BACKPORT, FROMGIT: fscrypt: add Adiantum supportEric Biggers2019-02-241-0/+641
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the Adiantum encryption mode to fscrypt. Adiantum is a tweakable, length-preserving encryption mode with security provably reducible to that of XChaCha12 and AES-256, subject to a security bound. It's also a true wide-block mode, unlike XTS. See the paper "Adiantum: length-preserving encryption for entry-level processors" (https://eprint.iacr.org/2018/720.pdf) for more details. Also see commit 059c2a4d8e16 ("crypto: adiantum - add Adiantum support"). On sufficiently long messages, Adiantum's bottlenecks are XChaCha12 and the NH hash function. These algorithms are fast even on processors without dedicated crypto instructions. Adiantum makes it feasible to enable storage encryption on low-end mobile devices that lack AES instructions; currently such devices are unencrypted. On ARM Cortex-A7, on 4096-byte messages Adiantum encryption is about 4 times faster than AES-256-XTS encryption; decryption is about 5 times faster. In fscrypt, Adiantum is suitable for encrypting both file contents and names. With filenames, it fixes a known weakness: when two filenames in a directory share a common prefix of >= 16 bytes, with CTS-CBC their encrypted filenames share a common prefix too, leaking information. Adiantum does not have this problem. Since Adiantum also accepts long tweaks (IVs), it's also safe to use the master key directly for Adiantum encryption rather than deriving per-file keys, provided that the per-file nonce is included in the IVs and the master key isn't used for any other encryption mode. This configuration saves memory and improves performance. A new fscrypt policy flag is added to allow users to opt-in to this configuration. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> (cherry picked from commit 889645b87e96cecbdf7d76ab86447d1f1c6b41d3 https://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt.git master) Conflicts: Documentation/filesystems/fscrypt.rst include/uapi/linux/fs.h (replaced refcount_t with atomic_t) Bug: 112008522 Test: For regression testing, built the kernel for x86_64 KVM and ran the encryption xfstests using kvm-xfstests: kvm-xfstests -c ext4,f2fs -g encrypt Tests for the Adiantum mode and "direct key" specifically aren't yet included in xfstests, but I also tried it manually with the following (run in the kvm-xfstests test appliance): cd / umount /vdc &> /dev/null mkfs.f2fs -O encrypt -f /dev/vdc mount /vdc cd /vdc rm -rf edir mkdir edir . ~/xfstests/common/encrypt KEYCTL_PROG=keyctl FSTYP=fscrypt _new_session_keyring k=$(_generate_encryption_key) xfs_io -c "set_encpolicy -c 9 -n 9 -f 0x4 $k" edir/ cp -a /usr edir/ diff -r /usr edir/usr/ dmesg should show that Adiantum is being used: fscrypt: Adiantum using implementation "adiantum(xchacha12-generic,aes-aesni,nhpoly1305-generic)" Signed-off-by: Eric Biggers <ebiggers@google.com> (cherry picked from android-4.9 commit e33fa31e300e4f3e6092a95dacf40d23a4e12790) Conflicts: fs/crypto/fscrypt_private.h fs/crypto/keyinfo.c include/uapi/linux/fs.h (resolved conflicts with ICE support) Change-Id: I29ffaa7ef9cbd23d2f6ed428814c607227241ce9 Signed-off-by: Eric Biggers <ebiggers@google.com>
* | | | | Merge upstream-f2fs-stable-linux-4.9.y into android-4.9Jaegeuk Kim2019-02-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/upstream-f2fs-stable-linux-4.9.y: f2fs: do not use mutex lock in atomic context f2fs: fix potential data inconsistence of checkpoint f2fs: fix to avoid deadlock of atomic file operations f2fs: fix to check inline_xattr_size boundary correctly f2fs: jump to label 'free_node_inode' when failing from d_make_root() f2fs: fix to document inline_xattr_size option f2fs: fix to data block override node segment by mistake f2fs: fix typos in code comments f2fs: use xattr_prefix to wrap up f2fs: sync filesystem after roll-forward recovery fs: export evict_inodes f2fs: flush quota blocks after turnning it off f2fs: avoid null pointer exception in dcc_info f2fs: don't wake up too frequently, if there is lots of IOs f2fs: try to keep CP_TRIMMED_FLAG after successful umount f2fs: add quick mode of checkpoint=disable for QA f2fs: run discard jobs when put_super f2fs: fix to set sbi dirty correctly f2fs: UBSAN: set boolean value iostat_enable correctly f2fs: add brackets for macros f2fs: check if file namelen exceeds max value f2fs: fix to trigger fsck if dirent.name_len is zero f2fs: no need to check return value of debugfs_create functions f2fs: export FS_NOCOW_FL flag to user f2fs: check inject_rate validity during configuring f2fs: remove set but not used variable 'err' f2fs: fix compile warnings: 'struct *' declared inside parameter list f2fs: change error code to -ENOMEM from -EINVAL Change-Id: I6fda0c468b699339d99b2018b30618e7280f7bee Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
* | | | | Merge branch 'android-msm-bonito-4.9' into android-msm-pixel-4.9Robin Peng2019-01-301-9/+15
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Documentation/filesystems/overlayfs.txt arch/arm64/configs/bonito_defconfig drivers/android/binder.c drivers/char/adsprpc.c drivers/cpuidle/lpm-levels.c drivers/input/keydebug-core.c drivers/input/keydebug-func.c drivers/media/platform/msm/vidc/msm_vidc_common.c drivers/power/supply/overheat_mitigation.c drivers/staging/android/ion/ion.c fs/f2fs/data.c fs/f2fs/segment.c fs/f2fs/super.c fs/overlayfs/super.c include/linux/mm_event.h include/trace/events/mm_event.h include/uapi/linux/android/binder.h mm/Kconfig mm/filemap.c mm/mm_event.c Bug: 119540871 Change-Id: Ib26a8b09fdd5736165737d41d97148b6507b4e50 Signed-off-by: Robin Peng <robinpeng@google.com>
| * | | | BACKPORT: overlayfs: override_creds=off option bypass creator_credMark Salyzyn2019-01-171-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, all access to the upper, lower and work directories is the recorded mounter's MAC and DAC credentials. The incoming accesses are checked against the caller's credentials. If the principles of least privilege are applied, the mounter's credentials might not overlap the credentials of the caller's when accessing the overlayfs filesystem. For example, a file that a lower DAC privileged caller can execute, is MAC denied to the generally higher DAC privileged mounter, to prevent an attack vector. We add the option to turn off override_creds in the mount options; all subsequent operations after mount on the filesystem will be only the caller's credentials. The module boolean parameter and mount option override_creds is also added as a presence check for this "feature", existence of /sys/module/overlay/parameters/override_creds. It was not always this way. Circa 4.6 there was no recorded mounter's credentials, instead privileged access to upper or work directories were temporarily increased to perform the operations. The MAC (selinux) policies were caller's in all cases. override_creds=off partially returns us to this older access model minus the insecure temporary credential increases. This is to permit use in a system with non-overlapping security models for each executable including the agent that mounts the overlayfs filesystem. In Android this is the case since init, which performs the mount operations, has a minimal MAC set of privileges to reduce any attack surface, and services that use the content have a different set of MAC privileges (eg: read, for vendor labelled configuration, execute for vendor libraries and modules). The caveats are not a problem in the Android usage model, however they should be fixed for completeness and for general use in time. Signed-off-by: Mark Salyzyn <salyzyn@android.com> Cc: Miklos Szeredi <miklos@szeredi.hu> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Amir Goldstein <amir73il@gmail.com> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Stephen Smalley <sds@tycho.nsa.gov> Cc: linux-unionfs@vger.kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: kernel-team@android.com (cherry picked from commit https://lore.kernel.org/patchwork/patch/1009299/) Bug: 109821005 Bug: 119115481 Change-Id: I74ce61c8780a2431ffaed8247795c3dd07de99e6 Signed-off-by: Hridya Valsaraju <hridya@google.com>
* | | | | Revert "fscrypt: add Speck128/256 support"Alistair Strachan2019-01-191-626/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c16d27ebb94346d08c441e70f77e52b2ed4a758a. Resolves conflicts with a later CL, commit a4842a18697e ("fscrypt: log the crypto algorithm implementations"). Also leaves the include/uapi/linux/fs.h constants in place to prevent future accidental re-use. Bug: 116008047 Change-Id: I2d64d8d3e384400b7bdfc06a353c3844d4ebb377 Signed-off-by: Alistair Strachan <astrachan@google.com>