854 Commits

Author SHA1 Message Date
Herbert Xu
04f51847e5 fscrypt: Allow modular crypto algorithms
The commit 643fa9612bf1 ("fscrypt: remove filesystem specific
build config option") removed modular support for fs/crypto.  This
causes the Crypto API to be built-in whenever fscrypt is enabled.
This makes it very difficult for me to test modular builds of
the Crypto API without disabling fscrypt which is a pain.

As fscrypt is still evolving and it's developing new ties with the
fs layer, it's hard to build it as a module for now.

However, the actual algorithms are not required until a filesystem
is mounted.  Therefore we can allow them to be built as modules.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Link: https://lore.kernel.org/r/20191227024700.7vrzuux32uyfdgum@gondor.apana.org.au
Signed-off-by: Eric Biggers <ebiggers@google.com>
2020-02-13 15:12:04 -08:00
Eric Biggers
8842133ff3 fscrypt: don't check for ENOKEY from fscrypt_get_encryption_info()
fscrypt_get_encryption_info() returns 0 if the encryption key is
unavailable; it never returns ENOKEY.  So remove checks for ENOKEY.

Link: https://lore.kernel.org/r/20191209212348.243331-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
2020-02-13 08:24:10 -08:00
Jaegeuk Kim
791557a04a Merge remote-tracking branch 'origin/upstream-f2fs-stable-linux-4.14.y' into android-4.14
* origin/upstream-f2fs-stable-linux-4.14.y:
  ext4: add verity flag check for dax
  f2fs: add a condition to detect overflow in f2fs_ioc_gc_range()
  f2fs: fix to add missing F2FS_IO_ALIGNED() condition
  f2fs: fix to fallback to buffered IO in IO aligned mode
  f2fs: fix to handle error path correctly in f2fs_map_blocks
  f2fs: fix extent corrupotion during directIO in LFS mode
  f2fs: check all the data segments against all node ones
  f2fs: Add a small clarification to CONFIG_FS_F2FS_FS_SECURITY
  f2fs: fix inode rwsem regression
  f2fs: fix to avoid accessing uninitialized field of inode page in is_alive()
  f2fs: avoid infinite GC loop due to stale atomic files
  f2fs: Fix indefinite loop in f2fs_gc()
  f2fs: convert inline_data in prior to i_size_write
  f2fs: fix error path of f2fs_convert_inline_page()
  f2fs: add missing documents of reserve_root/resuid/resgid
  f2fs: fix flushing node pages when checkpoint is disabled
  f2fs: enhance f2fs_is_checkpoint_ready()'s readability
  f2fs: clean up __bio_alloc()'s parameter
  f2fs: fix wrong error injection path in inc_valid_block_count()
  f2fs: fix to writeout dirty inode during node flush
  f2fs: optimize case-insensitive lookups
  f2fs: introduce f2fs_match_name() for cleanup
  f2fs: Fix indefinite loop in f2fs_gc()
  f2fs: allocate memory in batch in build_sit_info()
  f2fs: fix to avoid data corruption by forbidding SSR overwrite
  f2fs: Fix build error while CONFIG_NLS=m
  Revert "f2fs: avoid out-of-range memory access"
  f2fs: cleanup the code in build_sit_entries.
  f2fs: fix wrong available node count calculation
  f2fs: remove duplicate code in f2fs_file_write_iter
  f2fs: fix to migrate blocks correctly during defragment
  f2fs: use wrapped f2fs_cp_error()
  f2fs: fix to use more generic EOPNOTSUPP
  f2fs: use wrapped IS_SWAPFILE()
  f2fs: Support case-insensitive file name lookups
  f2fs: include charset encoding information in the superblock
  fs: Reserve flag for casefolding
  f2fs: fix to avoid call kvfree under spinlock
  fs: f2fs: Remove unnecessary checks of SM_I(sbi) in update_general_status()
  f2fs: disallow direct IO in atomic write
  f2fs: fix to handle quota_{on,off} correctly
  f2fs: fix to detect cp error in f2fs_setxattr()
  f2fs: fix to spread f2fs_is_checkpoint_ready()
  f2fs: support fiemap() for directory inode
  f2fs: fix to avoid discard command leak
  f2fs: fix to avoid tagging SBI_QUOTA_NEED_REPAIR incorrectly
  f2fs: fix to drop meta/node pages during umount
  f2fs: disallow switching io_bits option during remount
  f2fs: fix panic of IO alignment feature
  f2fs: introduce {page,io}_is_mergeable() for readability
  f2fs: fix livelock in swapfile writes
  f2fs: add fs-verity support
  ext4: update on-disk format documentation for fs-verity
  ext4: add fs-verity read support
  ext4: add basic fs-verity support
  fs-verity: support builtin file signatures
  fs-verity: add SHA-512 support
  fs-verity: implement FS_IOC_MEASURE_VERITY ioctl
  fs-verity: implement FS_IOC_ENABLE_VERITY ioctl
  fs-verity: add data verification hooks for ->readpages()
  fs-verity: add the hook for file ->setattr()
  fs-verity: add the hook for file ->open()
  fs-verity: add inode and superblock fields
  fs-verity: add Kconfig and the helper functions for hashing
  fs: uapi: define verity bit for FS_IOC_GETFLAGS
  fs-verity: add UAPI header
  fs-verity: add MAINTAINERS file entry
  fs-verity: add a documentation file
  ext4: fix kernel oops caused by spurious casefold flag
  ext4: fix coverity warning on error path of filename setup
  ext4: optimize case-insensitive lookups
  ext4: fix dcache lookup of !casefolded directories
  unicode: update to Unicode 12.1.0 final
  unicode: add missing check for an error return from utf8lookup()
  ext4: export /sys/fs/ext4/feature/casefold if Unicode support is present
  unicode: refactor the rule for regenerating utf8data.h
  ext4: Support case-insensitive file name lookups
  ext4: include charset encoding information in the superblock
  unicode: update unicode database unicode version 12.1.0
  unicode: introduce test module for normalized utf8 implementation
  unicode: implement higher level API for string handling
  unicode: reduce the size of utf8data[]
  unicode: introduce code for UTF-8 normalization
  unicode: introduce UTF-8 character database
  ext4 crypto: fix to check feature status before get policy
  fscrypt: document the new ioctls and policy version
  ubifs: wire up new fscrypt ioctls
  f2fs: wire up new fscrypt ioctls
  ext4: wire up new fscrypt ioctls
  fscrypt: require that key be added when setting a v2 encryption policy
  fscrypt: add FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS ioctl
  fscrypt: allow unprivileged users to add/remove keys for v2 policies
  fscrypt: v2 encryption policy support
  fscrypt: add an HKDF-SHA512 implementation
  fscrypt: add FS_IOC_GET_ENCRYPTION_KEY_STATUS ioctl
  fscrypt: add FS_IOC_REMOVE_ENCRYPTION_KEY ioctl
  fscrypt: add FS_IOC_ADD_ENCRYPTION_KEY ioctl
  fscrypt: rename keyinfo.c to keysetup.c
  fscrypt: move v1 policy key setup to keysetup_v1.c
  fscrypt: refactor key setup code in preparation for v2 policies
  fscrypt: rename fscrypt_master_key to fscrypt_direct_key
  fscrypt: add ->ci_inode to fscrypt_info
  fscrypt: use FSCRYPT_* definitions, not FS_*
  fscrypt: use FSCRYPT_ prefix for uapi constants
  fs, fscrypt: move uapi definitions to new header <linux/fscrypt.h>
  fscrypt: use ENOPKG when crypto API support missing
  fscrypt: improve warnings for missing crypto API support
  fscrypt: improve warning messages for unsupported encryption contexts
  fscrypt: make fscrypt_msg() take inode instead of super_block
  fscrypt: clean up base64 encoding/decoding
  fscrypt: remove loadable module related code

 Conflicts:
	fs/ext4/inode.c
	fs/ext4/ioctl.c
	fs/ext4/readpage.c

Bug: 141329812
Change-Id: I7b5c255d3766b8c66b7802f5b4c6aabe2b834f65
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2019-10-07 20:22:46 +00:00
Blagovest Kolenichev
3b572c9bfa Merge android-4.14-q.146 (a3d6259) into msm-4.14
* refs/heads/tmp-a3d6259:
  Linux 4.14.146
  media: technisat-usb2: break out of loop at end of buffer
  tcp: Don't dequeue SYN/FIN-segments from write-queue
  tcp: Reset send_head when removing skb from write-queue
  binfmt_elf: move brk out of mmap when doing direct loader exec
  floppy: fix usercopy direction
  PCI: kirin: Fix section mismatch warning
  iommu/amd: Fix race in increase_address_space()
  iommu/amd: Flush old domains in kdump kernel
  keys: Fix missing null pointer check in request_key_auth_describe()
  x86/hyper-v: Fix overflow bug in fill_gva_list()
  x86/uaccess: Don't leak the AC flags into __get_user() argument evaluation
  dmaengine: ti: omap-dma: Add cleanup in omap_dma_probe()
  dmaengine: ti: dma-crossbar: Fix a memory leak bug
  net: seeq: Fix the function used to release some memory in an error handling path
  tools/power turbostat: fix buffer overrun
  tools/power x86_energy_perf_policy: Fix argument parsing
  tools/power x86_energy_perf_policy: Fix "uninitialized variable" warnings at -O2
  amd-xgbe: Fix error path in xgbe_mod_init()
  perf/x86/amd/ibs: Fix sample bias for dispatched micro-ops
  perf/x86/intel: Restrict period on Nehalem
  i2c: designware: Synchronize IRQs when unregistering slave client
  sky2: Disable MSI on yet another ASUS boards (P6Xxxx)
  ARM: 8901/1: add a criteria for pfn_valid of arm
  cifs: Use kzfree() to zero out the password
  cifs: set domainName when a domain-key is used in multiuser
  kallsyms: Don't let kallsyms_lookup_size_offset() fail on retrieving the first symbol
  NFSv2: Fix write regression
  NFSv2: Fix eof handling
  netfilter: nf_conntrack_ftp: Fix debug output
  x86/apic: Fix arch_dynirq_lower_bound() bug for DT enabled machines
  r8152: Set memory to all 0xFFs on failed reg reads
  batman-adv: Only read OGM2 tvlv_len after buffer len check
  ARM: 8874/1: mm: only adjust sections of valid mm structures
  qed: Add cleanup in qed_slowpath_start()
  Kconfig: Fix the reference to the IDT77105 Phy driver in the description of ATM_NICSTAR_USE_IDT77105
  NFS: Fix initialisation of I/O result struct in nfs_pgio_rpcsetup
  NFSv4: Fix return value in nfs_finish_open()
  NFSv4: Fix return values for nfs4_file_open()
  netfilter: xt_nfacct: Fix alignment mismatch in xt_nfacct_match_info
  fpga: altera-ps-spi: Fix getting of optional confd gpio
  s390/bpf: use 32-bit index for tail calls
  ARM: dts: dra74x: Fix iodelay configuration for mmc3
  ARM: OMAP2+: Fix omap4 errata warning on other SoCs
  s390/bpf: fix lcgr instruction encoding
  ARM: OMAP2+: Fix missing SYSC_HAS_RESET_STATUS for dra7 epwmss
  nl80211: Fix possible Spectre-v1 for CQM RSSI thresholds
  mwifiex: Fix three heap overflow at parsing element in cfg80211_ap_settings
  tty/serial: atmel: reschedule TX after RX was started
  serial: sprd: correct the wrong sequence of arguments
  firmware: google: check if size is valid when decoding VPD data
  KVM: coalesced_mmio: add bounds checking
  net_sched: let qdisc_put() accept NULL pointer
  xen-netfront: do not assume sk_buff_head list is empty in error handling
  media: tm6000: double free if usb disconnect while streaming
  phy: renesas: rcar-gen3-usb2: Disable clearing VBUS in over-current
  USB: usbcore: Fix slab-out-of-bounds bug during device reset
  powerpc/mm/radix: Use the right page size for vmemmap mapping
  Input: elan_i2c - remove Lenovo Legion Y7000 PnpID
  HID: wacom: generic: read HID_DG_CONTACTMAX from any feature report
  ANDROID: regression introduced override_creds=off
  Linux 4.14.145
  x86/build: Add -Wnoaddress-of-packed-member to REALMODE_CFLAGS, to silence GCC9 build warning
  nvmem: Use the same permissions for eeprom as for nvmem
  platform/x86: pmc_atom: Add CB4063 Beckhoff Automation board to critclk_systems DMI table
  Revert "Bluetooth: btusb: driver to enable the usb-wakeup feature"
  drm/mediatek: mtk_drm_drv.c: Add of_node_put() before goto
  firmware: ti_sci: Always request response from firmware
  crypto: talitos - HMAC SNOOP NO AFEU mode requires SW icv checking.
  crypto: talitos - Do not modify req->cryptlen on decryption.
  crypto: talitos - fix ECB algs ivsize
  crypto: talitos - check data blocksize in ablkcipher.
  crypto: talitos - fix CTR alg blocksize
  crypto: talitos - check AES key size
  driver core: Fix use-after-free and double free on glue directory
  ubifs: Correctly use tnc_next() in search_dh_cookie()
  PCI: Always allow probing with driver_override
  mtd: rawnand: mtk: Fix wrongly assigned OOB buffer pointer issue
  clk: rockchip: Don't yell about bad mmc phases when getting
  drm/meson: Add support for XBGR8888 & ABGR8888 formats
  powerpc: Add barrier_nospec to raw_copy_in_user()
  MIPS: VDSO: Use same -m%-float cflag as the kernel proper
  MIPS: VDSO: Prevent use of smp_processor_id()
  KVM: nVMX: handle page fault in vmread
  KVM: x86: work around leak of uninitialized stack contents
  KVM: s390: Do not leak kernel stack data in the KVM_S390_INTERRUPT ioctl
  genirq: Prevent NULL pointer dereference in resend_irqs()
  Btrfs: fix assertion failure during fsync and use of stale transaction
  gpio: fix line flag validation in lineevent_create
  gpio: fix line flag validation in linehandle_create
  gpiolib: acpi: Add gpiolib_acpi_run_edge_events_on_boot option and blacklist
  Revert "MIPS: SiByte: Enable swiotlb for SWARM, LittleSur and BigSur"
  btrfs: correctly validate compression type
  btrfs: compression: add helper for type to string conversion
  tun: fix use-after-free when register netdev failed
  tipc: add NULL pointer check before calling kfree_rcu
  tcp: fix tcp_ecn_withdraw_cwr() to clear TCP_ECN_QUEUE_CWR
  sctp: use transport pf_retrans in sctp_do_8_2_transport_strike
  sctp: Fix the link time qualifier of 'sctp_ctrlsock_exit()'
  sch_hhf: ensure quantum and hhf_non_hh_weight are non-zero
  net: phylink: Fix flow control resolution
  net: gso: Fix skb_segment splat when splitting gso_size mangled skb having linear-headed frag_list
  net: Fix null de-reference of device refcount
  isdn/capi: check message length in capi_write()
  ipv6: Fix the link time qualifier of 'ping_v6_proc_exit_net()'
  cdc_ether: fix rndis support for Mediatek based smartphones
  bridge/mdb: remove wrong use of NLM_F_MULTI
  Linux 4.14.144
  vhost: make sure log_num < in_num
  kernel/module: Fix mem leak in module_add_modinfo_attrs
  clk: s2mps11: Add used attribute to s2mps11_dt_match
  scripts/decode_stacktrace: match basepath using shell prefix operator, not regex
  arm64: dts: rockchip: enable usb-host regulators at boot on rk3328-rock64
  powerpc/64: mark start_here_multiplatform as __ref
  hv_sock: Fix hang when a connection is closed
  batman-adv: Only read OGM tvlv_len after buffer len check
  batman-adv: fix uninit-value in batadv_netlink_get_ifindex()
  vhost/test: fix build for vhost test
  PCI: dra7xx: Fix legacy INTD IRQ handling
  PCI: designware-ep: Fix find_first_zero_bit() usage
  ip6: fix skb leak in ip6frag_expire_frag_queue()
  xfrm: clean up xfrm protocol checks
  powerpc/tm: Fix FP/VMX unavailable exceptions inside a transaction
  drm/vmwgfx: Fix double free in vmw_recv_msg()
  sched/fair: Don't assign runtime for throttled cfs_rq
  ALSA: hda/realtek - Fix the problem of two front mics on a ThinkCentre
  ALSA: hda/realtek - Fix overridden device-specific initialization
  ALSA: hda - Fix potential endless loop at applying quirks
  Linux 4.14.143
  x86/boot: Preserve boot_params.secure_boot from sanitizing
  mld: fix memory leak in mld_del_delrec()
  net: sched: act_sample: fix psample group handling on overwrite
  tcp: remove empty skb from write queue in error cases
  tcp: inherit timestamp on mtu probe
  net: stmmac: dwmac-rk: Don't fail if phy regulator is absent
  net_sched: fix a NULL pointer deref in ipt action
  net: fix skb use after free in netpoll
  Revert "x86/apic: Include the LDR when clearing out APIC registers"
  spi: bcm2835aux: fix corruptions for longer spi transfers
  spi: bcm2835aux: remove dangerous uncontrolled read of fifo
  spi: bcm2835aux: unifying code between polling and interrupt driven code
  libceph: allow ceph_buffer_put() to receive a NULL ceph_buffer
  KVM: arm/arm64: Only skip MMIO insn once
  ceph: fix buffer free while holding i_ceph_lock in fill_inode()
  ceph: fix buffer free while holding i_ceph_lock in __ceph_build_xattrs_blob()
  ceph: fix buffer free while holding i_ceph_lock in __ceph_setxattr()
  IB/mlx4: Fix memory leaks
  Tools: hv: kvp: eliminate 'may be used uninitialized' warning
  Input: hyperv-keyboard: Use in-place iterator API in the channel callback
  HID: cp2112: prevent sleeping function called from invalid context
  kprobes: Fix potential deadlock in kprobe_optimizer()
  ravb: Fix use-after-free ravb_tstamp_skb
  wimax/i2400m: fix a memory leak bug
  net: kalmia: fix memory leaks
  cx82310_eth: fix a memory leak bug
  vfs: fix page locking deadlocks when deduping files
  lan78xx: Fix memory leaks
  net: myri10ge: fix memory leaks
  liquidio: add cleanup in octeon_setup_iq()
  cxgb4: fix a memory leak bug
  drm/mediatek: set DMA max segment size
  drm/mediatek: use correct device to import PRIME buffers
  gpio: Fix build error of function redefinition
  ibmveth: Convert multicast list size for little-endian system
  Bluetooth: btqca: Add a short delay before downloading the NVM
  net: tc35815: Explicitly check NET_IP_ALIGN is not zero in tc35815_rx
  hv_netvsc: Fix a warning of suspicious RCU usage
  net: tundra: tsi108: use spin_lock_irqsave instead of spin_lock_irq in IRQ context
  Linux 4.14.142
  Revert "ASoC: Fail card instantiation if DAI format setup fails"
  x86/ptrace: fix up botched merge of spectrev1 fix
  i2c: piix4: Fix port selection for AMD Family 16h Model 30h
  NFS: Ensure O_DIRECT reports an error if the bytes read/written is 0
  NFS: Pass error information to the pgio error cleanup routine
  NFSv4/pnfs: Fix a page lock leak in nfs_pageio_resend()
  NFS: Clean up list moves of struct nfs_page
  KVM: arm/arm64: vgic-v2: Handle SGI bits in GICD_I{S,C}PENDR0 as WI
  KVM: arm/arm64: vgic: Fix potential deadlock when ap_list is long
  KVM: PPC: Book3S: Fix incorrect guest-to-user-translation error handling
  mac80211: fix possible sta leak
  Revert "cfg80211: fix processing world regdomain when non modular"
  crypto: ccp - Ignore unconfigured CCP device on suspend/resume
  VMCI: Release resource if the work is already queued
  drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest
  intel_th: pci: Add Tiger Lake support
  intel_th: pci: Add support for another Lewisburg PCH
  stm class: Fix a double free of stm_source_device
  mmc: core: Fix init of SD cards reporting an invalid VDD range
  mmc: sdhci-of-at91: add quirk for broken HS200
  uprobes/x86: Fix detection of 32-bit user mode
  USB: storage: ums-realtek: Whitelist auto-delink support
  USB: storage: ums-realtek: Update module parameter description for auto_delink_en
  usb: host: xhci: rcar: Fix typo in compatible string matching
  usb: host: ohci: fix a race condition between shutdown and irq
  usb: chipidea: udc: don't do hardware access if gadget has stopped
  USB: cdc-wdm: fix race between write and disconnect due to flag abuse
  usb-storage: Add new JMS567 revision to unusual_devs
  ftrace: Check for empty hash and comment the race with registering probes
  ftrace: Check for successful allocation of hash
  ftrace: Fix NULL pointer dereference in t_probe_next()
  x86/apic: Include the LDR when clearing out APIC registers
  x86/apic: Do not initialize LDR and DFR for bigsmp
  KVM: x86: Don't update RIP or do single-step on faulting emulation
  kvm: x86: skip populating logical dest map if apic is not sw enabled
  ALSA: seq: Fix potential concurrent access to the deleted pool
  ALSA: line6: Fix memory leak at line6_init_pcm() error path
  mm/zsmalloc.c: fix build when CONFIG_COMPACTION=n
  tcp: make sure EPOLLOUT wont be missed
  net/smc: make sure EPOLLOUT is raised
  ALSA: usb-audio: Fix an OOB bug in parse_audio_mixer_unit
  ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term
  tcp: fix tcp_rtx_queue_tail in case of empty retransmit queue
  drm/tilcdc: Register cpufreq notifier after we have initialized crtc
  scsi: ufs: Fix RX_TERMINATION_FORCE_ENABLE define value
  drm/bridge: tfp410: fix memleak in get_modes()
  watchdog: bcm2835_wdt: Fix module autoload
  tools: hv: fix KVP and VSS daemons exit code
  usb: host: fotg2: restart hcd after port reset
  drm/ast: Fixed reboot test may cause system hanged
  i2c: emev2: avoid race when unregistering slave client
  i2c: rcar: avoid race when unregistering slave client
  xen/blkback: fix memory leaks
  usb: gadget: mass_storage: Fix races between fsg_disable and fsg_set_alt
  usb: gadget: composite: Clear "suspended" on reset/disconnect
  iommu/dma: Handle SG length overflow better
  auxdisplay: panel: need to delete scan_timer when misc_register fails in panel_attach
  dmaengine: ste_dma40: fix unneeded variable warning
  ANDROID: sched: Disallow WALT with CFS bandwidth control
  ANDROID: fiq_debugger: remove

Conflicts:
	drivers/base/core.c
	drivers/staging/android/fiq_debugger/fiq_debugger.c
	drivers/usb/gadget/function/f_mass_storage.c
	sound/usb/mixer.c

Change-Id: Ifae45fc2fc7e7a777d77faacc1b3b88e371097df
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2019-09-30 03:33:08 -07:00
Eric Biggers
b6351ab8a6 ubifs: wire up new fscrypt ioctls
Wire up the new ioctls for adding and removing fscrypt keys to/from the
filesystem, and the new ioctl for retrieving v2 encryption policies.

The key removal ioctls also required making UBIFS use
fscrypt_drop_inode().

For more details see Documentation/filesystems/fscrypt.rst and the
fscrypt patches that added the implementation of these ioctls.

Reviewed-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Eric Biggers <ebiggers@google.com>
2019-09-23 19:07:12 -07:00
Greg Kroah-Hartman
2815aad99d This is the 4.14.145 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl2DKVsACgkQONu9yGCS
 aT6YrBAAgp7WKba3Uh3XUw9XXYnZTDJdbrAJ4/6bB5yFgzVF3Dhv4exTA+vNnqKY
 0vII/2DVLXW2CfsuAW7sJV1lmTU1KGf0mTszIj3jGw1mfM4fa7uA8SrhT4iFhxFY
 8B/fFnkX2vHtwrp1v5pzedDb4IWDF1vg0tjbqYSz5yBJS2KjLQ+eW++dfbH1opan
 BMT1fsX2MEqoEmANEPGl5x1YF9R/uuh2AYPyBIdeXyJvLKpBPbRTe+pl4Zw/aZxj
 BxJ4xhWLVP5F8VoqMlXEKmtT70N4PqM9ZB6Q91xUoBGDXamc9T6NarLCAw+hMRMl
 rC966qVk12tWlCnfkscDM3D+ovz7UjIexM/9g0hWE03wasazktmknZGxUt6smn6z
 bJvql032gPUHCRVCwt8A2ZP78KRuvBcc3l8HWFyjbWTjnAOCcycfhvx2U8R4H1Cs
 WFS/8bDANUMGKpMegRURe4rGBg6s1uPFZHBDgsQmq0tOaibj3ehMhKD9zPtqhptK
 nOldtozfRfMTLtweNn12PqFmpvZFR21WWpbTgktTaFyCqtXU2CCh9tzPG82srjKs
 sRivPxXLq0CLd2L1r7hg3jNRG9sY4Tu9WFvBAsBdVfgPJmezSryPiZw5Disirbru
 KrpApQG0d3JGe8FDV+0PNbTh3KcPXCE188d10liBp7FVIUqilPc=
 =oAPF
 -----END PGP SIGNATURE-----

Merge 4.14.145 into android-4.14-q

Changes in 4.14.145
	bridge/mdb: remove wrong use of NLM_F_MULTI
	cdc_ether: fix rndis support for Mediatek based smartphones
	ipv6: Fix the link time qualifier of 'ping_v6_proc_exit_net()'
	isdn/capi: check message length in capi_write()
	net: Fix null de-reference of device refcount
	net: gso: Fix skb_segment splat when splitting gso_size mangled skb having linear-headed frag_list
	net: phylink: Fix flow control resolution
	sch_hhf: ensure quantum and hhf_non_hh_weight are non-zero
	sctp: Fix the link time qualifier of 'sctp_ctrlsock_exit()'
	sctp: use transport pf_retrans in sctp_do_8_2_transport_strike
	tcp: fix tcp_ecn_withdraw_cwr() to clear TCP_ECN_QUEUE_CWR
	tipc: add NULL pointer check before calling kfree_rcu
	tun: fix use-after-free when register netdev failed
	btrfs: compression: add helper for type to string conversion
	btrfs: correctly validate compression type
	Revert "MIPS: SiByte: Enable swiotlb for SWARM, LittleSur and BigSur"
	gpiolib: acpi: Add gpiolib_acpi_run_edge_events_on_boot option and blacklist
	gpio: fix line flag validation in linehandle_create
	gpio: fix line flag validation in lineevent_create
	Btrfs: fix assertion failure during fsync and use of stale transaction
	genirq: Prevent NULL pointer dereference in resend_irqs()
	KVM: s390: Do not leak kernel stack data in the KVM_S390_INTERRUPT ioctl
	KVM: x86: work around leak of uninitialized stack contents
	KVM: nVMX: handle page fault in vmread
	MIPS: VDSO: Prevent use of smp_processor_id()
	MIPS: VDSO: Use same -m%-float cflag as the kernel proper
	powerpc: Add barrier_nospec to raw_copy_in_user()
	drm/meson: Add support for XBGR8888 & ABGR8888 formats
	clk: rockchip: Don't yell about bad mmc phases when getting
	mtd: rawnand: mtk: Fix wrongly assigned OOB buffer pointer issue
	PCI: Always allow probing with driver_override
	ubifs: Correctly use tnc_next() in search_dh_cookie()
	driver core: Fix use-after-free and double free on glue directory
	crypto: talitos - check AES key size
	crypto: talitos - fix CTR alg blocksize
	crypto: talitos - check data blocksize in ablkcipher.
	crypto: talitos - fix ECB algs ivsize
	crypto: talitos - Do not modify req->cryptlen on decryption.
	crypto: talitos - HMAC SNOOP NO AFEU mode requires SW icv checking.
	firmware: ti_sci: Always request response from firmware
	drm/mediatek: mtk_drm_drv.c: Add of_node_put() before goto
	Revert "Bluetooth: btusb: driver to enable the usb-wakeup feature"
	platform/x86: pmc_atom: Add CB4063 Beckhoff Automation board to critclk_systems DMI table
	nvmem: Use the same permissions for eeprom as for nvmem
	x86/build: Add -Wnoaddress-of-packed-member to REALMODE_CFLAGS, to silence GCC9 build warning
	Linux 4.14.145

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2019-09-19 09:16:22 +02:00
Greg Kroah-Hartman
290dd9dfcb This is the 4.14.145 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl2DKVsACgkQONu9yGCS
 aT6YrBAAgp7WKba3Uh3XUw9XXYnZTDJdbrAJ4/6bB5yFgzVF3Dhv4exTA+vNnqKY
 0vII/2DVLXW2CfsuAW7sJV1lmTU1KGf0mTszIj3jGw1mfM4fa7uA8SrhT4iFhxFY
 8B/fFnkX2vHtwrp1v5pzedDb4IWDF1vg0tjbqYSz5yBJS2KjLQ+eW++dfbH1opan
 BMT1fsX2MEqoEmANEPGl5x1YF9R/uuh2AYPyBIdeXyJvLKpBPbRTe+pl4Zw/aZxj
 BxJ4xhWLVP5F8VoqMlXEKmtT70N4PqM9ZB6Q91xUoBGDXamc9T6NarLCAw+hMRMl
 rC966qVk12tWlCnfkscDM3D+ovz7UjIexM/9g0hWE03wasazktmknZGxUt6smn6z
 bJvql032gPUHCRVCwt8A2ZP78KRuvBcc3l8HWFyjbWTjnAOCcycfhvx2U8R4H1Cs
 WFS/8bDANUMGKpMegRURe4rGBg6s1uPFZHBDgsQmq0tOaibj3ehMhKD9zPtqhptK
 nOldtozfRfMTLtweNn12PqFmpvZFR21WWpbTgktTaFyCqtXU2CCh9tzPG82srjKs
 sRivPxXLq0CLd2L1r7hg3jNRG9sY4Tu9WFvBAsBdVfgPJmezSryPiZw5Disirbru
 KrpApQG0d3JGe8FDV+0PNbTh3KcPXCE188d10liBp7FVIUqilPc=
 =oAPF
 -----END PGP SIGNATURE-----

Merge 4.14.145 into android-4.14

Changes in 4.14.145
	bridge/mdb: remove wrong use of NLM_F_MULTI
	cdc_ether: fix rndis support for Mediatek based smartphones
	ipv6: Fix the link time qualifier of 'ping_v6_proc_exit_net()'
	isdn/capi: check message length in capi_write()
	net: Fix null de-reference of device refcount
	net: gso: Fix skb_segment splat when splitting gso_size mangled skb having linear-headed frag_list
	net: phylink: Fix flow control resolution
	sch_hhf: ensure quantum and hhf_non_hh_weight are non-zero
	sctp: Fix the link time qualifier of 'sctp_ctrlsock_exit()'
	sctp: use transport pf_retrans in sctp_do_8_2_transport_strike
	tcp: fix tcp_ecn_withdraw_cwr() to clear TCP_ECN_QUEUE_CWR
	tipc: add NULL pointer check before calling kfree_rcu
	tun: fix use-after-free when register netdev failed
	btrfs: compression: add helper for type to string conversion
	btrfs: correctly validate compression type
	Revert "MIPS: SiByte: Enable swiotlb for SWARM, LittleSur and BigSur"
	gpiolib: acpi: Add gpiolib_acpi_run_edge_events_on_boot option and blacklist
	gpio: fix line flag validation in linehandle_create
	gpio: fix line flag validation in lineevent_create
	Btrfs: fix assertion failure during fsync and use of stale transaction
	genirq: Prevent NULL pointer dereference in resend_irqs()
	KVM: s390: Do not leak kernel stack data in the KVM_S390_INTERRUPT ioctl
	KVM: x86: work around leak of uninitialized stack contents
	KVM: nVMX: handle page fault in vmread
	MIPS: VDSO: Prevent use of smp_processor_id()
	MIPS: VDSO: Use same -m%-float cflag as the kernel proper
	powerpc: Add barrier_nospec to raw_copy_in_user()
	drm/meson: Add support for XBGR8888 & ABGR8888 formats
	clk: rockchip: Don't yell about bad mmc phases when getting
	mtd: rawnand: mtk: Fix wrongly assigned OOB buffer pointer issue
	PCI: Always allow probing with driver_override
	ubifs: Correctly use tnc_next() in search_dh_cookie()
	driver core: Fix use-after-free and double free on glue directory
	crypto: talitos - check AES key size
	crypto: talitos - fix CTR alg blocksize
	crypto: talitos - check data blocksize in ablkcipher.
	crypto: talitos - fix ECB algs ivsize
	crypto: talitos - Do not modify req->cryptlen on decryption.
	crypto: talitos - HMAC SNOOP NO AFEU mode requires SW icv checking.
	firmware: ti_sci: Always request response from firmware
	drm/mediatek: mtk_drm_drv.c: Add of_node_put() before goto
	Revert "Bluetooth: btusb: driver to enable the usb-wakeup feature"
	platform/x86: pmc_atom: Add CB4063 Beckhoff Automation board to critclk_systems DMI table
	nvmem: Use the same permissions for eeprom as for nvmem
	x86/build: Add -Wnoaddress-of-packed-member to REALMODE_CFLAGS, to silence GCC9 build warning
	Linux 4.14.145

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2019-09-19 09:14:44 +02:00
Richard Weinberger
0369bbfe7a ubifs: Correctly use tnc_next() in search_dh_cookie()
commit bacfa94b08027b9f66ede7044972e3b066766b3e upstream.

Commit c877154d307f fixed an uninitialized variable and optimized
the function to not call tnc_next() in the first iteration of the
loop. While this seemed perfectly legit and wise, it turned out to
be illegal.
If the lookup function does not find an exact match it will rewind
the cursor by 1.
The rewinded cursor will not match the name hash we are looking for
and this results in a spurious -ENOENT.
So we need to move to the next entry in case of an non-exact match,
but not if the match was exact.

While we are here, update the documentation to avoid further confusion.

Cc: Hyunchul Lee <hyc.lee@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Fixes: c877154d307f ("ubifs: Fix uninitialized variable in search_dh_cookie()")
Fixes: 781f675e2d7e ("ubifs: Fix unlink code wrt. double hash lookups")
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-09-19 09:08:06 +02:00
Jaegeuk Kim
6bb0e9159c Merge remote-tracking branch 'origin/upstream-f2fs-stable-linux-4.14.y' into android-4.14
* origin/upstream-f2fs-stable-linux-4.14.y:
  fscrypt: document testing with xfstests
  fscrypt: remove selection of CONFIG_CRYPTO_SHA256
  fscrypt: remove unnecessary includes of ratelimit.h
  fscrypt: don't set policy for a dead directory
  fscrypt: decrypt only the needed blocks in __fscrypt_decrypt_bio()
  fscrypt: support decrypting multiple filesystem blocks per page
  fscrypt: introduce fscrypt_decrypt_block_inplace()
  fscrypt: handle blocksize < PAGE_SIZE in fscrypt_zeroout_range()
  fscrypt: support encrypting multiple filesystem blocks per page
  fscrypt: introduce fscrypt_encrypt_block_inplace()
  fscrypt: clean up some BUG_ON()s in block encryption/decryption
  fscrypt: rename fscrypt_do_page_crypto() to fscrypt_crypt_block()
  fscrypt: remove the "write" part of struct fscrypt_ctx
  fscrypt: simplify bounce page handling

 Conflicts:
	fs/crypto/crypto.c

Change-Id: I41b3a19abc9835c50d16ebd784d515b47e6e83cf
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2019-09-17 20:00:49 -07:00
Eric Biggers
4030e97088 fscrypt: introduce fscrypt_decrypt_block_inplace()
Currently fscrypt_decrypt_page() does one of two logically distinct
things depending on whether FS_CFLG_OWN_PAGES is set in the filesystem's
fscrypt_operations: decrypt a pagecache page in-place, or decrypt a
filesystem block in-place in any page.  Currently these happen to share
the same implementation, but this conflates the notion of blocks and
pages.  It also makes it so that all callers have to provide inode and
lblk_num, when fscrypt could determine these itself for pagecache pages.

Therefore, move the FS_CFLG_OWN_PAGES behavior into a new function
fscrypt_decrypt_block_inplace().  This mirrors
fscrypt_encrypt_block_inplace().

This is in preparation for allowing encryption on ext4 filesystems with
blocksize != PAGE_SIZE.

Reviewed-by: Chandan Rajendra <chandan@linux.ibm.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
2019-08-30 09:20:28 -07:00
Eric Biggers
cc48d4ee5b fscrypt: introduce fscrypt_encrypt_block_inplace()
fscrypt_encrypt_page() behaves very differently depending on whether the
filesystem set FS_CFLG_OWN_PAGES in its fscrypt_operations.  This makes
the function difficult to understand and document.  It also makes it so
that all callers have to provide inode and lblk_num, when fscrypt could
determine these itself for pagecache pages.

Therefore, move the FS_CFLG_OWN_PAGES behavior into a new function
fscrypt_encrypt_block_inplace().

This is in preparation for allowing encryption on ext4 filesystems with
blocksize != PAGE_SIZE.

Reviewed-by: Chandan Rajendra <chandan@linux.ibm.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
2019-08-30 09:11:53 -07:00
Jaegeuk Kim
2ea8815046 Merge remote-tracking branch 'origin/upstream-f2fs-stable-linux-4.14.y' into android-4.14
* origin/upstream-f2fs-stable-linux-4.14.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 function for FS_IOC_FSSETXATTR
  f2fs: use generic checking and prep function for FS_IOC_SETFLAGS
  ubifs, fscrypt: cache decrypted symlink target in ->i_link
  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
  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: I765f6ed215533097c63d1207a7d60ce7fc4a7269
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2019-08-02 10:12:21 -07:00
Jaegeuk Kim
f2a3a3d34e ubifs, fscrypt: cache decrypted symlink target in ->i_link
Reapplied fscrypt patch in ubifs.

Fixes: 1f1be4a771eb ("fscrypt: cache decrypted symlink target in ->i_link")
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2019-07-30 10:05:15 -07:00
Blagovest Kolenichev
dd6ae3b853 Merge android-4.14.118 (db39369) into msm-4.14
* refs/heads/tmp-db39369:
  Linux 4.14.118
  arm64: futex: Bound number of LDXR/STXR loops in FUTEX_WAKE_OP
  locking/futex: Allow low-level atomic operations to return -EAGAIN
  ASoC: Intel: avoid Oops if DMA setup fails
  UAS: fix alignment of scatter/gather segments
  Bluetooth: Align minimum encryption key size for LE and BR/EDR connections
  Bluetooth: hidp: fix buffer overflow
  scsi: qla2xxx: Fix incorrect region-size setting in optrom SYSFS routines
  intel_th: pci: Add Comet Lake support
  usb-storage: Set virt_boundary_mask to avoid SG overflows
  USB: cdc-acm: fix unthrottle races
  USB: serial: f81232: fix interrupt worker not stop
  usb: dwc3: Fix default lpm_nyet_threshold value
  genirq: Prevent use-after-free and work list corruption
  iommu/amd: Set exclusion range correctly
  platform/x86: pmc_atom: Drop __initconst on dmi table
  virtio-blk: limit number of hw queues by nr_cpu_ids
  ASoC: Intel: kbl: fix wrong number of channels
  drm/mediatek: fix possible object reference leak
  scsi: csiostor: fix missing data copy in csio_scsi_err_handler()
  RDMA/vmw_pvrdma: Fix memory leak on pvrdma_pci_remove
  virtio_pci: fix a NULL pointer reference in vp_del_vqs
  slab: fix a crash by reading /proc/slab_allocators
  ASoC: rockchip: pdm: fix regmap_ops hang issue
  linux/kernel.h: Use parentheses around argument in u64_to_user_ptr()
  perf/x86/intel: Initialize TFA MSR
  perf/x86/intel: Fix handling of wakeup_events for multi-entry PEBS
  drm/mediatek: Fix an error code in mtk_hdmi_dt_parse_pdata()
  ASoC: tlv320aic32x4: Fix Common Pins
  MIPS: KGDB: fix kgdb support for SMP platforms.
  IB/hfi1: Eliminate opcode tests on mr deref
  ASoC: cs4270: Set auto-increment bit for register writes
  ASoC: wm_adsp: Add locking to wm_adsp2_bus_error
  ASoC: samsung: odroid: Fix clock configuration for 44100 sample rate
  ASoC: nau8810: fix the issue of widget with prefixed name
  ASoC: nau8824: fix the issue of the widget with prefix name
  ASoC:soc-pcm:fix a codec fixup issue in TDM case
  ASoC: hdmi-codec: fix S/PDIF DAI
  staging: greybus: power_supply: fix prop-descriptor request size
  ubsan: Fix nasty -Wbuiltin-declaration-mismatch GCC-9 warnings
  Drivers: hv: vmbus: Remove the undesired put_cpu_ptr() in hv_synic_cleanup()
  scsi: libsas: fix a race condition when smp task timeout
  ANDROID: block/cfq-iosched: make group_idle per io cgroup tunable
  ANDROID: cuttlefish_defconfig: Enable CONFIG_CPUSETS and CONFIG_CGROUP_SCHEDTUNE
  fscrypt: remove filesystem specific build config option
  f2fs: use IS_ENCRYPTED() to check encryption status
  ext4: use IS_ENCRYPTED() to check encryption status
  fscrypt: return -EXDEV for incompatible rename or link into encrypted dir
  fscrypt: remove CRYPTO_CTR dependency
  fscrypt: add Adiantum support / removed speck
  ext4: switch to fscrypt_prepare_setattr()
  ext4: switch to fscrypt_prepare_rename()
  ext4: switch to fscrypt_prepare_link()
  ext4: switch to fscrypt_file_open()
  ext4, dax: set ext4_dax_aops for dax files

Conflicts:
	fs/crypto/fscrypt_private.h
	fs/ext4/inode.c
	fs/ext4/move_extent.c
	include/linux/fscrypt_supp.h
	kernel/irq/manage.c

Change-Id: I71237103050ab644a1e4a14eeb64a5b6e992629c
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2019-07-23 10:53:47 -07:00
Eric Biggers
6dc346e8fb fscrypt: fix race where ->lookup() marks plaintext dentry as ciphertext
->lookup() in an encrypted directory begins as follows:

1. fscrypt_prepare_lookup():
    a. Try to load the directory's encryption key.
    b. If the key is unavailable, mark the dentry as a ciphertext name
       via d_flags.
2. fscrypt_setup_filename():
    a. Try to load the directory's encryption key.
    b. If the key is available, encrypt the name (treated as a plaintext
       name) to get the on-disk name.  Otherwise decode the name
       (treated as a ciphertext name) to get the on-disk name.

But if the key is concurrently added, it may be found at (2a) but not at
(1a).  In this case, the dentry will be wrongly marked as a ciphertext
name even though it was actually treated as plaintext.

This will cause the dentry to be wrongly invalidated on the next lookup,
potentially causing problems.  For example, if the racy ->lookup() was
part of sys_mount(), then the new mount will be detached when anything
tries to access it.  This is despite the mountpoint having a plaintext
path, which should remain valid now that the key was added.

Of course, this is only possible if there's a userspace race.  Still,
the additional kernel-side race is confusing and unexpected.

Close the kernel-side race by changing fscrypt_prepare_lookup() to also
set the on-disk filename (step 2b), consistent with the d_flags update.

Fixes: 28b4c263961c ("ext4 crypto: revalidate dentry after adding or removing the key")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2019-07-12 15:31:49 -07:00
Jaegeuk Kim
b5432e9198 Merge remote-tracking branch 'origin/upstream-f2fs-stable-linux-4.14.y' into android-4.14
* origin/upstream-f2fs-stable-linux-4.14.y:
  fscrypt: remove filesystem specific build config option
  f2fs: use IS_ENCRYPTED() to check encryption status
  ext4: use IS_ENCRYPTED() to check encryption status
  fscrypt: return -EXDEV for incompatible rename or link into encrypted dir
  fscrypt: remove CRYPTO_CTR dependency
  fscrypt: add Adiantum support / removed speck
  ext4: switch to fscrypt_prepare_setattr()
  ext4: switch to fscrypt_prepare_rename()
  ext4: switch to fscrypt_prepare_link()
  ext4: switch to fscrypt_file_open()
  ext4, dax: set ext4_dax_aops for dax files

Change-Id: I3dc42a1a50352f3a75eecf6a6b9e513d747ca8f1
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2019-05-08 14:52:56 -07:00
Chandan Rajendra
e6811d2fd4 fscrypt: remove filesystem specific build config option
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.

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>
2019-04-16 18:05:24 -07:00
Blagovest Kolenichev
5c033b4894 Merge android-4.14 (73421a4) into msm-4.14
* refs/heads/tmp-73421a4:
  Revert "f2fs: let discard thread wait a little longer if dev is busy"
  Revert "f2fs: clean up with is_valid_blkaddr()"
  Revert "f2fs: fix race in between GC and atomic open"
  treewide: Use array_size in f2fs_kvzalloc()
  treewide: Use array_size() in f2fs_kzalloc()
  treewide: Use array_size() in f2fs_kmalloc()
  overflow.h: Add allocation size calculation helpers
  f2fs: fix to clear FI_VOLATILE_FILE correctly
  f2fs: let sync node IO interrupt async one
  f2fs: don't change wbc->sync_mode
  f2fs: fix to update mtime correctly
  fs: f2fs: insert space around that ':' and ', '
  fs: f2fs: add missing blank lines after declarations
  fs: f2fs: changed variable type of offset "unsigned" to "loff_t"
  f2fs: clean up symbol namespace
  f2fs: make set_de_type() static
  f2fs: make __f2fs_write_data_pages() static
  f2fs: fix to avoid accessing cross the boundary
  f2fs: fix to let caller retry allocating block address
  disable loading f2fs module on PAGE_SIZE > 4KB
  f2fs: fix error path of move_data_page
  f2fs: don't drop dentry pages after fs shutdown
  f2fs: fix to avoid race during access gc_thread pointer
  f2fs: clean up with clear_radix_tree_dirty_tag
  f2fs: fix to don't trigger writeback during recovery
  f2fs: clear discard_wake earlier
  f2fs: let discard thread wait a little longer if dev is busy
  f2fs: avoid stucking GC due to atomic write
  f2fs: introduce sbi->gc_mode to determine the policy
  f2fs: keep migration IO order in LFS mode
  f2fs: fix to wait page writeback during revoking atomic write
  f2fs: Fix deadlock in shutdown ioctl
  f2fs: detect synchronous writeback more earlier
  mm: remove nr_pages argument from pagevec_lookup_{,range}_tag()
  ceph: use pagevec_lookup_range_nr_tag()
  mm: add variant of pagevec_lookup_range_tag() taking number of pages
  mm: use pagevec_lookup_range_tag() in write_cache_pages()
  mm: use pagevec_lookup_range_tag() in __filemap_fdatawait_range()
  nilfs2: use pagevec_lookup_range_tag()
  gfs2: use pagevec_lookup_range_tag()
  f2fs: use find_get_pages_tag() for looking up single page
  f2fs: simplify page iteration loops
  f2fs: use pagevec_lookup_range_tag()
  ext4: use pagevec_lookup_range_tag()
  ceph: use pagevec_lookup_range_tag()
  btrfs: use pagevec_lookup_range_tag()
  mm: implement find_get_pages_range_tag()
  f2fs: clean up with is_valid_blkaddr()
  f2fs: fix to initialize min_mtime with ULLONG_MAX
  f2fs: fix to let checkpoint guarantee atomic page persistence
  f2fs: fix to initialize i_current_depth according to inode type
  Revert "f2fs: add ovp valid_blocks check for bg gc victim to fg_gc"
  f2fs: don't drop any page on f2fs_cp_error() case
  f2fs: fix spelling mistake: "extenstion" -> "extension"
  f2fs: enhance sanity_check_raw_super() to avoid potential overflows
  f2fs: treat volatile file's data as hot one
  f2fs: introduce release_discard_addr() for cleanup
  f2fs: fix potential overflow
  f2fs: rename dio_rwsem to i_gc_rwsem
  f2fs: move mnt_want_write_file after range check
  f2fs: fix missing clear FI_NO_PREALLOC in some error case
  f2fs: enforce fsync_mode=strict for renamed directory
  f2fs: sanity check for total valid node blocks
  f2fs: sanity check on sit entry
  f2fs: avoid bug_on on corrupted inode
  f2fs: give message and set need_fsck given broken node id
  f2fs: clean up commit_inmem_pages()
  f2fs: do not check F2FS_INLINE_DOTS in recover
  f2fs: remove duplicated dquot_initialize and fix error handling
  f2fs: fix to detect failure of dquot_initialize
  f2fs: stop issue discard if something wrong with f2fs
  f2fs: fix return value in f2fs_ioc_commit_atomic_write
  f2fs: allocate hot_data for atomic write more strictly
  f2fs: check if inmem_pages list is empty correctly
  f2fs: fix race in between GC and atomic open
  f2fs: change le32 to le16 of f2fs_inode->i_extra_size
  f2fs: check cur_valid_map_mir & raw_sit block count when flush sit entries
  f2fs: correct return value of f2fs_trim_fs
  f2fs: fix to show missing bits in FS_IOC_GETFLAGS
  f2fs: remove unneeded F2FS_PROJINHERIT_FL
  f2fs: don't use GFP_ZERO for page caches
  f2fs: issue all big range discards in umount process
  f2fs: remove redundant block plug
  f2fs: remove unmatched zero_user_segment when convert inline dentry
  f2fs: introduce private inode status mapping
  fscrypt: log the crypto algorithm implementations
  fscrypt: add Speck128/256 support
  fscrypt: only derive the needed portion of the key
  fscrypt: separate key lookup from key derivation
  fscrypt: use a common logging function
  fscrypt: remove internal key size constants
  fscrypt: remove unnecessary check for non-logon key type
  fscrypt: make fscrypt_operations.max_namelen an integer
  fscrypt: drop empty name check from fname_decrypt()
  fscrypt: drop max_namelen check from fname_decrypt()
  fscrypt: don't special-case EOPNOTSUPP from fscrypt_get_encryption_info()
  fscrypt: don't clear flags on crypto transform
  fscrypt: remove stale comment from fscrypt_d_revalidate()
  fscrypt: remove error messages for skcipher_request_alloc() failure
  fscrypt: remove unnecessary NULL check when allocating skcipher
  fscrypt: clean up after fscrypt_prepare_lookup() conversions
  ubifs: switch to fscrypt_prepare_lookup()
  ext4: switch to fscrypt_prepare_lookup()
  fscrypt: use unbound workqueue for decryption

Conflicts:
	fs/crypto/keyinfo.c
	fs/ext4/super.c
	fs/f2fs/checkpoint.c
	fs/f2fs/data.c
	fs/f2fs/f2fs.h
	fs/f2fs/file.c
	fs/f2fs/gc.c
	fs/f2fs/inline.c
	fs/f2fs/inode.c
	fs/f2fs/node.c
	fs/f2fs/recovery.c
	fs/f2fs/segment.c
	fs/f2fs/super.c
	include/linux/fscrypt_supp.h
	include/linux/overflow.h

Extra changes were required in below files due to hard
conflicts against HW based FBE:

	fs/crypto/fscrypt_ice.c
	fs/crypto/fscrypt_ice.h
	fs/crypto/fscrypt_private.h
	fs/crypto/keyinfo.c

Change-Id: I01d788e7cd36539f6228742c99820a94a2cc5e46
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2019-04-03 06:00:09 -07:00
Blagovest Kolenichev
0927a7b7f2 Merge android-4.14-p.91 (eef4cf6) into msm-4.14
* refs/heads/tmp-eef4cf6:
  Revert "mmc: core: Allow BKOPS and CACHE ctrl even if no HPI support"
  Linux 4.14.91
  drm/ioctl: Fix Spectre v1 vulnerabilities
  proc/sysctl: don't return ENOMEM on lookup when a table is unregistering
  mm: don't miss the last page because of round-off error
  ubifs: Handle re-linking of inodes correctly while recovery
  spi: imx: mx51-ecspi: Move some initialisation to prepare_message hook.
  spi: imx: add a device specific prepare_message callback
  iwlwifi: add new cards for 9560, 9462, 9461 and killer series
  iwlwifi: mvm: don't send GEO_TX_POWER_LIMIT to old firmwares
  panic: avoid deadlocks in re-entrant console drivers
  x86/mtrr: Don't copy uninitialized gentry fields back to userspace
  Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels
  KVM: Fix UAF in nested posted interrupt processing
  kvm: x86: Add AMD's EX_CFG to the list of ignored MSRs
  posix-timers: Fix division by zero bug
  gpiolib-acpi: Only defer request_irq for GpioInt ACPI event handlers
  gpio: max7301: fix driver for use with CONFIG_VMAP_STACK
  mmc: omap_hsmmc: fix DMA API warning
  mmc: core: Use a minimum 1600ms timeout when enabling CACHE ctrl
  mmc: core: Allow BKOPS and CACHE ctrl even if no HPI support
  mmc: core: Reset HPI enabled state during re-init and in case of errors
  scsi: sd: use mempool for discard special page
  USB: serial: option: add Telit LN940 series
  USB: serial: option: add Fibocom NL668 series
  USB: serial: option: add Simcom SIM7500/SIM7600 (MBIM mode)
  USB: serial: option: add HP lt4132
  USB: serial: option: add GosunCn ZTE WeLink ME3630
  USB: xhci: fix 'broken_suspend' placement in struct xchi_hcd
  xhci: Don't prevent USB2 bus suspend in state check intended for USB3 only
  USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data
  cifs: integer overflow in in SMB2_ioctl()
  perf record: Synthesize features before events in pipe mode
  ib_srpt: Fix a use-after-free in __srpt_close_all_ch()
  ubifs: Fix directory size calculation for symlinks
  ASoC: sta32x: set ->component pointer in private struct
  block: fix infinite loop if the device loses discard capability
  block: break discard submissions into the user defined size

Conflicts:
	drivers/mmc/core/mmc.c

Change-Id: I1f0d24983198c7aa704dd334696e72dc8bf93b67
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2019-01-29 12:18:16 -08:00
Greg Kroah-Hartman
eef4cf658d This is the 4.14.91 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlwnau8ACgkQONu9yGCS
 aT7RJA/8Cbl1Gyw8rN8gZyvkgPnjFfJN5uRC2pvsa5Va7lsZTtOd8pzFE/vywcXM
 YlbIfFzCKsCFJCEEe0ovwB1smrA83DmlZ8sUIVw+t0pj6xMTKnnIa8oX4jbC9gug
 uarJjWJDcWwkwN6tcEhfQdATIzgGxhqCB1DJn+isYGOBCIdmjPOxX2Z/vL/kRFMV
 1BwqD8Izi51USWrxDNW3DlEO1ytOWwz4PtIlbF+m9KUZpKtBrCuMbgYL/wQdzlM6
 23GDvdpO23F456QR3z36JbfjGfcurrGquIOJPXPqQ0DxCTEb89nukUKuBmZMR+dO
 UIq2pW2XlLsm6cSwQRUiidhfapEHHPQ39YlAeQi39+DspeSHFNDgZxDjf0hnfK2+
 PhYIOIcCF2gO8qG8D8dWwEU82++IUzT2P/HjwrAF9K4ywaGPHxCvn4Evf87cTJvd
 9BI8RCSi/WrI7s6l4IoelmCfc6OrEbqKEFQo8beXtixv54vMKwgzui1/DcnbYv82
 7xSEa5etfSh4Gxnof3dYUz8O88YJBdZzN8yNxb3zG8eBJr2l2hBxsKN1ufF/SmYL
 iUcRMmocW0dpAZf6usxZTt8flRmYKeAbfjT7S1BNuhmey1berLyXhmfXYmMelrgw
 EcRZl0h5LUzvg48tx7valkYByMjc8AJOXylUcAWuqRKt+VCq178=
 =hU+5
 -----END PGP SIGNATURE-----

Merge 4.14.91 into android-4.14-p

Changes in 4.14.91
	block: break discard submissions into the user defined size
	block: fix infinite loop if the device loses discard capability
	ASoC: sta32x: set ->component pointer in private struct
	ubifs: Fix directory size calculation for symlinks
	ib_srpt: Fix a use-after-free in __srpt_close_all_ch()
	perf record: Synthesize features before events in pipe mode
	cifs: integer overflow in in SMB2_ioctl()
	USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data
	xhci: Don't prevent USB2 bus suspend in state check intended for USB3 only
	USB: xhci: fix 'broken_suspend' placement in struct xchi_hcd
	USB: serial: option: add GosunCn ZTE WeLink ME3630
	USB: serial: option: add HP lt4132
	USB: serial: option: add Simcom SIM7500/SIM7600 (MBIM mode)
	USB: serial: option: add Fibocom NL668 series
	USB: serial: option: add Telit LN940 series
	scsi: sd: use mempool for discard special page
	mmc: core: Reset HPI enabled state during re-init and in case of errors
	mmc: core: Allow BKOPS and CACHE ctrl even if no HPI support
	mmc: core: Use a minimum 1600ms timeout when enabling CACHE ctrl
	mmc: omap_hsmmc: fix DMA API warning
	gpio: max7301: fix driver for use with CONFIG_VMAP_STACK
	gpiolib-acpi: Only defer request_irq for GpioInt ACPI event handlers
	posix-timers: Fix division by zero bug
	kvm: x86: Add AMD's EX_CFG to the list of ignored MSRs
	KVM: Fix UAF in nested posted interrupt processing
	Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels
	x86/mtrr: Don't copy uninitialized gentry fields back to userspace
	panic: avoid deadlocks in re-entrant console drivers
	iwlwifi: mvm: don't send GEO_TX_POWER_LIMIT to old firmwares
	iwlwifi: add new cards for 9560, 9462, 9461 and killer series
	spi: imx: add a device specific prepare_message callback
	spi: imx: mx51-ecspi: Move some initialisation to prepare_message hook.
	ubifs: Handle re-linking of inodes correctly while recovery
	mm: don't miss the last page because of round-off error
	proc/sysctl: don't return ENOMEM on lookup when a table is unregistering
	drm/ioctl: Fix Spectre v1 vulnerabilities
	Linux 4.14.91

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-12-29 14:04:44 +01:00
Greg Kroah-Hartman
7d2d5fc1ac This is the 4.14.91 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlwnau8ACgkQONu9yGCS
 aT7RJA/8Cbl1Gyw8rN8gZyvkgPnjFfJN5uRC2pvsa5Va7lsZTtOd8pzFE/vywcXM
 YlbIfFzCKsCFJCEEe0ovwB1smrA83DmlZ8sUIVw+t0pj6xMTKnnIa8oX4jbC9gug
 uarJjWJDcWwkwN6tcEhfQdATIzgGxhqCB1DJn+isYGOBCIdmjPOxX2Z/vL/kRFMV
 1BwqD8Izi51USWrxDNW3DlEO1ytOWwz4PtIlbF+m9KUZpKtBrCuMbgYL/wQdzlM6
 23GDvdpO23F456QR3z36JbfjGfcurrGquIOJPXPqQ0DxCTEb89nukUKuBmZMR+dO
 UIq2pW2XlLsm6cSwQRUiidhfapEHHPQ39YlAeQi39+DspeSHFNDgZxDjf0hnfK2+
 PhYIOIcCF2gO8qG8D8dWwEU82++IUzT2P/HjwrAF9K4ywaGPHxCvn4Evf87cTJvd
 9BI8RCSi/WrI7s6l4IoelmCfc6OrEbqKEFQo8beXtixv54vMKwgzui1/DcnbYv82
 7xSEa5etfSh4Gxnof3dYUz8O88YJBdZzN8yNxb3zG8eBJr2l2hBxsKN1ufF/SmYL
 iUcRMmocW0dpAZf6usxZTt8flRmYKeAbfjT7S1BNuhmey1berLyXhmfXYmMelrgw
 EcRZl0h5LUzvg48tx7valkYByMjc8AJOXylUcAWuqRKt+VCq178=
 =hU+5
 -----END PGP SIGNATURE-----

Merge 4.14.91 into android-4.14

Changes in 4.14.91
	block: break discard submissions into the user defined size
	block: fix infinite loop if the device loses discard capability
	ASoC: sta32x: set ->component pointer in private struct
	ubifs: Fix directory size calculation for symlinks
	ib_srpt: Fix a use-after-free in __srpt_close_all_ch()
	perf record: Synthesize features before events in pipe mode
	cifs: integer overflow in in SMB2_ioctl()
	USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data
	xhci: Don't prevent USB2 bus suspend in state check intended for USB3 only
	USB: xhci: fix 'broken_suspend' placement in struct xchi_hcd
	USB: serial: option: add GosunCn ZTE WeLink ME3630
	USB: serial: option: add HP lt4132
	USB: serial: option: add Simcom SIM7500/SIM7600 (MBIM mode)
	USB: serial: option: add Fibocom NL668 series
	USB: serial: option: add Telit LN940 series
	scsi: sd: use mempool for discard special page
	mmc: core: Reset HPI enabled state during re-init and in case of errors
	mmc: core: Allow BKOPS and CACHE ctrl even if no HPI support
	mmc: core: Use a minimum 1600ms timeout when enabling CACHE ctrl
	mmc: omap_hsmmc: fix DMA API warning
	gpio: max7301: fix driver for use with CONFIG_VMAP_STACK
	gpiolib-acpi: Only defer request_irq for GpioInt ACPI event handlers
	posix-timers: Fix division by zero bug
	kvm: x86: Add AMD's EX_CFG to the list of ignored MSRs
	KVM: Fix UAF in nested posted interrupt processing
	Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels
	x86/mtrr: Don't copy uninitialized gentry fields back to userspace
	panic: avoid deadlocks in re-entrant console drivers
	iwlwifi: mvm: don't send GEO_TX_POWER_LIMIT to old firmwares
	iwlwifi: add new cards for 9560, 9462, 9461 and killer series
	spi: imx: add a device specific prepare_message callback
	spi: imx: mx51-ecspi: Move some initialisation to prepare_message hook.
	ubifs: Handle re-linking of inodes correctly while recovery
	mm: don't miss the last page because of round-off error
	proc/sysctl: don't return ENOMEM on lookup when a table is unregistering
	drm/ioctl: Fix Spectre v1 vulnerabilities
	Linux 4.14.91

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-12-29 14:03:43 +01:00
Richard Weinberger
ed0d232df9 ubifs: Handle re-linking of inodes correctly while recovery
commit e58725d51fa8da9133f3f1c54170aa2e43056b91 upstream.

UBIFS's recovery code strictly assumes that a deleted inode will never
come back, therefore it removes all data which belongs to that inode
as soon it faces an inode with link count 0 in the replay list.
Before O_TMPFILE this assumption was perfectly fine. With O_TMPFILE
it can lead to data loss upon a power-cut.

Consider a journal with entries like:
0: inode X (nlink = 0) /* O_TMPFILE was created */
1: data for inode X /* Someone writes to the temp file */
2: inode X (nlink = 0) /* inode was changed, xattr, chmod, … */
3: inode X (nlink = 1) /* inode was re-linked via linkat() */

Upon replay of entry #2 UBIFS will drop all data that belongs to inode X,
this will lead to an empty file after mounting.

As solution for this problem, scan the replay list for a re-link entry
before dropping data.

Fixes: 474b93704f32 ("ubifs: Implement O_TMPFILE")
Cc: stable@vger.kernel.org # 4.9-4.18
Cc: Russell Senior <russell@personaltelco.net>
Cc: Rafał Miłecki <zajec5@gmail.com>
Reported-by: Russell Senior <russell@personaltelco.net>
Reported-by: Rafał Miłecki <zajec5@gmail.com>
Tested-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Richard Weinberger <richard@nod.at>
[rmilecki: update ubifs_assert() calls to compile with 4.18 and older]
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit e58725d51fa8da9133f3f1c54170aa2e43056b91)
Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-12-29 13:39:11 +01:00
Richard Weinberger
56303ade45 ubifs: Fix directory size calculation for symlinks
commit 00ee8b60102862f4daf0814d12a2ea2744fc0b9b upstream

