102 Commits

Author SHA1 Message Date
Olof Johansson
ff4862493a arm64: build with baremetal linker target instead of Linux when available
Not all toolchains have the baremetal elf targets, RedHat/Fedora ones
in particular. So, probe for whether it's available and use the previous
(linux) targets if it isn't.

Reported-by: Laura Abbott <labbott@redhat.com>
Tested-by: Laura Abbott <labbott@redhat.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Paul Kocialkowski <contact@paulk.fr>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Change-Id: Icf5462a8318b347cf11559c1654886c48c7a62b5
2024-08-08 20:29:38 +05:30
lucaswei
2b5e67e8a2 Merge android-4.9-q (4.9.232) into android-msm-pixel-4.9-lts
Merge 4.9.232 into android-4.9-q
Linux 4.9.232
    perf: Make perf able to build with latest libbfd
    perf tools: Fix snprint warnings for gcc 8
    perf annotate: Use asprintf when formatting objdump command line
    perf probe: Fix to check blacklist address correctly
    xfs: set format back to extents if xfs_bmap_extents_to_btree
  * regmap: debugfs: check count when read regmap file
      drivers/base/regmap/regmap-debugfs.c
    drivers/net/wan/x25_asy: Fix to make it work
    ip6_gre: fix null-ptr-deref in ip6gre_init_net()
  * tcp: allow at most one TLP probe per flight
      include/linux/tcp.h
      net/ipv4/tcp_input.c
      net/ipv4/tcp_output.c
    AX.25: Prevent integer overflows in connect and sendmsg
    rxrpc: Fix sendmsg() returning EPIPE due to recvmsg() returning ENODATA
  * net: udp: Fix wrong clean up for IS_UDPLITE macro
      net/ipv4/udp.c
      net/ipv6/udp.c
  * net-sysfs: add a newline when printing 'tx_timeout' by sysfs
      net/core/net-sysfs.c
  * dev: Defer free of skbs in flush_backlog
      net/core/dev.c
    AX.25: Prevent out-of-bounds read in ax25_sendmsg()
    AX.25: Fix out-of-bounds read in ax25_connect()
    ath9k: Fix regression with Atheros 9271
    ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb
    parisc: Add atomic64_set_release() define to avoid CPU soft lockups
    io-mapping: indicate mapping failure
  * mm/memcg: fix refcount error while moving and swapping
      mm/memcontrol.c
  * Makefile: Fix GCC_TOOLCHAIN_DIR prefix for Clang cross compilation
      Makefile
  * vt: Reject zero-sized screen buffer size.
      drivers/tty/vt/vt.c
    serial: 8250_mtk: Fix high-speed baud rates clamping
    serial: 8250: fix null-ptr-deref in serial8250_start_tx()
    staging: comedi: addi_apci_1564: check INSN_CONFIG_DIGITAL_TRIG shift
    staging: comedi: addi_apci_1500: check INSN_CONFIG_DIGITAL_TRIG shift
    staging: comedi: ni_6527: fix INSN_CONFIG_DIGITAL_TRIG support
    staging: comedi: addi_apci_1032: check INSN_CONFIG_DIGITAL_TRIG shift
    staging: wlan-ng: properly check endpoint types
    Revert "cifs: Fix the target file was deleted when rename failed."
  * usb: xhci: Fix ASM2142/ASM3142 DMA addressing
      drivers/usb/host/xhci-pci.c
    usb: xhci-mtk: fix the failure of bandwidth allocation
    x86: math-emu: Fix up 'cmp' insn for clang ias
  * arm64: Use test_tsk_thread_flag() for checking TIF_SINGLESTEP
      arch/arm64/kernel/debug-monitors.c
    usb: gadget: udc: gr_udc: fix memleak on error handling path in gr_ep_init()
    dmaengine: ioat setting ioat timeout as module parameter
  * regmap: dev_get_regmap_match(): fix string comparison
      drivers/base/regmap/regmap.c
    dmaengine: tegra210-adma: Fix runtime PM imbalance on error
  * HID: apple: Disable Fn-key key-re-mapping on clone keyboards
      drivers/hid/hid-apple.c
    HID: i2c-hid: add Mediacom FlexBook edge13 to descriptor override
    scripts/decode_stacktrace: strip basepath from all paths
    net: smc91x: Fix possible memory leak in smc_drv_probe()
    net: dp83640: fix SIOCSHWTSTAMP to update the struct with actual configuration
  * ax88172a: fix ax88172a_unbind() failures
      drivers/net/usb/ax88172a.c
    hippi: Fix a size used in a 'pci_free_consistent()' in an error handling path
    bnxt_en: Fix race when modifying pause settings.
    btrfs: fix mount failure caused by race with umount
    btrfs: fix double free on ulist after backref resolution failure
    ASoC: rt5670: Correct RT5670_LDO_SEL_MASK
  * ALSA: info: Drop WARN_ON() from buffer NULL sanity check
      sound/core/info.c
    uprobes: Change handle_swbp() to send SIGTRAP with si_code=SI_KERNEL, to fix GDB regression
    SUNRPC reverting d03727b248d0 ("NFSv4 fix CLOSE not waiting for direct IO compeletion")
    drm/nouveau/i2c/g94-: increase NV_PMGR_DP_AUXCTL_TRANSACTREQ timeout
    net: sky2: initialize return of gm_phy_read
    drivers/net/wan/lapbether: Fixed the value of hard_header_len
    xtensa: update *pos in cpuinfo_op.next
    xtensa: fix __sync_fetch_and_{and,or}_4 declarations
    scsi: scsi_transport_spi: Fix function pointer check
    mac80211: allow rx of mesh eapol frames with default rx key
    pinctrl: amd: fix npins for uart0 in kerncz_groups
  * UPSTREAM: xtables: extend matches and targets with .usersize
      net/netfilter/xt_CT.c
      net/netfilter/xt_TEE.c
      net/netfilter/xt_bpf.c
      net/netfilter/xt_connlimit.c
      net/netfilter/xt_hashlimit.c
      net/netfilter/xt_limit.c
      net/netfilter/xt_quota.c
      net/netfilter/xt_string.c
  * UPSTREAM: ip6tables: use match, target and data copy_to_user helpers
      net/ipv6/netfilter/ip6_tables.c
  * UPSTREAM: iptables: use match, target and data copy_to_user helpers
      net/ipv4/netfilter/ip_tables.c
  * UPSTREAM: xtables: add xt_match, xt_target and data copy_to_user functions
      include/linux/netfilter/x_tables.h
      net/netfilter/x_tables.c
    Merge 4.9.231 into android-4.9-q
Linux 4.9.231
    x86/cpu: Move x86_cache_bits settings
  * irqchip/gic: Atomically update affinity
      drivers/irqchip/irq-gic.c
  * sched/fair: handle case of task_h_load() returning 0
      kernel/sched/fair.c
  * arm64: ptrace: Override SPSR.SS when single-stepping is enabled
      arch/arm64/include/asm/debug-monitors.h
      arch/arm64/kernel/debug-monitors.c
      arch/arm64/kernel/ptrace.c
    misc: atmel-ssc: lock with mutex instead of spinlock
    dmaengine: fsl-edma: Fix NULL pointer exception in fsl_edma_tx_handler
    hwmon: (emc2103) fix unable to change fan pwm1_enable attribute
    MIPS: Fix build for LTS kernel caused by backporting lpj adjustment
  * timer: Fix wheel index calculation on last level
      kernel/time/timer.c
    uio_pdrv_genirq: fix use without device tree and no interrupt
    Input: i8042 - add Lenovo XiaoXin Air 12 to i8042 nomux list
    mei: bus: don't clean driver pointer
  * fuse: Fix parameter for FS_IOC_{GET,SET}FLAGS
      fs/fuse/file.c
    virtio: virtio_console: add missing MODULE_DEVICE_TABLE() for rproc serial
    USB: serial: option: add Quectel EG95 LTE modem
    USB: serial: option: add GosunCn GM500 series
    USB: serial: ch341: add new Product ID for CH340
    USB: serial: cypress_m8: enable Simply Automated UPB PIM
    USB: serial: iuu_phoenix: fix memory corruption
    usb: gadget: function: fix missing spinlock in f_uac1_legacy
    usb: chipidea: core: add wakeup support for extcon
    usb: dwc2: Fix shutdown callback in platform
    USB: c67x00: fix use after free in c67x00_giveback_urb
  * ALSA: usb-audio: Fix race against the error recovery URB submission
      sound/usb/midi.c
    ALSA: line6: Perform sanity check for each URB creation
  * usb: core: Add a helper function to check the validity of EP type in URB
      drivers/usb/core/urb.c
      include/linux/usb.h
  * HID: magicmouse: do not set up autorepeat
      drivers/hid/hid-magicmouse.c
    mtd: rawnand: brcmnand: fix CS0 layout
    perf stat: Zero all the 'ena' and 'run' array slot stats for interval mode
    ARM: dts: socfpga: Align L2 cache-controller nodename with dtschema
    Revert "thermal: mediatek: fix register index error"
    staging: comedi: verify array index is correct before using it
    usb: gadget: udc: atmel: fix uninitialized read in debug printk
    spi: spi-sun6i: sun6i_spi_transfer_one(): fix setting of clock rate
    iio:health:afe4404 Fix timestamp alignment and prevent data leak.
    Revert "usb/ohci-platform: Fix a warning when hibernating"
  * Revert "usb/xhci-plat: Set PM runtime as active on resume"
      drivers/usb/host/xhci-plat.c
    Revert "usb/ehci-platform: Set PM runtime as active on resume"
    net: dsa: bcm_sf2: Fix node reference count
    spi: fix initial SPI_SR value in spi-fsl-dspi
    iio:health:afe4403 Fix timestamp alignment and prevent data leak.
    iio:pressure:ms5611 Fix buffer element alignment
    iio: pressure: zpa2326: handle pm_runtime_get_sync failure
    iio: mma8452: Add missed iio_device_unregister() call in mma8452_probe()
    iio: magnetometer: ak8974: Fix runtime PM imbalance on error
    iio:magnetometer:ak8974: Fix alignment and data leak issues
    i2c: eg20t: Load module automatically if ID matches
  * cgroup: Fix sock_cgroup_data on big-endian.
      include/linux/cgroup-defs.h
  * cgroup: fix cgroup_sk_alloc() for sk_clone_lock()
      include/linux/cgroup-defs.h
      include/linux/cgroup.h
      kernel/cgroup.c
      net/core/sock.c
  * tcp: md5: allow changing MD5 keys in all socket states
      net/ipv4/tcp.c
  * tcp: md5: do not send silly options in SYNCOOKIES
      net/ipv4/tcp_output.c
  * tcp: make sure listeners don't initialize congestion-control state
      net/ipv4/tcp.c
      net/ipv4/tcp_cong.c
  * genetlink: remove genl_bind
      include/net/genetlink.h
      net/netlink/genetlink.c
  * tcp: md5: refine tcp_md5_do_add()/tcp_md5_hash_key() barriers
      net/ipv4/tcp.c
      net/ipv4/tcp_ipv4.c
  * tcp: md5: add missing memory barriers in tcp_md5_do_add()/tcp_md5_hash_key()
      net/ipv4/tcp.c
      net/ipv4/tcp_ipv4.c
    net: usb: qmi_wwan: add support for Quectel EG95 LTE modem
  * net: Added pointer check for dst->ops->neigh_lookup in dst_neigh_lookup_skb
      include/net/dst.h
    llc: make sure applications use ARPHRD_ETHER
  * l2tp: remove skb_dst_set() from l2tp_xmit_skb()
      net/l2tp/l2tp_core.c
  * ipv4: fill fl4_icmp_{type,code} in ping_v4_sendmsg
      net/ipv4/ping.c
    s390/mm: fix huge pte soft dirty copying
    ARC: elf: use right ELF_ARCH
    ARC: entry: fix potential EFA clobber when TIF_SYSCALL_TRACE
    drm/radeon: fix double free
    btrfs: fix fatal extent_buffer readahead vs releasepage race
    Revert "ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb"
    KVM: x86: bit 8 of non-leaf PDPEs is not reserved
  * KVM: arm64: Fix definition of PAGE_HYP_DEVICE
      arch/arm64/include/asm/pgtable-prot.h
  * ALSA: usb-audio: add quirk for MacroSilicon MS2109
      sound/usb/quirks-table.h
    ALSA: hda - let hs_mic be picked ahead of hp_mic
    ALSA: opl3: fix infoleak in opl3
    net: macb: mark device wake capable when "magic-packet" property present
    bnxt_en: fix NULL dereference in case SR-IOV configuration fails
  * arm64: kgdb: Fix single-step exception handling oops
      arch/arm64/kernel/kgdb.c
  * ALSA: compress: fix partial_drain completion state
      include/sound/compress_driver.h
      sound/core/compress_offload.c
    smsc95xx: avoid memory leak in smsc95xx_bind
    smsc95xx: check return value of smsc95xx_reset
    net: cxgb4: fix return error value in t4_prep_fw
    scsi: mptscsih: Fix read sense data size
    ARM: imx6: add missing put_device() call in imx6q_suspend_init()
    cifs: update ctime and mtime during truncate
    s390/kasan: fix early pgm check handler execution
  * spi: spidev: fix a potential use-after-free in spidev_release()
      drivers/spi/spidev.c
  * spi: spidev: fix a race between spidev_release and spidev_remove
      drivers/spi/spidev.c
    gpu: host1x: Detach driver on unregister
    KVM: s390: reduce number of IO pins to 1
    ANDROID: cuttlefish_defconfig: Drop built-in cmdline (except nopti)
    Merge 4.9.230 into android-4.9-q
Linux 4.9.230
  * efi: Make it possible to disable efivar_ssdt entirely
      drivers/firmware/efi/Kconfig
  * netfilter: nf_conntrack_h323: lost .data_len definition for Q.931/ipv6
      net/netfilter/nf_conntrack_h323_main.c
    MIPS: Add missing EHB in mtc0 -> mfc0 sequence for DSPen
    cifs: Fix the target file was deleted when rename failed.
    SMB3: Honor persistent/resilient handle flags for multiuser mounts
    SMB3: Honor 'seal' flag for multiuser mounts
  * Revert "ALSA: usb-audio: Improve frames size computation"
      sound/usb/card.h
      sound/usb/endpoint.c
      sound/usb/endpoint.h
      sound/usb/pcm.c
    i2c: algo-pca: Add 0x78 as SCL stuck low status for PCA9665
    virtio-blk: free vblk-vqs in error path of virtblk_probe()
    hwmon: (acpi_power_meter) Fix potential memory leak in acpi_power_meter_add()
    hwmon: (max6697) Make sure the OVERT mask is set correctly
    cxgb4: parse TC-U32 key values and masks natively
  * sched/rt: Show the 'sched_rr_timeslice' SCHED_RR timeslice tuning knob in milliseconds
      include/linux/sched/sysctl.h
      kernel/sched/core.c
      kernel/sched/rt.c
      kernel/sysctl.c
    crypto: af_alg - fix use-after-free in af_alg_accept() due to bh_lock_sock()
  * kgdb: Avoid suspicious RCU usage warning
      kernel/debug/debug_core.c
    usb: usbtest: fix missing kfree(dev->buf) in usbtest_disconnect
  * mm/slub: fix stack overruns with SLUB_STATS
      mm/slub.c
  * mm/slub.c: fix corrupted freechain in deactivate_slab()
      mm/slub.c
    usbnet: smsc95xx: Fix use-after-free after removal
    EDAC/amd64: Read back the scrub rate PCI register on F15h
  * mm: fix swap cache node allocation mask
      mm/swap_state.c
    btrfs: fix data block group relocation failure due to concurrent scrub
    btrfs: cow_file_range() num_bytes and disk_num_bytes are same
    btrfs: fix a block group ref counter leak after failure to remove block group
    Merge 4.9.229 into android-4.9-q
