558 Commits

Author SHA1 Message Date
Joel Fernandes (Google)
f5a14bafbf rcu: Add support for consolidated-RCU reader checking
This commit adds RCU-reader checks to list_for_each_entry_rcu() and
hlist_for_each_entry_rcu().  These checks are optional, and are indicated
by a lockdep expression passed to a new optional argument to these two
macros.  If this optional lockdep expression is omitted, these two macros
act as before, checking for an RCU read-side critical section.

[huexxx@gmail.com: adapt]
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
[ paulmck: Update to eliminate return within macro and update comment. ]
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
2025-12-21 17:55:54 +01:00
Michael Bestas
87cf1c2fc1 Merge remote-tracking branch 'common/android-4.9-q' into android-msm-pixel-4.9
* common/android-4.9-q:
  Linux 4.9.321
  swiotlb: skip swiotlb_bounce when orig_addr is zero
  kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add]
  fdt: Update CRC check for rng-seed
  xen: unexport __init-annotated xen_xlate_map_ballooned_pages()
  drm: remove drm_fb_helper_modinit
  powerpc/pseries: wire up rng during setup_arch()
  modpost: fix section mismatch check for exported init/exit sections
  ARM: cns3xxx: Fix refcount leak in cns3xxx_init
  ARM: Fix refcount leak in axxia_boot_secondary
  ARM: exynos: Fix refcount leak in exynos_map_pmu
  ARM: dts: imx6qdl: correct PU regulator ramp delay
  powerpc: Enable execve syscall exit tracepoint
  xtensa: Fix refcount leak bug in time.c
  xtensa: xtfpga: Fix refcount leak bug in setup
  iio: trigger: sysfs: fix use-after-free on remove
  iio: accel: mma8452: ignore the return value of reset operation
  iio:accel:bma180: rearrange iio trigger get and register
  usb: chipidea: udc: check request status before setting device address
  iio: adc: vf610: fix conversion mode sysfs node name
  igb: Make DMA faster when CPU is active on the PCIe link
  MIPS: Remove repetitive increase irq_err_count
  x86/xen: Remove undefined behavior in setup_features()
  bonding: ARP monitor spams NETDEV_NOTIFY_PEERS notifiers
  USB: serial: option: add Telit LE910Cx 0x1250 composition
  random: quiet urandom warning ratelimit suppression message
  dm era: commit metadata in postsuspend after worker stops
  ata: libata: add qc->flags in ata_qc_complete_template tracepoint
  random: schedule mix_interrupt_randomness() less often
  vt: drop old FONT ioctls
  BACKPORT: l2tp: fix race in pppol2tp_release with session object destroy
  BACKPORT: l2tp: don't use inet_shutdown on ppp session destroy
  Linux 4.9.320
  tcp: drop the hash_32() part from the index calculation
  tcp: increase source port perturb table to 2^16
  tcp: dynamically allocate the perturb table used by source ports
  tcp: add small random increments to the source port
  tcp: use different parts of the port_offset for index and offset
  secure_seq: use the 64 bits of the siphash for port offset calculation
  tcp: add some entropy in __inet_hash_connect()
  tcp: change source port randomizarion at connect() time
  fuse: fix pipe buffer lifetime for direct_io
  Reinstate some of "swiotlb: rework "fix info leak with DMA_FROM_DEVICE""
  swiotlb: fix info leak with DMA_FROM_DEVICE
  xprtrdma: fix incorrect header size calculations
  s390/mm: use non-quiescing sske for KVM switch to keyed guest
  l2tp: fix race in pppol2tp_release with session object destroy
  l2tp: don't use inet_shutdown on ppp session destroy
  ext4: add reserved GDT blocks check
  ext4: make variable "count" signed
  ext4: fix bug_on ext4_mb_use_inode_pa
  serial: 8250: Store to lsr_save_flags after lsr read
  usb: gadget: lpc32xx_udc: Fix refcount leak in lpc32xx_udc_probe
  USB: serial: io_ti: add Agilent E5805A support
  USB: serial: option: add support for Cinterion MV31 with new baseline
  comedi: vmk80xx: fix expression for tx buffer size
  irqchip/gic-v3: Iterate over possible CPUs by for_each_possible_cpu()
  irqchip/gic/realview: Fix refcount leak in realview_gic_of_init
  misc: atmel-ssc: Fix IRQ check in ssc_probe
  pNFS: Don't keep retrying if the server replied NFS4ERR_LAYOUTUNAVAILABLE
  random: credit cpu and bootloader seeds by default
  net: ethernet: mtk_eth_soc: fix misuse of mem alloc interface netdev[napi]_alloc_frag
  ipv6: Fix signed integer overflow in l2tp_ip6_sendmsg
  nfc: nfcmrvl: Fix memory leak in nfcmrvl_play_deferred
  virtio-mmio: fix missing put_device() when vm_cmdline_parent registration failed
  scsi: lpfc: Fix port stuck in bypassed state after LIP in PT2PT topology
  scsi: vmw_pvscsi: Expand vcpuHint to 16 bits
  ASoC: wm8962: Fix suspend while playing music
  ata: libata-core: fix NULL pointer deref in ata_host_alloc_pinfo()
  ASoC: cs42l56: Correct typo in minimum level for SX volume controls
  ASoC: cs42l52: Correct TLV for Bypass Volume
  ASoC: cs53l30: Correct number of volume levels on SX controls
  ASoC: cs42l52: Fix TLV scales for mixer controls
  random: account for arch randomness in bits
  random: mark bootloader randomness code as __init
  random: avoid checking crng_ready() twice in random_init()
  crypto: drbg - make reseeding from get_random_bytes() synchronous
  crypto: drbg - always try to free Jitter RNG instance
  crypto: drbg - move dynamic ->reseed_threshold adjustments to __drbg_seed()
  crypto: drbg - track whether DRBG was seeded with !rng_is_initialized()
  crypto: drbg - prepare for more fine-grained tracking of seeding state
  crypto: drbg - always seeded with SP800-90B compliant noise source
  crypto: drbg - add FIPS 140-2 CTRNG for noise source
  Revert "random: use static branch for crng_ready()"
  random: check for signals after page of pool writes
  random: wire up fops->splice_{read,write}_iter()
  random: convert to using fops->write_iter()
  random: move randomize_page() into mm where it belongs
  random: move initialization functions out of hot pages
  random: use proper return types on get_random_{int,long}_wait()
  random: remove extern from functions in header
  random: use static branch for crng_ready()
  random: credit architectural init the exact amount
  random: handle latent entropy and command line from random_init()
  random: use proper jiffies comparison macro
  random: remove ratelimiting for in-kernel unseeded randomness
  random: avoid initializing twice in credit race
  random: use symbolic constants for crng_init states
  siphash: use one source of truth for siphash permutations
  random: help compiler out with fast_mix() by using simpler arguments
  random: do not use input pool from hard IRQs
  random: order timer entropy functions below interrupt functions
  random: do not pretend to handle premature next security model
  random: do not use batches when !crng_ready()
  random: insist on random_get_entropy() existing in order to simplify
  uapi: rename ext2_swab() to swab() and share globally in swab.h
  xtensa: use fallback for random_get_entropy() instead of zero
  sparc: use fallback for random_get_entropy() instead of zero
  um: use fallback for random_get_entropy() instead of zero
  x86/tsc: Use fallback for random_get_entropy() instead of zero
  nios2: use fallback for random_get_entropy() instead of zero
  arm: use fallback for random_get_entropy() instead of zero
  mips: use fallback for random_get_entropy() instead of just c0 random
  m68k: use fallback for random_get_entropy() instead of zero
  timekeeping: Add raw clock fallback for random_get_entropy()
  powerpc: define get_cycles macro for arch-override
  alpha: define get_cycles macro for arch-override
  parisc: define get_cycles macro for arch-override
  s390: define get_cycles macro for arch-override
  ia64: define get_cycles macro for arch-override
  init: call time_init() before rand_initialize()
  random: fix sysctl documentation nits
  random: document crng_fast_key_erasure() destination possibility
  random: make random_get_entropy() return an unsigned long
  random: check for signals every PAGE_SIZE chunk of /dev/[u]random
  random: check for signal_pending() outside of need_resched() check
  random: do not allow user to keep crng key around on stack
  random: do not split fast init input in add_hwgenerator_randomness()
  random: mix build-time latent entropy into pool at init
  random: re-add removed comment about get_random_{u32,u64} reseeding
  random: treat bootloader trust toggle the same way as cpu trust toggle
  random: skip fast_init if hwrng provides large chunk of entropy
  random: check for signal and try earlier when generating entropy
  random: reseed more often immediately after booting
  random: make consistent usage of crng_ready()
  random: use SipHash as interrupt entropy accumulator
  random: replace custom notifier chain with standard one
  random: don't let 644 read-only sysctls be written to
  random: give sysctl_random_min_urandom_seed a more sensible value
  random: do crng pre-init loading in worker rather than irq
  random: unify cycles_t and jiffies usage and types
  random: cleanup UUID handling
  random: only wake up writers after zap if threshold was passed
  random: round-robin registers as ulong, not u32
  random: clear fast pool, crng, and batches in cpuhp bring up
  random: pull add_hwgenerator_randomness() declaration into random.h
  hwrng: remember rng chosen by user
  hwrng: use rng source with best quality
  hwrng: core - remove unused PFX macro
  hwrng: core - Move hwrng miscdev minor number to include/linux/miscdevice.h
  hwrng: core - Rewrite the header
  hwrng: core - rewrite better comparison to NULL
  hwrng: core - do not use multiple blank lines
  random: check for crng_init == 0 in add_device_randomness()
  random: unify early init crng load accounting
  random: do not take pool spinlock at boot
  random: defer fast pool mixing to worker
  workqueue: make workqueue available early during boot
  random: rewrite header introductory comment
  random: group sysctl functions
  random: group userspace read/write functions
  random: group entropy collection functions
  random: group entropy extraction functions
  random: group initialization wait functions
  random: remove whitespace and reorder includes
  random: remove useless header comment
  random: introduce drain_entropy() helper to declutter crng_reseed()
  random: deobfuscate irq u32/u64 contributions
  random: add proper SPDX header
  random: remove unused tracepoints
  random: remove ifdef'd out interrupt bench
  random: tie batched entropy generation to base_crng generation
  random: zero buffer after reading entropy from userspace
  random: remove outdated INT_MAX >> 6 check in urandom_read()
  random: use hash function for crng_slow_load()
  random: absorb fast pool into input pool after fast load
  random: do not xor RDRAND when writing into /dev/random
  random: ensure early RDSEED goes through mixer on init
  random: inline leaves of rand_initialize()
  random: use RDSEED instead of RDRAND in entropy extraction
  random: fix locking in crng_fast_load()
  random: remove batched entropy locking
  random: remove use_input_pool parameter from crng_reseed()
  random: make credit_entropy_bits() always safe
  random: always wake up entropy writers after extraction
  random: use linear min-entropy accumulation crediting
  random: simplify entropy debiting
  random: use computational hash for entropy extraction
  random: only call crng_finalize_init() for primary_crng
  random: access primary_pool directly rather than through pointer
  random: continually use hwgenerator randomness
  random: simplify arithmetic function flow in account()
  random: access input_pool_data directly rather than through pointer
  random: cleanup fractional entropy shift constants
  random: prepend remaining pool constants with POOL_
  random: de-duplicate INPUT_POOL constants
  random: remove unused OUTPUT_POOL constants
  random: rather than entropy_store abstraction, use global
  random: try to actively add entropy rather than passively wait for it
  random: remove unused extract_entropy() reserved argument
  random: remove incomplete last_data logic
  random: cleanup integer types
  crypto: chacha20 - Fix chacha20_block() keystream alignment (again)
  random: cleanup poolinfo abstraction
  random: fix typo in comments
  random: don't reset crng_init_cnt on urandom_read()
  random: avoid superfluous call to RDRAND in CRNG extraction
  random: early initialization of ChaCha constants
  random: initialize ChaCha20 constants with correct endianness
  random: use IS_ENABLED(CONFIG_NUMA) instead of ifdefs
  random: harmonize "crng init done" messages
  random: mix bootloader randomness into pool
  random: do not re-init if crng_reseed completes before primary init
  random: do not sign extend bytes for rotation when mixing
  random: use BLAKE2s instead of SHA1 in extraction
  random: remove unused irq_flags argument from add_interrupt_randomness()
  random: document add_hwgenerator_randomness() with other input functions
  crypto: blake2s - adjust include guard naming
  crypto: blake2s - include <linux/bug.h> instead of <asm/bug.h>
  MAINTAINERS: co-maintain random.c
  random: remove dead code left over from blocking pool
  random: avoid arch_get_random_seed_long() when collecting IRQ randomness
  random: add arch_get_random_*long_early()
  powerpc: Use bool in archrandom.h
  linux/random.h: Mark CONFIG_ARCH_RANDOM functions __must_check
  linux/random.h: Use false with bool
  linux/random.h: Remove arch_has_random, arch_has_random_seed
  powerpc: Remove arch_has_random, arch_has_random_seed
  x86: Remove arch_has_random, arch_has_random_seed
  random: avoid warnings for !CONFIG_NUMA builds
  random: split primary/secondary crng init paths
  random: remove some dead code of poolinfo
  random: fix typo in add_timer_randomness()
  random: Add and use pr_fmt()
  random: convert to ENTROPY_BITS for better code readability
  random: remove unnecessary unlikely()
  random: remove kernel.random.read_wakeup_threshold
  random: delete code to pull data into pools
  random: remove the blocking pool
  random: fix crash on multiple early calls to add_bootloader_randomness()
  random: make /dev/random be almost like /dev/urandom
  random: ignore GRND_RANDOM in getentropy(2)
  random: add GRND_INSECURE to return best-effort non-cryptographic bytes
  random: Add a urandom_read_nowait() for random APIs that don't warn
  random: Don't wake crng_init_wait when crng_init == 1
  lib/crypto: sha1: re-roll loops to reduce code size
  lib/crypto: blake2s: move hmac construction into wireguard
  crypto: blake2s - generic C library implementation and selftest
  crypto: Deduplicate le32_to_cpu_array() and cpu_to_le32_array()
  Revert "hwrng: core - Freeze khwrng thread during suspend"
  char/random: Add a newline at the end of the file
  random: Use wait_event_freezable() in add_hwgenerator_randomness()
  fdt: add support for rng-seed
  random: Support freezable kthreads in add_hwgenerator_randomness()
  random: fix soft lockup when trying to read from an uninitialized blocking pool
  latent_entropy: avoid build error when plugin cflags are not set
  random: document get_random_int() family
  random: move rand_initialize() earlier
  random: only read from /dev/random after its pool has received 128 bits
  drivers/char/random.c: make primary_crng static
  drivers/char/random.c: remove unused stuct poolinfo::poolbits
  drivers/char/random.c: constify poolinfo_table
  random: make CPU trust a boot parameter
  random: Make crng state queryable
  random: remove preempt disabled region
  random: add a config option to trust the CPU's hwrng
  random: Return nbytes filled from hw RNG
  random: Fix whitespace pre random-bytes work
  drivers/char/random.c: remove unused dont_count_entropy
  random: optimize add_interrupt_randomness
  random: always fill buffer in get_random_bytes_wait
  crypto: chacha20 - Fix keystream alignment for chacha20_block()
  random: fix data race on crng_node_pool
  random: always use batched entropy for get_random_u{32,64}
  Revert "char/random: silence a lockdep splat with printk()"
  char/random: silence a lockdep splat with printk()
  random: add a spinlock_t to struct batched_entropy
  random: rate limit unseeded randomness warnings
  random: fix possible sleeping allocation from irq context
  random: set up the NUMA crng instances after the CRNG is fully initialized
  random: use a different mixing algorithm for add_device_randomness()
  random: fix warning message on ia64 and parisc
  random: reorder READ_ONCE() in get_random_uXX
  random: suppress spammy warnings about unseeded randomness
  random: do not ignore early device randomness
  random: warn when kernel uses unseeded randomness
  random: add get_random_{bytes,u32,u64,int,long,once}_wait family
  random: add wait_for_random_bytes() API
  random: silence compiler warnings and fix race
  random: invalidate batched entropy after crng init
  random: move random_min_urandom_seed into CONFIG_SYSCTL ifdef block
  random: convert get_random_int/long into get_random_u32/u64
  random: fix comment for unused random_min_urandom_seed
  random: remove variable limit
  random: remove stale urandom_init_wait
  random: remove stale maybe_reseed_primary_crng
  9p: missing chunk of "fs/9p: Don't update file type when updating file attributes"
  Linux 4.9.319
  x86/speculation/mmio: Print SMT warning
  KVM: x86/speculation: Disable Fill buffer clear within guests
  x86/speculation/mmio: Reuse SRBDS mitigation for SBDS
  x86/speculation/srbds: Update SRBDS mitigation selection
  x86/speculation/mmio: Add sysfs reporting for Processor MMIO Stale Data
  x86/speculation/mmio: Enable CPU Fill buffer clearing on idle
  x86/bugs: Group MDS, TAA & Processor MMIO Stale Data mitigations
  x86/speculation/mmio: Add mitigation for Processor MMIO Stale Data
  x86/speculation: Add a common function for MD_CLEAR mitigation update
  x86/speculation/mmio: Enumerate Processor MMIO Stale Data bug
  Documentation: Add documentation for Processor MMIO Stale Data
  x86/cpu: Add another Alder Lake CPU to the Intel family
  x86/cpu: Add Lakefield, Alder Lake and Rocket Lake models to the to Intel CPU family
  x86/cpu: Add Comet Lake to the Intel CPU models header
  x86/CPU: Add more Icelake model numbers
  x86/CPU: Add Icelake model number
  x86/cpu: Add Cannonlake to Intel family
  x86/cpu: Add Jasper Lake to Intel family
  cpu/speculation: Add prototype for cpu_show_srbds()
  x86/cpu: Add Elkhart Lake to Intel family
  ANDROID: arch: fix backported syscall numbers
  Linux 4.9.318
  tcp: fix tcp_mtup_probe_success vs wrong snd_cwnd
  PCI: qcom: Fix unbalanced PHY init on probe errors
  mtd: cfi_cmdset_0002: Use chip_ready() for write on S29GL064N
  mtd: cfi_cmdset_0002: Move and rename chip_check/chip_ready/chip_good_for_write
  powerpc/32: Fix overread/overwrite of thread_struct via ptrace
  Input: bcm5974 - set missing URB_NO_TRANSFER_DMA_MAP urb flag
  nfc: st21nfca: fix memory leaks in EVT_TRANSACTION handling
  nfc: st21nfca: fix incorrect validating logic in EVT_TRANSACTION
  ata: libata-transport: fix {dma|pio|xfer}_mode sysfs files
  cifs: return errors during session setup during reconnects
  ALSA: hda/conexant - Fix loopback issue with CX20632
  vringh: Fix loop descriptors check in the indirect cases
  nodemask: Fix return values to be unsigned
  modpost: fix undefined behavior of is_arm_mapping_symbol()
  drm/radeon: fix a possible null pointer dereference
  Revert "net: af_key: add check for pfkey_broadcast in function pfkey_process"
  md: protect md_unregister_thread from reentrancy
  serial: msm_serial: disable interrupts in __msm_console_write()
  staging: rtl8712: fix uninit-value in r871xu_drv_init()
  clocksource/drivers/sp804: Avoid error on multiple instances
  misc: rtsx: set NULL intfdata when probe fails
  usb: dwc2: gadget: don't reset gadget's driver->bus
  USB: hcd-pci: Fully suspend across freeze/thaw cycle
  drivers: usb: host: Fix deadlock in oxu_bus_suspend()
  drivers: tty: serial: Fix deadlock in sa1100_set_termios()
  USB: host: isp116x: check return value after calling platform_get_resource()
  drivers: staging: rtl8192e: Fix deadlock in rtllib_beacons_stop()
  tty: Fix a possible resource leak in icom_probe
  tty: synclink_gt: Fix null-pointer-dereference in slgt_clean()
  lkdtm/usercopy: Expand size of "out of frame" object
  iio: dummy: iio_simple_dummy: check the return value of kstrdup()
  net: altera: Fix refcount leak in altera_tse_mdio_create
  net: xfrm: unexport __init-annotated xfrm4_protocol_init()
  SUNRPC: Fix the calculation of xdr->end in xdr_get_next_encode_buffer()
  net/mlx4_en: Fix wrong return value on ioctl EEPROM query failure
  ata: pata_octeon_cf: Fix refcount leak in octeon_cf_probe
  net: fix nla_strcmp to handle more then one trailing null character
  video: fbdev: pxa3xx-gcu: release the resources correctly in pxa3xx_gcu_probe/remove()
  m68knommu: fix undefined reference to `_init_sp'
  m68knommu: set ZERO_PAGE() to the allocated zeroed page
  i2c: cadence: Increase timeout per message if necessary
  tracing: Avoid adding tracer option before update_tracer_options
  tcp: tcp_rtx_synack() can be called from process context
  jffs2: fix memory leak in jffs2_do_fill_super
  modpost: fix removing numeric suffixes
  net: ethernet: mtk_eth_soc: out of bounds read in mtk_hwlro_get_fdir_entry()
  clocksource/drivers/oxnas-rps: Fix irq_of_parse_and_map() return value
  firmware: dmi-sysfs: Fix memory leak in dmi_sysfs_register_handle
  serial: st-asc: Sanitize CSIZE and correct PARENB for CS7
  serial: sh-sci: Don't allow CS5-6
  serial: txx9: Don't allow CS5-6
  serial: digicolor-usart: Don't allow CS5-6
  serial: meson: acquire port->lock in startup()
  rtc: mt6397: check return value after calling platform_get_resource()
  rpmsg: qcom_smd: Fix irq_of_parse_and_map() return value
  pwm: lp3943: Fix duty calculation in case period was clamped
  USB: storage: karma: fix rio_karma_init return
  usb: usbip: add missing device lock on tweak configuration cmd
  usb: usbip: fix a refcount leak in stub_probe()
  staging: greybus: codecs: fix type confusion of list iterator variable
  pcmcia: db1xxx_ss: restrict to MIPS_DB1XXX boards
  netfilter: nf_tables: disallow non-stateful expression in sets earlier
  MIPS: IP27: Remove incorrect `cpu_has_fpu' override
  RDMA/rxe: Generate a completion for unsupported/invalid opcode
  dt-bindings: gpio: altera: correct interrupt-cells
  docs/conf.py: Cope with removal of language=None in Sphinx 5.0.0
  gma500: fix an incorrect NULL check on list iterator
  carl9170: tx: fix an incorrect use of list iterator
  ASoC: rt5514: Fix event generation for "DSP Voice Wake Up" control
  rtl818x: Prevent using not initialized queues
  hugetlb: fix huge_pmd_unshare address update
  nodemask.h: fix compilation error with GCC12
  iommu/msm: Fix an incorrect NULL check on list iterator
  um: Fix out-of-bounds read in LDT setup
  um: chan_user: Fix winch_tramp() return value
  mac80211: upgrade passive scan to active scan on DFS channels after beacon rx
  irqchip: irq-xtensa-mx: fix initial IRQ affinity
  irqchip/armada-370-xp: Do not touch Performance Counter Overflow on A375, A38x, A39x
  RDMA/hfi1: Fix potential integer multiplication overflow errors
  md: fix an incorrect NULL check in md_reload_sb
  md: fix an incorrect NULL check in does_sb_need_changing
  drm/bridge: analogix_dp: Grab runtime PM reference for DP-AUX
  drm/amdgpu/cs: make commands with 0 chunks illegal behaviour.
  scsi: ufs: qcom: Add a readl() to make sure ref_clk gets enabled
  scsi: dc395x: Fix a missing check on list iterator
  ocfs2: dlmfs: fix error handling of user_dlm_destroy_lock
  dlm: fix missing lkb refcount handling
  dlm: fix plock invalid read
  ext4: verify dir block before splitting it
  ext4: fix bug_on in ext4_writepages
  ext4: fix use-after-free in ext4_rename_dir_prepare
  fs-writeback: writeback_sb_inodes:Recalculate 'wrote' according skipped pages
  iwlwifi: mvm: fix assert 1F04 upon reconfig
  wifi: mac80211: fix use-after-free in chanctx code
  iommu/amd: Increase timeout waiting for GA log enablement
  video: fbdev: clcdfb: Fix refcount leak in clcdfb_of_vram_setup
  Input: sparcspkr - fix refcount leak in bbc_beep_probe
  tty: fix deadlock caused by calling printk() under tty_port->lock
  powerpc/4xx/cpm: Fix return value of __setup() handler
  powerpc/idle: Fix return value of __setup() handler
  powerpc/8xx: export 'cpm_setbrg' for modules
  drivers/base/node.c: fix compaction sysfs file leak
  scsi: fcoe: Fix Wstringop-overflow warnings in fcoe_wwn_from_mac()
  mfd: ipaq-micro: Fix error check return value of platform_get_irq()
  soc: qcom: smsm: Fix missing of_node_put() in smsm_parse_ipc
  soc: qcom: smp2p: Fix missing of_node_put() in smp2p_parse_ipc
  rxrpc: Don't try to resend the request if we're receiving the reply
  rxrpc: Fix listen() setting the bar too high for the prealloc rings
  ASoC: wm2000: fix missing clk_disable_unprepare() on error in wm2000_anc_transition()
  sctp: read sk->sk_bound_dev_if once in sctp_rcv()
  m68k: math-emu: Fix dependencies of math emulation support
  Bluetooth: fix dangling sco_conn and use-after-free in sco_sock_timeout
  media: pvrusb2: fix array-index-out-of-bounds in pvr2_i2c_core_init
  media: exynos4-is: Change clk_disable to clk_disable_unprepare
  regulator: pfuze100: Fix refcount leak in pfuze_parse_regulators_dt
  ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe
  media: uvcvideo: Fix missing check to determine if element is found in list
  drm/msm: return an error pointer in msm_gem_prime_get_sg_table()
  x86/mm: Cleanup the control_va_addr_alignment() __setup handler
  drm/rockchip: vop: fix possible null-ptr-deref in vop_bind()
  drm/msm/hdmi: check return value after calling platform_get_resource_byname()
  drm/msm/dsi: fix error checks and return values for DSI xmit functions
  x86/pm: Fix false positive kmemleak report in msr_build_context()
  inotify: show inotify mask flags in proc fdinfo
  ath9k_htc: fix potential out of bounds access with invalid rxstatus->rs_keyix
  spi: img-spfi: Fix pm_runtime_get_sync() error checking
  HID: hid-led: fix maximum brightness for Dream Cheeky
  NFC: NULL out the dev->rfkill to prevent UAF
  spi: spi-ti-qspi: Fix return value handling of wait_for_completion_timeout
  drm/mediatek: Fix mtk_cec_mask()
  x86/delay: Fix the wrong asm constraint in delay_loop()
  ASoC: mediatek: Fix error handling in mt8173_max98090_dev_probe
  drm: fix EDID struct for old ARM OABI format
  macintosh/via-pmu: Fix build failure when CONFIG_INPUT is disabled
  powerpc/xics: fix refcount leak in icp_opal_init()
  PCI: Avoid pci_dev_lock() AB/BA deadlock with sriov_numvfs_store()
  ARM: hisi: Add missing of_node_put after of_find_compatible_node
  ARM: dts: exynos: add atmel,24c128 fallback to Samsung EEPROM
  ARM: versatile: Add missing of_node_put in dcscb_init
  fat: add ratelimit to fat*_ent_bread()
  ARM: OMAP1: clock: Fix UART rate reporting algorithm
  fs: jfs: fix possible NULL pointer dereference in dbFree()
  eth: tg3: silence the GCC 12 array-bounds warning
  rxrpc: Return an error to sendmsg if call failed
  media: exynos4-is: Fix compile warning
  ASoC: rt5645: Fix errorenous cleanup order
  nvme-pci: fix a NULL pointer dereference in nvme_alloc_admin_tags
  openrisc: start CPU timer early in boot
  ipmi:ssif: Check for NULL msg when handling events and messages
  dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC
  ASoC: dapm: Don't fold register value changes into notifications
  ipv6: Don't send rs packets to the interface of ARPHRD_TUNNEL
  drm/amd/pm: fix the compile warning
  scsi: megaraid: Fix error check return value of register_chrdev()
  media: cx25821: Fix the warning when removing the module
  ath9k: fix QCA9561 PA bias level
  drm/amd/pm: fix double free in si_parse_power_table()
  ALSA: jack: Access input_dev under mutex
  ACPICA: Avoid cache flush inside virtual machines
  ipw2x00: Fix potential NULL dereference in libipw_xmit()
  b43: Fix assigning negative value to unsigned variable
  b43legacy: Fix assigning negative value to unsigned variable
  mwifiex: add mutex lock for call in mwifiex_dfs_chan_sw_work_queue
  drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes
  btrfs: add "0x" prefix for unsupported optional features
  ptrace: Reimplement PTRACE_KILL by always sending SIGKILL
  ptrace/xtensa: Replace PT_SINGLESTEP with TIF_SINGLESTEP
  USB: new quirk for Dell Gen 2 devices
  BACKPORT: psi: Fix uaf issue when psi trigger is destroyed while being polled

 Conflicts:
	drivers/char/Kconfig
	drivers/char/random.c
	fs/fat/fatent.c
	include/linux/random.h
	init/main.c
	kernel/cpu.c
	lib/Makefile