We have to account the name of the symlink and not the target length.

Fixes: ca7f85be8d6c ("ubifs: Add support for encrypted symlinks")
Cc: <stable@vger.kernel.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-12-29 13:39:07 +01:00
Blagovest Kolenichev
107b1944f7 Merge android-4.14-p.76 (864aacf) into msm-4.14
* refs/heads/tmp-864aacf:
  Linux 4.14.76
  ath10k: fix scan crash due to incorrect length calculation
  virtio_balloon: fix increment of vb->num_pfns in fill_balloon()
  virtio_balloon: fix deadlock on OOM
  rds: rds_ib_recv_alloc_cache() should call alloc_percpu_gfp() instead
  ubifs: Check for name being NULL while mounting
  ucma: fix a use-after-free in ucma_resolve_ip()
  f2fs: fix invalid memory access
  perf utils: Move is_directory() to path.h
  crypto: chelsio - Fix memory corruption in DMA Mapped buffers.
  ARC: clone syscall to setp r25 as thread pointer
  powerpc/lib: fix book3s/32 boot failure due to code patching
  powerpc: Avoid code patching freed init sections
  powerpc/lib/code-patching: refactor patch_instruction()
  nvme_fc: fix ctrl create failures racing with workq items
  ath10k: fix kernel panic issue during pci probe
  ath10k: fix use-after-free in ath10k_wmi_cmd_send_nowait
  perf tools: Fix python extension build for gcc 8
  perf annotate: Use asprintf when formatting objdump command line
  of: unittest: Disable interrupt node tests for old world MAC systems
  tty: Drop tty->count on tty_reopen() failure
  usb: cdc_acm: Do not leak URB buffers
  USB: serial: simple: add Motorola Tetra MTP6550 id
  usb: xhci-mtk: resume USB3 roothub first
  xhci: Add missing CAS workaround for Intel Sunrise Point xHCI
  dm cache: fix resize crash if user doesn't reload cache table
  dm cache metadata: ignore hints array being too small during resize
  PM / core: Clear the direct_complete flag on errors
  mac80211: fix setting IEEE80211_KEY_FLAG_RX_MGMT for AP mode keys
  PCI: Reprogram bridge prefetch registers on resume
  x86/vdso: Fix vDSO syscall fallback asm constraint regression
  x86/vdso: Only enable vDSO retpolines when enabled and supported
  selftests/x86: Add clock_gettime() tests to test_vdso
  x86/vdso: Fix asm constraints on vDSO syscall fallbacks
  drm/syncobj: Don't leak fences when WAIT_FOR_SUBMIT is set
  drm/amdgpu: Fix vce work queue was not cancelled when suspend
  xen-netback: fix input validation in xenvif_set_hash_mapping()
  fbdev/omapfb: fix omapfb_memory_read infoleak
  clocksource/drivers/timer-atmel-pit: Properly handle error cases
  blk-mq: I/O and timer unplugs are inverted in blktrace
  KVM: x86: fix L1TF's MMIO GFN calculation
  mm/vmstat.c: skip NR_TLB_REMOTE_FLUSH* properly
  mm, thp: fix mlocking THP page with migration enabled
  mm: migration: fix migration of huge PMD shared pages
  perf/core: Add sanity check to deal with pinned event failure