Linux 4.9.229
    Revert "tty: hvc: Fix data abort due to race in hvc_open"
    xfs: add agf freeblocks verify in xfs_agf_verify
    NFSv4 fix CLOSE not waiting for direct IO compeletion
    pNFS/flexfiles: Fix list corruption if the mirror count changes
    SUNRPC: Properly set the @subbuf parameter of xdr_buf_subsegment()
    sunrpc: fixed rollback in rpc_gssd_dummy_populate()
    drm/radeon: fix fb_div check in ni_init_smc_spll_table()
  * tracing: Fix event trigger to accept redundant spaces
      kernel/trace/trace_events_trigger.c
  * arm64: perf: Report the PC value in REGS_ABI_32 mode
      arch/arm64/kernel/perf_regs.c
    ocfs2: fix panic on nfs server over ocfs2
    ocfs2: fix value of OCFS2_INVALID_SLOT
    ocfs2: load global_inode_alloc
  * mm/slab: use memzero_explicit() in kzfree()
      mm/slab_common.c
    KVM: X86: Fix MSR range of APIC registers in X2APIC mode
    ACPI: sysfs: Fix pm_profile_attr type
    ALSA: hda: Add NVIDIA codec IDs 9a & 9d through a0 to patch table
  * blktrace: break out of blktrace setup on concurrent calls
      kernel/trace/blktrace.c
  * kbuild: improve cc-option to clean up all temporary files
      scripts/Kbuild.include
    s390/ptrace: fix setting syscall number
    net: alx: fix race condition in alx_remove
    ata/libata: Fix usage of page address by page_address in ata_scsi_mode_select_xlat function
  * sched/core: Fix PI boosting between RT and DEADLINE tasks
      kernel/sched/core.c
    netfilter: ipset: fix unaligned atomic access
    usb: gadget: udc: Potential Oops in error handling code
    ARM: imx5: add missing put_device() call in imx_suspend_alloc_ocram()
    net: qed: fix excessive QM ILT lines consumption
    net: qed: fix NVMe login fails over VFs
    net: qed: fix left elements count calculation
    RDMA/mad: Fix possible memory leak in ib_mad_post_receive_mads()
    efi/esrt: Fix reference count leak in esre_create_sysfs_entry.
    cifs/smb3: Fix data inconsistent when zero file range
    cifs/smb3: Fix data inconsistent when punch hole
  * xhci: Poll for U0 after disabling USB2 LPM
      drivers/usb/host/xhci.c
  * ALSA: usb-audio: Fix OOB access of mixer element list
      sound/usb/mixer.c
      sound/usb/mixer.h
      sound/usb/mixer_quirks.c
  * ALSA: usb-audio: Clean up mixer element list traverse
      sound/usb/mixer.c
      sound/usb/mixer.h
      sound/usb/mixer_quirks.c
      sound/usb/mixer_scarlett.c
  * ALSA: usb-audio: uac1: Invalidate ctl on interrupt
      sound/usb/mixer.c
    cdc-acm: Add DISABLE_ECHO quirk for Microchip/SMSC chip
  * xhci: Fix enumeration issue when setting max packet size for FS devices.
      drivers/usb/host/xhci.c
  * xhci: Fix incorrect EP_STATE_MASK
      drivers/usb/host/xhci.h
  * ALSA: usb-audio: add quirk for Denon DCD-1500RE
      sound/usb/quirks.c
    usb: host: ehci-exynos: Fix error check in exynos_ehci_probe()
    USB: ehci: reopen solution for Synopsys HC bug
  * usb: add USB_QUIRK_DELAY_INIT for Logitech C922
      drivers/usb/core/quirks.c
    usb: dwc2: Postponed gadget registration to the udc class driver
    USB: ohci-sm501: Add missed iounmap() in remove
  * net: core: reduce recursion limit value
      include/linux/netdevice.h
  * net: Do not clear the sock TX queue in sk_set_socket()
      include/net/sock.h
      net/core/sock.c
  * net: Fix the arp error in some cases
      net/ipv4/fib_semantics.c
  * sctp: Don't advertise IPv4 addresses if ipv6only is set on the socket
      include/net/sctp/constants.h
  * tcp: grow window for OOO packets only for SACK flows
      net/ipv4/tcp_input.c
    ip6_gre: fix use-after-free in ip6gre_tunnel_lookup()
  * tcp_cubic: fix spurious HYSTART_DELAY exit upon drop in min RTT
      net/ipv4/tcp_cubic.c
  * ip_tunnel: fix use-after-free in ip_tunnel_lookup()
      net/ipv4/ip_tunnel.c
    tg3: driver sleeps indefinitely when EEH errors exceed eeh_max_freezes
    rxrpc: Fix notification call on completion of discarded calls
    rocker: fix incorrect error handling in dma_rings_init
  * net: usb: ax88179_178a: fix packet alignment padding
      drivers/net/usb/ax88179_178a.c
  * net: fix memleak in register_netdevice()
      net/core/dev.c
  * mld: fix memory leak in ipv6_mc_destroy_dev()
      net/ipv6/mcast.c
    fix a braino in "sparc32: fix register window handling in genregs32_[gs]et()"
  * net: sched: export __netdev_watchdog_up()
      net/sched/sch_generic.c
  * l2tp: Allow duplicate session creation with UDP
      net/l2tp/l2tp_core.c
  * scsi: scsi_devinfo: handle non-terminated strings
      drivers/scsi/scsi_devinfo.c
    mtd: rawnand: tmio: Fix the probe error path
    mtd: rawnand: mtk: Fix the probe error path
    mtd: rawnand: plat_nand: Fix the probe error path
    mtd: rawnand: socrates: Fix the probe error path
    mtd: rawnand: orion: Fix the probe error path
    mtd: rawnand: xway: Fix the probe error path
    mtd: rawnand: sharpsl: Fix the probe error path
    mtd: rawnand: diskonchip: Fix the probe error path
    mtd: rawnand: Pass a nand_chip object to nand_release()
  * media: dvb_frontend: fix return error code
      drivers/media/dvb-core/dvb_frontend.c
  * media: dvb_frontend: fix wrong cast in compat_ioctl
      drivers/media/dvb-core/dvb_frontend.c
  * media: dvb_frontend: Add commands implementation for compat ioct
      drivers/media/dvb-core/dvb_frontend.c
  * media: dvb_frontend: Add compat_ioctl callback
      drivers/media/dvb-core/dvb_frontend.c
      fs/compat_ioctl.c
  * media: dvb_frontend: Add unlocked_ioctl in dvb_frontend.c
      drivers/media/dvb-core/dvb_frontend.c
  * media: dvb_frontend: be sure to init dvb_frontend_handle_ioctl() return code
      drivers/media/dvb-core/dvb_frontend.c
  * media: dvb_frontend: dtv_property_process_set() cleanups
      drivers/media/dvb-core/dvb_frontend.c
  * media: dvb_frontend: fix return values for FE_SET_PROPERTY
      drivers/media/dvb-core/dvb_frontend.c
      include/uapi/linux/dvb/frontend.h
  * media: dvb_frontend: better document the -EPERM condition
      drivers/media/dvb-core/dvb_frontend.c
  * media: dvb_frontend: get rid of property cache's state
      drivers/media/dvb-core/dvb_frontend.c
      drivers/media/dvb-core/dvb_frontend.h
  * media: dvb_frontend: cleanup ioctl handling logic
      drivers/media/dvb-core/dvb_frontend.c
  * media: dvb_frontend: cleanup dvb_frontend_ioctl_properties()
      drivers/media/dvb-core/dvb_frontend.c
  * media: dvb_frontend: get rid of set_property() callback
      drivers/media/dvb-core/dvb_frontend.c
      drivers/media/dvb-core/dvb_frontend.h
    media: friio-fe: get rid of set_property()
    media: stv6110: get rid of a srate dead code
    media: stv0288: get rid of set_property boilerplate
  * media: dvb_frontend: get rid of get_property() callback
      drivers/media/dvb-core/dvb_frontend.c
      drivers/media/dvb-core/dvb_frontend.h
  * media: dvb/frontend.h: document the uAPI file
      include/uapi/linux/dvb/frontend.h
  * media: dvb/frontend.h: move out a private internal structure
      drivers/media/dvb-core/dvb_frontend.c
      include/uapi/linux/dvb/frontend.h
  * media: dvb_frontend: initialize variable s with FE_NONE instead of 0
      drivers/media/dvb-core/dvb_frontend.c
  * net: core: device_rename: Use rwsem instead of a seqcount
      net/core/dev.c
  * sched/rt, net: Use CONFIG_PREEMPTION.patch
      net/core/dev.c
    e1000e: Do not wake up the system via WOL if device wakeup is disabled
  * kretprobe: Prevent triggering kretprobe from within kprobe_flush_task
      include/linux/kprobes.h
    x86/kprobes: Avoid kretprobe recursion bug
    powerpc/kprobes: Fixes for kprobe_lookup_name() on BE
    kprobes: Fix to protect kick_kprobe_optimizer() by kprobe_mutex
  * crypto: algboss - don't wait during notifier callback
      crypto/algboss.c
    drm/i915: Whitelist context-local timestamp in the gen9 cmdparser
    s390: fix syscall_get_error for compat processes
  * block: nr_sects_write(): Disable preemption on seqcount write
      include/linux/genhd.h
    x86/boot/compressed: Relax sed symbol type regex for LLVM ld.lld
  * drm/dp_mst: Increase ACT retry timeout to 3s
      drivers/gpu/drm/drm_dp_mst_topology.c
  * ext4: fix partial cluster initialization when splitting extent
      fs/ext4/extents.c
  * selinux: fix double free
      security/selinux/ss/services.c
    drm/qxl: Use correct notify port address when creating cursor ring
  * drm/dp_mst: Reformat drm_dp_check_act_status() a bit
      drivers/gpu/drm/drm_dp_mst_topology.c
  * drm: encoder_slave: fix refcouting error for modules
      drivers/gpu/drm/drm_encoder_slave.c
    libata: Use per port sync for detach
  * block: Fix use-after-free in blkdev_get()
      fs/block_dev.c
    bcache: fix potential deadlock problem in btree_gc_coalesce
    perf report: Fix NULL pointer dereference in hists__fprintf_nr_sample_events()
    usb/ehci-platform: Set PM runtime as active on resume
  * usb/xhci-plat: Set PM runtime as active on resume
      drivers/usb/host/xhci-plat.c
    scsi: acornscsi: Fix an error handling path in acornscsi_probe()
    selftests/net: in timestamping, strncpy needs to preserve null byte
    selftests/vm/pkeys: fix alloc_random_pkey() to make it really random
  * elfnote: mark all .note sections SHF_ALLOC
      include/linux/elfnote.h
  * include/linux/bitops.h: avoid clang shift-count-overflow warnings
      include/linux/bitops.h
  * lib/zlib: remove outdated and incorrect pre-increment optimization
      lib/zlib_inflate/inffast.c
    crypto: omap-sham - add proper load balancing support for multicore
    pinctrl: imxl: Fix an error handling path in 'imx1_pinctrl_core_probe()'
    scsi: iscsi: Fix reference count leak in iscsi_boot_create_kobj
    gfs2: Allow lock_nolock mount to specify jid=X
    openrisc: Fix issue with argument clobbering for clone/fork
    ASoC: fsl_asrc_dma: Fix dma_chan leak when config DMA channel failed
    extcon: adc-jack: Fix an error handling path in 'adc_jack_probe()'
    NFSv4.1 fix rpc_call_done assignment for BIND_CONN_TO_SESSION
    net: sunrpc: Fix off-by-one issues in 'rpc_ntop6'
    clk: bcm2835: Fix return type of bcm2835_register_gate
  * usb: gadget: Fix issue with config_ep_by_speed function
      drivers/usb/gadget/composite.c
      include/linux/usb/composite.h
    usb: gadget: fix potential double-free in m66592_probe.
    usb: gadget: lpc32xx_udc: don't dereference ep pointer before null check
    USB: gadget: udc: s3c2410_udc: Remove pointless NULL check in s3c2410_udc_nuke
    usb: dwc2: gadget: move gadget resume after the core is in L0 state
    watchdog: da9062: No need to ping manually before setting timeout
    IB/cma: Fix ports memory leak in cma_configfs
    PCI/PTM: Inherit Switch Downstream Port PTM settings from Upstream Port
    powerpc/64s/pgtable: fix an undefined behaviour
    clk: samsung: exynos5433: Add IGNORE_UNUSED flag to sclk_i2s1
    tty: n_gsm: Fix bogus i++ in gsm_data_kick
    USB: host: ehci-mxc: Add error handling in ehci_mxc_drv_probe()
    drm/msm/mdp5: Fix mdp5_init error path for failed mdp5_kms allocation
    usb/ohci-platform: Fix a warning when hibernating
    vfio-pci: Mask cap zero
    powerpc/ps3: Fix kexec shutdown hang
    powerpc/pseries/ras: Fix FWNMI_VALID off by one
    tty: n_gsm: Fix waking up upper tty layer when room available
    tty: n_gsm: Fix SOF skipping
    clk: ti: composite: fix memory leak
    dlm: remove BUG() before panic()
    scsi: mpt3sas: Fix double free warnings
    power: supply: smb347-charger: IRQSTAT_D is volatile
    power: supply: lp8788: Fix an error handling path in 'lp8788_charger_probe()'
    PCI/ASPM: Allow ASPM on links to PCIe-to-PCI/PCI-X Bridges
    PCI: rcar: Fix incorrect programming of OB windows
  * drivers: base: Fix NULL pointer exception in __platform_driver_probe() if a driver developer is foolish
      drivers/base/platform.c
    serial: amba-pl011: Make sure we initialize the port.lock spinlock
    i2c: pxa: fix i2c_pxa_scream_blue_murder() debug output
    staging: sm750fb: add missing case while setting FB_VISUAL
    tty: hvc: Fix data abort due to race in hvc_open
    s390/qdio: put thinint indicator after early error
  * ALSA: usb-audio: Improve frames size computation
      sound/usb/card.h
      sound/usb/endpoint.c
      sound/usb/endpoint.h
      sound/usb/pcm.c
    scsi: ibmvscsi: Don't send host info in adapter info MAD after LPM
    scsi: sr: Fix sr_probe() missing deallocate of device minor
  * mksysmap: Fix the mismatch of '.L' symbols in System.map
      scripts/mksysmap
    yam: fix possible memory leak in yam_init_driver
    powerpc/crashkernel: Take "mem=" option into account
    nfsd: Fix svc_xprt refcnt leak when setup callback client failed
    powerpc/perf/hv-24x7: Fix inconsistent output values incase multiple hv-24x7 events run
    clk: clk-flexgen: fix clock-critical handling
    scsi: lpfc: Fix lpfc_nodelist leak when processing unsolicited event
    mfd: wm8994: Fix driver operation if loaded as modules
    vfio/pci: fix memory leaks in alloc_perm_bits()
    ps3disk: use the default segment boundary
    PCI: aardvark: Don't blindly enable ASPM L0s and don't write to read-only register
    usblp: poison URBs upon disconnect
    i2c: pxa: clear all master action bits in i2c_pxa_stop_message()
    iio: bmp280: fix compensation of humidity
    scsi: qla2xxx: Fix issue with adapter's stopping state
    ALSA: isa/wavefront: prevent out of bounds write in ioctl
    ARM: integrator: Add some Kconfig selections
    backlight: lp855x: Ensure regulators are disabled on probe failure
    clk: qcom: msm8916: Fix the address location of pll->config_reg
    iio: pressure: bmp280: Tolerate IRQ before registering
    i2c: piix4: Detect secondary SMBus controller on AMD AM4 chipsets
    clk: sunxi: Fix incorrect usage of round_down()
  * power: supply: bq24257_charger: Replace depends on REGMAP_I2C with select
      drivers/power/supply/Kconfig

Change-Id: I9fdac4691b013061a19d375293b7049b999830d0
Signed-off-by: lucaswei <lucaswei@google.com>
2020-08-11 20:25:36 +08:00
Greg Kroah-Hartman
6e60c655f9 Merge 4.9.229 into android-4.9-q
Changes in 4.9.229
	power: supply: bq24257_charger: Replace depends on REGMAP_I2C with select
	clk: sunxi: Fix incorrect usage of round_down()
	i2c: piix4: Detect secondary SMBus controller on AMD AM4 chipsets
	iio: pressure: bmp280: Tolerate IRQ before registering
	clk: qcom: msm8916: Fix the address location of pll->config_reg
	backlight: lp855x: Ensure regulators are disabled on probe failure
	ARM: integrator: Add some Kconfig selections
	ALSA: isa/wavefront: prevent out of bounds write in ioctl
	scsi: qla2xxx: Fix issue with adapter's stopping state
	iio: bmp280: fix compensation of humidity
	i2c: pxa: clear all master action bits in i2c_pxa_stop_message()
	usblp: poison URBs upon disconnect
	PCI: aardvark: Don't blindly enable ASPM L0s and don't write to read-only register
	ps3disk: use the default segment boundary
	vfio/pci: fix memory leaks in alloc_perm_bits()
	mfd: wm8994: Fix driver operation if loaded as modules
	scsi: lpfc: Fix lpfc_nodelist leak when processing unsolicited event
	clk: clk-flexgen: fix clock-critical handling
	powerpc/perf/hv-24x7: Fix inconsistent output values incase multiple hv-24x7 events run
	nfsd: Fix svc_xprt refcnt leak when setup callback client failed
	powerpc/crashkernel: Take "mem=" option into account
	yam: fix possible memory leak in yam_init_driver
	mksysmap: Fix the mismatch of '.L' symbols in System.map
	scsi: sr: Fix sr_probe() missing deallocate of device minor
	scsi: ibmvscsi: Don't send host info in adapter info MAD after LPM
	ALSA: usb-audio: Improve frames size computation
	s390/qdio: put thinint indicator after early error
	tty: hvc: Fix data abort due to race in hvc_open
	staging: sm750fb: add missing case while setting FB_VISUAL
	i2c: pxa: fix i2c_pxa_scream_blue_murder() debug output
	serial: amba-pl011: Make sure we initialize the port.lock spinlock
	drivers: base: Fix NULL pointer exception in __platform_driver_probe() if a driver developer is foolish
	PCI: rcar: Fix incorrect programming of OB windows
	PCI/ASPM: Allow ASPM on links to PCIe-to-PCI/PCI-X Bridges
	power: supply: lp8788: Fix an error handling path in 'lp8788_charger_probe()'
	power: supply: smb347-charger: IRQSTAT_D is volatile
	scsi: mpt3sas: Fix double free warnings
	dlm: remove BUG() before panic()
	clk: ti: composite: fix memory leak
	tty: n_gsm: Fix SOF skipping
	tty: n_gsm: Fix waking up upper tty layer when room available
	powerpc/pseries/ras: Fix FWNMI_VALID off by one
	powerpc/ps3: Fix kexec shutdown hang
	vfio-pci: Mask cap zero
	usb/ohci-platform: Fix a warning when hibernating
	drm/msm/mdp5: Fix mdp5_init error path for failed mdp5_kms allocation
	USB: host: ehci-mxc: Add error handling in ehci_mxc_drv_probe()
	tty: n_gsm: Fix bogus i++ in gsm_data_kick
	clk: samsung: exynos5433: Add IGNORE_UNUSED flag to sclk_i2s1
	powerpc/64s/pgtable: fix an undefined behaviour
	PCI/PTM: Inherit Switch Downstream Port PTM settings from Upstream Port
	IB/cma: Fix ports memory leak in cma_configfs
	watchdog: da9062: No need to ping manually before setting timeout
	usb: dwc2: gadget: move gadget resume after the core is in L0 state
	USB: gadget: udc: s3c2410_udc: Remove pointless NULL check in s3c2410_udc_nuke
	usb: gadget: lpc32xx_udc: don't dereference ep pointer before null check
	usb: gadget: fix potential double-free in m66592_probe.
	usb: gadget: Fix issue with config_ep_by_speed function
	clk: bcm2835: Fix return type of bcm2835_register_gate
	net: sunrpc: Fix off-by-one issues in 'rpc_ntop6'
	NFSv4.1 fix rpc_call_done assignment for BIND_CONN_TO_SESSION
	extcon: adc-jack: Fix an error handling path in 'adc_jack_probe()'
	ASoC: fsl_asrc_dma: Fix dma_chan leak when config DMA channel failed
	openrisc: Fix issue with argument clobbering for clone/fork
	gfs2: Allow lock_nolock mount to specify jid=X
	scsi: iscsi: Fix reference count leak in iscsi_boot_create_kobj
	pinctrl: imxl: Fix an error handling path in 'imx1_pinctrl_core_probe()'
	crypto: omap-sham - add proper load balancing support for multicore
	lib/zlib: remove outdated and incorrect pre-increment optimization
	include/linux/bitops.h: avoid clang shift-count-overflow warnings
	elfnote: mark all .note sections SHF_ALLOC
	selftests/vm/pkeys: fix alloc_random_pkey() to make it really random
	selftests/net: in timestamping, strncpy needs to preserve null byte
	scsi: acornscsi: Fix an error handling path in acornscsi_probe()
	usb/xhci-plat: Set PM runtime as active on resume
	usb/ehci-platform: Set PM runtime as active on resume
	perf report: Fix NULL pointer dereference in hists__fprintf_nr_sample_events()
	bcache: fix potential deadlock problem in btree_gc_coalesce
	block: Fix use-after-free in blkdev_get()
	libata: Use per port sync for detach
	drm: encoder_slave: fix refcouting error for modules
	drm/dp_mst: Reformat drm_dp_check_act_status() a bit
	drm/qxl: Use correct notify port address when creating cursor ring
	selinux: fix double free
	ext4: fix partial cluster initialization when splitting extent
	drm/dp_mst: Increase ACT retry timeout to 3s
	x86/boot/compressed: Relax sed symbol type regex for LLVM ld.lld
	block: nr_sects_write(): Disable preemption on seqcount write
	s390: fix syscall_get_error for compat processes
	drm/i915: Whitelist context-local timestamp in the gen9 cmdparser
	crypto: algboss - don't wait during notifier callback
	kprobes: Fix to protect kick_kprobe_optimizer() by kprobe_mutex
	powerpc/kprobes: Fixes for kprobe_lookup_name() on BE
	x86/kprobes: Avoid kretprobe recursion bug
	kretprobe: Prevent triggering kretprobe from within kprobe_flush_task
	e1000e: Do not wake up the system via WOL if device wakeup is disabled
	sched/rt, net: Use CONFIG_PREEMPTION.patch
	net: core: device_rename: Use rwsem instead of a seqcount
	media: dvb_frontend: initialize variable s with FE_NONE instead of 0
	media: dvb/frontend.h: move out a private internal structure
	media: dvb/frontend.h: document the uAPI file
	media: dvb_frontend: get rid of get_property() callback
	media: stv0288: get rid of set_property boilerplate
	media: stv6110: get rid of a srate dead code
	media: friio-fe: get rid of set_property()
	media: dvb_frontend: get rid of set_property() callback
	media: dvb_frontend: cleanup dvb_frontend_ioctl_properties()
	media: dvb_frontend: cleanup ioctl handling logic
	media: dvb_frontend: get rid of property cache's state
	media: dvb_frontend: better document the -EPERM condition
	media: dvb_frontend: fix return values for FE_SET_PROPERTY
	media: dvb_frontend: dtv_property_process_set() cleanups
	media: dvb_frontend: be sure to init dvb_frontend_handle_ioctl() return code
	media: dvb_frontend: Add unlocked_ioctl in dvb_frontend.c
	media: dvb_frontend: Add compat_ioctl callback
	media: dvb_frontend: Add commands implementation for compat ioct
	media: dvb_frontend: fix wrong cast in compat_ioctl
	media: dvb_frontend: fix return error code
	mtd: rawnand: Pass a nand_chip object to nand_release()
	mtd: rawnand: diskonchip: Fix the probe error path
	mtd: rawnand: sharpsl: Fix the probe error path
	mtd: rawnand: xway: Fix the probe error path
	mtd: rawnand: orion: Fix the probe error path
	mtd: rawnand: socrates: Fix the probe error path
	mtd: rawnand: plat_nand: Fix the probe error path
	mtd: rawnand: mtk: Fix the probe error path
	mtd: rawnand: tmio: Fix the probe error path
	scsi: scsi_devinfo: handle non-terminated strings
	l2tp: Allow duplicate session creation with UDP
	net: sched: export __netdev_watchdog_up()
	fix a braino in "sparc32: fix register window handling in genregs32_[gs]et()"
	mld: fix memory leak in ipv6_mc_destroy_dev()
	net: fix memleak in register_netdevice()
	net: usb: ax88179_178a: fix packet alignment padding
	rocker: fix incorrect error handling in dma_rings_init
	rxrpc: Fix notification call on completion of discarded calls
	tg3: driver sleeps indefinitely when EEH errors exceed eeh_max_freezes
	ip_tunnel: fix use-after-free in ip_tunnel_lookup()
	tcp_cubic: fix spurious HYSTART_DELAY exit upon drop in min RTT
	ip6_gre: fix use-after-free in ip6gre_tunnel_lookup()
	tcp: grow window for OOO packets only for SACK flows
	sctp: Don't advertise IPv4 addresses if ipv6only is set on the socket
	net: Fix the arp error in some cases
	net: Do not clear the sock TX queue in sk_set_socket()
	net: core: reduce recursion limit value
	USB: ohci-sm501: Add missed iounmap() in remove
	usb: dwc2: Postponed gadget registration to the udc class driver
	usb: add USB_QUIRK_DELAY_INIT for Logitech C922
	USB: ehci: reopen solution for Synopsys HC bug
	usb: host: ehci-exynos: Fix error check in exynos_ehci_probe()
	ALSA: usb-audio: add quirk for Denon DCD-1500RE
	xhci: Fix incorrect EP_STATE_MASK
	xhci: Fix enumeration issue when setting max packet size for FS devices.
	cdc-acm: Add DISABLE_ECHO quirk for Microchip/SMSC chip
	ALSA: usb-audio: uac1: Invalidate ctl on interrupt
	ALSA: usb-audio: Clean up mixer element list traverse
	ALSA: usb-audio: Fix OOB access of mixer element list
	xhci: Poll for U0 after disabling USB2 LPM
	cifs/smb3: Fix data inconsistent when punch hole
	cifs/smb3: Fix data inconsistent when zero file range
	efi/esrt: Fix reference count leak in esre_create_sysfs_entry.
	RDMA/mad: Fix possible memory leak in ib_mad_post_receive_mads()
	net: qed: fix left elements count calculation
	net: qed: fix NVMe login fails over VFs
	net: qed: fix excessive QM ILT lines consumption
	ARM: imx5: add missing put_device() call in imx_suspend_alloc_ocram()
	usb: gadget: udc: Potential Oops in error handling code
	netfilter: ipset: fix unaligned atomic access
	sched/core: Fix PI boosting between RT and DEADLINE tasks
	ata/libata: Fix usage of page address by page_address in ata_scsi_mode_select_xlat function
	net: alx: fix race condition in alx_remove
	s390/ptrace: fix setting syscall number
	kbuild: improve cc-option to clean up all temporary files
	blktrace: break out of blktrace setup on concurrent calls
	ALSA: hda: Add NVIDIA codec IDs 9a & 9d through a0 to patch table
	ACPI: sysfs: Fix pm_profile_attr type
	KVM: X86: Fix MSR range of APIC registers in X2APIC mode
	mm/slab: use memzero_explicit() in kzfree()
	ocfs2: load global_inode_alloc
	ocfs2: fix value of OCFS2_INVALID_SLOT
	ocfs2: fix panic on nfs server over ocfs2
	arm64: perf: Report the PC value in REGS_ABI_32 mode
	tracing: Fix event trigger to accept redundant spaces
	drm/radeon: fix fb_div check in ni_init_smc_spll_table()
	sunrpc: fixed rollback in rpc_gssd_dummy_populate()
	SUNRPC: Properly set the @subbuf parameter of xdr_buf_subsegment()
	pNFS/flexfiles: Fix list corruption if the mirror count changes
	NFSv4 fix CLOSE not waiting for direct IO compeletion
	xfs: add agf freeblocks verify in xfs_agf_verify
	Revert "tty: hvc: Fix data abort due to race in hvc_open"
	Linux 4.9.229

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0ce84c8f4c2c437fee36399c358c3dcc19fdfc1d
2020-07-01 10:50:22 +02:00
Masahiro Yamada
48427c3b94 kbuild: improve cc-option to clean up all temporary files
[ Upstream commit f2f02ebd8f3833626642688b2d2c6a7b3c141fa9 ]

When cc-option and friends evaluate compiler flags, the temporary file
$$TMP is created as an output object, and automatically cleaned up.
The actual file path of $$TMP is .<pid>.tmp, here <pid> is the process
ID of $(shell ...) invoked from cc-option. (Please note $$$$ is the
escape sequence of $$).

Such garbage files are cleaned up in most cases, but some compiler flags
create additional output files.

For example, -gsplit-dwarf creates a .dwo file.

When CONFIG_DEBUG_INFO_SPLIT=y, you will see a bunch of .<pid>.dwo files
left in the top of build directories. You may not notice them unless you
do 'ls -a', but the garbage files will increase every time you run 'make'.

This commit changes the temporary object path to .tmp_<pid>/tmp, and
removes .tmp_<pid> directory when exiting. Separate build artifacts such
as *.dwo will be cleaned up all together because their file paths are
usually determined based on the base name of the object.