Change-Id: I06579fa22a0347a0d8d2fa32bd6b7b6b54db626f
2022-08-09 06:05:50 +03:00
Eric Biggers
ea690b6ba4 Merge 4.9.320 into android-4.9-q
Changes in 4.9.320
	9p: missing chunk of "fs/9p: Don't update file type when updating file attributes"
	random: remove stale maybe_reseed_primary_crng
	random: remove stale urandom_init_wait
	random: remove variable limit
	random: fix comment for unused random_min_urandom_seed
	random: convert get_random_int/long into get_random_u32/u64
	random: move random_min_urandom_seed into CONFIG_SYSCTL ifdef block
	random: invalidate batched entropy after crng init
	random: silence compiler warnings and fix race
	random: add wait_for_random_bytes() API
	random: add get_random_{bytes,u32,u64,int,long,once}_wait family
	random: warn when kernel uses unseeded randomness
	random: do not ignore early device randomness
	random: suppress spammy warnings about unseeded randomness
	random: reorder READ_ONCE() in get_random_uXX
	random: fix warning message on ia64 and parisc
	random: use a different mixing algorithm for add_device_randomness()
	random: set up the NUMA crng instances after the CRNG is fully initialized
	random: fix possible sleeping allocation from irq context
	random: rate limit unseeded randomness warnings
	random: add a spinlock_t to struct batched_entropy
	char/random: silence a lockdep splat with printk()
	Revert "char/random: silence a lockdep splat with printk()"
	random: always use batched entropy for get_random_u{32,64}
	random: fix data race on crng_node_pool
	crypto: chacha20 - Fix keystream alignment for chacha20_block()
	random: always fill buffer in get_random_bytes_wait
	random: optimize add_interrupt_randomness
	drivers/char/random.c: remove unused dont_count_entropy
	random: Fix whitespace pre random-bytes work
	random: Return nbytes filled from hw RNG
	random: add a config option to trust the CPU's hwrng
	random: remove preempt disabled region
	random: Make crng state queryable
	random: make CPU trust a boot parameter
	drivers/char/random.c: constify poolinfo_table
	drivers/char/random.c: remove unused stuct poolinfo::poolbits
	drivers/char/random.c: make primary_crng static
	random: only read from /dev/random after its pool has received 128 bits
	random: move rand_initialize() earlier
	random: document get_random_int() family
	latent_entropy: avoid build error when plugin cflags are not set
	random: fix soft lockup when trying to read from an uninitialized blocking pool
	random: Support freezable kthreads in add_hwgenerator_randomness()
	fdt: add support for rng-seed
	random: Use wait_event_freezable() in add_hwgenerator_randomness()
	char/random: Add a newline at the end of the file
	Revert "hwrng: core - Freeze khwrng thread during suspend"
	crypto: Deduplicate le32_to_cpu_array() and cpu_to_le32_array()
	crypto: blake2s - generic C library implementation and selftest
	lib/crypto: blake2s: move hmac construction into wireguard
	lib/crypto: sha1: re-roll loops to reduce code size
	random: Don't wake crng_init_wait when crng_init == 1
	random: Add a urandom_read_nowait() for random APIs that don't warn
	random: add GRND_INSECURE to return best-effort non-cryptographic bytes
	random: ignore GRND_RANDOM in getentropy(2)
	random: make /dev/random be almost like /dev/urandom
	random: fix crash on multiple early calls to add_bootloader_randomness()
	random: remove the blocking pool
	random: delete code to pull data into pools
	random: remove kernel.random.read_wakeup_threshold
	random: remove unnecessary unlikely()
	random: convert to ENTROPY_BITS for better code readability
	random: Add and use pr_fmt()
	random: fix typo in add_timer_randomness()
	random: remove some dead code of poolinfo
	random: split primary/secondary crng init paths
	random: avoid warnings for !CONFIG_NUMA builds
	x86: Remove arch_has_random, arch_has_random_seed
	powerpc: Remove arch_has_random, arch_has_random_seed
	linux/random.h: Remove arch_has_random, arch_has_random_seed
	linux/random.h: Use false with bool
	linux/random.h: Mark CONFIG_ARCH_RANDOM functions __must_check
	powerpc: Use bool in archrandom.h
	random: add arch_get_random_*long_early()
	random: avoid arch_get_random_seed_long() when collecting IRQ randomness
	random: remove dead code left over from blocking pool
	MAINTAINERS: co-maintain random.c
	crypto: blake2s - include <linux/bug.h> instead of <asm/bug.h>
	crypto: blake2s - adjust include guard naming
	random: document add_hwgenerator_randomness() with other input functions
	random: remove unused irq_flags argument from add_interrupt_randomness()
	random: use BLAKE2s instead of SHA1 in extraction
	random: do not sign extend bytes for rotation when mixing
	random: do not re-init if crng_reseed completes before primary init
	random: mix bootloader randomness into pool
	random: harmonize "crng init done" messages
	random: use IS_ENABLED(CONFIG_NUMA) instead of ifdefs
	random: initialize ChaCha20 constants with correct endianness
	random: early initialization of ChaCha constants
	random: avoid superfluous call to RDRAND in CRNG extraction
	random: don't reset crng_init_cnt on urandom_read()
	random: fix typo in comments
	random: cleanup poolinfo abstraction
	crypto: chacha20 - Fix chacha20_block() keystream alignment (again)
	random: cleanup integer types
	random: remove incomplete last_data logic
	random: remove unused extract_entropy() reserved argument
	random: try to actively add entropy rather than passively wait for it
	random: rather than entropy_store abstraction, use global
	random: remove unused OUTPUT_POOL constants
	random: de-duplicate INPUT_POOL constants
	random: prepend remaining pool constants with POOL_
	random: cleanup fractional entropy shift constants
	random: access input_pool_data directly rather than through pointer
	random: simplify arithmetic function flow in account()
	random: continually use hwgenerator randomness
	random: access primary_pool directly rather than through pointer
	random: only call crng_finalize_init() for primary_crng
	random: use computational hash for entropy extraction
	random: simplify entropy debiting
	random: use linear min-entropy accumulation crediting
	random: always wake up entropy writers after extraction
	random: make credit_entropy_bits() always safe
	random: remove use_input_pool parameter from crng_reseed()
	random: remove batched entropy locking
	random: fix locking in crng_fast_load()
	random: use RDSEED instead of RDRAND in entropy extraction
	random: inline leaves of rand_initialize()
	random: ensure early RDSEED goes through mixer on init
	random: do not xor RDRAND when writing into /dev/random
	random: absorb fast pool into input pool after fast load
	random: use hash function for crng_slow_load()
	random: remove outdated INT_MAX >> 6 check in urandom_read()
	random: zero buffer after reading entropy from userspace
	random: tie batched entropy generation to base_crng generation
	random: remove ifdef'd out interrupt bench
	random: remove unused tracepoints
	random: add proper SPDX header
	random: deobfuscate irq u32/u64 contributions
	random: introduce drain_entropy() helper to declutter crng_reseed()
	random: remove useless header comment
	random: remove whitespace and reorder includes
	random: group initialization wait functions
	random: group entropy extraction functions
	random: group entropy collection functions
	random: group userspace read/write functions
	random: group sysctl functions
	random: rewrite header introductory comment
	workqueue: make workqueue available early during boot
	random: defer fast pool mixing to worker
	random: do not take pool spinlock at boot
	random: unify early init crng load accounting
	random: check for crng_init == 0 in add_device_randomness()
	hwrng: core - do not use multiple blank lines
	hwrng: core - rewrite better comparison to NULL
	hwrng: core - Rewrite the header
	hwrng: core - Move hwrng miscdev minor number to include/linux/miscdevice.h
	hwrng: core - remove unused PFX macro
	hwrng: use rng source with best quality
	hwrng: remember rng chosen by user
	random: pull add_hwgenerator_randomness() declaration into random.h
	random: clear fast pool, crng, and batches in cpuhp bring up
	random: round-robin registers as ulong, not u32
	random: only wake up writers after zap if threshold was passed
	random: cleanup UUID handling
	random: unify cycles_t and jiffies usage and types
	random: do crng pre-init loading in worker rather than irq
	random: give sysctl_random_min_urandom_seed a more sensible value
	random: don't let 644 read-only sysctls be written to
	random: replace custom notifier chain with standard one
	random: use SipHash as interrupt entropy accumulator
	random: make consistent usage of crng_ready()
	random: reseed more often immediately after booting
	random: check for signal and try earlier when generating entropy
	random: skip fast_init if hwrng provides large chunk of entropy
	random: treat bootloader trust toggle the same way as cpu trust toggle
	random: re-add removed comment about get_random_{u32,u64} reseeding
	random: mix build-time latent entropy into pool at init
	random: do not split fast init input in add_hwgenerator_randomness()
	random: do not allow user to keep crng key around on stack
	random: check for signal_pending() outside of need_resched() check
	random: check for signals every PAGE_SIZE chunk of /dev/[u]random
	random: make random_get_entropy() return an unsigned long
	random: document crng_fast_key_erasure() destination possibility
	random: fix sysctl documentation nits
	init: call time_init() before rand_initialize()
	ia64: define get_cycles macro for arch-override
	s390: define get_cycles macro for arch-override
	parisc: define get_cycles macro for arch-override
	alpha: define get_cycles macro for arch-override
	powerpc: define get_cycles macro for arch-override
	timekeeping: Add raw clock fallback for random_get_entropy()
	m68k: use fallback for random_get_entropy() instead of zero
	mips: use fallback for random_get_entropy() instead of just c0 random
	arm: use fallback for random_get_entropy() instead of zero
	nios2: use fallback for random_get_entropy() instead of zero
	x86/tsc: Use fallback for random_get_entropy() instead of zero
	um: use fallback for random_get_entropy() instead of zero
	sparc: use fallback for random_get_entropy() instead of zero
	xtensa: use fallback for random_get_entropy() instead of zero
	uapi: rename ext2_swab() to swab() and share globally in swab.h
	random: insist on random_get_entropy() existing in order to simplify
	random: do not use batches when !crng_ready()
	random: do not pretend to handle premature next security model
	random: order timer entropy functions below interrupt functions
	random: do not use input pool from hard IRQs
	random: help compiler out with fast_mix() by using simpler arguments
	siphash: use one source of truth for siphash permutations
	random: use symbolic constants for crng_init states
	random: avoid initializing twice in credit race
	random: remove ratelimiting for in-kernel unseeded randomness
	random: use proper jiffies comparison macro
	random: handle latent entropy and command line from random_init()
	random: credit architectural init the exact amount
	random: use static branch for crng_ready()
	random: remove extern from functions in header
	random: use proper return types on get_random_{int,long}_wait()
	random: move initialization functions out of hot pages
	random: move randomize_page() into mm where it belongs
	random: convert to using fops->write_iter()
	random: wire up fops->splice_{read,write}_iter()
	random: check for signals after page of pool writes
	Revert "random: use static branch for crng_ready()"
	crypto: drbg - add FIPS 140-2 CTRNG for noise source
	crypto: drbg - always seeded with SP800-90B compliant noise source
	crypto: drbg - prepare for more fine-grained tracking of seeding state
	crypto: drbg - track whether DRBG was seeded with !rng_is_initialized()
	crypto: drbg - move dynamic ->reseed_threshold adjustments to __drbg_seed()
	crypto: drbg - always try to free Jitter RNG instance
	crypto: drbg - make reseeding from get_random_bytes() synchronous
	random: avoid checking crng_ready() twice in random_init()
	random: mark bootloader randomness code as __init
	random: account for arch randomness in bits
	ASoC: cs42l52: Fix TLV scales for mixer controls
	ASoC: cs53l30: Correct number of volume levels on SX controls
	ASoC: cs42l52: Correct TLV for Bypass Volume
	ASoC: cs42l56: Correct typo in minimum level for SX volume controls
	ata: libata-core: fix NULL pointer deref in ata_host_alloc_pinfo()
	ASoC: wm8962: Fix suspend while playing music
	scsi: vmw_pvscsi: Expand vcpuHint to 16 bits
	scsi: lpfc: Fix port stuck in bypassed state after LIP in PT2PT topology
	virtio-mmio: fix missing put_device() when vm_cmdline_parent registration failed
	nfc: nfcmrvl: Fix memory leak in nfcmrvl_play_deferred
	ipv6: Fix signed integer overflow in l2tp_ip6_sendmsg
	net: ethernet: mtk_eth_soc: fix misuse of mem alloc interface netdev[napi]_alloc_frag
	random: credit cpu and bootloader seeds by default
	pNFS: Don't keep retrying if the server replied NFS4ERR_LAYOUTUNAVAILABLE
	misc: atmel-ssc: Fix IRQ check in ssc_probe
	irqchip/gic/realview: Fix refcount leak in realview_gic_of_init
	irqchip/gic-v3: Iterate over possible CPUs by for_each_possible_cpu()
	comedi: vmk80xx: fix expression for tx buffer size
	USB: serial: option: add support for Cinterion MV31 with new baseline
	USB: serial: io_ti: add Agilent E5805A support
	usb: gadget: lpc32xx_udc: Fix refcount leak in lpc32xx_udc_probe
	serial: 8250: Store to lsr_save_flags after lsr read
	ext4: fix bug_on ext4_mb_use_inode_pa
	ext4: make variable "count" signed
	ext4: add reserved GDT blocks check
	l2tp: don't use inet_shutdown on ppp session destroy
	l2tp: fix race in pppol2tp_release with session object destroy
	s390/mm: use non-quiescing sske for KVM switch to keyed guest
	xprtrdma: fix incorrect header size calculations
	swiotlb: fix info leak with DMA_FROM_DEVICE
	Reinstate some of "swiotlb: rework "fix info leak with DMA_FROM_DEVICE""
	fuse: fix pipe buffer lifetime for direct_io
	tcp: change source port randomizarion at connect() time
	tcp: add some entropy in __inet_hash_connect()
	secure_seq: use the 64 bits of the siphash for port offset calculation
	tcp: use different parts of the port_offset for index and offset
	tcp: add small random increments to the source port
	tcp: dynamically allocate the perturb table used by source ports
	tcp: increase source port perturb table to 2^16
	tcp: drop the hash_32() part from the index calculation
	Linux 4.9.320

Conflicts:
	crypto/chacha20_generic.c
	drivers/char/random.c
	drivers/of/fdt.c
	include/crypto/chacha20.h
	lib/chacha20.c

Merge resolution notes:
  - Added CHACHA20_KEY_SIZE and CHACHA20_BLOCK_SIZE constants to
    chacha.h, to minimize changes from the 4.9.320 version of random.c

  - Updated lib/vsprintf.c for
    "random: replace custom notifier chain with standard one".

Change-Id: Ia7a12d8883b808f88bbe807d6150552bb084f6b3
Signed-off-by: Eric Biggers <ebiggers@google.com>
2022-06-28 16:46:38 +00:00
Jason A. Donenfeld
3ea5fefec0 random: remove ratelimiting for in-kernel unseeded randomness
commit cc1e127bfa95b5fb2f9307e7168bf8b2b45b4c5e upstream.

The CONFIG_WARN_ALL_UNSEEDED_RANDOM debug option controls whether the
kernel warns about all unseeded randomness or just the first instance.
There's some complicated rate limiting and comparison to the previous
caller, such that even with CONFIG_WARN_ALL_UNSEEDED_RANDOM enabled,
developers still don't see all the messages or even an accurate count of
how many were missed. This is the result of basically parallel
mechanisms aimed at accomplishing more or less the same thing, added at
different points in random.c history, which sort of compete with the
first-instance-only limiting we have now.

It turns out, however, that nobody cares about the first unseeded
randomness instance of in-kernel users. The same first user has been
there for ages now, and nobody is doing anything about it. It isn't even
clear that anybody _can_ do anything about it. Most places that can do
something about it have switched over to using get_random_bytes_wait()
or wait_for_random_bytes(), which is the right thing to do, but there is
still much code that needs randomness sometimes during init, and as a
geeneral rule, if you're not using one of the _wait functions or the
readiness notifier callback, you're bound to be doing it wrong just
based on that fact alone.

So warning about this same first user that can't easily change is simply
not an effective mechanism for anything at all. Users can't do anything
about it, as the Kconfig text points out -- the problem isn't in
userspace code -- and kernel developers don't or more often can't react
to it.

Instead, show the warning for all instances when CONFIG_WARN_ALL_UNSEEDED_RANDOM
is set, so that developers can debug things need be, or if it isn't set,
don't show a warning at all.

At the same time, CONFIG_WARN_ALL_UNSEEDED_RANDOM now implies setting
random.ratelimit_disable=1 on by default, since if you care about one
you probably care about the other too. And we can clean up usage around
the related urandom_warning ratelimiter as well (whose behavior isn't
changing), so that it properly counts missed messages after the 10
message threshold is reached.

Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-25 11:45:14 +02:00
Theodore Ts'o
68b20d5c97 random: suppress spammy warnings about unseeded randomness
commit eecabf567422eda02bd179f2707d8fe24f52d888 upstream.

Unfortunately, on some models of some architectures getting a fully
seeded CRNG is extremely difficult, and so this can result in dmesg
getting spammed for a surprisingly long time.  This is really bad from
a security perspective, and so architecture maintainers really need to
do what they can to get the CRNG seeded sooner after the system is
booted.  However, users can't do anything actionble to address this,
and spamming the kernel messages log will only just annoy people.

For developers who want to work on improving this situation,
CONFIG_WARN_UNSEEDED_RANDOM has been renamed to
CONFIG_WARN_ALL_UNSEEDED_RANDOM.  By default the kernel will always
print the first use of unseeded randomness.  This way, hopefully the
security obsessed will be happy that there is _some_ indication when
the kernel boots there may be a potential issue with that architecture
or subarchitecture.  To see all uses of unseeded randomness,
developers can enable CONFIG_WARN_ALL_UNSEEDED_RANDOM.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-25 11:44:58 +02:00
Jason A. Donenfeld
04e5bfa620 random: warn when kernel uses unseeded randomness
commit d06bfd1989fe97623b32d6df4ffa6e4338c99dc8 upstream.

This enables an important dmesg notification about when drivers have
used the crng without it being seeded first. Prior, these errors would
occur silently, and so there hasn't been a great way of diagnosing these
types of bugs for obscure setups. By adding this as a config option, we
can leave it on by default, so that we learn where these issues happen,
in the field, will still allowing some people to turn it off, if they
really know what they're doing and do not want the log entries.