Change-Id: I254c41b5b31bf3c5c305eaf87eb47196c3b3d088
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2018-10-19 00:19:46 -07:00
Greg Kroah-Hartman
864aacfaf6 This is the 4.14.76 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlvBnmMACgkQONu9yGCS
 aT7zEQ/+NYpH2rhDxXJt/Y5+lKO6ViWWVNAJ7zngTckXSO8sJzIrbV5a8W99i/nc
 nip5YyLihOhP0uigtdctV42u5VPoroQZGSvNy9SBRw7yD+ZUtsIOpax6nXXi2M3F
 fJC7/IKtgGYe5Ow6TbAnLAYqn5sOZKnsB7kgqhZYMhr/Y99OLXOESqoDX6xvKAkV
 lzedsw5qzvL44F13KunsuR/pUVBPKLTeNYQ/vrVr0lKLbFkK06z5GZUsvklw3M5F
 CBQdiISMU2wTPXflFjRHMW+IZzjlCBIv3jipV9BlkN0c/aLtyt81BU3Xx17wqQt7
 H80f5I3zb4xW1lv93UyxcfbhkgXNZIRIW3zjXOO0Lv9LSYTpFCgnsVB+ZXkLoETw
 oC0C/ggKY/fmXAipmugCIVY1qgPc6AOyXxjctIuRyta4Vgu67cIEY7OUulZfaKGP
 bJFNS9junceAaSqsImyDrWOMuGbJSgV9/OuKIDt4vubtpnNxCTvz3K4XfcRPzab5
 HLMk1onp9UuVRRQeP8E/Tq6yDdNujAE9e9q76jVtnkMYGkancO4VrumZoK3q06wa
 Fy4CsyO+hYXXhZGdbul785YLjUlthncjC3siDYKNL9FHjJ4O/8h32x6pk6WZ5JHR
 ULc/+52fM/ttWMKYfxmhxmD4ZIrRsiAYYCRNi0z6fDtLsTcQpVg=
 =vzcF
 -----END PGP SIGNATURE-----