Another example is -ftest-coverage, which outputs the coverage data into
<base-name-of-object>.gcno

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-30 15:38:43 -04:00
Robin Peng
ad18574239 Merge android-4.9 (4.9.178) into android-msm-pixel-4.9-lts
Merge 4.9.178 into android-4.9
Linux 4.9.178
    KVM: x86: Skip EFER vs. guest CPUID checks for host-initiated writes
    ALSA: hda/realtek - Fix for Lenovo B50-70 inverted internal microphone bug
  * ext4: fix data corruption caused by overlapping unaligned and aligned IO
      fs/ext4/file.c
  * ext4: zero out the unused memory region in the extent tree block
      fs/ext4/extents.c
  * fs/writeback.c: use rcu_barrier() to wait for inflight wb switches going into workqueue when umount
      fs/fs-writeback.c
  * writeback: synchronize sync(2) against cgroup writeback membership switches
      fs/fs-writeback.c
      include/linux/backing-dev-defs.h
      mm/backing-dev.c
  * fib_rules: fix error in backport of e9919a24d302 ("fib_rules: return 0...")
      net/core/fib_rules.c
    crypto: arm/aes-neonbs - don't access already-freed walk.iv
    crypto: salsa20 - don't access already-freed walk.iv
  * crypto: gcm - fix incompatibility between "gcm" and "gcm_base"
      crypto/gcm.c
  * crypto: gcm - Fix error return code in crypto_gcm_create_common()
      crypto/gcm.c
    ipmi:ssif: compare block number correctly for multi-part return messages
    bcache: never set KEY_PTRS of journal key to 0 in journal_reclaim()
    bcache: fix a race between cache register and cacheset unregister
    Btrfs: do not start a transaction at iterate_extent_inodes()
  * ext4: fix ext4_show_options for file systems w/o journal
      fs/ext4/super.c
  * ext4: actually request zeroing of inode table after grow
      fs/ext4/ioctl.c
  * jbd2: check superblock mapped prior to committing
      fs/jbd2/journal.c
    tty/vt: fix write/write race in ioctl(KDSKBSENT) handler
    mfd: max77620: Fix swapped FPS_PERIOD_MAX_US values
    mfd: da9063: Fix OTP control register names to match datasheets for DA9063/63L
    ocfs2: fix ocfs2 read inode data panic in ocfs2_iget
  * mm/mincore.c: make mincore() more conservative
      mm/mincore.c
    ASoC: RT5677-SPI: Disable 16Bit SPI Transfers
    ASoC: max98090: Fix restore of DAPM Muxes
    ALSA: hda/realtek - EAPD turn on later
    ALSA: hda/hdmi - Consider eld_valid when reporting jack event
    ALSA: hda/hdmi - Read the pin sense from register when repolling
  * ALSA: usb-audio: Fix a memory leak bug
      sound/usb/mixer.c
    crypto: x86/crct10dif-pcl - fix use via crypto_shash_digest()
    crypto: crct10dif-generic - fix use via crypto_shash_digest()
    crypto: vmx - fix copy-paste error in CTR mode
    crypto: chacha20poly1305 - set cra_name correctly
    sched/x86: Save [ER]FLAGS on context switch
  * arm64: Clear OSDLR_EL1 on CPU boot
      arch/arm64/kernel/debug-monitors.c
  * arm64: compat: Reduce address limit
      arch/arm64/include/asm/processor.h
    power: supply: axp288_charger: Fix unchecked return value
    ARM: exynos: Fix a leaked reference by adding missing of_node_put
    objtool: Fix function fallthrough detection
    x86/speculation/mds: Improve CPU buffer clear documentation
    x86/speculation/mds: Revert CPU buffer clear on double fault exit
    PCI: hv: Fix a memory leak in hv_eject_device_work()
  * locking/rwsem: Prevent decrement of reader count before increment
      kernel/locking/rwsem-xadd.c
  * net: core: another layer of lists, around PF_MEMALLOC skb handling
      include/linux/list.h
  * UPSTREAM: fib_rules: fix error in backport of e9919a24d302 ("fib_rules: return 0...")
      net/core/fib_rules.c
  * UPSTREAM: bpf: relax inode permission check for retrieving bpf program
      kernel/bpf/inode.c
    Merge 4.9.177 into android-4.9
Linux 4.9.177
    powerpc/booke64: set RI in default MSR
    powerpc/lib: fix book3s/32 boot failure due to code patching
    drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl
    drivers/virt/fsl_hypervisor.c: dereferencing error pointers in ioctl
  * bonding: fix arp_validate toggling in active-backup mode
      drivers/net/bonding/bond_options.c
  * ipv4: Fix raw socket lookup for local traffic
      net/ipv4/raw.c
  * vrf: sit mtu should not be updated when vrf netdev is the link
      net/ipv6/sit.c
    vlan: disable SIOCSHWTSTAMP in container
  * packet: Fix error path in packet_init
      net/packet/af_packet.c
    net: ucc_geth - fix Oops when changing number of buffers in the ring
  * fib_rules: return 0 directly if an exactly same rule exists when NLM_F_EXCL not supplied
      net/core/fib_rules.c
  * bridge: Fix error path for kobject_init_and_add()
      net/bridge/br_if.c
    powerpc/64s: Include cpu header
    x86/vdso: Pass --eh-frame-hdr to the linker
    x86/vdso: Drop implicit common-page-size linker flag
    x86: vdso: Use $LD instead of $CC to link
    Revert "x86: vdso: Use $LD instead of $CC to link"
    Revert "x86/vdso: Drop implicit common-page-size linker flag"
    Don't jump to compute_result state from check_result state
    rtlwifi: rtl8723ae: Fix missing break in switch statement
  * ALSA: pcm: remove SNDRV_PCM_IOCTL1_INFO internal command
      include/sound/pcm.h
      sound/core/pcm_lib.c
      sound/core/pcm_native.c
    cw1200: fix missing unlock on error in cw1200_hw_scan()
    Input: synaptics-rmi4 - fix possible double free
    spi: ST ST95HF NFC: declare missing of table
    spi: Micrel eth switch: declare missing of table
    gpu: ipu-v3: dp: fix CSC handling
    selftests/net: correct the return value for run_netsocktests
    drm/sun4i: Set device driver data at bind time for use in unbind
    s390: ctcm: fix ctcm_new_device error return code
    MIPS: perf: ath79: Fix perfcount IRQ assignment
    ipvs: do not schedule icmp errors from tunnels
    selftests: netfilter: check icmp pkttoobig errors are set as related
  * init: initialize jump labels before command line option parsing
      init/main.c
    tools lib traceevent: Fix missing equality check for strcmp
    KVM: x86: avoid misreporting level-triggered irqs as edge-triggered in tracing
  * x86/reboot, efi: Use EFI reboot for Acer TravelMate X514-51T
      include/linux/efi.h
    mISDN: Check address length before reading address family
    s390/3270: fix lockdep false positive on view->lock
    mac80211: fix unaligned access in mesh table hash function
    s390/dasd: Fix capacity calculation for large volumes
    libnvdimm/btt: Fix a kmemdup failure check
  * HID: input: add mapping for "Toggle Display" key
      drivers/hid/hid-input.c
  * HID: input: add mapping for keyboard Brightness Up/Down/Toggle keys
      drivers/hid/hid-input.c
  * HID: input: add mapping for Expose/Overview key
      drivers/hid/hid-input.c
    libnvdimm/namespace: Fix a potential NULL pointer dereference
    iio: adc: xilinx: fix potential use-after-free on remove
    USB: serial: fix unthrottle races
    platform/x86: sony-laptop: Fix unintentional fall-through
  * bpf: convert htab map to hlist_nulls
      include/linux/list_nulls.h
      include/linux/rculist_nulls.h
      kernel/bpf/hashtab.c
  * bpf: fix struct htab_elem layout
      kernel/bpf/hashtab.c
  * netfilter: compat: initialize all fields in xt_init
      net/netfilter/x_tables.c
    ANDROID: cuttlefish_defconfig: Disable DEVTMPFS
    ANDROID: Move from clang r349610 to r353983c.
    Merge upstream-f2fs-stable-linux-4.9.y into android-4.9
    Merge 4.9.176 into android-4.9
Linux 4.9.176
    x86/cpu/bugs: Use __initconst for 'const' init data
    x86: stop exporting msr-index.h to userland
    x86/speculation/mds: Fix documentation typo
    Documentation: Correct the possible MDS sysfs values
    x86/mds: Add MDSUM variant to the MDS documentation
    x86/speculation/mds: Add 'mitigations=' support for MDS
    x86/speculation: Support 'mitigations=' cmdline option
  * cpu/speculation: Add 'mitigations=' cmdline option
      include/linux/cpu.h
      kernel/cpu.c
    x86/speculation/mds: Print SMT vulnerable on MSBDS with mitigations off
    x86/speculation/mds: Fix comment
    x86/speculation/mds: Add SMT warning message
    x86/speculation: Move arch_smt_update() call to after mitigation decisions
    x86/speculation/mds: Add mds=full,nosmt cmdline option
    Documentation: Add MDS vulnerability documentation
    Documentation: Move L1TF to separate directory
    x86/speculation/mds: Add mitigation mode VMWERV
  * x86/speculation/mds: Add sysfs reporting for MDS
      drivers/base/cpu.c
      include/linux/cpu.h
    x86/speculation/mds: Add mitigation control for MDS
    x86/speculation/mds: Conditionally clear CPU buffers on idle entry
    x86/kvm/vmx: Add MDS protection when L1D Flush is not active
    x86/speculation/mds: Clear CPU buffers on exit to user
    x86/speculation/mds: Add mds_clear_cpu_buffers()
    x86/kvm: Expose X86_FEATURE_MD_CLEAR to guests
    x86/speculation/mds: Add BUG_MSBDS_ONLY
    x86/speculation/mds: Add basic bug infrastructure for MDS
    x86/speculation: Consolidate CPU whitelists
    x86/msr-index: Cleanup bit defines
    kvm: x86: Report STIBP on GET_SUPPORTED_CPUID
    x86/speculation: Provide IBPB always command line options
    x86/speculation: Add seccomp Spectre v2 user space protection mode
    x86/speculation: Enable prctl mode for spectre_v2_user
  * x86/speculation: Add prctl() control for indirect branch speculation
      include/linux/sched.h
      include/uapi/linux/prctl.h
    x86/speculation: Prevent stale SPEC_CTRL msr content
    x86/speculation: Prepare arch_smt_update() for PRCTL mode
    x86/speculation: Split out TIF update
    x86/speculation: Prepare for conditional IBPB in switch_mm()
    x86/speculation: Avoid __switch_to_xtra() calls
    x86/process: Consolidate and simplify switch_to_xtra() code
    x86/speculation: Prepare for per task indirect branch speculation control
    x86/speculation: Add command line control for indirect branch speculation
    x86/speculation: Unify conditional spectre v2 print functions
    x86/speculataion: Mark command line parser data __initdata
    x86/speculation: Mark string arrays const correctly
    x86/speculation: Reorder the spec_v2 code
    x86/l1tf: Show actual SMT state
  * x86/speculation: Rework SMT state change
      include/linux/sched/smt.h
      kernel/cpu.c
  * sched: Add sched_smt_active()
      include/linux/sched/smt.h
      kernel/sched/core.c
      kernel/sched/sched.h
    x86/Kconfig: Select SCHED_SMT if SMP enabled
    x86/speculation: Reorganize speculation control MSRs update
    x86/speculation: Rename SSBD update functions
    x86/speculation: Disable STIBP when enhanced IBRS is in use
    x86/speculation: Move STIPB/IBPB string conditionals out of cpu_show_common()
    x86/speculation: Remove unnecessary ret variable in cpu_show_common()
    x86/speculation: Clean up spectre_v2_parse_cmdline()
    x86/speculation: Update the TIF_SSBD comment
    x86/speculation/l1tf: Drop the swap storage limit restriction when l1tf=off
    x86/speculation: Propagate information about RSB filling mitigation to sysfs
  * x86/speculation: Enable cross-hyperthread spectre v2 STIBP mitigation
      kernel/cpu.c
  * x86/speculation: Apply IBPB more strictly to avoid cross-process data leak
      include/linux/ptrace.h
      kernel/ptrace.c
    Documentation/l1tf: Fix small spelling typo
    x86/cpu: Sanitize FAM6_ATOM naming
    x86/speculation: Remove SPECTRE_V2_IBRS in enum spectre_v2_mitigation
  * locking/atomics, asm-generic: Move some macros from <linux/bitops.h> to a new <linux/bits.h> file
      include/linux/bitops.h
      include/linux/bits.h
    x86/speculation: Simplify the CPU bug detection logic
  * bitops: avoid integer overflow in GENMASK(_ULL)
      include/linux/bitops.h
    x86/mm: Use WRITE_ONCE() when setting PTEs
    x86/microcode: Update the new microcode revision unconditionally
    x86/microcode: Make sure boot_cpu_data.microcode is up-to-date
    x86/microcode/intel: Check microcode revision before updating sibling threads
    x86/microcode/intel: Add a helper which gives the microcode revision
    x86/bugs: Fix the AMD SSBD usage of the SPEC_CTRL MSR
    x86/bugs: Switch the selection of mitigation from CPU vendor to CPU features
    x86/bugs: Add AMD's SPEC_CTRL MSR usage
    x86/bugs: Add AMD's variant of SSB_NO
    x86/cpufeatures: Hide AMD-specific speculation flags
    x86/MCE: Save microcode revision in machine check records
    Merge 4.9.175 into android-4.9
Linux 4.9.175
    timer/debug: Change /proc/timer_stats from 0644 to 0600
    ASoC: Intel: avoid Oops if DMA setup fails
    UAS: fix alignment of scatter/gather segments
  * Bluetooth: Align minimum encryption key size for LE and BR/EDR connections
      include/net/bluetooth/hci_core.h
      net/bluetooth/hci_conn.c
    Bluetooth: hidp: fix buffer overflow
    scsi: qla2xxx: Fix incorrect region-size setting in optrom SYSFS routines
  * usb-storage: Set virt_boundary_mask to avoid SG overflows
      drivers/usb/storage/scsiglue.c
    USB: serial: f81232: fix interrupt worker not stop
  * usb: dwc3: Fix default lpm_nyet_threshold value
      drivers/usb/dwc3/core.c
  * genirq: Prevent use-after-free and work list corruption
      kernel/irq/manage.c
    ARM: 8680/1: boot/compressed: fix inappropriate Thumb2 mnemonic for __nop
  * mm: add 'try_get_page()' helper function
      include/linux/mm.h
    iommu/amd: Set exclusion range correctly
    virtio-blk: limit number of hw queues by nr_cpu_ids
    drm/mediatek: fix possible object reference leak
    scsi: csiostor: fix missing data copy in csio_scsi_err_handler()
  * linux/kernel.h: Use parentheses around argument in u64_to_user_ptr()
      include/linux/kernel.h
    perf/x86/intel: Fix handling of wakeup_events for multi-entry PEBS
    drm/mediatek: Fix an error code in mtk_hdmi_dt_parse_pdata()
    ASoC: tlv320aic32x4: Fix Common Pins
    IB/hfi1: Eliminate opcode tests on mr deref
    ASoC: cs4270: Set auto-increment bit for register writes
    ASoC: nau8810: fix the issue of widget with prefixed name
  * ASoC:soc-pcm:fix a codec fixup issue in TDM case
      sound/soc/soc-pcm.c
    staging: greybus: power_supply: fix prop-descriptor request size
    ubsan: Fix nasty -Wbuiltin-declaration-mismatch GCC-9 warnings
    scsi: libsas: fix a race condition when smp task timeout
  * f2fs: fix to avoid accessing xattr across the boundary
      fs/f2fs/xattr.c
      fs/f2fs/xattr.h
  * f2fs: fix to avoid potential race on sbi->unusable_block_count access/update
      fs/f2fs/checkpoint.c
      fs/f2fs/segment.c
      fs/f2fs/super.c
  * f2fs: add tracepoint for f2fs_filemap_fault()
      fs/f2fs/file.c
      include/trace/events/f2fs.h
  * f2fs: introduce DATA_GENERIC_ENHANCE
      fs/f2fs/checkpoint.c
      fs/f2fs/data.c
      fs/f2fs/f2fs.h
      fs/f2fs/file.c
      fs/f2fs/gc.c
      fs/f2fs/inode.c
      fs/f2fs/node.c
      fs/f2fs/recovery.c
      fs/f2fs/segment.c
      fs/f2fs/segment.h
  * f2fs: fix to handle error in f2fs_disable_checkpoint()
      fs/f2fs/super.c
  * f2fs: remove redundant check in f2fs_file_write_iter()
      fs/f2fs/file.c
  * f2fs: fix to be aware of readonly device in write_checkpoint()
      fs/f2fs/checkpoint.c
  * f2fs: fix to skip recovery on readonly device
      fs/f2fs/checkpoint.c
      fs/f2fs/super.c
  * f2fs: fix to consider multiple device for readonly check
      fs/f2fs/f2fs.h
      fs/f2fs/super.c
  * f2fs: relocate chksum_offset for large_nat_bitmap feature
      fs/f2fs/checkpoint.c
      fs/f2fs/f2fs.h
  * f2fs: allow unfixed f2fs_checkpoint.checksum_offset
      fs/f2fs/checkpoint.c
      include/linux/f2fs_fs.h
  * f2fs: Replace spaces with tab
      fs/f2fs/acl.c
  * f2fs: insert space before the open parenthesis '('
      fs/f2fs/acl.c
  * f2fs: allow address pointer number of dnode aligning to specified size
      fs/f2fs/f2fs.h
      fs/f2fs/file.c
      fs/f2fs/gc.c
      fs/f2fs/node.c
      fs/f2fs/super.c
      include/linux/f2fs_fs.h
  * f2fs: introduce f2fs_read_single_page() for cleanup
      fs/f2fs/data.c
  * f2fs: mark is_extension_exist() inline
      fs/f2fs/namei.c
  * f2fs: fix to set FI_UPDATE_WRITE correctly
      fs/f2fs/data.c
  * f2fs: fix to avoid panic in f2fs_inplace_write_data()
      fs/f2fs/segment.c
  * f2fs: fix to do sanity check on valid block count of segment
      fs/f2fs/segment.h
  * f2fs: fix to do sanity check on valid node/block count
      fs/f2fs/super.c
  * f2fs: fix to avoid panic in do_recover_data()
      fs/f2fs/recovery.c
  * f2fs: fix to do sanity check on free nid
      fs/f2fs/node.c
  * f2fs: fix to do checksum even if inode page is uptodate
      fs/f2fs/inode.c
      fs/f2fs/node.c
  * f2fs: fix to avoid panic in f2fs_remove_inode_page()
      fs/f2fs/node.c
  * f2fs: fix to clear dirty inode in error path of f2fs_iget()
      fs/f2fs/inode.c
  * f2fs: remove new blank line of f2fs kernel message
      fs/f2fs/file.c
      fs/f2fs/super.c
  * f2fs: fix wrong __is_meta_io() macro
      fs/f2fs/checkpoint.c
      fs/f2fs/data.c
      fs/f2fs/f2fs.h
  * f2fs: fix to avoid panic in dec_valid_node_count()
      fs/f2fs/f2fs.h
  * f2fs: fix to avoid panic in dec_valid_block_count()
      fs/f2fs/f2fs.h
  * f2fs: fix to use inline space only if inline_xattr is enable
      fs/f2fs/f2fs.h
  * f2fs: fix to retrieve inline xattr space
      fs/f2fs/inline.c
  * f2fs: fix error path of recovery
      fs/f2fs/recovery.c
  * f2fs: fix to avoid deadloop in foreground GC
      fs/f2fs/gc.c
  * f2fs: data: fix warning Using plain integer as NULL pointer
      fs/f2fs/data.c
  * f2fs: add tracepoint for f2fs_file_write_iter()
      fs/f2fs/file.c
      include/trace/events/f2fs.h
  * f2fs: add comment for conditional compilation statement
      fs/f2fs/f2fs.h
  * f2fs: fix potential recursive call when enabling data_flush
      fs/f2fs/checkpoint.c
      fs/f2fs/data.c
  * f2fs: improve discard handling with multi-device volumes
      fs/f2fs/f2fs.h
      fs/f2fs/segment.c
  * f2fs: Reduce zoned block device memory usage
      fs/f2fs/f2fs.h
      fs/f2fs/segment.c
      fs/f2fs/super.c
  * f2fs: Fix use of number of devices
      fs/f2fs/data.c
      fs/f2fs/f2fs.h
      fs/f2fs/file.c
      fs/f2fs/gc.c
      fs/f2fs/segment.c
  * ANDROID: block/cfq-iosched: make group_idle per io cgroup tunable
      block/cfq-iosched.c
    Merge remote-tracking branch 'origin/upstream-f2fs-stable-linux-4.9.y' into android-4.9
    ANDROID: cuttlefish_defconfig: Enable CONFIG_CPUSETS and CONFIG_CGROUP_SCHEDTUNE
    ANDROID: Communicates LMK events to userland where they can be logged
    Merge 4.9.174 into android-4.9