However, we don't leave it _completely_ by default. An earlier version
of this patch simply had `default y`. I'd really love that, but it turns
out, this problem with unseeded randomness being used is really quite
present and is going to take a long time to fix. Thus, as a compromise
between log-messages-for-all and nobody-knows, this is `default y`,
except it is also `depends on DEBUG_KERNEL`. This will ensure that the
curious see the messages while others don't have to.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-25 11:44:58 +02:00
Michael Bestas
43cdebbc57 Merge remote-tracking branch 'common/android-4.9-q' into android-msm-pixel-4.9
* common/android-4.9-q:
  Linux 4.9.312
  block/compat_ioctl: fix range check in BLKGETSIZE
  ext4: force overhead calculation if the s_overhead_cluster makes no sense
  ext4: fix overhead calculation to account for the reserved gdt blocks
  ext4: limit length to bitmap_maxbytes - blocksize in punch_hole
  ARC: entry: fix syscall_trace_exit argument
  e1000e: Fix possible overflow in LTR decoding
  ASoC: soc-dapm: fix two incorrect uses of list iterator
  openvswitch: fix OOB access in reserve_sfa_size()
  dma: at_xdmac: fix a missing check on list iterator
  ata: pata_marvell: Check the 'bmdma_addr' beforing reading
  drm/msm/mdp5: check the return of kzalloc()
  brcmfmac: sdio: Fix undefined behavior due to shift overflowing the constant
  cifs: Check the IOCB_DIRECT flag, not O_DIRECT
  vxlan: fix error return code in vxlan_fdb_append
  ALSA: usb-audio: Fix undefined behavior due to shift overflowing the constant
  platform/x86: samsung-laptop: Fix an unsigned comparison which can never be negative
  ARM: vexpress/spc: Avoid negative array index when !SMP
  netlink: reset network and mac headers in netlink_dump()
  net/packet: fix packet_sock xmit return value checking
  dmaengine: imx-sdma: Fix error checking in sdma_event_remap
  ALSA: usb-audio: Clear MIDI port active flag after draining
  gfs2: assign rgrp glock before compute_bitstructs
  mm: page_alloc: fix building error on -Werror=array-compare
  etherdevice: Adjust ether_addr* prototypes to silence -Wstringop-overead
  Linux 4.9.311
  gcc-plugins: latent_entropy: use /dev/urandom
  i2c: pasemi: Wait for write xfers to finish
  smp: Fix offline cpu check in flush_smp_call_function_queue()
  ARM: davinci: da850-evm: Avoid NULL pointer dereference
  ALSA: pcm: Test for "silence" field in struct "pcm_format_data"
  mm: kmemleak: take a full lowmem check in kmemleak_*_phys()
  mm, page_alloc: fix build_zonerefs_node()
  drivers: net: slip: fix NPD bug in sl_tx_timeout()
  scsi: mvsas: Add PCI ID of RocketRaid 2640
  gpu: ipu-v3: Fix dev_dbg frequency output
  net: micrel: fix KS8851_MLL Kconfig
  scsi: ibmvscsis: Increase INITIAL_SRP_LIMIT to 1024
  drm/amdkfd: Check for potential null return of kmalloc_array()
  cifs: potential buffer overflow in handling symlinks
  nfc: nci: add flush_workqueue to prevent uaf
  net: ethernet: stmmac: fix altr_tse_pcs function when using a fixed-link
  veth: Ensure eth header is in skb's linear part
  xfrm: policy: match with both mark and mask on user interfaces
  arm64: module: remove (NOLOAD) from linker script
  mm: don't skip swap entry even if zap_details specified
  dmaengine: Revert "dmaengine: shdma: Fix runtime PM imbalance on error"
  tools build: Use $(shell ) instead of `` to get embedded libperl's ccopts
  arm64: patch_text: Fixup last cpu should be master
  x86/speculation: Restore speculation related MSRs during S3 resume
  x86/pm: Save the MSR validity status at context setup
  mm/mempolicy: fix mpol_new leak in shared_policy_replace
  mmmremap.c: avoid pointless invalidate_range_start/end on mremap(old_size=0)
  drbd: Fix five use after free bugs in get_initial_state
  drm/imx: Fix memory leak in imx_pd_connector_get_modes
  net: stmmac: Fix unset max_speed difference between DT and non-DT platforms
  scsi: zorro7xx: Fix a resource leak in zorro7xx_remove_one()
  mm: fix race between MADV_FREE reclaim and blkdev direct IO read
  jfs: prevent NULL deref in diFree
  virtio_console: eliminate anonymous module_init & module_exit
  serial: samsung_tty: do not unlock port->lock for uart_write_wakeup()
  SUNRPC/call_alloc: async tasks mustn't block waiting for memory
  w1: w1_therm: fixes w1_seq for ds28ea00 sensors
  init/main.c: return 1 from handled __setup() functions
  Bluetooth: Fix use after free in hci_send_acl
  xtensa: fix DTC warning unit_address_format
  usb: dwc3: omap: fix "unbalanced disables for smps10_out1" on omap5evm
  scsi: libfc: Fix use after free in fc_exch_abts_resp()
  MIPS: fix fortify panic when copying asm exception handlers
  bnxt_en: Eliminate unintended link toggle during FW reset
  scsi: aha152x: Fix aha152x_setup() __setup handler return value
  scsi: pm8001: Fix pm8001_mpi_task_abort_resp()
  dm ioctl: prevent potential spectre v1 gadget
  iommu/arm-smmu-v3: fix event handling soft lockup
  scsi: bfa: Replace snprintf() with sysfs_emit()
  scsi: mvsas: Replace snprintf() with sysfs_emit()
  powerpc: dts: t104xrdb: fix phy type for FMAN 4/5
  ptp: replace snprintf with sysfs_emit
  ath5k: fix OOB in ath5k_eeprom_read_pcal_info_5111
  KVM: x86/svm: Clear reserved bits written to PerfEvtSeln MSRs
  ARM: 9187/1: JIVE: fix return value of __setup handler
  rtc: wm8350: Handle error for wm8350_register_irq
  KVM: x86: Forbid VMM to set SYNIC/STIMER MSRs when SynIC wasn't activated
  openvswitch: Fixed nd target mask field in the flow dump.
  ARM: dts: spear13xx: Update SPI dma properties
  ARM: dts: spear1340: Update serial node properties
  ASoC: topology: Allow TLV control to be either read or write
  ubi: fastmap: Return error code if memory allocation fails in add_aeb()
  mm/memcontrol: return 1 from cgroup.memory __setup() handler
  mm/mmap: return 1 from stack_guard_gap __setup() handler
  ACPI: CPPC: Avoid out of bounds access when parsing _CPC data
  pinctrl: pinconf-generic: Print arguments for bias-pull-*
  gfs2: Make sure FITRIM minlen is rounded up to fs block size
  ubifs: setflags: Make dirtied_ino_d 8 bytes aligned
  ubifs: Add missing iput if do_tmpfile() failed in rename whiteout
  KVM: Prevent module exit until all VMs are freed
  scsi: qla2xxx: Fix incorrect reporting of task management failure
  mmc: host: Return an error when ->enable_sdio_irq() ops is missing
  media: hdpvr: initialize dev->worker at hdpvr_register_videodev
  video: fbdev: sm712fb: Fix crash in smtcfb_write()
  ARM: mmp: Fix failure to remove sram device
  ARM: tegra: tamonten: Fix I2C3 pad setting
  media: cx88-mpeg: clear interrupt status register before streaming video
  ASoC: soc-core: skip zero num_dai component in searching dai name
  video: fbdev: omapfb: panel-tpo-td043mtea1: Use sysfs_emit() instead of snprintf()
  video: fbdev: omapfb: panel-dsi-cm: Use sysfs_emit() instead of snprintf()
  ARM: dts: bcm2837: Add the missing L1/L2 cache information
  ARM: dts: qcom: fix gic_irq_domain_translate warnings for msm8960
  video: fbdev: omapfb: acx565akm: replace snprintf with sysfs_emit
  video: fbdev: cirrusfb: check pixclock to avoid divide by zero
  video: fbdev: w100fb: Reset global state
  video: fbdev: nvidiafb: Use strscpy() to prevent buffer overflow
  ntfs: add sanity check on allocation size
  ext4: don't BUG if someone dirty pages without asking ext4 first
  spi: tegra20: Use of_device_get_match_data()
  PM: core: keep irq flags in device_pm_check_callbacks()
  ACPI/APEI: Limit printable size of BERT table data
  ACPICA: Avoid walking the ACPI Namespace if it is not there
  irqchip/nvic: Release nvic_base upon failure
  Fix incorrect type in assignment of ipv6 port for audit
  loop: use sysfs_emit() in the sysfs xxx show()
  selinux: use correct type for context length
  net/x25: Fix null-ptr-deref caused by x25_disconnect
  qlcnic: dcb: default to returning -EOPNOTSUPP
  net: phy: broadcom: Fix brcm_fet_config_init()
  netfilter: nf_conntrack_tcp: preserve liberal flag in tcp options
  jfs: fix divide error in dbNextAG
  kgdbts: fix return value of __setup handler
  kgdboc: fix return value of __setup handler
  tty: hvc: fix return value of __setup handler
  pinctrl/rockchip: Add missing of_node_put() in rockchip_pinctrl_probe
  pinctrl: nomadik: Add missing of_node_put() in nmk_pinctrl_probe
  pinctrl: mediatek: Fix missing of_node_put() in mtk_pctrl_init
  NFS: remove unneeded check in decode_devicenotify_args()
  clk: tegra: tegra124-emc: Fix missing put_device() call in emc_ensure_emc_driver
  clk: clps711x: Terminate clk_div_table with sentinel element
  clk: loongson1: Terminate clk_div_table with sentinel element
  remoteproc: qcom_wcnss: Add missing of_node_put() in wcnss_alloc_memory_region
  clk: qcom: clk-rcg2: Update the frac table for pixel clock
  iio: adc: Add check for devm_request_threaded_irq
  pwm: lpc18xx-sct: Initialize driver data and hardware before pwmchip_add()
  mxser: fix xmit_buf leak in activate when LSR == 0xff
  mfd: asic3: Add missing iounmap() on error asic3_mfd_probe
  i2c: mux: demux-pinctrl: do not deactivate a master that is not active
  af_netlink: Fix shift out of bounds in group mask calculation
  USB: storage: ums-realtek: fix error code in rts51x_read_mem()
  MIPS: RB532: fix return value of __setup handler
  mfd: mc13xxx: Add check for mc13xxx_irq_request
  powerpc/sysdev: fix incorrect use to determine if list is empty
  power: supply: wm8350-power: Add missing free in free_charger_irq
  power: supply: wm8350-power: Handle error for wm8350_register_irq
  i2c: xiic: Make bus names unique
  KVM: x86/emulator: Defer not-present segment check in __load_segment_descriptor()
  KVM: x86: Fix emulation in writing cr8
  drm/tegra: Fix reference leak in tegra_dsi_ganged_probe
  ext2: correct max file size computing
  TOMOYO: fix __setup handlers return values
  scsi: pm8001: Fix abort all task initialization
  scsi: pm8001: Fix payload initialization in pm80xx_set_thermal_config()
  scsi: pm8001: Fix command initialization in pm8001_chip_ssp_tm_req()
  scsi: pm8001: Fix command initialization in pm80XX_send_read_log()
  iwlwifi: Fix -EIO error code that is never returned
  HID: i2c-hid: fix GET/SET_REPORT for unnumbered reports
  power: supply: ab8500: Fix memory leak in ab8500_fg_sysfs_init
  ray_cs: Check ioremap return value
  ath9k_htc: fix uninit value bugs
  drm/edid: Don't clear formats if using deep color
  mtd: onenand: Check for error irq
  ASoC: imx-es8328: Fix error return code in imx_es8328_probe()
  ASoC: mxs: Fix error handling in mxs_sgtl5000_probe
  ASoC: dmaengine: do not use a NULL prepare_slave_config() callback
  video: fbdev: omapfb: Add missing of_node_put() in dvic_probe_of
  ASoC: fsi: Add check for clk_enable
  ASoC: wm8350: Handle error for wm8350_register_irq
  ASoC: atmel: Add missing of_node_put() in at91sam9g20ek_audio_probe
  ALSA: firewire-lib: fix uninitialized flag for AV/C deferred transaction
  memory: emif: check the pointer temp in get_device_details()
  memory: emif: Add check for setup_interrupts
  ASoC: atmel_ssc_dai: Handle errors for clk_enable
  ASoC: mxs-saif: Handle errors for clk_enable
  printk: fix return value of printk.devkmsg __setup handler
  arm64: dts: broadcom: Fix sata nodename
  arm64: dts: ns2: Fix spi-cpol and spi-cpha property
  ALSA: spi: Add check for clk_enable()
  ASoC: ti: davinci-i2s: Add check for clk_enable()
  media: usb: go7007: s2250-board: fix leak in probe()
  soc: ti: wkup_m3_ipc: Fix IRQ check in wkup_m3_ipc_probe
  ARM: dts: qcom: ipq4019: fix sleep clock
  video: fbdev: fbcvt.c: fix printing in fb_cvt_print_name()
  video: fbdev: smscufx: Fix null-ptr-deref in ufx_usb_probe()
  perf/x86/intel/pt: Fix address filter config for 32-bit kernel
  perf/core: Fix address filter parser for multiple filters
  sched/debug: Remove mpol_get/put and task_lock/unlock from sched_show_numa
  clocksource: acpi_pm: fix return value of __setup handler
  hwmon: (pmbus) Add Vin unit off handling
  crypto: ccp - ccp_dmaengine_unregister release dma channels
  crypto: vmx - add missing dependencies
  PM: suspend: fix return value of __setup handler
  PM: hibernate: fix __setup handler error handling
  hwmon: (sch56xx-common) Replace WDOG_ACTIVE with WDOG_HW_RUNNING
  hwmon: (pmbus) Add mutex to regulator ops
  selftests/x86: Add validity check and allow field splitting
  spi: tegra114: Add missing IRQ check in tegra_spi_probe
  crypto: mxs-dcp - Fix scatterlist processing
  crypto: authenc - Fix sleep in atomic context in decrypt_tail
  PCI: pciehp: Clear cmd_busy bit in polling mode
  brcmfmac: pcie: Replace brcmf_pcie_copy_mem_todev with memcpy_toio
  brcmfmac: firmware: Allocate space for default boardrev in nvram
  media: davinci: vpif: fix unbalanced runtime PM get
  DEC: Limit PMAX memory probing to R3k systems
  lib/raid6/test: fix multiple definition linking error
  thermal: int340x: Increase bitmap size
  carl9170: fix missing bit-wise or operator for tx_params
  ARM: dts: exynos: add missing HDMI supplies on SMDK5420
  ARM: dts: exynos: add missing HDMI supplies on SMDK5250
  ARM: dts: exynos: fix UART3 pins configuration in Exynos5250
  video: fbdev: atari: Atari 2 bpp (STe) palette bugfix
  video: fbdev: sm712fb: Fix crash in smtcfb_read()
  drivers: hamradio: 6pack: fix UAF bug caused by mod_timer()
  ALSA: cs4236: fix an incorrect NULL check on list iterator
  Revert "Input: clear BTN_RIGHT/MIDDLE on buttonpads"
  scsi: libsas: Fix sas_ata_qc_issue() handling of NCQ NON DATA commands
  mempolicy: mbind_range() set_policy() after vma_merge()
  mm/pages_alloc.c: don't create ZONE_MOVABLE beyond the end of a node
  jffs2: fix memory leak in jffs2_scan_medium
  jffs2: fix memory leak in jffs2_do_mount_fs
  jffs2: fix use-after-free in jffs2_clear_xattr_subsystem
  can: ems_usb: ems_usb_start_xmit(): fix double dev_kfree_skb() in error path
  NFSD: prevent underflow in nfssvc_decode_writeargs()
  SUNRPC: avoid race between mod_timer() and del_timer_sync()
  ptrace: Check PTRACE_O_SUSPEND_SECCOMP permission on PTRACE_SEIZE
  clk: uniphier: Fix fixed-rate initialization
  iio: inkern: make a best effort on offset calculation
  iio: inkern: apply consumer scale on IIO_VAL_INT cases
  coresight: Fix TRCCONFIGR.QE sysfs interface
  USB: usb-storage: Fix use of bitfields for hardware data in ene_ub6250.c
  virtio-blk: Use blk_validate_block_size() to validate block size
  block: Add a helper to validate the block size
  af_key: add __GFP_ZERO flag for compose_sadb_supported in function pfkey_register
  ethernet: sun: Free the coherent when failing in probing
  virtio_console: break out of buf poll on remove
  netdevice: add the case if dev is NULL
  USB: serial: simple: add Nokia phone driver
  USB: serial: pl2303: add IBM device IDs
  Linux 4.9.310
  arm64: Use the clearbhb instruction in mitigations
  arm64: add ID_AA64ISAR2_EL1 sys register
  KVM: arm64: Allow SMCCC_ARCH_WORKAROUND_3 to be discovered and migrated
  arm64: Mitigate spectre style branch history side channels
  KVM: arm64: Add templates for BHB mitigation sequences
  arm64: Add percpu vectors for EL1
  arm64: entry: Add macro for reading symbol addresses from the trampoline
  arm64: entry: Add vectors that have the bhb mitigation sequences
  arm64: Move arm64_update_smccc_conduit() out of SSBD ifdef
  arm64: entry: Add non-kpti __bp_harden_el1_vectors for mitigations
  arm64: entry: Allow the trampoline text to occupy multiple pages
  arm64: entry: Make the kpti trampoline's kpti sequence optional
  arm64: entry: Move trampoline macros out of ifdef'd section
  arm64: entry: Don't assume tramp_vectors is the start of the vectors
  arm64: entry: Allow tramp_alias to access symbols after the 4K boundary
  arm64: entry: Move the trampoline data page before the text page
  arm64: entry: Free up another register on kpti's tramp_exit path
  arm64: entry: Make the trampoline cleanup optional
  arm64: entry.S: Add ventry overflow sanity checks
  arm64: Add helper to decode register from instruction
  arm64: Add Cortex-X2 CPU part definition
  arm64: Add Neoverse-N2, Cortex-A710 CPU part definition
  arm64: Add part number for Arm Cortex-A77
  arm64: Add part number for Neoverse N1
  arm64: Make ARM64_ERRATUM_1188873 depend on COMPAT
  arm64: Add silicon-errata.txt entry for ARM erratum 1188873
  arm64: arch_timer: avoid unused function warning
  arm64: arch_timer: Add workaround for ARM erratum 1188873
  arm64: arch_timer: Add erratum handler for CPU-specific capability
  arm64: arch_timer: Add infrastructure for multiple erratum detection methods
  clocksource/drivers/arm_arch_timer: Introduce generic errata handling infrastructure
  clocksource/drivers/arm_arch_timer: Remove fsl-a008585 parameter
  arm64: capabilities: Add support for checks based on a list of MIDRs
  arm64: Add helpers for checking CPU MIDR against a range
  arm64: capabilities: Clean up midr range helpers
  arm64: capabilities: Add flags to handle the conflicts on late CPU
  arm64: capabilities: Prepare for fine grained capabilities
  arm64: capabilities: Move errata processing code
  arm64: capabilities: Move errata work around check on boot CPU
  arm64: capabilities: Update prototype for enable call back
  arm64: Add MIDR encoding for Arm Cortex-A55 and Cortex-A35
  arm64: Remove useless UAO IPI and describe how this gets enabled
  arm64: errata: Provide macro for major and minor cpu revisions
  Linux 4.9.309
  llc: only change llc->dev when bind() succeeds
  mac80211: fix potential double free on mesh join
  crypto: qat - disable registration of algorithms
  ACPI: video: Force backlight native for Clevo NL5xRU and NL5xNU
  ACPI: battery: Add device HID and quirk for Microsoft Surface Go 3
  ACPI / x86: Work around broken XSDT on Advantech DAC-BJ01 board
  netfilter: nf_tables: initialize registers in nft_do_chain()
  ALSA: pci: fix reading of swapped values from pcmreg in AC97 codec
  ALSA: cmipci: Restore aux vol on suspend/resume
  ALSA: usb-audio: Add mute TLV for playback volumes on RODE NT-USB
  ALSA: pcm: Add stream lock during PCM reset ioctl operations
  llc: fix netdevice reference leaks in llc_ui_bind()
  staging: fbtft: fb_st7789v: reset display before initialization
  net: ipv6: fix skb_over_panic in __ip6_append_data
  nfc: st21nfca: Fix potential buffer overflows in EVT_TRANSACTION
  Linux 4.9.308
  Input: aiptek - properly check endpoint type
  usb: gadget: Fix use-after-free bug by not setting udc->dev.driver
  usb: gadget: rndis: prevent integer overflow in rndis_set_response()
  atm: eni: Add check for dma_map_single
  net/packet: fix slab-out-of-bounds access in packet_recvmsg()
  fs: sysfs_emit: Remove PAGE_SIZE alignment check
  kselftest/vm: fix tests build with old libc
  sfc: extend the locking on mcdi->seqno
  tcp: make tcp_read_sock() more robust
  nl80211: Update bss channel on channel switch for P2P_CLIENT
  atm: firestream: check the return value of ioremap() in fs_init()
  can: rcar_canfd: rcar_canfd_channel_probe(): register the CAN device when fully ready
  ARM: 9178/1: fix unmet dependency on BITREVERSE for HAVE_ARCH_BITREVERSE
  MIPS: smp: fill in sibling and core maps earlier
  ARM: dts: rockchip: fix a typo on rk3288 crypto-controller
  xfrm: Fix xfrm migrate issues when address family changes
  Linux 4.9.307
  btrfs: unlock newly allocated extent buffer after error
  ARM: fix Thumb2 regression with Spectre BHB
  batman-adv: Don't expect inter-netns unique iflink indices
  batman-adv: Request iflink once in batadv-on-batadv check
  staging: gdm724x: fix use after free in gdm_lte_rx()
  ARM: Spectre-BHB: provide empty stub for non-config
  selftests/memfd: clean up mapping in mfd_fail_write
  tracing: Ensure trace buffer is at least 4096 bytes large
  Revert "xen-netback: Check for hotplug-status existence before watching"
  net-sysfs: add check for netdevice being present to speed_show
  sctp: fix kernel-infoleak for SCTP sockets
  gpio: ts4900: Do not set DAT and OE together
  NFC: port100: fix use-after-free in port100_send_complete
  net/mlx5: Fix size field in bufferx_reg struct
  ax25: Fix NULL pointer dereference in ax25_kill_by_device
  net: ethernet: lpc_eth: Handle error for clk_enable
  ethernet: Fix error handling in xemaclite_of_probe
  qed: return status of qed_iov_get_link
  net: qlogic: check the return value of dma_alloc_coherent() in qed_vf_hw_prepare()
  Linux 4.9.306
  xen/netfront: react properly to failing gnttab_end_foreign_access_ref()
  xen/gnttab: fix gnttab_end_foreign_access() without page specified
  xen: remove gnttab_query_foreign_access()
  xen/gntalloc: don't use gnttab_query_foreign_access()
  xen/scsifront: don't use gnttab_query_foreign_access() for mapped status
  xen/netfront: don't use gnttab_query_foreign_access() for mapped status
  xen/blkfront: don't use gnttab_query_foreign_access() for mapped status
  xen/grant-table: add gnttab_try_end_foreign_access()
  xen/xenbus: don't let xenbus_grant_ring() remove grants in error case
  ARM: fix build warning in proc-v7-bugs.c
  x86, modpost: Replace last remnants of RETPOLINE with CONFIG_RETPOLINE
  x86/build: Fix compiler support check for CONFIG_RETPOLINE
  ARM: Do not use NOCROSSREFS directive with ld.lld
  ARM: fix co-processor register typo
  ARM: fix build error when BPF_SYSCALL is disabled
  ARM: include unprivileged BPF status in Spectre V2 reporting
  ARM: Spectre-BHB workaround
  ARM: use LOADADDR() to get load address of sections
  ARM: early traps initialisation
  ARM: report Spectre v2 status through sysfs
  arm/arm64: smccc/psci: add arm_smccc_1_1_get_conduit()
  arm/arm64: Provide a wrapper for SMCCC 1.1 calls
  x86/speculation: Warn about eIBRS + LFENCE + Unprivileged eBPF + SMT
  x86/speculation: Warn about Spectre v2 LFENCE mitigation
  x86/speculation: Update link to AMD speculation whitepaper
  x86/speculation: Use generic retpoline by default on AMD
  x86/speculation: Include unprivileged eBPF status in Spectre v2 mitigation reporting
  Documentation/hw-vuln: Update spectre doc
  x86/speculation: Add eIBRS + Retpoline options
  x86/speculation: Rename RETPOLINE_AMD to RETPOLINE_LFENCE
  x86,bugs: Unconditionally allow spectre_v2=retpoline,amd
  x86/speculation: Merge one test in spectre_v2_user_select_mitigation()
  Documentation: refer to config RANDOMIZE_BASE for kernel address-space randomization
  Documentation: Add swapgs description to the Spectre v1 documentation
  Documentation: Add section about CPU vulnerabilities for Spectre
  x86/retpoline: Remove minimal retpoline support
  x86/retpoline: Make CONFIG_RETPOLINE depend on compiler support
  x86/speculation: Add RETPOLINE_AMD support to the inline asm CALL_NOSPEC variant
  Linux 4.9.305
  hamradio: fix macro redefine warning
  net: dcb: disable softirqs in dcbnl_flush_dev()
  memfd: fix F_SEAL_WRITE after shmem huge page allocated
  HID: add mapping for KEY_ALL_APPLICATIONS
  Input: elan_i2c - fix regulator enable count imbalance after suspend/resume
  Input: elan_i2c - move regulator_[en|dis]able() out of elan_[en|dis]able_power()
  net: chelsio: cxgb3: check the return value of pci_find_capability()
  soc: fsl: qe: Check of ioremap return value
  ARM: 9182/1: mmu: fix returns from early_param() and __setup() functions
  can: gs_usb: change active_channels's type from atomic_t to u8
  efivars: Respect "block" flag in efivar_entry_set_safe()
  net: arcnet: com20020: Fix null-ptr-deref in com20020pci_probe()
  net: sxgbe: fix return value of __setup handler
  net: stmmac: fix return value of __setup handler
  mac80211: fix forwarded mesh frames AC & queue selection
  firmware: qemu_fw_cfg: fix kobject leak in probe error path
  firmware: Fix a reference count leak.
  net: dcb: flush lingering app table entries for unregistered devices
  netfilter: nf_queue: fix possible use-after-free
  netfilter: nf_queue: don't assume sk is full socket
  xfrm: fix MTU regression
  ASoC: ops: Shift tested values in snd_soc_put_volsw() by +min
  ata: pata_hpt37x: fix PCI clock detection
  usb: gadget: clear related members when goto fail
  usb: gadget: don't release an existing dev->buf
  net: usb: cdc_mbim: avoid altsetting toggling for Telit FN990
  i2c: qup: allow COMPILE_TEST
  dmaengine: shdma: Fix runtime PM imbalance on error
  cifs: fix double free race when mount fails in cifs_get_root()
  Input: clear BTN_RIGHT/MIDDLE on buttonpads
  i2c: bcm2835: Avoid clock stretching timeouts
  mac80211_hwsim: initialize ieee80211_tx_info at hw_scan_work
  mac80211_hwsim: report NOACK frames in tx_status
  Linux 4.9.304
  fget: clarify and improve __fget_files() implementation
  memblock: use kfree() to release kmalloced memblock regions
  tty: n_gsm: fix proper link termination after failed open
  tty: n_gsm: fix encoding of control signal octet bit DV
  xhci: Prevent futile URB re-submissions due to incorrect return value.
  usb: dwc3: gadget: Let the interrupt handler disable bottom halves.
  USB: serial: option: add Telit LE910R1 compositions
  USB: serial: option: add support for DW5829e
  tracefs: Set the group ownership in apply_options() not parse_options()
  USB: gadget: validate endpoint index for xilinx udc
  usb: gadget: rndis: add spinlock for rndis response list
  Revert "USB: serial: ch341: add new Product ID for CH341A"
  ata: pata_hpt37x: disable primary channel on HPT371
  iio: adc: men_z188_adc: Fix a resource leak in an error handling path
  RDMA/ib_srp: Fix a deadlock
  configfs: fix a race in configfs_{,un}register_subsystem()
  net/mlx5e: Fix wrong return value on ioctl EEPROM query failure
  drm/edid: Always set RGB444
  openvswitch: Fix setting ipv6 fields causing hw csum failure
  gso: do not skip outer ip header in case of ipip and net_failover
  net: __pskb_pull_tail() & pskb_carve_frag_list() drop_monitor friends
  serial: 8250: of: Fix mapped region size when using reg-offset property
  serial: 8250: fix error handling in of_platform_serial_probe()
  USB: zaurus: support another broken Zaurus
  sr9700: sanity check for packet length
  parisc/unaligned: Fix ldw() and stw() unalignment handlers
  parisc/unaligned: Fix fldd and fstd unaligned handlers on 32-bit kernel
  vhost/vsock: don't check owner in vhost_vsock_stop() while releasing
  mtd: rawnand: brcmnand: Fixed incorrect sub-page ECC status
  Linux 4.9.303
  net: usb: qmi_wwan: Add support for Dell DW5829e
  tracing: Fix tp_printk option related with tp_printk_stop_on_boot
  ata: libata-core: Disable TRIM on M88V29
  NFS: Do not report writeback errors in nfs_getattr()
  KVM: x86/pmu: Use AMD64_RAW_EVENT_MASK for PERF_TYPE_RAW
  lib/iov_iter: initialize "flags" in new pipe_buffer
  i2c: brcmstb: fix support for DSL and CM variants
  EDAC: Fix calculation of returned address and next offset in edac_align_ptr()
  NFS: LOOKUP_DIRECTORY is also ok with symlinks
  ASoC: ops: Fix stereo change notifications in snd_soc_put_volsw_range()
  ASoC: ops: Fix stereo change notifications in snd_soc_put_volsw()
  ALSA: hda: Fix missing codec probe on Shenker Dock 15
  ALSA: hda: Fix regression on forced probe mask option
  libsubcmd: Fix use-after-free for realloc(..., 0)
  drop_monitor: fix data-race in dropmon_net_event / trace_napi_poll_hit
  iwlwifi: pcie: fix locking when "HW not ready"
  vsock: remove vsock from connected table when connect is interrupted by a signal
  vsock: correct removal of socket from the list
  taskstats: Cleanup the use of task->exit_code
  xfrm: Don't accidentally set RTO_ONLINK in decode_session4()
  drm/radeon: Fix backlight control on iMac 12,1
  quota: make dquot_quota_sync return errors from ->sync_fs
  vfs: make freeze_super abort when sync_filesystem returns error
  ax25: improve the incomplete fix to avoid UAF and NPD bugs
  selftests/zram: Adapt the situation that /dev/zram0 is being used
  selftests/zram01.sh: Fix compression ratio calculation
  selftests/zram: Skip max_comp_streams interface on newer kernel
  net: ieee802154: at86rf230: Stop leaking skb's
  btrfs: send: in case of IO error log it
  parisc: Fix sglist access in ccio-dma.c
  parisc: Fix data TLB miss in sba_unmap_sg
  serial: parisc: GSC: fix build when IOSAPIC is not set
  net: usb: ax88179_178a: Fix out-of-bounds accesses in RX fixup
  Makefile.extrawarn: Move -Wunaligned-access to W=1
  UPSTREAM: net: fix skb_panic to output real address
  UPSTREAM: xfrm: Make function xfrmi_get_link_net() static
  UPSTREAM: xfrm: fix gro_cells leak when remove virtual xfrm interfaces
  UPSTREAM: xfrm interface: fix memory leak on creation
  UPSTREAM: xfrm: clone XFRMA_SET_MARK in xfrm_do_migrate
  UPSTREAM: xfrm/compat: Translate by copying XFRMA_UNSPEC attribute
  UPSTREAM: xfrm/compat: memset(0) 64-bit padding at right place
  UPSTREAM: xfrm/compat: Don't allocate memory with __GFP_ZERO
  UPSTREAM: xfrm/compat: Cleanup WARN()s that can be user-triggered
  UPSTREAM: net: xfrm: fix memory leak in xfrm_user_rcv_msg
  UPSTREAM: arm64/vdso: don't leak kernel addresses
  UPSTREAM: tracing: make PREEMPTIRQ_EVENTS depend on TRACING
  UPSTREAM: trace_uprobe: Use %lx to display offset
  UPSTREAM: kprobes: Fix random address output of blacklist file
  UPSTREAM: mm/huge_memory.c: __split_huge_page() use atomic ClearPageDirty()
  UPSTREAM: x86/realmode: Don't leak the trampoline kernel address
  UPSTREAM: bpf: bpf_prog_array_alloc() should return a generic non-rcu pointer
  UPSTREAM: bpf: fix rcu annotations in compute_effective_progs()
  UPSTREAM: optee: add writeback to valid memory type
  UPSTREAM: lib/test_printf.c: accept "ptrval" as valid result for plain 'p' tests
  UPSTREAM: kdb: use correct pointer when 'btc' calls 'btt'
  UPSTREAM: kdb: print real address of pointers instead of hashed addresses
  UPSTREAM: powerpc/traps: Fix the message printed when stack overflows
  UPSTREAM: f2fs: should use GFP_NOFS for directory inodes
  UPSTREAM: zram: off by one in read_block_state()
  UPSTREAM: tee: fix put order in teedev_close_context()
  UPSTREAM: vsprintf: Replace memory barrier with static_key for random_ptr_key update
  UPSTREAM: ARM: 8896/1: VDSO: Don't leak kernel addresses
  UPSTREAM: parisc: Show unhashed hardware inventory
  UPSTREAM: parisc: Show initial kernel memory layout unhashed
  UPSTREAM: parisc: Show unhashed HPA of Dino chip
  UPSTREAM: parisc: Show unhashed EISA EEPROM address
  UPSTREAM: HID: input: throttle battery uevents
  UPSTREAM: HID: steam: select CONFIG_POWER_SUPPLY
  UPSTREAM: HID: sony: Fix for broken buttons on DS3 USB dongles
  UPSTREAM: HID: input: do not report stylus battery state as "full"
  Linux 4.9.302
  HID: wacom: add USB_HID dependency
  hwmon: (dell-smm) Speed up setting of fan speed
  USB: serial: cp210x: add CPI Bulk Coin Recycler id
  USB: serial: cp210x: add NCR Retail IO box id
  USB: serial: ch341: add support for GW Instek USB2.0-Serial devices
  USB: serial: option: add ZTE MF286D modem
  USB: serial: ftdi_sio: add support for Brainboxes US-159/235/320
  usb: gadget: rndis: check size of RNDIS_MSG_SET command
  USB: gadget: validate interface OS descriptor requests
  usb: dwc3: gadget: Prevent core from processing stale TRBs
  n_tty: wake up poll(POLLRDNORM) on receiving data
  bpf: Add kconfig knob for disabling unpriv bpf by default
  vt_ioctl: add array_index_nospec to VT_ACTIVATE
  vt_ioctl: fix array_index_nospec in vt_setactivate
  tipc: rate limit warning for received illegal binding update
  net: fix a memleak when uncloning an skb dst and its metadata
  net: do not keep the dst cache when uncloning an skb dst and its metadata
  ipmr,ip6mr: acquire RTNL before calling ip[6]mr_free_table() on failure path
  bonding: pair enable_port with slave_arr_updates
  ARM: dts: imx6qdl-udoo: Properly describe the SD card detect
  staging: fbtft: Fix error path in fbtft_driver_module_init()
  ARM: dts: imx23-evk: Remove MX23_PAD_SSP1_DETECT from hog group
  usb: dwc2: gadget: don't try to disable ep0 in dwc2_hsotg_suspend
  scsi: target: iscsi: Make sure the np under each tpg is unique
  NFSv4 remove zero number of fs_locations entries error check
  nfs: nfs4clinet: check the return value of kstrdup()
  NFSv4 only print the label when its queried
  Revert "net: axienet: Wait for PhyRstCmplt after core reset"
  ALSA: line6: Fix misplaced backport of "Fix wrong altsetting for LINE6_PODHD500_1"
  serial: sh-sci: Fix misplaced backport of "Fix late enablement of AUTORTS"
  Input: i8042 - Fix misplaced backport of "add ASUS Zenbook Flip to noselftest list"
  NFSD: Clamp WRITE offsets
  NFS: Fix initialisation of nfs_client cl_flags field
  ima: Remove ima_policy file before directory
  integrity: check the return value of audit_log_start()
  Revert "tracefs: Have tracefs directories not set OTH permission bits by default"
  Linux 4.9.301
  tipc: improve size validations for received domain records
  moxart: fix potential use-after-free on remove path
  cgroup-v1: Require capabilities to set release_agent
  Linux 4.9.300
  ext4: fix error handling in ext4_restore_inline_data()
  EDAC/xgene: Fix deferred probing
  EDAC/altera: Fix deferred probing
  rtc: cmos: Evaluate century appropriate
  nfsd: nfsd4_setclientid_confirm mistakenly expires confirmed client.
  scsi: bnx2fc: Make bnx2fc_recv_frame() mp safe
  ASoC: fsl: Add missing error handling in pcm030_fabric_probe
  net: macsec: Verify that send_sci is on when setting Tx sci explicitly
  net: ieee802154: Return meaningful error codes from the netlink helpers
  spi: mediatek: Avoid NULL pointer crash in interrupt
  spi: bcm-qspi: check for valid cs before applying chip select
  iommu/amd: Fix loop timeout issue in iommu_ga_log_enable()
  drm/nouveau: fix off by one in BIOS boundary checking
  ASoC: ops: Reject out of bounds values in snd_soc_put_xr_sx()
  ASoC: ops: Reject out of bounds values in snd_soc_put_volsw_sx()
  ASoC: ops: Reject out of bounds values in snd_soc_put_volsw()
  af_packet: fix data-race in packet_setsockopt / packet_setsockopt
  rtnetlink: make sure to refresh master_dev/m_ops in __rtnl_newlink()
  net: amd-xgbe: Fix skb data length underflow
  net: amd-xgbe: ensure to reset the tx_timer_active flag
  ipheth: fix EOVERFLOW in ipheth_rcvbulk_callback
  netfilter: nat: limit port clash resolution attempts
  netfilter: nat: remove l4 protocol port rovers
  ipv4: tcp: send zero IPID in SYNACK messages
  ipv4: raw: lock the socket in raw_bind()
  hwmon: (lm90) Reduce maximum conversion rate for G781
  drm/msm: Fix wrong size calculation
  net-procfs: show net devices bound packet types
  NFSv4: nfs_atomic_open() can race when looking up a non-regular file
  NFSv4: Handle case where the lookup of a directory fails
  ipv4: avoid using shared IP generator for connected sockets
  net: fix information leakage in /proc/net/ptype
  ipv6_tunnel: Rate limit warning messages
  scsi: bnx2fc: Flush destroy_work queue before calling bnx2fc_interface_put()
  powerpc/32: Fix boot failure with GCC latent entropy plugin
  USB: core: Fix hang in usb_kill_urb by adding memory barriers
  usb: gadget: f_sourcesink: Fix isoc transfer for USB_SPEED_SUPER_PLUS
  usb-storage: Add unusual-devs entry for VL817 USB-SATA bridge
  tty: Add support for Brainboxes UC cards.
  tty: n_gsm: fix SW flow control encoding/handling
  serial: stm32: fix software flow control transfer
  PM: wakeup: simplify the output logic of pm_show_wakelocks()
  udf: Fix NULL ptr deref when converting from inline format
  udf: Restore i_lenAlloc when inode expansion fails
  scsi: zfcp: Fix failed recovery on gone remote port with non-NPIV FCP devices
  s390/hypfs: include z/VM guests with access control group set
  Bluetooth: refactor malicious adv data check
  can: bcm: fix UAF of bcm op
  BACKPORT: ipv6: Implement draft-ietf-6man-rfc4941bis
  Linux 4.9.299
  ion: Do not 'put' ION handle until after its final use
  ion: Protect kref from userspace manipulation
  ion: Fix use after free during ION_IOC_ALLOC
  ARM: 8800/1: use choice for kernel unwinders
  KVM: X86: MMU: Use the correct inherited permissions to get shadow page
  KVM: nVMX: fix EPT permissions as reported in exit qualification
  NFSv4: Initialise connection to the server in nfs4_alloc_client()
  media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt()
  drm/i915: Flush TLBs before releasing backing store
  Linux 4.9.298
  KVM: do not allow mapping valid but non-reference-counted pages
  KVM: Use kvm_pfn_t for local PFN variable in hva_to_pfn_remapped()
  KVM: do not assume PTE is writable after follow_pfn
  mm: add follow_pte_pmd()
  lib/timerqueue: Rely on rbtree semantics for next timer
  rbtree: cache leftmost node internally
  cipso,calipso: resolve a number of problems with the DOI refcounts
  gianfar: fix jumbo packets+napi+rx overrun crash
  gianfar: simplify FCS handling and fix memory leak
  drm/ttm/nouveau: don't call tt destroy callback on alloc failure.
  gup: document and work around "COW can break either way" issue
  Revert "gup: document and work around "COW can break either way" issue"
  lib82596: Fix IRQ check in sni_82596_probe
  scripts/dtc: dtx_diff: remove broken example from help text
  bcmgenet: add WOL IRQ check
  net_sched: restore "mpu xxx" handling
  dmaengine: at_xdmac: Fix at_xdmac_lld struct definition
  dmaengine: at_xdmac: Fix lld view setting
  dmaengine: at_xdmac: Print debug message after realeasing the lock
  dmaengine: at_xdmac: Don't start transactions at tx_submit level
  libcxgb: Don't accidentally set RTO_ONLINK in cxgb_find_route()
  netns: add schedule point in ops_exit_list()
  net: axienet: fix number of TX ring slots for available check
  net: axienet: Wait for PhyRstCmplt after core reset
  af_unix: annote lockless accesses to unix_tot_inflight & gc_in_progress
  parisc: pdc_stable: Fix memory leak in pdcs_register_pathentries
  net/fsl: xgmac_mdio: Fix incorrect iounmap when removing module
  powerpc/fsl/dts: Enable WA for erratum A-009885 on fman3l MDIO buses
  RDMA/rxe: Fix a typo in opcode name
  RDMA/hns: Modify the mapping attribute of doorbell to device
  drm/radeon: fix error handling in radeon_driver_open_kms
  fuse: fix live lock in fuse_iget()
  fuse: fix bad inode
  ext4: don't use the orphan list when migrating an inode
  ext4: Fix BUG_ON in ext4_bread when write quota data
  ext4: set csum seed in tmp inode while migrating to extents
  iwlwifi: mvm: Increase the scan timeout guard to 30 seconds
  ubifs: Error path in ubifs_remount_rw() seems to wrongly free write buffers
  power: bq25890: Enable continuous conversion for ADC at charging
  ASoC: mediatek: mt8173: fix device_node leak
  scsi: sr: Don't use GFP_DMA
  MIPS: Octeon: Fix build errors using clang
  i2c: designware-pci: Fix to change data types of hcnt and lcnt parameters
  ALSA: seq: Set upper limit of processed events
  w1: Misuse of get_user()/put_user() reported by sparse
  i2c: mpc: Correct I2C reset procedure
  powerpc/smp: Move setup_profiling_timer() under CONFIG_PROFILING
  i2c: i801: Don't silently correct invalid transfer size
  powerpc/btext: add missing of_node_put
  powerpc/cell: add missing of_node_put
  powerpc/powernv: add missing of_node_put
  powerpc/6xx: add missing of_node_put
  parisc: Avoid calling faulthandler_disabled() twice
  serial: core: Keep mctrl register state and cached copy in sync
  serial: pl010: Drop CR register reset on set_termios
  dm space map common: add bounds check to sm_ll_lookup_bitmap()
  dm btree: add a defensive bounds check to insert_at()
  net: mdio: Demote probed message to debug print
  btrfs: remove BUG_ON(!eie) in find_parent_nodes
  btrfs: remove BUG_ON() in find_parent_nodes()
  ACPICA: Executer: Fix the REFCLASS_REFOF case in acpi_ex_opcode_1A_0T_1R()
  ACPICA: Utilities: Avoid deleting the same object twice in a row
  jffs2: GC deadlock reading a page that is used in jffs2_write_begin()
  um: registers: Rename function names to avoid conflicts and build problems
  ath9k: Fix out-of-bound memcpy in ath9k_hif_usb_rx_stream
  usb: hub: Add delay for SuperSpeed hub resume to let links transit to U0
  media: saa7146: hexium_gemini: Fix a NULL pointer dereference in hexium_attach()
  media: igorplugusb: receiver overflow should be reported
  net: bonding: debug: avoid printing debug logs when bond is not notifying peers
  ath10k: Fix tx hanging
  iwlwifi: mvm: synchronize with FW after multicast commands
  media: m920x: don't use stack on USB reads
  media: saa7146: hexium_orion: Fix a NULL pointer dereference in hexium_attach()
  floppy: Add max size check for user space request
  mwifiex: Fix skb_over_panic in mwifiex_usb_recv()
  HSI: core: Fix return freed object in hsi_new_client
  gpiolib: acpi: Do not set the IRQ type if the IRQ is already in use
  media: b2c2: Add missing check in flexcop_pci_isr:
  HID: apple: Do not reset quirks when the Fn key is not found
  usb: gadget: f_fs: Use stream_open() for endpoint files
  ar5523: Fix null-ptr-deref with unexpected WDCMSG_TARGET_START reply
  fs: dlm: filter user dlm messages for kernel locks
  Bluetooth: Fix debugfs entry leak in hci_register_dev()
  RDMA/cxgb4: Set queue pair state when being queried
  mips: bcm63xx: add support for clk_set_parent()
  mips: lantiq: add support for clk_set_parent()
  misc: lattice-ecp3-config: Fix task hung when firmware load failed
  ASoC: samsung: idma: Check of ioremap return value
  dmaengine: pxa/mmp: stop referencing config->slave_id
  RDMA/core: Let ib_find_gid() continue search even after empty entry
  scsi: ufs: Fix race conditions related to driver data
  char/mwave: Adjust io port register size
  ALSA: oss: fix compile error when OSS_DEBUG is enabled
  powerpc/prom_init: Fix improper check of prom_getprop()
  RDMA/hns: Validate the pkey index
  ALSA: hda: Add missing rwsem around snd_ctl_remove() calls
  ALSA: PCM: Add missing rwsem around snd_ctl_remove() calls
  ALSA: jack: Add missing rwsem around snd_ctl_remove() calls
  ext4: avoid trim error on fs with small groups
  net: mcs7830: handle usb read errors properly
  pcmcia: fix setting of kthread task states
  can: xilinx_can: xcan_probe(): check for error irq
  can: softing: softing_startstop(): fix set but not used variable warning
  spi: spi-meson-spifc: Add missing pm_runtime_disable() in meson_spifc_probe
  fsl/fman: Check for null pointer after calling devm_ioremap
  ppp: ensure minimum packet size in ppp_write()
  pcmcia: rsrc_nonstatic: Fix a NULL pointer dereference in nonstatic_find_mem_region()
  pcmcia: rsrc_nonstatic: Fix a NULL pointer dereference in __nonstatic_find_io_region()
  usb: ftdi-elan: fix memory leak on device disconnect
  media: msi001: fix possible null-ptr-deref in msi001_probe()
  media: si2157: Fix "warm" tuner state detection
  media: saa7146: mxb: Fix a NULL pointer dereference in mxb_attach()
  media: dib8000: Fix a memleak in dib8000_init()
  floppy: Fix hang in watchdog when disk is ejected
  serial: amba-pl011: do not request memory region twice
  drm/radeon/radeon_kms: Fix a NULL pointer dereference in radeon_driver_open_kms()
  drm/amdgpu: Fix a NULL pointer dereference in amdgpu_connector_lcd_native_mode()
  arm64: dts: qcom: msm8916: fix MMC controller aliases
  netfilter: bridge: add support for pppoe filtering
  tty: serial: atmel: Call dma_async_issue_pending()
  tty: serial: atmel: Check return code of dmaengine_submit()
  crypto: qce - fix uaf on qce_ahash_register_one
  media: dmxdev: fix UAF when dvb_register_device() fails
  Bluetooth: stop proccessing malicious adv data
  wcn36xx: Indicate beacon not connection loss on MISSED_BEACON_IND
  Bluetooth: cmtp: fix possible panic when cmtp_init_sockets() fails
  shmem: fix a race between shmem_unused_huge_shrink and shmem_evict_inode
  PCI: Add function 1 DMA alias quirk for Marvell 88SE9125 SATA controller
  can: softing_cs: softingcs_probe(): fix memleak on registration failure
  media: stk1160: fix control-message timeouts
  media: pvrusb2: fix control-message timeouts
  media: redrat3: fix control-message timeouts
  media: dib0700: fix undefined behavior in tuner shutdown
  media: s2255: fix control-message timeouts
  media: cpia2: fix control-message timeouts
  media: em28xx: fix control-message timeouts
  media: mceusb: fix control-message timeouts
  media: flexcop-usb: fix control-message timeouts
  rtc: cmos: take rtc_lock while reading from CMOS
  nfc: llcp: fix NULL error pointer dereference on sendmsg() after failed bind()
  HID: wacom: Avoid using stale array indicies to read contact count
  HID: uhid: Fix worker destroying device without any protection
  rtlwifi: rtl8192cu: Fix WARNING when calling local_irq_restore() with interrupts enabled
  media: uvcvideo: fix division by zero at stream start
  drm/i915: Avoid bitwise vs logical OR warning in snb_wm_latency_quirk()
  staging: wlan-ng: Avoid bitwise vs logical OR warning in hfa384x_usb_throttlefn()
  random: fix data race on crng init time
  random: fix data race on crng_node_pool
  can: gs_usb: gs_can_start_xmit(): zero-initialize hf->{flags,reserved}
  can: gs_usb: fix use of uninitialized variable, detach device on reception of invalid USB data
  mfd: intel-lpss: Fix too early PM enablement in the ACPI ->probe()
  USB: Fix "slab-out-of-bounds Write" bug in usb_hcd_poll_rh_status
  USB: core: Fix bug in resuming hub's handling of wakeup requests
  Bluetooth: bfusb: fix division by zero in send path
  Linux 4.9.297
  power: reset: ltc2952: Fix use of floating point literals
  mISDN: change function names to avoid conflicts
  net: udp: fix alignment problem in udp4_seq_show()
  ip6_vti: initialize __ip6_tnl_parm struct in vti6_siocdevprivate
  scsi: libiscsi: Fix UAF in iscsi_conn_get_param()/iscsi_conn_teardown()
  phonet: refcount leak in pep_sock_accep
  arm64: sysreg: Move to use definitions for all the SCTLR bits
  arm64: move !VHE work to end of el2_setup
  arm64: reduce el2_setup branching
  arm64: Remove a redundancy in sysreg.h
  bug: split BUILD_BUG stuff out into <linux/build_bug.h>
  rndis_host: support Hytera digital radios
  xfs: map unwritten blocks in XFS_IOC_{ALLOC,FREE}SP just like fallocate
  sch_qfq: prevent shift-out-of-bounds in qfq_init_qdisc
  i40e: Fix incorrect netdev's real number of RX/TX queues
  mac80211: initialize variable have_higher_than_11mbit
  ieee802154: atusb: fix uninit value in atusb_set_extended_addr
  virtio_pci: Support surprise removal of virtio pci device
  tracing: Tag trace_percpu_buffer as a percpu pointer
  tracing: Fix check for trace_percpu_buffer validity in get_trace_buf()
  Bluetooth: btusb: Apply QCA Rome patches for some ATH3012 models
  Linux 4.9.296
  net: fix use-after-free in tw_timer_handler
  Input: spaceball - fix parsing of movement data packets
  Input: appletouch - initialize work before device registration
  scsi: vmw_pvscsi: Set residual data length conditionally
  usb: gadget: f_fs: Clear ffs_eventfd in ffs_data_clear.
  xhci: Fresco FL1100 controller should not have BROKEN_MSI quirk set.
  uapi: fix linux/nfc.h userspace compilation errors
  nfc: uapi: use kernel size_t to fix user-space builds
  fsl/fman: Fix missing put_device() call in fman_port_probe
  selinux: initialize proto variable in selinux_ip_postroute_compat()
  recordmcount.pl: fix typo in s390 mcount regex
  platform/x86: apple-gmux: use resource_size() with res
  HID: asus: Add depends on USB_HID to HID_ASUS Kconfig option
  Linux 4.9.295
  phonet/pep: refuse to enable an unbound pipe
  hamradio: improve the incomplete fix to avoid NPD
  hamradio: defer ax25 kfree after unregister_netdev
  ax25: NPD bug when detaching AX25 device
  hwmon: (lm90) Do not report 'busy' status bit as alarm
  ARM: 9169/1: entry: fix Thumb2 bug in iWMMXt exception handling
  x86/pkey: Fix undefined behaviour with PKRU_WD_BIT
  ALSA: drivers: opl3: Fix incorrect use of vp->state
  ALSA: jack: Check the return value of kstrdup()
  hwmon: (lm90) Fix usage of CONFIG2 register in detect function
  drivers: net: smc911x: Check for error irq
  fjes: Check for error irq
  bonding: fix ad_actor_system option setting to default
  qlcnic: potential dereference null pointer of rx_queue->page_ring
  IB/qib: Fix memory leak in qib_user_sdma_queue_pkts()
  HID: holtek: fix mouse probing
  can: kvaser_usb: get CAN clock frequency from device
  net: usb: lan78xx: add Allied Telesis AT29M2-AF
  Linux 4.9.294
  xen/netback: don't queue unlimited number of packages
  xen/netback: fix rx queue stall detection
  xen/console: harden hvc_xen against event channel storms
  xen/netfront: harden netfront against event channel storms
  xen/blkfront: harden blkfront against event channel storms
  Input: touchscreen - avoid bitwise vs logical OR warning
  mwifiex: Remove unnecessary braces from HostCmd_SET_SEQ_NO_BSS_INFO
  ARM: 8805/2: remove unneeded naked function usage
  net: lan78xx: Avoid unnecessary self assignment
  scsi: scsi_debug: Sanity check block descriptor length in resp_mode_select()
  fuse: annotate lock in fuse_reverse_inval_entry()
  firmware: arm_scpi: Fix string overflow in SCPI genpd driver
  net: systemport: Add global locking for descriptor lifecycle
  timekeeping: Really make sure wall_to_monotonic isn't positive
  USB: serial: option: add Telit FN990 compositions
  PCI/MSI: Clear PCI_MSIX_FLAGS_MASKALL on error
  USB: gadget: bRequestType is a bitfield, not a enum
  ixgbe: set X550 MDIO speed before talking to PHY
  igbvf: fix double free in `igbvf_probe`
  soc/tegra: fuse: Fix bitwise vs. logical OR warning
  nfsd: fix use-after-free due to delegation race
  dm btree remove: fix use after free in rebalance_children()
  recordmcount.pl: look for jgnop instruction as well as bcrl on s390
  mac80211: send ADDBA requests using the tid/queue of the aggregation session
  hwmon: (dell-smm) Fix warning on /proc/i8k creation error
  tracing: Fix a kmemleak false positive in tracing_map
  net: netlink: af_netlink: Prevent empty skb by adding a check on len.
  i2c: rk3x: Handle a spurious start completion interrupt flag
  parisc/agp: Annotate parisc agp init functions with __init
  net/mlx4_en: Update reported link modes for 1/10G
  nfc: fix segfault in nfc_genl_dump_devices_done
  FROMGIT: USB: gadget: bRequestType is a bitfield, not a enum
  Linux 4.9.293
  irqchip: nvic: Fix offset for Interrupt Priority Offsets
  irqchip/irq-gic-v3-its.c: Force synchronisation when issuing INVALL
  irqchip/armada-370-xp: Fix support for Multi-MSI interrupts
  irqchip/armada-370-xp: Fix return value of armada_370_xp_msi_alloc()
  iio: accel: kxcjk-1013: Fix possible memory leak in probe and remove
  iio: itg3200: Call iio_trigger_notify_done() on error
  iio: kxsd9: Don't return error code in trigger handler
  iio: ltr501: Don't return error code in trigger handler
  iio: mma8452: Fix trigger reference couting
  iio: stk3310: Don't return error code in interrupt handler
  usb: core: config: using bit mask instead of individual bits
  usb: core: config: fix validation of wMaxPacketValue entries
  USB: gadget: zero allocate endpoint 0 buffers
  USB: gadget: detect too-big endpoint 0 requests
  net/qla3xxx: fix an error code in ql_adapter_up()
  net, neigh: clear whole pneigh_entry at alloc time
  net: fec: only clear interrupt of handling queue in fec_enet_rx_queue()
  net: altera: set a couple error code in probe()
  net: cdc_ncm: Allow for dwNtbOutMaxSize to be unset or zero
  block: fix ioprio_get(IOPRIO_WHO_PGRP) vs setuid(2)
  tracefs: Set all files to the same group ownership as the mount option
  signalfd: use wake_up_pollfree()
  binder: use wake_up_pollfree()
  wait: add wake_up_pollfree()
  libata: add horkage for ASMedia 1092
  can: pch_can: pch_can_rx_normal: fix use after free
  tracefs: Have new files inherit the ownership of their parent
  ALSA: pcm: oss: Handle missing errors in snd_pcm_oss_change_params*()
  ALSA: pcm: oss: Limit the period size to 16MB
  ALSA: pcm: oss: Fix negative period/buffer sizes
  ALSA: ctl: Fix copy of updated id with element read/write
  mm: bdi: initialize bdi_min_ratio when bdi is unregistered
  IB/hfi1: Correct guard on eager buffer deallocation
  nfc: fix potential NULL pointer deref in nfc_genl_dump_ses_done
  can: sja1000: fix use after free in ems_pcmcia_add_card()
  HID: check for valid USB device for many HID drivers
  HID: wacom: fix problems when device is not a valid USB device
  HID: add USB_HID dependancy on some USB HID drivers
  HID: add USB_HID dependancy to hid-chicony
  HID: add USB_HID dependancy to hid-prodikeys
  HID: add hid_is_usb() function to make it simpler for USB detection
  HID: introduce hid_is_using_ll_driver
  UPSTREAM: USB: gadget: zero allocate endpoint 0 buffers
  UPSTREAM: USB: gadget: detect too-big endpoint 0 requests

 Conflicts:
	arch/arm64/include/asm/cputype.h
	arch/arm64/kernel/bpi.S
	arch/arm64/kernel/cpu_errata.c
	arch/arm64/kernel/vdso.c
	drivers/clk/qcom/clk-rcg2.c
	drivers/media/dvb-core/dmxdev.c
	drivers/mmc/core/host.c
	drivers/net/usb/lan78xx.c
	drivers/staging/android/ion/ion-ioctl.c
	drivers/staging/android/ion/ion.c
	drivers/staging/android/ion/ion_priv.h
	drivers/usb/gadget/composite.c
	drivers/usb/gadget/function/rndis.c
	drivers/usb/gadget/function/rndis.h
	lib/vsprintf.c
	mm/memory.c
	net/ipv6/ip6_output.c