Merge 4.14.76 into android-4.14-p

Changes in 4.14.76
	perf/core: Add sanity check to deal with pinned event failure
	mm: migration: fix migration of huge PMD shared pages
	mm, thp: fix mlocking THP page with migration enabled
	mm/vmstat.c: skip NR_TLB_REMOTE_FLUSH* properly
	KVM: x86: fix L1TF's MMIO GFN calculation
	blk-mq: I/O and timer unplugs are inverted in blktrace
	clocksource/drivers/timer-atmel-pit: Properly handle error cases
	fbdev/omapfb: fix omapfb_memory_read infoleak
	xen-netback: fix input validation in xenvif_set_hash_mapping()
	drm/amdgpu: Fix vce work queue was not cancelled when suspend
	drm/syncobj: Don't leak fences when WAIT_FOR_SUBMIT is set
	x86/vdso: Fix asm constraints on vDSO syscall fallbacks
	selftests/x86: Add clock_gettime() tests to test_vdso
	x86/vdso: Only enable vDSO retpolines when enabled and supported
	x86/vdso: Fix vDSO syscall fallback asm constraint regression
	PCI: Reprogram bridge prefetch registers on resume
	mac80211: fix setting IEEE80211_KEY_FLAG_RX_MGMT for AP mode keys
	PM / core: Clear the direct_complete flag on errors
	dm cache metadata: ignore hints array being too small during resize
	dm cache: fix resize crash if user doesn't reload cache table
	xhci: Add missing CAS workaround for Intel Sunrise Point xHCI
	usb: xhci-mtk: resume USB3 roothub first
	USB: serial: simple: add Motorola Tetra MTP6550 id
	usb: cdc_acm: Do not leak URB buffers
	tty: Drop tty->count on tty_reopen() failure
	of: unittest: Disable interrupt node tests for old world MAC systems
	perf annotate: Use asprintf when formatting objdump command line
	perf tools: Fix python extension build for gcc 8
	ath10k: fix use-after-free in ath10k_wmi_cmd_send_nowait
	ath10k: fix kernel panic issue during pci probe
	nvme_fc: fix ctrl create failures racing with workq items
	powerpc/lib/code-patching: refactor patch_instruction()
	powerpc: Avoid code patching freed init sections
	powerpc/lib: fix book3s/32 boot failure due to code patching
	ARC: clone syscall to setp r25 as thread pointer
	crypto: chelsio - Fix memory corruption in DMA Mapped buffers.
	perf utils: Move is_directory() to path.h
	f2fs: fix invalid memory access
	ucma: fix a use-after-free in ucma_resolve_ip()
	ubifs: Check for name being NULL while mounting
	rds: rds_ib_recv_alloc_cache() should call alloc_percpu_gfp() instead
	virtio_balloon: fix deadlock on OOM
	virtio_balloon: fix increment of vb->num_pfns in fill_balloon()
	ath10k: fix scan crash due to incorrect length calculation
	Linux 4.14.76

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-10-13 11:08:36 +02:00
Greg Kroah-Hartman
48091d9433 This is the 4.14.76 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlvBnmMACgkQONu9yGCS
 aT7zEQ/+NYpH2rhDxXJt/Y5+lKO6ViWWVNAJ7zngTckXSO8sJzIrbV5a8W99i/nc
 nip5YyLihOhP0uigtdctV42u5VPoroQZGSvNy9SBRw7yD+ZUtsIOpax6nXXi2M3F
 fJC7/IKtgGYe5Ow6TbAnLAYqn5sOZKnsB7kgqhZYMhr/Y99OLXOESqoDX6xvKAkV
 lzedsw5qzvL44F13KunsuR/pUVBPKLTeNYQ/vrVr0lKLbFkK06z5GZUsvklw3M5F
 CBQdiISMU2wTPXflFjRHMW+IZzjlCBIv3jipV9BlkN0c/aLtyt81BU3Xx17wqQt7
 H80f5I3zb4xW1lv93UyxcfbhkgXNZIRIW3zjXOO0Lv9LSYTpFCgnsVB+ZXkLoETw
 oC0C/ggKY/fmXAipmugCIVY1qgPc6AOyXxjctIuRyta4Vgu67cIEY7OUulZfaKGP
 bJFNS9junceAaSqsImyDrWOMuGbJSgV9/OuKIDt4vubtpnNxCTvz3K4XfcRPzab5
 HLMk1onp9UuVRRQeP8E/Tq6yDdNujAE9e9q76jVtnkMYGkancO4VrumZoK3q06wa
 Fy4CsyO+hYXXhZGdbul785YLjUlthncjC3siDYKNL9FHjJ4O/8h32x6pk6WZ5JHR
 ULc/+52fM/ttWMKYfxmhxmD4ZIrRsiAYYCRNi0z6fDtLsTcQpVg=
 =vzcF
 -----END PGP SIGNATURE-----

Merge 4.14.76 into android-4.14

Changes in 4.14.76
	perf/core: Add sanity check to deal with pinned event failure
	mm: migration: fix migration of huge PMD shared pages
	mm, thp: fix mlocking THP page with migration enabled
	mm/vmstat.c: skip NR_TLB_REMOTE_FLUSH* properly
	KVM: x86: fix L1TF's MMIO GFN calculation
	blk-mq: I/O and timer unplugs are inverted in blktrace
	clocksource/drivers/timer-atmel-pit: Properly handle error cases
	fbdev/omapfb: fix omapfb_memory_read infoleak
	xen-netback: fix input validation in xenvif_set_hash_mapping()
	drm/amdgpu: Fix vce work queue was not cancelled when suspend
	drm/syncobj: Don't leak fences when WAIT_FOR_SUBMIT is set
	x86/vdso: Fix asm constraints on vDSO syscall fallbacks
	selftests/x86: Add clock_gettime() tests to test_vdso
	x86/vdso: Only enable vDSO retpolines when enabled and supported
	x86/vdso: Fix vDSO syscall fallback asm constraint regression
	PCI: Reprogram bridge prefetch registers on resume
	mac80211: fix setting IEEE80211_KEY_FLAG_RX_MGMT for AP mode keys
	PM / core: Clear the direct_complete flag on errors
	dm cache metadata: ignore hints array being too small during resize
	dm cache: fix resize crash if user doesn't reload cache table
	xhci: Add missing CAS workaround for Intel Sunrise Point xHCI
	usb: xhci-mtk: resume USB3 roothub first
	USB: serial: simple: add Motorola Tetra MTP6550 id
	usb: cdc_acm: Do not leak URB buffers
	tty: Drop tty->count on tty_reopen() failure
	of: unittest: Disable interrupt node tests for old world MAC systems
	perf annotate: Use asprintf when formatting objdump command line
	perf tools: Fix python extension build for gcc 8
	ath10k: fix use-after-free in ath10k_wmi_cmd_send_nowait
	ath10k: fix kernel panic issue during pci probe
	nvme_fc: fix ctrl create failures racing with workq items
	powerpc/lib/code-patching: refactor patch_instruction()
	powerpc: Avoid code patching freed init sections
	powerpc/lib: fix book3s/32 boot failure due to code patching
	ARC: clone syscall to setp r25 as thread pointer
	crypto: chelsio - Fix memory corruption in DMA Mapped buffers.
	perf utils: Move is_directory() to path.h
	f2fs: fix invalid memory access
	ucma: fix a use-after-free in ucma_resolve_ip()
	ubifs: Check for name being NULL while mounting
	rds: rds_ib_recv_alloc_cache() should call alloc_percpu_gfp() instead
	virtio_balloon: fix deadlock on OOM
	virtio_balloon: fix increment of vb->num_pfns in fill_balloon()
	ath10k: fix scan crash due to incorrect length calculation
	Linux 4.14.76

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-10-13 10:44:28 +02:00
Richard Weinberger
4c925efc22 ubifs: Check for name being NULL while mounting
commit 37f31b6ca4311b94d985fb398a72e5399ad57925 upstream.

The requested device name can be NULL or an empty string.
Check for that and refuse to continue. UBIFS has to do this manually
since we cannot use mount_bdev(), which checks for this condition.

Fixes: 1e51764a3c2ac ("UBIFS: add new flash file system")
Reported-by: syzbot+38bd0f7865e5c6379280@syzkaller.appspotmail.com
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-13 09:27:29 +02:00
Blagovest Kolenichev
51bbfa4e56 Merge android-4.14-p.73 (6cff87be) into msm-4.14
* refs/heads/tmp-6cff87be:
  Linux 4.14.73
  spi: Fix double IDR allocation with DT aliases
  tick/nohz: Prevent bogus softirq pending warning
  iw_cxgb4: only allow 1 flush on user qps
  vmw_balloon: include asm/io.h
  PCI: aardvark: Size bridges before resources allocation
  sched/fair: Fix vruntime_normalized() for remote non-migration wakeup
  ext4: show test_dummy_encryption mount option in /proc/mounts
  ext4: don't mark mmp buffer head dirty
  ext4: fix online resizing for bigalloc file systems with a 1k block size
  ext4: fix online resize's handling of a too-small final block group
  ext4: recalucate superblock checksum after updating free blocks/inodes
  ext4: avoid arithemetic overflow that can trigger a BUG
  ext4: avoid divide by zero fault when deleting corrupted inline directories
  ext4: check to make sure the rename(2)'s destination is not freed
  tty: vt_ioctl: fix potential Spectre v1
  drm/amdgpu: add new polaris pci id
  drm: udl: Destroy framebuffer only if it was initialized
  drm/vc4: Fix the "no scaling" case on multi-planar YUV formats
  drm/nouveau/drm/nouveau: Prevent handling ACPI HPD events too early
  drm/nouveau/drm/nouveau: Use pm_runtime_get_noresume() in connector_detect()
  drm/nouveau/drm/nouveau: Fix bogus drm_kms_helper_poll_enable() placement
  drm/nouveau/drm/nouveau: Don't forget to cancel hpd_work on suspend/unload
  drm/nouveau: Fix deadlocks in nouveau_connector_detect()
  ocfs2: fix ocfs2 read block panic
  Revert "ubifs: xattr: Don't operate on deleted inodes"
  scsi: target: iscsi: Use bin2hex instead of a re-implementation
  scsi: target: iscsi: Use hex2bin instead of a re-implementation
  Revert "uapi/linux/keyctl.h: don't use C++ reserved keyword as a struct member name"
  Revert "rpmsg: core: add support to power domains for devices"
  mm: shmem.c: Correctly annotate new inodes for lockdep
  ring-buffer: Allow for rescheduling when removing pages
  Revert "PCI: Add ACS quirk for Intel 300 series"
  spi: fix IDR collision on systems with both fixed and dynamic SPI bus numbers
  xen/x86/vpmu: Zero struct pt_regs before calling into sample handling code
  xen/netfront: don't bug in case of too many frags
  platform/x86: alienware-wmi: Correct a memory leak
  ALSA: oxfw: fix memory leak of private data
  ALSA: oxfw: fix memory leak of discovered stream formats at error path
  ALSA: oxfw: fix memory leak for model-dependent data at error path
  ALSA: fireworks: fix memory leak of response buffer at error path
  ALSA: firewire-tascam: fix memory leak of private data
  ALSA: firewire-digi00x: fix memory leak of private data
  ALSA: fireface: fix memory leak in ff400_switch_fetching_mode()
  ALSA: emu10k1: fix possible info leak to userspace on SNDRV_EMU10K1_IOCTL_INFO
  ALSA: bebob: use address returned by kmalloc() instead of kernel stack for streaming DMA mapping
  ALSA: bebob: fix memory leak for M-Audio FW1814 and ProjectMix I/O at error path
  ASoC: rsnd: fixup not to call clk_get/set under non-atomic
  ASoC: cs4265: fix MMTLR Data switch control
  NFC: Fix the number of pipes
  NFC: Fix possible memory corruption when handling SHDLC I-Frame commands
  tls: clear key material from kernel memory when do_tls_setsockopt_conf fails
  tls: zero the crypto information from tls_context before freeing
  tls: don't copy the key out of tls12_crypto_info_aes_gcm_128
  net/sched: act_sample: fix NULL dereference in the data path
  udp6: add missing checks on edumux packet processing
  neighbour: confirm neigh entries when ARP packet is received
  udp4: fix IP_CMSG_CHECKSUM for connected sockets
  qmi_wwan: set DTR for modems in forced USB2 mode
  pppoe: fix reception of frames with no mac header
  net: hp100: fix always-true check for link up state
  net/appletalk: fix minor pointer leak to userspace in SIOCFINDIPDDPRT
  ipv6: fix possible use-after-free in ip6_xmit()
  gso_segment: Reset skb->mac_len after modifying network header

Change-Id: I6749bbe43a8bef5abf41860f14e5ab6527b8469e
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2018-10-05 14:59:35 -07:00
Blagovest Kolenichev
3c38b3e52e Merge android-4.14-p.69 (c535ee7) into msm-4.14
* refs/heads/tmp-c535ee7:
  Linux 4.14.69
  arm64: mm: always enable CONFIG_HOLES_IN_ZONE
  fs/quota: Fix spectre gadget in do_quotactl
  crypto: caam/qi - fix error path in xts setkey
  crypto: caam/jr - fix descriptor DMA unmapping
  crypto: caam - fix DMA mapping direction for RSA forms 2 & 3
  crypto: vmx - Fix sleep-in-atomic bugs
  perf auxtrace: Fix queue resize
  cap_inode_getsecurity: use d_find_any_alias() instead of d_find_alias()
  bcache: release dc->writeback_lock properly in bch_writeback_thread()
  libnvdimm: fix ars_status output length calculation
  getxattr: use correct xattr length
  udlfb: set optimal write delay
  fb: fix lost console when the user unplugs a USB adapter
  pwm: tiehrpwm: Fix disabling of output of PWMs
  pwm: tiehrpwm: Don't use emulation mode bits to control PWM output
  ubifs: Fix synced_i_size calculation for xattr inodes
  ubifs: xattr: Don't operate on deleted inodes
  ubifs: Check data node size before truncate
  Revert "UBIFS: Fix potential integer overflow in allocation"
  ubifs: Fix memory leak in lprobs self-check
  userns: move user access out of the mutex
  sys: don't hold uts_sem while accessing userspace memory
  iommu/vt-d: Fix dev iotlb pfsid use
  iommu/vt-d: Add definitions for PFSID
  mm/tlb: Remove tlb_remove_table() non-concurrent condition
  ARM: tegra: Fix Tegra30 Cardhu PCA954x reset
  NFSv4: Fix a sleep in atomic context in nfs4_callback_sequence()
  NFSv4: Fix locking in pnfs_generic_recover_commit_reqs
  NFSv4 client live hangs after live data migration recovery
  pnfs/blocklayout: off by one in bl_map_stripe()
  block, bfq: return nbytes and not zero from struct cftype .write() method
  xtensa: increase ranges in ___invalidate_{i,d}cache_all
  xtensa: limit offsets in __loop_cache_{all,page}
  KVM: PPC: Book3S: Fix guest DMA when guest partially backed by THP pages
  KVM: VMX: fixes for vmentry_l1d_flush module parameter
  PM / sleep: wakeup: Fix build error caused by missing SRCU support
  cpufreq: governor: Avoid accessing invalid governor_data
  drivers/block/zram/zram_drv.c: fix bug storing backing_dev
  ovl: fix wrong use of impure dir cache in ovl_iterate()
  mfd: hi655x: Fix regmap area declared size for hi655x
  uprobes: Use synchronize_rcu() not synchronize_sched()
  livepatch: Validate module/old func name length
  printk/tracing: Do not trace printk_nmi_enter()
  tracing/blktrace: Fix to allow setting same value
  tracing: Do not call start/stop() functions when tracing_on does not change
  rtc: omap: fix potential crash on power off
  vmw_balloon: fix VMCI use when balloon built into kernel
  vmw_balloon: VMCI_DOORBELL_SET does not check status
  vmw_balloon: do not use 2MB without batching
  vmw_balloon: fix inflation of 64-bit GFNs
  extcon: Release locking when sending the notification of connector state
  iio: ad9523: Fix return value for ad952x_store()
  iio: ad9523: Fix displayed phase
  iio: sca3000: Fix missing return in switch
  Drivers: hv: vmbus: Reset the channel callback in vmbus_onoffer_rescind()
  uart: fix race between uart_put_char() and uart_shutdown()
  dm crypt: don't decrease device limits
  dm cache metadata: set dirty on all cache blocks after a crash
  dm cache metadata: save in-core policy_hint_size to on-disk superblock
  dm thin: stop no_space_timeout worker when switching to write-mode
  dm integrity: change 'suspending' variable from bool to int
  net/9p/trans_fd.c: fix race-condition by flushing workqueue before the kfree()
  net/9p/client.c: version pointer uninitialized
  9p/virtio: fix off-by-one error in sg list bounds check
  fs/9p/xattr.c: catch the error of p9_client_clunk when setting xattr failed
  9p: fix multiple NULL-pointer-dereferences
  RDMA/rxe: Set wqe->status correctly if an unexpected response is received
  ib_srpt: Fix a use-after-free in srpt_close_ch()
  cxl: Fix wrong comparison in cxl_adapter_context_get()
  powerpc/powernv/pci: Work around races in PCI bridge enabling
  PCI: Add wrappers for dev_printk()
  powerpc/pseries: Fix endianness while restoring of r3 in MCE handler.
  powerpc/fadump: handle crash memory ranges array index overflow
  Fix kexec forbidding kernels signed with keys in the secondary keyring to boot
  Replace magic for trusting the secondary keyring with #define
  mailbox: xgene-slimpro: Fix potential NULL pointer dereference
  media: Revert "[media] tvp5150: fix pad format frame height"
  libertas: fix suspend and resume for SDIO connected cards
  drm/i915/userptr: reject zero user_size
  block: really disable runtime-pm for blk-mq
  block: blk_init_allocated_queue() set q->fq as NULL in the fail case
  readahead: stricter check for bdi io_pages
  mmc: renesas_sdhi_internal_dmac: fix #define RST_RESERVED_BITS
  spi: cadence: Change usleep_range() to udelay(), for atomic context
  spi: spi-fsl-dspi: Fix imprecise abort on VF500 during probe
  spi: pxa2xx: Add support for Intel Ice Lake
  spi: davinci: fix a NULL pointer dereference
  9p/net: Fix zero-copy path in the 9p virtio transport
  net: mac802154: tx: expand tailroom if necessary
  net: 6lowpan: fix reserved space for single frames
  ANDROID: squashfs: resolve merge conflict with 4.14.68

Change-Id: I547b8351069d9529aa81d673f0a20e666618a74c
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2018-10-05 14:59:14 -07:00
Greg Kroah-Hartman
6cff87be49 This is the 4.14.73 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAluvTpMACgkQONu9yGCS
 aT7ujRAA2ITu5tdgwFN3UthGxHp5LvlKkeNpsZOzsQoTjgIEWMO1RPF6NFuDZUO0
 AdmovtfYgIF29PF9EALl8gIl0wNzI20TUGhx0t/6Ek2wsO3259RnNLFvaX14BfXF
 wmGg1uCVZo1HrWe/E2sh1+D/1gIKy5pl/sLW7N5imZ20AyRP4Q69AH4LwBQ0yAzT
 YgJK734i3p6Vf+nWeNAHFCl6m0lfwAJMTaMEZ567xM6HcZEnPqFoKOYvqA0znRau
 Sr3r5xH/YNyLQeTBpzOjJxIvWLOE9IxWgShQqvwcZ5PM35YPsNISmzp8AvmglM7x
 M9CuUQqr1+nawBnNAtHcUSy65VsGpPiLRne02Mc2ym7NAf1izFBHoAAkCtS9aGGy
 JQlZ0kos4A8VMO8j09gDguyLvdO0H1InWmfAWaAXtzDjjRHjYckFW99zgWRtN3Tn
 JUqPt5SkJzMU552tt7dGd7wTkXLjNxYpX24xw17ly7Z0oxArGlpCfF8XcxhNnRpX
 EgE3iNUcWxFbARSy4vbtSXqJDi/rB3o7YW74SxowAjivtTPsLeNXd6gFhiuOp2CQ
 Ak6XXgXI+Jzsu89edmM7V0vqw2UF6JdI9BJQvyGBC6KVUS6eYM00KQ+Rrwrvldsa
 KAKnV5cttAnwOZrAWof6PQLRJdGT1qXnNn4CWt3SX5LYFiLpFgI=
 =v/u2
 -----END PGP SIGNATURE-----