Linux 4.9.174
    media: v4l2: i2c: ov7670: Fix PLL bypass register values
    x86/mce: Improve error message when kernel cannot recover, p2
  * selinux: never allow relabeling on context mounts
      security/selinux/hooks.c
    Input: snvs_pwrkey - initialize necessary driver data before enabling IRQ
    scsi: RDMA/srpt: Fix a credit leak for aborted commands
    staging: iio: adt7316: fix the dac write calculation
    staging: iio: adt7316: fix the dac read calculation
    staging: iio: adt7316: allow adt751x to use internal vref for all dacs
    perf/x86/amd: Update generic hardware cache events for Family 17h
    ARM: iop: don't use using 64-bit DMA masks
    ARM: orion: don't use using 64-bit DMA masks
    xsysace: Fix error handling in ace_setup
    sh: fix multiple function definition build errors
    hugetlbfs: fix memory leak for resv_map
    net: hns: Fix WARNING when remove HNS driver with SMMU enabled
    net: hns: Use NAPI_POLL_WEIGHT for hns driver
    net: hns: fix KASAN: use-after-free in hns_nic_net_xmit_hw()
    scsi: storvsc: Fix calculation of sub-channel count
  * scsi: core: add new RDAC LENOVO/DE_Series device
      drivers/scsi/scsi_devinfo.c
    vfio/pci: use correct format characters
    rtc: da9063: set uie_unsupported when relevant
  * debugfs: fix use-after-free on symlink traversal
      fs/debugfs/inode.c
    jffs2: fix use-after-free on symlink traversal
    net: stmmac: don't log oversized frames
    net: stmmac: fix dropping of multi-descriptor RX frames
    net: stmmac: don't overwrite discard_frame status
  * bonding: show full hw address in sysfs for slave entries
      drivers/net/bonding/bond_sysfs_slave.c
    net/mlx5: E-Switch, Fix esw manager vport indication for more vport commands
    igb: Fix WARN_ONCE on runtime suspend
    batman-adv: Reduce tt_global hash refcnt only for removed entry
    batman-adv: Reduce tt_local hash refcnt only for removed entry
    batman-adv: Reduce claim hash refcnt only for removed entry
    rtc: sh: Fix invalid alarm warning for non-enabled alarm
  * HID: debug: fix race condition with between rdesc_show() and device removal
      drivers/hid/hid-debug.c
    HID: logitech: check the return value of create_singlethread_workqueue
    nvme-loop: init nvmet_ctrl fatal_err_work when allocate
  * USB: core: Fix bug caused by duplicate interface PM usage counter
      drivers/usb/core/driver.c
      include/linux/usb.h
  * USB: core: Fix unterminated string returned by usb_string()
      drivers/usb/core/message.c
    usb: usbip: fix isoc packet num validation in get_pipe
    USB: w1 ds2490: Fix bug caused by improper use of altsetting array
    USB: yurex: Fix protection fault after device removal
    caif: reduce stack size with KASAN
  * arm64: mm: don't print out page table entries on EL0 faults
      arch/arm64/mm/fault.c
  * arm64: mm: print out correct page table entries
      arch/arm64/include/asm/system_misc.h
      arch/arm64/mm/fault.c
  * kasan: prevent compiler from optimizing away memset in tests
      lib/Makefile
  * arm64: proc: Set PTE_NG for table entries to avoid traversing them twice
      arch/arm64/mm/proc.S
    kasan: remove redundant initialization of variable 'real_size'
    kasan: avoid -Wmaybe-uninitialized warning
  * kasan: add a prototype of task_struct to avoid warning
      include/linux/kasan.h
    arm64: kasan: avoid bad virt_to_pfn()
    x86/unwind: Disable KASAN checks for non-current tasks
    mm/kasan: Switch to using __pa_symbol and lm_alias
    x86/suspend: fix false positive KASAN warning on suspend/resume
    net: phy: marvell: Fix buffer overrun with stats counters
    bnxt_en: Improve multicast address setup logic.
  * packet: validate msg_namelen in send directly
      net/packet/af_packet.c
  * ipv6: invert flowlabel sharing check in process and user mode
      net/ipv6/ip6_flowlabel.c
  * ipv6/flowlabel: wait rcu grace period before put_pid()
      net/ipv6/ip6_flowlabel.c
  * ipv4: ip_do_fragment: Preserve skb_iif during fragmentation
      net/ipv4/ip_output.c
    ALSA: line6: use dynamic buffers
  * ext4: don't bother checking for encryption key in ->mmap()
      fs/ext4/file.c
    ANDROID: cuttlefish 4.9: enable CONFIG_CRYPTO_AES_NI_INTEL=y
    Merge 4.9.173 into android-4.9
Linux 4.9.173
    vfio/type1: Limit DMA mappings per container
    leds: pca9532: fix a potential NULL pointer dereference
    kconfig/[mn]conf: handle backspace (^H) key
  * gpio: of: Fix of_gpiochip_add() error path
      drivers/gpio/gpiolib-of.c
    libata: fix using DMA buffers on stack
    scsi: zfcp: reduce flood of fcrscn1 trace records on multi-element RSCN
    ceph: fix use-after-free on symlink traversal
    usb: u132-hcd: fix resource leak
    scsi: qla4xxx: fix a potential NULL pointer dereference
    net: ethernet: ti: fix possible object reference leak
    net: ibm: fix possible object reference leak
    net: xilinx: fix possible object reference leak
    NFS: Fix a typo in nfs_init_timeout_values()
    staging: rtl8712: uninitialized memory in read_bbreg_hdl()
    net: ks8851: Set initial carrier state to down
    net: ks8851: Delay requesting IRQ until opened
    net: ks8851: Reassert reset pin if chip ID check fails
    net: ks8851: Dequeue RX packets explicitly
    ARM: dts: pfla02: increase phy reset duration
    usb: gadget: net2272: Fix net2272_dequeue()
    usb: gadget: net2280: Fix net2280_dequeue()
    usb: gadget: net2280: Fix overrun of OUT messages
    serial: ar933x_uart: Fix build failure with disabled console
    sc16is7xx: missing unregister/delete driver on error in sc16is7xx_init()
    netfilter: bridge: set skb transport_header before entering NF_INET_PRE_ROUTING
    netfilter: nft_set_rbtree: check for inactive element after flag mismatch
    qlcnic: Avoid potential NULL pointer dereference
    s390: limit brk randomization to 32MB
    ARM: dts: bcm283x: Fix hdmi hpd gpio pull
    media: vivid: check if the cec_adapter is valid
    usbnet: ipheth: fix potential null pointer dereference in ipheth_carrier_set
    usbnet: ipheth: prevent TX queue timeouts when device not ready
    Merge 4.9.172 into android-4.9
Linux 4.9.172
    Documentation: Add nospectre_v1 parameter
    powerpc/fsl: Add FSL_PPC_BOOK3E as supported arch for nospectre_v2 boot arg
  * net: IP6 defrag: use rbtrees in nf_conntrack_reasm.c
      net/ipv6/netfilter/nf_conntrack_reasm.c
  * net: IP6 defrag: use rbtrees for IPv6 defrag
      include/net/ipv6_frag.h
      net/ipv6/reassembly.c
  * ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module
      include/net/ipv6.h
      include/net/ipv6_frag.h
      net/ipv6/netfilter/nf_conntrack_reasm.c
      net/ipv6/netfilter/nf_defrag_ipv6_hooks.c
      net/ipv6/reassembly.c
  * net: IP defrag: encapsulate rbtree defrag code into callable functions
      include/net/inet_frag.h
      net/ipv4/inet_fragment.c
      net/ipv4/ip_fragment.c
  * ipv6: frags: fix a lockdep false positive
      net/ipv6/reassembly.c
  * ipv4: set the tcp_min_rtt_wlen range from 0 to one day
      net/ipv4/sysctl_net_ipv4.c
    net: stmmac: move stmmac_check_ether_addr() to driver probe
    team: fix possible recursive locking when add slaves
    net: rds: exchange of 8K and 1M pool
    net/mlx5e: ethtool, Remove unsupported SFP EEPROM high pages query
    mlxsw: spectrum: Fix autoneg status in ethtool
  * ipv4: add sanity checks in ipv4_link_failure()
      net/ipv4/route.c
  * Revert "block/loop: Use global lock for ioctl() operation."
      drivers/block/loop.c
      drivers/block/loop.h
    tipc: check link name with right length in tipc_nl_compat_link_set
    tipc: check bearer name with right length in tipc_nl_compat_bearer_enable
    fm10k: Fix a potential NULL pointer dereference
  * netfilter: ebtables: CONFIG_COMPAT: drop a bogus WARN_ON
      net/bridge/netfilter/ebtables.c
    NFS: Forbid setting AF_INET6 to "struct sockaddr_in"->sin_family.
  * fs/proc/proc_sysctl.c: Fix a NULL pointer dereference
      fs/proc/proc_sysctl.c
    intel_th: gth: Fix an off-by-one in output unassigning
  * slip: make slhc_free() silently accept an error pointer
      drivers/net/slip/slhc.c
    tipc: handle the err returned from cmd header function
    vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock
  * USB: Consolidate LPM checks to avoid enabling LPM twice
      drivers/usb/core/driver.c
      drivers/usb/core/hub.c
      drivers/usb/core/message.c
  * USB: Add new USB LPM helpers
      drivers/usb/core/driver.c
      drivers/usb/core/hub.c
      drivers/usb/core/message.c
      drivers/usb/core/sysfs.c
      drivers/usb/core/usb.h
    drm/vc4: Fix compilation error reported by kbuild test bot
    drm/vc4: Fix memory leak during gpu reset.
    ARM: 8857/1: efi: enable CP15 DMB instructions before cleaning the cache
    dmaengine: sh: rcar-dmac: With cyclic DMA residue 0 is valid
    Input: synaptics-rmi4 - write config register values to the right offset
    sunrpc: don't mark uninitialised items as VALID.
    nfsd: Don't release the callback slot unless it was actually held
    ceph: fix ci->i_head_snapc leak
    ceph: ensure d_name stability in ceph_dentry_hash()
  * sched/numa: Fix a possible divide-by-zero
      kernel/sched/fair.c
    IB/rdmavt: Fix frwr memory registration
  * trace: Fix preempt_enable_no_resched() abuse
      kernel/trace/ring_buffer.c
    MIPS: scall64-o32: Fix indirect syscall number load
  * tracing: Fix a memory leak by early error exit in trace_pid_write()
      kernel/trace/trace.c
    cifs: do not attempt cifs operation on smb2+ rename error
  * kbuild: simplify ld-option implementation
      scripts/Kbuild.include
    Merge 4.9.171 into android-4.9
Linux 4.9.171
  * kernel/sysctl.c: fix out-of-bounds access when setting file-max
      kernel/sysctl.c
    Revert "locking/lockdep: Add debug_locks check in __lock_downgrade()"
    i2c-hid: properly terminate i2c_hid_dmi_desc_override_table[] array
  * percpu: stop printing kernel addresses
      mm/percpu.c
  * ALSA: info: Fix racy addition/deletion of nodes
      sound/core/info.c
  * mm/vmstat.c: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n
      mm/vmstat.c
    device_cgroup: fix RCU imbalance in error case
  * sched/fair: Limit sched_cfs_period_timer() loop to avoid hard lockup
      kernel/sched/fair.c
  * Revert "kbuild: use -Oz instead of -Os when using clang"
      Makefile
    perf/x86/amd: Add event map for AMD Family 17h
    mac80211: do not call driver wake_tx_queue op during reconfig
    rt2x00: do not increment sequence number while re-transmitting
  * kprobes: Fix error check when reusing optimized probes
      kernel/kprobes.c
    kprobes: Mark ftrace mcount handler functions nokprobe
  * x86/kprobes: Verify stack frame on kretprobe
      include/linux/kprobes.h
  * arm64: futex: Restore oldval initialization to work around buggy compilers
      arch/arm64/include/asm/futex.h
    crypto: x86/poly1305 - fix overflow during partial reduction
    Revert "svm: Fix AVIC incomplete IPI emulation"
    Revert "scsi: fcoe: clear FC_RP_STARTED flags when receiving a LOGO"
  * ALSA: core: Fix card races between register and disconnect
      sound/core/init.c
    staging: comedi: ni_usb6501: Fix possible double-free of ->usb_rx_buf
    staging: comedi: ni_usb6501: Fix use of uninitialized mutex
    staging: comedi: vmk80xx: Fix possible double-free of ->usb_rx_buf
    staging: comedi: vmk80xx: Fix use of uninitialized semaphore
    io: accel: kxcjk1013: restore the range after resume.
    iio: adc: at91: disable adc channel interrupt in timeout case
    iio: ad_sigma_delta: select channel when reading register
    iio/gyro/bmg160: Use millidegrees for temperature scale
    staging: iio: ad7192: Fix ad7193 channel address
    KVM: x86: Don't clear EFER during SMM transitions for 32-bit vCPU
    CIFS: keep FileInfo handle live during oplock break
    tpm/tpm_i2c_atmel: Return -E2BIG when the transfer is incomplete
  * modpost: file2alias: check prototype of handler
      scripts/mod/file2alias.c
  * modpost: file2alias: go back to simple devtable lookup
      scripts/mod/file2alias.c
  * mmc: sdhci: Fix data command CRC error handling
      drivers/mmc/host/sdhci.c
    crypto: crypto4xx - properly set IV after de- and encrypt
  * ipv4: ensure rcu_read_lock() in ipv4_link_failure()
      net/ipv4/route.c
  * ipv4: recompile ip options in ipv4_link_failure
      net/ipv4/route.c
    vhost: reject zero size iova range
    team: set slave to promisc if team is already in promisc mode
  * tcp: tcp_grow_window() needs to respect tcp_space()
      net/ipv4/tcp_input.c
    net: fou: do not use guehdr after iptunnel_pull_offloads in gue_udp_recv
  * net: bridge: multicast: use rcu to access port list from br_multicast_start_querier
      net/bridge/br_multicast.c
  * net: bridge: fix per-port af_packet sockets
      net/bridge/br_input.c
    net: atm: Fix potential Spectre v1 vulnerabilities
  * bonding: fix event handling for stacked bonds
      drivers/net/bonding/bond_main.c
  * UPSTREAM: usb: hcd: use correct device pointer for dma ops
      drivers/usb/core/hcd.c
    UPSTREAM: usb: host: ehci: use correct device pointer for dma ops
  * UPSTREAM: usb: separate out sysdev pointer from usb_bus
      drivers/usb/core/buffer.c
      drivers/usb/core/hcd.c
      drivers/usb/core/usb.c
      include/linux/usb.h
      include/linux/usb/hcd.h
    ANDROID: cuttlefish_defconfig: Enable CONFIG_XFRM_STATISTICS
    Merge 4.9.170 into android-4.9
Linux 4.9.170
  * appletalk: Fix compile regression
      include/linux/atalk.h
    net: stmmac: Set dma ring length before enabling the DMA
    tpm/tpm_crb: Avoid unaligned reads in crb_recv()
  * include/linux/swap.h: use offsetof() instead of custom __swapoffset macro
      include/linux/swap.h
  * lib/div64.c: off by one in shift
      lib/div64.c
  * appletalk: Fix use-after-free in atalk_proc_exit
      include/linux/atalk.h
    ARM: 8839/1: kprobe: make patch_lock a raw_spinlock_t
    lkdtm: Add tests for NULL pointer dereference
    soc/tegra: pmc: Drop locking from tegra_powergate_is_powered()
    iommu/dmar: Fix buffer overflow during PCI bus notification
    crypto: sha512/arm - fix crash bug in Thumb2 build
    crypto: sha256/arm - fix crash bug in Thumb2 build
  * kernel: hung_task.c: disable on suspend
      kernel/hung_task.c
    cifs: fallback to older infolevels on findfirst queryinfo retry
    ACPI / SBS: Fix GPE storm on recent MacBookPro's
    ARM: samsung: Limit SAMSUNG_PM_CHECK config option to non-Exynos platforms
    HID: i2c-hid: override HID descriptors for certain devices
    serial: uartps: console_setup() can't be placed to init section
  * f2fs: fix to do sanity check with current segment number
      fs/f2fs/super.c
    9p locks: add mount option for lock retry interval
    9p: do not trust pdu content for stat item size
    rsi: improve kernel thread handling to fix kernel panic
    gpio: pxa: handle corner case of unprobed device
  * ext4: prohibit fstrim in norecovery mode
      fs/ext4/ioctl.c
    fix incorrect error code mapping for OBJECTID_NOT_FOUND
    x86/hw_breakpoints: Make default case in hw_breakpoint_arch_parse() return an error
    iommu/vt-d: Check capability before disabling protected memory
    x86/cpu/cyrix: Use correct macros for Cyrix calls on Geode processors
    x86/hpet: Prevent potential NULL pointer dereference
    irqchip/mbigen: Don't clear eventid when freeing an MSI
    perf tests: Fix a memory leak in test__perf_evsel__tp_sched_test()
    perf tests: Fix a memory leak of cpu_map object in the openat_syscall_event_on_all_cpus test
    perf evsel: Free evsel->counts in perf_evsel__exit()
    perf hist: Add missing map__put() in error case
    perf top: Fix error handling in cmd_top()
    perf build-id: Fix memory leak in print_sdt_events()
    perf config: Fix a memory leak in collect_config()
    perf config: Fix an error in the config template documentation
    tools/power turbostat: return the exit status of a command
    thermal/int340x_thermal: fix mode setting
    thermal/int340x_thermal: Add additional UUIDs
    ALSA: opl3: fix mismatch between snd_opl3_drum_switch definition and declaration
    mmc: davinci: remove extraneous __init annotation
    IB/mlx4: Fix race condition between catas error reset and aliasguid flows
    ALSA: sb8: add a check for request_region
    ALSA: echoaudio: add a check for ioremap_nocache
  * ext4: report real fs size after failed resize
      fs/ext4/resize.c
  * ext4: add missing brelse() in add_new_gdb_meta_bg()
      fs/ext4/resize.c
  * perf/core: Restore mmap record type correctly
      kernel/events/core.c
    ARC: u-boot args: check that magic number is correct
    ANDROID: cuttlefish_defconfig: Enable L2TP/PPTP
  * ANDROID: Makefile: Properly resolve 4.9.169 merge
      Makefile
    Make arm64 serial port config compatible with crosvm
    Merge 4.9.169 into android-4.9