Change-Id: Ie8bf6aa5dac3ae822cef90decbba577cefedcb31
2022-05-09 16:57:36 +03:00
Greg Kroah-Hartman
e15b5a8b28 Merge 4.9.299 into android-4.9-q
Changes in 4.9.299
	drm/i915: Flush TLBs before releasing backing store
	media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt()
	NFSv4: Initialise connection to the server in nfs4_alloc_client()
	KVM: nVMX: fix EPT permissions as reported in exit qualification
	KVM: X86: MMU: Use the correct inherited permissions to get shadow page
	ARM: 8800/1: use choice for kernel unwinders
	ion: Fix use after free during ION_IOC_ALLOC
	ion: Protect kref from userspace manipulation
	ion: Do not 'put' ION handle until after its final use
	Linux 4.9.299

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I328b0798e8bae663576965b04af17d228f1f1f8a
2022-01-29 12:08:21 +01:00
Stefan Agner
d47e16bb32 ARM: 8800/1: use choice for kernel unwinders
commit f9b58e8c7d031b0daa5c9a9ee27f5a4028ba53ac upstream.

While in theory multiple unwinders could be compiled in, it does
not make sense in practise. Use a choice to make the unwinder
selection mutually exclusive and mandatory.

Already before this commit it has not been possible to deselect
FRAME_POINTER. Remove the obsolete comment.

Furthermore, to produce a meaningful backtrace with FRAME_POINTER
enabled the kernel needs a specific function prologue:
    mov    ip, sp
    stmfd    sp!, {fp, ip, lr, pc}
    sub    fp, ip, #4

To get to the required prologue gcc uses apcs and no-sched-prolog.
This compiler options are not available on clang, and clang is not
able to generate the required prologue. Make the FRAME_POINTER
config symbol depending on !clang.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-29 10:15:58 +01:00
Robin Peng
a7d6f7d1a0 Merge android-4.9-q (4.9.196) into android-msm-pixel-4.9-lts
Merge 4.9.196 into android-4.9-q
Linux 4.9.196
    NFC: fix attrs checks in netlink interface
  * smack: use GFP_NOFS while holding inode_smack::smk_lock
      security/smack/smack_access.c
      security/smack/smack_lsm.c
  * Smack: Don't ignore other bprm->unsafe flags if LSM_UNSAFE_PTRACE is set
      security/smack/smack_lsm.c
  * ipv6: Handle missing host route in __ipv6_ifa_notify
      net/ipv6/addrconf.c
    sch_cbq: validate TCA_CBQ_WRROPT to avoid crash
    xen-netfront: do not use ~0U as error return value for xennet_fill_frags()
    net/rds: Fix error handling in rds_ib_add_one()
    sch_dsmark: fix potential NULL deref in dsmark_init()
    qmi_wwan: add support for Cinterion CLS8 devices
    nfc: fix memory leak in llcp_sock_bind()
  * net: Unpublish sk from sk_reuseport_cb before call_rcu
      net/core/sock.c
    net: qlogic: Fix memory leak in ql_alloc_large_buffers
  * net: ipv4: avoid mixed n_redirects and rate_tokens usage
      net/ipv4/route.c
  * ipv6: drop incoming packets having a v4mapped source address
      net/ipv6/ip6_input.c
    hso: fix NULL-deref on tty open
    cxgb4:Fix out-of-bounds MSI-X info array access
  * ANDROID: binder: synchronize_rcu() when using POLLFREE.
      drivers/android/binder.c
  * ANDROID: binder: remove waitqueue when thread exits.
      drivers/android/binder.c
  * kmemleak: increase DEBUG_KMEMLEAK_EARLY_LOG_SIZE default to 16K
      lib/Kconfig.debug
    ocfs2: wait for recovering done after direct unlock request
    hypfs: Fix error number left in struct pointer member
  * fat: work around race with userspace's read via blockdev while mounting
      fs/fat/dir.c
      fs/fat/fatent.c
    ARM: 8903/1: ensure that usable memory in bank 0 starts from a PMD-aligned address
  * security: smack: Fix possible null-pointer dereferences in smack_socket_sock_rcv_skb()
      security/smack/smack_lsm.c
  * HID: apple: Fix stuck function keys when using FN
      drivers/hid/hid-apple.c
    ARM: 8898/1: mm: Don't treat faults reported from cache maintenance as writes
    PCI: tegra: Fix OF node reference leak
    mfd: intel-lpss: Remove D3cold delay
    MIPS: tlbex: Explicitly cast _PAGE_NO_EXEC to a boolean
  * scsi: core: Reduce memory required for SCSI logging
      drivers/scsi/scsi_logging.c
      include/scsi/scsi_dbg.h
    clk: at91: select parent if main oscillator or bypass is enabled
  * arm64: fix unreachable code issue with cmpxchg
      arch/arm64/include/asm/cmpxchg.h
    powerpc/pseries: correctly track irq state in default idle
    powerpc/64s/exception: machine check use correct cfar for late handler
    drm/amdgpu/si: fix ASIC tests
    vfio_pci: Restore original state on release
    pinctrl: tegra: Fix write barrier placement in pmx_writel
    powerpc/pseries/mobility: use cond_resched when updating device tree
    powerpc/futex: Fix warning: 'oldval' may be used uninitialized in this function
    powerpc/rtas: use device model APIs and serialization during LPM
    clk: sirf: Don't reference clk_init_data after registration
    clk: qoriq: Fix -Wunused-const-variable
    ipmi_si: Only schedule continuously in the thread in maintenance mode
    gpu: drm: radeon: Fix a possible null-pointer dereference in radeon_connector_set_property()
    drm/radeon: Fix EEH during kexec
    video: ssd1307fb: Start page range at page_offset
    drm/bridge: tc358767: Increase AUX transfer length limit
    Merge 4.9.195 into android-4.9-q
Linux 4.9.195
    Btrfs: fix race setting up and completing qgroup rescan workers
    btrfs: qgroup: Drop quota_root and fs_info parameters from update_qgroup_status_item
    CIFS: Fix oplock handling for SMB 2.1+ protocols
    CIFS: fix max ea value size
    i2c: riic: Clear NACK in tend isr
  * hwrng: core - don't wait on add_early_randomness()
      drivers/char/hw_random/core.c
  * quota: fix wrong condition in is_quota_modification()
      include/linux/quotaops.h
  * ext4: fix punch hole for inline_data file systems
      fs/ext4/inode.c
  * ext4: fix warning inside ext4_convert_unwritten_extents_endio
      fs/ext4/extents.c
  * /dev/mem: Bail out upon SIGKILL.
      drivers/char/mem.c
  * cfg80211: Purge frame registrations on iftype change
      net/wireless/util.c
    md/raid6: Set R5_ReadError when there is read failure on parity disk
    btrfs: Relinquish CPUs in btrfs_compare_trees
    Btrfs: fix use-after-free when using the tree modification log
  * ovl: filter of trusted xattr results in audit
      fs/overlayfs/inode.c
  * memcg, kmem: do not fail __GFP_NOFAIL charges
      mm/memcontrol.c
  * regulator: Defer init completion for a while after late_initcall
      drivers/regulator/core.c
  * alarmtimer: Use EOPNOTSUPP instead of ENOTSUPP
      kernel/time/alarmtimer.c
    ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up
    ASoC: Intel: Fix use of potentially uninitialized variable
    ASoC: Intel: NHLT: Fix debug print format
    media: sn9c20x: Add MSI MS-1039 laptop to flip_dmi_table
    KVM: x86: Manually calculate reserved bits when loading PDPTRS
    KVM: x86: set ctxt->have_exception in x86_decode_insn()
    KVM: x86: always stop emulation on page fault
    parisc: Disable HP HSC-PCI Cards to prevent kernel crash
  * fuse: fix missing unlock_page in fuse_writepage()
      fs/fuse/file.c
  * printk: Do not lose last line in kmsg buffer dump
      kernel/printk/printk.c
  * printk: remove games with previous record flags
      kernel/printk/printk.c
    IB/hfi1: Define variables as unsigned long to fix KASAN warning
    ALSA: firewire-tascam: check intermediate state of clock status and retry
    ALSA: firewire-tascam: handle error code when getting current source of clock
    PM / devfreq: passive: fix compiler warning
    media: omap3isp: Set device on omap3isp subdevs
    btrfs: extent-tree: Make sure we only allocate extents from block groups with the same type
    ALSA: hda/realtek - Blacklist PC beep for Lenovo ThinkCentre M73/93
    media: ttusb-dec: Fix info-leak in ttusb_dec_send_command()
    drm/amd/powerplay/smu7: enforce minimal VBITimeout (v2)
    e1000e: add workaround for possible stalled packet
    libertas: Add missing sentinel at end of if_usb.c fw_table
  * mmc: sdhci: Fix incorrect switch to HS mode
      drivers/mmc/host/sdhci.c
    ASoC: dmaengine: Make the pcm->name equal to pcm->id if the name is not set
    s390/crypto: xts-aes-s390 fix extra run-time crypto self tests finding
  * kprobes: Prohibit probing on BUG() and WARN() address
      include/linux/bug.h
      kernel/kprobes.c
    dmaengine: ti: edma: Do not reset reserved paRAM slots
    md/raid1: fail run raid1 array when active disk less than one
    hwmon: (acpi_power_meter) Change log level for 'unsafe software power cap'
    ACPI / PCI: fix acpi_pci_irq_enable() memory leak
    ACPI: custom_method: fix memory leaks
    ARM: dts: exynos: Mark LDO10 as always-on on Peach Pit/Pi Chromebooks
    libtraceevent: Change users plugin directory
    iommu/amd: Silence warnings under memory pressure
    nvmet: fix data units read and written counters in SMART log
  * arm64: kpti: ensure patched kernel text is fetched from PoU
      arch/arm64/mm/proc.S
    ACPI / CPPC: do not require the _PSD method
    media: ov9650: add a sanity check
    media: saa7134: fix terminology around saa7134_i2c_eeprom_md7134_gate()
    media: cpia2_usb: fix memory leaks
    media: saa7146: add cleanup in hexium_attach()
    PM / devfreq: exynos-bus: Correct clock enable sequence
    PM / devfreq: passive: Use non-devm notifiers
  * media: dvb-core: fix a memory leak bug
      drivers/media/dvb-core/dvbdev.c
    media: hdpvr: add terminating 0 at end of string
    media: radio/si470x: kill urb on error
    ARM: dts: imx7d: cl-som-imx7: make ethernet work again
    net: lpc-enet: fix printk format strings
    media: omap3isp: Don't set streaming state on random subdevs
    dmaengine: iop-adma: use correct printk format strings
    media: gspca: zero usb_buf on error
    efi: cper: print AER info of PCIe fatal error
    md: don't set In_sync if array is frozen
    md: don't call spare_active in md_reap_sync_thread if all member devices can't work
    EDAC/altera: Use the proper type for the IRQ status bits
    ia64:unwind: fix double free for mod->arch.init_unw_table
  * ALSA: usb-audio: Skip bSynchAddress endpoint check if it is invalid
      sound/usb/pcm.c
  * base: soc: Export soc_device_register/unregister APIs
      drivers/base/soc.c
    media: iguanair: add sanity checks
    ALSA: i2c: ak4xxx-adda: Fix a possible null pointer dereference in build_adc_controls()
    ALSA: hda - Show the fatal CORB/RIRB error more clearly
    x86/apic: Soft disable APIC before initializing it
    x86/reboot: Always use NMI fallback when shutdown via reboot vector IPI fails
  * sched/core: Fix CPU controller for !RT_GROUP_SCHED
      kernel/sched/core.c
  * sched/fair: Fix imbalance due to CPU affinity
      kernel/sched/fair.c
    media: hdpvr: Add device num check and handling
    media: exynos4-is: fix leaked of_node references
    media: dib0700: fix link error for dibx000_i2c_set_speed
    leds: leds-lp5562 allow firmware files up to the maximum length
    dmaengine: bcm2835: Print error in case setting DMA mask fails
    ASoC: sgtl5000: Fix charge pump source assignment
    regulator: lm363x: Fix off-by-one n_voltages for lm3632 ldo_vpos/ldo_vneg
    ALSA: hda: Flush interrupts on disabling
    nfc: enforce CAP_NET_RAW for raw sockets
    ieee802154: enforce CAP_NET_RAW for raw sockets
    ax25: enforce CAP_NET_RAW for raw sockets
    appletalk: enforce CAP_NET_RAW for raw sockets
    mISDN: enforce CAP_NET_RAW for raw sockets
  * usbnet: sanity checking of packet sizes and device mtu
      drivers/net/usb/usbnet.c
  * usbnet: ignore endpoints with invalid wMaxPacketSize
      drivers/net/usb/usbnet.c
    skge: fix checksum byte order
  * sch_netem: fix a divide by zero in tabledist()
      net/sched/sch_netem.c
  * ppp: Fix memory leak in ppp_write
      drivers/net/ppp/ppp_generic.c
    openvswitch: change type of UPCALL_PID attribute to NLA_UNSPEC
    net: qrtr: Stop rx_worker before freeing node
    net/phy: fix DP83865 10 Mbps HDX loopback disable function
    macsec: drop skb sk before calling gro_cells_receive
  * cdc_ncm: fix divide-by-zero caused by invalid wMaxPacketSize
      drivers/net/usb/cdc_ncm.c
    arcnet: provide a buffer big enough to actually receive packets
    Bluetooth: btrtl: Additional Realtek 8822CE Bluetooth devices
    xfs: don't crash on null attr fork xfs_bmapi_read
  * drm: Flush output polling on shutdown
      drivers/gpu/drm/drm_probe_helper.c
  * f2fs: fix to do sanity check on segment bitmap of LFS curseg
      fs/f2fs/segment.c
  * Revert "f2fs: avoid out-of-range memory access"
      fs/f2fs/segment.c
  * f2fs: check all the data segments against all node ones
      fs/f2fs/super.c
  * irqchip/gic-v3-its: Fix LPI release for Multi-MSI devices
      drivers/irqchip/irq-gic-v3-its.c
    locking/lockdep: Add debug_locks check in __lock_downgrade()
  * power: supply: sysfs: ratelimit property read error message
      drivers/power/supply/power_supply_sysfs.c
    mac80211: handle deauthentication/disassociation from TDLS peer
    mac80211: Print text for disassociation reason
    objtool: Clobber user CFLAGS variable
    ALSA: hda - Add laptop imic fixup for ASUS M9V laptop
    ASoC: fsl: Fix of-node refcount unbalance in fsl_ssi_probe_from_dt()
    media: tvp5150: fix switch exit in set control handler
    crypto: talitos - fix missing break in switch statement
    mtd: cfi_cmdset_0002: Use chip_good() to retry in do_write_oneword()
    HID: hidraw: Fix invalid read in hidraw_ioctl
    HID: logitech: Fix general protection fault caused by Logitech driver
    HID: prodikeys: Fix general protection fault during probe
    IB/core: Add an unbound WQ type to the new CQ API
  * Revert "Bluetooth: validate BLE connection interval updates"
      net/bluetooth/hci_event.c
      net/bluetooth/l2cap_core.c
  * BACKPORT: block: annotate refault stalls from IO submission
      block/bio.c
      block/blk-core.c
      include/linux/blk_types.h
  * ANDROID: usb: gadget: Fix dependency for f_accessory
      drivers/usb/gadget/Kconfig
    Remove taskname from lowmemorykiller kill reports
    Merge 4.9.194 into android-4.9-q
Linux 4.9.194
  * net_sched: let qdisc_put() accept NULL pointer
      net/sched/sch_generic.c
    ARC: export "abort" for modules
    media: technisat-usb2: break out of loop at end of buffer
    floppy: fix usercopy direction
    iommu/amd: Fix race in increase_address_space()
  * keys: Fix missing null pointer check in request_key_auth_describe()
      security/keys/request_key_auth.c
    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
    perf/x86/amd/ibs: Fix sample bias for dispatched micro-ops
    perf/x86/intel: Restrict period on Nehalem
    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
    NFSv2: Fix write regression
    NFSv2: Fix eof handling
  * netfilter: nf_conntrack_ftp: Fix debug output
      net/netfilter/nf_conntrack_ftp.c
    x86/apic: Fix arch_dynirq_lower_bound() bug for DT enabled machines
  * r8152: Set memory to all 0xFFs on failed reg reads
      drivers/net/usb/r8152.c
    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
      drivers/atm/Kconfig
    NFS: Fix initialisation of I/O result struct in nfs_pgio_rpcsetup
    NFSv4: Fix return values for nfs4_file_open()
    s390/bpf: use 32-bit index for tail calls
    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
    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
    KVM: coalesced_mmio: add bounds checking
    xen-netfront: do not assume sk_buff_head list is empty in error handling
    x86/boot: Add missing bootparam that breaks boot on some platforms
    powerpc/mm/radix: Use the right page size for vmemmap mapping
    media: tm6000: double free if usb disconnect while streaming
  * USB: usbcore: Fix slab-out-of-bounds bug during device reset
      drivers/usb/core/config.c
    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
      drivers/nvmem/core.c
    drm/mediatek: mtk_drm_drv.c: Add of_node_put() before goto
    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
      drivers/base/core.c
    mtd: rawnand: mtk: Fix wrongly assigned OOB buffer pointer issue
    clk: rockchip: Don't yell about bad mmc phases when getting
    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()
      kernel/irq/resend.c
    Btrfs: fix assertion failure during fsync and use of stale transaction
  * gpio: fix line flag validation in lineevent_create
      drivers/gpio/gpiolib.c
  * gpio: fix line flag validation in linehandle_create
      drivers/gpio/gpiolib.c
    Revert "MIPS: SiByte: Enable swiotlb for SWARM, LittleSur and BigSur"
  * tun: fix use-after-free when register netdev failed
      drivers/net/tun.c
    tipc: add NULL pointer check before calling kfree_rcu
  * tcp: fix tcp_ecn_withdraw_cwr() to clear TCP_ECN_QUEUE_CWR
      net/ipv4/tcp_input.c
    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: gso: Fix skb_segment splat when splitting gso_size mangled skb having linear-headed frag_list
      net/core/skbuff.c
  * net: Fix null de-reference of device refcount
      net/core/dev.c
    isdn/capi: check message length in capi_write()
  * ipv6: Fix the link time qualifier of 'ping_v6_proc_exit_net()'
      net/ipv6/ping.c
  * cdc_ether: fix rndis support for Mediatek based smartphones
      drivers/net/usb/cdc_ether.c
  * bridge/mdb: remove wrong use of NLM_F_MULTI
      net/bridge/br_mdb.c
  * ANDROID: regression introduced override_creds=off
      fs/overlayfs/dir.c
  * UPSTREAM: psi: get poll_work to run when calling poll syscall next time
      kernel/sched/psi.c
  * UPSTREAM: sched/psi: Do not require setsched permission from the trigger creator
      kernel/sched/psi.c
  * UPSTREAM: sched/psi: Reduce psimon FIFO priority
      kernel/sched/psi.c
    Merge 4.9.193 into android-4.9-q
Linux 4.9.193
    vhost: make sure log_num < in_num
    clk: s2mps11: Add used attribute to s2mps11_dt_match
    scripts/decode_stacktrace: match basepath using shell prefix operator, not regex
    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
  * ip6: fix skb leak in ip6frag_expire_frag_queue()
      include/net/ipv6_frag.h
  * xfrm: clean up xfrm protocol checks
      include/net/xfrm.h
      net/key/af_key.c
      net/xfrm/xfrm_state.c
      net/xfrm/xfrm_user.c
    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
      kernel/sched/fair.c
    ALSA: hda/realtek - Fix overridden device-specific initialization
    ALSA: hda - Fix potential endless loop at applying quirks
  * ANDROID: Revert "ANDROID: sched: Disallow WALT with CFS bandwidth control"
      init/Kconfig
  * ANDROID: sched: WALT: Add support for CFS_BANDWIDTH
      kernel/sched/fair.c
  * ANDROID: sched: WALT: Refactor cumulative runnable average fixup
      kernel/sched/deadline.c
      kernel/sched/fair.c
      kernel/sched/rt.c
      kernel/sched/sched.h
      kernel/sched/stop_task.c
      kernel/sched/walt.c
      kernel/sched/walt.h

Change-Id: Ifc17376212d89db44dc48d0963b25d93ff1cb978
Signed-off-by: Robin Peng <robinpeng@google.com>
2019-11-01 12:32:49 +08:00
Greg Kroah-Hartman
cd0d461b89 Merge 4.9.196 into android-4.9-q
Changes in 4.9.196
	drm/bridge: tc358767: Increase AUX transfer length limit
	video: ssd1307fb: Start page range at page_offset
	drm/radeon: Fix EEH during kexec
	gpu: drm: radeon: Fix a possible null-pointer dereference in radeon_connector_set_property()
	ipmi_si: Only schedule continuously in the thread in maintenance mode
	clk: qoriq: Fix -Wunused-const-variable
	clk: sirf: Don't reference clk_init_data after registration
	powerpc/rtas: use device model APIs and serialization during LPM
	powerpc/futex: Fix warning: 'oldval' may be used uninitialized in this function
	powerpc/pseries/mobility: use cond_resched when updating device tree
	pinctrl: tegra: Fix write barrier placement in pmx_writel
	vfio_pci: Restore original state on release
	drm/amdgpu/si: fix ASIC tests
	powerpc/64s/exception: machine check use correct cfar for late handler
	powerpc/pseries: correctly track irq state in default idle
	arm64: fix unreachable code issue with cmpxchg
	clk: at91: select parent if main oscillator or bypass is enabled
	scsi: core: Reduce memory required for SCSI logging
	MIPS: tlbex: Explicitly cast _PAGE_NO_EXEC to a boolean
	mfd: intel-lpss: Remove D3cold delay
	PCI: tegra: Fix OF node reference leak
	ARM: 8898/1: mm: Don't treat faults reported from cache maintenance as writes
	HID: apple: Fix stuck function keys when using FN
	security: smack: Fix possible null-pointer dereferences in smack_socket_sock_rcv_skb()
	ARM: 8903/1: ensure that usable memory in bank 0 starts from a PMD-aligned address
	fat: work around race with userspace's read via blockdev while mounting
	hypfs: Fix error number left in struct pointer member
	ocfs2: wait for recovering done after direct unlock request
	kmemleak: increase DEBUG_KMEMLEAK_EARLY_LOG_SIZE default to 16K
	ANDROID: binder: remove waitqueue when thread exits.
	ANDROID: binder: synchronize_rcu() when using POLLFREE.
	cxgb4:Fix out-of-bounds MSI-X info array access
	hso: fix NULL-deref on tty open
	ipv6: drop incoming packets having a v4mapped source address
	net: ipv4: avoid mixed n_redirects and rate_tokens usage
	net: qlogic: Fix memory leak in ql_alloc_large_buffers
	net: Unpublish sk from sk_reuseport_cb before call_rcu
	nfc: fix memory leak in llcp_sock_bind()
	qmi_wwan: add support for Cinterion CLS8 devices
	sch_dsmark: fix potential NULL deref in dsmark_init()
	net/rds: Fix error handling in rds_ib_add_one()
	xen-netfront: do not use ~0U as error return value for xennet_fill_frags()
	sch_cbq: validate TCA_CBQ_WRROPT to avoid crash
	ipv6: Handle missing host route in __ipv6_ifa_notify
	Smack: Don't ignore other bprm->unsafe flags if LSM_UNSAFE_PTRACE is set
	smack: use GFP_NOFS while holding inode_smack::smk_lock
	NFC: fix attrs checks in netlink interface
	Linux 4.9.196

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2019-10-07 19:45:36 +02:00
Nicolas Boichat
198d33ad87 kmemleak: increase DEBUG_KMEMLEAK_EARLY_LOG_SIZE default to 16K
[ Upstream commit b751c52bb587ae66f773b15204ef7a147467f4c7 ]

The current default value (400) is too low on many systems (e.g.  some
ARM64 platform takes up 1000+ entries).

syzbot uses 16000 as default value, and has proved to be enough on beefy
configurations, so let's pick that value.

This consumes more RAM on boot (each entry is 160 bytes, so in total
~2.5MB of RAM), but the memory would later be freed (early_log is
__initdata).

Link: http://lkml.kernel.org/r/20190730154027.101525-1-drinkcat@chromium.org
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Suggested-by: Dmitry Vyukov <dvyukov@google.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Dmitry Vyukov <dvyukov@google.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Joe Lawrence <joe.lawrence@redhat.com>
Cc: Uladzislau Rezki <urezki@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-10-07 18:53:19 +02:00
Jason A. Donenfeld
53e054b3cd siphash: add cryptographically secure PRF
commit 2c956a60778cbb6a27e0c7a8a52a91378c90e1d1 upstream.

SipHash is a 64-bit keyed hash function that is actually a
cryptographically secure PRF, like HMAC. Except SipHash is super fast,
and is meant to be used as a hashtable keyed lookup function, or as a
general PRF for short input use cases, such as sequence numbers or RNG
chaining.

For the first usage:

There are a variety of attacks known as "hashtable poisoning" in which an
attacker forms some data such that the hash of that data will be the
same, and then preceeds to fill up all entries of a hashbucket. This is
a realistic and well-known denial-of-service vector. Currently
hashtables use jhash, which is fast but not secure, and some kind of
rotating key scheme (or none at all, which isn't good). SipHash is meant
as a replacement for jhash in these cases.

There are a modicum of places in the kernel that are vulnerable to
hashtable poisoning attacks, either via userspace vectors or network
vectors, and there's not a reliable mechanism inside the kernel at the
moment to fix it. The first step toward fixing these issues is actually
getting a secure primitive into the kernel for developers to use. Then
we can, bit by bit, port things over to it as deemed appropriate.

While SipHash is extremely fast for a cryptographically secure function,
it is likely a bit slower than the insecure jhash, and so replacements
will be evaluated on a case-by-case basis based on whether or not the
difference in speed is negligible and whether or not the current jhash usage
poses a real security risk.

For the second usage:

A few places in the kernel are using MD5 or SHA1 for creating secure
sequence numbers, syn cookies, port numbers, or fast random numbers.
SipHash is a faster and more fitting, and more secure replacement for MD5
in those situations. Replacing MD5 and SHA1 with SipHash for these uses is
obvious and straight-forward, and so is submitted along with this patch
series. There shouldn't be much of a debate over its efficacy.

Dozens of languages are already using this internally for their hash
tables and PRFs. Some of the BSDs already use this in their kernels.
SipHash is a widely known high-speed solution to a widely known set of
problems, and it's time we catch-up.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Jean-Philippe Aumasson <jeanphilippe.aumasson@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Eric Biggers <ebiggers3@gmail.com>
Cc: David Laight <David.Laight@aculab.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 4.9 as dependency of commits df453700e8d8 "inet: switch
 IP ID generator to siphash" and 3c79107631db "netfilter: ctnetlink: don't
 use conntrack/expect object addresses as id"]
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-25 10:51:42 +02:00
Robin Peng
9d1d8bfe73 Merge branch 'android-msm-bluecross-4.9' into android-msm-pixel-4.9
Bug: 119540871
Change-Id: I35a68cbc21747073dc452bad0bad52d5cdd7ba46
Signed-off-by: Robin Peng <robinpeng@google.com>
2019-04-03 10:17:42 +08:00
Robin Peng
0f7bd72791 Merge branch 'android-msm-bluecross-4.9' into android-msm-pixel-4.9
Bug: 119540871
Change-Id: Ic655747be2e2733844ffd77251c2e275b32794c1
Signed-off-by: Robin Peng <robinpeng@google.com>
2019-04-01 11:22:55 +08:00
Petri Gynther
b5d151ed14 Merge android-4.9 (4.9.165+) into android-msm-bluecross-4.9-lts
commit 86a136d920 ("Revert "ANDROID: input: keychord: Add keychord driver"")
is the base for android-4.9-q branch.

  * Revert "ANDROID: input: keychord: Add keychord driver"
      drivers/input/misc/Kconfig
      drivers/input/misc/Makefile
    Revert "ANDROID: input: misc: keychord: move header to uapi"
    Revert "ANDROID: input: misc: keychord: log when keychord triggered"
    Revert "ANDROID: keychord: Fix a slab out-of-bounds read."
    Revert "Use %zu to print resid (size_t)."
    Revert "ANDROID: keychord: Fix races in keychord_write."
    Revert "ANDROID: keychord: Fix for a memory leak in keychord."
    Revert "ANDROID: keychord: Check for write data size"
    ANDROID: drop CONFIG_INPUT_KEYCHORD from cuttlefish and ranchu
  * BACKPORT: mm/debug.c: provide useful debugging information for VM_BUG
      mm/debug.c
  * UPSTREAM: bug: use %pB in BUG and stack protector failure
      kernel/panic.c
      lib/bug.c
    UPSTREAM: x86/alternative: Print unadorned pointers
    UPSTREAM: trace_uprobe: Display correct offset in uprobe_events
  * UPSTREAM: usercopy: Remove pointer from overflow report
      mm/usercopy.c
    UPSTREAM: Do not hash userspace addresses in fault handlers
    UPSTREAM: mm/slab.c: do not hash pointers when debugging slab
    UPSTREAM: kasan: use %px to print addresses instead of %p
  * BACKPORT: vsprintf: add printk specifier %px
      lib/vsprintf.c
  * BACKPORT: printk: hash addresses printed with %p
      lib/vsprintf.c
  * ANDROID: Fix race in crng_reseed()
      drivers/char/random.c
  * UPSTREAM: siphash: implement HalfSipHash1-3 for hash tables
      include/linux/siphash.h
      lib/siphash.c
  * UPSTREAM: siphash: add cryptographically secure PRF
      include/linux/siphash.h
      lib/Kconfig.debug
      lib/Makefile
      lib/siphash.c
  * BACKPORT: vsprintf: refactor %pK code out of pointer()
      lib/vsprintf.c
    BACKPORT: docs: correct documentation for %pK
    Merge upstream-f2fs-stable-linux-4.9.y into android-4.9
  * BACKPORT: filemap: add a comment about FAULT_FLAG_RETRY_NOWAIT behavior
      mm/filemap.c
  * BACKPORT: filemap: drop the mmap_sem for all blocking operations
      mm/filemap.c
  * BACKPORT: filemap: kill page_cache_read usage in filemap_fault
      include/linux/pagemap.h
      mm/filemap.c
  * ANDROID: binder: remove extra declaration left after backport
      drivers/android/binder.c
  * UPSTREAM: net: socket: set sock->sk to NULL after calling proto_ops::release()
      net/socket.c
  * FROMGIT: binder: fix BUG_ON found by selinux-testsuite
      drivers/android/binder.c
    ANDROID: dm-bow: Fix 32 bit compile errors
  * ANDROID: fix 4.9 backport of psi header refactoring
      kernel/sched/core.c
  * UPSTREAM: mm: proc: smaps_rollup: fix pss_locked calculation
      fs/proc/task_mmu.c
  * UPSTREAM: binder: fix handling of misaligned binder object
      drivers/android/binder.c
    UPSTREAM: binder: fix sparse issue in binder_alloc_selftest.c
  * BACKPORT: binder: use userspace pointer as base of buffer space
      drivers/android/binder.c
      drivers/android/binder_alloc.c
      drivers/android/binder_alloc.h
      drivers/android/binder_trace.h
  * UPSTREAM: binder: fix kerneldoc header for struct binder_buffer
      drivers/android/binder_alloc.h
  * BACKPORT: binder: remove user_buffer_offset
      drivers/android/binder.c
      drivers/android/binder_alloc.c
      drivers/android/binder_alloc.h
  * UPSTREAM: binder: remove kernel vm_area for buffer space
      drivers/android/binder_alloc.c
  * UPSTREAM: binder: avoid kernel vm_area for buffer fixups
      drivers/android/binder.c
  * BACKPORT: binder: add function to copy binder object from buffer
      drivers/android/binder.c
  * BACKPORT: binder: add functions to copy to/from binder buffers
      drivers/android/binder.c
      drivers/android/binder_alloc.c
      drivers/android/binder_alloc.h
  * UPSTREAM: binder: create userspace-to-binder-buffer copy function
      drivers/android/binder.c
      drivers/android/binder_alloc.c
      drivers/android/binder_alloc.h
    ANDROID: Add dm-bow to cuttlefish configuration
    ANDROID: dm-bow: Backport to 4.9
    ANDROID: dm-bow: backport to 4.14
  * ANDROID: dm-bow: Add dm-bow feature
      drivers/md/Kconfig
      drivers/md/Makefile
  * f2fs: set pin_file under CAP_SYS_ADMIN
      fs/f2fs/file.c
  * f2fs: fix to avoid deadlock in f2fs_read_inline_dir()
      fs/f2fs/inline.c
  * f2fs: fix to adapt small inline xattr space in __find_inline_xattr()
      fs/f2fs/xattr.c
  * f2fs: fix to do sanity check with inode.i_inline_xattr_size
      fs/f2fs/inode.c
      fs/f2fs/super.c
      fs/f2fs/xattr.h
  * f2fs: give some messages for inline_xattr_size
      fs/f2fs/super.c
  * f2fs: don't trigger read IO for beyond EOF page
      fs/f2fs/data.c
  * f2fs: fix to add refcount once page is tagged PG_private
      fs/f2fs/checkpoint.c
      fs/f2fs/data.c
      fs/f2fs/dir.c
      fs/f2fs/f2fs.h
      fs/f2fs/node.c
      fs/f2fs/segment.c
  * f2fs: remove wrong comment in f2fs_invalidate_page()
      fs/f2fs/data.c
  * f2fs: fix to use kvfree instead of kzfree
      fs/f2fs/xattr.c
  * f2fs: print more parameters in trace_f2fs_map_blocks
      include/trace/events/f2fs.h
  * f2fs: trace f2fs_ioc_shutdown
      fs/f2fs/file.c
      include/trace/events/f2fs.h
  * f2fs: fix to avoid deadlock of atomic file operations
      fs/f2fs/segment.c
  * f2fs: fix to dirty inode for i_mode recovery
      fs/f2fs/file.c
  * f2fs: give random value to i_generation
      fs/f2fs/f2fs.h
      fs/f2fs/namei.c
      fs/f2fs/super.c
  * f2fs: no need to take page lock in readdir
      fs/f2fs/dir.c
  * f2fs: fix to update iostat correctly in IPU path
      fs/f2fs/segment.c
  * f2fs: fix encrypted page memory leak
      fs/f2fs/data.c
  * f2fs: make fault injection covering __submit_flush_wait()
      fs/f2fs/segment.c
  * f2fs: fix to retry fill_super only if recovery failed
      fs/f2fs/super.c
  * f2fs: silence VM_WARN_ON_ONCE in mempool_alloc
      fs/f2fs/data.c
  * f2fs: correct spelling mistake
      include/linux/f2fs_fs.h
  * f2fs: fix wrong #endif
      fs/f2fs/f2fs.h
  * f2fs: don't clear CP_QUOTA_NEED_FSCK_FLAG
      fs/f2fs/checkpoint.c
  * f2fs: don't allow negative ->write_io_size_bits
      fs/f2fs/super.c
  * f2fs: fix to check inline_xattr_size boundary correctly
      fs/f2fs/f2fs.h
      fs/f2fs/super.c
      include/linux/f2fs_fs.h
  * Revert "f2fs: fix to avoid deadlock of atomic file operations"
      fs/f2fs/segment.c
  * Revert "f2fs: fix to check inline_xattr_size boundary correctly"
      fs/f2fs/f2fs.h
      fs/f2fs/super.c
      include/linux/f2fs_fs.h
    f2fs: do not use mutex lock in atomic context
  * f2fs: fix potential data inconsistence of checkpoint
      fs/f2fs/data.c
      fs/f2fs/f2fs.h
      fs/f2fs/file.c
      fs/f2fs/inline.c
  * f2fs: fix to avoid deadlock of atomic file operations
      fs/f2fs/segment.c
  * f2fs: fix to check inline_xattr_size boundary correctly
      fs/f2fs/f2fs.h
      fs/f2fs/super.c
      include/linux/f2fs_fs.h
  * f2fs: jump to label 'free_node_inode' when failing from d_make_root()
      fs/f2fs/super.c
    f2fs: fix to document inline_xattr_size option
  * f2fs: fix to data block override node segment by mistake
      fs/f2fs/super.c
  * f2fs: fix typos in code comments
      include/linux/f2fs_fs.h
  * f2fs: use xattr_prefix to wrap up
      fs/f2fs/xattr.c
  * f2fs: sync filesystem after roll-forward recovery
      fs/f2fs/checkpoint.c
      fs/f2fs/node.c
      fs/f2fs/super.c
  * fs: export evict_inodes
      fs/inode.c
      fs/internal.h
      include/linux/fs.h
  * f2fs: flush quota blocks after turnning it off
      fs/f2fs/super.c
  * f2fs: avoid null pointer exception in dcc_info
      fs/f2fs/f2fs.h
  * f2fs: don't wake up too frequently, if there is lots of IOs
      fs/f2fs/segment.h
  * f2fs: try to keep CP_TRIMMED_FLAG after successful umount
      fs/f2fs/segment.c
  * f2fs: add quick mode of checkpoint=disable for QA
      fs/f2fs/checkpoint.c
      fs/f2fs/f2fs.h
      fs/f2fs/file.c
      fs/f2fs/segment.c
      fs/f2fs/super.c
      include/linux/f2fs_fs.h
  * f2fs: run discard jobs when put_super
      fs/f2fs/f2fs.h
      fs/f2fs/segment.c
      fs/f2fs/super.c
      fs/f2fs/sysfs.c
  * f2fs: fix to set sbi dirty correctly
      fs/f2fs/f2fs.h
  * f2fs: UBSAN: set boolean value iostat_enable correctly
      fs/f2fs/sysfs.c
  * f2fs: add brackets for macros
      fs/f2fs/f2fs.h
  * f2fs: check if file namelen exceeds max value
      fs/f2fs/dir.c
  * f2fs: fix to trigger fsck if dirent.name_len is zero
      fs/f2fs/dir.c
  * f2fs: no need to check return value of debugfs_create functions
      fs/f2fs/debug.c
      fs/f2fs/f2fs.h
      fs/f2fs/super.c
  * f2fs: export FS_NOCOW_FL flag to user
      fs/f2fs/f2fs.h
      fs/f2fs/file.c
  * f2fs: check inject_rate validity during configuring
      fs/f2fs/sysfs.c
  * f2fs: remove set but not used variable 'err'
      fs/f2fs/data.c
  * f2fs: fix compile warnings: 'struct *' declared inside parameter list
      include/trace/events/f2fs.h
  * f2fs: change error code to -ENOMEM from -EINVAL
      fs/f2fs/super.c

Change-Id: I199547b8a925245ea0fd613296fc5cedb762c5f6
Signed-off-by: Petri Gynther <pgynther@google.com>
2019-03-29 16:45:44 -07:00
Jason A. Donenfeld
c626ddeab6 UPSTREAM: siphash: add cryptographically secure PRF
SipHash is a 64-bit keyed hash function that is actually a
cryptographically secure PRF, like HMAC. Except SipHash is super fast,
and is meant to be used as a hashtable keyed lookup function, or as a
general PRF for short input use cases, such as sequence numbers or RNG
chaining.

For the first usage:

There are a variety of attacks known as "hashtable poisoning" in which an
attacker forms some data such that the hash of that data will be the
same, and then preceeds to fill up all entries of a hashbucket. This is
a realistic and well-known denial-of-service vector. Currently
hashtables use jhash, which is fast but not secure, and some kind of
rotating key scheme (or none at all, which isn't good). SipHash is meant
as a replacement for jhash in these cases.

There are a modicum of places in the kernel that are vulnerable to
hashtable poisoning attacks, either via userspace vectors or network
vectors, and there's not a reliable mechanism inside the kernel at the
moment to fix it. The first step toward fixing these issues is actually
getting a secure primitive into the kernel for developers to use. Then
we can, bit by bit, port things over to it as deemed appropriate.

While SipHash is extremely fast for a cryptographically secure function,
it is likely a bit slower than the insecure jhash, and so replacements
will be evaluated on a case-by-case basis based on whether or not the
difference in speed is negligible and whether or not the current jhash usage
poses a real security risk.

For the second usage:

A few places in the kernel are using MD5 or SHA1 for creating secure
sequence numbers, syn cookies, port numbers, or fast random numbers.
SipHash is a faster and more fitting, and more secure replacement for MD5
in those situations. Replacing MD5 and SHA1 with SipHash for these uses is
obvious and straight-forward, and so is submitted along with this patch
series. There shouldn't be much of a debate over its efficacy.

Dozens of languages are already using this internally for their hash
tables and PRFs. Some of the BSDs already use this in their kernels.
SipHash is a widely known high-speed solution to a widely known set of
problems, and it's time we catch-up.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Jean-Philippe Aumasson <jeanphilippe.aumasson@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Eric Biggers <ebiggers3@gmail.com>
Cc: David Laight <David.Laight@aculab.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 2c956a60778cbb6a27e0c7a8a52a91378c90e1d1)
Signed-off-by: Sandeep Patil <sspatil@android.com>

Bug: 78533979
Test: Build and boot cuttlefish
Change-Id: I4f796f1f4db687c51e97c4dc0a555bdc44f22a50
2019-03-28 21:13:03 -07:00
Eva Huang
7ac7541935 arm64/config: b1c1: support panic on warn by config
Add config:
  CONFIG_PANIC_ON_WARN_DEFAULT_ENABLE

This patchset adds CONFIG_PANIC_ON_DEFAULT_ENABLE to determine
the behavior at build time. Even though we could do same thing
by kernel parameter, it's not handy for vendor kernel because
they usually store kernel cmd parameter into different partition
with kernel so that it needs platform image rebuild to change
kernel cmd line as well as kernel image.

To remove such dependency to save much time, this patch adds
default enable by Kconfig at build time.

Bug: 119288681
Change-Id: Ib73e6e2c8d2c2e87ad96cd4c59feeb1c8102d041
Signed-off-by: Eva Huang <evahuang@google.com>
2019-03-29 11:50:21 +08:00
Robin Peng
75df7e66d2 Merge branch 'android-msm-bluecross-4.9' into android-msm-pixel-4.9
Conflicts:
	arch/arm64/boot/dts/qcom/sdm845-670-usb-common.dtsi
	block/bio.c
	build.config.common
	drivers/char/adsprpc.c
	drivers/gpu/drm/msm/sde/sde_encoder.c
	drivers/media/platform/msm/camera/cam_core/cam_context.c
	drivers/media/platform/msm/camera/cam_core/cam_node.c
	drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c
	drivers/media/platform/msm/camera/cam_sensor_module/cam_eeprom/cam_eeprom_core.c
	drivers/media/platform/msm/camera/cam_sensor_module/cam_ois/cam_ois_core.c
	drivers/media/platform/msm/camera/cam_sensor_module/cam_sensor_utils/cam_sensor_util.c
	drivers/regulator/qpnp-labibb-regulator.c
	drivers/usb/dwc3/dwc3-msm.c
	fs/crypto/Makefile
	fs/crypto/fscrypt_ice.h
	fs/crypto/fscrypt_private.h
	fs/crypto/keyinfo.c
	fs/direct-io.c
	fs/f2fs/f2fs.h
	fs/f2fs/file.c
	fs/f2fs/sysfs.c
	include/linux/blk_types.h
	kernel/events/core.c
	security/pfe/pfk.c
	security/pfe/pfk_ecryptfs.h
	security/pfe/pfk_fscrypt.c
	security/pfe/pfk_fscrypt.h

Bug: 119540871
Change-Id: I3ce34ab630c7272e1a250e6d917724f96a01b37e
Signed-off-by: Robin Peng <robinpeng@google.com>
Signed-off-by: Ocean Chen <oceanchen@google.com>
2019-03-08 23:00:34 +08:00
Nicolai Stange
c7e71b8a4f debugfs: purge obsolete SRCU based removal protection
Purge the SRCU based file removal race protection in favour of the new,
refcount based debugfs_file_get()/debugfs_file_put() API.

Fixes: 49d200deaa ("debugfs: prevent access to removed files' private
                      data")
Signed-off-by: Nicolai Stange <nicstange@gmail.com>
2019-03-04 15:23:37 +08:00
Peter Zijlstra
bad1263fac refcount_t: Introduce a special purpose refcount type
Provide refcount_t, an atomic_t like primitive built just for
refcounting.

It provides saturation semantics such that overflow becomes impossible
and thereby 'spurious' use-after-free is avoided.

Change-Id: Id360e29bb9c19af8672726539d0d16c0f6d2be3f
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Git-commit: f405df5de3170c00e5c54f8b7cf4766044a032ba
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Srinivasa Rao Kuppala <srkupp@codeaurora.org>
2019-03-04 15:23:37 +08:00
Petri Gynther
82fb8eb1d4 Merge android-4.9 into android-msm-bluecross-4.9-lts
Merge android-4.9 common kernel into B1/C1 kernel LTS staging branch.

Since android-msm-bluecross-4.9-lts is currently merged to LTS 4.9.150,
I deliberately chose to merge only up to:

commit ca975794ea ("ANDROID: cuttlefish: enable CONFIG_NET_CLS_BPF=y")

which is the last commit on android-4.9 before LTS 4.9.151 was merged in.

drivers/android/binder.c
reviewed by tkjos@

drivers/block/zram/
resolved and reviewed by minchan@

drivers/cpufreq/cpufreq_times.c
reviewed by cfries@

drivers/staging/android/ion/
reviewed by pgynther@

fs/crypto/
resolved and reviewed by ebiggers@ and jaegeuk@

fs/f2fs/
resolved and reviewed by jaegeuk@

fs/squashfs/
resolved with 'git checkout --theirs' (take android-4.9 as-is)

kernel/sched/
resolved and reviewed by tkjos@

Bug: 115649324
Test: Manual testing
Change-Id: Ib374f720a7ab4cf4146177584e486124eff75de3
Signed-off-by: Petri Gynther <pgynther@google.com>
2019-01-24 23:35:45 -08:00
Kees Cook
8fb63b1dc6 UPSTREAM: bug: Provide toggle for BUG on data corruption
(cherry-picked from de54ebbe26bb371a6f1fbc0593372232f04e3107)

The kernel checks for cases of data structure corruption under some
CONFIGs (e.g. CONFIG_DEBUG_LIST). When corruption is detected, some
systems may want to BUG() immediately instead of letting the system run
with known corruption.  Usually these kinds of manipulation primitives can
be used by security flaws to gain arbitrary memory write control. This
provides a new config CONFIG_BUG_ON_DATA_CORRUPTION and a corresponding
macro CHECK_DATA_CORRUPTION for handling these situations. Notably, even
if not BUGing, the kernel should not continue processing the corrupted
structure.

This is inspired by similar hardening by Syed Rameez Mustafa in MSM
kernels, and in PaX and Grsecurity, which is likely in response to earlier
removal of the BUG calls in commit 924d9addb9 ("list debugging: use
WARN() instead of BUG()").

Change-Id: I81927d2aa3684d676934ac109833fe71f0bc0156
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Satya Tangirala <satyat@google.com>
2018-09-21 15:09:16 -07:00
Siqi Lin
48fbd01d32 ANDROID: kernel: printk: Add cpu and pid to printk log prefix
Add CPU number and process ID to printk log messages. This information
is useful to get a timeline of what was running on a CPU before a
watchdog.

Based on commit bf1f48d03d41 ("kernel: printk: Add cpu and pid into log prefix")
from android-msm-marlin-3.18.

Bug: 110703904
Change-Id: I74d11c3bf8d5b3e68572d8dd83609213531cbdd9
Signed-off-by: Siqi Lin <siqilin@google.com>
2018-06-22 21:12:58 +00:00
Cyan_Hsieh
e9eb3984e2 Merge LA.UM.7.3.9.08.00.00.385.328 via branch qcom-msm-4.9 into android-msm-bluecross-4.9
Merge Qualcomm's LA.UM.7.3.9.08.00.00.385.328

Removed camera related changes with

git checkout partner/android-msm-bluecross-4.9 -- drivers/media/platform/msm/camera/ \
drivers/media/platform/msm/camera_v2/ \
include/uapi/media/cam_req_mgr.h

Conflicts:
	Documentation/devicetree/bindings/drm/msm/mdss-dsi-panel.txt
	Documentation/filesystems/f2fs.txt
	Makefile
	arch/Kconfig
	arch/arm64/Kconfig
	arch/arm64/boot/dts/qcom/sdm845-v2.dtsi
	arch/arm64/crypto/Makefile
	arch/arm64/kernel/entry.S
	arch/arm64/kernel/vdso/Makefile
	drivers/firmware/efi/libstub/Makefile
	drivers/gpu/drm/msm/dsi-staging/dsi_display.c
	drivers/gpu/drm/msm/sde/sde_kms.c
	drivers/hwtracing/coresight/coresight-event.c
	drivers/media/platform/msm/camera_v2/sensor/csiphy/msm_csiphy.c
	drivers/misc/Makefile
	drivers/power/supply/qcom/Kconfig
	drivers/power/supply/qcom/Makefile
	fs/crypto/fscrypt_private.h
	fs/f2fs/data.c
	fs/f2fs/f2fs.h
	fs/f2fs/file.c
	fs/f2fs/segment.c
	fs/f2fs/super.c
	fs/f2fs/inode.c
	fs/f2fs/sysfs.c
	include/linux/compiler-clang.h
	include/linux/compiler.h
	include/linux/fscrypt.h
	include/linux/init.h
	include/linux/jiffies.h
	include/trace/events/sched.h
	kernel/Makefile
	kernel/cfi.c
	kernel/sched/core.c
	kernel/sched/fair.c
	mm/filemap.c

Bug: 80274434
Change-Id: I8640c44aa3978666364fd08bb9b8748e95a1e3ff
Signed-off-by: aaronding <aaronding@google.com>
Signed-off-by: Cyan_Hsieh <cyanhsieh@google.com>
2018-06-01 15:59:44 +08:00
Daniel Mentz
9c715ce859 Merge LA.UM.7.3.9.08.00.00.385.245 via branch qcom-msm-4.9 into android-msm-bluecross-4.9
Merge Qualcomm's LA.UM.7.3.9.08.00.00.385.245

Conflicts:
	Makefile
	arch/arm64/Makefile
	arch/arm64/boot/dts/qcom/pfk_ecryptfs.h
	arch/arm64/include/asm/signal32.h
	arch/arm64/kernel/vdso/gettimeofday.S
	block/bio.c
	block/blk-core.c
	block/blk-merge.c
	drivers/crypto/msm/ice.c
	drivers/input/touchscreen/Makefile
	drivers/media/platform/msm/camera/cam_isp/cam_isp_context.c
	drivers/media/platform/msm/camera/cam_isp/cam_isp_context.h
	drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c
	drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c
	drivers/power/supply/power_supply_sysfs.c
	drivers/power/supply/qcom/Makefile
	drivers/scsi/ufs/ufs-qcom-ice.c
	drivers/scsi/ufs/ufshcd.c
	drivers/video/console/dummycon.c
	fs/crypto/Kconfig
	fs/crypto/Makefile
	fs/crypto/fscrypt_private.h
	fs/crypto/keyinfo.c
	fs/direct-io.c
	fs/ext4/inode.c
	fs/ext4/page-io.c
	fs/f2fs/data.c
	fs/f2fs/f2fs.h
	fs/f2fs/file.c
	fs/f2fs/node.c
	fs/f2fs/super.c
	include/linux/blkdev.h
	include/linux/f2fs_fs.h
	include/linux/fscrypt.h
	include/linux/fscrypt_notsupp.h
	include/linux/fscrypt_supp.h
	include/linux/pfk.h
	include/linux/power_supply.h
	include/linux/security.h
	include/linux/tcp.h
	include/uapi/linux/fs.h
	kernel/sched/cpufreq_schedutil.c
	kernel/sched/fair.c
	net/ipv4/tcp.c
	scripts/Kbuild.include
	security/Kconfig
	security/pfe/Kconfig
	security/pfe/Makefile
	security/pfe/pfk.c
	security/pfe/pfk_internal.h
	security/pfe/pfk_kc.c
	security/pfe/pfk_kc.h
	security/security.c
	security/selinux/include/objsec.h

Change-Id: I7601101b4be54a5f662908bc51d1f60793346885
2018-04-19 17:20:26 -07:00
Matt Wagantall
72633f8045 exit: Add PANIC_ON_RECURSIVE_FAULT Kconfig option
If a recursive fault is detected during do_exit(), tasks are left
to sit and wait in an un-interruptible sleep until the system
reboots (typically manually). Add Kconfig option to change this
behaviour and force a panic.

This is particularly important if a critical system task encounters
a recursive fault (ex. a kworker). Otherwise, the system may be
unusable, but since the scheduler is still running system watchdogs
may continue to be pet.

Change-Id: Ifc26fc79d6066f05a3b2c4d27f78bf4f8d2bd640
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2018-04-16 17:49:42 -07:00
Blagovest Kolenichev
e06a1054bd Merge android-4.9.84 (a9d0273) into msm-4.9
* refs/heads/tmp-a9d0273:
  Linux 4.9.84
  crypto: s5p-sss - Fix kernel Oops in AES-ECB mode
  KVM: nVMX: invvpid handling improvements
  KVM: VMX: clean up declaration of VPID/EPT invalidation types
  KVM: async_pf: Fix #DF due to inject "Page not Present" and "Page Ready" exceptions simultaneously
  x86/microcode/AMD: Change load_microcode_amd()'s param to bool to fix preemptibility bug
  usb: phy: msm add regulator dependency
  arm64: fix warning about swapper_pg_dir overflow
  idle: i7300: add PCI dependency
  spi: bcm-qspi: shut up warning about cfi header inclusion
  binfmt_elf: compat: avoid unused function warning
  arm64: sunxi: always enable reset controller
  drm/i915: hide unused intel_panel_set_backlight function
  kasan: rework Kconfig settings
  clk: meson: gxbb: fix build error without RESET_CONTROLLER
  ISDN: eicon: reduce stack size of sig_ind function
  tw5864: use dev_warn instead of WARN to shut up warning
  em28xx: only use mt9v011 if camera support is enabled
  go7007: add MEDIA_CAMERA_SUPPORT dependency
  tc358743: fix register i2c_rd/wr functions
  shmem: fix compilation warnings on unused functions
  KVM: add X86_LOCAL_APIC dependency
  Input: tca8418_keypad - hide gcc-4.9 -Wmaybe-uninitialized warning
  drm/nouveau: hide gcc-4.9 -Wmaybe-uninitialized
  rbd: silence bogus -Wmaybe-uninitialized warning
  drm: exynos: mark pm functions as __maybe_unused
  security/keys: BIG_KEY requires CONFIG_CRYPTO
  cw1200: fix bogus maybe-uninitialized warning
  reiserfs: avoid a -Wmaybe-uninitialized warning
  ALSA: hda/ca0132 - fix possible NULL pointer use
  arm64: Kconfig: select COMPAT_BINFMT_ELF only when BINFMT_ELF is set
  scsi: advansys: fix uninitialized data access
  x86/vm86: Fix unused variable warning if THP is disabled
  x86/platform: Add PCI dependency for PUNIT_ATOM_DEBUG
  dmaengine: zx: fix build warning
  x86: add MULTIUSER dependency for KVM
  thermal: fix INTEL_SOC_DTS_IOSF_CORE dependencies
  x86/build: Silence the build with "make -s"
  tools build: Add tools tree support for 'make -s'
  x86/fpu/math-emu: Fix possible uninitialized variable use
  arm64: define BUG() instruction without CONFIG_BUG
  gpio: xgene: mark PM functions as __maybe_unused
  x86/ras/inject: Make it depend on X86_LOCAL_APIC=y
  scsi: advansys: fix build warning for PCI=n
  video: fbdev: via: remove possibly unused variables
  perf: xgene: Include module.h
  PCI: Change pci_host_common_probe() visibility
  usb: musb: fix compilation warning on unused function
  platform/x86: intel_mid_thermal: Fix suspend handlers unused warning
  gpio: intel-mid: Fix build warning when !CONFIG_PM
  PCI: vmd: Fix suspend handlers defined-but-not-used warning
  perf/x86: Shut up false-positive -Wmaybe-uninitialized warning
  vmxnet3: prevent building with 64K pages
  clk: sunxi-ng: fix build error without CONFIG_RESET_CONTROLLER
  shmem: avoid maybe-uninitialized warning
  drm/i915: fix intel_backlight_device_register declaration
  crypto: talitos - fix Kernel Oops on hashing an empty file
  powerpc/64s: Improve RFI L1-D cache flush fallback
  powerpc/64s: Simple RFI macro conversions
  powerpc/64s: Fix conversion of slb_miss_common to use RFI_TO_USER/KERNEL
  hippi: Fix a Fix a possible sleep-in-atomic bug in rr_close
  xen: XEN_ACPI_PROCESSOR is Dom0-only
  platform/x86: dell-laptop: Fix keyboard max lighting for Dell Latitude E6410
  x86/mm/kmmio: Fix mmiotrace for page unaligned addresses
  mm/early_ioremap: Fix boot hang with earlyprintk=efi,keep
  usb: dwc3: of-simple: fix missing clk_disable_unprepare
  usb: dwc3: gadget: Wait longer for controller to end command processing
  dmaengine: jz4740: disable/unprepare clk if probe fails
  drm/armada: fix leak of crtc structure
  xfrm: Fix stack-out-of-bounds with misconfigured transport mode policies.
  spi: sun4i: disable clocks in the remove function
  ASoC: rockchip: disable clock on error
  clk: fix a panic error caused by accessing NULL pointer
  dmaengine: at_hdmac: fix potential NULL pointer dereference in atc_prep_dma_interleaved
  dmaengine: ioat: Fix error handling path
  gianfar: Disable EEE autoneg by default
  509: fix printing uninitialized stack memory when OID is empty
  net: ethernet: arc: fix error handling in emac_rockchip_probe
  brcmfmac: Avoid build error with make W=1
  btrfs: Fix possible off-by-one in btrfs_search_path_in_tree
  net_sched: red: Avoid illegal values
  net_sched: red: Avoid devision by zero
  gianfar: fix a flooded alignment reports because of padding issue.
  ARM: dts: Fix elm interrupt compiler warning
  s390/dasd: prevent prefix I/O error
  powerpc/perf: Fix oops when grouping different pmu events
  m68k: add missing SOFTIRQENTRY_TEXT linker section
  ipvlan: Add the skb->mark as flow4's member to lookup route
  scripts/kernel-doc: Don't fail with status != 0 if error encountered with -none
  sctp: only update outstanding_bytes for transmitted queue when doing prsctp_prune
  RDMA/cma: Make sure that PSN is not over max allowed
  i40iw: Correct ARP index mask
  pinctrl: sunxi: Fix A64 UART mux value
  pinctrl: sunxi: Fix A80 interrupt pin bank
  media: s5k6aa: describe some function parameters
  perf bench numa: Fixup discontiguous/sparse numa nodes
  perf top: Fix window dimensions change handling
  ARM: dts: am437x-cm-t43: Correct the dmas property of spi0
  ARM: dts: am4372: Correct the interrupts_properties of McASP
  ARM: dts: logicpd-somlv: Fix wl127x pinmux
  ARM: dts: logicpd-som-lv: Fix gpmc addresses for NAND and enet
  ARM: dts: Fix omap4 hang with GPS connected to USB by using wakeupgen
  ARM: AM33xx: PRM: Remove am33xx_pwrdm_read_prev_pwrst function
  ARM: OMAP2+: Fix SRAM virt to phys translation for save_secure_ram_context
  usb: build drivers/usb/common/ when USB_SUPPORT is set
  usbip: keep usbip_device sockfd state in sync with tcp_socket
  staging: iio: ad5933: switch buffer mode to software
  staging: iio: adc: ad7192: fix external frequency setting
  binder: check for binder_thread allocation failure in binder_poll()
  staging: android: ashmem: Fix a race condition in pin ioctls
  dn_getsockoptdecnet: move nf_{get/set}sockopt outside sock lock
  arm64: dts: add #cooling-cells to CPU nodes
  ARM: 8743/1: bL_switcher: add MODULE_LICENSE tag
  video: fbdev/mmp: add MODULE_LICENSE
  ASoC: ux500: add MODULE_LICENSE tag
  crypto: hash - prevent using keyed hashes without setting key
  crypto: hash - annotate algorithms taking optional key
  net: avoid skb_warn_bad_offload on IS_ERR
  rds: tcp: atomically purge entries from rds_tcp_conn_list during netns delete
  netfilter: xt_RATEEST: acquire xt_rateest_mutex for hash insert
  netfilter: xt_cgroup: initialize info->priv in cgroup_mt_check_v1()
  netfilter: on sockopt() acquire sock lock only in the required scope
  netfilter: ipt_CLUSTERIP: fix out-of-bounds accesses in clusterip_tg_check()
  netfilter: x_tables: avoid out-of-bounds reads in xt_request_find_{match|target}
  netfilter: x_tables: fix int overflow in xt_alloc_table_info()
  kcov: detect double association with a single task
  KVM: x86: fix escape of guest dr6 to the host
  blk_rq_map_user_iov: fix error override
  staging: android: ion: Switch from WARN to pr_warn
  staging: android: ion: Add __GFP_NOWARN for system contig heap
  crypto: x86/twofish-3way - Fix %rbp usage
  selinux: skip bounded transition processing if the policy isn't loaded
  selinux: ensure the context is NUL terminated in security_context_to_sid_core()
  Provide a function to create a NUL-terminated string from unterminated data
  ptr_ring: fail early if queue occupies more than KMALLOC_MAX_SIZE
  drm: Require __GFP_NOFAIL for the legacy drm_modeset_lock_all
  blktrace: fix unlocked registration of tracepoints
  sctp: set frag_point in sctp_setsockopt_maxseg correctly
  xfrm: check id proto in validate_tmpl()
  xfrm: Fix stack-out-of-bounds read on socket policy lookup.
  mm,vmscan: Make unregister_shrinker() no-op if register_shrinker() failed.
  xfrm: skip policies marked as dead while rehashing
  cfg80211: check dev_set_name() return value
  kcm: Only allow TCP sockets to be attached to a KCM mux
  kcm: Check if sk_user_data already set in kcm_attach
  vhost: use mutex_lock_nested() in vhost_dev_lock_vqs()
  ANDROID: sdcardfs: Hold i_mutex for i_size_write
  UPSTREAM: ANDROID: binder: synchronize_rcu() when using POLLFREE.
  BACKPORT, FROMGIT: crypto: speck - add test vectors for Speck64-XTS
  BACKPORT, FROMGIT: crypto: speck - add test vectors for Speck128-XTS
  BACKPORT, FROMGIT: crypto: arm/speck - add NEON-accelerated implementation of Speck-XTS
  FROMGIT: crypto: speck - export common helpers
  BACKPORT, FROMGIT: crypto: speck - add support for the Speck block cipher
  f2fs: updates on v4.16-rc1
  Linux 4.9.83
  media: r820t: fix r820t_write_reg for KASAN
  ARM: dts: Delete bogus reference to the charlcd
  arm: dts: mt2701: Add reset-cells
  ARM: dts: s5pv210: add interrupt-parent for ohci
  arm64: dts: msm8916: Add missing #phy-cells
  ARM: pxa/tosa-bt: add MODULE_LICENSE tag
  ARM: dts: exynos: fix RTC interrupt for exynos5410
  vfs: don't do RCU lookup of empty pathnames
  x86: fix build warnign with 32-bit PAE
  x86/cpu: Change type of x86_cache_size variable to unsigned int
  x86/spectre: Fix an error message
  x86/cpu: Rename cpu_data.x86_mask to cpu_data.x86_stepping
  selftests/x86/mpx: Fix incorrect bounds with old _sigfault
  x86/speculation: Add <asm/msr-index.h> dependency
  nospec: Move array_index_nospec() parameter checking into separate macro
  x86/speculation: Fix up array_index_nospec_mask() asm constraint
  selftests/x86: Do not rely on "int $0x80" in single_step_syscall.c
  selftests/x86: Do not rely on "int $0x80" in test_mremap_vdso.c
  selftests/x86/pkeys: Remove unused functions
  x86/speculation: Clean up various Spectre related details
  X86/nVMX: Properly set spec_ctrl and pred_cmd before merging MSRs
  KVM/x86: Reduce retpoline performance impact in slot_handle_level_range(), by always inlining iterator helper methods
  x86/speculation: Correct Speculation Control microcode blacklist again
  x86/speculation: Update Speculation Control microcode blacklist
  compiler-gcc.h: Introduce __optimize function attribute
  x86/entry/64/compat: Clear registers for compat syscalls, to reduce speculation attack surface
  arm: spear13xx: Fix spics gpio controller's warning
  arm: spear13xx: Fix dmas cells
  arm: spear600: Add missing interrupt-parent of rtc
  ARM: dts: nomadik: add interrupt-parent for clcd
  ARM: dts: STi: Add gpio polarity for "hdmi,hpd-gpio" property
  ARM: lpc3250: fix uda1380 gpio numbers
  arm64: dts: msm8916: Correct ipc references for smsm
  s390: fix handling of -1 in set{,fs}[gu]id16 syscalls
  ocfs2: try a blocking lock before return AOP_TRUNCATED_PAGE
  PM / devfreq: Propagate error from devfreq_add_device()
  cpufreq: powernv: Dont assume distinct pstate values for nominal and pmin
  RDMA/rxe: Fix a race condition related to the QP error state
  kselftest: fix OOM in memory compaction test
  IB/mlx4: Fix incorrectly releasing steerable UD QPs when have only ETH ports
  IB/qib: Fix comparison error with qperf compare/swap test
  powerpc: fix build errors in stable tree
  dm: correctly handle chained bios in dec_pending()
  usb: Move USB_UHCI_BIG_ENDIAN_* out of USB_SUPPORT
  mvpp2: fix multicast address filter
  ALSA: seq: Fix racy pool initializations
  ALSA: usb-audio: add implicit fb quirk for Behringer UFX1204
  ALSA: hda/realtek: PCI quirk for Fujitsu U7x7
  ALSA: hda/realtek - Enable Thinkpad Dock device for ALC298 platform
  ALSA: usb-audio: Fix UAC2 get_ctl request with a RANGE attribute
  ALSA: hda - Fix headset mic detection problem for two Dell machines
  mtd: nand: vf610: set correct ooblayout
  9p/trans_virtio: discard zero-length reply
  Btrfs: fix unexpected -EEXIST when creating new inode
  Btrfs: fix btrfs_evict_inode to handle abnormal inodes correctly
  Btrfs: fix extent state leak from tree log
  Btrfs: fix crash due to not cleaning up tree log block's dirty bits
  Btrfs: fix deadlock in run_delalloc_nocow
  target/iscsi: avoid NULL dereference in CHAP auth error path
  rtlwifi: rtl8821ae: Fix connection lost problem correctly
  console/dummy: leave .con_font_get set to NULL
  video: fbdev: atmel_lcdfb: fix display-timings lookup
  PCI: keystone: Fix interrupt-controller-node lookup
  MIPS: Fix typo BIG_ENDIAN to CPU_BIG_ENDIAN
  mm: Fix memory size alignment in devm_memremap_pages_release()
  mm: hide a #warning for COMPILE_TEST
  ext4: correct documentation for grpid mount option
  ext4: save error to disk in __ext4_grp_locked_error()
  ext4: fix a race in the ext4 shutdown path
  jbd2: fix sphinx kernel-doc build warnings
  mbcache: initialize entry->e_referenced in mb_cache_entry_create()
  rtc-opal: Fix handling of firmware error codes, prevent busy loops
  drm/radeon: adjust tested variable
  drm/radeon: Add dpm quirk for Jet PRO (v2)
  scsi: smartpqi: allow static build ("built-in")
  BACKPORT: tee: shm: Potential NULL dereference calling tee_shm_register()
  BACKPORT: tee: shm: don't put_page on null shm->pages
  BACKPORT: tee: shm: make function __tee_shm_alloc static
  BACKPORT: tee: optee: check type of registered shared memory
  BACKPORT: tee: add start argument to shm_register callback
  BACKPORT: tee: optee: fix header dependencies
  BACKPORT: tee: shm: inline tee_shm_get_id()
  BACKPORT: tee: use reference counting for tee_context
  BACKPORT: tee: optee: enable dynamic SHM support
  BACKPORT: tee: optee: add optee-specific shared pool implementation
  BACKPORT: tee: optee: store OP-TEE capabilities in private data
  BACKPORT: tee: optee: add registered buffers handling into RPC calls
  BACKPORT: tee: optee: add registered shared parameters handling
  BACKPORT: tee: optee: add shared buffer registration functions
  BACKPORT: tee: optee: add page list manipulation functions
  BACKPORT: tee: optee: Update protocol definitions
  BACKPORT: tee: shm: add page accessor functions
  BACKPORT: tee: shm: add accessors for buffer size and page offset
  BACKPORT: tee: add register user memory
  BACKPORT: tee: flexible shared memory pool creation
  BACKPORT: optee: support asynchronous supplicant requests
  BACKPORT: tee: add TEE_IOCTL_PARAM_ATTR_META
  BACKPORT: tee: add tee_param_is_memref() for driver use
  UPSTREAM: tcp: fix access to sk->sk_state in tcp_poll()
  BACKPORT: tcp: fix potential double free issue for fastopen_req
  BACKPORT: xfrm: Fix return value check of copy_sec_ctx.
  time: Fix ktime_get_raw() incorrect base accumulation
  FROMLIST: coresight: ETM: Add support for ARM Cortex-A73
  FROMLIST: coresight: tmc: implementing TMC-ETR AUX space API
  UPSTREAM: coresight: etm_perf: Fix using uninitialised work
  UPSTREAM: coresight: fix kernel panic caused by invalid CPU
  UPSTREAM: coresight: Fix disabling of CoreSight TPIU
  UPSTREAM: coresight: perf: Add a missing call to etm_free_aux
  UPSTREAM: coresight: tmc: Remove duplicate memset
  UPSTREAM: coresight: tmc: Get rid of mode parameter for helper routines
  UPSTREAM: coresight: tmc: Cleanup operation mode handling
  UPSTREAM: coresight: reset "enable_sink" flag when need be
  sched/fair: prevent possible infinite loop in sched_group_energy
  ANDROID: qtaguid: Fix the UAF probelm with tag_ref_tree
  UPSTREAM: ANDROID: binder: remove waitqueue when thread exits.
  ANDROID: sdcardfs: Protect set_top
  ANDROID: fsnotify: Notify lower fs of open
  Revert "ANDROID: sdcardfs: notify lower file of opens"
  ANDROID: sdcardfs: Use lower getattr times/size
  ANDROID: sched: EAS: check energy_aware() before calling select_energy_cpu_brute() in up-migrate path
  UPSTREAM: eventpoll.h: add missing epoll event masks
  BACKPORT: thermal/drivers/hisi: Add support for hi3660 SoC
  BACKPORT: thermal/drivers/hisi: Prepare to add support for other hisi platforms
  BACKPORT: thermal/drivers/hisi: Add platform prefix to function name
  BACKPORT: thermal/drivers/hisi: Put platform code together
  BACKPORT: thermal/drivers/hisi: Use round up step value
  BACKPORT: thermal/drivers/hisi: Move the clk setup in the corresponding functions
  BACKPORT: thermal/drivers/hisi: Remove mutex_lock in the code
  BACKPORT: thermal/drivers/hisi: Remove thermal data back pointer
  BACKPORT: thermal/drivers/hisi: Convert long to int
  BACKPORT: thermal/drivers/hisi: Rename and remove unused field
  BACKPORT: thermal/drivers/hisi: Remove costly sensor inspection
  BACKPORT: thermal/drivers/hisi: Fix configuration register setting
  BACKPORT: thermal/drivers/hisi: Encapsulate register writes into helpers
  BACKPORT: thermal/drivers/hisi: Remove pointless lock
  BACKPORT: thermal/drivers/hisi: Remove the multiple sensors support
  BACKPORT: thermal: hisilicon: constify thermal_zone_of_device_ops structures
  ANDROID: xattr: Pass EOPNOTSUPP to permission2
  ANDROID: sdcardfs: Move default_normal to superblock
  UPSTREAM: tcp: fix a request socket leak
  UPSTREAM: tcp: fix possible deadlock in TCP stack vs BPF filter
  UPSTREAM: tcp: Add a tcp_filter hook before handle ack packet
  FROMLIST: arm64: kpti: Fix the interaction between ASID switching and software PAN
  FROMLIST: arm64: Move post_ttbr_update_workaround to C code
  fscrypt: updates on 4.15-rc4
  ANDROID: uid_sys_stats: fix the comment
  BACKPORT: optee: fix invalid of_node_put() in optee_driver_init()
  BACKPORT: tee: optee: sync with new naming of interrupts
  BACKPORT: tee: indicate privileged dev in gen_caps
  BACKPORT: tee: optee: interruptible RPC sleep
  BACKPORT: tee: optee: add const to tee_driver_ops and tee_desc structures
  BACKPORT: tee: tee_shm: Constify dma_buf_ops structures.
  BACKPORT: tee: add forward declaration for struct device
  BACKPORT: tee: optee: fix uninitialized symbol 'parg'
  BACKPORT: tee.txt: standardize document format
  BACKPORT: tee: add ARM_SMCCC dependency
  clocksource: arch_timer: make virtual counter access configurable
  arm64: issue isb when trapping CNTVCT_EL0 access
  BACKPORT: arm64: Add CNTFRQ_EL0 trap handler
  BACKPORT: arm64: Add CNTVCT_EL0 trap handler
  ANDROID: sdcardfs: Fix missing break on default_normal
  ANDROID: arm64: kaslr: fixup Falkor workaround for 4.9
  ANDROID: usb: f_fs: Prevent gadget unbind if it is already unbound
  arm64: Kconfig: Reword UNMAP_KERNEL_AT_EL0 kconfig entry
  arm64: use RET instruction for exiting the trampoline
  UPSTREAM: arm64: kaslr: Put kernel vectors address in separate data page
  UPSTREAM: arm64: mm: Introduce TTBR_ASID_MASK for getting at the ASID in the TTBR
  UPSTREAM: arm64: Kconfig: Add CONFIG_UNMAP_KERNEL_AT_EL0
  UPSTREAM: arm64: entry: Add fake CPU feature for unmapping the kernel at EL0
  UPSTREAM: arm64: tls: Avoid unconditional zeroing of tpidrro_el0 for native tasks
  UPSTREAM: arm64: erratum: Work around Falkor erratum #E1003 in trampoline code
  UPSTREAM: arm64: entry: Hook up entry trampoline to exception vectors
  UPSTREAM: arm64: entry: Explicitly pass exception level to kernel_ventry macro
  UPSTREAM: arm64: mm: Map entry trampoline into trampoline and kernel page tables
  UPSTREAM: arm64: entry: Add exception trampoline page for exceptions from EL0
  UPSTREAM: arm64: mm: Invalidate both kernel and user ASIDs when performing TLBI
  UPSTREAM: arm64: mm: Add arm64_kernel_unmapped_at_el0 helper
  UPSTREAM: arm64: mm: Allocate ASIDs in pairs
  UPSTREAM: arm64: mm: Fix and re-enable ARM64_SW_TTBR0_PAN
  UPSTREAM: arm64: mm: Rename post_ttbr0_update_workaround
  UPSTREAM: arm64: mm: Move ASID from TTBR0 to TTBR1
  UPSTREAM: arm64: mm: Temporarily disable ARM64_SW_TTBR0_PAN
  UPSTREAM: arm64: mm: Use non-global mappings for kernel space
  UPSTREAM: arm64: factor out entry stack manipulation
  ANDROID: sdcardfs: Add default_normal option
  ANDROID: sdcardfs: notify lower file of opens
  blkdev: Refactoring block io latency histogram codes
  UPSTREAM: netfilter: conntrack: use power efficient workqueue
  ANDROID: binder: Remove obsolete proc waitqueue.
  UPSTREAM: arm64: setup: introduce kaslr_offset()
  UPSTREAM: kcov: fix comparison callback signature
  UPSTREAM: kcov: support comparison operands collection
  UPSTREAM: kcov: remove pointless current != NULL check
  UPSTREAM: kcov: support compat processes
  UPSTREAM: kcov: simplify interrupt check
  UPSTREAM: kcov: make kcov work properly with KASLR enabled
  UPSTREAM: kcov: add more missing includes
  BACKPORT: irq: Make the irqentry text section unconditional
  UPSTREAM: kasan: make get_wild_bug_type() static
  UPSTREAM: kasan: separate report parts by empty lines
  UPSTREAM: kasan: improve double-free report format
  UPSTREAM: kasan: print page description after stacks
  UPSTREAM: kasan: improve slab object description
  UPSTREAM: kasan: change report header
  UPSTREAM: kasan: simplify address description logic
  UPSTREAM: kasan: change allocation and freeing stack traces headers
  UPSTREAM: kasan: unify report headers
  UPSTREAM: kasan: introduce helper functions for determining bug type
  BACKPORT: kasan: report only the first error by default
  UPSTREAM: kasan: fix races in quarantine_remove_cache()
  UPSTREAM: kasan: resched in quarantine_remove_cache()
  UPSTREAM: kasan, sched/headers: Uninline kasan_enable/disable_current()
  UPSTREAM: kasan: drain quarantine of memcg slab objects
  UPSTREAM: kasan: eliminate long stalls during quarantine reduction
  UPSTREAM: kasan: support panic_on_warn
  ANDROID: dma-buf/sw_sync: Rename active_list to link
  ANDROID: initramfs: call free_initrd() when skipping init
  BACKPORT: Documentation: tee subsystem and op-tee driver
  BACKPORT: tee: add OP-TEE driver
  BACKPORT: tee: generic TEE subsystem
  BACKPORT: dt/bindings: add bindings for optee
  BACKPORT: schedutil: Reset cached freq if it is not in sync with next_freq
  sched: EAS/WALT: Don't take into account of running task's util
  sched: EAS/WALT: take into account of waking task's load
  sched: EAS: upmigrate misfit current task
  sched: avoid pushing tasks to an offline CPU
  sched: Extend active balance to accept 'push_task' argument
  sched: walt: Correct WALT window size initialization
  sched: WALT: account cumulative window demand
  sched: EAS/WALT: finish accounting prior to task_tick
  sched/fair: prevent meaningless active migration
  sched: walt: Leverage existing helper APIs to apply invariance
  UPSTREAM: net: xfrm: allow clearing socket xfrm policies.
  UPSTREAM: time: Clean up CLOCK_MONOTONIC_RAW time handling
  UPSTREAM: arm64: vdso: fix clock_getres for 4GiB-aligned res
  f2fs: updates on 4.15-rc1
  UPSTREAM: android: binder: fix type mismatch warning
  BACKPORT: arm64: Use __pa_symbol for empty_zero_page
  UPSTREAM: arm64: Use __pa_symbol for kernel symbols
  UPSTREAM: mm: Introduce lm_alias
  FROMLIST: binder: fix proc->files use-after-free
  BACKPORT: xfrm: Clear sk_dst_cache when applying per-socket policy.
  sched: WALT: fix potential overflow
  sched: Update task->on_rq when tasks are moving between runqueues
  sched: WALT: fix window mis-alignment
  sched: EAS: kill incorrect nohz idle cpu kick
  sched: EAS: fix incorrect energy delta calculation due to rounding error
  sched: EAS/WALT: use cr_avg instead of prev_runnable_sum
  sched: WALT: fix broken cumulative runnable average accounting
  sched: deadline: WALT: account cumulative runnable avg
  ANDROID: binder: clarify deferred thread work.
  BACKPORT: net/tcp-fastopen: Add new API support
  UPSTREAM: net: Remove __sk_dst_reset() in tcp_v6_connect()
  UPSTREAM: net/tcp-fastopen: refactor cookie check logic
  sched: compute task utilisation with WALT consistently
  FROMLIST: arm64: Avoid aligning normal memory pointers in __memcpy_{to,from}io
  UPSTREAM: security: bpf: replace include of linux/bpf.h with forward declarations
  UPSTREAM: selinux: bpf: Add addtional check for bpf object file receive
  UPSTREAM: selinux: bpf: Add selinux check for eBPF syscall operations
  BACKPORT: security: bpf: Add LSM hooks for bpf object related syscall
  BACKPORT: bpf: Add file mode configuration into bpf maps
  cpufreq: Drop schedfreq governor
  ANDROID: Revert "arm64: move ELF_ET_DYN_BASE to 4GB / 4MB"
  ANDROID: Revert "arm: move ELF_ET_DYN_BASE to 4MB"
  sched: EAS: Fix the condition to distinguish energy before/after
  sched: EAS: update trg_cpu to backup_cpu if no energy saving for target_cpu
  sched/fair: consider task utilization in group_max_util()
  sched/fair: consider task utilization in group_norm_util()
  sched/fair: enforce EAS mode
  sched/fair: ignore backup CPU when not valid
  sched/fair: trace energy_diff for non boosted tasks
  UPSTREAM: sched/fair: Sync task util before slow-path wakeup
  UPSTREAM: sched/core: Add missing update_rq_clock() call in set_user_nice()
  UPSTREAM: sched/core: Add missing update_rq_clock() call for task_hot()
  UPSTREAM: sched/core: Add missing update_rq_clock() in detach_task_cfs_rq()
  UPSTREAM: sched/core: Add missing update_rq_clock() in post_init_entity_util_avg()
  UPSTREAM: sched/fair: Fix task group initialization
  cpufreq/sched: Consider max cpu capacity when choosing frequencies
  cpufreq/sched: Use cpu max freq rather than policy max
  sched/fair: remove erroneous RCU_LOCKDEP_WARN from start_cpu()
  FROMLIST: ALSA: usx2y: Suppress kernel warning at page allocation failures
  FROMLIST: kbuild: clang: fix build failures with sparse check
  Revert "Revert "BACKPORT: efi/libstub/arm64: Set -fpie when building the EFI stub""
  BACKPORT: efi/libstub: Unify command line param parsing
  ANDROID: sched/walt: Fix divide by zero error in cpufreq notifier
  ANDROID: binder: show high watermark of alloc->pages.
  ANDROID: binder: Add thread->process_todo flag.
  ANDROID: sched/fair: Select correct capacity state for energy_diff
  ANDROID: cpufreq-dt: Set sane defaults for schedutil rate limits
  BACKPORT: cpufreq: schedutil: Use policy-dependent transition delays
  Revert "BACKPORT: efi/libstub/arm64: Set -fpie when building the EFI stub"
  FROMLIST: android: binder: Fix null ptr dereference in debug msg
  FROMLIST: android: binder: Change binder_shrinker to static
  UPSTREAM: arm64: compat: Remove leftover variable declaration
  ANDROID: HACK: arm64: use -mno-implicit-float instead of -mgeneral-regs-only
  ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple
  CHROMIUM: arm64: Disable asm-operand-width warning for clang
  CHROMIUM: kbuild: clang: Disable the 'duplicate-decl-specifier' warning
  BACKPORT: x86/asm: Fix inline asm call constraints for Clang
  BACKPORT: efi/libstub/arm64: Set -fpie when building the EFI stub
  UPSTREAM: efi/libstub/arm64: Force 'hidden' visibility for section markers
  UPSTREAM: efi/libstub/arm64: Use hidden attribute for struct screen_info reference
  UPSTREAM: x86/build: Use cc-option to validate stack alignment parameter
  UPSTREAM: x86/build: Fix stack alignment for CLang
  UPSTREAM: compiler, clang: always inline when CONFIG_OPTIMIZE_INLINING is disabled
  UPSTREAM: x86/boot: #undef memcpy() et al in string.c
  UPSTREAM: llist: clang: introduce member_address_is_nonnull()
  UPSTREAM: crypto: arm64/sha - avoid non-standard inline asm tricks
  UPSTREAM: kbuild: clang: Disable 'address-of-packed-member' warning
  UPSTREAM: x86/build: Specify stack alignment for clang
  UPSTREAM: x86/build: Use __cc-option for boot code compiler options
  UPSTREAM: kbuild: Add __cc-option macro
  UPSTREAM: x86/mm/kaslr: Use the _ASM_MUL macro for multiplication to work around Clang incompatibility
  UPSTREAM: crypto, x86: aesni - fix token pasting for clang
  UPSTREAM: x86/kbuild: Use cc-option to enable -falign-{jumps/loops}
  UPSTREAM: compiler, clang: properly override 'inline' for clang
  UPSTREAM: compiler, clang: suppress warning for unused static inline functions
  UPSTREAM: modules: mark __inittest/__exittest as __maybe_unused
  UPSTREAM: kbuild: Add support to generate LLVM assembly files
  UPSTREAM: kbuild: use -Oz instead of -Os when using clang
  UPSTREAM: kbuild, LLVMLinux: Add -Werror to cc-option to support clang
  UPSTREAM: kbuild: drop -Wno-unknown-warning-option from clang options
  UPSTREAM: kbuild: fix asm-offset generation to work with clang
  UPSTREAM: kbuild: consolidate redundant sed script ASM offset generation
  UPSTREAM: kbuild: Consolidate header generation from ASM offset information
  UPSTREAM: kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS
  UPSTREAM: kbuild: Add better clang cross build support
  FROMLIST: f2fs: expose some sectors to user in inline data or dentry case
  UPSTREAM: sched/fair: Fix usage of find_idlest_group() when the local group is idlest
  UPSTREAM: sched/fair: Fix usage of find_idlest_group() when no groups are allowed
  UPSTREAM: sched/fair: Fix find_idlest_group() when local group is not allowed
  UPSTREAM: sched/fair: Remove unnecessary comparison with -1
  UPSTREAM: sched/fair: Move select_task_rq_fair() slow-path into its own function
  UPSTREAM: sched/fair: Force balancing on NOHZ balance if local group has capacity
  UPSTREAM: f2fs: fix potential panic during fstrim
  f2fs: catch up to v4.14-rc1
  UPSTREAM: sched: use load_avg for selecting idlest group
  UPSTREAM: sched: fix find_idlest_group for fork
  ANDROID: binder: fix node sched policy calculation
  ANDROID: binder: init desired_prio.sched_policy before use it
  BACKPORT: net: xfrm: support setting an output mark.
  FROMLIST: tracing: Add support for preempt and irq enable/disable events
  FROMLIST: tracing: Prepare to add preempt and irq trace events

Conflicts:
	arch/arm64/Kconfig
	arch/arm64/include/asm/assembler.h
	arch/arm64/include/asm/cpucaps.h
	arch/arm64/include/asm/efi.h
	arch/arm64/include/asm/memory.h
	arch/arm64/include/asm/mmu.h
	arch/arm64/include/asm/mmu_context.h
	arch/arm64/kernel/cpufeature.c
	arch/arm64/kernel/io.c
	arch/arm64/kernel/setup.c
	arch/arm64/kernel/vdso.c
	arch/arm64/mm/context.c
	arch/arm64/mm/mmu.c
	drivers/Kconfig
	drivers/Makefile
	drivers/cpufreq/Kconfig
	drivers/hwtracing/coresight/coresight-etm4x.c
	drivers/hwtracing/coresight/coresight-priv.h
	drivers/hwtracing/coresight/coresight-tmc-etr.c
	drivers/hwtracing/coresight/coresight.c
	drivers/scsi/ufs/ufshcd.h
	drivers/staging/android/ion/ion-ioctl.c
	drivers/staging/android/ion/ion_system_heap.c
	drivers/usb/dwc3/gadget.c
	include/linux/sched.h
	include/trace/events/sched.h
	kernel/kcov.c
	kernel/sched/core.c
	kernel/sched/cpufreq_sched.c
	kernel/sched/cpufreq_schedutil.c
	kernel/sched/fair.c
	kernel/sched/sched.h
	kernel/sched/walt.c
	kernel/sched/walt.h
	mm/kasan/report.c
	security/security.c
	security/selinux/hooks.c

Change-Id: I0ec8cbca6cb6384e22fbbe8def8a9d228229dc48
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2018-03-19 04:18:31 -07:00
Greg Kroah-Hartman
a9d027374a Merge 4.9.84 into android-4.9
Changes in 4.9.84
	vhost: use mutex_lock_nested() in vhost_dev_lock_vqs()
	kcm: Check if sk_user_data already set in kcm_attach
	kcm: Only allow TCP sockets to be attached to a KCM mux
	cfg80211: check dev_set_name() return value
	xfrm: skip policies marked as dead while rehashing
	mm,vmscan: Make unregister_shrinker() no-op if register_shrinker() failed.
	xfrm: Fix stack-out-of-bounds read on socket policy lookup.
	xfrm: check id proto in validate_tmpl()
	sctp: set frag_point in sctp_setsockopt_maxseg correctly
	blktrace: fix unlocked registration of tracepoints
	drm: Require __GFP_NOFAIL for the legacy drm_modeset_lock_all
	ptr_ring: fail early if queue occupies more than KMALLOC_MAX_SIZE
	Provide a function to create a NUL-terminated string from unterminated data
	selinux: ensure the context is NUL terminated in security_context_to_sid_core()
	selinux: skip bounded transition processing if the policy isn't loaded
	crypto: x86/twofish-3way - Fix %rbp usage
	staging: android: ion: Add __GFP_NOWARN for system contig heap
	staging: android: ion: Switch from WARN to pr_warn
	blk_rq_map_user_iov: fix error override
	KVM: x86: fix escape of guest dr6 to the host
	kcov: detect double association with a single task
	netfilter: x_tables: fix int overflow in xt_alloc_table_info()
	netfilter: x_tables: avoid out-of-bounds reads in xt_request_find_{match|target}
	netfilter: ipt_CLUSTERIP: fix out-of-bounds accesses in clusterip_tg_check()
	netfilter: on sockopt() acquire sock lock only in the required scope
	netfilter: xt_cgroup: initialize info->priv in cgroup_mt_check_v1()
	netfilter: xt_RATEEST: acquire xt_rateest_mutex for hash insert
	rds: tcp: atomically purge entries from rds_tcp_conn_list during netns delete
	net: avoid skb_warn_bad_offload on IS_ERR
	crypto: hash - annotate algorithms taking optional key
	crypto: hash - prevent using keyed hashes without setting key
	ASoC: ux500: add MODULE_LICENSE tag
	video: fbdev/mmp: add MODULE_LICENSE
	ARM: 8743/1: bL_switcher: add MODULE_LICENSE tag
	arm64: dts: add #cooling-cells to CPU nodes
	dn_getsockoptdecnet: move nf_{get/set}sockopt outside sock lock
	staging: android: ashmem: Fix a race condition in pin ioctls
	binder: check for binder_thread allocation failure in binder_poll()
	staging: iio: adc: ad7192: fix external frequency setting
	staging: iio: ad5933: switch buffer mode to software
	usbip: keep usbip_device sockfd state in sync with tcp_socket
	usb: build drivers/usb/common/ when USB_SUPPORT is set
	ARM: OMAP2+: Fix SRAM virt to phys translation for save_secure_ram_context
	ARM: AM33xx: PRM: Remove am33xx_pwrdm_read_prev_pwrst function
	ARM: dts: Fix omap4 hang with GPS connected to USB by using wakeupgen
	ARM: dts: logicpd-som-lv: Fix gpmc addresses for NAND and enet
	ARM: dts: logicpd-somlv: Fix wl127x pinmux
	ARM: dts: am4372: Correct the interrupts_properties of McASP
	ARM: dts: am437x-cm-t43: Correct the dmas property of spi0
	perf top: Fix window dimensions change handling
	perf bench numa: Fixup discontiguous/sparse numa nodes
	media: s5k6aa: describe some function parameters
	pinctrl: sunxi: Fix A80 interrupt pin bank
	pinctrl: sunxi: Fix A64 UART mux value
	i40iw: Correct ARP index mask
	RDMA/cma: Make sure that PSN is not over max allowed
	sctp: only update outstanding_bytes for transmitted queue when doing prsctp_prune
	scripts/kernel-doc: Don't fail with status != 0 if error encountered with -none
	ipvlan: Add the skb->mark as flow4's member to lookup route
	m68k: add missing SOFTIRQENTRY_TEXT linker section
	powerpc/perf: Fix oops when grouping different pmu events
	s390/dasd: prevent prefix I/O error
	ARM: dts: Fix elm interrupt compiler warning
	gianfar: fix a flooded alignment reports because of padding issue.
	net_sched: red: Avoid devision by zero
	net_sched: red: Avoid illegal values
	btrfs: Fix possible off-by-one in btrfs_search_path_in_tree
	brcmfmac: Avoid build error with make W=1
	net: ethernet: arc: fix error handling in emac_rockchip_probe
	509: fix printing uninitialized stack memory when OID is empty
	gianfar: Disable EEE autoneg by default
	dmaengine: ioat: Fix error handling path
	dmaengine: at_hdmac: fix potential NULL pointer dereference in atc_prep_dma_interleaved
	clk: fix a panic error caused by accessing NULL pointer
	ASoC: rockchip: disable clock on error
	spi: sun4i: disable clocks in the remove function
	xfrm: Fix stack-out-of-bounds with misconfigured transport mode policies.
	drm/armada: fix leak of crtc structure
	dmaengine: jz4740: disable/unprepare clk if probe fails
	usb: dwc3: gadget: Wait longer for controller to end command processing
	usb: dwc3: of-simple: fix missing clk_disable_unprepare
	mm/early_ioremap: Fix boot hang with earlyprintk=efi,keep
	x86/mm/kmmio: Fix mmiotrace for page unaligned addresses
	platform/x86: dell-laptop: Fix keyboard max lighting for Dell Latitude E6410
	xen: XEN_ACPI_PROCESSOR is Dom0-only
	hippi: Fix a Fix a possible sleep-in-atomic bug in rr_close
	powerpc/64s: Fix conversion of slb_miss_common to use RFI_TO_USER/KERNEL
	powerpc/64s: Simple RFI macro conversions
	powerpc/64s: Improve RFI L1-D cache flush fallback
	crypto: talitos - fix Kernel Oops on hashing an empty file
	drm/i915: fix intel_backlight_device_register declaration
	shmem: avoid maybe-uninitialized warning
	clk: sunxi-ng: fix build error without CONFIG_RESET_CONTROLLER
	vmxnet3: prevent building with 64K pages
	perf/x86: Shut up false-positive -Wmaybe-uninitialized warning
	PCI: vmd: Fix suspend handlers defined-but-not-used warning
	gpio: intel-mid: Fix build warning when !CONFIG_PM
	platform/x86: intel_mid_thermal: Fix suspend handlers unused warning
	usb: musb: fix compilation warning on unused function
	PCI: Change pci_host_common_probe() visibility
	perf: xgene: Include module.h
	video: fbdev: via: remove possibly unused variables
	scsi: advansys: fix build warning for PCI=n
	x86/ras/inject: Make it depend on X86_LOCAL_APIC=y
	gpio: xgene: mark PM functions as __maybe_unused
	arm64: define BUG() instruction without CONFIG_BUG
	x86/fpu/math-emu: Fix possible uninitialized variable use
	tools build: Add tools tree support for 'make -s'
	x86/build: Silence the build with "make -s"
	thermal: fix INTEL_SOC_DTS_IOSF_CORE dependencies
	x86: add MULTIUSER dependency for KVM
	dmaengine: zx: fix build warning
	x86/platform: Add PCI dependency for PUNIT_ATOM_DEBUG
	x86/vm86: Fix unused variable warning if THP is disabled
	scsi: advansys: fix uninitialized data access
	arm64: Kconfig: select COMPAT_BINFMT_ELF only when BINFMT_ELF is set
	ALSA: hda/ca0132 - fix possible NULL pointer use
	reiserfs: avoid a -Wmaybe-uninitialized warning
	cw1200: fix bogus maybe-uninitialized warning
	security/keys: BIG_KEY requires CONFIG_CRYPTO
	drm: exynos: mark pm functions as __maybe_unused
	rbd: silence bogus -Wmaybe-uninitialized warning
	drm/nouveau: hide gcc-4.9 -Wmaybe-uninitialized
	Input: tca8418_keypad - hide gcc-4.9 -Wmaybe-uninitialized warning
	KVM: add X86_LOCAL_APIC dependency
	shmem: fix compilation warnings on unused functions
	tc358743: fix register i2c_rd/wr functions
	go7007: add MEDIA_CAMERA_SUPPORT dependency
	em28xx: only use mt9v011 if camera support is enabled
	tw5864: use dev_warn instead of WARN to shut up warning
	ISDN: eicon: reduce stack size of sig_ind function
	clk: meson: gxbb: fix build error without RESET_CONTROLLER
	kasan: rework Kconfig settings
	drm/i915: hide unused intel_panel_set_backlight function
	arm64: sunxi: always enable reset controller
	binfmt_elf: compat: avoid unused function warning
	spi: bcm-qspi: shut up warning about cfi header inclusion
	idle: i7300: add PCI dependency
	arm64: fix warning about swapper_pg_dir overflow
	usb: phy: msm add regulator dependency
	x86/microcode/AMD: Change load_microcode_amd()'s param to bool to fix preemptibility bug
	KVM: async_pf: Fix #DF due to inject "Page not Present" and "Page Ready" exceptions simultaneously
	KVM: VMX: clean up declaration of VPID/EPT invalidation types
	KVM: nVMX: invvpid handling improvements
	crypto: s5p-sss - Fix kernel Oops in AES-ECB mode
	Linux 4.9.84

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-02-26 09:18:03 +01:00
Arnd Bergmann
ef3af3465a kasan: rework Kconfig settings
commit e7c52b84fb18f08ce49b6067ae6285aca79084a8 upstream.

We get a lot of very large stack frames using gcc-7.0.1 with the default
-fsanitize-address-use-after-scope --param asan-stack=1 options, which can
easily cause an overflow of the kernel stack, e.g.

  drivers/gpu/drm/i915/gvt/handlers.c:2434:1: warning: the frame size of 46176 bytes is larger than 3072 bytes
  drivers/net/wireless/ralink/rt2x00/rt2800lib.c:5650:1: warning: the frame size of 23632 bytes is larger than 3072 bytes
  lib/atomic64_test.c:250:1: warning: the frame size of 11200 bytes is larger than 3072 bytes
  drivers/gpu/drm/i915/gvt/handlers.c:2621:1: warning: the frame size of 9208 bytes is larger than 3072 bytes
  drivers/media/dvb-frontends/stv090x.c:3431:1: warning: the frame size of 6816 bytes is larger than 3072 bytes
  fs/fscache/stats.c:287:1: warning: the frame size of 6536 bytes is larger than 3072 bytes

To reduce this risk, -fsanitize-address-use-after-scope is now split out
into a separate CONFIG_KASAN_EXTRA Kconfig option, leading to stack
frames that are smaller than 2 kilobytes most of the time on x86_64.  An
earlier version of this patch also prevented combining KASAN_EXTRA with
KASAN_INLINE, but that is no longer necessary with gcc-7.0.1.

All patches to get the frame size below 2048 bytes with CONFIG_KASAN=y
and CONFIG_KASAN_EXTRA=n have been merged by maintainers now, so we can
bring back that default now.  KASAN_EXTRA=y still causes lots of
warnings but now defaults to !COMPILE_TEST to disable it in
allmodconfig, and it remains disabled in all other defconfigs since it
is a new option.  I arbitrarily raise the warning limit for KASAN_EXTRA
to 3072 to reduce the noise, but an allmodconfig kernel still has around
50 warnings on gcc-7.

I experimented a bit more with smaller stack frames and have another
follow-up series that reduces the warning limit for 64-bit architectures
to 1280 bytes (without CONFIG_KASAN).

With earlier versions of this patch series, I also had patches to address
the warnings we get with KASAN and/or KASAN_EXTRA, using a
"noinline_if_stackbloat" annotation.

That annotation now got replaced with a gcc-8 bugfix (see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715) and a workaround for
older compilers, which means that KASAN_EXTRA is now just as bad as
before and will lead to an instant stack overflow in a few extreme
cases.

This reverts parts of commit 3f181b4d86 ("lib/Kconfig.debug: disable
-Wframe-larger-than warnings with KASAN=y").  Two patches in linux-next
should be merged first to avoid introducing warnings in an allmodconfig
build:
  3cd890dbe2a4 ("media: dvb-frontends: fix i2c access helpers for KASAN")
  16c3ada89cff ("media: r820t: fix r820t_write_reg for KASAN")

Do we really need to backport this?

I think we do: without this patch, enabling KASAN will lead to
unavoidable kernel stack overflow in certain device drivers when built
with gcc-7 or higher on linux-4.10+ or any version that contains a
backport of commit c5caf21ab0cf8.  Most people are probably still on
older compilers, but it will get worse over time as they upgrade their
distros.

The warnings we get on kernels older than this should all be for code
that uses dangerously large stack frames, though most of them do not
cause an actual stack overflow by themselves.The asan-stack option was
added in linux-4.0, and commit 3f181b4d86 ("lib/Kconfig.debug:
disable -Wframe-larger-than warnings with KASAN=y") effectively turned
off the warning for allmodconfig kernels, so I would like to see this
fix backported to any kernels later than 4.0.

I have done dozens of fixes for individual functions with stack frames
larger than 2048 bytes with asan-stack, and I plan to make sure that
all those fixes make it into the stable kernels as well (most are
already there).

Part of the complication here is that asan-stack (from 4.0) was
originally assumed to always require much larger stacks, but that
turned out to be a combination of multiple gcc bugs that we have now
worked around and fixed, but sanitize-address-use-after-scope (from
v4.10) has a much higher inherent stack usage and also suffers from at
least three other problems that we have analyzed but not yet fixed
upstream, each of them makes the stack usage more severe than it should
be.

Link: http://lkml.kernel.org/r/20171221134744.2295529-1-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Andrey Konovalov <andreyknvl@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[arnd: rebase to v4.9; only re-enable warning]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:05:55 +01:00
Chris Fries
ad2f3e9a3a kernel: Add CC_WERROR config to turn warnings into errors
Add configuration option CONFIG_CC_WERROR to prevent warnings
from creeping in.

Bug: 67861121
Change-Id: I8cd2123d2c569ea6c6ab7f74ed6ca67976e9af3a
Signed-off-by: Chris Fries <cfries@google.com>
2017-10-25 15:10:56 -07:00
Linux Build Service Account
22442ed9e0 Merge "Merge remote-tracking branch '4.9/tmp-85e1c01' into 4.9" 2017-09-20 17:51:49 -07:00
Kyle Yan
7d337cc7f9 Merge remote-tracking branch '4.9/tmp-85e1c01' into 4.9
* 4.9/tmp-85e1c01:
  Linux 4.9.48
  epoll: fix race between ep_poll_callback(POLLFREE) and ep_free()/ep_remove()
  kvm: arm/arm64: Force reading uncached stage2 PGD
  drm/ttm: Fix accounting error when fail to get pages for pool
  xfrm: policy: check policy direction value
  lib/mpi: kunmap after finishing accessing buffer
  wl1251: add a missing spin_lock_init()
  CIFS: remove endian related sparse warning
  CIFS: Fix maximum SMB2 header size
  alpha: uapi: Add support for __SANE_USERSPACE_TYPES__
  cpuset: Fix incorrect memory_pressure control file mapping
  cpumask: fix spurious cpumask_of_node() on non-NUMA multi-node configs
  ceph: fix readpage from fscache
  mm, madvise: ensure poisoned pages are removed from per-cpu lists
  mm, uprobes: fix multiple free of ->uprobes_state.xol_area
  crypto: algif_skcipher - only call put_page on referenced and used pages
  i2c: ismt: Return EMSGSIZE for block reads with bogus length
  i2c: ismt: Don't duplicate the receive length for block reads
  irqchip: mips-gic: SYNC after enabling GIC region
  ANDROID: fiq_debugger: Fix minor bug in code
  ANDROID: configs: remove requirement for CONFIG_SYNC
  FROMLIST: binder: fix an ret value override
  FROMLIST: binder: fix memory corruption in binder_transaction binder
  Linux 4.9.47
  lz4: fix bogus gcc warning
  scsi: sg: reset 'res_in_use' after unlinking reserved array
  scsi: sg: protect accesses to 'reserved' page array
  locking/spinlock/debug: Remove spinlock lockup detection code
  arm64: fpsimd: Prevent registers leaking across exec
  x86/io: Add "memory" clobber to insb/insw/insl/outsb/outsw/outsl
  arm64: mm: abort uaccess retries upon fatal signal
  kvm: arm/arm64: Fix race in resetting stage2 PGD
  gcov: support GCC 7.1
  staging: wilc1000: simplify vif[i]->ndev accesses
  scsi: isci: avoid array subscript warning
  p54: memset(0) whole array
  FROMLIST: android: binder: Add page usage in binder stats
  FROMLIST: android: binder: Add shrinker tracepoints
  FROMLIST: android: binder: Add global lru shrinker to binder
  FROMLIST: android: binder: Move buffer out of area shared with user space
  FROMLIST: android: binder: Add allocator selftest
  FROMLIST: android: binder: Refactor prev and next buffer into a helper function
  android: android-base.config: enable IP6_NF_MATCH_RPFILTER
  Linux 4.9.46
  powerpc/mm: Ensure cpumask update is ordered
  ACPI: EC: Fix regression related to wrong ECDT initialization order
  ACPI / APEI: Add missing synchronize_rcu() on NOTIFY_SCI removal
  ACPI: ioapic: Clear on-stack resource before using it
  ntb: transport shouldn't disable link due to bogus values in SPADs
  ntb: ntb_test: ensure the link is up before trying to configure the mws
  ntb: no sleep in ntb_async_tx_submit
  NTB: ntb_test: fix bug printing ntb_perf results
  ntb_transport: fix bug calculating num_qps_mw
  ntb_transport: fix qp count bug
  Clarify (and fix) MAX_LFS_FILESIZE macros
  staging: rtl8188eu: add RNX-N150NUB support
  iio: hid-sensor-trigger: Fix the race with user space powering up sensors
  iio: imu: adis16480: Fix acceleration scale factor for adis16480
  ANDROID: binder: fix proc->tsk check.
  binder: Use wake up hint for synchronous transactions.
  binder: use group leader instead of open thread
  Revert "android: binder: Sanity check at binder ioctl"
  Bluetooth: bnep: fix possible might sleep error in bnep_session
  Bluetooth: cmtp: fix possible might sleep error in cmtp_session
  Bluetooth: hidp: fix possible might sleep error in hidp_session_thread
  netfilter: nat: fix src map lookup
  Revert "leds: handle suspend/resume in heartbeat trigger"
  net: sunrpc: svcsock: fix NULL-pointer exception
  x86/mm: Fix use-after-free of ldt_struct
  timers: Fix excessive granularity of new timers after a nohz idle
  perf/x86/intel/rapl: Make package handling more robust
  perf probe: Fix --funcs to show correct symbols for offline module
  perf/core: Fix group {cpu,task} validation
  ftrace: Check for null ret_stack on profile function graph entry function
  nfsd: Limit end of page list when decoding NFSv4 WRITE
  cifs: return ENAMETOOLONG for overlong names in cifs_open()/cifs_lookup()
  cifs: Fix df output for users with quota limits
  kbuild: linker script do not match C names unless LD_DEAD_CODE_DATA_ELIMINATION is configured
  tracing: Fix freeing of filter in create_filter() when set_str is false
  tracing: Fix kmemleak in tracing_map_array_free()
  tracing: Call clear_boot_tracer() at lateinit_sync
  drm: rcar-du: Fix H/V sync signal polarity configuration
  drm: rcar-du: Fix display timing controller parameter
  drm: rcar-du: Fix crash in encoder failure error path
  drm/atomic: If the atomic check fails, return its value first
  drm: Release driver tracking before making the object available again
  mm/memblock.c: reversed logic in memblock_discard()
  fork: fix incorrect fput of ->exe_file causing use-after-free
  mm/madvise.c: fix freeing of locked page with MADV_FREE
  i2c: designware: Fix system suspend
  mm, shmem: fix handling /sys/kernel/mm/transparent_hugepage/shmem_enabled
  ARCv2: PAE40: Explicitly set MSB counterpart of SLC region ops addresses
  ALSA: firewire: fix NULL pointer dereference when releasing uninitialized data of iso-resource
  ALSA: hda - Add stereo mic quirk for Lenovo G50-70 (17aa:3978)
  ALSA: core: Fix unexpected error at replacing user TLV
  ALSA: usb-audio: Add delay quirk for H650e/Jabra 550a USB headsets
  KVM: x86: block guest protection keys unless the host has them enabled
  KVM: s390: sthyi: fix specification exception detection
  KVM: s390: sthyi: fix sthyi inline assembly
  Input: ALPS - fix two-finger scroll breakage in right side on ALPS touchpad
  Input: elan_i2c - add ELAN0602 ACPI ID to support Lenovo Yoga310
  Input: trackpoint - add new trackpoint firmware ID
  bpf/verifier: fix min/max handling in BPF_SUB
  bpf: fix mixed signed/unsigned derived min/max value bounds
  bpf, verifier: fix alu ops against map_value{, _adj} register types
  bpf: adjust verifier heuristics
  bpf, verifier: add additional patterns to evaluate_reg_imm_alu
  net_sched: fix order of queue length updates in qdisc_replace()
  net: sched: fix NULL pointer dereference when action calls some targets
  irda: do not leak initialized list.dev to userspace
  net/mlx4_core: Enable 4K UAR if SRIOV module parameter is not enabled
  tcp: when rearming RTO, if RTO time is in past then fire RTO ASAP
  ipv6: repair fib6 tree in failure case
  ipv6: reset fn->rr_ptr when replacing route
  tipc: fix use-after-free
  sctp: fully initialize the IPv6 address in sctp_v6_to_addr()
  nfp: fix infinite loop on umapping cleanup
  ipv4: better IP_MAX_MTU enforcement
  ptr_ring: use kmalloc_array()
  openvswitch: fix skb_panic due to the incorrect actions attrlen
  bpf: fix bpf_trace_printk on 32 bit archs
  net_sched: remove warning from qdisc_hash_add
  net_sched/sfq: update hierarchical backlog when drop packet
  ipv4: fix NULL dereference in free_fib_info_rcu()
  dccp: defer ccid_hc_tx_delete() at dismantle time
  dccp: purge write queue in dccp_destroy_sock()
  af_key: do not use GFP_KERNEL in atomic contexts
  sparc64: remove unnecessary log message
  ANDROID: NFC: st21nfca: Fix memory OOB and leak issues in connectivity events handler
  Linux 4.9.45
  usb: qmi_wwan: add D-Link DWM-222 device ID
  usb: optimize acpi companion search for usb port devices
  pids: make task_tgid_nr_ns() safe
  Sanitize 'move_pages()' permission checks
  genirq/ipi: Fixup checks against nr_cpu_ids
  genirq: Restore trigger settings in irq_modify_status()
  irqchip/atmel-aic: Fix unbalanced refcount in aic_common_rtc_irq_fixup()
  irqchip/atmel-aic: Fix unbalanced of_node_put() in aic_common_irq_fixup()
  x86/asm/64: Clear AC on NMI entries
  xen-blkfront: use a right index when checking requests
  powerpc: Fix VSX enabling/flushing to also test MSR_FP and MSR_VEC
  blk-mq-pci: add a fallback when pci_irq_get_affinity returns NULL
  xen: fix bio vec merging
  mm: revert x86_64 and arm64 ELF_ET_DYN_BASE base changes
  mm/mempolicy: fix use after free when calling get_mempolicy
  mm: fix double mmap_sem unlock on MMF_UNSTABLE enforced SIGBUS
  mm: discard memblock data later
  ALSA: usb-audio: Add mute TLV for playback volumes on C-Media devices
  ALSA: usb-audio: Apply sample rate quirk to Sennheiser headset
  ALSA: seq: 2nd attempt at fixing race creating a queue
  Input: elan_i2c - Add antoher Lenovo ACPI ID for upcoming Lenovo NB
  Input: elan_i2c - add ELAN0608 to the ACPI table
  crypto: x86/sha1 - Fix reads beyond the number of blocks passed
  crypto: ixp4xx - Fix error handling path in 'aead_perform()'
  parisc: pci memory bar assignment fails with 64bit kernels on dino/cujo
  audit: Fix use after free in audit_remove_watch_rule()
  netfilter: nf_ct_ext: fix possible panic after nf_ct_extend_unregister
  ANDROID: check dir value of xfrm_userpolicy_id
  ANDROID: NFC: Fix possible memory corruption when handling SHDLC I-Frame commands
  ANDROID: nfc: fdp: Fix possible buffer overflow in WCS4000 NFC driver
  ANDROID: NFC: st21nfca: Fix out of bounds kernel access when handling ATR_REQ
  ANDROID: usb: gadget: assign no-op request complete callbacks
  ANDROID: usb: gadget: configfs: fix null ptr in android_disconnect
  ANDROID: uid_sys_stats: Fix implicit declaration of get_cmdline()
  uid_sys_stats: log task io with a debug flag
  Linux 4.9.44
  MIPS: DEC: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression
  pinctrl: meson-gxbb: Add missing GPIODV_18 pin entry
  pinctrl: samsung: Remove bogus irq_[un]mask from resource management
  pinctrl: uniphier: fix WARN_ON() of pingroups dump on LD20
  pinctrl: uniphier: fix WARN_ON() of pingroups dump on LD11
  pinctrl: intel: merrifield: Correct UART pin lists
  pinctrl: sunxi: add a missing function of A10/A20 pinctrl driver
  pnfs/blocklayout: require 64-bit sector_t
  iio: adc: vf610_adc: Fix VALT selection value for REFSEL bits
  usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume
  usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter
  usb: core: unlink urbs from the tail of the endpoint's urb_list
  USB: Check for dropped connection before switching to full speed
  usb: renesas_usbhs: Fix UGCTRL2 value for R-Car Gen3
  usb: gadget: udc: renesas_usb3: Fix usb_gadget_giveback_request() calling
  uas: Add US_FL_IGNORE_RESIDUE for Initio Corporation INIC-3069
  staging: comedi: comedi_fops: do not call blocking ops when !TASK_RUNNING
  iio: light: tsl2563: use correct event code
  iio: accel: bmc150: Always restore device to normal mode after suspend-resume
  staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read
  USB: hcd: Mark secondary HCD as dead if the primary one died
  usb: musb: fix tx fifo flush handling again
  USB: serial: pl2303: add new ATEN device id
  USB: serial: cp210x: add support for Qivicon USB ZigBee dongle
  USB: serial: option: add D-Link DWM-222 device ID
  drm/i915: Fix out-of-bounds array access in bdw_load_gamma_lut
  drm/etnaviv: Fix off-by-one error in reloc checking
  nfs/flexfiles: fix leak of nfs4_ff_ds_version arrays
  mmc: mmc: correct the logic for setting HS400ES signal voltage
  nand: fix wrong default oob layout for small pages using soft ecc
  fuse: initialize the flock flag in fuse_file on allocation
  target: Fix node_acl demo-mode + uncached dynamic shutdown regression
  iscsi-target: Fix iscsi_np reset hung task during parallel delete
  iscsi-target: fix memory leak in iscsit_setup_text_cmd()
  mtd: nand: Fix timing setup for NANDs that do not support SET FEATURES
  xtensa: don't limit csum_partial export by CONFIG_NET
  xtensa: mm/cache: add missing EXPORT_SYMBOLs
  xtensa: fix cache aliasing handling code for WT cache
  futex: Remove unnecessary warning from get_futex_key
  mm: fix list corruptions on shmem shrinklist
  mm: ratelimit PFNs busy info message
  ANDROID: Use sk_uid to replace uid get from socket file
  Linux 4.9.43
  Revert "ARM: dts: sun8i: Support DTB build for NanoPi M1"
  KVM: arm/arm64: Handle hva aging while destroying the vm
  sparc64: Prevent perf from running during super critical sections
  udp: consistently apply ufo or fragmentation
  revert "ipv4: Should use consistent conditional judgement for ip fragment in __ip_append_data and ip_finish_output"
  revert "net: account for current skb length when deciding about UFO"
  packet: fix tp_reserve race in packet_set_ring
  igmp: Fix regression caused by igmp sysctl namespace code.
  net: avoid skb_warn_bad_offload false positives on UFO
  tcp: fastopen: tcp_connect() must refresh the route
  net: sched: set xt_tgchk_param par.nft_compat as 0 in ipt_init_target
  net/mlx4_en: don't set CHECKSUM_COMPLETE on SCTP packets
  bpf, s390: fix jit branch offset related to ldimm64
  net: fix keepalive code vs TCP_FASTOPEN_CONNECT
  tcp: avoid setting cwnd to invalid ssthresh after cwnd reduction states
  ppp: fix xmit recursion detection on ppp channels
  ppp: Fix false xmit recursion detect with two ppp devices
  Linux 4.9.42
  workqueue: implicit ordered attribute should be overridable
  net: phy: Fix PHY unbind crash
  net: account for current skb length when deciding about UFO
  ipv4: Should use consistent conditional judgement for ip fragment in __ip_append_data and ip_finish_output
  net/mlx5: E-Switch, Re-enable RoCE on mode change only after FDB destroy
  mm: don't dereference struct page fields of invalid pages
  signal: protect SIGNAL_UNKILLABLE from unintentional clearing.
  lib/Kconfig.debug: fix frv build failure
  mm, slab: make sure that KMALLOC_MAX_SIZE will fit into MAX_ORDER
  ARM: 8632/1: ftrace: fix syscall name matching
  virtio_blk: fix panic in initialization error path
  nbd: blk_mq_init_queue returns an error code on failure, not NULL
  iw_cxgb4: do not send RX_DATA_ACK CPLs after close/abort
  ARM: dts: sunxi: Change node name for pwrseq pin on Olinuxino-lime2-emmc
  ARM: dts: sun8i: Support DTB build for NanoPi M1
  drm/virtio: fix framebuffer sparse warning
  scsi: qla2xxx: Get mutex lock before checking optrom_state
  clk/samsung: exynos542x: mark some clocks as critical
  ipv4: make tcp_notsent_lowat sysctl knob behave as true unsigned int
  phy state machine: failsafe leave invalid RUNNING state
  netfilter: use fwmark_reflect in nf_send_reset
  ASoC: rt5645: set sel_i2s_pre_div1 to 2
  spi: spi-axi: Free resources on error path
  x86/boot: Add missing declaration of string functions
  tg3: Fix race condition in tg3_get_stats64().
  net: phy: dp83867: fix irq generation
  sh_eth: R8A7740 supports packet shecksumming
  sh_eth: fix EESIPR values for SH77{34|63}
  wext: handle NULL extra data in iwe_stream_add_point better
  sparc64: Fix exception handling in UltraSPARC-III memcpy.
  sparc64: Measure receiver forward progress to avoid send mondo timeout
  xen-netback: correctly schedule rate-limited queues
  net: phy: Correctly process PHY_HALTED in phy_stop_machine()
  net/mlx5e: Schedule overflow check work to mlx5e workqueue
  net/mlx5e: Fix wrong delay calculation for overflow check scheduling
  net/mlx5e: Fix outer_header_zero() check size
  net/mlx5: Fix command bad flow on command entry allocation failure
  net/mlx5: Consider tx_enabled in all modes on remap
  sctp: fix the check for _sctp_walk_params and _sctp_walk_errors
  sctp: don't dereference ptr before leaving _sctp_walk_{params, errors}()
  dccp: fix a memleak for dccp_feat_init err process
  dccp: fix a memleak that dccp_ipv4 doesn't put reqsk properly
  dccp: fix a memleak that dccp_ipv6 doesn't put reqsk properly
  net: ethernet: nb8800: Handle all 4 RGMII modes identically
  ipv6: Don't increase IPSTATS_MIB_FRAGFAILS twice in ip6_fragment()
  packet: fix use-after-free in prb_retire_rx_blk_timer_expired()
  openvswitch: fix potential out of bound access in parse_ct
  mcs7780: Fix initialization when CONFIG_VMAP_STACK is enabled
  rtnetlink: allocate more memory for dev_set_mac_address()
  ipv4: initialize fib_trie prior to register_netdev_notifier call.
  net: dsa: b53: Add missing ARL entries for BCM53125
  ipv6: avoid overflow of offset in ip6_find_1stfragopt
  net: Zero terminate ifr_name in dev_ifname().
  ipv4: ipv6: initialize treq->txhash in cookie_v[46]_check()
  tcp_bbr: init pacing rate on first RTT sample
  tcp_bbr: remove sk_pacing_rate=0 transient during init
  tcp_bbr: introduce bbr_init_pacing_rate_from_rtt() helper
  tcp_bbr: introduce bbr_bw_to_pacing_rate() helper
  tcp_bbr: cut pacing rate only if filled pipe
  saa7164: fix double fetch PCIe access condition
  Btrfs: fix early ENOSPC due to delalloc
  f2fs: sanity check checkpoint segno and blkoff
  media: lirc: LIRC_GET_REC_RESOLUTION should return microseconds
  mmc: core: Use device_property_read instead of of_property_read
  mmc: dw_mmc: Use device_property_read instead of of_property_read
  iscsi-target: Fix initial login PDU asynchronous socket close OOPs
  media: platform: davinci: return -EINVAL for VPFE_CMD_S_CCDC_RAW_PARAMS ioctl
  ARM: dts: tango4: Request RGMII RX and TX clock delays
  ARM: dts: armada-38x: Fix irq type for pca955
  ext4: fix overflow caused by missing cast in ext4_resize_fs()
  ext4: fix SEEK_HOLE/SEEK_DATA for blocksize < pagesize
  gpiolib: skip unwanted events, don't convert them to opposite edge
  iommu/amd: Enable ga_log_intr when enabling guest_mode
  powerpc/64: Fix __check_irq_replay missing decrementer interrupt
  powerpc/tm: Fix saving of TM SPRs in core dump
  timers: Fix overflow in get_next_timer_interrupt
  mm/page_alloc: Remove kernel address exposure in free_reserved_area()
  KVM: async_pf: make rcu irq exit if not triggered from idle task
  ASoC: do not close shared backend dailink
  drm/amdgpu: Fix undue fallthroughs in golden registers initialization
  ALSA: hda - Fix speaker output from VAIO VPCL14M1R
  cpuset: fix a deadlock due to incomplete patching of cpusets_enabled()
  mm, mprotect: flush TLB if potentially racing with a parallel reclaim leaving stale TLB entries
  mmc: core: Fix access to HS400-ES devices
  device property: Make dev_fwnode() public
  mmc: sdhci-of-at91: force card detect value for non removable devices
  NFSv4: Fix EXCHANGE_ID corrupt verifier issue
  brcmfmac: fix memleak due to calling brcmf_sdiod_sgtable_alloc() twice
  iwlwifi: dvm: prevent an out of bounds access
  workqueue: restore WQ_UNBOUND/max_active==1 to be ordered
  libata: array underflow in ata_find_dev()
  cgroup: fix error return value from cgroup_subtree_control()
  cgroup: create dfl_root files on subsys registration
  parisc: Handle vma's whose context is not current in flush_cache_range
  ANDROID: binder: don't queue async transactions to thread.
  ANDROID: binder: don't enqueue death notifications to thread todo.
  ANDROID: binder: call poll_wait() unconditionally.
  ANDROID: keychord: Fix for a memory leak in keychord.
  ANDROID: keychord: Fix races in keychord_write.
  android: configs: move quota-related configs to recommended
  ANDROID: sdcardfs: override credential for ioctl to lower fs
  ANDROID: xt_qtaguid: handle properly request sockets

Conflicts:
	drivers/staging/android/fiq_debugger/fiq_debugger.c
	include/linux/sched.h
	kernel/locking/spinlock_debug.c
	sound/soc/soc-pcm.c

Change-Id: I163a8c98f1737eeb01b9c8a0636a91d552ef349f
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
2017-09-07 14:32:09 -07:00
Kyle Yan
bd44874d1f ANDROID: hardlockup: detect hard lockups without NMIs using secondary cpus
This patch adds back the hardlockup detection without NMIs from
<aaf78ec6c898b72>("ANDROID: hardlockup: detect hard lockups without NMIs
using secondary cpus") which was reverted after the hard lockup detection
logic was moved to a separate file in <b969a240448bfd8>("kernel/watchdog.c:
move hardlockup detector to separate file").

Change-Id: If6a24b379d29fa582344fe57d26df4bd2b8cc89f
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
2017-08-28 11:25:03 -07:00
Greg Kroah-Hartman
02f29ab1b9 Merge 4.9.42 into android-4.9
Changes in 4.9.42
	parisc: Handle vma's whose context is not current in flush_cache_range
	cgroup: create dfl_root files on subsys registration
	cgroup: fix error return value from cgroup_subtree_control()
	libata: array underflow in ata_find_dev()
	workqueue: restore WQ_UNBOUND/max_active==1 to be ordered
	iwlwifi: dvm: prevent an out of bounds access
	brcmfmac: fix memleak due to calling brcmf_sdiod_sgtable_alloc() twice
	NFSv4: Fix EXCHANGE_ID corrupt verifier issue
	mmc: sdhci-of-at91: force card detect value for non removable devices
	device property: Make dev_fwnode() public
	mmc: core: Fix access to HS400-ES devices
	mm, mprotect: flush TLB if potentially racing with a parallel reclaim leaving stale TLB entries
	cpuset: fix a deadlock due to incomplete patching of cpusets_enabled()
	ALSA: hda - Fix speaker output from VAIO VPCL14M1R
	drm/amdgpu: Fix undue fallthroughs in golden registers initialization
	ASoC: do not close shared backend dailink
	KVM: async_pf: make rcu irq exit if not triggered from idle task
	mm/page_alloc: Remove kernel address exposure in free_reserved_area()
	timers: Fix overflow in get_next_timer_interrupt
	powerpc/tm: Fix saving of TM SPRs in core dump
	powerpc/64: Fix __check_irq_replay missing decrementer interrupt
	iommu/amd: Enable ga_log_intr when enabling guest_mode
	gpiolib: skip unwanted events, don't convert them to opposite edge
	ext4: fix SEEK_HOLE/SEEK_DATA for blocksize < pagesize
	ext4: fix overflow caused by missing cast in ext4_resize_fs()
	ARM: dts: armada-38x: Fix irq type for pca955
	ARM: dts: tango4: Request RGMII RX and TX clock delays
	media: platform: davinci: return -EINVAL for VPFE_CMD_S_CCDC_RAW_PARAMS ioctl
	iscsi-target: Fix initial login PDU asynchronous socket close OOPs
	mmc: dw_mmc: Use device_property_read instead of of_property_read
	mmc: core: Use device_property_read instead of of_property_read
	media: lirc: LIRC_GET_REC_RESOLUTION should return microseconds
	f2fs: sanity check checkpoint segno and blkoff
	Btrfs: fix early ENOSPC due to delalloc
	saa7164: fix double fetch PCIe access condition
	tcp_bbr: cut pacing rate only if filled pipe
	tcp_bbr: introduce bbr_bw_to_pacing_rate() helper
	tcp_bbr: introduce bbr_init_pacing_rate_from_rtt() helper
	tcp_bbr: remove sk_pacing_rate=0 transient during init
	tcp_bbr: init pacing rate on first RTT sample
	ipv4: ipv6: initialize treq->txhash in cookie_v[46]_check()
	net: Zero terminate ifr_name in dev_ifname().
	ipv6: avoid overflow of offset in ip6_find_1stfragopt
	net: dsa: b53: Add missing ARL entries for BCM53125
	ipv4: initialize fib_trie prior to register_netdev_notifier call.
	rtnetlink: allocate more memory for dev_set_mac_address()
	mcs7780: Fix initialization when CONFIG_VMAP_STACK is enabled
	openvswitch: fix potential out of bound access in parse_ct
	packet: fix use-after-free in prb_retire_rx_blk_timer_expired()
	ipv6: Don't increase IPSTATS_MIB_FRAGFAILS twice in ip6_fragment()
	net: ethernet: nb8800: Handle all 4 RGMII modes identically
	dccp: fix a memleak that dccp_ipv6 doesn't put reqsk properly
	dccp: fix a memleak that dccp_ipv4 doesn't put reqsk properly
	dccp: fix a memleak for dccp_feat_init err process
	sctp: don't dereference ptr before leaving _sctp_walk_{params, errors}()
	sctp: fix the check for _sctp_walk_params and _sctp_walk_errors
	net/mlx5: Consider tx_enabled in all modes on remap
	net/mlx5: Fix command bad flow on command entry allocation failure
	net/mlx5e: Fix outer_header_zero() check size
	net/mlx5e: Fix wrong delay calculation for overflow check scheduling
	net/mlx5e: Schedule overflow check work to mlx5e workqueue
	net: phy: Correctly process PHY_HALTED in phy_stop_machine()
	xen-netback: correctly schedule rate-limited queues
	sparc64: Measure receiver forward progress to avoid send mondo timeout
	sparc64: Fix exception handling in UltraSPARC-III memcpy.
	wext: handle NULL extra data in iwe_stream_add_point better
	sh_eth: fix EESIPR values for SH77{34|63}
	sh_eth: R8A7740 supports packet shecksumming
	net: phy: dp83867: fix irq generation
	tg3: Fix race condition in tg3_get_stats64().
	x86/boot: Add missing declaration of string functions
	spi: spi-axi: Free resources on error path
	ASoC: rt5645: set sel_i2s_pre_div1 to 2
	netfilter: use fwmark_reflect in nf_send_reset
	phy state machine: failsafe leave invalid RUNNING state
	ipv4: make tcp_notsent_lowat sysctl knob behave as true unsigned int
	clk/samsung: exynos542x: mark some clocks as critical
	scsi: qla2xxx: Get mutex lock before checking optrom_state
	drm/virtio: fix framebuffer sparse warning
	ARM: dts: sun8i: Support DTB build for NanoPi M1
	ARM: dts: sunxi: Change node name for pwrseq pin on Olinuxino-lime2-emmc
	iw_cxgb4: do not send RX_DATA_ACK CPLs after close/abort
	nbd: blk_mq_init_queue returns an error code on failure, not NULL
	virtio_blk: fix panic in initialization error path
	ARM: 8632/1: ftrace: fix syscall name matching
	mm, slab: make sure that KMALLOC_MAX_SIZE will fit into MAX_ORDER
	lib/Kconfig.debug: fix frv build failure
	signal: protect SIGNAL_UNKILLABLE from unintentional clearing.
	mm: don't dereference struct page fields of invalid pages
	net/mlx5: E-Switch, Re-enable RoCE on mode change only after FDB destroy
	ipv4: Should use consistent conditional judgement for ip fragment in __ip_append_data and ip_finish_output
	net: account for current skb length when deciding about UFO
	net: phy: Fix PHY unbind crash
	workqueue: implicit ordered attribute should be overridable
	Linux 4.9.42

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2017-08-11 13:55:02 -07:00
Sudip Mukherjee
d12824c897 lib/Kconfig.debug: fix frv build failure
[ Upstream commit da0510c47519fe0999cffe316e1d370e29f952be ]

The build of frv allmodconfig was failing with the errors like:

  /tmp/cc0JSPc3.s: Assembler messages:
  /tmp/cc0JSPc3.s:1839: Error: symbol `.LSLT0' is already defined
  /tmp/cc0JSPc3.s:1842: Error: symbol `.LASLTP0' is already defined
  /tmp/cc0JSPc3.s:1969: Error: symbol `.LELTP0' is already defined
  /tmp/cc0JSPc3.s:1970: Error: symbol `.LELT0' is already defined

Commit 866ced950b ("kbuild: Support split debug info v4") introduced
splitting the debug info and keeping that in a separate file.  Somehow,
the frv-linux gcc did not like that and I am guessing that instead of
splitting it started copying.  The first report about this is at:

  https://lists.01.org/pipermail/kbuild-all/2015-July/010527.html.

I will try and see if this can work with frv and if still fails I will
open a bug report with gcc.  But meanwhile this is the easiest option to
solve build failure of frv.

Fixes: 866ced950b ("kbuild: Support split debug info v4")
Link: http://lkml.kernel.org/r/1482062348-5352-1-git-send-email-sudipm.mukherjee@gmail.com
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-11 08:49:36 -07:00
Kyle Yan
2506cb5328 Merge remote-tracking branch '4.9/tmp-75d78c7' into 4.9
* 4.9/tmp-75d78c7:
  Linux 4.9.35
  brcmfmac: fix uninitialized warning in brcmf_usb_probe_phase2()
  jump label: fix passing kbuild_cflags when checking for asm goto support
  net: phy: fix marvell phy status reading
  spi: double time out tolerance
  dmaengine: bcm2835: Fix cyclic DMA period splitting
  net: phy: Initialize mdio clock at probe function
  rt2x00: avoid introducing a USB dependency in the rt2x00lib module
  usb: gadget: f_fs: avoid out of bounds access on comp_desc
  mtd: spi-nor: fix spansion quad enable
  of: Add check to of_scan_flat_dt() before accessing initial_boot_params
  rxrpc: Fix several cases where a padded len isn't checked in ticket decode
  drm/amdgpu: adjust default display clock
  drm/amdgpu/atom: fix ps allocation size for EnableDispPowerGating
  drm/radeon: add a quirk for Toshiba Satellite L20-183
  drm/radeon: add a PX quirk for another K53TK variant
  iscsi-target: Reject immediate data underflow larger than SCSI transfer length
  iscsi-target: Fix delayed logout processing greater than SECONDS_FOR_LOGOUT_COMP
  target: Fix kref->refcount underflow in transport_cmd_finish_abort
  arm64/vdso: Fix nsec handling for CLOCK_MONOTONIC_RAW
  time: Fix CLOCK_MONOTONIC_RAW sub-nanosecond accounting
  time: Fix clock->read(clock) race around clocksource changes
  brcmfmac: unbind all devices upon failure in firmware callback
  brcmfmac: use firmware callback upon failure to load
  brcmfmac: add parameter to pass error code in firmware callback
  Input: i8042 - add Fujitsu Lifebook AH544 to notimeout list
  powerpc/64s: Handle data breakpoints in Radix mode
  powerpc/kprobes: Pause function_graph tracing during jprobes handling
  signal: Only reschedule timers on signals timers have sent
  HID: Add quirk for Dell PIXART OEM mouse
  cxgb4: notify uP to route ctrlq compl to rdma rspq
  CIFS: Improve readdir verbosity
  KVM: PPC: Book3S HV: Context-switch EBB registers properly
  KVM: PPC: Book3S HV: Preserve userspace HTM state properly
  KVM: s390: gaccess: fix real-space designation asce handling for gmap shadows
  perf/x86/intel: Add 1G DTLB load/store miss support for SKL
  lib/cmdline.c: fix get_options() overflow while parsing ranges
  autofs: sanity check status reported with AUTOFS_DEV_IOCTL_FAIL
  powerpc/perf: Fix oops when kthread execs user process
  fs/exec.c: account for argv/envp pointers
  ALSA: pcm: Don't treat NULL chmap as a fatal error
  ALSA: firewire-lib: Fix stall of process context at packet error
  xen-blkback: don't leak stack data via response ring
  xen/blkback: fix disconnect while I/Os in flight
  clk: sunxi-ng: a31: Correct lcd1-ch1 clock register offset
  Revert "ANDROID: hardlockup: detect hard lockups without NMIs using secondary cpus"
  Revert "ANDROID: kernel/watchdog: fix unused variable warning"
  UPSTREAM: usb: gadget: f_fs: avoid out of bounds access on comp_desc
  Linux 4.9.34
  mm: fix new crash in unmapped_area_topdown()
  Allow stack to grow up to address space limit
  mm: larger stack guard gap, between vmas
  alarmtimer: Rate limit periodic intervals
  crypto: Work around deallocated stack frame reference gcc bug on sparc.
  vTPM: Fix missing NULL check
  MIPS: .its targets depend on vmlinux
  MIPS: Fix bnezc/jialc return address calculation
  usb: dwc3: exynos fix axius clock error path to do cleanup
  usb: gadget: composite: Fix function used to free memory
  alarmtimer: Prevent overflow of relative timers
  genirq: Release resources in __setup_irq() error path
  sched/core: Idle_task_exit() shouldn't use switch_mm_irqs_off()
  iio: imu: inv_mpu6050: add accel lpf setting for chip >= MPU6500
  swap: cond_resched in swap_cgroup_prepare()
  mm/memory-failure.c: use compound_head() flags for huge pages
  USB: gadgetfs, dummy-hcd, net2280: fix locking for callbacks
  USB: gadget: fix GPF in gadgetfs
  usb: xhci: ASMedia ASM1042A chipset need shorts TX quirk
  usb: xhci: Fix USB 3.1 supported protocol parsing
  drivers/misc/c2port/c2port-duramar2150.c: checking for NULL instead of IS_ERR()
  misc: mic: double free on ioctl error path
  ath10k: fix napi crash during rmmod when probe firmware fails
  usb: r8a66597-hcd: decrease timeout
  usb: r8a66597-hcd: select a different endpoint on timeout
  USB: gadget: dummy_hcd: fix hub-descriptor removable fields
  pvrusb2: reduce stack usage pvr2_eeprom_analyze()
  USB: usbip: fix nonconforming hub descriptor
  usb: core: fix potential memory leak in error path during hcd creation
  USB: hub: fix SS max number of ports
  usb: gadget: udc: renesas_usb3: lock for PN_ registers access
  usb: gadget: udc: renesas_usb3: fix deadlock by spinlock
  usb: gadget: udc: renesas_usb3: fix pm_runtime functions calling
  IB/mlx5: Fix kernel to user leak prevention logic
  iio: adc: ti_am335x_adc: allocating too much in probe
  iio: proximity: as3935: recalibrate RCO after resume
  iio: st_pressure: Fix data sign
  staging: iio: tsl2x7x_core: Fix standard deviation calculation
  staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data()
  mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode
  x86/mm/32: Set the '__vmalloc_start_set' flag in initmem_init()
  serial: sh-sci: Fix late enablement of AUTORTS
  serial: efm32: Fix parity management in 'efm32_uart_console_get_options()'
  drm/vc4: Fix OOPSes from trying to cache a partially constructed BO.
  drm/mediatek: fix mtk_hdmi_setup_vendor_specific_infoframe mistake
  mac80211: don't send SMPS action frame in AP mode when not needed
  mac80211: fix dropped counter in multiqueue RX
  mac80211: strictly check mesh address extension mode
  mac80211: fix IBSS presp allocation size
  mac80211: fix packet statistics for fast-RX
  mac80211: fix CSA in IBSS mode
  usb: musb: dsps: keep VBUS on for host-only mode
  drm/i915: Fix GVT-g PVINFO version compatibility check
  drm/amdgpu: Fix overflow of watermark calcs at > 4k resolutions.
  mac80211/wpa: use constant time memory comparison for MACs
  mac80211: don't look at the PM bit of BAR frames
  vb2: Fix an off by one error in 'vb2_plane_vaddr'
  cpufreq: conservative: Allow down_threshold to take values from 1 to 10
  ila_xlat: add missing hash secret initialization
  can: gs_usb: fix memory leak in gs_cmd_reset()
  configfs: Fix race between create_link and configfs_rmdir
  fs: pass on flags in compat_writev
  ANDROID: sdcardfs: remove dead function open_flags_to_access_mode()
  ANDROID: android-base.cfg: split out arm64-specific configs
  Linux 4.9.33
  sparc64: make string buffers large enough
  drm/i915: Always recompute watermarks when distrust_bios_wm is set, v2.
  drm/i915: Workaround VLV/CHV DSI scanline counter hardware fail
  s390/kvm: do not rely on the ILC on kvm host protection fauls
  xtensa: don't use linux IRQ #0
  RDMA/qedr: Return max inline data in QP query result
  RDMA/qedr: Don't spam dmesg if QP is in error state
  RDMA/qedr: Don't reset QP when queues aren't flushed
  RDMA/qedr: Fix and simplify memory leak in PD alloc
  RDMA/qedr: Dispatch port active event from qedr_add
  netfilter: nft_log: restrict the log prefix length to 127
  netfilter: nf_tables: fix set->nelems counting with no NLM_F_EXCL
  tipc: fix nametbl_lock soft lockup at node/link events
  tipc: add subscription refcount to avoid invalid delete
  tipc: fix connection refcount error
  tipc: ignore requests when the connection state is not CONNECTED
  ARCv2: smp-boot: wake_flag polling by non-Masters needs to be uncached
  ARC: smp-boot: Decouple Non masters waiting API from jump to entry point
  vhost/vsock: handle vhost_vq_init_access() error
  kernel/watchdog: prevent false hardlockup on overloaded system
  kernel/watchdog.c: move shared definitions to nmi.h
  kernel/watchdog.c: move hardlockup detector to separate file
  userfaultfd: fix SIGBUS resulting from false rwsem wakeups
  proc: add a schedule point in proc_pid_readdir()
  frv: add missing atomic64 operations
  frv: add atomic64_add_unless()
  romfs: use different way to generate fsid for BLOCK or MTD
  mn10300: fix build error of missing fpu_save()
  usb: musb: Fix external abort on non-linefetch for musb_irq_work()
  sctp: sctp_addr_id2transport should verify the addr before looking up assoc
  sctp: sctp gso should set feature with NETIF_F_SG when calling skb_segment
  bnxt_en: Fix RTNL lock usage on bnxt_get_port_module_status().
  bnxt_en: Fix RTNL lock usage on bnxt_update_link().
  bnxt_en: Enhance autoneg support.
  bnxt_en: Fix bnxt_reset() in the slow path task.
  net-next: ethernet: mediatek: change the compatible string
  r8152: avoid start_xmit to schedule napi when napi is disabled
  r8152: fix rtl8152_post_reset function
  r8152: re-schedule napi for tx
  r8152: check rx after napi is enabled
  r8152: avoid start_xmit to call napi_schedule during autosuspend
  nvmet-rdma: Fix missing dma sync to nvme data structures
  nfs: Fix "Don't increment lock sequence ID after NFS4ERR_MOVED"
  ravb: unmap descriptors when freeing rings
  drm/ast: Fixed system hanged if disable P2A
  drm/nouveau: Fix drm poll_helper handling
  drm/nouveau: Don't enabling polling twice on runtime resume
  drm/nouveau: Handle fbcon suspend/resume in seperate worker
  drm/nouveau: Rename acpi_work to hpd_work
  drm/nouveau: Intercept ACPI_VIDEO_NOTIFY_PROBE
  gtp: add genl family modules alias
  net: phy: micrel: add support for KSZ8795
  parisc, parport_gsc: Fixes for printk continuation lines
  net/mlx5: Return EOPNOTSUPP when failing to get steering name-space
  net/mlx5: E-Switch, Err when retrieving steering name-space fails
  drm/i915: Check for NULL i915_vma in intel_unpin_fb_obj()
  net: adaptec: starfire: add checks for dma mapping errors
  pinctrl: berlin-bg4ct: fix the value for "sd1a" of pin SCRD0_CRD_PRES
  drm: Don't race connector registration
  drm: prevent double-(un)registration for connectors
  cec: fix wrong last_la determination
  pinctrl: baytrail: Rectify debounce support (part 2)
  gianfar: synchronize DMA API usage by free_skb_rx_queue w/ gfar_new_page
  net/mlx4_core: Avoid command timeouts during VF driver device shutdown
  drm/nouveau/fence/g84-: protect against concurrent access to semaphore buffers
  drm/nouveau: prevent userspace from deleting client object
  ipv6: fix flow labels when the traffic class is non-0
  FS-Cache: Initialise stores_lock in netfs cookie
  fscache: Clear outstanding writes when disabling a cookie
  fscache: Fix dead object requeue
  net: fix ndo_features_check/ndo_fix_features comment ordering
  net: phy: Fix PHY module checks and NULL deref in phy_attach_direct()
  net: phy: Fix lack of reference count on PHY driver
  ethtool: do not vzalloc(0) on registers dump
  log2: make order_base_2() behave correctly on const input value zero
  kasan: respect /proc/sys/kernel/traceoff_on_warning
  shmem: fix sleeping from atomic context
  jump label: pass kbuild_cflags when checking for asm goto support
  PM / runtime: Avoid false-positive warnings from might_sleep_if()
  ARM: defconfigs: make NF_CT_PROTO_SCTP and NF_CT_PROTO_UDPLITE built-in
  ipv6: Fix IPv6 packet loss in scenarios involving roaming + snooping switches
  vfio/spapr_tce: Set window when adding additional groups to container
  ipv6: addrconf: fix generation of new temporary addresses
  net: thunderx: Fix PHY autoneg for SGMII QLM mode
  kernel/ucount.c: mark user_header with kmemleak_ignore()
  powerpc/powernv: Properly set "host-ipi" on IPIs
  i2c: piix4: Fix request_region size
  i2c: piix4: Request the SMBUS semaphore inside the mutex
  sierra_net: Add support for IPv6 and Dual-Stack Link Sense Indications
  sierra_net: Skip validating irrelevant fields for IDLE LSIs
  net: hns: Fix the device being used for dma mapping during TX
  NET: mkiss: Fix panic
  ibmvnic: Initialize completion variables before starting work
  ibmvnic: Call napi_disable instead of napi_enable in failure path
  NET: Fix /proc/net/arp for AX.25
  gfs2: Use rhashtable walk interface in glock_hash_walk
  tipc: Fix tipc_sk_reinit race conditions
  ipv6: Inhibit IPv4-mapped src address on the wire.
  ipv6: Handle IPv4-mapped src to in6addr_any dst.
  tcp: tcp_probe: use spin_lock_bh()
  net: xilinx_emaclite: fix receive buffer overflow
  net: xilinx_emaclite: fix freezes due to unordered I/O
  ibmvnic: Fix endian error when requesting device capabilities
  ibmvnic: Fix endian errors in error reporting output
  netfilter: nf_conntrack_sip: fix wrong memory initialisation
  partitions/msdos: FreeBSD UFS2 file systems are not recognized
  drm/i915: Prevent the system suspend complete optimization
  PCI/PM: Add needs_resume flag to avoid suspend complete optimization
  usb: gadget: f_fs: Fix possibe deadlock
  FROMLIST: Remove the redundant skb->dev initialization in ip6_fragment
  FROMLIST: bpf: Remove duplicate tcp_filter hook in ipv6
  FROMLIST: ipv6: Initial skb->dev and skb->protocol in ip6_output
  FROMLIST: bpf: cgroup skb progs cannot access ld_abs/ind
  ANDROID: uid_sys_stats: check previous uid_entry before call find_or_register_uid

Conflicts:
	drivers/usb/gadget/function/f_fs.c
	kernel/watchdog.c

Change-Id: Ib91e6121cace8bcdc4dd8b1727792dd5bb6f1535
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
2017-07-05 13:17:33 -07:00
Greg Kroah-Hartman
a26cd8eba6 Revert "ANDROID: hardlockup: detect hard lockups without NMIs using secondary cpus"
This reverts commit aaf78ec6c8.

We need to do this to handle a merge conflict with 4.9.32.  It will be
forward ported after the merge is complete.

Cc: Brian Norris <briannorris@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2017-06-27 10:31:16 +02:00
Subhash Jadavani
bb03ec547a lib/Kconfig.debug: add UFS_FAULT_INJECTION config
UFS_FAULT_INJECTION config definition was present on msm-4.4 kernel but
was missed on msm-4.9 while taking snapshot from msm-4.4. Add this config
now so it can be enabled later for debug purposes.

Change-Id: Ia62e30f2f123c0a8c79affb205d1fb956f8f6d57
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2017-06-23 19:43:49 -07:00
Kees Cook
a967be8dec time: Remove CONFIG_TIMER_STATS
Currently CONFIG_TIMER_STATS exposes process information across namespaces:

kernel/time/timer_list.c print_timer():

        SEQ_printf(m, ", %s/%d", tmp, timer->start_pid);

/proc/timer_list:

 #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570

Given that the tracer can give the same information, this patch entirely
removes CONFIG_TIMER_STATS.

Change-Id: I66e06ae2d6e32c309824310d3d9bf54d1047eab1
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: John Stultz <john.stultz@linaro.org>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: linux-doc@vger.kernel.org
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Xing Gao <xgao01@email.wm.edu>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Jessica Frazelle <me@jessfraz.com>
Cc: kernel-hardening@lists.openwall.com
Cc: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Michal Marek <mmarek@suse.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Olof Johansson <olof@lixom.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-api@vger.kernel.org
Cc: Arjan van de Ven <arjan@linux.intel.com>
Link: http://lkml.kernel.org/r/20170208192659.GA32582@beast
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Git-commit: dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[ohaugan@codeaurora.org: Fixed merge conflicts]
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2017-05-11 13:26:42 -07:00
Trilok Soni
bdf06f722b lib: memtest: Add MEMTEST_ENABLE_DEFAULT option
As of now memtest remains disabled until we specify the patterns
through the kernel command line. Some platforms have two
different configurations files (one for debug and another for
product) which can use the configuration option to enable the
memtest by default (in the debug configuration file).

CRs-Fixed: 1007344
Change-Id: I0bf7b33c3584f3d6cf5ef58dfe72be46212041da
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2017-03-29 13:02:18 -07:00
Trilok Soni
65cfa9fdbf mm/page_owner: ask users about default setting of PAGE_OWNER
Since this commit 48c96a3685 ("mm/page_owner: keep track
of page owners") doesn't enable the page_owner by default
even though CONFIG_PAGE_OWNER is enabled.

Add configuration option CONFIG_PAGE_OWNER_ENABLE_DEFAULT to
allow user to enable it by default through the defconfig file.

CRs-Fixed: 1006743
Change-Id: I9b565a34e2068bf575974eaf3dc9f7820bdd7a96
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2017-03-29 13:02:17 -07:00
Syed Rameez Mustafa
cf9c1e45e7 kernel/lib: add additional debug capabilities for data corruption
Data corruptions in the kernel often end up in system crashes that
are easier to debug closer to the time of detection. Specifically,
if we do not panic immediately after lock or list corruptions have been
detected, the problem context is lost in the ensuing system mayhem.
Add support for allowing system crash immediately after such corruptions
are detected. The CONFIG option controls the enabling/disabling of the
feature.

Change-Id: I9b2eb62da506a13007acff63e85e9515145909ff
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2017-03-29 13:02:14 -07:00
Vignesh Radhakrishnan
d1fdabf173 kmemleak : Make kmemleak_stack_scan optional using config
Currently we have kmemleak_stack_scan enabled by default.
This can hog the cpu with pre-emption disabled for a long
time starving other tasks.

Make this optional at compile time, since if required
we can always write to sysfs entry and enable this option.

Change-Id: Ie30447861c942337c7ff25ac269b6025a527e8eb
Signed-off-by: Vignesh Radhakrishnan <vigneshr@codeaurora.org>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2017-03-21 18:42:37 -07:00
Channagoud Kadabi
2eada80751 kernel: rcu: Panic on RCU stall
Enable panic on RCU stalls if the RCU_PANIC_ON_STALL is enabled. This
helps collecting the cpu context for debugging.

Change-Id: Ibc95799df995bf31053152ab9b3894710fcd9f43
Signed-off-by: Channagoud Kadabi <ckadabi@codeaurora.org>
2017-03-15 11:49:57 -07:00
Matt Wagantall
345eb978a6 ANDROID: sched/rt: Add Kconfig option to enable panicking for RT throttling
This may be useful for detecting and debugging RT throttling issues.

Change-Id: I5807a897d11997d76421c1fcaa2918aad988c6c9
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
[rameezmustafa@codeaurora.org]: Port to msm-3.18]
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
[jstultz: forwardported to 4.4]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Andres Oportus <andresoportus@google.com>
2017-01-31 10:47:10 -08:00
Colin Cross
aaf78ec6c8 ANDROID: hardlockup: detect hard lockups without NMIs using secondary cpus
Emulate NMIs on systems where they are not available by using timer
interrupts on other cpus.  Each cpu will use its softlockup hrtimer
to check that the next cpu is processing hrtimer interrupts by
verifying that a counter is increasing.

This patch is useful on systems where the hardlockup detector is not
available due to a lack of NMIs, for example most ARM SoCs.
Without this patch any cpu stuck with interrupts disabled can
cause a hardware watchdog reset with no debugging information,
but with this patch the kernel can detect the lockup and panic,
which can result in useful debugging info.

Change-Id: Ia5faf50243e19c1755201212e04c8892d929785a
Signed-off-by: Colin Cross <ccross@android.com>
2017-01-27 13:52:24 -08:00
Kyle Yan
5044bbd0f3 Merge remote-tracking branch '4.4/tmp-e5517c2' into 4.8
* 4.4/tmp-e5517c2:
  Linux 4.9-rc7
  fix default_file_splice_read()
  tipc: resolve connection flow control compatibility problem
  mvpp2: use correct size for memset
  net/mlx5: drop duplicate header delay.h
  net: ieee802154: drop duplicate header delay.h
  ibmvnic: drop duplicate header seq_file.h
  fsl/fman: fix a leak in tgec_free()
  net: ethtool: don't require CAP_NET_ADMIN for ETHTOOL_GLINKSETTINGS
  tipc: improve sanity check for received domain records
  tipc: fix compatibility bug in link monitoring
  net: ethernet: mvneta: Remove IFF_UNICAST_FLT which is not implemented
  Fix subtle CONFIG_MODVERSIONS problems
  MAINTAINERS: Add bug tracking system location entry type
  Revert "i2c: designware: do not disable adapter after transfer"
  dwc_eth_qos: drop duplicate headers
  parisc: Also flush data TLB in flush_icache_page_asm
  parisc: Fix race in pci-dma.c
  parisc: Switch to generic sched_clock implementation
  parisc: Fix races in parisc_setup_cache_timing()
  mfd: wm8994-core: Don't use managed regulator bulk get API
  mfd: wm8994-core: Disable regulators before removing them
  MIPS: mm: Fix output of __do_page_fault
  mfd: syscon: Support native-endian regmaps
  powerpc/mm: Fixup kernel read only mapping
  mpi: Fix NULL ptr dereference in mpi_powm() [ver #3]
  X.509: Fix double free in x509_cert_parse() [ver #3]
  gpu/drm/exynos/exynos_hdmi - Unmap region obtained by of_iomap
  net sched filters: fix filter handle ID in tfilter_notify_chain()
  net: dsa: bcm_sf2: Ensure we re-negotiate EEE during after link change
  bnxt: do not busy-poll when link is down
  udplite: call proper backlog handlers
  KVM: x86: check for pic and ioapic presence before use
  KVM: x86: fix out-of-bounds accesses of rtc_eoi map
  KVM: x86: drop error recovery in em_jmp_far and em_ret_far
  KVM: x86: fix out-of-bounds access in lapic
  init: use pr_cont() when displaying rotator during ramdisk loading.
  ipv6: bump genid when the IFA_F_TENTATIVE flag is clear
  MIPS: Mask out limit field when calculating wired entry count
  i2c: designware: fix rx fifo depth tracking
  i2c: designware: report short transfers
  drm/mediatek: fix null pointer dereference
  drm/mediatek: fixed the calc method of data rate per lane
  drm/mediatek: fix a typo of DISP_OD_CFG to OD_RELAYMODE
  powerpc/boot: Fix the early OPAL console wrappers
  net/mlx4_en: Free netdev resources under state lock
  net: revert "net: l2tp: Treat NET_XMIT_CN as success in l2tp_eth_dev_xmit"
  rtnetlink: fix the wrong minimal dump size getting from rtnl_calcit()
  bnxt_en: Fix a VXLAN vs GENEVE issue
  netdevice.h: fix kernel-doc warning
  driver: macvlan: Check if need rollback multicast setting in macvlan_open
  net: phy: micrel: fix KSZ8041FTL supported value
  xc2028: Fix use-after-free bug properly
  tile: avoid using clocksource_cyc2ns with absolute cycle count
  drm/radeon: fix power state when port pm is unavailable (v2)
  drm/amdgpu: fix power state when port pm is unavailable
  HID: hid-sensor-hub: clear memory to avoid random data
  HID: rmi: make transfer buffers DMA capable
  HID: magicmouse: make transfer buffers DMA capable
  HID: lg: make transfer buffers DMA capable
  HID: cp2112: make transfer buffers DMA capable
  can: bcm: fix support for CAN FD frames
  Revert "arm: move exports to definitions"
  Bluetooth: Fix using the correct source address type
  NFSv4.x: hide array-bounds warning
  flow_dissect: call init_default_flow_dissectors() earlier
  parisc: Fix printk continuations in system detection
  drm/arm: hdlcd: fix plane base address update
  perf/x86/intel/uncore: Allow only a single PMU/box within an events group
  perf/x86/intel: Cure bogus unwind from PEBS entries
  perf/x86: Restore TASK_SIZE check on frame pointer
  sched/autogroup: Do not use autogroup->tg in zombie threads
  sched/autogroup: Fix autogroup_move_group() to never skip sched_move_task()
  powerpc: Fix missing CRCs, add more asm-prototypes.h declarations
  crypto: scatterwalk - Remove unnecessary aliasing check in map_and_copy
  crypto: algif_hash - Fix result clobbering in recvmsg
  powerpc: Set missing wakeup bit in LPCR on POWER9
  watchdog: wdat_wdt: Select WATCHDOG_CORE
  tcp: zero ca_priv area when switching cc algorithms
  net: l2tp: Treat NET_XMIT_CN as success in l2tp_eth_dev_xmit
  NFSv4.1: Keep a reference on lock states while checking
  ethernet: stmmac: make DWMAC_STM32 depend on it's associated SoC
  Revert "ACPI: Execute _PTS before system reboot"
  thermal/powerclamp: add back module device table
  perf/core: Fix address filter parser
  mmc: dw_mmc: fix the error handling for dma operation
  x86/platform/intel-mid: Rename platform_wdt to platform_mrfld_wdt
  x86/build: Build compressed x86 kernels as PIE when !CONFIG_RELOCATABLE as well
  x86/platform/intel-mid: Register watchdog device after SCU
  x86/fpu: Fix invalid FPU ptrace state after execve()
  x86/boot: Fail the boot if !M486 and CPUID is missing
  x86/traps: Ignore high word of regs->cs in early_fixup_exception()
  apparmor: fix change_hat not finding hat after policy replacement
  tipc: eliminate obsolete socket locking policy description
  rtnl: fix the loop index update error in rtnl_dump_ifinfo()
  l2tp: fix racy SOCK_ZAPPED flag check in l2tp_ip{,6}_bind()
  iommu/vt-d: Fix PASID table allocation
  sparc: drop duplicate header scatterlist.h
  net: macb: add check for dma mapping error in start_xmit()
  lockdep: Limit static allocations if PROVE_LOCKING_SMALL is defined
  config: Adding the new config parameter CONFIG_PROVE_LOCKING_SMALL for sparc
  NFSv4.1: Handle NFS4ERR_OLD_STATEID in nfs4_reclaim_open_state
  sunbmac: Fix compiler warning
  sunqe: Fix compiler warnings
  NFSv4: Don't call close if the open stateid has already been cleared
  sparc64: Enable 64-bit DMA
  sparc64: Enable sun4v dma ops to use IOMMU v2 APIs
  sparc64: Bind PCIe devices to use IOMMU v2 service
  sparc64: Initialize iommu_map_table and iommu_pool
  sparc64: Add ATU (new IOMMU) support
  sparc64: Add FORCE_MAX_ZONEORDER and default to 13
  rtnetlink: fix FDB size computation
  netns: fix get_net_ns_by_fd(int pid) typo
  af_unix: conditionally use freezable blocking calls in read
  net: ethernet: ti: cpsw: fix fixed-link phy probe deferral
  net: ethernet: ti: cpsw: add missing sanity check
  net: ethernet: ti: cpsw: fix secondary-emac probe error path
  net: ethernet: ti: cpsw: fix of_node and phydev leaks
  net: ethernet: ti: cpsw: fix deferred probe
  net: ethernet: ti: cpsw: fix mdio device reference leak
  net: ethernet: ti: cpsw: fix bad register access in probe error path
  net: sky2: Fix shutdown crash
  NFSv4: Fix CLOSE races with OPEN
  NFSv4.1: Fix a regression in DELEGRETURN
  mmc: sdhci-of-esdhc: fixup PRESENT_STATE read
  usb: gadget: f_fs: fix wrong parenthesis in ffs_func_req_match()
  perf/x86: Add perf support for AMD family-17h processors
  x86/dumpstack: Prevent KASAN false positive warnings
  x86/unwind: Prevent KASAN false positive warnings in guess unwinder
  cfg80211: limit scan results cache size
  net sched filters: pass netlink message flags in event notification
  ip6_tunnel: disable caching when the traffic class is inherited
  net: phy: fixed_phy: fix of_node leak in fixed_phy_unregister
  of_mdio: fix device reference leak in of_phy_find_device
  of_mdio: fix node leak in of_phy_register_fixed_link error path
  net: check dead netns for peernet2id_alloc()
  phy: twl4030-usb: Fix for musb session bit based PM
  usb: musb: Drop pointless PM runtime code for dsps glue
  usb: musb: Add missing pm_runtime_disable and drop 2430 PM timeout
  usb: musb: Fix PM for hub disconnect
  usb: musb: Fix sleeping function called from invalid context for hdrc glue
  usb: musb: Fix broken use of static variable for multiple instances
  x86/boot: Avoid warning for zero-filling .bss
  bnxt: add a missing rcu synchronization
  net: dsa: b53: Fix VLAN usage and how we treat CPU port
  net/phy/vitesse: Configure RGMII skew on VSC8601, if needed
  cxgb4: do not call napi_hash_del()
  be2net: do not call napi_hash_del()
  virtio-net: add a missing synchronize_net()
  drm/amd/powerplay: avoid out of bounds access on array ps.
  clk: efm32gg: Pass correct type to hw provider registration
  clk: berlin: Pass correct type to hw provider registration
  net: thunderx: Fix memory leak and other issues upon interface toggle
  net: thunderx: Fix VF driver's interface statistics
  net: thunderx: Fix configuration of L3/L4 length checking
  net: thunderx: Program LMAC credits based on MTU
  net: thunderx: Introduce BGX_ID_MASK macro to extract bgx_id
  ipv4: Fix memory leak in exception case for splitting tries
  ipv4: Restore fib_trie_flush_external function and fix call ordering
  bpf: fix range arithmetic for bpf map access
  device-dax: fail all private mapping attempts
  USB: serial: cp210x: add ID for the Zone DPMX
  perf/x86/uncore: Fix crash by removing bogus event_list[] handling for SNB client uncore IMC
  x86/sysfb: Fix lfb_size calculation
  x86/sysfb: Add support for 64bit EFI lfb_base
  rtnetlink: fix rtnl message size computation for XDP
  rtnetlink: fix rtnl_vfinfo_size
  gro_cells: mark napi struct as not busy poll candidates
  udp: restore UDPlite many-cast delivery
  net: arc_emac: don't pass multicast packets to kernel in non-multicast mode
  net: arc_emac: annonce IFF_MULTICAST support
  stmmac: fix PTP type ethtool stats
  stmmac: fix PTP support for GMAC4
  stmmac: update the PTP header file
  igmp: do not remove igmp souce list info when set link down
  usb: chipidea: move the lock initialization to core file
  net: ethernet: Fix SGMII unable to switch speed and autonego failure
  mac80211_hwsim: fix beacon delta calculation
  mac80211: fix A-MSDU aggregation with fast-xmit + txq
  mac80211: remove bogus skb vif assignment
  mac80211: update A-MPDU flag on tx dequeue
  cfg80211: add bitrate for 20MHz MCS 9
  Revert "mac80211: allow using AP_LINK_PS with mac80211-generated TIM IE"
  mac80211: Ignore VHT IE from peer with wrong rx_mcs_map
  perf/core: Do not set cpuctx->cgrp for unscheduled cgroups
  Fix USB CB/CBI storage devices with CONFIG_VMAP_STACK=y
  scsi: qla2xxx: do not abort all commands in the adapter during EEH recovery
  sparc64: fix compile warning section mismatch in find_node()
  scsi: mpt3sas: Fix secure erase premature termination
  sparc32: Fix inverted invalid_frame_pointer checks on sigreturns
  sparc64: Fix find_node warning if numa node cannot be found
  USB: serial: ftdi_sio: add support for TI CC3200 LaunchPad
  batman-adv: Detect missing primaryif during tp_send as error
  batman-adv: Revert "fix splat on disabling an interface"
  clk: sunxi: Fix M factor computation for APB1
  iommu/vt-d: Fix IOMMU lookup for SR-IOV Virtual Functions
  device-dax: check devm_nsio_enable() return value
  clk: sunxi-ng: sun6i-a31: Force AHB1 clock to use PLL6 as parent

Conflicts:
	net/wireless/scan.c

Change-Id: I1371442c0867c8680282c344fb6ecdba7eb032d4
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
2016-12-05 16:08:42 -08:00
Rohit Vaswani
173de7d179 lib: spinlock: Cause a watchdog bite on spin_dump
Currently we cause a BUG_ON once a spin_bug is detected, but
that causes a whole lot of processing and the other CPUs would
have proceeded to perform other actions and the state of the system
is moved by the time we can analyze it.
Provide an option to trigger  a watchdog bite instead so that we
can get the traces as close to the issue as possible.

Change-Id: Ic8d692ebd02c6940a3b4e5798463744db20b0026
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
2016-12-05 10:35:32 -08:00
Syed Rameez Mustafa
dddcab78bd sched: Introduce HMP scheduling
Add a snapshot of all changes associated with the HMP scheduler
ported over to the latest kernel version. This will allow proper big
Little scheduling for targets that will use this kernel version.
The msm-4-4 snapshot is taken at commitcc60f0790f27 (sched: constrain
HMP scheduler tunable range with in better way).

Please note that this is not an exact snapshot; certain HMP related
code has been removed. This includes redundant code, useless CONFIG
options, rarely taken error code paths, runtime enable/disable support
for the HMP scheduler.

Change-Id: I923f35904008f1fb74ac9c1a39481810cdea5790
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
2016-11-18 16:41:31 -08:00