Merge 4.14.73 into android-4.14-p

Changes in 4.14.73
	gso_segment: Reset skb->mac_len after modifying network header
	ipv6: fix possible use-after-free in ip6_xmit()
	net/appletalk: fix minor pointer leak to userspace in SIOCFINDIPDDPRT
	net: hp100: fix always-true check for link up state
	pppoe: fix reception of frames with no mac header
	qmi_wwan: set DTR for modems in forced USB2 mode
	udp4: fix IP_CMSG_CHECKSUM for connected sockets
	neighbour: confirm neigh entries when ARP packet is received
	udp6: add missing checks on edumux packet processing
	net/sched: act_sample: fix NULL dereference in the data path
	tls: don't copy the key out of tls12_crypto_info_aes_gcm_128
	tls: zero the crypto information from tls_context before freeing
	tls: clear key material from kernel memory when do_tls_setsockopt_conf fails
	NFC: Fix possible memory corruption when handling SHDLC I-Frame commands
	NFC: Fix the number of pipes
	ASoC: cs4265: fix MMTLR Data switch control
	ASoC: rsnd: fixup not to call clk_get/set under non-atomic
	ALSA: bebob: fix memory leak for M-Audio FW1814 and ProjectMix I/O at error path
	ALSA: bebob: use address returned by kmalloc() instead of kernel stack for streaming DMA mapping
	ALSA: emu10k1: fix possible info leak to userspace on SNDRV_EMU10K1_IOCTL_INFO
	ALSA: fireface: fix memory leak in ff400_switch_fetching_mode()
	ALSA: firewire-digi00x: fix memory leak of private data
	ALSA: firewire-tascam: fix memory leak of private data
	ALSA: fireworks: fix memory leak of response buffer at error path
	ALSA: oxfw: fix memory leak for model-dependent data at error path
	ALSA: oxfw: fix memory leak of discovered stream formats at error path
	ALSA: oxfw: fix memory leak of private data
	platform/x86: alienware-wmi: Correct a memory leak
	xen/netfront: don't bug in case of too many frags
	xen/x86/vpmu: Zero struct pt_regs before calling into sample handling code
	spi: fix IDR collision on systems with both fixed and dynamic SPI bus numbers
	Revert "PCI: Add ACS quirk for Intel 300 series"
	ring-buffer: Allow for rescheduling when removing pages
	mm: shmem.c: Correctly annotate new inodes for lockdep
	Revert "rpmsg: core: add support to power domains for devices"
	Revert "uapi/linux/keyctl.h: don't use C++ reserved keyword as a struct member name"
	scsi: target: iscsi: Use hex2bin instead of a re-implementation
	scsi: target: iscsi: Use bin2hex instead of a re-implementation
	Revert "ubifs: xattr: Don't operate on deleted inodes"
	ocfs2: fix ocfs2 read block panic
	drm/nouveau: Fix deadlocks in nouveau_connector_detect()
	drm/nouveau/drm/nouveau: Don't forget to cancel hpd_work on suspend/unload
	drm/nouveau/drm/nouveau: Fix bogus drm_kms_helper_poll_enable() placement
	drm/nouveau/drm/nouveau: Use pm_runtime_get_noresume() in connector_detect()
	drm/nouveau/drm/nouveau: Prevent handling ACPI HPD events too early
	drm/vc4: Fix the "no scaling" case on multi-planar YUV formats
	drm: udl: Destroy framebuffer only if it was initialized
	drm/amdgpu: add new polaris pci id
	tty: vt_ioctl: fix potential Spectre v1
	ext4: check to make sure the rename(2)'s destination is not freed
	ext4: avoid divide by zero fault when deleting corrupted inline directories
	ext4: avoid arithemetic overflow that can trigger a BUG
	ext4: recalucate superblock checksum after updating free blocks/inodes
	ext4: fix online resize's handling of a too-small final block group
	ext4: fix online resizing for bigalloc file systems with a 1k block size
	ext4: don't mark mmp buffer head dirty
	ext4: show test_dummy_encryption mount option in /proc/mounts
	sched/fair: Fix vruntime_normalized() for remote non-migration wakeup
	PCI: aardvark: Size bridges before resources allocation
	vmw_balloon: include asm/io.h
	iw_cxgb4: only allow 1 flush on user qps
	tick/nohz: Prevent bogus softirq pending warning
	spi: Fix double IDR allocation with DT aliases
	Linux 4.14.73

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-09-29 07:53:13 -07:00
Greg Kroah-Hartman
84ae3e35e1 This is the 4.14.73 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAluvTpMACgkQONu9yGCS
 aT7ujRAA2ITu5tdgwFN3UthGxHp5LvlKkeNpsZOzsQoTjgIEWMO1RPF6NFuDZUO0
 AdmovtfYgIF29PF9EALl8gIl0wNzI20TUGhx0t/6Ek2wsO3259RnNLFvaX14BfXF
 wmGg1uCVZo1HrWe/E2sh1+D/1gIKy5pl/sLW7N5imZ20AyRP4Q69AH4LwBQ0yAzT
 YgJK734i3p6Vf+nWeNAHFCl6m0lfwAJMTaMEZ567xM6HcZEnPqFoKOYvqA0znRau
 Sr3r5xH/YNyLQeTBpzOjJxIvWLOE9IxWgShQqvwcZ5PM35YPsNISmzp8AvmglM7x
 M9CuUQqr1+nawBnNAtHcUSy65VsGpPiLRne02Mc2ym7NAf1izFBHoAAkCtS9aGGy
 JQlZ0kos4A8VMO8j09gDguyLvdO0H1InWmfAWaAXtzDjjRHjYckFW99zgWRtN3Tn
 JUqPt5SkJzMU552tt7dGd7wTkXLjNxYpX24xw17ly7Z0oxArGlpCfF8XcxhNnRpX
 EgE3iNUcWxFbARSy4vbtSXqJDi/rB3o7YW74SxowAjivtTPsLeNXd6gFhiuOp2CQ
 Ak6XXgXI+Jzsu89edmM7V0vqw2UF6JdI9BJQvyGBC6KVUS6eYM00KQ+Rrwrvldsa
 KAKnV5cttAnwOZrAWof6PQLRJdGT1qXnNn4CWt3SX5LYFiLpFgI=
 =v/u2
 -----END PGP SIGNATURE-----

Merge 4.14.73 into android-4.14

Changes in 4.14.73
	gso_segment: Reset skb->mac_len after modifying network header
	ipv6: fix possible use-after-free in ip6_xmit()
	net/appletalk: fix minor pointer leak to userspace in SIOCFINDIPDDPRT
	net: hp100: fix always-true check for link up state
	pppoe: fix reception of frames with no mac header
	qmi_wwan: set DTR for modems in forced USB2 mode
	udp4: fix IP_CMSG_CHECKSUM for connected sockets
	neighbour: confirm neigh entries when ARP packet is received
	udp6: add missing checks on edumux packet processing
	net/sched: act_sample: fix NULL dereference in the data path
	tls: don't copy the key out of tls12_crypto_info_aes_gcm_128
	tls: zero the crypto information from tls_context before freeing
	tls: clear key material from kernel memory when do_tls_setsockopt_conf fails
	NFC: Fix possible memory corruption when handling SHDLC I-Frame commands
	NFC: Fix the number of pipes
	ASoC: cs4265: fix MMTLR Data switch control
	ASoC: rsnd: fixup not to call clk_get/set under non-atomic
	ALSA: bebob: fix memory leak for M-Audio FW1814 and ProjectMix I/O at error path
	ALSA: bebob: use address returned by kmalloc() instead of kernel stack for streaming DMA mapping
	ALSA: emu10k1: fix possible info leak to userspace on SNDRV_EMU10K1_IOCTL_INFO
	ALSA: fireface: fix memory leak in ff400_switch_fetching_mode()
	ALSA: firewire-digi00x: fix memory leak of private data
	ALSA: firewire-tascam: fix memory leak of private data
	ALSA: fireworks: fix memory leak of response buffer at error path
	ALSA: oxfw: fix memory leak for model-dependent data at error path
	ALSA: oxfw: fix memory leak of discovered stream formats at error path
	ALSA: oxfw: fix memory leak of private data
	platform/x86: alienware-wmi: Correct a memory leak
	xen/netfront: don't bug in case of too many frags
	xen/x86/vpmu: Zero struct pt_regs before calling into sample handling code
	spi: fix IDR collision on systems with both fixed and dynamic SPI bus numbers
	Revert "PCI: Add ACS quirk for Intel 300 series"
	ring-buffer: Allow for rescheduling when removing pages
	mm: shmem.c: Correctly annotate new inodes for lockdep
	Revert "rpmsg: core: add support to power domains for devices"
	Revert "uapi/linux/keyctl.h: don't use C++ reserved keyword as a struct member name"
	scsi: target: iscsi: Use hex2bin instead of a re-implementation
	scsi: target: iscsi: Use bin2hex instead of a re-implementation
	Revert "ubifs: xattr: Don't operate on deleted inodes"
	ocfs2: fix ocfs2 read block panic
	drm/nouveau: Fix deadlocks in nouveau_connector_detect()
	drm/nouveau/drm/nouveau: Don't forget to cancel hpd_work on suspend/unload
	drm/nouveau/drm/nouveau: Fix bogus drm_kms_helper_poll_enable() placement
	drm/nouveau/drm/nouveau: Use pm_runtime_get_noresume() in connector_detect()
	drm/nouveau/drm/nouveau: Prevent handling ACPI HPD events too early
	drm/vc4: Fix the "no scaling" case on multi-planar YUV formats
	drm: udl: Destroy framebuffer only if it was initialized
	drm/amdgpu: add new polaris pci id
	tty: vt_ioctl: fix potential Spectre v1
	ext4: check to make sure the rename(2)'s destination is not freed
	ext4: avoid divide by zero fault when deleting corrupted inline directories
	ext4: avoid arithemetic overflow that can trigger a BUG
	ext4: recalucate superblock checksum after updating free blocks/inodes
	ext4: fix online resize's handling of a too-small final block group
	ext4: fix online resizing for bigalloc file systems with a 1k block size
	ext4: don't mark mmp buffer head dirty
	ext4: show test_dummy_encryption mount option in /proc/mounts
	sched/fair: Fix vruntime_normalized() for remote non-migration wakeup
	PCI: aardvark: Size bridges before resources allocation
	vmw_balloon: include asm/io.h
	iw_cxgb4: only allow 1 flush on user qps
	tick/nohz: Prevent bogus softirq pending warning
	spi: Fix double IDR allocation with DT aliases
	Linux 4.14.73

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-09-29 07:52:28 -07:00
Richard Weinberger
1d7e23f906 Revert "ubifs: xattr: Don't operate on deleted inodes"
commit f061c1cc404a618858a77aea233fde0aeaad2f2d upstream.

This reverts commit 11a6fc3dc743e22fb50f2196ec55bee5140d3c52.
UBIFS wants to assert that xattr operations are only issued on files
with positive link count. The said patch made this operations return
-ENOENT for unlinked files such that the asserts will no longer trigger.
This was wrong since xattr operations are perfectly fine on unlinked
files.
Instead the assertions need to be fixed/removed.

Cc: <stable@vger.kernel.org>
Fixes: 11a6fc3dc743 ("ubifs: xattr: Don't operate on deleted inodes")
Reported-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Tested-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-29 03:06:04 -07:00
Greg Kroah-Hartman
c535ee76cd This is the 4.14.69 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAluVXrMACgkQONu9yGCS
 aT5AyA//TMltTkpcS08FE8gUSgPT7ZjJdoeS0yUD7Sh8H0GV6MSn12QGgr8UWyUS
 t9a01U2erwz1Ua3I+CjBxLOBfw6c5on87C9nM4ruhV4zA/umFi+odBTnXPkc1fnM
 JtRgqlf5Gsy0Tp/CjcABot8P2RwyXOQBwGN544yU1GAq7WYbNg2o4YyuKd8W1epu
 lro06RCS4gsmguKaxYgFxwJFYvCbhGKlS3GDLz/v0XXMkaHIzbTdUduedA/7DiIc
 ZOAOaFXYLdbx2gTmodMuEWVOWUeReZnegAOQXswfjbqID0HxvNlYWCFrNAX9zDw0
 JLwX2hE4LC+ptBr8AwzBbz2yhm2smcSiGENohra9MyxyNrRrlVvFBqGIOHZGl5Dm
 +XPeVk1Prg/nubZ8K+1OMBMPGjrIfYESrl3JRSw3TOhF58jRSExoFSHQwKciAFbZ
 6huV41/eBRYBPXKiZPv01jluZc/u05n0gHZDz6tnJSBDKICUeoHoDq3oX78tjMvK
 3Qj+CZJS6DUczgz6azLx80Bnt/clEfCtQ/lC+h4SEdvnClPoOtUs7q4j74fxKG/8
 bkEVVOJMFtAXTpj7VcxHL1QMoYMMqNGmheWMhzHw3CsC2TTkuAdHfY5KF70ggjH7
 AN0a2BZCKj9KfsI5/IzytzfuzwMXfj6bZ9NWwKmLm37gzWLLxEg=
 =z4Ok
 -----END PGP SIGNATURE-----

Merge 4.14.69 into android-4.14-p

Changes in 4.14.69
	net: 6lowpan: fix reserved space for single frames
	net: mac802154: tx: expand tailroom if necessary
	9p/net: Fix zero-copy path in the 9p virtio transport
	spi: davinci: fix a NULL pointer dereference
	spi: pxa2xx: Add support for Intel Ice Lake
	spi: spi-fsl-dspi: Fix imprecise abort on VF500 during probe
	spi: cadence: Change usleep_range() to udelay(), for atomic context
	mmc: renesas_sdhi_internal_dmac: fix #define RST_RESERVED_BITS
	readahead: stricter check for bdi io_pages
	block: blk_init_allocated_queue() set q->fq as NULL in the fail case
	block: really disable runtime-pm for blk-mq
	drm/i915/userptr: reject zero user_size
	libertas: fix suspend and resume for SDIO connected cards
	media: Revert "[media] tvp5150: fix pad format frame height"
	mailbox: xgene-slimpro: Fix potential NULL pointer dereference
	Replace magic for trusting the secondary keyring with #define
	Fix kexec forbidding kernels signed with keys in the secondary keyring to boot
	powerpc/fadump: handle crash memory ranges array index overflow
	powerpc/pseries: Fix endianness while restoring of r3 in MCE handler.
	PCI: Add wrappers for dev_printk()
	powerpc/powernv/pci: Work around races in PCI bridge enabling
	cxl: Fix wrong comparison in cxl_adapter_context_get()
	ib_srpt: Fix a use-after-free in srpt_close_ch()
	RDMA/rxe: Set wqe->status correctly if an unexpected response is received
	9p: fix multiple NULL-pointer-dereferences
	fs/9p/xattr.c: catch the error of p9_client_clunk when setting xattr failed
	9p/virtio: fix off-by-one error in sg list bounds check
	net/9p/client.c: version pointer uninitialized
	net/9p/trans_fd.c: fix race-condition by flushing workqueue before the kfree()
	dm integrity: change 'suspending' variable from bool to int
	dm thin: stop no_space_timeout worker when switching to write-mode
	dm cache metadata: save in-core policy_hint_size to on-disk superblock
	dm cache metadata: set dirty on all cache blocks after a crash
	dm crypt: don't decrease device limits
	uart: fix race between uart_put_char() and uart_shutdown()
	Drivers: hv: vmbus: Reset the channel callback in vmbus_onoffer_rescind()
	iio: sca3000: Fix missing return in switch
	iio: ad9523: Fix displayed phase
	iio: ad9523: Fix return value for ad952x_store()
	extcon: Release locking when sending the notification of connector state
	vmw_balloon: fix inflation of 64-bit GFNs
	vmw_balloon: do not use 2MB without batching
	vmw_balloon: VMCI_DOORBELL_SET does not check status
	vmw_balloon: fix VMCI use when balloon built into kernel
	rtc: omap: fix potential crash on power off
	tracing: Do not call start/stop() functions when tracing_on does not change
	tracing/blktrace: Fix to allow setting same value
	printk/tracing: Do not trace printk_nmi_enter()
	livepatch: Validate module/old func name length
	uprobes: Use synchronize_rcu() not synchronize_sched()
	mfd: hi655x: Fix regmap area declared size for hi655x
	ovl: fix wrong use of impure dir cache in ovl_iterate()
	drivers/block/zram/zram_drv.c: fix bug storing backing_dev
	cpufreq: governor: Avoid accessing invalid governor_data
	PM / sleep: wakeup: Fix build error caused by missing SRCU support
	KVM: VMX: fixes for vmentry_l1d_flush module parameter
	KVM: PPC: Book3S: Fix guest DMA when guest partially backed by THP pages
	xtensa: limit offsets in __loop_cache_{all,page}
	xtensa: increase ranges in ___invalidate_{i,d}cache_all
	block, bfq: return nbytes and not zero from struct cftype .write() method
	pnfs/blocklayout: off by one in bl_map_stripe()
	NFSv4 client live hangs after live data migration recovery
	NFSv4: Fix locking in pnfs_generic_recover_commit_reqs
	NFSv4: Fix a sleep in atomic context in nfs4_callback_sequence()
	ARM: tegra: Fix Tegra30 Cardhu PCA954x reset
	mm/tlb: Remove tlb_remove_table() non-concurrent condition
	iommu/vt-d: Add definitions for PFSID
	iommu/vt-d: Fix dev iotlb pfsid use
	sys: don't hold uts_sem while accessing userspace memory
	userns: move user access out of the mutex
	ubifs: Fix memory leak in lprobs self-check
	Revert "UBIFS: Fix potential integer overflow in allocation"
	ubifs: Check data node size before truncate
	ubifs: xattr: Don't operate on deleted inodes
	ubifs: Fix synced_i_size calculation for xattr inodes
	pwm: tiehrpwm: Don't use emulation mode bits to control PWM output
	pwm: tiehrpwm: Fix disabling of output of PWMs
	fb: fix lost console when the user unplugs a USB adapter
	udlfb: set optimal write delay
	getxattr: use correct xattr length
	libnvdimm: fix ars_status output length calculation
	bcache: release dc->writeback_lock properly in bch_writeback_thread()
	cap_inode_getsecurity: use d_find_any_alias() instead of d_find_alias()
	perf auxtrace: Fix queue resize
	crypto: vmx - Fix sleep-in-atomic bugs
	crypto: caam - fix DMA mapping direction for RSA forms 2 & 3
	crypto: caam/jr - fix descriptor DMA unmapping
	crypto: caam/qi - fix error path in xts setkey
	fs/quota: Fix spectre gadget in do_quotactl
	arm64: mm: always enable CONFIG_HOLES_IN_ZONE
	Linux 4.14.69

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-09-10 09:24:54 +02:00
Greg Kroah-Hartman
fc59235394 This is the 4.14.69 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAluVXrMACgkQONu9yGCS
 aT5AyA//TMltTkpcS08FE8gUSgPT7ZjJdoeS0yUD7Sh8H0GV6MSn12QGgr8UWyUS
 t9a01U2erwz1Ua3I+CjBxLOBfw6c5on87C9nM4ruhV4zA/umFi+odBTnXPkc1fnM
 JtRgqlf5Gsy0Tp/CjcABot8P2RwyXOQBwGN544yU1GAq7WYbNg2o4YyuKd8W1epu
 lro06RCS4gsmguKaxYgFxwJFYvCbhGKlS3GDLz/v0XXMkaHIzbTdUduedA/7DiIc
 ZOAOaFXYLdbx2gTmodMuEWVOWUeReZnegAOQXswfjbqID0HxvNlYWCFrNAX9zDw0
 JLwX2hE4LC+ptBr8AwzBbz2yhm2smcSiGENohra9MyxyNrRrlVvFBqGIOHZGl5Dm
 +XPeVk1Prg/nubZ8K+1OMBMPGjrIfYESrl3JRSw3TOhF58jRSExoFSHQwKciAFbZ
 6huV41/eBRYBPXKiZPv01jluZc/u05n0gHZDz6tnJSBDKICUeoHoDq3oX78tjMvK
 3Qj+CZJS6DUczgz6azLx80Bnt/clEfCtQ/lC+h4SEdvnClPoOtUs7q4j74fxKG/8
 bkEVVOJMFtAXTpj7VcxHL1QMoYMMqNGmheWMhzHw3CsC2TTkuAdHfY5KF70ggjH7
 AN0a2BZCKj9KfsI5/IzytzfuzwMXfj6bZ9NWwKmLm37gzWLLxEg=
 =z4Ok
 -----END PGP SIGNATURE-----

Merge 4.14.69 into android-4.14