Linux 4.9.169
  * PCI: Add function 1 DMA alias quirk for Marvell 9170 SATA controller
      drivers/pci/quirks.c
    xtensa: fix return_address
  * sched/fair: Do not re-read ->h_load_next during hierarchical load calculation
      kernel/sched/fair.c
    xen: Prevent buffer overflow in privcmd ioctl
    parisc: Use cr16 interval timers unconditionally on qemu
  * arm64: futex: Fix FUTEX_WAKE_OP atomic ops with non-zero result value
      arch/arm64/include/asm/futex.h
    ARM: dts: at91: Fix typo in ISC_D0 on PC9
    virtio: Honour 'may_reduce_num' in vring_create_virtqueue
  * genirq: Respect IRQCHIP_SKIP_SET_WAKE in irq_chip_set_wake_parent()
      kernel/irq/chip.c
  * block: do not leak memory in bio_copy_user_iov()
      block/bio.c
    Btrfs: do not allow trimming when a fs is mounted with the nologreplay option
    ASoC: fsl_esai: fix channel swap issue when stream starts
  * include/linux/bitrev.h: fix constant bitrev
      include/linux/bitrev.h
    parisc: Detect QEMU earlier in boot process
    ALSA: seq: Fix OOB-reads from strlcpy
  * ip6_tunnel: Match to ARPHRD_TUNNEL6 for dev type
      net/ipv6/ip6_tunnel.c
  * net: ethtool: not call vzalloc for zero sized memory request
      net/core/ethtool.c
  * netns: provide pure entropy for net_hash_mix()
      include/net/net_namespace.h
      include/net/netns/hash.h
      net/core/net_namespace.c
    net/mlx5e: Add a lock on tir list
    bnxt_en: Improve RX consumer index validity check.
    bnxt_en: Reset device on RX buffer errors.
  * vrf: check accept_source_route on the original netdevice
      include/net/ip.h
      net/ipv4/ip_input.c
      net/ipv4/ip_options.c
    tcp: Ensure DCTCP reacts to losses
    sctp: initialize _pad of sockaddr_in before copying to user memory
    qmi_wwan: add Olicard 600
    openvswitch: fix flow actions reallocation
    net: rds: force to destroy connection if t_sock is NULL in rds_tcp_kill_sock().
    kcm: switch order of device registration to fix a crash
  * ipv6: sit: reset ip header pointer in ipip6_rcv
      net/ipv6/sit.c
  * ipv6: Fix dangling pointer when ipv6 fragment
      net/ipv6/ip6_output.c
  * tty: ldisc: add sysctl to prevent autoloading of ldiscs
      drivers/tty/Kconfig
      drivers/tty/tty_io.c
      drivers/tty/tty_ldisc.c
  * tty: mark Siemens R3964 line discipline as BROKEN
      drivers/char/Kconfig
  * arm64: kaslr: Reserve size of ARM64_MEMSTART_ALIGN in linear region
      arch/arm64/mm/init.c
    powerpc/security: Fix spectre_v2 reporting
    powerpc/fsl: Fix the flush of branch predictor.
    powerpc/fsl: Fixed warning: orphan section `__btb_flush_fixup'
    powerpc/fsl: Update Spectre v2 reporting
    powerpc/fsl: Enable runtime patching if nospectre_v2 boot arg is used
    powerpc/fsl: Flush branch predictor when entering KVM
    powerpc/fsl: Flush the branch predictor at each kernel entry (32 bit)
    powerpc/fsl: Flush the branch predictor at each kernel entry (64bit)
    powerpc/fsl: Add nospectre_v2 command line argument
    powerpc/fsl: Emulate SPRN_BUCSR register
    powerpc/fsl: Fix spectre_v2 mitigations reporting
    powerpc/fsl: Add macro to flush the branch predictor
    powerpc/fsl: Add infrastructure to fixup branch predictor flush
    powerpc/powernv: Query firmware for count cache flush settings
    powerpc/pseries: Query hypervisor for count cache flush settings
    powerpc/64s: Add support for software count cache flush
    powerpc/64s: Add new security feature flags for count cache flush
    powerpc/asm: Add a patch_site macro & helpers for patching instructions
    powerpc/fsl: Sanitize the syscall table for NXP PowerPC 32 bit platforms
    powerpc/fsl: Add barrier_nospec implementation for NXP PowerPC Book3E
    powerpc/64: Make meltdown reporting Book3S 64 specific
    powerpc/64: Call setup_barrier_nospec() from setup_arch()
    powerpc/64: Add CONFIG_PPC_BARRIER_NOSPEC
    powerpc/64: Make stf barrier PPC_BOOK3S_64 specific.
    powerpc/64: Disable the speculation barrier from the command line
    powerpc64s: Show ori31 availability in spectre_v1 sysfs file not v2
    powerpc/64s: Enhance the information in cpu_show_spectre_v1()
    powerpc/64: Use barrier_nospec in syscall entry
    powerpc: Use barrier_nospec in copy_from_user()
    powerpc/64s: Enable barrier_nospec based on firmware settings
    powerpc/64s: Patch barrier_nospec in modules
    powerpc: Avoid code patching freed init sections
    powerpc/64s: Add support for ori barrier_nospec patching
    powerpc/64s: Add barrier_nospec
    powerpc: Fix invalid use of register expressions
  * lib/string.c: implement a basic bcmp
      include/linux/string.h
      lib/string.c
    x86/vdso: Drop implicit common-page-size linker flag
    x86: vdso: Use $LD instead of $CC to link
  * kbuild: clang: choose GCC_TOOLCHAIN_DIR not on LD
      Makefile
    powerpc/tm: Limit TM code inside PPC_TRANSACTIONAL_MEM
    x86/power: Make restore_processor_context() sane
    x86/power/32: Move SYSENTER MSR restoration to fix_processor_context()
    x86/power/64: Use struct desc_ptr for the IDT in struct saved_context
    x86/power: Fix some ordering bugs in __restore_processor_context()
  * fscrypt: remove filesystem specific build config option
      fs/crypto/Kconfig
      fs/crypto/fscrypt_private.h
      fs/ext4/Kconfig
      fs/ext4/dir.c
      fs/ext4/ext4.h
      fs/ext4/inode.c
      fs/ext4/ioctl.c
      fs/ext4/namei.c
      fs/ext4/page-io.c
      fs/ext4/readpage.c
      fs/ext4/super.c
      fs/ext4/sysfs.c
      fs/f2fs/Kconfig
      fs/f2fs/f2fs.h
      fs/f2fs/super.c
      fs/f2fs/sysfs.c
      include/linux/fs.h
      include/linux/fscrypt.h
  * f2fs: use IS_ENCRYPTED() to check encryption status
      fs/f2fs/data.c
      fs/f2fs/dir.c
      fs/f2fs/f2fs.h
      fs/f2fs/file.c
      fs/f2fs/inode.c
      fs/f2fs/namei.c
  * ext4: use IS_ENCRYPTED() to check encryption status
      fs/ext4/dir.c
      fs/ext4/ext4.h
      fs/ext4/ext4_jbd2.h
      fs/ext4/extents.c
      fs/ext4/file.c
      fs/ext4/ialloc.c
      fs/ext4/inode.c
      fs/ext4/move_extent.c
      fs/ext4/namei.c
      fs/ext4/page-io.c
      fs/ext4/readpage.c
  * fscrypt: return -EXDEV for incompatible rename or link into encrypted dir
      fs/crypto/hooks.c
      fs/crypto/policy.c
      include/linux/fscrypt.h
  * fscrypt: remove CRYPTO_CTR dependency
      fs/crypto/Kconfig
  * fscrypt: add Adiantum support / removed speck
      fs/crypto/crypto.c
      fs/crypto/fname.c
      fs/crypto/fscrypt_private.h
      fs/crypto/keyinfo.c
      fs/crypto/policy.c
      include/uapi/linux/fs.h
  * ANDROID: Makefile: Add '-fsplit-lto-unit' to cfi-clang-flags
      Makefile
    Merge 4.9.168 into android-4.9
Linux 4.9.168
    ACPI / video: Extend chassis-type detection with a "Lunch Box" check
  * drm/dp/mst: Configure no_stop_bit correctly for remote i2c xfers
      drivers/gpu/drm/drm_dp_mst_topology.c
    dmaengine: tegra: avoid overflow of byte tracking
    x86/build: Mark per-CPU symbols as absolute explicitly for LLD
    wlcore: Fix memory leak in case wl12xx_fetch_firmware failure
  * selinux: do not override context on context mounts
      security/selinux/hooks.c
    x86/build: Specify elf_i386 linker emulation explicitly for i386 objects
    drm/nouveau: Stop using drm_crtc_force_disable
    regulator: act8865: Fix act8600_sudcdc_voltage_ranges setting
    media: s5p-jpeg: Check for fmt_ver_flag when doing fmt enumeration
    netfilter: physdev: relax br_netfilter dependency
    dmaengine: qcom_hidma: assign channel cookie correctly
    dmaengine: imx-dma: fix warning comparison of distinct pointer types
    hpet: Fix missing '=' character in the __setup() code of hpet_mmap_enable
    HID: intel-ish: ipc: handle PIMR before ish_wakeup also clear PISR busy_clear bit
    soc/tegra: fuse: Fix illegal free of IO base address
    hwrng: virtio - Avoid repeated init of completion
    media: mt9m111: set initial frame size other than 0x0
    powerpc/pseries: Perform full re-add of CPU for topology update post-migration
  * tty: increase the default flip buffer limit to 2*640K
      drivers/tty/tty_buffer.c
    ARM: avoid Cortex-A9 livelock on tight dmb loops
    mt7601u: bump supported EEPROM version
    soc: qcom: gsbi: Fix error handling in gsbi_probe()
    ARM: dts: lpc32xx: Remove leading 0x and 0s from bindings notation
    efi/memattr: Don't bail on zero VA if it equals the region's PA
    ASoC: fsl-asoc-card: fix object reference leaks in fsl_asoc_card_probe
    e1000e: fix cyclic resets at link up with active tx
    cdrom: Fix race condition in cdrom_sysctl_register
  * fbdev: fbmem: fix memory access if logo is bigger than the screen
      drivers/video/fbdev/core/fbmem.c
    iw_cxgb4: fix srqidx leak during connection abort
  * genirq: Avoid summation loops for /proc/stat
      include/linux/irqdesc.h
      kernel/irq/chip.c
      kernel/irq/internals.h
      kernel/irq/irqdesc.c
    bcache: improve sysfs_strtoul_clamp()
    bcache: fix input overflow to sequential_cutoff
    bcache: fix input overflow to cache set sysfs file io_error_halflife
  * usb: f_fs: Avoid crash due to out-of-scope stack ptr access
      drivers/usb/gadget/function/f_fs.c
  * ALSA: PCM: check if ops are defined before suspending PCM
      sound/core/pcm_native.c
    ARM: 8833/1: Ensure that NEON code always compiles with Clang
  * kprobes: Prohibit probing on bsearch()
      lib/bsearch.c
    ACPI / video: Refactor and fix dmi_is_desktop()
    iwlwifi: pcie: fix emergency path
    leds: lp55xx: fix null deref on firmware load failure
    HID: intel-ish-hid: avoid binding wrong ishtp_cl_device
  * vfs: fix preadv64v2 and pwritev64v2 compat syscalls with offset == -1
      fs/read_write.c
    media: mx2_emmaprp: Correct return type for mem2mem buffer helpers
    media: s5p-g2d: Correct return type for mem2mem buffer helpers
    media: s5p-jpeg: Correct return type for mem2mem buffer helpers
    media: sh_veu: Correct return type for mem2mem buffer helpers
    SoC: imx-sgtl5000: add missing put_device()
    perf test: Fix failure of 'evsel-tp-sched' test on s390
    scsi: megaraid_sas: return error when create DMA pool failed
    IB/mlx4: Increase the timeout for CM cache
    mlxsw: spectrum: Avoid -Wformat-truncation warnings
    e1000e: Fix -Wformat-truncation warnings
    mmc: omap: fix the maximum timeout setting
    iommu/io-pgtable-arm-v7s: Only kmemleak_ignore L2 tables
    ARM: 8840/1: use a raw_spinlock_t in unwind
    coresight: etm4x: Add support to enable ETMv4.2
  * scsi: core: replace GFP_ATOMIC with GFP_KERNEL in scsi_scan.c
      drivers/scsi/scsi_scan.c
    usb: chipidea: Grab the (legacy) USB PHY by phandle first
    crypto: crypto4xx - add missing of_node_put after of_device_is_available
    wil6210: check null pointer in _wil_cfg80211_merge_extra_ies
    tools lib traceevent: Fix buffer overflow in arg_eval
  * fs: fix guard_bio_eod to check for real EOD errors
      fs/buffer.c
  * jbd2: fix invalid descriptor block checksum
      fs/jbd2/commit.c
    cifs: Fix NULL pointer dereference of devname
    dm thin: add sanity checks to thin-pool and external snapshot creation
    cifs: use correct format characters
  * fs/file.c: initialize init_files.resize_wait
      fs/file.c
    f2fs: do not use mutex lock in atomic context
    ocfs2: fix a panic problem caused by o2cb_ctl
    mm/slab.c: kmemleak no scan alien caches
  * mm/vmalloc.c: fix kernel BUG at mm/vmalloc.c:512!
      mm/vmalloc.c
    mm/page_ext.c: fix an imbalance with kmemleak
  * mm/cma.c: cma_declare_contiguous: correct err handling
      mm/cma.c
    scsi: hisi_sas: Set PHY linkrate when disconnected
    enic: fix build warning without CONFIG_CPUMASK_OFFSTACK
  * sysctl: handle overflow for file-max
      kernel/sysctl.c
  * include/linux/relay.h: fix percpu annotation in struct rchan
      include/linux/relay.h
    gpio: gpio-omap: fix level interrupt idling
  * tracing: kdb: Fix ftdump to not sleep
      include/linux/ring_buffer.h
      kernel/trace/ring_buffer.c
      kernel/trace/trace.c
    h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux-
    CIFS: fix POSIX lock leak and invalid ptr deref
  * i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA
      drivers/i2c/i2c-core.c
    mm: mempolicy: make mbind() return -EIO when MPOL_MF_STRICT is specified
    tty/serial: atmel: RS485 HD w/DMA: enable RX after TX is stopped
    tty/serial: atmel: Add is_half_duplex helper
  * lib/int_sqrt: optimize initial value compute
      lib/int_sqrt.c
  * ext4: cleanup bh release code in ext4_ind_remove_space()
      fs/ext4/indirect.c
  * arm64: debug: Ensure debug handlers check triggering exception level
      arch/arm64/kernel/probes/kprobes.c
  * arm64: debug: Don't propagate UNKNOWN FAR into si_code for debug signals
      arch/arm64/mm/fault.c
  * ext4: switch to fscrypt_prepare_setattr()
      fs/ext4/inode.c
  * ext4: switch to fscrypt_prepare_rename()
      fs/ext4/namei.c
  * ext4: switch to fscrypt_prepare_link()
      fs/ext4/namei.c
  * ext4: switch to fscrypt_file_open()
      fs/ext4/file.c
  * ext4, dax: set ext4_dax_aops for dax files
      fs/ext4/inode.c
    ANDROID: cuttlefish_defconfig: Enable CONFIG_OVERLAY_FS
    ANDROID: cuttlefish: enable CONFIG_NET_SCH_INGRESS=y
    Merge 4.9.167 into android-4.9
Linux 4.9.167
  * arm64: support keyctl() system call in 32-bit mode
      arch/arm64/Kconfig
  * Revert "USB: core: only clean up what we allocated"
      drivers/usb/core/config.c
  * xhci: Fix port resume done detection for SS ports with LPM enabled
      drivers/usb/host/xhci-ring.c
      drivers/usb/host/xhci.h
  * USB: gadget: f_hid: fix deadlock in f_hidg_write()
      drivers/usb/gadget/function/f_hid.c
    KVM: x86: Emulate MSR_IA32_ARCH_CAPABILITIES on AMD hosts
    KVM: Reject device ioctls from processes other than the VM's creator
    x86/smp: Enforce CONFIG_HOTPLUG_CPU when SMP=y
  * cpu/hotplug: Prevent crash when CPU bringup fails on CONFIG_HOTPLUG_CPU=n
      kernel/cpu.c
    perf intel-pt: Fix TSC slip
    usb: host: xhci-rcar: Add XHCI_TRUST_TX_LENGTH quirk
  * usb: common: Consider only available nodes for dr_mode
      drivers/usb/common/common.c
    gpio: adnp: Fix testing wrong value in adnp_gpio_direction_input
  * fs/proc/proc_sysctl.c: fix NULL pointer dereference in put_links
      fs/proc/proc_sysctl.c
    Disable kgdboc failed by echo space to /sys/module/kgdboc/parameters/kgdboc
    USB: serial: option: add Olicard 600
    USB: serial: option: set driver_info for SIM5218 and compatibles
    USB: serial: mos7720: fix mos_parport refcount imbalance on error path
    USB: serial: ftdi_sio: add additional NovaTech products
    USB: serial: cp210x: add new device id
    serial: sh-sci: Fix setting SCSCR_TIE while transferring data
    serial: max310x: Fix to avoid potential NULL pointer dereference
    staging: vt6655: Fix interrupt race condition on device start up.
    staging: vt6655: Remove vif check from vnt_interrupt
    staging: comedi: ni_mio_common: Fix divide-by-zero for DIO cmdtest
    tty: atmel_serial: fix a potential NULL pointer dereference
    scsi: zfcp: fix scsi_eh host reset with port_forced ERP for non-NPIV FCP devices
    scsi: zfcp: fix rport unblock if deleted SCSI devices on Scsi_Host
  * scsi: sd: Quiesce warning if device does not report optimal I/O size
      drivers/scsi/sd.c
  * scsi: sd: Fix a race between closing an sd device and sd I/O
      drivers/scsi/sd.c
  * fs/open.c: allow opening only regular files during execve()
      fs/open.c
  * ALSA: pcm: Don't suspend stream in unrecoverable PCM state
      sound/core/pcm_native.c
    ALSA: pcm: Fix possible OOB access in PCM oss plugins
    ALSA: seq: oss: Fix Spectre v1 vulnerability
  * ALSA: rawmidi: Fix potential Spectre v1 vulnerability
      sound/core/rawmidi.c
    net: dsa: qca8k: remove leftover phy accessors
    NFSv4.1 don't free interrupted slot on open
    powerpc: bpf: Fix generation of load/store DW instructions
    ARM: imx6q: cpuidle: fix bug that CPU might not wake up at expected time
    btrfs: raid56: properly unmap parity page in finish_parity_scrub()
    btrfs: remove WARN_ON in log_dir_items
  * tun: add a missing rcu_read_unlock() in error path
      drivers/net/tun.c
  * tun: properly test for IFF_UP
      drivers/net/tun.c
    mac8390: Fix mmio access size probe
  * sctp: get sctphdr by offset in sctp_compute_cksum
      include/net/sctp/checksum.h
    vxlan: Don't call gro_cells_destroy() before device is unregistered
  * tcp: do not use ipv6 header for ipv4 flow
      net/ipv6/tcp_ipv6.c
  * packets: Always register packet sk in the same order
      include/net/sock.h
      net/packet/af_packet.c
    net: rose: fix a possible stack overflow
  * net/packet: Set __GFP_NOWARN upon allocation in alloc_pg_vec
      net/packet/af_packet.c
    mISDN: hfcpci: Test both vendor & device ID for Digium HFC4S
    dccp: do not use ipv6 header for ipv4 flow
    stmmac: copy unicast mac address to MAC registers
  * cfg80211: size various nl80211 messages correctly
      net/wireless/nl80211.c
    video: fbdev: Set pixclock = 0 in goldfishfb
  * Bluetooth: Verify that l2cap_get_conf_opt provides large enough buffer
      net/bluetooth/l2cap_core.c
  * Bluetooth: Check L2CAP option sizes returned from l2cap_get_conf_opt
      net/bluetooth/l2cap_core.c
    UPSTREAM: virt_wifi: Remove REGULATORY_WIPHY_SELF_MANAGED
    Merge 4.9.166 into android-4.9
Linux 4.9.166
    ath10k: avoid possible string overflow
    power: supply: charger-manager: Fix incorrect return value
    pwm-backlight: Enable/disable the PWM before/after LCD enable toggle.
  * rtc: Fix overflow when converting time64_t to rtc_time
      drivers/rtc/rtc-lib.c
  * scsi: ufs: fix wrong command type of UTRD for UFSHCI v2.1
      drivers/scsi/ufs/ufshcd.c
  * USB: core: only clean up what we allocated
      drivers/usb/core/config.c
  * lib/int_sqrt: optimize small argument
      lib/int_sqrt.c
    serial: sprd: clear timeout interrupt only rather than all interrupts
  * arm64: traps: disable irq in die()
      arch/arm64/kernel/traps.c
  * Hang/soft lockup in d_invalidate with simultaneous calls
      fs/dcache.c
    serial: sprd: adjust TIMEOUT to a big value
  * tcp/dccp: drop SYN packets if accept queue is full
      include/net/inet_connection_sock.h
      net/ipv4/tcp_input.c
    ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec
    ALSA: hda - Record the current power state before suspend/resume calls
    locking/lockdep: Add debug_locks check in __lock_downgrade()
  * Bluetooth: Fix decrementing reference count twice in releasing socket
      net/bluetooth/hci_sock.c
  * media: v4l2-ctrls.c/uvc: zero v4l2_event
      drivers/media/v4l2-core/v4l2-ctrls.c
  * ext4: brelse all indirect buffer in ext4_ind_remove_space()
      fs/ext4/indirect.c
  * ext4: fix data corruption caused by unaligned direct AIO
      fs/ext4/file.c
  * ext4: fix NULL pointer dereference while journal is aborted
      fs/ext4/ext4_jbd2.h
    objtool: Move objtool_file struct off the stack
  * futex: Ensure that futex address is aligned in handle_futex_death()
      kernel/futex.c
    MIPS: Fix kernel crash for R6 in jump label branch function
    MIPS: Ensure ELF appended dtb is relocated
    mips: loongson64: lemote-2f: Add IRQF_NO_SUSPEND to "cascade" irqaction.
    udf: Fix crash on IO error during truncate
    libceph: wait for latest osdmap in ceph_monc_blacklist_add()
    iommu/amd: fix sg->dma_address for sg->offset bigger than PAGE_SIZE
    drm/vmwgfx: Don't double-free the mode stored in par->set_mode
    mmc: pxamci: fix enum type confusion

Change-Id: I240c51a5bde3c2c7a9ada58c87d5d0966f26cb78
Signed-off-by: Robin Peng <robinpeng@google.com>
2019-07-02 15:35:29 +08:00
Greg Kroah-Hartman
589d747662 Merge 4.9.172 into android-4.9-q
Changes in 4.9.172
	kbuild: simplify ld-option implementation
	cifs: do not attempt cifs operation on smb2+ rename error
	tracing: Fix a memory leak by early error exit in trace_pid_write()
	MIPS: scall64-o32: Fix indirect syscall number load
	trace: Fix preempt_enable_no_resched() abuse
	IB/rdmavt: Fix frwr memory registration
	sched/numa: Fix a possible divide-by-zero
	ceph: ensure d_name stability in ceph_dentry_hash()
	ceph: fix ci->i_head_snapc leak
	nfsd: Don't release the callback slot unless it was actually held
	sunrpc: don't mark uninitialised items as VALID.
	Input: synaptics-rmi4 - write config register values to the right offset
	dmaengine: sh: rcar-dmac: With cyclic DMA residue 0 is valid
	ARM: 8857/1: efi: enable CP15 DMB instructions before cleaning the cache
	drm/vc4: Fix memory leak during gpu reset.
	drm/vc4: Fix compilation error reported by kbuild test bot
	USB: Add new USB LPM helpers
	USB: Consolidate LPM checks to avoid enabling LPM twice
	vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock
	tipc: handle the err returned from cmd header function
	slip: make slhc_free() silently accept an error pointer
	intel_th: gth: Fix an off-by-one in output unassigning
	fs/proc/proc_sysctl.c: Fix a NULL pointer dereference
	NFS: Forbid setting AF_INET6 to "struct sockaddr_in"->sin_family.
	netfilter: ebtables: CONFIG_COMPAT: drop a bogus WARN_ON
	fm10k: Fix a potential NULL pointer dereference
	tipc: check bearer name with right length in tipc_nl_compat_bearer_enable
	tipc: check link name with right length in tipc_nl_compat_link_set
	Revert "block/loop: Use global lock for ioctl() operation."
	ipv4: add sanity checks in ipv4_link_failure()
	mlxsw: spectrum: Fix autoneg status in ethtool
	net/mlx5e: ethtool, Remove unsupported SFP EEPROM high pages query
	net: rds: exchange of 8K and 1M pool
	team: fix possible recursive locking when add slaves
	net: stmmac: move stmmac_check_ether_addr() to driver probe
	ipv4: set the tcp_min_rtt_wlen range from 0 to one day
	ipv6: frags: fix a lockdep false positive
	net: IP defrag: encapsulate rbtree defrag code into callable functions
	ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module
	net: IP6 defrag: use rbtrees for IPv6 defrag
	net: IP6 defrag: use rbtrees in nf_conntrack_reasm.c
	powerpc/fsl: Add FSL_PPC_BOOK3E as supported arch for nospectre_v2 boot arg
	Documentation: Add nospectre_v1 parameter
	Linux 4.9.172

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2019-05-02 09:55:08 +02:00
Greg Kroah-Hartman
2dbf78bcd8 Merge 4.9.172 into android-4.9
Changes in 4.9.172
	kbuild: simplify ld-option implementation
	cifs: do not attempt cifs operation on smb2+ rename error
	tracing: Fix a memory leak by early error exit in trace_pid_write()
	MIPS: scall64-o32: Fix indirect syscall number load
	trace: Fix preempt_enable_no_resched() abuse
	IB/rdmavt: Fix frwr memory registration
	sched/numa: Fix a possible divide-by-zero
	ceph: ensure d_name stability in ceph_dentry_hash()
	ceph: fix ci->i_head_snapc leak
	nfsd: Don't release the callback slot unless it was actually held
	sunrpc: don't mark uninitialised items as VALID.
	Input: synaptics-rmi4 - write config register values to the right offset
	dmaengine: sh: rcar-dmac: With cyclic DMA residue 0 is valid
	ARM: 8857/1: efi: enable CP15 DMB instructions before cleaning the cache
	drm/vc4: Fix memory leak during gpu reset.
	drm/vc4: Fix compilation error reported by kbuild test bot
	USB: Add new USB LPM helpers
	USB: Consolidate LPM checks to avoid enabling LPM twice
	vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock
	tipc: handle the err returned from cmd header function
	slip: make slhc_free() silently accept an error pointer
	intel_th: gth: Fix an off-by-one in output unassigning
	fs/proc/proc_sysctl.c: Fix a NULL pointer dereference
	NFS: Forbid setting AF_INET6 to "struct sockaddr_in"->sin_family.
	netfilter: ebtables: CONFIG_COMPAT: drop a bogus WARN_ON
	fm10k: Fix a potential NULL pointer dereference
	tipc: check bearer name with right length in tipc_nl_compat_bearer_enable
	tipc: check link name with right length in tipc_nl_compat_link_set
	Revert "block/loop: Use global lock for ioctl() operation."
	ipv4: add sanity checks in ipv4_link_failure()
	mlxsw: spectrum: Fix autoneg status in ethtool
	net/mlx5e: ethtool, Remove unsupported SFP EEPROM high pages query
	net: rds: exchange of 8K and 1M pool
	team: fix possible recursive locking when add slaves
	net: stmmac: move stmmac_check_ether_addr() to driver probe
	ipv4: set the tcp_min_rtt_wlen range from 0 to one day
	ipv6: frags: fix a lockdep false positive
	net: IP defrag: encapsulate rbtree defrag code into callable functions
	ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module
	net: IP6 defrag: use rbtrees for IPv6 defrag
	net: IP6 defrag: use rbtrees in nf_conntrack_reasm.c
	powerpc/fsl: Add FSL_PPC_BOOK3E as supported arch for nospectre_v2 boot arg
	Documentation: Add nospectre_v1 parameter
	Linux 4.9.172

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2019-05-02 09:51:05 +02:00
Masahiro Yamada
a4ccc9e5ad kbuild: simplify ld-option implementation
commit 0294e6f4a0006856e1f36b8cd8fa088d9e499e98 upstream.

Currently, linker options are tested by the coordination of $(CC) and
$(LD) because $(LD) needs some object to link.

As commit 86a9df597cdd ("kbuild: fix linker feature test macros when
cross compiling with Clang") addressed, we need to make sure $(CC)
and $(LD) agree the underlying architecture of the passed object.

This could be a bit complex when we combine tools from different groups.
For example, we can use clang for $(CC), but we still need to rely on
GCC toolchain for $(LD).

So, I was searching for a way of standalone testing of linker options.
A trick I found is to use '-v'; this not only prints the version string,
but also tests if the given option is recognized.

If a given option is supported,

  $ aarch64-linux-gnu-ld -v --fix-cortex-a53-843419
  GNU ld (Linaro_Binutils-2017.11) 2.28.2.20170706
  $ echo $?
  0

If unsupported,

  $ aarch64-linux-gnu-ld -v --fix-cortex-a53-843419
  GNU ld (crosstool-NG linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC 2013.04) 2.23.1
  aarch64-linux-gnu-ld: unrecognized option '--fix-cortex-a53-843419'
  aarch64-linux-gnu-ld: use the --help option for usage information
  $ echo $?
  1

Gold works likewise.

  $ aarch64-linux-gnu-ld.gold -v --fix-cortex-a53-843419
  GNU gold (Linaro_Binutils-2017.11 2.28.2.20170706) 1.14
  masahiro@pug:~/ref/linux$ echo $?
  0
  $ aarch64-linux-gnu-ld.gold -v --fix-cortex-a53-999999
  GNU gold (Linaro_Binutils-2017.11 2.28.2.20170706) 1.14
  aarch64-linux-gnu-ld.gold: --fix-cortex-a53-999999: unknown option
  aarch64-linux-gnu-ld.gold: use the --help option for usage information
  $ echo $?
  1

LLD too.

  $ ld.lld -v --gc-sections
  LLD 7.0.0 (http://llvm.org/git/lld.git 4a0e4190e74cea19f8a8dc625ccaebdf8b5d1585) (compatible with GNU linkers)
  $ echo $?
  0
  $ ld.lld -v --fix-cortex-a53-843419
  LLD 7.0.0 (http://llvm.org/git/lld.git 4a0e4190e74cea19f8a8dc625ccaebdf8b5d1585) (compatible with GNU linkers)
  $ echo $?
  0
  $ ld.lld -v --fix-cortex-a53-999999
  ld.lld: error: unknown argument: --fix-cortex-a53-999999
  LLD 7.0.0 (http://llvm.org/git/lld.git 4a0e4190e74cea19f8a8dc625ccaebdf8b5d1585) (compatible with GNU linkers)
  $ echo $?
  1

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
[nc: try-run-cached was added later, just use try-run, which is the
     current mainline state]
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02 09:31:59 +02:00
Petri Gynther
5f697842fe Merge 4.9.147 into android-msm-bluecross-4.9-lts
Linux 4.9.147
    rtc: snvs: Add timeouts to avoid kernel lockups
    rtc: snvs: add a missing write sync
    nvmet-rdma: fix response use after free
    i2c: scmi: Fix probe error on devices with an empty SMB0001 ACPI device node
    i2c: axxia: properly handle master timeout
    vhost/vsock: fix reset orphans race with close timeout
  * cifs: In Kconfig CONFIG_CIFS_POSIX needs depends on legacy (insecure cifs)
      fs/cifs/Kconfig
    drm/ast: Fix connector leak during driver unload
    ethernet: fman: fix wrong of_node_put() in probe function
    ARM: 8815/1: V7M: align v7m_dma_inv_range() with v7 counterpart
    ARM: 8814/1: mm: improve/fix ARM v7_dma_inv_range() unaligned address handling
  * bpf: check pending signals while verifying programs
      kernel/bpf/verifier.c
  * net/mlx4_en: Fix build break when CONFIG_INET is off
      drivers/net/ethernet/mellanox/mlx4/Kconfig
    mv88e6060: disable hardware level MAC learning
    libata: whitelist all SAMSUNG MZ7KM* solid-state disks
    Input: omap-keypad - fix keyboard debounce configuration
    clk: mmp: Off by one in mmp_clk_add()
    clk: mvebu: Off by one bugs in cp110_of_clk_get()
    ide: pmac: add of_node_put()
    drivers/tty: add missing of_node_put()
    drivers/sbus/char: add of_node_put()
    sbus: char: add of_node_put()
    SUNRPC: Fix a potential race in xprt_connect()
    nfs: don't dirty kernel pages read by direct-io
  * bonding: fix 802.3ad state sent to partner when unbinding slave
      drivers/net/bonding/bond_3ad.c
    ARC: io.h: Implement reads{x}()/writes{x}()
  * drm/msm: Grab a vblank reference when waiting for commit_done
      drivers/gpu/drm/msm/msm_atomic.c
    x86/earlyprintk/efi: Fix infinite loop on some screen widths
    scsi: vmw_pscsi: Rearrange code to avoid multiple calls to free_irq during unload
    scsi: libiscsi: Fix NULL pointer dereference in iscsi_eh_session_reset
    mac80211_hwsim: fix module init error paths for netlink
    locking/qspinlock: Fix build for anonymous union in older GCC compilers
    locking/qspinlock, x86: Provide liveness guarantee
    locking/qspinlock/x86: Increase _Q_PENDING_LOOPS upper bound
    locking/qspinlock: Re-order code
    locking/qspinlock: Kill cmpxchg() loop when claiming lock from head of queue
    locking/qspinlock: Remove duplicate clear_pending() function from PV code
    locking/qspinlock: Remove unbounded cmpxchg() loop from locking slowpath
    locking/qspinlock: Merge 'struct __qspinlock' into 'struct qspinlock'
    locking/qspinlock: Bound spinning on pending->locked transition in slowpath
    locking/qspinlock: Ensure node is initialised before updating prev->next
    locking: Remove smp_read_barrier_depends() from queued_spin_lock_slowpath()
    IB/hfi1: Remove race conditions in user_sdma send path
    mac80211: Fix condition validating WMM IE
    mac80211: don't WARN on bad WMM parameters from buggy APs
    drm/i915/execlists: Apply a full mb before execution for Braswell
    Revert "drm/rockchip: Allow driver to be shutdown on reboot/kexec"
    powerpc/msi: Fix NULL pointer access in teardown code
    tracing: Fix memory leak of instance function hash filters
  * tracing: Fix memory leak in set_trigger_filter()
      kernel/trace/trace_events_trigger.c
    ARM: mmp/mmp2: fix cpu_is_mmp2() on mmp2-dt
    MMC: OMAP: fix broken MMC on OMAP15XX/OMAP5910/OMAP310
  * aio: fix spectre gadget in lookup_ioctx
      fs/aio.c
    pinctrl: sunxi: a83t: Fix IRQ offset typo for PH11
  * timer/debug: Change /proc/timer_list from 0444 to 0400
      kernel/time/timer_list.c
    lib/interval_tree_test.c: allow users to limit scope of endpoint
    lib/rbtree-test: lower default params
    lib/rbtree_test.c: make input module parameters
    lib/interval_tree_test.c: allow full tree search
    lib/interval_tree_test.c: make test options module parameters
  * signal: Introduce COMPAT_SIGMINSTKSZ for use in compat_sys_sigaltstack
      include/linux/compat.h
      kernel/signal.c
Linux 4.9.146
    staging: speakup: Replace strncpy with memcpy
  * pstore: Convert console write to use ->write_buf
      fs/pstore/platform.c
    ocfs2: fix potential use after free
    debugobjects: avoid recursive calls with kmemleak
    hfsplus: do not free node before using
    hfs: do not free node before using
    ocfs2: fix deadlock caused by ocfs2_defrag_extent()
    fscache, cachefiles: remove redundant variable 'cache'
    fscache: fix race between enablement and dropping of object
    xen: xlate_mmu: add missing header to fix 'W=1' warning
    drm/ast: fixed reading monitor EDID not stable issue
    net: hisilicon: remove unexpected free_netdev
    ixgbe: recognize 1000BaseLX SFP modules as 1Gbps
    igb: fix uninitialized variables
    cachefiles: Fix page leak in cachefiles_read_backing_file while vmscan is active
    net: thunderx: fix NULL pointer dereference in nic_remove
    x86/kvm/vmx: fix old-style function declaration
    KVM: x86: fix empty-body warnings
    USB: omap_udc: fix USB gadget functionality on Palm Tungsten E
    USB: omap_udc: fix omap_udc_start() on 15xx machines
    USB: omap_udc: fix crashes on probe error and module removal
    USB: omap_udc: use devm_request_irq()
    ipvs: call ip_vs_dst_notifier earlier than ipv6_dev_notf
  * bpf: fix check of allowed specifiers in bpf_trace_printk
      kernel/trace/bpf_trace.c
    exportfs: do not read dentry after free
    ASoC: omap-dmic: Add pm_qos handling to avoid overruns with CPU_IDLE
    ASoC: omap-mcpdm: Add pm_qos handling to avoid under/overruns with CPU_IDLE
    RDMA/mlx5: Fix fence type for IB_WR_LOCAL_INV WR
    Btrfs: send, fix infinite loop due to directory rename dependencies
    objtool: Fix segfault in .cold detection with -ffunction-sections
    objtool: Fix double-free in .cold detection error path
    hwmon: (w83795) temp4_type has writable permission
  * ASoC: dapm: Recalculate audio map forcely when card instantiated
      sound/soc/soc-core.c
    ASoC: omap-abe-twl6040: Fix missing audio card caused by deferred probing
    hwmon: (ina2xx) Fix current value calculation
    s390/cpum_cf: Reject request for sampling in event initialization
    selftests: add script to stress-test nft packet path vs. control plane
    sysv: return 'err' instead of 0 in __sysv_write_inode
    ARM: OMAP1: ams-delta: Fix possible use of uninitialized field
    ARM: dts: logicpd-somlv: Fix interrupt on mmc3_dat1
    ARM: OMAP2+: prm44xx: Fix section annotation on omap44xx_prm_enable_io_wakeup
  * neighbour: Avoid writing before skb->head in neigh_hh_output()
      include/net/neighbour.h
  * tun: forbid iface creation with rtnl ops
      drivers/net/tun.c
  * tcp: fix NULL ref in tail loss probe
      net/ipv4/tcp_output.c
  * rtnetlink: ndo_dflt_fdb_dump() only work for ARPHRD_ETHER devices
      net/core/rtnetlink.c
    net: Prevent invalid access to skb->prev in __qdisc_drop_all
  * net: phy: don't allow __set_phy_supported to add unsupported modes
      drivers/net/phy/phy_device.c
    net/mlx4_core: Correctly set PFC param if global pause is turned off.
    net: 8139cp: fix a BUG triggered by changing mtu with network traffic
  * ipv6: Check available headroom in ip6_xmit() even without options
      net/ipv6/ip6_output.c
Linux 4.9.145
  * kbuild: allow to use GCC toolchain not in Clang search path
      Makefile
  * kbuild: fix linker feature test macros when cross compiling with Clang
      scripts/Kbuild.include
    mac80211: ignore NullFunc frames in the duplicate detection
    mac80211: fix reordering of buffered broadcast packets
    mac80211: ignore tx status for PS stations in ieee80211_tx_status_ext
    mac80211: Clear beacon_int in ieee80211_do_stop
    mac80211_hwsim: Timer should be initialized before device registered
    kgdboc: fix KASAN global-out-of-bounds bug in param_set_kgdboc_var()
  * tty: do not set TTY_IO_ERROR flag if console port
      drivers/tty/tty_port.c
    tty: serial: 8250_mtk: always resume the device in probe.
    staging: rtl8712: Fix possible buffer overrun
    cifs: Fix separator when building path from dentry
    Staging: lustre: remove two build warnings
    vhost/vsock: fix use-after-free in network stack callers
    vsock: lookup and setup guest_cid inside vhost_vsock_lock
  * swiotlb: clean up reporting
      lib/swiotlb.c
    sr: pass down correctly sized SCSI sense buffer
  * xhci: Prevent U1/U2 link pm states if exit latency is too long
      drivers/usb/host/xhci.c
    dmaengine: cppi41: delete channel from pending list when stop channel
    SUNRPC: Fix leak of krb5p encode pages
    virtio/s390: fix race in ccw_io_helper()
    virtio/s390: avoid race on vcdev->config
    ALSA: hda/realtek - Fix speaker output regression on Thinkpad T570
  * ALSA: pcm: Fix interval evaluation with openmin/max
      include/sound/pcm_params.h
  * ALSA: pcm: Call snd_pcm_unlink() conditionally at closing
      sound/core/pcm_native.c
  * ALSA: pcm: Fix starvation on down_write_nonblock()
      sound/core/pcm_native.c
    ALSA: hda: Add support for AMD Stoney Ridge
  * ALSA: usb-audio: Fix UAF decrement if card has no live interfaces in card.c
      sound/usb/card.c
  * USB: check usb_get_extra_descriptor for proper size
      drivers/usb/core/hub.c
      drivers/usb/core/usb.c
      include/linux/usb.h
    usb: appledisplay: Add 27" Apple Cinema Display
  * usb: quirk: add no-LPM quirk on SanDisk Ultra Flair device
      drivers/usb/core/quirks.c
    ARC: [zebu] Remove CONFIG_INITRAMFS_SOURCE from defconfigs
  * mm: don't warn about allocations which stall for too long
      mm/page_alloc.c
    net: amd: add missing of_node_put()
    team: no need to do team_notify_peers or team_mcast_rejoin when disabling port
    iommu/vt-d: Use memunmap to free memremap
    net: faraday: ftmac100: remove netif_running(netdev) check before disabling interrupts
    mtd: rawnand: qcom: Namespace prefix some commands
    net/mlx4: Fix UBSAN warning of signed integer overflow
    net/mlx4_core: Fix uninitialized variable compilation warning
    net/mlx4_core: Zero out lkey field in SW2HW_MPT fw command
    qed: Fix reading wrong value in loop condition
    qed: Fix PTT leak in qed_drain()
    bnx2x: Assign unique DMAE channel number for FW DMAE transactions.
    batman-adv: Expand merged fragment buffer for full packet
  * HID: input: Ignore battery reported by Symbol DS4308
      drivers/hid/hid-ids.h
      drivers/hid/hid-input.c
    can: rcar_can: Fix erroneous registration
    iommu/ipmmu-vmsa: Fix crash on early domain free
    brcmutil: really fix decoding channel info for 160 MHz bandwidth
    iommu/vt-d: Fix NULL pointer dereference in prq_event_thread()
    media: omap3isp: Unregister media device as first

Change-Id: Iec0365daf841b32455bdf0369a6947b2989f3d80
Signed-off-by: Petri Gynther <pgynther@google.com>
2018-12-26 20:53:09 -08:00
Petri Gynther
94b4e7a080 Merge 4.9.129 into android-msm-bluecross-4.9-lts
Linux 4.9.129
    e1000e: Fix link check race condition
    Revert "e1000e: Separate signaling for link check/link up"
    e1000e: Avoid missed interrupts following ICR read
    e1000e: Fix queue interrupt re-raising in Other interrupt
    Partial revert "e1000e: Avoid receiver overrun interrupt bursts"
    e1000e: Remove Other from EIAC
    MIPS: VDSO: Match data page cache colouring when D$ aliases
    mei: bus: type promotion bug in mei_nfc_if_version()
  * pinctrl: qcom: spmi-gpio: Fix pmic_gpio_config_get() to be compliant
      drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
    drm/panel: type promotion bug in s6e8aa0_read_mtp_id()
    selftest: timers: Tweak raw_skew to SKIP when ADJ_OFFSET/other clock adjustments are in progress
  * ALSA: pcm: Fix snd_interval_refine first/last with open min/max
      sound/core/pcm_lib.c
    rtc: bq4802: add error handling for devm_ioremap
    drm/amdkfd: Fix error codes in kfd_get_process
    input: rohm_bu21023: switch to i2c_lock_bus(..., I2C_LOCK_SEGMENT)
    mfd: 88pm860x-i2c: switch to i2c_lock_bus(..., I2C_LOCK_SEGMENT)
  * gpiolib: Mark gpio_suffixes array with __maybe_unused
      drivers/gpio/gpiolib.h
    gpio: pxa: Fix potential NULL dereference
    coresight: tpiu: Fix disabling timeouts
    coresight: Handle errors in finding input/output ports
    parport: sunbpp: fix error return code
    drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping
    mmc: sdhci: do not try to use 3.3V signaling if not supported
    mmc: tegra: prevent HS200 on Tegra 3
    gpu: ipu-v3: csi: pass back mbus_code_to_bus_cfg error codes
    ARM: hisi: check of_iomap and fix missing of_node_put
    ARM: hisi: fix error handling and missing of_node_put
    ARM: hisi: handle of_iomap and fix missing of_node_put
    efi/esrt: Only call efi_mem_reserve() for boot services memory
  * configfs: fix registered group removal
      fs/configfs/dir.c
    MIPS: loongson64: cs5536: Fix PCI_OHCI_INT_REG reads
  * evm: Don't deadlock if a crypto algorithm is unavailable
      crypto/api.c
      include/linux/crypto.h
    mtdchar: fix overflows in adjustment of `count`
    audit: fix use-after-free in audit_add_watch
  * binfmt_elf: Respect error return from `regset->active'
      fs/binfmt_elf.c
    NFSv4.1 fix infinite loop on I/O.
  * perf/core: Force USER_DS when recording user stack data
      kernel/events/core.c
    CIFS: fix wrapping bugs in num_entries()
    cifs: prevent integer overflow in nxt_dir_entry()
    Revert "cdc-acm: implement put_char() and flush_chars()"
    usb: cdc-wdm: Fix a sleep-in-atomic-context bug in service_outstanding_interrupt()
    USB: yurex: Fix buffer over-read in yurex_write()
    USB: serial: ti_usb_3410_5052: fix array underflow in completion handler
    usb: misc: uss720: Fix two sleep-in-atomic-context bugs
    USB: serial: io_ti: fix array underflow in completion handler
    USB: net2280: Fix erroneous synchronization change
    usb: gadget: udc: renesas_usb3: fix maxpacket size of ep0
  * USB: add quirk for WORLDE Controller KS49 or Prodipe MIDI 49C USB controller
      drivers/usb/core/quirks.c
    usb: host: u132-hcd: Fix a sleep-in-atomic-context bug in u132_get_frame()
  * usb: Avoid use-after-free by flushing endpoints early in usb_set_interface()
      drivers/usb/core/message.c
    usb: uas: add support for more quirk flags
  * USB: Add quirk to support DJI CineSSD
      drivers/usb/core/quirks.c
      drivers/usb/storage/scsiglue.c
      drivers/usb/storage/unusual_devs.h
    mei: ignore not found client in the enumeration
  * usb: Don't die twice if PCI xhci host is not responding in resume
      drivers/usb/core/hcd-pci.c
    misc: hmc6352: fix potential Spectre v1
    Tools: hv: Fix a bug in the key delete code
    mmc: omap_hsmmc: fix wakeirq handling on removal
    IB/ipoib: Avoid a race condition between start_xmit and cm_rep_handler
    xen/netfront: fix waiting for xenbus state change
  * pstore: Fix incorrect persistent ram buffer mapping
      fs/pstore/ram_core.c
    RDMA/cma: Protect cma dev list with lock
    xen-netfront: fix warn message as irq device name has '/'
    crypto: sharah - Unregister correct algorithms for SAHARA 3
    dmaengine: mv_xor_v2: kill the tasklets upon exit
  * drivers/base: stop new probing during shutdown
      drivers/base/core.c
    KVM: arm/arm64: Fix vgic init race
    platform/x86: toshiba_acpi: Fix defined but not used build warnings
    s390/qeth: reset layer2 attribute on layer switch
    s390/qeth: fix race in used-buffer accounting
    ARM: dts: qcom: msm8974-hammerhead: increase load on l20 for sdhci
    arm64: dts: qcom: db410c: Fix Bluetooth LED trigger
    xen-netfront: fix queue name setting
    nfp: avoid buffer leak when FW communication fails
    efi/arm: preserve early mapping of UEFI memory map longer for BGRT
    wan/fsl_ucc_hdlc: use IS_ERR_VALUE() to check return value of qe_muram_alloc
  * Smack: Fix handling of IPv4 traffic received by PF_INET6 sockets
      security/smack/smack_lsm.c
    mac80211: restrict delayed tailroom needed decrement
    MIPS: jz4740: Bump zload address
    powerpc/powernv: opal_put_chars partial write fix
    perf powerpc: Fix callchain ip filtering
    ARM: exynos: Clear global variable on init error path
  * fbdev: Distinguish between interlaced and progressive modes
      drivers/video/fbdev/core/modedb.c
    video: fbdev: pxafb: clear allocated memory for video modes
    perf powerpc: Fix callchain ip filtering when return address is in a register
    fbdev/via: fix defined but not used warning
    video: goldfishfb: fix memory leak on driver remove
    fbdev: omapfb: off by one in omapfb_register_client()
    gfs2: Don't reject a supposedly full bitmap if we have blocks reserved
    perf test: Fix subtest number when showing results
    mtd/maps: fix solutionengine.c printk format warnings
    IB/rxe: Drop QP0 silently
  * media: videobuf2-core: check for q->error in vb2_core_qbuf()
      drivers/media/v4l2-core/videobuf2-core.c
    MIPS: ath79: fix system restart
    dmaengine: pl330: fix irq race with terminate_all
    media: tw686x: Fix oops on buffer alloc failure
  * kbuild: add .DELETE_ON_ERROR special target
      scripts/Kbuild.include
  * clk: clk-fixed-factor: Clear OF_POPULATED flag in case of failure
      drivers/clk/clk-fixed-factor.c
    clk: imx6ul: fix missing of_node_put()
    gfs2: Special-case rindex for gfs2_grow
  * xfrm: fix 'passing zero to ERR_PTR()' warning
      net/xfrm/xfrm_policy.c
  * ALSA: usb-audio: Fix multiple definitions in AU0828_DEVICE() macro
      sound/usb/quirks-table.h
    ALSA: msnd: Fix the default sample sizes
    iommu/arm-smmu-v3: sync the OVACKFLG to PRIQ consumer register
    net/mlx5: Fix debugfs cleanup in the device init/remove flow
    net/mlx5: Fix use-after-free in self-healing flow
    rds: fix two RCU related problems
    be2net: Fix memory leak in be_cmd_get_profile_config()

Change-Id: Iad9438d65947cd9d67938d3109f07bb15f17ef12
Signed-off-by: Petri Gynther <pgynther@google.com>
2018-12-18 20:49:12 -08:00
Greg Kroah-Hartman
6328e6475a Merge 4.9.145 into android-4.9
Changes in 4.9.145
	media: omap3isp: Unregister media device as first
	iommu/vt-d: Fix NULL pointer dereference in prq_event_thread()
	brcmutil: really fix decoding channel info for 160 MHz bandwidth
	iommu/ipmmu-vmsa: Fix crash on early domain free
	can: rcar_can: Fix erroneous registration
	HID: input: Ignore battery reported by Symbol DS4308
	batman-adv: Expand merged fragment buffer for full packet
	bnx2x: Assign unique DMAE channel number for FW DMAE transactions.
	qed: Fix PTT leak in qed_drain()
	qed: Fix reading wrong value in loop condition
	net/mlx4_core: Zero out lkey field in SW2HW_MPT fw command
	net/mlx4_core: Fix uninitialized variable compilation warning
	net/mlx4: Fix UBSAN warning of signed integer overflow
	mtd: rawnand: qcom: Namespace prefix some commands
	net: faraday: ftmac100: remove netif_running(netdev) check before disabling interrupts
	iommu/vt-d: Use memunmap to free memremap
	team: no need to do team_notify_peers or team_mcast_rejoin when disabling port
	net: amd: add missing of_node_put()
	mm: don't warn about allocations which stall for too long
	ARC: [zebu] Remove CONFIG_INITRAMFS_SOURCE from defconfigs
	usb: quirk: add no-LPM quirk on SanDisk Ultra Flair device
	usb: appledisplay: Add 27" Apple Cinema Display
	USB: check usb_get_extra_descriptor for proper size
	ALSA: usb-audio: Fix UAF decrement if card has no live interfaces in card.c
	ALSA: hda: Add support for AMD Stoney Ridge
	ALSA: pcm: Fix starvation on down_write_nonblock()
	ALSA: pcm: Call snd_pcm_unlink() conditionally at closing
	ALSA: pcm: Fix interval evaluation with openmin/max
	ALSA: hda/realtek - Fix speaker output regression on Thinkpad T570
	virtio/s390: avoid race on vcdev->config
	virtio/s390: fix race in ccw_io_helper()
	SUNRPC: Fix leak of krb5p encode pages
	dmaengine: cppi41: delete channel from pending list when stop channel
	xhci: Prevent U1/U2 link pm states if exit latency is too long
	sr: pass down correctly sized SCSI sense buffer
	swiotlb: clean up reporting
	vsock: lookup and setup guest_cid inside vhost_vsock_lock
	vhost/vsock: fix use-after-free in network stack callers
	Staging: lustre: remove two build warnings
	cifs: Fix separator when building path from dentry
	staging: rtl8712: Fix possible buffer overrun
	tty: serial: 8250_mtk: always resume the device in probe.
	tty: do not set TTY_IO_ERROR flag if console port
	kgdboc: fix KASAN global-out-of-bounds bug in param_set_kgdboc_var()
	mac80211_hwsim: Timer should be initialized before device registered
	mac80211: Clear beacon_int in ieee80211_do_stop
	mac80211: ignore tx status for PS stations in ieee80211_tx_status_ext
	mac80211: fix reordering of buffered broadcast packets
	mac80211: ignore NullFunc frames in the duplicate detection
	kbuild: fix linker feature test macros when cross compiling with Clang
	kbuild: allow to use GCC toolchain not in Clang search path
	Linux 4.9.145

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-12-13 09:39:24 +01:00
Nick Desaulniers
51d137cab5 kbuild: fix linker feature test macros when cross compiling with Clang
(commit 86a9df597cdd564d2d29c65897bcad42519e3678 upstream)