Changes in 4.14.69
	net: 6lowpan: fix reserved space for single frames
	net: mac802154: tx: expand tailroom if necessary
	9p/net: Fix zero-copy path in the 9p virtio transport
	spi: davinci: fix a NULL pointer dereference
	spi: pxa2xx: Add support for Intel Ice Lake
	spi: spi-fsl-dspi: Fix imprecise abort on VF500 during probe
	spi: cadence: Change usleep_range() to udelay(), for atomic context
	mmc: renesas_sdhi_internal_dmac: fix #define RST_RESERVED_BITS
	readahead: stricter check for bdi io_pages
	block: blk_init_allocated_queue() set q->fq as NULL in the fail case
	block: really disable runtime-pm for blk-mq
	drm/i915/userptr: reject zero user_size
	libertas: fix suspend and resume for SDIO connected cards
	media: Revert "[media] tvp5150: fix pad format frame height"
	mailbox: xgene-slimpro: Fix potential NULL pointer dereference
	Replace magic for trusting the secondary keyring with #define
	Fix kexec forbidding kernels signed with keys in the secondary keyring to boot
	powerpc/fadump: handle crash memory ranges array index overflow
	powerpc/pseries: Fix endianness while restoring of r3 in MCE handler.
	PCI: Add wrappers for dev_printk()
	powerpc/powernv/pci: Work around races in PCI bridge enabling
	cxl: Fix wrong comparison in cxl_adapter_context_get()
	ib_srpt: Fix a use-after-free in srpt_close_ch()
	RDMA/rxe: Set wqe->status correctly if an unexpected response is received
	9p: fix multiple NULL-pointer-dereferences
	fs/9p/xattr.c: catch the error of p9_client_clunk when setting xattr failed
	9p/virtio: fix off-by-one error in sg list bounds check
	net/9p/client.c: version pointer uninitialized
	net/9p/trans_fd.c: fix race-condition by flushing workqueue before the kfree()
	dm integrity: change 'suspending' variable from bool to int
	dm thin: stop no_space_timeout worker when switching to write-mode
	dm cache metadata: save in-core policy_hint_size to on-disk superblock
	dm cache metadata: set dirty on all cache blocks after a crash
	dm crypt: don't decrease device limits
	uart: fix race between uart_put_char() and uart_shutdown()
	Drivers: hv: vmbus: Reset the channel callback in vmbus_onoffer_rescind()
	iio: sca3000: Fix missing return in switch
	iio: ad9523: Fix displayed phase
	iio: ad9523: Fix return value for ad952x_store()
	extcon: Release locking when sending the notification of connector state
	vmw_balloon: fix inflation of 64-bit GFNs
	vmw_balloon: do not use 2MB without batching
	vmw_balloon: VMCI_DOORBELL_SET does not check status
	vmw_balloon: fix VMCI use when balloon built into kernel
	rtc: omap: fix potential crash on power off
	tracing: Do not call start/stop() functions when tracing_on does not change
	tracing/blktrace: Fix to allow setting same value
	printk/tracing: Do not trace printk_nmi_enter()
	livepatch: Validate module/old func name length
	uprobes: Use synchronize_rcu() not synchronize_sched()
	mfd: hi655x: Fix regmap area declared size for hi655x
	ovl: fix wrong use of impure dir cache in ovl_iterate()
	drivers/block/zram/zram_drv.c: fix bug storing backing_dev
	cpufreq: governor: Avoid accessing invalid governor_data
	PM / sleep: wakeup: Fix build error caused by missing SRCU support
	KVM: VMX: fixes for vmentry_l1d_flush module parameter
	KVM: PPC: Book3S: Fix guest DMA when guest partially backed by THP pages
	xtensa: limit offsets in __loop_cache_{all,page}
	xtensa: increase ranges in ___invalidate_{i,d}cache_all
	block, bfq: return nbytes and not zero from struct cftype .write() method
	pnfs/blocklayout: off by one in bl_map_stripe()
	NFSv4 client live hangs after live data migration recovery
	NFSv4: Fix locking in pnfs_generic_recover_commit_reqs
	NFSv4: Fix a sleep in atomic context in nfs4_callback_sequence()
	ARM: tegra: Fix Tegra30 Cardhu PCA954x reset
	mm/tlb: Remove tlb_remove_table() non-concurrent condition
	iommu/vt-d: Add definitions for PFSID
	iommu/vt-d: Fix dev iotlb pfsid use
	sys: don't hold uts_sem while accessing userspace memory
	userns: move user access out of the mutex
	ubifs: Fix memory leak in lprobs self-check
	Revert "UBIFS: Fix potential integer overflow in allocation"
	ubifs: Check data node size before truncate
	ubifs: xattr: Don't operate on deleted inodes
	ubifs: Fix synced_i_size calculation for xattr inodes
	pwm: tiehrpwm: Don't use emulation mode bits to control PWM output
	pwm: tiehrpwm: Fix disabling of output of PWMs
	fb: fix lost console when the user unplugs a USB adapter
	udlfb: set optimal write delay
	getxattr: use correct xattr length
	libnvdimm: fix ars_status output length calculation
	bcache: release dc->writeback_lock properly in bch_writeback_thread()
	cap_inode_getsecurity: use d_find_any_alias() instead of d_find_alias()
	perf auxtrace: Fix queue resize
	crypto: vmx - Fix sleep-in-atomic bugs
	crypto: caam - fix DMA mapping direction for RSA forms 2 & 3
	crypto: caam/jr - fix descriptor DMA unmapping
	crypto: caam/qi - fix error path in xts setkey
	fs/quota: Fix spectre gadget in do_quotactl
	arm64: mm: always enable CONFIG_HOLES_IN_ZONE
	Linux 4.14.69

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-09-10 09:21:07 +02:00
Richard Weinberger
63bbaa1469 ubifs: Fix synced_i_size calculation for xattr inodes
commit 59965593205fa4044850d35ee3557cf0b7edcd14 upstream.

In ubifs_jnl_update() we sync parent and child inodes to the flash,
in case of xattrs, the parent inode (AKA host inode) has a non-zero
data_len. Therefore we need to adjust synced_i_size too.

This issue was reported by ubifs self tests unter a xattr related work
load.
UBIFS error (ubi0:0 pid 1896): dbg_check_synced_i_size: ui_size is 4, synced_i_size is 0, but inode is clean
UBIFS error (ubi0:0 pid 1896): dbg_check_synced_i_size: i_ino 65, i_mode 0x81a4, i_size 4

Cc: <stable@vger.kernel.org>
Fixes: 1e51764a3c2a ("UBIFS: add new flash file system")
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-09 19:56:00 +02:00
Richard Weinberger
8a23348d76 ubifs: xattr: Don't operate on deleted inodes
commit 11a6fc3dc743e22fb50f2196ec55bee5140d3c52 upstream.

xattr operations can race with unlink and the following assert triggers:
UBIFS assert failed in ubifs_jnl_change_xattr at 1606 (pid 6256)

Fix this by checking i_nlink before working on the host inode.

Cc: <stable@vger.kernel.org>
Fixes: 1e51764a3c2a ("UBIFS: add new flash file system")
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-09 19:56:00 +02:00
Richard Weinberger
f6d7acc1d9 ubifs: Check data node size before truncate
commit 95a22d2084d72ea067d8323cc85677dba5d97cae upstream.

Check whether the size is within bounds before using it.
If the size is not correct, abort and dump the bad data node.

Cc: Kees Cook <keescook@chromium.org>
Cc: Silvio Cesare <silvio.cesare@gmail.com>
Cc: stable@vger.kernel.org
Fixes: 1e51764a3c2ac ("UBIFS: add new flash file system")
Reported-by: Silvio Cesare <silvio.cesare@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-09 19:56:00 +02:00
Richard Weinberger
3259dd7176 Revert "UBIFS: Fix potential integer overflow in allocation"
commit 08acbdd6fd736b90f8d725da5a0de4de2dd6de62 upstream.

This reverts commit 353748a359f1821ee934afc579cf04572406b420.
It bypassed the linux-mtd review process and fixes the issue not as it
should.

Cc: Kees Cook <keescook@chromium.org>
Cc: Silvio Cesare <silvio.cesare@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-09 19:56:00 +02:00
Richard Weinberger
a230db38a9 ubifs: Fix memory leak in lprobs self-check
commit eef19816ada3abd56d9f20c88794cc2fea83ebb2 upstream.

Allocate the buffer after we return early.
Otherwise memory is being leaked.

Cc: <stable@vger.kernel.org>
Fixes: 1e51764a3c2a ("UBIFS: add new flash file system")
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-09 19:56:00 +02:00
Jaegeuk Kim
73421a4345 Merge remote-tracking branch 'origin/upstream-f2fs-stable-linux-4.14.y' into android-4.14
Cherry-picked from origin/upstream-f2fs-stable-linux-4.14.y:

1bb3cca12624 treewide: Use array_size in f2fs_kvzalloc()
cf663a62b177 treewide: Use array_size() in f2fs_kzalloc()
eac699e689d5 treewide: Use array_size() in f2fs_kmalloc()
fc8ab902e92c overflow.h: Add allocation size calculation helpers
ccd39d96d179 f2fs: fix to clear FI_VOLATILE_FILE correctly
57344fb5931e f2fs: let sync node IO interrupt async one
6cf9490912e1 f2fs: don't change wbc->sync_mode
c4a1d7bb2799 f2fs: fix to update mtime correctly
b693f29b245e fs: f2fs: insert space around that ':' and ', '
9449a17f3306 fs: f2fs: add missing blank lines after declarations
b6f703cbed02 fs: f2fs: changed variable type of offset "unsigned" to "loff_t"
9919f98051f9 f2fs: clean up symbol namespace
1a37234c5ed7 f2fs: make set_de_type() static
57d24d20b77b f2fs: make __f2fs_write_data_pages() static
e269eadf64b6 f2fs: fix to avoid accessing cross the boundary
3e1842e7ca6c f2fs: fix to let caller retry allocating block address
b97a9b930802 disable loading f2fs module on PAGE_SIZE > 4KB
46df5fe2bad4 f2fs: fix error path of move_data_page
1b8f49aeb0e4 f2fs: don't drop dentry pages after fs shutdown
5dbd21b17b63 f2fs: fix to avoid race during access gc_thread pointer
b6f0cb185000 f2fs: clean up with clear_radix_tree_dirty_tag
b9272dd4161a f2fs: fix to don't trigger writeback during recovery
d46792d624ef f2fs: clear discard_wake earlier
161d1c91b80a f2fs: let discard thread wait a little longer if dev is busy
4329d61ca5df f2fs: avoid stucking GC due to atomic write
223d239c6d08 f2fs: introduce sbi->gc_mode to determine the policy
c5f57523fcd1 f2fs: keep migration IO order in LFS mode
4a4f98b7e161 f2fs: fix to wait page writeback during revoking atomic write
6c5d01ab37e7 f2fs: Fix deadlock in shutdown ioctl
1f315091b862 f2fs: detect synchronous writeback more earlier
c806c4187a0b mm: remove nr_pages argument from pagevec_lookup_{,range}_tag()
8aa71a329503 ceph: use pagevec_lookup_range_nr_tag()
b44cc9e860cf mm: add variant of pagevec_lookup_range_tag() taking number of pages
af44f89b900b mm: use pagevec_lookup_range_tag() in write_cache_pages()
a01f2023a837 mm: use pagevec_lookup_range_tag() in __filemap_fdatawait_range()
ed5739e31ed8 nilfs2: use pagevec_lookup_range_tag()
95954b0dbbbb gfs2: use pagevec_lookup_range_tag()
8d62b4b25b8a f2fs: use find_get_pages_tag() for looking up single page
53f38f268a9a f2fs: simplify page iteration loops
b0310cc6e6dd f2fs: use pagevec_lookup_range_tag()
e62fbfd6d4dd ext4: use pagevec_lookup_range_tag()
106221492410 ceph: use pagevec_lookup_range_tag()
4b65630c0da7 btrfs: use pagevec_lookup_range_tag()
8e8455a68cc2 mm: implement find_get_pages_range_tag()
a9a6eb48b7cf f2fs: clean up with is_valid_blkaddr()
992fa7bd773f f2fs: fix to initialize min_mtime with ULLONG_MAX
9af9ec1b6cf5 f2fs: fix to let checkpoint guarantee atomic page persistence
d5f8aab3aee8 f2fs: fix to initialize i_current_depth according to inode type
12dab4e61baf Revert "f2fs: add ovp valid_blocks check for bg gc victim to fg_gc"
34f089c52881 f2fs: don't drop any page on f2fs_cp_error() case
76dffc9986e3 f2fs: fix spelling mistake: "extenstion" -> "extension"
a5a897aabdbd f2fs: enhance sanity_check_raw_super() to avoid potential overflows
f0b5d76682cd f2fs: treat volatile file's data as hot one
50644840d860 f2fs: introduce release_discard_addr() for cleanup
39b292a40288 f2fs: fix potential overflow
76ddd4ff06b8 f2fs: rename dio_rwsem to i_gc_rwsem
c75638d5f569 f2fs: move mnt_want_write_file after range check
cc7e70c07023 f2fs: fix missing clear FI_NO_PREALLOC in some error case
c9b3f46fd20e f2fs: enforce fsync_mode=strict for renamed directory
cbbd81cf17fe f2fs: sanity check for total valid node blocks
bbd9c950fdec f2fs: sanity check on sit entry
d921ced41c40 f2fs: avoid bug_on on corrupted inode
32c00c538e51 f2fs: give message and set need_fsck given broken node id
568765d739df f2fs: clean up commit_inmem_pages()
ac2074b52e87 f2fs: do not check F2FS_INLINE_DOTS in recover
1f1473916089 f2fs: remove duplicated dquot_initialize and fix error handling
913efaeca9c6 f2fs: fix to detect failure of dquot_initialize
f60d3b8fcc92 f2fs: stop issue discard if something wrong with f2fs
4470ece5c075 f2fs: fix return value in f2fs_ioc_commit_atomic_write
318a9d5ae78c f2fs: allocate hot_data for atomic write more strictly
bd5f1c23a7d0 f2fs: check if inmem_pages list is empty correctly
2e405acc866a f2fs: fix race in between GC and atomic open
408e9720d894 f2fs: change le32 to le16 of f2fs_inode->i_extra_size
2f3cee5b22b4 f2fs: check cur_valid_map_mir & raw_sit block count when flush sit entries
8cd907eea55d f2fs: correct return value of f2fs_trim_fs
0be91d342a81 f2fs: fix to show missing bits in FS_IOC_GETFLAGS
dbfe915c2cf6 f2fs: remove unneeded F2FS_PROJINHERIT_FL
ee8586bbd61d f2fs: don't use GFP_ZERO for page caches
50332ac97dd0 f2fs: issue all big range discards in umount process
1c3ec702f06f f2fs: remove redundant block plug
694cd12fe9e4 f2fs: remove unmatched zero_user_segment when convert inline dentry
39c9aacbcdbf f2fs: introduce private inode status mapping
755a8a8a3bfc fscrypt: log the crypto algorithm implementations
e81950ade16d fscrypt: add Speck128/256 support
9637768c618d fscrypt: only derive the needed portion of the key
deba2007d2a1 fscrypt: separate key lookup from key derivation
04566cd68241 fscrypt: use a common logging function
2a95469530f3 fscrypt: remove internal key size constants
fc161f445010 fscrypt: remove unnecessary check for non-logon key type
ab8345a11caa fscrypt: make fscrypt_operations.max_namelen an integer
65702a6ef79b fscrypt: drop empty name check from fname_decrypt()
219e65410cae fscrypt: drop max_namelen check from fname_decrypt()
ef1def58e2fd fscrypt: don't special-case EOPNOTSUPP from fscrypt_get_encryption_info()
49ddcfcdd73a fscrypt: don't clear flags on crypto transform
ff8225b62ca0 fscrypt: remove stale comment from fscrypt_d_revalidate()
712401bc77ff fscrypt: remove error messages for skcipher_request_alloc() failure
6e4e39cc922c fscrypt: remove unnecessary NULL check when allocating skcipher
42b3feb2bd76 fscrypt: clean up after fscrypt_prepare_lookup() conversions
e43a072723f7 ubifs: switch to fscrypt_prepare_lookup()
f76b2cb6733b ext4: switch to fscrypt_prepare_lookup()
fc30ddc3b039 fscrypt: use unbound workqueue for decryption

Change-Id: I3912aa38b2bf515ef8af8ed4945e54bc63945c86
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2018-07-30 14:30:19 -07:00
Isaac J. Manjarres
44984fa144 Merge android-4.14.53 (57c2874) into msm-4.14
* remotes/origin/tmp-57c2874:
  Linux 4.14.53
  xhci: Fix use-after-free in xhci_free_virt_device
  dm thin: handle running out of data space vs concurrent discard
  dm zoned: avoid triggering reclaim from inside dmz_map()
  x86/efi: Fix efi_call_phys_epilog() with CONFIG_X86_5LEVEL=y
  block: Fix cloning of requests with a special payload
  block: Fix transfer when chunk sectors exceeds max
  slub: fix failure when we delete and create a slab cache
  ALSA: hda/realtek - Fix the problem of two front mics on more machines
  ALSA: hda/realtek - Add a quirk for FSC ESPRIMO U9210
  ALSA: hda/realtek - Fix pop noise on Lenovo P50 & co
  ALSA: timer: Fix UBSAN warning at SNDRV_TIMER_IOCTL_NEXT_DEVICE ioctl
  Input: elantech - fix V4 report decoding for module with middle key
  Input: elantech - enable middle button of touchpads on ThinkPad P52
  Input: elan_i2c_smbus - fix more potential stack buffer overflows
  Input: xpad - fix GPD Win 2 controller name
  udf: Detect incorrect directory size
  xen: Remove unnecessary BUG_ON from __unbind_from_irq()
  mm: fix devmem_is_allowed() for sub-page System RAM intersections
  mm/ksm.c: ignore STABLE_FLAG of rmap_item->address in rmap_walk_ksm()
  rbd: flush rbd_dev->watch_dwork after watch is unregistered
  pwm: lpss: platform: Save/restore the ctrl register over a suspend/resume
  Input: elan_i2c - add ELAN0618 (Lenovo v330 15IKB) ACPI ID
  ACPI / LPSS: Add missing prv_offset setting for byt/cht PWM devices
  video: uvesafb: Fix integer overflow in allocation
  NFSv4: Fix a typo in nfs41_sequence_process
  NFSv4: Revert commit 5f83d86cf531d ("NFSv4.x: Fix wraparound issues..")
  NFSv4: Fix possible 1-byte stack overflow in nfs_idmap_read_and_verify_message
  nfsd: restrict rd_maxcount to svc_max_payload in nfsd_encode_readdir
  media: dvb_frontend: fix locking issues at dvb_frontend_get_event()
  media: cx231xx: Add support for AverMedia DVD EZMaker 7
  media: v4l2-compat-ioctl32: prevent go past max size
  media: vsp1: Release buffers for each video node
  perf/x86/intel/uncore: Add event constraint for BDX PCU
  perf vendor events: Add Goldmont Plus V1 event file
  perf intel-pt: Fix packet decoding of CYC packets
  perf intel-pt: Fix "Unexpected indirect branch" error
  perf intel-pt: Fix MTC timing after overflow
  perf intel-pt: Fix decoding to accept CBR between FUP and corresponding TIP
  perf intel-pt: Fix sync_switch INTEL_PT_SS_NOT_TRACING
  perf tools: Fix symbol and object code resolution for vdso32 and vdsox32
  arm: dts: mt7623: fix invalid memory node being generated
  mfd: intel-lpss: Fix Intel Cannon Lake LPSS I2C input clock
  mfd: intel-lpss: Program REMAP register in PIO mode
  backlight: tps65217_bl: Fix Device Tree node lookup
  backlight: max8925_bl: Fix Device Tree node lookup
  backlight: as3711_bl: Fix Device Tree node lookup
  UBIFS: Fix potential integer overflow in allocation
  ubi: fastmap: Correctly handle interrupted erasures in EBA
  ubi: fastmap: Cancel work upon detach
  rpmsg: smd: do not use mananged resources for endpoints and channels
  md: fix two problems with setting the "re-add" device state.
  rtc: sun6i: Fix bit_idx value for clk_register_gate
  clk: at91: PLL recalc_rate() now using cached MUL and DIV values
  linvdimm, pmem: Preserve read-only setting for pmem devices
  scsi: zfcp: fix missing REC trigger trace on enqueue without ERP thread
  scsi: zfcp: fix missing REC trigger trace for all objects in ERP_FAILED
  scsi: zfcp: fix missing REC trigger trace on terminate_rport_io for ERP_FAILED
  scsi: zfcp: fix missing REC trigger trace on terminate_rport_io early return
  scsi: zfcp: fix misleading REC trigger trace where erp_action setup failed
  scsi: zfcp: fix missing SCSI trace for retry of abort / scsi_eh TMF
  scsi: zfcp: fix missing SCSI trace for result of eh_host_reset_handler
  scsi: qla2xxx: Mask off Scope bits in retry delay
  scsi: qla2xxx: Fix setting lower transfer speed if GPSC fails
  scsi: hpsa: disable device during shutdown
  mm: fix __gup_device_huge vs unmap
  iio: sca3000: Fix an error handling path in 'sca3000_probe()'
  iio: adc: ad7791: remove sample freq sysfs attributes
  Btrfs: fix return value on rename exchange failure
  X.509: unpack RSA signatureValue field from BIT STRING
  irqchip/gic-v3-its: Don't bind LPI to unavailable NUMA node
  time: Make sure jiffies_to_msecs() preserves non-zero time periods
  MIPS: io: Add barrier after register read in inX()
  cpufreq: intel_pstate: Fix scaling max/min limits with Turbo 3.0
  pinctrl: devicetree: Fix pctldev pointer overwrite
  pinctrl: samsung: Correct EINTG banks order
  auxdisplay: fix broken menu
  PCI: pciehp: Clear Presence Detect and Data Link Layer Status Changed on resume
  PCI: Add ACS quirk for Intel 300 series
  PCI: Add ACS quirk for Intel 7th & 8th Gen mobile
  PCI: hv: Make sure the bus domain is really unique
  MIPS: BCM47XX: Enable 74K Core ExternalSync for PCIe erratum
  mtd: cfi_cmdset_0002: Avoid walking all chips when unlocking.
  mtd: cfi_cmdset_0002: Fix unlocking requests crossing a chip boudary
  mtd: cfi_cmdset_0002: fix SEGV unlocking multiple chips
  mtd: cfi_cmdset_0002: Use right chip in do_ppb_xxlock()
  mtd: cfi_cmdset_0002: Change write buffer to check correct value
  xprtrdma: Return -ENOBUFS when no pages are available
  RDMA/mlx4: Discard unknown SQP work requests
  IB/hfi1: Fix user context tail allocation for DMA_RTAIL
  IB/hfi1: Optimize kthread pointer locking when queuing CQ entries
  IB/hfi1: Reorder incorrect send context disable
  IB/hfi1: Fix fault injection init/exit issues
  IB/isert: fix T10-pi check mask setting
  IB/isert: Fix for lib/dma_debug check_sync warning
  IB/mlx5: Fetch soft WQE's on fatal error state
  IB/core: Make testing MR flags for writability a static inline function
  IB/mlx4: Mark user MR as writable if actual virtual memory is writable
  IB/{hfi1, qib}: Add handling of kernel restart
  IB/qib: Fix DMA api warning with debug kernel
  tpm: fix race condition in tpm_common_write()
  tpm: fix use after free in tpm2_load_context()
  of: platform: stop accessing invalid dev in of_platform_device_destroy
  of: unittest: for strings, account for trailing \0 in property length field
  of: overlay: validate offset from property fixups
  ARM64: dts: meson: disable sd-uhs modes on the libretech-cc
  arm64: mm: Ensure writes to swapper are ordered wrt subsequent cache maintenance
  arm64: kpti: Use early_param for kpti= command-line option
  arm64: Fix syscall restarting around signal suppressed by tracer
  ARM: dts: socfpga: Fix NAND controller node compatible for Arria10
  ARM: dts: socfpga: Fix NAND controller clock supply
  ARM: dts: socfpga: Fix NAND controller node compatible
  ARM: dts: Fix SPI node for Arria10
  ARM: 8764/1: kgdb: fix NUMREGBYTES so that gdb_regs[] is the correct size
  cxl: Disable prefault_mode in Radix mode
  soc: rockchip: power-domain: Fix wrong value when power up pd with writemask
  powerpc/fadump: Unregister fadump on kexec down path.
  cpuidle: powernv: Fix promotion from snooze if next state disabled
  powerpc/powernv/cpuidle: Init all present cpus for deep states
  powerpc/powernv: copy/paste - Mask SO bit in CR
  powerpc/powernv/ioda2: Remove redundant free of TCE pages
  powerpc/ptrace: Fix enforcement of DAWR constraints
  powerpc/perf: Fix memory allocation for core-imc based on num_possible_cpus()
  powerpc/ptrace: Fix setting 512B aligned breakpoints with PTRACE_SET_DEBUGREG
  powerpc/mm/hash: Add missing isync prior to kernel stack SLB switch
  fuse: fix control dir setup and teardown
  fuse: don't keep dead fuse_conn at fuse_fill_super().
  fuse: atomic_o_trunc should truncate pagecache
  fuse: fix congested state leak on aborted connections
  printk: fix possible reuse of va_list variable
  Bluetooth: hci_qca: Avoid missing rampatch failure with userspace fw loader
  ipmi:bt: Set the timeout before doing a capabilities check
  branch-check: fix long->int truncation when profiling branches
  mips: ftrace: fix static function graph tracing
  ftrace/selftest: Have the reset_trigger code be a bit more careful
  lib/vsprintf: Remove atomic-unsafe support for %pCr
  clk: renesas: cpg-mssr: Stop using printk format %pCr
  thermal: bcm2835: Stop using printk format %pCr
  ASoC: cirrus: i2s: Fix {TX|RX}LinCtrlData setup
  ASoC: cirrus: i2s: Fix LRCLK configuration
  ASoC: cs35l35: Add use_single_rw to regmap config
  ASoC: dapm: delete dapm_kcontrol_data paths list before freeing it
  1wire: family module autoload fails because of upper/lower case mismatch.
  usb: do not reset if a low-speed or full-speed device timed out
  PM / OPP: Update voltage in case freq == old_freq
  PM / core: Fix supplier device runtime PM usage counter imbalance
  PM / Domains: Fix error path during attach in genpd
  signal/xtensa: Consistenly use SIGBUS in do_unaligned_user
  serial: sh-sci: Use spin_{try}lock_irqsave instead of open coding version
  m68k/mac: Fix SWIM memory resource end address
  m68k/mm: Adjust VM area to be unmapped by gap size for __iounmap()
  x86: Call fixup_exception() before notify_die() in math_error()
  x86/mce: Do not overwrite MCi_STATUS in mce_no_way_out()
  x86/mce: Fix incorrect "Machine check from unknown source" message
  x86/mce: Check for alternate indication of machine check recovery on Skylake
  x86/mce: Improve error message when kernel cannot recover
  x86/xen: Add call of speculative_store_bypass_ht_init() to PV paths
  x86/spectre_v1: Disable compiler optimizations over array_index_mask_nospec()
  FROMLIST: trace: Reorder display of TGID to be after PID