I was not seeing my linker flags getting added when using ld-option when
cross compiling with Clang. Upon investigation, this seems to be due to
a difference in how GCC vs Clang handle cross compilation.

GCC is configured at build time to support one backend, that is implicit
when compiling.  Clang is explicit via the use of `-target <triple>` and
ships with all supported backends by default.

GNU Make feature test macros that compile then link will always fail
when cross compiling with Clang unless Clang's triple is passed along to
the compiler. For example:

$ clang -x c /dev/null -c -o temp.o
$ aarch64-linux-android/bin/ld -E temp.o
aarch64-linux-android/bin/ld:
unknown architecture of input file `temp.o' is incompatible with
aarch64 output
aarch64-linux-android/bin/ld:
warning: cannot find entry symbol _start; defaulting to
0000000000400078
$ echo $?
1

$ clang -target aarch64-linux-android- -x c /dev/null -c -o temp.o
$ aarch64-linux-android/bin/ld -E temp.o
aarch64-linux-android/bin/ld:
warning: cannot find entry symbol _start; defaulting to 00000000004002e4
$ echo $?
0

This causes conditional checks that invoke $(CC) without the target
triple, then $(LD) on the result, to always fail.

Suggested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[ND: readjusted for context]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-13 09:20:30 +01:00
Matthias Kaehlcke
0605d5ebde kbuild: Add __cc-option macro
commit 9f3f1fd299768782465cb32cdf0dd4528d11f26b upstream.

cc-option uses KBUILD_CFLAGS and KBUILD_CPPFLAGS when it determines
whether an option is supported or not. This is fine for options used to
build the kernel itself, however some components like the x86 boot code
use a different set of flags.

Add the new macro __cc-option which is a more generic version of
cc-option with additional parameters. One parameter is the compiler
with which the check should be performed, the other the compiler options
to be used instead KBUILD_C*FLAGS.

Refactor cc-option and hostcc-option to use __cc-option and move
hostcc-option to scripts/Kbuild.include.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Suggested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23 08:20:35 +01:00
Mark Charlebois
14635231f8 kbuild, LLVMLinux: Add -Werror to cc-option to support clang
commit c3f0d0bc5b01ad90c45276952802455750444b4f upstream.

Clang will warn about unknown warnings but will not return false
unless -Werror is set. GCC will return false if an unknown
warning is passed.

Adding -Werror make both compiler behave the same.

[arnd: it turns out we need the same patch for testing whether -ffunction-sections
       works right with gcc. I've build tested extensively with this patch
       applied, so let's just merge this one now.]

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Signed-off-by: Behan Webster <behanw@converseincode.com>
Reviewed-by: Jan-Simon Möller <dl9pf@gmx.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23 08:20:35 +01:00
Greg Kroah-Hartman
b727d1c1a6 Merge 4.9.129 into android-4.9
Changes in 4.9.129
	be2net: Fix memory leak in be_cmd_get_profile_config()
	rds: fix two RCU related problems
	net/mlx5: Fix use-after-free in self-healing flow
	net/mlx5: Fix debugfs cleanup in the device init/remove flow
	iommu/arm-smmu-v3: sync the OVACKFLG to PRIQ consumer register
	ALSA: msnd: Fix the default sample sizes
	ALSA: usb-audio: Fix multiple definitions in AU0828_DEVICE() macro
	xfrm: fix 'passing zero to ERR_PTR()' warning
	gfs2: Special-case rindex for gfs2_grow
	clk: imx6ul: fix missing of_node_put()
	clk: clk-fixed-factor: Clear OF_POPULATED flag in case of failure
	kbuild: add .DELETE_ON_ERROR special target
	media: tw686x: Fix oops on buffer alloc failure
	dmaengine: pl330: fix irq race with terminate_all
	MIPS: ath79: fix system restart
	media: videobuf2-core: check for q->error in vb2_core_qbuf()
	IB/rxe: Drop QP0 silently
	mtd/maps: fix solutionengine.c printk format warnings
	perf test: Fix subtest number when showing results
	gfs2: Don't reject a supposedly full bitmap if we have blocks reserved
	fbdev: omapfb: off by one in omapfb_register_client()
	video: goldfishfb: fix memory leak on driver remove
	fbdev/via: fix defined but not used warning
	perf powerpc: Fix callchain ip filtering when return address is in a register
	video: fbdev: pxafb: clear allocated memory for video modes
	fbdev: Distinguish between interlaced and progressive modes
	ARM: exynos: Clear global variable on init error path
	perf powerpc: Fix callchain ip filtering
	powerpc/powernv: opal_put_chars partial write fix
	MIPS: jz4740: Bump zload address
	mac80211: restrict delayed tailroom needed decrement
	Smack: Fix handling of IPv4 traffic received by PF_INET6 sockets
	wan/fsl_ucc_hdlc: use IS_ERR_VALUE() to check return value of qe_muram_alloc
	efi/arm: preserve early mapping of UEFI memory map longer for BGRT
	nfp: avoid buffer leak when FW communication fails
	xen-netfront: fix queue name setting
	arm64: dts: qcom: db410c: Fix Bluetooth LED trigger
	ARM: dts: qcom: msm8974-hammerhead: increase load on l20 for sdhci
	s390/qeth: fix race in used-buffer accounting
	s390/qeth: reset layer2 attribute on layer switch
	platform/x86: toshiba_acpi: Fix defined but not used build warnings
	KVM: arm/arm64: Fix vgic init race
	drivers/base: stop new probing during shutdown
	dmaengine: mv_xor_v2: kill the tasklets upon exit
	crypto: sharah - Unregister correct algorithms for SAHARA 3
	xen-netfront: fix warn message as irq device name has '/'
	RDMA/cma: Protect cma dev list with lock
	pstore: Fix incorrect persistent ram buffer mapping
	xen/netfront: fix waiting for xenbus state change
	IB/ipoib: Avoid a race condition between start_xmit and cm_rep_handler
	mmc: omap_hsmmc: fix wakeirq handling on removal
	Tools: hv: Fix a bug in the key delete code
	misc: hmc6352: fix potential Spectre v1
	usb: Don't die twice if PCI xhci host is not responding in resume
	mei: ignore not found client in the enumeration
	USB: Add quirk to support DJI CineSSD
	usb: uas: add support for more quirk flags
	usb: Avoid use-after-free by flushing endpoints early in usb_set_interface()
	usb: host: u132-hcd: Fix a sleep-in-atomic-context bug in u132_get_frame()
	USB: add quirk for WORLDE Controller KS49 or Prodipe MIDI 49C USB controller
	usb: gadget: udc: renesas_usb3: fix maxpacket size of ep0
	USB: net2280: Fix erroneous synchronization change
	USB: serial: io_ti: fix array underflow in completion handler
	usb: misc: uss720: Fix two sleep-in-atomic-context bugs
	USB: serial: ti_usb_3410_5052: fix array underflow in completion handler
	USB: yurex: Fix buffer over-read in yurex_write()
	usb: cdc-wdm: Fix a sleep-in-atomic-context bug in service_outstanding_interrupt()
	Revert "cdc-acm: implement put_char() and flush_chars()"
	cifs: prevent integer overflow in nxt_dir_entry()
	CIFS: fix wrapping bugs in num_entries()
	perf/core: Force USER_DS when recording user stack data
	NFSv4.1 fix infinite loop on I/O.
	binfmt_elf: Respect error return from `regset->active'
	audit: fix use-after-free in audit_add_watch
	mtdchar: fix overflows in adjustment of `count`
	evm: Don't deadlock if a crypto algorithm is unavailable
	MIPS: loongson64: cs5536: Fix PCI_OHCI_INT_REG reads
	configfs: fix registered group removal
	efi/esrt: Only call efi_mem_reserve() for boot services memory
	ARM: hisi: handle of_iomap and fix missing of_node_put
	ARM: hisi: fix error handling and missing of_node_put
	ARM: hisi: check of_iomap and fix missing of_node_put
	gpu: ipu-v3: csi: pass back mbus_code_to_bus_cfg error codes
	mmc: tegra: prevent HS200 on Tegra 3
	mmc: sdhci: do not try to use 3.3V signaling if not supported
	drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping
	parport: sunbpp: fix error return code
	coresight: Handle errors in finding input/output ports
	coresight: tpiu: Fix disabling timeouts
	gpio: pxa: Fix potential NULL dereference
	gpiolib: Mark gpio_suffixes array with __maybe_unused
	mfd: 88pm860x-i2c: switch to i2c_lock_bus(..., I2C_LOCK_SEGMENT)
	input: rohm_bu21023: switch to i2c_lock_bus(..., I2C_LOCK_SEGMENT)
	drm/amdkfd: Fix error codes in kfd_get_process
	rtc: bq4802: add error handling for devm_ioremap
	ALSA: pcm: Fix snd_interval_refine first/last with open min/max
	selftest: timers: Tweak raw_skew to SKIP when ADJ_OFFSET/other clock adjustments are in progress
	drm/panel: type promotion bug in s6e8aa0_read_mtp_id()
	pinctrl: qcom: spmi-gpio: Fix pmic_gpio_config_get() to be compliant
	mei: bus: type promotion bug in mei_nfc_if_version()
	MIPS: VDSO: Match data page cache colouring when D$ aliases
	e1000e: Remove Other from EIAC
	Partial revert "e1000e: Avoid receiver overrun interrupt bursts"
	e1000e: Fix queue interrupt re-raising in Other interrupt
	e1000e: Avoid missed interrupts following ICR read
	Revert "e1000e: Separate signaling for link check/link up"
	e1000e: Fix link check race condition
	Linux 4.9.129

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-09-26 08:44:01 +02:00
Masahiro Yamada
48a90a9e56 kbuild: add .DELETE_ON_ERROR special target
[ Upstream commit 9c2af1c7377a8a6ef86e5cabf80978f3dbbb25c0 ]

If Make gets a fatal signal while a shell is executing, it may delete
the target file that the recipe was supposed to update.  This is needed
to make sure that it is remade from scratch when Make is next run; if
Make is interrupted after the recipe has begun to write the target file,
it results in an incomplete file whose time stamp is newer than that
of the prerequisites files.  Make automatically deletes the incomplete
file on interrupt unless the target is marked .PRECIOUS.

The situation is just the same as when the shell fails for some reasons.
Usually when a recipe line fails, if it has changed the target file at
all, the file is corrupted, or at least it is not completely updated.
Yet the file’s time stamp says that it is now up to date, so the next
time Make runs, it will not try to update that file.

However, Make does not cater to delete the incomplete target file in
this case.  We need to add .DELETE_ON_ERROR somewhere in the Makefile
to request it.

scripts/Kbuild.include seems a suitable place to add it because it is
included from almost all sub-makes.

Please note .DELETE_ON_ERROR is not effective for phony targets.