Change-Id: I2e5135127f9d81a39dc77bc84fa50c76ec0b58af
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2018-07-03 12:43:20 -07:00
Greg Kroah-Hartman
57c28741d0 This is the 4.14.53 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAls7QPEACgkQONu9yGCS
 aT5Zuw//UYR0Hahnjiv61N2NCo5cH+uSOc0XjR/a8iTBHVa5lN459dmrKVUDJKyS
 JrIJjwsaUL5H/VHN/XrdRUQMqo38osQ395t+sVCzVaouaJ0nYlEaxVexI0E87mpk
 zsd7qF0HfgGxOEEVfCcxlwKDzgstSNMP3KWprTZZ/5V04NjPlOXPsNOnKj6PWKTI
 4XCp7OrVQhL5zFQKm0kPok9CHrunjjYpF0pgftKblhdB/RPi0E/XbpLrW5hDxOvY
 MxnzKWKHsbEzV6PJKFNmEvFc4D3/Dm3mDG9aI7fL4FbnSBxkxKrzkAX8HP163Lc1
 cNiwhqo4v2IsfVvuJcV9+toVsg+UHcmPETd02hfhIBnN7lCo56+IBoo2FTsV9BRy
 AIWtwzpBj52j0gXTHhORYRhQqa6Jd/N7+9Aay40avWs8NI1tokOGfgifLoJlbXqE
 spfMZdK1ihiUNav2PmY7WklPlN4OeGGcMKvt0bJ4IY2nprI/oeKEUvAkwC5CVRo+
 w/Qvgp94vJDALWRA7e0dUR2cQMN0Y9ELLCy08KgdzRDTUY5f0xVw9Qz0Swx1Zxgk
 DwD+nxscEzr4n0wKtcLkkt2wu9sS/eUeAAHKFqNKRtHQvgqx0oymgow35pw4XHjt
 04sXUemWUXzR73T55HC960vWBrpu67HbNAyGqlCbiATX63euEDY=
 =YCfp
 -----END PGP SIGNATURE-----

Merge 4.14.53 into android-4.14

Changes in 4.14.53
	x86/spectre_v1: Disable compiler optimizations over array_index_mask_nospec()
	x86/xen: Add call of speculative_store_bypass_ht_init() to PV paths
	x86/mce: Improve error message when kernel cannot recover
	x86/mce: Check for alternate indication of machine check recovery on Skylake
	x86/mce: Fix incorrect "Machine check from unknown source" message
	x86/mce: Do not overwrite MCi_STATUS in mce_no_way_out()
	x86: Call fixup_exception() before notify_die() in math_error()
	m68k/mm: Adjust VM area to be unmapped by gap size for __iounmap()
	m68k/mac: Fix SWIM memory resource end address
	serial: sh-sci: Use spin_{try}lock_irqsave instead of open coding version
	signal/xtensa: Consistenly use SIGBUS in do_unaligned_user
	PM / Domains: Fix error path during attach in genpd
	PM / core: Fix supplier device runtime PM usage counter imbalance
	PM / OPP: Update voltage in case freq == old_freq
	usb: do not reset if a low-speed or full-speed device timed out
	1wire: family module autoload fails because of upper/lower case mismatch.
	ASoC: dapm: delete dapm_kcontrol_data paths list before freeing it
	ASoC: cs35l35: Add use_single_rw to regmap config
	ASoC: cirrus: i2s: Fix LRCLK configuration
	ASoC: cirrus: i2s: Fix {TX|RX}LinCtrlData setup
	thermal: bcm2835: Stop using printk format %pCr
	clk: renesas: cpg-mssr: Stop using printk format %pCr
	lib/vsprintf: Remove atomic-unsafe support for %pCr
	ftrace/selftest: Have the reset_trigger code be a bit more careful
	mips: ftrace: fix static function graph tracing
	branch-check: fix long->int truncation when profiling branches
	ipmi:bt: Set the timeout before doing a capabilities check
	Bluetooth: hci_qca: Avoid missing rampatch failure with userspace fw loader
	printk: fix possible reuse of va_list variable
	fuse: fix congested state leak on aborted connections
	fuse: atomic_o_trunc should truncate pagecache
	fuse: don't keep dead fuse_conn at fuse_fill_super().
	fuse: fix control dir setup and teardown
	powerpc/mm/hash: Add missing isync prior to kernel stack SLB switch
	powerpc/ptrace: Fix setting 512B aligned breakpoints with PTRACE_SET_DEBUGREG
	powerpc/perf: Fix memory allocation for core-imc based on num_possible_cpus()
	powerpc/ptrace: Fix enforcement of DAWR constraints
	powerpc/powernv/ioda2: Remove redundant free of TCE pages
	powerpc/powernv: copy/paste - Mask SO bit in CR
	powerpc/powernv/cpuidle: Init all present cpus for deep states
	cpuidle: powernv: Fix promotion from snooze if next state disabled
	powerpc/fadump: Unregister fadump on kexec down path.
	soc: rockchip: power-domain: Fix wrong value when power up pd with writemask
	cxl: Disable prefault_mode in Radix mode
	ARM: 8764/1: kgdb: fix NUMREGBYTES so that gdb_regs[] is the correct size
	ARM: dts: Fix SPI node for Arria10
	ARM: dts: socfpga: Fix NAND controller node compatible
	ARM: dts: socfpga: Fix NAND controller clock supply
	ARM: dts: socfpga: Fix NAND controller node compatible for Arria10
	arm64: Fix syscall restarting around signal suppressed by tracer
	arm64: kpti: Use early_param for kpti= command-line option
	arm64: mm: Ensure writes to swapper are ordered wrt subsequent cache maintenance
	ARM64: dts: meson: disable sd-uhs modes on the libretech-cc
	of: overlay: validate offset from property fixups
	of: unittest: for strings, account for trailing \0 in property length field
	of: platform: stop accessing invalid dev in of_platform_device_destroy
	tpm: fix use after free in tpm2_load_context()
	tpm: fix race condition in tpm_common_write()
	IB/qib: Fix DMA api warning with debug kernel
	IB/{hfi1, qib}: Add handling of kernel restart
	IB/mlx4: Mark user MR as writable if actual virtual memory is writable
	IB/core: Make testing MR flags for writability a static inline function
	IB/mlx5: Fetch soft WQE's on fatal error state
	IB/isert: Fix for lib/dma_debug check_sync warning
	IB/isert: fix T10-pi check mask setting
	IB/hfi1: Fix fault injection init/exit issues
	IB/hfi1: Reorder incorrect send context disable
	IB/hfi1: Optimize kthread pointer locking when queuing CQ entries
	IB/hfi1: Fix user context tail allocation for DMA_RTAIL
	RDMA/mlx4: Discard unknown SQP work requests
	xprtrdma: Return -ENOBUFS when no pages are available
	mtd: cfi_cmdset_0002: Change write buffer to check correct value
	mtd: cfi_cmdset_0002: Use right chip in do_ppb_xxlock()
	mtd: cfi_cmdset_0002: fix SEGV unlocking multiple chips
	mtd: cfi_cmdset_0002: Fix unlocking requests crossing a chip boudary
	mtd: cfi_cmdset_0002: Avoid walking all chips when unlocking.
	MIPS: BCM47XX: Enable 74K Core ExternalSync for PCIe erratum
	PCI: hv: Make sure the bus domain is really unique
	PCI: Add ACS quirk for Intel 7th & 8th Gen mobile
	PCI: Add ACS quirk for Intel 300 series
	PCI: pciehp: Clear Presence Detect and Data Link Layer Status Changed on resume
	auxdisplay: fix broken menu
	pinctrl: samsung: Correct EINTG banks order
	pinctrl: devicetree: Fix pctldev pointer overwrite
	cpufreq: intel_pstate: Fix scaling max/min limits with Turbo 3.0
	MIPS: io: Add barrier after register read in inX()
	time: Make sure jiffies_to_msecs() preserves non-zero time periods
	irqchip/gic-v3-its: Don't bind LPI to unavailable NUMA node
	X.509: unpack RSA signatureValue field from BIT STRING
	Btrfs: fix return value on rename exchange failure
	iio: adc: ad7791: remove sample freq sysfs attributes
	iio: sca3000: Fix an error handling path in 'sca3000_probe()'
	mm: fix __gup_device_huge vs unmap
	scsi: hpsa: disable device during shutdown
	scsi: qla2xxx: Fix setting lower transfer speed if GPSC fails
	scsi: qla2xxx: Mask off Scope bits in retry delay
	scsi: zfcp: fix missing SCSI trace for result of eh_host_reset_handler
	scsi: zfcp: fix missing SCSI trace for retry of abort / scsi_eh TMF
	scsi: zfcp: fix misleading REC trigger trace where erp_action setup failed
	scsi: zfcp: fix missing REC trigger trace on terminate_rport_io early return
	scsi: zfcp: fix missing REC trigger trace on terminate_rport_io for ERP_FAILED
	scsi: zfcp: fix missing REC trigger trace for all objects in ERP_FAILED
	scsi: zfcp: fix missing REC trigger trace on enqueue without ERP thread
	linvdimm, pmem: Preserve read-only setting for pmem devices
	clk: at91: PLL recalc_rate() now using cached MUL and DIV values
	rtc: sun6i: Fix bit_idx value for clk_register_gate
	md: fix two problems with setting the "re-add" device state.
	rpmsg: smd: do not use mananged resources for endpoints and channels
	ubi: fastmap: Cancel work upon detach
	ubi: fastmap: Correctly handle interrupted erasures in EBA
	UBIFS: Fix potential integer overflow in allocation
	backlight: as3711_bl: Fix Device Tree node lookup
	backlight: max8925_bl: Fix Device Tree node lookup
	backlight: tps65217_bl: Fix Device Tree node lookup
	mfd: intel-lpss: Program REMAP register in PIO mode
	mfd: intel-lpss: Fix Intel Cannon Lake LPSS I2C input clock
	arm: dts: mt7623: fix invalid memory node being generated
	perf tools: Fix symbol and object code resolution for vdso32 and vdsox32
	perf intel-pt: Fix sync_switch INTEL_PT_SS_NOT_TRACING
	perf intel-pt: Fix decoding to accept CBR between FUP and corresponding TIP
	perf intel-pt: Fix MTC timing after overflow
	perf intel-pt: Fix "Unexpected indirect branch" error
	perf intel-pt: Fix packet decoding of CYC packets
	perf vendor events: Add Goldmont Plus V1 event file
	perf/x86/intel/uncore: Add event constraint for BDX PCU
	media: vsp1: Release buffers for each video node
	media: v4l2-compat-ioctl32: prevent go past max size
	media: cx231xx: Add support for AverMedia DVD EZMaker 7
	media: dvb_frontend: fix locking issues at dvb_frontend_get_event()
	nfsd: restrict rd_maxcount to svc_max_payload in nfsd_encode_readdir
	NFSv4: Fix possible 1-byte stack overflow in nfs_idmap_read_and_verify_message
	NFSv4: Revert commit 5f83d86cf531d ("NFSv4.x: Fix wraparound issues..")
	NFSv4: Fix a typo in nfs41_sequence_process
	video: uvesafb: Fix integer overflow in allocation
	ACPI / LPSS: Add missing prv_offset setting for byt/cht PWM devices
	Input: elan_i2c - add ELAN0618 (Lenovo v330 15IKB) ACPI ID
	pwm: lpss: platform: Save/restore the ctrl register over a suspend/resume
	rbd: flush rbd_dev->watch_dwork after watch is unregistered
	mm/ksm.c: ignore STABLE_FLAG of rmap_item->address in rmap_walk_ksm()
	mm: fix devmem_is_allowed() for sub-page System RAM intersections
	xen: Remove unnecessary BUG_ON from __unbind_from_irq()
	udf: Detect incorrect directory size
	Input: xpad - fix GPD Win 2 controller name
	Input: elan_i2c_smbus - fix more potential stack buffer overflows
	Input: elantech - enable middle button of touchpads on ThinkPad P52
	Input: elantech - fix V4 report decoding for module with middle key
	ALSA: timer: Fix UBSAN warning at SNDRV_TIMER_IOCTL_NEXT_DEVICE ioctl
	ALSA: hda/realtek - Fix pop noise on Lenovo P50 & co
	ALSA: hda/realtek - Add a quirk for FSC ESPRIMO U9210
	ALSA: hda/realtek - Fix the problem of two front mics on more machines
	slub: fix failure when we delete and create a slab cache
	block: Fix transfer when chunk sectors exceeds max
	block: Fix cloning of requests with a special payload
	x86/efi: Fix efi_call_phys_epilog() with CONFIG_X86_5LEVEL=y
	dm zoned: avoid triggering reclaim from inside dmz_map()
	dm thin: handle running out of data space vs concurrent discard
	xhci: Fix use-after-free in xhci_free_virt_device
	Linux 4.14.53

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-07-03 18:26:32 +02:00
Silvio Cesare
b7261fc5f5 UBIFS: Fix potential integer overflow in allocation
commit 353748a359f1821ee934afc579cf04572406b420 upstream.

There is potential for the size and len fields in ubifs_data_node to be
too large causing either a negative value for the length fields or an
integer overflow leading to an incorrect memory allocation. Likewise,
when the len field is small, an integer underflow may occur.

Signed-off-by: Silvio Cesare <silvio.cesare@gmail.com>
Fixes: 1e51764a3c2ac ("UBIFS: add new flash file system")
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-03 11:24:59 +02:00
Eric Biggers
ab8345a11c fscrypt: make fscrypt_operations.max_namelen an integer
Now ->max_namelen() is only called to limit the filename length when
adding NUL padding, and only for real filenames -- not symlink targets.
It also didn't give the correct length for symlink targets anyway since
it forgot to subtract 'sizeof(struct fscrypt_symlink_data)'.

Thus, change ->max_namelen from a function to a simple 'unsigned int'
that gives the filesystem's maximum filename length.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-06-28 09:37:40 -07:00
Eric Biggers
e43a072723 ubifs: switch to fscrypt_prepare_lookup()
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
2018-06-28 09:37:40 -07:00
Stefan Agner
f1f847cb00 ubifs: remove unnecessary assignment
Assigning a value of a variable to itself is not useful. This
fixes a warning shown when using clang:
  warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign]

Change-Id: I24e6833421eee33734eb24aa80cb6c429e489f2e
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Richard Weinberger <richard@nod.at>
Git-commit: ae4c8081eb77bc82ac5ac8a7d55abea6f98e0209
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2018-06-01 03:52:58 -07:00
Greg Kroah-Hartman
bb60f28e48 This is the 4.14.37 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlrhlZ8ACgkQONu9yGCS
 aT6VhBAAkG3u95ECjzudalQDGkXvWoV7YDpBsAn+npc8NjNsiORZoEWZGofflbIm
 mnZdNvEpEJ2hDin53NBRwEicY3SAREU5ym9xvApg4YPjYDUN4ENqQZHBgvswq6cP
 BlOs7JNTDKSycrxbYyaamPQNr7QBV72/Y8nRcBlnrpVuSgjPNJWMTNs7Gie/mufu
 MyzX2vQ0Yz+KAZAD4y1bzQ37ByR1/u+4r/1Hq/lHdVXbmBkGHxQq+OgQvScmKmC3
 XpFv5J5NGUQHL5jGe7bCfrfhN7U84Codeur4bzJzqQ3O+RL2uu9eZDAkeSw3HbxG
 YHRqGo5yi1lR33sazA92mBDxbteLUX+pDGMZ8LkfHqmMXhTMFCVWnxmDxMiji5G1
 +xMjxXH4b5WOquyR+y7LoLvirkYNYJa2mkPDuSitgiTCVRh4o6aP5UziBLao9SRy
 Uke1983VluEowQu8QSNjAX4vZUm7j44UKWWQqpqgjKV4PUr8iilPsG9Z3AoRqRV+
 u8ZI2FqUGl7hG+XsfDIlc/0Qz72u/OluSkLnNAcSh5rAxHQIuDG2ELcGpwHm5yd9
 SBclUH9/cDlfOnlvZKPVAIDFhc23Ez4i+IWmObQ4VsIsrOq0WSzj+oYnWsqeNNw9
 NiDQwym4eGWGPs9+GMsKfVAmfpv1HjA0LM6/wNvzYaACU56Lp+o=
 =5URr
 -----END PGP SIGNATURE-----

Merge 4.14.37 into android-4.14