The external module building should never ever touch the kernel tree.
The following recipe fails if include/generated/autoconf.h is missing.
However, include/config/auto.conf is not deleted since it is a phony
target.

 PHONY += include/config/auto.conf

 include/config/auto.conf:
         $(Q)test -e include/generated/autoconf.h -a -e $@ || (          \
         echo >&2;                                                       \
         echo >&2 "  ERROR: Kernel configuration is invalid.";           \
         echo >&2 "         include/generated/autoconf.h or $@ are missing.";\
         echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it."; \
         echo >&2 ;                                                      \
         /bin/false)

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-26 08:36:31 +02:00
Petri Gynther
b3cf948f91 Merge 4.9.112 into android-msm-bluecross-4.9-lts
Linux 4.9.112
    staging: comedi: quatech_daqp_cs: fix no-op loop daqp_ao_insn_write()
  * netfilter: nf_log: don't hold nf_log_mutex during user access
      net/netfilter/nf_log.c
    mtd: cfi_cmdset_0002: Change erase functions to check chip good only
    mtd: cfi_cmdset_0002: Change erase functions to retry for error
    mtd: cfi_cmdset_0002: Change definition naming to retry write operation
  * dm bufio: don't take the lock in dm_bufio_shrink_count
      drivers/md/dm-bufio.c
    mtd: rawnand: mxc: set spare area size register explicitly
  * dm bufio: drop the lock when doing GFP_NOIO allocation
      drivers/md/dm-bufio.c
  * dm bufio: avoid sleeping while holding the dm_bufio lock
      drivers/md/dm-bufio.c
  * mm, page_alloc: do not break __GFP_THISNODE by zonelist reset
      mm/page_alloc.c
    media: cx25840: Use subdev host data for PLL override
  * Kbuild: fix # escaping in .cmd files for future Make
      scripts/Kbuild.include
  * PM / OPP: Update voltage in case freq == old_freq
      drivers/base/power/opp/core.c
  * HID: debug: check length before copy_to_user()
      drivers/hid/hid-debug.c
    HID: hiddev: fix potential Spectre v1
    HID: i2c-hid: Fix "incomplete report" noise
    mlxsw: spectrum: Forbid linking of VLAN devices to devices that have uppers
  * ext4: check superblock mapped prior to committing
      fs/ext4/super.c
  * ext4: add more mount time checks of the superblock
      fs/ext4/super.c
  * ext4: add more inode number paranoia checks
      fs/ext4/ext4.h
      fs/ext4/inode.c
      fs/ext4/super.c
  * ext4: clear i_data in ext4_inode_info when removing inline data
      fs/ext4/inline.c
  * ext4: include the illegal physical block in the bad map ext4_error msg
      fs/ext4/inode.c
  * ext4: verify the depth of extent tree in ext4_find_extent()
      fs/ext4/ext4_extents.h
      fs/ext4/extents.c
  * ext4: only look at the bg_flags field if it is valid
      fs/ext4/balloc.c
      fs/ext4/ialloc.c
      fs/ext4/mballoc.c
      fs/ext4/super.c
  * ext4: always check block group bounds in ext4_init_block_bitmap()
      fs/ext4/balloc.c
  * ext4: make sure bitmaps and the inode table don't overlap with bg descriptors
      fs/ext4/super.c
  * jbd2: don't mark block as modified if the handle is out of credits
      fs/jbd2/transaction.c
    drm/udl: fix display corruption of the last line
    cifs: Fix infinite loop when using hard mount option
    drbd: fix access after free
    s390: Correct register corruption in critical section cleanup
  * scsi: sg: mitigate read/write abuse
      drivers/scsi/sg.c
    tracing: Fix missing return symbol in function_graph output
    mm: hugetlb: yield when prepping struct pages
    x86/cpu: Re-apply forced caps every time CPU caps are re-read
    x86/xen: Add call of speculative_store_bypass_ht_init() to PV paths
    IB/hfi1: Fix user context tail allocation for DMA_RTAIL
    ARM: dts: imx6q: Use correct SDMA script for SPI5 core
    net: phy: micrel: fix crash when statistic requested for KSZ9031 phy
  * Revert "sit: reload iphdr in ipip6_rcv"
      net/ipv6/sit.c
    netfilter: nf_tables: use WARN_ON_ONCE instead of BUG_ON in nft_do_chain()
    kprobes/x86: Do not modify singlestep buffer while resuming
  * ipv4: Fix error return value in fib_convert_metrics()
      net/ipv4/fib_semantics.c
    i2c: rcar: fix resume by always initializing registers before transfer
    vt: prevent leaking uninitialized data to userspace via /dev/vcs*
  * staging: android: ion: Return an ERR_PTR in ion_map_kernel
      drivers/staging/android/ion/ion_heap.c
  * n_tty: Access echo_* variables carefully.
      drivers/tty/n_tty.c
  * n_tty: Fix stall at n_tty_receive_char_special().
      drivers/tty/n_tty.c
    usb: dwc2: fix the incorrect bitmaps for the ports of multi_tt hub
    USB: serial: cp210x: add Silicon Labs IDs for Windows Update
    USB: serial: cp210x: add CESINEL device ids
    usb: cdc_acm: Add quirk for Uniden UBC125 scanner

Change-Id: I7dbc401b9c21bca70a38d8f07acc85ccf3cd6d6b
Signed-off-by: Petri Gynther <pgynther@google.com>
2018-09-19 11:37:14 -07:00
Greg Kroah-Hartman
9e79039544 Merge 4.9.112 into android-4.9
Changes in 4.9.112
	usb: cdc_acm: Add quirk for Uniden UBC125 scanner
	USB: serial: cp210x: add CESINEL device ids
	USB: serial: cp210x: add Silicon Labs IDs for Windows Update
	usb: dwc2: fix the incorrect bitmaps for the ports of multi_tt hub
	n_tty: Fix stall at n_tty_receive_char_special().
	n_tty: Access echo_* variables carefully.
	staging: android: ion: Return an ERR_PTR in ion_map_kernel
	vt: prevent leaking uninitialized data to userspace via /dev/vcs*
	i2c: rcar: fix resume by always initializing registers before transfer
	ipv4: Fix error return value in fib_convert_metrics()
	kprobes/x86: Do not modify singlestep buffer while resuming
	netfilter: nf_tables: use WARN_ON_ONCE instead of BUG_ON in nft_do_chain()
	Revert "sit: reload iphdr in ipip6_rcv"
	net: phy: micrel: fix crash when statistic requested for KSZ9031 phy
	ARM: dts: imx6q: Use correct SDMA script for SPI5 core
	IB/hfi1: Fix user context tail allocation for DMA_RTAIL
	x86/xen: Add call of speculative_store_bypass_ht_init() to PV paths
	x86/cpu: Re-apply forced caps every time CPU caps are re-read
	mm: hugetlb: yield when prepping struct pages
	tracing: Fix missing return symbol in function_graph output
	scsi: sg: mitigate read/write abuse
	s390: Correct register corruption in critical section cleanup
	drbd: fix access after free
	cifs: Fix infinite loop when using hard mount option
	drm/udl: fix display corruption of the last line
	jbd2: don't mark block as modified if the handle is out of credits
	ext4: make sure bitmaps and the inode table don't overlap with bg descriptors
	ext4: always check block group bounds in ext4_init_block_bitmap()
	ext4: only look at the bg_flags field if it is valid
	ext4: verify the depth of extent tree in ext4_find_extent()
	ext4: include the illegal physical block in the bad map ext4_error msg
	ext4: clear i_data in ext4_inode_info when removing inline data
	ext4: add more inode number paranoia checks
	ext4: add more mount time checks of the superblock
	ext4: check superblock mapped prior to committing
	mlxsw: spectrum: Forbid linking of VLAN devices to devices that have uppers
	HID: i2c-hid: Fix "incomplete report" noise
	HID: hiddev: fix potential Spectre v1
	HID: debug: check length before copy_to_user()
	PM / OPP: Update voltage in case freq == old_freq
	Kbuild: fix # escaping in .cmd files for future Make
	media: cx25840: Use subdev host data for PLL override
	mm, page_alloc: do not break __GFP_THISNODE by zonelist reset
	dm bufio: avoid sleeping while holding the dm_bufio lock
	dm bufio: drop the lock when doing GFP_NOIO allocation
	mtd: rawnand: mxc: set spare area size register explicitly
	dm bufio: don't take the lock in dm_bufio_shrink_count
	mtd: cfi_cmdset_0002: Change definition naming to retry write operation
	mtd: cfi_cmdset_0002: Change erase functions to retry for error
	mtd: cfi_cmdset_0002: Change erase functions to check chip good only
	netfilter: nf_log: don't hold nf_log_mutex during user access
	staging: comedi: quatech_daqp_cs: fix no-op loop daqp_ao_insn_write()
	Linux 4.9.112

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2018-07-11 16:40:16 +02:00
Rasmus Villemoes
b5d7d7d919 Kbuild: fix # escaping in .cmd files for future Make
commit 9564a8cf422d7b58f6e857e3546d346fa970191e upstream.

I tried building using a freshly built Make (4.2.1-69-g8a731d1), but
already the objtool build broke with

orc_dump.c: In function ‘orc_dump’:
orc_dump.c:106:2: error: ‘elf_getshnum’ is deprecated [-Werror=deprecated-declarations]
  if (elf_getshdrnum(elf, &nr_sections)) {

Turns out that with that new Make, the backslash was not removed, so cpp
didn't see a #include directive, grep found nothing, and
-DLIBELF_USE_DEPRECATED was wrongly put in CFLAGS.

Now, that new Make behaviour is documented in their NEWS file:

  * WARNING: Backward-incompatibility!
    Number signs (#) appearing inside a macro reference or function invocation
    no longer introduce comments and should not be escaped with backslashes:
    thus a call such as:
      foo := $(shell echo '#')
    is legal.  Previously the number sign needed to be escaped, for example:
      foo := $(shell echo '\#')
    Now this latter will resolve to "\#".  If you want to write makefiles
    portable to both versions, assign the number sign to a variable:
      C := \#
      foo := $(shell echo '$C')
    This was claimed to be fixed in 3.81, but wasn't, for some reason.
    To detect this change search for 'nocomment' in the .FEATURES variable.

This also fixes up the two make-cmd instances to replace # with $(pound)
rather than with \#. There might very well be other places that need
similar fixup in preparation for whatever future Make release contains
the above change, but at least this builds an x86_64 defconfig with the
new make.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=197847
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11 16:26:45 +02: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
Sami Tolvanen
9403b68067 FROMLIST: kbuild: add __ld-ifversion and linker-specific macros
Add macros for testing both linker name and version.

Bug: 62093296
Bug: 67506682
Change-Id: Icbb13e9bb889017cd4a7457a62dea7e0335c53b5
(am from https://patchwork.kernel.org/patch/10085789/)
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
2018-02-28 15:09:57 -08:00
Sami Tolvanen
552777bdc1 FROMLIST: kbuild: add ld-name macro
GNU gold may require different flags than GNU ld. Add a macro for
detecting the linker.

Bug: 62093296
Bug: 67506682
Change-Id: I777f14bf4fd902de1f8dc73d7ecc3c0403eae5f5
(am from https://patchwork.kernel.org/patch/10085775/)
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
2018-02-28 15:09:57 -08:00
Sami Tolvanen
4f9dc80379 FROMLIST: BACKPORT: kbuild: add __cc-ifversion and compiler-specific variants
This change adds macros for testing both compiler name and
version. Current cc-version, cc-ifversion etc. macros that test
gcc version are left unchanged to prevent compatibility issues
with existing tests.

Bug: 62093296
Bug: 67506682
Change-Id: I14965fcc21dae8dfe31881b172214bf6f8a9f440
(am from https://patchwork.kernel.org/patch/10085767/)
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
2018-02-28 15:09:57 -08:00
Sami Tolvanen
74ca748ec8 kbuild: fix __ld-ifversion
Fix the comparison on non-bash shells.

Bug: 62093296
Bug: 67506682
Change-Id: If086cc89bd14a2a0e61f10340089a9f0d9e2e1bc
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
2018-01-29 12:04:43 -08:00
Sami Tolvanen
f7d0251d44 FROMLIST: kbuild: add __ld-ifversion and linker-specific macros
Add macros for testing both linker name and version.

Bug: 62093296
Bug: 67506682
Change-Id: Icbb13e9bb889017cd4a7457a62dea7e0335c53b5
(am from https://patchwork.kernel.org/patch/10085789/)
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
2018-01-23 15:27:42 -08:00
Sami Tolvanen
09407fe713 FROMLIST: kbuild: add ld-name macro
GNU gold may require different flags than GNU ld. Add a macro for
detecting the linker.

Bug: 62093296
Bug: 67506682
Change-Id: I777f14bf4fd902de1f8dc73d7ecc3c0403eae5f5
(am from https://patchwork.kernel.org/patch/10085775/)
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
2018-01-23 15:27:42 -08:00
Sami Tolvanen
f93bd39eb2 FROMLIST: BACKPORT: kbuild: add __cc-ifversion and compiler-specific variants
This change adds macros for testing both compiler name and
version. Current cc-version, cc-ifversion etc. macros that test
gcc version are left unchanged to prevent compatibility issues
with existing tests.

Bug: 62093296
Bug: 67506682
Change-Id: I14965fcc21dae8dfe31881b172214bf6f8a9f440
(am from https://patchwork.kernel.org/patch/10085767/)
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
2018-01-23 15:27:42 -08:00
Nick Desaulniers
d85816d094 FROMLIST: kbuild: fix linker feature test macros when cross compiling with Clang
I was not seeing my linker flags getting added when using ld-option when
cross compiling with Clang. Upon investigation, this seems to be due to
a difference in how GCC vs Clang handle cross compilation.

GCC is configured at build time to support one backend, that is implicit
when compiling.  Clang is explicit via the use of `-target <triple>` and
ships with all supported backends by default.

GNU Make feature test macros that compile then link will always fail
when cross compiling with Clang unless Clang's triple is passed along to
the compiler. For example:

$ clang -x c /dev/null -c -o temp.o
$ aarch64-linux-android/bin/ld -E temp.o
aarch64-linux-android/bin/ld:
unknown architecture of input file `temp.o' is incompatible with
aarch64 output
aarch64-linux-android/bin/ld:
warning: cannot find entry symbol _start; defaulting to
0000000000400078
$ echo $?
1

$ clang -target aarch64-linux-android- -x c /dev/null -c -o temp.o
$ aarch64-linux-android/bin/ld -E temp.o
aarch64-linux-android/bin/ld:
warning: cannot find entry symbol _start; defaulting to 00000000004002e4
$ echo $?
0

This causes conditional checks that invoke $(CC) without the target
triple, then $(LD) on the result, to always fail.

Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>

Bug: 62093296
Bug: 67108677
(am from https://lkml.org/lkml/2017/10/26/587)

Change-Id: I0f5b8801f0a8cdf3c845053bb3cc4a45d26e74cc
2017-11-02 12:12:21 -05:00
Mark Charlebois
4b12ab8dca UPSTREAM: kbuild, LLVMLinux: Add -Werror to cc-option to support clang
Clang will warn about unknown warnings but will not return false
unless -Werror is set. GCC will return false if an unknown
warning is passed.

Adding -Werror make both compiler behave the same.

[arnd: it turns out we need the same patch for testing whether -ffunction-sections
       works right with gcc. I've build tested extensively with this patch
       applied, so let's just merge this one now.]

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Signed-off-by: Behan Webster <behanw@converseincode.com>
Reviewed-by: Jan-Simon Möller <dl9pf@gmx.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Bug: 67861121
(cherry picked from commit c3f0d0bc5b01ad90c45276952802455750444b4f)
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: Ieece650ee470acfc0f159a22edf6deebfd4ac6bc
2017-10-20 11:02:56 -07:00
Matthias Kaehlcke
00eea2fac0 UPSTREAM: kbuild: Add __cc-option macro
cc-option uses KBUILD_CFLAGS and KBUILD_CPPFLAGS when it determines
whether an option is supported or not. This is fine for options used to
build the kernel itself, however some components like the x86 boot code
use a different set of flags.

Add the new macro __cc-option which is a more generic version of
cc-option with additional parameters. One parameter is the compiler
with which the check should be performed, the other the compiler options
to be used instead KBUILD_C*FLAGS.

Refactor cc-option and hostcc-option to use __cc-option and move
hostcc-option to scripts/Kbuild.include.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Suggested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
(cherry picked from commit 9f3f1fd299768782465cb32cdf0dd4528d11f26b)
2017-10-16 15:30:37 -07:00
Mark Charlebois
70de9b20fa UPSTREAM: kbuild, LLVMLinux: Add -Werror to cc-option to support clang
Clang will warn about unknown warnings but will not return false
unless -Werror is set. GCC will return false if an unknown
warning is passed.

Adding -Werror make both compiler behave the same.

[arnd: it turns out we need the same patch for testing whether -ffunction-sections
       works right with gcc. I've build tested extensively with this patch
       applied, so let's just merge this one now.]

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Signed-off-by: Behan Webster <behanw@converseincode.com>
Reviewed-by: Jan-Simon Möller <dl9pf@gmx.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
(cherry picked from commit c3f0d0bc5b01ad90c45276952802455750444b4f)
2017-10-16 15:30:37 -07:00
Emese Revfy
d26e941492 kbuild: no gcc-plugins during cc-option tests
The gcc-plugins arguments should not be included when performing
cc-option tests.

Steps to reproduce:
1) make mrproper
2) make defconfig
3) enable GCC_PLUGINS, GCC_PLUGIN_CYC_COMPLEXITY
4) enable FUNCTION_TRACER (it will select other options as well)
5) make && make modules

Build errors:
MODPOST 18 modules
ERROR: "__fentry__" [net/netfilter/xt_nat.ko] undefined!
ERROR: "__fentry__" [net/netfilter/xt_mark.ko] undefined!
ERROR: "__fentry__" [net/netfilter/xt_addrtype.ko] undefined!
ERROR: "__fentry__" [net/netfilter/xt_LOG.ko] undefined!
ERROR: "__fentry__" [net/netfilter/nf_nat_sip.ko] undefined!
ERROR: "__fentry__" [net/netfilter/nf_nat_irc.ko] undefined!
ERROR: "__fentry__" [net/netfilter/nf_nat_ftp.ko] undefined!
ERROR: "__fentry__" [net/netfilter/nf_nat.ko] undefined!

Reported-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Emese Revfy <re.emese@gmail.com>
[kees: renamed variable, clarified commit message]
Signed-off-by: Kees Cook <keescook@chromium.org>
2016-08-08 17:49:05 -07:00
Arnd Bergmann
db547ef190 Kbuild: don't add obj tree in additional includes
When building with separate object directories and driver specific
Makefiles that add additional header include paths, Kbuild adjusts
the gcc flags so that we include both the directory in the source
tree and in the object tree.

However, due to another bug I fixed earlier, this did not actually
include the correct directory in the object tree, so we know that
we only really need the source tree here. Also, including the
object tree sometimes causes warnings about nonexisting directories
when the include path only exists in the source.

This changes the logic to only emit the -I argument for the srctree,
not for objects. We still need both $(srctree)/$(src) and $(obj)
though, so I'm adding them manually.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Michal Marek <mmarek@suse.com>
2016-07-18 21:31:35 +02:00
Arnd Bergmann
b999596b96 Kbuild: don't add ../../ to include path
When we build with O=objdir and objdir is directly below the source tree,
$(srctree) becomes '..'.

When a Makefile adds a CFLAGS option like -Ipath/to/headers and
we are building with a separate object directory, Kbuild tries to
add two -I options, one for the source tree and one for the object
tree. An absolute path is treated as a special case, and don't add
this one twice. This also normally catches -I$(srctree)/$(src)
as $(srctree) usually is an absolute directory like /home/arnd/linux/.

The combination of the two behaviors however results in an invalid
path name to be included: we get both ../$(src) and ../../$(src),
the latter one pointing outside of the source tree, usually to a
nonexisting directory. Building with 'make W=1' makes this obvious:

cc1: error: ../../arch/arm/mach-s3c24xx/include: No such file or directory [-Werror=missing-include-dirs]

This adds another special case, treating path names starting with ../
like those starting with / so we don't try to prefix that with
$(srctree).

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Michal Marek <mmarek@suse.com>
2016-07-18 21:31:35 +02:00
Masahiro Yamada
9c8fa9bc08 kbuild: fix if_change and friends to consider argument order
Currently, arg-check is implemented as follows:

  arg-check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \
                      $(filter-out $(cmd_$@),   $(cmd_$(1))) )

This does not care about the order of arguments that appear in
$(cmd_$(1)) and $(cmd_$@).  So, if_changed and friends never rebuild
the target if only the argument order is changed.  This is a problem
when the link order is changed.

Apparently,

  obj-y += foo.o
  obj-y += bar.o

and

  obj-y += bar.o
  obj-y += foo.o

should be distinguished because the link order determines the probe
order of drivers.  So, built-in.o should be rebuilt when the order
of objects is changed.

This commit fixes arg-check to compare the old/current commands
including the argument order.

Of course, this change has a side effect; Kbuild will react to the
change of compile option order.  For example, "-DFOO -DBAR" and
"-DBAR -DFOO" should give no difference to the build result, but
false positive should be better than false negative.

I am moving space_escape to the top of Kbuild.include just for a
matter of preference.  In practical terms, space_escape can be
defined after arg-check because arg-check uses "=" flavor, not ":=".
Having said that, collecting convenient variables in one place makes
sense from the point of readability.

Chaining "%%%SPACE%%%" to "_-_SPACE_-_" is also a matter of taste
at this point.  Actually, it can be arbitrary as long as it is an
unlikely used string.  The only problem I see in "%%%SPACE%%%" is
that "%" is a special character in "$(patsubst ...)" context.  This
commit just uses "$(subst ...)" for arg-check, but I am fixing it now
in case we might want to use it in $(patsubst ...) context in the
future.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
2016-05-10 21:21:14 +02:00
Nicolas Pitre
f110e0fec8 kbuild: fix ksym_dep_filter when multiple EXPORT_SYMBOL() on the same line
In kernel/cgroup.c there is:

    #define SUBSYS(_x)                                             \
        DEFINE_STATIC_KEY_TRUE(_x ## _cgrp_subsys_enabled_key);    \
        DEFINE_STATIC_KEY_TRUE(_x ## _cgrp_subsys_on_dfl_key);     \
        EXPORT_SYMBOL_GPL(_x ## _cgrp_subsys_enabled_key);         \
        EXPORT_SYMBOL_GPL(_x ## _cgrp_subsys_on_dfl_key);

The expansion of this macro causes multiple EXPORT_SYMBOL_GPL() instances
to appear on the same preprocessor line output, confusing the sed script
expecting only one of them per line.  Unfortunately this can't be fixed
nicely in the sed script as sed's regexp can't do non greedy matching.

Fix this by turning any semicolon into a line break before filtering.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Michal Marek <mmarek@suse.com>
2016-05-10 17:24:15 +02:00
Nicolas Pitre
366f4856f0 kbuild: adjust ksym_dep_filter for some cmd_* renames
The following renames occurred recently:

  cmd_cc_i_c --> cmd_cpp_i_c
  cmd_as_s_S --> cmd_cpp_s_S

The respective cc_*_c and as_*_S patterns no longer match the above
therefore additional patterns are needed.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Michal Marek <mmarek@suse.com>
2016-04-27 10:36:38 +02:00
Nicolas Pitre
c1a95fda2a kbuild: add fine grained build dependencies for exported symbols
Like with kconfig options, we now have the ability to compile in and
out individual EXPORT_SYMBOL() declarations based on the content of
include/generated/autoksyms.h.  However we don't want the entire
world to be rebuilt whenever that file is touched.

Let's apply the same build dependency trick used for CONFIG_* symbols
where the time stamp of empty files whose paths matching those symbols
is used to trigger fine grained rebuilds. In our case the key is the
symbol name passed to EXPORT_SYMBOL().

However, unlike config options, we cannot just use fixdep to parse
the source code for EXPORT_SYMBOL(ksym) because several variants exist
and parsing them all in a separate tool, and keeping it in synch, is
not trivially maintainable.  Furthermore, there are variants such as

	EXPORT_SYMBOL_GPL(pci_user_read_config_##size);

that are instanciated via a macro for which we can't easily determine
the actual exported symbol name(s) short of actually running the
preprocessor on them.

Storing the symbol name string in a special ELF section doesn't work
for targets that output assembly or preprocessed source.

So the best way is really to leverage the preprocessor by having it
output actual symbol names anchored by a special sequence that can be
easily filtered out. Then the list of symbols is simply fed to fixdep
to be merged with the other dependencies.

That implies the preprocessor is executed twice for each source file.
A previous attempt relied on a warning pragma for each EXPORT_SYMBOL()
instance that was filtered apart from stderr by the build system with
a sed script during the actual compilation pass. Unfortunately the
preprocessor/compiler diagnostic output isn't stable between versions
and this solution, although more efficient, was deemed too fragile.

Because of the lowercasing performed by fixdep, there might be name
collisions triggering spurious rebuilds for similar symbols. But this
shouldn't be a big issue in practice. (This is the case for CONFIG_*
symbols and I didn't want to be different here, whatever the original
reason for doing so.)

To avoid needless build overhead, the exported symbol name gathering is
performed only when CONFIG_TRIM_UNUSED_KSYMS is selected.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
2016-03-29 16:30:56 -04:00
Nicolas Pitre
e4aca45950 kbuild: de-duplicate fixdep usage
The generation and postprocessing of automatic dependency rules is
duplicated in rule_cc_o_c, rule_as_o_S and if_changed_dep. Since
this is not a trivial one-liner action, it is now abstracted under
cmd_and_fixdep to simplify things and make future changes in this area
easier.

In the rule_cc_o_c and rule_as_o_S cases that means the order of some
commands has been altered, namely fixdep and related file manipulations
are executed earlier, but they didn't depend on those commands that now
execute later.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
2016-03-29 16:30:56 -04:00
Masahiro Yamada
2aedcd098a kbuild: suppress annoying "... is up to date." message
Under certain conditions, Kbuild shows "... is up to date" where
if_changed or friends are used.

For example, the incremental build of ARM64 Linux shows this message
when the kernel image has not been updated.

  $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
    CHK     include/config/kernel.release
    CHK     include/generated/uapi/linux/version.h
    CHK     include/generated/utsrelease.h
    CHK     include/generated/bounds.h
    CHK     include/generated/timeconst.h
    CHK     include/generated/asm-offsets.h
    CALL    scripts/checksyscalls.sh
    CHK     include/generated/compile.h
    CHK     kernel/config_data.h
  make[1]: `arch/arm64/boot/Image.gz' is up to date.
    Building modules, stage 2.
    MODPOST 0 modules

The following is the build rule in arch/arm64/boot/Makefile:

  $(obj)/Image.gz: $(obj)/Image FORCE
          $(call if_changed,gzip)

If the Image.gz is newer than the Image and the command line has not
changed (i.e., $(any-prereq) and $(arg-check) are both empty), the
build rule $(call if_changed,gzip) is evaluated to be empty, then
GNU Make reports the target is up to date.  In order to make GNU Make
quiet, we need to give it something to do, for example, "@:".  This
should be fixed in the Kbuild core part rather than in each Makefile.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
2016-03-04 23:19:19 +01:00
Linus Torvalds
dab3c3cc4f Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull core kbuild updates from Michal Marek:
 - modpost portability fix
 - linker script fix
 - genksyms segfault fix
 - fixdep cleanup
 - fix for clang detection

* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kbuild: Fix clang detection
  kbuild: fixdep: drop meaningless hash table initialization
  kbuild: fixdep: optimize code slightly
  genksyms: Regenerate parser
  genksyms: Duplicate function pointer type definitions segfault
  kbuild: Fix .text.unlikely placement
  Avoid conflict with host definitions when cross-compiling
2015-09-08 14:12:19 -07:00
Michal Marek
5631d9c429 kbuild: Fix clang detection
We cannot detect clang before including the arch Makefile, because that
can set the default cross compiler. We also cannot detect clang after
including the arch Makefile, because powerpc wants to know about clang.
Solve this by using an deferred variable. This costs us a few shell
invocations, but this is only a constant number.

Reported-by: Behan Webster <behanw@converseincode.com>
Reported-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michal Marek <mmarek@suse.com>
2015-09-04 13:14:10 +02:00
David Woodhouse
3ee550f12c modsign: Handle signing key in source tree
Since commit 1329e8cc69 ("modsign: Extract signing cert from
CONFIG_MODULE_SIG_KEY if needed"), the build system has carefully coped
with the signing key being specified as a relative path in either the
source or or the build trees.

However, the actual signing of modules has not worked if the filename
is relative to the source tree.

Fix that by moving the config_filename helper into scripts/Kbuild.include
so that it can be used from elsewhere, and then using it in the top-level
Makefile to find the signing key file.

Kill the intermediate $(MODPUBKEY) and $(MODSECKEY) variables too, while
we're at it. There's no need for them.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: David Howells <dhowells@redhat.com>
2015-08-14 16:32:52 +01:00
Masahiro Yamada
6dcb4e5edf kbuild: allow cc-ifversion to have the argument for false condition
The macro "try-run" can have an argument for each of true and false
cases.  Having an argument for the false case of cc-ifversion (and
ld-ifversion) would be useful too.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-01-09 17:25:44 +01:00
Masahiro Yamada
665d92e38f kbuild: do not add $(call ...) to invoke cc-version or cc-fullversion
The macros cc-version, cc-fullversion and ld-version take no argument.
It is not necessary to add $(call ...) to invoke them.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Helge Deller <deller@gmx.de> [parisc]
Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-01-09 17:25:44 +01:00
Masahiro Yamada
dd33c03b18 kbuild: fix cc-ifversion macro
The macro "cc-version" takes no argument.  Drop $(CC) from the
"cc-ifversion" definition.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-01-09 17:11:43 +01:00
Linus Torvalds
d08372ca28 Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild updates from Michal Marek:
 "Here are the kbuild changes for v3.19-rc1:

   - Cleanups and deduplication in the main Makefile and
     scripts/Makefile.*
   - Sort the output of *config targets in make help
   - Old <linux/version.h> is always removed to avoid a surprise during
     bisecting
   - Warning fix in kconfig"

* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kbuild: remove redundant -rR flag of hdr-inst
  kbuild: Fix make help-<board series> on powerpc
  kbuild: Automatically remove stale <linux/version.h> file
  kconfig: Fix warning "‘jump’ may be used uninitialized"
  Makefile: sort list of defconfig targets in make help output
  kbuild: Remove duplicate $(cmd) definition in Makefile.clean
  kbuild: collect shorthands into scripts/Kbuild.include
2014-12-20 13:31:14 -08:00
Masahiro Yamada
1846dfbde3 kbuild: remove redundant -rR flag of hdr-inst
Passing -rR for "make headers_install" is redundant because
the top Makefile has already set -rR to MAKEFLAGS.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-12-03 14:14:07 +01:00
Masahiro Yamada
371fdc77af kbuild: collect shorthands into scripts/Kbuild.include
The shorthand "clean" is defined in both the top Makefile and
scripts/Makefile.clean.  Likewise, the "hdr-inst" is defined in
both the top Makefile and scripts/Makefile.headersinst.

To reduce code duplication, this commit collects them into
scripts/Kbuild.include like the "build" and "modbuiltin" shorthands.
It requires scripts/Makefile.clean to include scripts/Kbuild.include,
but its impact on the performance of "make clean" should be
negligible.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-11-26 14:36:52 +01:00
Robert Richter
9fb5e53722 dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst
Move dtbs install rules to Makefile.dtbinst. This change is needed to
implement support for dts vendor subdirs. The change makes Makefiles
easier and smaller as no longer the dtbs_install rule needs to be
defined. Another advantage is that install goals are not encoded in
targets anymore (%.dtb_dtbinst_).

Signed-off-by: Robert Richter <rrichter@cavium.com>
2014-10-21 18:06:58 +02:00