Changes in 4.14.37
	cifs: do not allow creating sockets except with SMB1 posix exensions
	btrfs: fix unaligned access in readdir
	x86/acpi: Prevent X2APIC id 0xffffffff from being accounted
	clocksource/imx-tpm: Correct -ETIME return condition check
	x86/tsc: Prevent 32bit truncation in calc_hpet_ref()
	drm/vc4: Fix memory leak during BO teardown
	drm/i915/gvt: throw error on unhandled vfio ioctls
	drm/i915/audio: Fix audio detection issue on GLK
	drm/i915: Do no use kfree() to free a kmem_cache_alloc() return value
	drm/i915: Fix LSPCON TMDS output buffer enabling from low-power state
	drm/i915/bxt, glk: Increase PCODE timeouts during CDCLK freq changing
	usb: musb: fix enumeration after resume
	usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers
	usb: musb: Fix external abort in musb_remove on omap2430
	firewire-ohci: work around oversized DMA reads on JMicron controllers
	x86/tsc: Allow TSC calibration without PIT
	NFSv4: always set NFS_LOCK_LOST when a lock is lost.
	ACPI / LPSS: Do not instiate platform_dev for devs without MMIO resources
	ALSA: hda - Use IS_REACHABLE() for dependency on input
	ASoC: au1x: Fix timeout tests in au1xac97c_ac97_read()
	kvm: x86: fix KVM_XEN_HVM_CONFIG ioctl
	RDMA/core: Clarify rdma_ah_find_type
	KVM: PPC: Book3S HV: Enable migration of decrementer register
	netfilter: ipv6: nf_defrag: Pass on packets to stack per RFC2460
	tracing/hrtimer: Fix tracing bugs by taking all clock bases and modes into account
	KVM: s390: use created_vcpus in more places
	platform/x86: dell-laptop: Filter out spurious keyboard backlight change events
	xprtrdma: Fix backchannel allocation of extra rpcrdma_reps
	selftest: ftrace: Fix to pick text symbols for kprobes
	PCI: Add function 1 DMA alias quirk for Marvell 9128
	Input: psmouse - fix Synaptics detection when protocol is disabled
	libbpf: Makefile set specified permission mode
	Input: synaptics - reset the ABS_X/Y fuzz after initializing MT axes
	i40iw: Free IEQ resources
	i40iw: Zero-out consumer key on allocate stag for FMR
	scsi: qla2xxx: Fix warning in qla2x00_async_iocb_timeout()
	perf unwind: Do not look just at the global callchain_param.record_mode
	tools lib traceevent: Simplify pointer print logic and fix %pF
	perf callchain: Fix attr.sample_max_stack setting
	tools lib traceevent: Fix get_field_str() for dynamic strings
	perf record: Fix failed memory allocation for get_cpuid_str
	iommu/exynos: Don't unconditionally steal bus ops
	powerpc: System reset avoid interleaving oops using die synchronisation
	iommu/vt-d: Use domain instead of cache fetching
	dm thin: fix documentation relative to low water mark threshold
	dm mpath: return DM_MAPIO_REQUEUE on blk-mq rq allocation failure
	blk-mq: turn WARN_ON in __blk_mq_run_hw_queue into printk
	ubifs: Fix uninitialized variable in search_dh_cookie()
	net: stmmac: dwmac-meson8b: fix setting the RGMII TX clock on Meson8b
	net: stmmac: dwmac-meson8b: propagate rate changes to the parent clock
	spi: a3700: Clear DATA_OUT when performing a read
	IB/cq: Don't force IB_POLL_DIRECT poll context for ib_process_cq_direct
	nfs: Do not convert nfs_idmap_cache_timeout to jiffies
	MIPS: Fix clean of vmlinuz.{32,ecoff,bin,srec}
	PCI: Add dummy pci_irqd_intx_xlate() for CONFIG_PCI=n build
	watchdog: sp5100_tco: Fix watchdog disable bit
	kconfig: Don't leak main menus during parsing
	kconfig: Fix automatic menu creation mem leak
	kconfig: Fix expr_free() E_NOT leak
	mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl()
	ipmi/powernv: Fix error return code in ipmi_powernv_probe()
	Btrfs: set plug for fsync
	btrfs: Fix out of bounds access in btrfs_search_slot
	Btrfs: fix scrub to repair raid6 corruption
	btrfs: fail mount when sb flag is not in BTRFS_SUPER_FLAG_SUPP
	Btrfs: fix unexpected EEXIST from btrfs_get_extent
	Btrfs: raid56: fix race between merge_bio and rbio_orig_end_io
	RDMA/cma: Check existence of netdevice during port validation
	f2fs: avoid hungtask when GC encrypted block if io_bits is set
	scsi: devinfo: fix format of the device list
	scsi: fas216: fix sense buffer initialization
	Input: stmfts - set IRQ_NOAUTOEN to the irq flag
	HID: roccat: prevent an out of bounds read in kovaplus_profile_activated()
	nfp: fix error return code in nfp_pci_probe()
	block: Set BIO_TRACE_COMPLETION on new bio during split
	bpf: test_maps: cleanup sockmaps when test ends
	i40evf: Don't schedule reset_task when device is being removed
	i40evf: ignore link up if not running
	platform/x86: thinkpad_acpi: suppress warning about palm detection
	KVM: s390: vsie: use READ_ONCE to access some SCB fields
	blk-mq-debugfs: don't allow write on attributes with seq_operations set
	ASoC: rockchip: Use dummy_dai for rt5514 dsp dailink
	igb: Allow to remove administratively set MAC on VFs
	igb: Clear TXSTMP when ptp_tx_work() is timeout
	fm10k: fix "failed to kill vid" message for VF
	x86/hyperv: Stop suppressing X86_FEATURE_PCID
	tty: serial: exar: Relocate sleep wake-up handling
	device property: Define type of PROPERTY_ENRTY_*() macros
	crypto: artpec6 - remove select on non-existing CRYPTO_SHA384
	RDMA/uverbs: Use an unambiguous errno for method not supported
	jffs2: Fix use-after-free bug in jffs2_iget()'s error handling path
	ixgbe: don't set RXDCTL.RLPML for 82599
	i40e: program fragmented IPv4 filter input set
	i40e: fix reported mask for ntuple filters
	samples/bpf: Partially fixes the bpf.o build
	powerpc/numa: Use ibm,max-associativity-domains to discover possible nodes
	powerpc/numa: Ensure nodes initialized for hotplug
	RDMA/mlx5: Avoid memory leak in case of XRCD dealloc failure
	ntb_transport: Fix bug with max_mw_size parameter
	gianfar: prevent integer wrapping in the rx handler
	x86/hyperv: Check for required priviliges in hyperv_init()
	netfilter: x_tables: fix pointer leaks to userspace
	tcp_nv: fix potential integer overflow in tcpnv_acked
	kvm: Map PFN-type memory regions as writable (if possible)
	x86/kvm/vmx: do not use vm-exit instruction length for fast MMIO when running nested
	fs/dax.c: release PMD lock even when there is no PMD support in DAX
	ocfs2: return -EROFS to mount.ocfs2 if inode block is invalid
	ocfs2/acl: use 'ip_xattr_sem' to protect getting extended attribute
	ocfs2: return error when we attempt to access a dirty bh in jbd2
	mm/mempolicy: fix the check of nodemask from user
	mm/mempolicy: add nodes_empty check in SYSC_migrate_pages
	asm-generic: provide generic_pmdp_establish()
	sparc64: update pmdp_invalidate() to return old pmd value
	mm: thp: use down_read_trylock() in khugepaged to avoid long block
	mm: pin address_space before dereferencing it while isolating an LRU page
	mm/fadvise: discard partial page if endbyte is also EOF
	openvswitch: Remove padding from packet before L3+ conntrack processing
	blk-mq: fix discard merge with scheduler attached
	IB/hfi1: Re-order IRQ cleanup to address driver cleanup race
	IB/hfi1: Fix for potential refcount leak in hfi1_open_file()
	IB/ipoib: Fix for potential no-carrier state
	IB/core: Map iWarp AH type to undefined in rdma_ah_find_type
	drm/nouveau/pmu/fuc: don't use movw directly anymore
	s390/eadm: fix CONFIG_BLOCK include dependency
	netfilter: ipv6: nf_defrag: Kill frag queue on RFC2460 failure
	x86/power: Fix swsusp_arch_resume prototype
	x86/dumpstack: Avoid uninitlized variable
	firmware: dmi_scan: Fix handling of empty DMI strings
	ACPI: processor_perflib: Do not send _PPC change notification if not ready
	ACPI / bus: Do not call _STA on battery devices with unmet dependencies
	ACPI / scan: Use acpi_bus_get_status() to initialize ACPI_TYPE_DEVICE devs
	bpf: fix selftests/bpf test_kmod.sh failure when CONFIG_BPF_JIT_ALWAYS_ON=y
	MIPS: TXx9: use IS_BUILTIN() for CONFIG_LEDS_CLASS
	perf record: Fix period option handling
	MIPS: Generic: Support GIC in EIC mode
	perf evsel: Fix period/freq terms setup
	xen-netfront: Fix race between device setup and open
	xen/grant-table: Use put_page instead of free_page
	bpf: sockmap, fix leaking maps with attached but not detached progs
	RDS: IB: Fix null pointer issue
	arm64: spinlock: Fix theoretical trylock() A-B-A with LSE atomics
	proc: fix /proc/*/map_files lookup
	PM / domains: Fix up domain-idle-states OF parsing
	cifs: silence compiler warnings showing up with gcc-8.0.0
	bcache: properly set task state in bch_writeback_thread()
	bcache: fix for allocator and register thread race
	bcache: fix for data collapse after re-attaching an attached device
	bcache: return attach error when no cache set exist
	cpufreq: intel_pstate: Enable HWP during system resume on CPU0
	selftests/ftrace: Add some missing glob checks
	rxrpc: Don't put crypto buffers on the stack
	svcrdma: Fix Read chunk round-up
	net: Extra '_get' in declaration of arch_get_platform_mac_address
	tools/libbpf: handle issues with bpf ELF objects containing .eh_frames
	KVM: PPC: Book3S HV: Fix handling of secondary HPTEG in HPT resizing code
	SUNRPC: Don't call __UDPX_INC_STATS() from a preemptible context
	net: stmmac: discard disabled flags in interrupt status register
	bpf: fix rlimit in reuseport net selftest
	ACPI / EC: Restore polling during noirq suspend/resume phases
	PM / wakeirq: Fix unbalanced IRQ enable for wakeirq
	vfs/proc/kcore, x86/mm/kcore: Fix SMAP fault when dumping vsyscall user page
	powerpc/mm/hash64: Zero PGD pages on allocation
	x86/platform/UV: Fix GAM Range Table entries less than 1GB
	locking/qspinlock: Ensure node->count is updated before initialising node
	powerpc/powernv: IMC fix out of bounds memory access at shutdown
	perf test: Fix test trace+probe_libc_inet_pton.sh for s390x
	irqchip/gic-v3: Ignore disabled ITS nodes
	cpumask: Make for_each_cpu_wrap() available on UP as well
	irqchip/gic-v3: Change pr_debug message to pr_devel
	RDMA/core: Reduce poll batch for direct cq polling
	alarmtimer: Init nanosleep alarm timer on stack
	netfilter: x_tables: cap allocations at 512 mbyte
	netfilter: x_tables: add counters allocation wrapper
	netfilter: compat: prepare xt_compat_init_offsets to return errors
	netfilter: compat: reject huge allocation requests
	netfilter: x_tables: limit allocation requests for blob rule heads
	perf: Fix sample_max_stack maximum check
	perf: Return proper values for user stack errors
	RDMA/mlx5: Fix NULL dereference while accessing XRC_TGT QPs
	Revert "KVM: X86: Fix SMRAM accessing even if VM is shutdown"
	mac80211_hwsim: fix use-after-free bug in hwsim_exit_net
	Linux 4.14.37

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-04-26 11:37:46 +02:00
Geert Uytterhoeven
2a71a742f0 ubifs: Fix uninitialized variable in search_dh_cookie()
[ Upstream commit c877154d307f4a91e0b5b85b75535713dab945ae ]

fs/ubifs/tnc.c: In function ‘search_dh_cookie’:
fs/ubifs/tnc.c:1893: warning: ‘err’ is used uninitialized in this function

Indeed, err is always used uninitialized.

According to an original review comment from Hyunchul, acknowledged by
Richard, err should be initialized to -ENOENT to avoid the first call to
tnc_next().  But we can achieve the same by reordering the code.

Fixes: 781f675e2d7e ("ubifs: Fix unlink code wrt. double hash lookups")
Reported-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-26 11:02:07 +02:00
Greg Kroah-Hartman
e9a2c5dd1a This is the 4.14.36 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlre3ogACgkQONu9yGCS
 aT4a8Q//aR1U1nYUiiMwMTgxvWXR5Hic3jtnAxdOkpr6UNa5dDa1tijI5U9poKJW
 65EPPQNW29PxIv0UGhLRzdjpL/ac2QhMyW8gmS8ikXMbFPF2JrgvOLSZpWF70cE1
 hyFkzbnvavJe0QfWsii7Z+RdrSZMgfZheZMmLh1exv1tEmuYcfAiletdC8f5kTPU
 /aS5X9rmJM/Fyw4iQF7NEpYPY4vESsgMd7ZfHifcV07ze6f+lkW+gcKZuVi//eJ1
 NJEvSBjSvqbQoHugHvHbV/UM2RwzFFfihm6y94WOurSbToksJ141P/MEBxc9vDae
 rCA8Qwq3YZ8vPu5rb8L1UHlpR+CIuanSJnijBhC2Lh6W4CmVA70+lvveqMbZGi/X
 Tm9+QlV4F32ogOy+rNvFARoNx7KkWvjZ8kF2a/qgbkqQgPCwSku4anW3abXLQad+
 4hYbqAwunq0V1Zi4XoIAjcQWlAokau4jDxfKbpoO7CBUYoia+1vDoK4U1FHsFy77
 E4w7LktCecfoqieoBzsD5mZfTG5qrzwNhoxnnZmRGZY81TW9swVZYPkfqamG/Cbk
 7HkgOLvtQiwtY5dxsLHvMwbtXzQqxO10KuLBAao6OY9xLEAqamV1v9gGO1WyOzRd
 avVUShDL6FQHTRalzcm8K9OLUhOZWDcZLR9XgNwfgxZYjAlfqCA=
 =Gbe3
 -----END PGP SIGNATURE-----

Merge 4.14.36 into android-4.14

Changes in 4.14.36
	tty: make n_tty_read() always abort if hangup is in progress
	cpufreq: CPPC: Use transition_delay_us depending transition_latency
	ubifs: Check ubifs_wbuf_sync() return code
	ubi: fastmap: Don't flush fastmap work on detach
	ubi: Fix error for write access
	ubi: Reject MLC NAND
	mm/ksm.c: fix inconsistent accounting of zero pages
	mm/hmm: fix header file if/else/endif maze
	mm/hmm: hmm_pfns_bad() was accessing wrong struct
	task_struct: only use anon struct under randstruct plugin
	fs/reiserfs/journal.c: add missing resierfs_warning() arg
	resource: fix integer overflow at reallocation
	ipc/shm: fix use-after-free of shm file via remap_file_pages()
	mm, slab: reschedule cache_reap() on the same CPU
	usb: musb: gadget: misplaced out of bounds check
	phy: allwinner: sun4i-usb: poll vbus changes on A23/A33 when driving VBUS
	usb: gadget: udc: core: update usb_ep_queue() documentation
	ARM64: dts: meson: reduce odroid-c2 eMMC maximum rate
	KVM: arm/arm64: vgic-its: Fix potential overrun in vgic_copy_lpi_list
	ARM: dts: da850-lego-ev3: Fix battery voltage gpio
	ARM: EXYNOS: Fix coupled CPU idle freeze on Exynos4210
	arm: dts: mt7623: fix USB initialization fails on bananapi-r2
	ARM: dts: at91: at91sam9g25: fix mux-mask pinctrl property
	ARM: dts: exynos: Fix IOMMU support for GScaler devices on Exynos5250
	ARM: dts: at91: sama5d4: fix pinctrl compatible string
	spi: atmel: init FIFOs before spi enable
	spi: Fix scatterlist elements size in spi_map_buf
	spi: Fix unregistration of controller with fixed SPI bus number
	media: atomisp_fops.c: disable atomisp_compat_ioctl32
	media: vivid: check if the cec_adapter is valid
	media: vsp1: Fix BRx conditional path in WPF
	x86/xen: Delay get_cpu_cap until stack canary is established
	xen-netfront: Fix hang on device removal
	regmap: Fix reversed bounds check in regmap_raw_write()
	ACPI / video: Add quirk to force acpi-video backlight on Samsung 670Z5E
	ACPI / hotplug / PCI: Check presence of slot itself in get_slot_status()
	USB: gadget: f_midi: fixing a possible double-free in f_midi
	USB:fix USB3 devices behind USB3 hubs not resuming at hibernate thaw
	usb: dwc3: prevent setting PRTCAP to OTG from debugfs
	usb: dwc3: pci: Properly cleanup resource
	usb: dwc3: gadget: never call ->complete() from ->ep_queue()
	cifs: fix memory leak in SMB2_open()
	fix smb3-encryption breakage when CONFIG_DEBUG_SG=y
	smb3: Fix root directory when server returns inode number of zero
	HID: i2c-hid: fix size check and type usage
	i2c: i801: Save register SMBSLVCMD value only once
	i2c: i801: Restore configuration at shutdown
	CIFS: refactor crypto shash/sdesc allocation&free
	CIFS: add sha512 secmech
	CIFS: fix sha512 check in cifs_crypto_secmech_release
	powerpc/powernv: Handle unknown OPAL errors in opal_nvram_write()
	powerpc/64s: Fix dt_cpu_ftrs to have restore_cpu clear unwanted LPCR bits
	powerpc/64: Call H_REGISTER_PROC_TBL when running as a HPT guest on POWER9
	powerpc/64: Fix smp_wmb barrier definition use use lwsync consistently
	powerpc/kprobes: Fix call trace due to incorrect preempt count
	powerpc/kexec_file: Fix error code when trying to load kdump kernel
	powerpc/powernv: define a standard delay for OPAL_BUSY type retry loops
	powerpc/powernv: Fix OPAL NVRAM driver OPAL_BUSY loops
	HID: Fix hid_report_len usage
	HID: core: Fix size as type u32
	soc: mediatek: fix the mistaken pointer accessed when subdomains are added
	ASoC: ssm2602: Replace reg_default_raw with reg_default
	ASoC: topology: Fix kcontrol name string handling
	thunderbolt: Wait a bit longer for ICM to authenticate the active NVM
	thunderbolt: Serialize PCIe tunnel creation with PCI rescan
	thunderbolt: Resume control channel after hibernation image is created
	thunderbolt: Prevent crash when ICM firmware is not running
	irqchip/gic: Take lock when updating irq type
	random: use a tighter cap in credit_entropy_bits_safe()
	extcon: intel-cht-wc: Set direction and drv flags for V5 boost GPIO
	block: use 32-bit blk_status_t on Alpha
	jbd2: if the journal is aborted then don't allow update of the log tail
	ext4: shutdown should not prevent get_write_access
	ext4: eliminate sleep from shutdown ioctl
	ext4: pass -ESHUTDOWN code to jbd2 layer
	ext4: don't update checksum of new initialized bitmaps
	ext4: protect i_disksize update by i_data_sem in direct write path
	ext4: limit xattr size to INT_MAX
	ext4: fail ext4_iget for root directory if unallocated
	ext4: always initialize the crc32c checksum driver
	ext4: don't allow r/w mounts if metadata blocks overlap the superblock
	ext4: move call to ext4_error() into ext4_xattr_check_block()
	ext4: add bounds checking to ext4_xattr_find_entry()
	ext4: add extra checks to ext4_xattr_block_get()
	dm crypt: limit the number of allocated pages
	RDMA/ucma: Don't allow setting RDMA_OPTION_IB_PATH without an RDMA device
	RDMA/mlx5: Protect from NULL pointer derefence
	RDMA/rxe: Fix an out-of-bounds read
	ALSA: pcm: Fix UAF at PCM release via PCM timer access
	IB/srp: Fix srp_abort()
	IB/srp: Fix completion vector assignment algorithm
	dmaengine: at_xdmac: fix rare residue corruption
	cxl: Fix possible deadlock when processing page faults from cxllib
	tpm: self test failure should not cause suspend to fail
	libnvdimm, dimm: fix dpa reservation vs uninitialized label area
	libnvdimm, namespace: use a safe lookup for dimm device name
	nfit, address-range-scrub: fix scrub in-progress reporting
	nfit: skip region registration for incomplete control regions
	ring-buffer: Check if memory is available before allocation
	um: Compile with modern headers
	um: Use POSIX ucontext_t instead of struct ucontext
	iommu/vt-d: Fix a potential memory leak
	mmc: jz4740: Fix race condition in IRQ mask update
	mmc: tmio: Fix error handling when issuing CMD23
	PCI: Mark Broadcom HT1100 and HT2000 Root Port Extended Tags as broken
	clk: mvebu: armada-38x: add support for missing clocks
	clk: fix false-positive Wmaybe-uninitialized warning
	clk: mediatek: fix PWM clock source by adding a fixed-factor clock
	clk: bcm2835: De-assert/assert PLL reset signal when appropriate
	pwm: rcar: Fix a condition to prevent mismatch value setting to duty
	thermal: imx: Fix race condition in imx_thermal_probe()
	dt-bindings: clock: mediatek: add binding for fixed-factor clock axisel_d4
	watchdog: f71808e_wdt: Fix WD_EN register read
	vfio/pci: Virtualize Maximum Read Request Size
	ALSA: pcm: Use ERESTARTSYS instead of EINTR in OSS emulation
	ALSA: pcm: Avoid potential races between OSS ioctls and read/write
	ALSA: pcm: Return -EBUSY for OSS ioctls changing busy streams
	ALSA: pcm: Fix mutex unbalance in OSS emulation ioctls
	ALSA: pcm: Fix endless loop for XRUN recovery in OSS emulation
	drm/amdgpu: Add an ATPX quirk for hybrid laptop
	drm/amdgpu: Fix always_valid bos multiple LRU insertions.
	drm/amdgpu/sdma: fix mask in emit_pipeline_sync
	drm/amdgpu: Fix PCIe lane width calculation
	drm/amdgpu/si: implement get/set pcie_lanes asic callback
	drm/rockchip: Clear all interrupts before requesting the IRQ
	drm/radeon: add PX quirk for Asus K73TK
	drm/radeon: Fix PCIe lane width calculation
	ALSA: line6: Use correct endpoint type for midi output
	ALSA: rawmidi: Fix missing input substream checks in compat ioctls
	ALSA: hda - New VIA controller suppor no-snoop path
	ALSA: hda/realtek - set PINCFG_HEADSET_MIC to parse_flags
	ALSA: hda/realtek - adjust the location of one mic
	random: fix crng_ready() test
	random: use a different mixing algorithm for add_device_randomness()
	random: crng_reseed() should lock the crng instance that it is modifying
	random: add new ioctl RNDRESEEDCRNG
	HID: input: fix battery level reporting on BT mice
	HID: hidraw: Fix crash on HIDIOCGFEATURE with a destroyed device
	HID: wacom: bluetooth: send exit report for recent Bluetooth devices
	MIPS: uaccess: Add micromips clobbers to bzero invocation
	MIPS: memset.S: EVA & fault support for small_memset
	MIPS: memset.S: Fix return of __clear_user from Lpartial_fixup
	MIPS: memset.S: Fix clobber of v1 in last_fixup
	powerpc/eeh: Fix enabling bridge MMIO windows
	powerpc/xive: Fix trying to "push" an already active pool VP
	powerpc/lib: Fix off-by-one in alternate feature patching
	udf: Fix leak of UTF-16 surrogates into encoded strings
	fanotify: fix logic of events on child
	mmc: sdhci-pci: Only do AMD tuning for HS200
	drm/i915: Correctly handle limited range YCbCr data on VLV/CHV
	jffs2_kill_sb(): deal with failed allocations
	hypfs_kill_super(): deal with failed allocations
	orangefs_kill_sb(): deal with allocation failures
	rpc_pipefs: fix double-dput()
	Don't leak MNT_INTERNAL away from internal mounts
	autofs: mount point create should honour passed in mode
	mm/filemap.c: fix NULL pointer in page_cache_tree_insert()
	net: dsa: Discard frames from unused ports
	iwlwifi: add shared clock PHY config flag for some devices
	iwlwifi: add a bunch of new 9000 PCI IDs
	Revert "media: lirc_zilog: driver only sends LIRCCODE"
	media: staging: lirc_zilog: incorrect reference counting
	writeback: safer lock nesting
	Linux 4.14.36

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-04-24 11:28:33 +02:00
Richard Weinberger
09844df060 ubifs: Check ubifs_wbuf_sync() return code
commit aac17948a7ce01fb60b9ee6cf902967a47b3ce26 upstream.

If ubifs_wbuf_sync() fails we must not write a master node with the
dirty marker cleared.
Otherwise it is possible that in case of an IO error while syncing we
mark the filesystem as clean and UBIFS refuses to recover upon next
mount.

Cc: <stable@vger.kernel.org>
Fixes: 1e51764a3c2a ("UBIFS: add new flash file system")
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-24 09:36:21 +02:00