OSDN Git Service

sagit-ice-cold/kernel_xiaomi_msm8998.git
6 years agoMerge "soc: qcom: subsystem_notif_virt: Add virtual subsystem notification driver"
Linux Build Service Account [Fri, 9 Mar 2018 10:47:49 +0000 (02:47 -0800)]
Merge "soc: qcom: subsystem_notif_virt: Add virtual subsystem notification driver"

6 years agoMerge "DRM: SDE: Fix potential buffer overflow in SDE encoder"
Linux Build Service Account [Thu, 8 Mar 2018 12:27:51 +0000 (04:27 -0800)]
Merge "DRM: SDE: Fix potential buffer overflow in SDE encoder"

6 years agosoc: qcom: subsystem_notif_virt: Add virtual subsystem notification driver
Anant Goel [Wed, 7 Feb 2018 01:46:38 +0000 (17:46 -0800)]
soc: qcom: subsystem_notif_virt: Add virtual subsystem notification driver

The guest VM uses this driver to communicate subsystem state related
notifications to a backend driver via the virtual device's registers.

Change-Id: I612fcb641c4d531c1d2c0fd18f44f7ebff040f2c
Signed-off-by: Anant Goel <anantg@codeaurora.org>
6 years agoMerge "i2c-msm-v2: Replace HW recovery mechanism with SW bit-banging"
Linux Build Service Account [Wed, 7 Mar 2018 17:16:41 +0000 (09:16 -0800)]
Merge "i2c-msm-v2: Replace HW recovery mechanism with SW bit-banging"

6 years agoMerge "ais: match type to avoid array overflow"
Linux Build Service Account [Wed, 7 Mar 2018 17:16:39 +0000 (09:16 -0800)]
Merge "ais: match type to avoid array overflow"

6 years agoMerge "sched: add sched_get_cpu_last_busy_time() API"
Linux Build Service Account [Wed, 7 Mar 2018 17:16:38 +0000 (09:16 -0800)]
Merge "sched: add sched_get_cpu_last_busy_time() API"

6 years agoMerge "Revert "ARM: dts: msm: Disable SPI CAN controller on msm8996 CV2X boards""
Linux Build Service Account [Wed, 7 Mar 2018 17:16:37 +0000 (09:16 -0800)]
Merge "Revert "ARM: dts: msm: Disable SPI CAN controller on msm8996 CV2X boards""

6 years agoMerge "clk: qcom: mdss: improve DSI PLL's performance"
Linux Build Service Account [Wed, 7 Mar 2018 17:16:36 +0000 (09:16 -0800)]
Merge "clk: qcom: mdss: improve DSI PLL's performance"

6 years agoMerge "msm: vidc: enable port reconfig for thumbnail session"
Linux Build Service Account [Wed, 7 Mar 2018 17:16:34 +0000 (09:16 -0800)]
Merge "msm: vidc: enable port reconfig for thumbnail session"

6 years agoMerge "Merge android-4.4.118 (5f7f76a) into msm-4.4"
Linux Build Service Account [Wed, 7 Mar 2018 17:16:32 +0000 (09:16 -0800)]
Merge "Merge android-4.4.118 (5f7f76a) into msm-4.4"

6 years agoMerge "Merge android-4.4.117 (4ec3656) into msm-4.4"
Linux Build Service Account [Wed, 7 Mar 2018 17:16:32 +0000 (09:16 -0800)]
Merge "Merge android-4.4.117 (4ec3656) into msm-4.4"

6 years agoMerge "Merge android-4.4.116 (20ddb25) into msm-4.4"
Linux Build Service Account [Wed, 7 Mar 2018 17:16:31 +0000 (09:16 -0800)]
Merge "Merge android-4.4.116 (20ddb25) into msm-4.4"

6 years agoMerge "clk: msm: Add reset support in dummy clock driver"
Linux Build Service Account [Wed, 7 Mar 2018 17:16:29 +0000 (09:16 -0800)]
Merge "clk: msm: Add reset support in dummy clock driver"

6 years agoRevert "ARM: dts: msm: Disable SPI CAN controller on msm8996 CV2X boards"
Gustavo Solaira [Tue, 6 Mar 2018 18:30:06 +0000 (10:30 -0800)]
Revert "ARM: dts: msm: Disable SPI CAN controller on msm8996 CV2X boards"

This reverts commit a8c85fc795c063a09a96972c838fa80c520c3837.
Reverted because support for MPC5746C SPI-CAN is being
added back to the platform.

Change-Id: Ib14caf39a8cba9c6028abceb85adcd43df53ba06
Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org>
6 years agoMerge "drm/msm-hyp: overwrite hyp ioctls used by libgbm"
Linux Build Service Account [Wed, 7 Mar 2018 04:57:59 +0000 (20:57 -0800)]
Merge "drm/msm-hyp: overwrite hyp ioctls used by libgbm"

6 years agoMerge "ath10k: fix the invalid STA disconnect after wow resume"
Linux Build Service Account [Wed, 7 Mar 2018 04:57:57 +0000 (20:57 -0800)]
Merge "ath10k: fix the invalid STA disconnect after wow resume"

6 years agoMerge "defconfig: arm64: msm: Enable SPMI msm8996 virtual platform"
Linux Build Service Account [Wed, 7 Mar 2018 04:57:55 +0000 (20:57 -0800)]
Merge "defconfig: arm64: msm: Enable SPMI msm8996 virtual platform"

6 years agoMerge "ASoC: msm: Support Channel Mixer Cfg"
Linux Build Service Account [Wed, 7 Mar 2018 04:57:54 +0000 (20:57 -0800)]
Merge "ASoC: msm: Support Channel Mixer Cfg"

6 years agoMerge "ARM: dts: msm: Disable usb phy by default on msm8996 vplatform"
Linux Build Service Account [Wed, 7 Mar 2018 04:57:53 +0000 (20:57 -0800)]
Merge "ARM: dts: msm: Disable usb phy by default on msm8996 vplatform"

6 years agoMerge "spmi: msm: correct len part in formatted cmd value."
Linux Build Service Account [Wed, 7 Mar 2018 04:57:52 +0000 (20:57 -0800)]
Merge "spmi: msm: correct len part in formatted cmd value."

6 years agoMerge "drm/msm: HPD_OFF Property for SDE HDMI Connector"
Linux Build Service Account [Wed, 7 Mar 2018 04:57:50 +0000 (20:57 -0800)]
Merge "drm/msm: HPD_OFF Property for SDE HDMI Connector"

6 years agoclk: qcom: mdss: improve DSI PLL's performance
Guchun Chen [Wed, 28 Feb 2018 05:47:49 +0000 (13:47 +0800)]
clk: qcom: mdss: improve DSI PLL's performance

To improve performance margin for DSI's PLL at cold temperature case,
the value of DSIPHY_PLL_PLL_ICPMSET should be changed from 0x24 to 0x3f.

Change-Id: I139e37e137355c5e8f0b3bebd28b23a09593dd13
Signed-off-by: Guchun Chen <guchunc@codeaurora.org>
6 years agodrm/msm-hyp: overwrite hyp ioctls used by libgbm
Camus Wong [Fri, 16 Feb 2018 20:05:57 +0000 (15:05 -0500)]
drm/msm-hyp: overwrite hyp ioctls used by libgbm

Handle ioctls called by libgbm in the virtual kernel driver
to support front-end library and avoid modifying libgbm.

Change-Id: Ie4e567cea7338b4ba68080decf85dfa45e040dac
Signed-off-by: Camus Wong <camusw@codeaurora.org>
6 years agosched: add sched_get_cpu_last_busy_time() API
Pavankumar Kondeti [Fri, 9 Feb 2018 08:23:04 +0000 (13:53 +0530)]
sched: add sched_get_cpu_last_busy_time() API

sched_get_cpu_last_busy_time() returns the last time stamp when
a given CPU is busy with more than 2 runnable tasks or has load
greater than 50% of it's max capacity. The LPM driver can make
use of this API and create a policy to prevent a recently loaded
CPU entering deep sleep state.

This API is implemented only for the higher capacity CPUs in
the system. It returns 0 for other CPUs.

Change-Id: I97ef47970a71647f4f55f21165d0cc1351770a53
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
6 years agoath10k: fix the invalid STA disconnect after wow resume
Sarada Prasanna Garnayak [Fri, 2 Mar 2018 09:00:30 +0000 (14:30 +0530)]
ath10k: fix the invalid STA disconnect after wow resume

Clear the previous wakeup reason data and reset the wakeup
reason event field to avoid the STA disconnect with invalid
wow event.

CRs-Fixed: 2199100
Change-Id: If45b5ae6e6f93ab9068b59a5e31f46b829363936
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
6 years agoais: match type to avoid array overflow
Andy Sun [Tue, 6 Mar 2018 08:16:39 +0000 (16:16 +0800)]
ais: match type to avoid array overflow

Fix buffer overflow and array index out of bounds cases.
Because size of int(32bits) unequal to size of long(64bits).

Change-Id: I45a70ec5b6926698bb444fc78f85785bc4a25ea5
Signed-off-by: Andy Sun <bins@codeaurora.org>
6 years agoMerge "soc: qcom: scm_qcpe: Derive HAB id from HAB vmid dt node"
Linux Build Service Account [Mon, 5 Mar 2018 22:12:24 +0000 (14:12 -0800)]
Merge "soc: qcom: scm_qcpe: Derive HAB id from HAB vmid dt node"

6 years agoMerge "msm: kgsl: Limit the maximum number of contexts"
Linux Build Service Account [Mon, 5 Mar 2018 22:12:22 +0000 (14:12 -0800)]
Merge "msm: kgsl: Limit the maximum number of contexts"

6 years agoMerge "msm: mdss: Fix scalar LUT handling"
Linux Build Service Account [Mon, 5 Mar 2018 22:12:21 +0000 (14:12 -0800)]
Merge "msm: mdss: Fix scalar LUT handling"

6 years agomsm: vidc: enable port reconfig for thumbnail session
Paras Nagda [Mon, 5 Mar 2018 10:34:39 +0000 (16:04 +0530)]
msm: vidc: enable port reconfig for thumbnail session

Send port reconfig to client for thumbnail session
when driver received sufficient resources from firmware.

This is needed as there are issues in DPB management
in firmware.

Change-Id: I7c2992e6be87fd277b209554d1aa7c4d0a088738
Signed-off-by: Paras Nagda <pnagda@codeaurora.org>
6 years agomsm: kgsl: Limit the maximum number of contexts
Harshdeep Dhatt [Tue, 12 Dec 2017 21:56:20 +0000 (14:56 -0700)]
msm: kgsl: Limit the maximum number of contexts

Enforce a limit of 200 contexts per process. This is done so
that a process cannot use up all the available contexts and
prevent other processes from starving.

Change-Id: I6eda123128381a213315561cd42335e0944f1f55
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
Signed-off-by: Archana Obannagari <aobann@codeaurora.org>
6 years agospmi: msm: correct len part in formatted cmd value.
Yimin Peng [Thu, 1 Mar 2018 11:43:04 +0000 (19:43 +0800)]
spmi: msm: correct len part in formatted cmd value.

When the bytes count required by SPMI clients is 8, read and write
fail. This was observed when PMIC MPPs initialized. Fix this by
adding bytes count restore in cmd formation as read and write process.

Change-Id: I56dbbc0b8e99727c29ddae568ce6f17195888b4a
Signed-off-by: Yimin Peng <yiminp@codeaurora.org>
6 years agomsm: kgsl: Increase memstore size
Harshdeep Dhatt [Tue, 12 Dec 2017 18:35:51 +0000 (11:35 -0700)]
msm: kgsl: Increase memstore size

Increase the memstore size to 32k. Memstore has for long
been limited to 200 contexts and now it will be 814.

Change-Id: I1287669f0be38afe13ff8e386f5296e8f4e77627
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
Signed-off-by: Archana Obannagari <aobann@codeaurora.org>
6 years agoARM: dts: msm: Disable usb phy by default on msm8996 vplatform
Zhiqiang Tu [Fri, 2 Mar 2018 01:34:13 +0000 (09:34 +0800)]
ARM: dts: msm: Disable usb phy by default on msm8996 vplatform

Disable usb phy by default and only enable them for the targets
which require the support for usb phy.

Change-Id: I55d5cba5ef06d3269cc9600dfec866c0f88b31ab
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
6 years agosoc: qcom: scm_qcpe: Derive HAB id from HAB vmid dt node
Amit Blay [Thu, 1 Mar 2018 09:59:55 +0000 (11:59 +0200)]
soc: qcom: scm_qcpe: Derive HAB id from HAB vmid dt node

Derive the QCPE HAB id from the HAB vmid DTS node, rather
than have it hard coded into the driver.

Change-Id: I29ec7647890f8bc194d31f0402c5ed314572462f
Signed-off-by: Amit Blay <ablay@codeaurora.org>
6 years agoMerge "msm: kgsl: Correct memory type update in IOCTL_KGSL_GPUOBJ_SET_INFO"
Linux Build Service Account [Sat, 3 Mar 2018 07:05:09 +0000 (23:05 -0800)]
Merge "msm: kgsl: Correct memory type update in IOCTL_KGSL_GPUOBJ_SET_INFO"

6 years agoMerge "ARM: dts: msm: Add support for modem test tools on msm8996 vplatform"
Linux Build Service Account [Sat, 3 Mar 2018 07:05:08 +0000 (23:05 -0800)]
Merge "ARM: dts: msm: Add support for modem test tools on msm8996 vplatform"

6 years agoMerge "soc: qcom: hab: clean the pr_fmt redefined build warning"
Linux Build Service Account [Sat, 3 Mar 2018 07:05:07 +0000 (23:05 -0800)]
Merge "soc: qcom: hab: clean the pr_fmt redefined build warning"

6 years agoMerge "defconfig: msm: Enable FW loader user space helper for GVM"
Linux Build Service Account [Sat, 3 Mar 2018 07:05:05 +0000 (23:05 -0800)]
Merge "defconfig: msm: Enable FW loader user space helper for GVM"

6 years agomsm: kgsl: Correct memory type update in IOCTL_KGSL_GPUOBJ_SET_INFO
Deepak Kumar [Fri, 23 Feb 2018 11:01:46 +0000 (16:31 +0530)]
msm: kgsl: Correct memory type update in IOCTL_KGSL_GPUOBJ_SET_INFO

A bad user can pass memory type parameter value greater than 255.
Limit the memory type value to valid range before updating memory
descriptor flags to avoid incorrect flag update.

Change-Id: I23ce69584d1e2c9969583461ee942c5046e7cdbc
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
6 years agodefconfig: arm64: msm: Enable SPMI msm8996 virtual platform
Yimin Peng [Thu, 8 Feb 2018 08:58:11 +0000 (16:58 +0800)]
defconfig: arm64: msm: Enable SPMI msm8996 virtual platform

Add virtual SPMI PMIC arbiter support on virtual platform.

Change-Id: I3642d41c5474f975f18f5d19136284b632868389
Signed-off-by: Yimin Peng <yiminp@codeaurora.org>
6 years agoARM: dts: msm: Add SPMI and PMIC devices for msm8996 vplatform
Yimin Peng [Thu, 1 Mar 2018 09:24:57 +0000 (17:24 +0800)]
ARM: dts: msm: Add SPMI and PMIC devices for msm8996 vplatform

Add virtual SPMI Arbiter and PMIC clients which are disabled by default.

Change-Id: I39e5d22bff0f796716a34d7d9ff0e2040cf2d61b
Signed-off-by: Yimin Peng <yiminp@codeaurora.org>
6 years agoASoC: msm: Support Channel Mixer Cfg
Cong Tang [Tue, 31 Oct 2017 05:13:37 +0000 (13:13 +0800)]
ASoC: msm: Support Channel Mixer Cfg

Enhance Channel Mixer controls for MultiMedia Frontend.

Change-Id: Ifedac25de5ae6bad1092b66ec405bba66a80f608
Signed-off-by: Cong Tang <congt@codeaurora.org>
6 years agoARM: dts: msm: Add support for modem test tools on msm8996 vplatform
Ramachandran Venkataramani [Mon, 19 Feb 2018 21:10:06 +0000 (13:10 -0800)]
ARM: dts: msm: Add support for modem test tools on msm8996 vplatform

Add smdpkt and glinkpkt devices with the SSR handlers to
support PC based tools to test the modem and adsp.

Change-Id: I2a77f6d01ad13b9c061eacbf4d08af12d8e183a7
Signed-off-by: Ramachandran Venkataramani <ramavenk@codeaurora.org>
6 years agodiag: Add conditional check for len in dci_process_ctrl_status()
Sreelakshmi Gownipalli [Mon, 29 Jan 2018 21:17:13 +0000 (13:17 -0800)]
diag: Add conditional check for len in dci_process_ctrl_status()

Add correct conditional check for len in dci_process_ctrl_status() to
prevent buffer overflow.

Change-Id: Id73ed1c8b104428eceef0544ce2858160cc08fd2
Signed-off-by: Sreelakshmi Gownipalli <sgownipa@codeaurora.org>
6 years agoMerge android-4.4.118 (5f7f76a) into msm-4.4
Srinivasarao P [Tue, 27 Feb 2018 13:38:13 +0000 (19:08 +0530)]
Merge android-4.4.118 (5f7f76a) into msm-4.4

* refs/heads/tmp-5f7f76a
  Linux 4.4.118
  net: dst_cache_per_cpu_dst_set() can be static
  crypto: s5p-sss - Fix kernel Oops in AES-ECB mode
  KVM: nVMX: invvpid handling improvements
  KVM: VMX: clean up declaration of VPID/EPT invalidation types
  kvm: nVMX: Fix kernel panics induced by illegal INVEPT/INVVPID types
  KVM: nVMX: vmx_complete_nested_posted_interrupt() can't fail
  KVM: nVMX: kmap() can't fail
  x86/speculation: Fix typo IBRS_ATT, which should be IBRS_ALL
  x86/spectre: Simplify spectre_v2 command line parsing
  x86/retpoline: Avoid retpolines for built-in __init functions
  x86/kvm: Update spectre-v1 mitigation
  x86/paravirt: Remove 'noreplace-paravirt' cmdline option
  x86/spectre: Fix spelling mistake: "vunerable"-> "vulnerable"
  x86/spectre: Report get_user mitigation for spectre_v1
  nl80211: Sanitize array index in parse_txq_params
  vfs, fdtable: Prevent bounds-check bypass via speculative execution
  x86/syscall: Sanitize syscall table de-references under speculation
  x86/get_user: Use pointer masking to limit speculation
  x86: Introduce barrier_nospec
  x86: Implement array_index_mask_nospec
  array_index_nospec: Sanitize speculative array de-references
  Documentation: Document array_index_nospec
  x86/spectre: Check CONFIG_RETPOLINE in command line parser
  x86/cpu/bugs: Make retpoline module warning conditional
  x86/bugs: Drop one "mitigation" from dmesg
  x86/nospec: Fix header guards names
  module/retpoline: Warn about missing retpoline in module
  KVM: VMX: Make indirect call speculation safe
  KVM: x86: Make indirect calls in emulator speculation safe
  x86/retpoline: Remove the esp/rsp thunk
  KVM: async_pf: Fix #DF due to inject "Page not Present" and "Page Ready" exceptions simultaneously
  kasan: rework Kconfig settings
  drm/gma500: remove helper function
  x86/microcode/AMD: Change load_microcode_amd()'s param to bool to fix preemptibility bug
  genksyms: Fix segfault with invalid declarations
  dell-wmi, dell-laptop: depends DMI
  netlink: fix nla_put_{u8,u16,u32} for KASAN
  ASoC: Intel: Kconfig: fix build when ACPI is not enabled
  ARM: tegra: select USB_ULPI from EHCI rather than platform
  ncr5380: shut up gcc indentation warning
  usb: phy: msm add regulator dependency
  idle: i7300: add PCI dependency
  binfmt_elf: compat: avoid unused function warning
  isdn: sc: work around type mismatch warning
  power: bq27xxx_battery: mark some symbols __maybe_unused
  Revert "power: bq27xxx_battery: Remove unneeded dependency in Kconfig"
  ncpfs: fix unused variable warning
  gpio: xgene: mark PM functions as __maybe_unused
  net: hp100: remove unnecessary #ifdefs
  dmaengine: zx: fix build warning
  perf/x86: Shut up false-positive -Wmaybe-uninitialized warning
  wireless: cw1200: use __maybe_unused to hide pm functions_
  cw1200: fix bogus maybe-uninitialized warning
  v4l: remove MEDIA_TUNER dependency for VIDEO_TUNER
  hdpvr: hide unused variable
  drm/gma500: Sanity-check pipe index
  serial: 8250_mid: fix broken DMA dependency
  ASoC: rockchip: use __maybe_unused to hide st_irq_syscfg_resume
  ISDN: eicon: reduce stack size of sig_ind function
  em28xx: only use mt9v011 if camera support is enabled
  go7007: add MEDIA_CAMERA_SUPPORT dependency
  KVM: add X86_LOCAL_APIC dependency
  Input: tca8418_keypad - hide gcc-4.9 -Wmaybe-uninitialized warning
  drm/nouveau: hide gcc-4.9 -Wmaybe-uninitialized
  tc358743: fix register i2c_rd/wr functions
  staging: unisys: visorinput depends on INPUT
  i2c: remove __init from i2c_register_board_info()
  b2c2: flexcop: avoid unused function warnings
  infiniband: cxgb4: use %pR format string for printing resources
  iio: adc: axp288: remove redundant duplicate const on axp288_adc_channels
  ASoC: mediatek: add i2c dependency
  genirq/msi: Add stubs for get_cached_msi_msg/pci_write_msi_msg
  tty: cyclades: cyz_interrupt is only used for PCI
  drm/vmwgfx: use *_32_bits() macros
  tlan: avoid unused label with PCI=n
  tc1100-wmi: fix build warning when CONFIG_PM not enabled
  ipv4: ipconfig: avoid unused ic_proto_used symbol
  netfilter: ipvs: avoid unused variable warnings
  x86/platform/olpc: Fix resume handler build warning
  staging: wilc1000: fix kbuild test robot error
  rtlwifi: fix gcc-6 indentation warning
  USB: cdc_subset: only build when one driver is enabled
  hwrng: exynos - use __maybe_unused to hide pm functions
  fbdev: sm712fb: avoid unused function warnings
  Drivers: hv: vmbus: fix build warning
  modsign: hide openssl output in silent builds
  fbdev: s6e8ax0: avoid unused function warnings
  mtd: cfi: enforce valid geometry configuration
  mtd: sh_flctl: pass FIFO as physical address
  amd-xgbe: Fix unused suspend handlers build warning
  fbdev: auo_k190x: avoid unused function warnings
  driver-core: use 'dev' argument in dev_dbg_ratelimited stub
  target/user: Fix cast from pointer to phys_addr_t
  tty: hvc_xen: hide xen_console_remove when unused
  usb: musb/ux500: remove duplicate check for dma_is_compatible
  pwc: hide unused label
  SCSI: initio: remove duplicate module device table
  scsi: mvumi: use __maybe_unused to hide pm functions
  video: Use bool instead int pointer for get_opt_bool() argument
  fbdev: sis: enforce selection of at least one backend
  staging: ste_rmi4: avoid unused function warnings
  video: fbdev: sis: remove unused variable
  scsi: fdomain: drop fdomain_pci_tbl when built-in
  mptfusion: hide unused seq_mpt_print_ioc_summary function
  mtd: maps: add __init attribute
  mtd: ichxrom: maybe-uninitialized with gcc-4.9
  md: avoid warning for 32-bit sector_t
  profile: hide unused functions when !CONFIG_PROC_FS
  dpt_i2o: fix build warning
  drivers/net: fix eisa_driver probe section mismatch
  scsi: sim710: fix build warning
  x86/boot: Avoid warning for zero-filling .bss
  thermal: spear: use __maybe_unused for PM functions
  ssb: mark ssb_bus_register as __maybe_unused
  reiserfs: avoid a -Wmaybe-uninitialized warning
  ALSA: hda/ca0132 - fix possible NULL pointer use
  arm64: Kconfig: select COMPAT_BINFMT_ELF only when BINFMT_ELF is set
  scsi: advansys: fix uninitialized data access
  x86/platform: Add PCI dependency for PUNIT_ATOM_DEBUG
  x86: add MULTIUSER dependency for KVM
  thermal: fix INTEL_SOC_DTS_IOSF_CORE dependencies
  x86/build: Silence the build with "make -s"
  tools build: Add tools tree support for 'make -s'
  x86/fpu/math-emu: Fix possible uninitialized variable use
  arm64: define BUG() instruction without CONFIG_BUG
  x86/ras/inject: Make it depend on X86_LOCAL_APIC=y
  scsi: advansys: fix build warning for PCI=n
  video: fbdev: via: remove possibly unused variables
  platform/x86: intel_mid_thermal: Fix suspend handlers unused warning
  gpio: intel-mid: Fix build warning when !CONFIG_PM
  vmxnet3: prevent building with 64K pages
  isdn: icn: remove a #warning
  virtio_balloon: prevent uninitialized variable use
  hippi: Fix a Fix a possible sleep-in-atomic bug in rr_close
  xen: XEN_ACPI_PROCESSOR is Dom0-only
  x86/mm/kmmio: Fix mmiotrace for page unaligned addresses
  mm/early_ioremap: Fix boot hang with earlyprintk=efi,keep
  dmaengine: jz4740: disable/unprepare clk if probe fails
  drm/armada: fix leak of crtc structure
  xfrm: Fix stack-out-of-bounds with misconfigured transport mode policies.
  spi: sun4i: disable clocks in the remove function
  ASoC: rockchip: disable clock on error
  clk: fix a panic error caused by accessing NULL pointer
  dmaengine: at_hdmac: fix potential NULL pointer dereference in atc_prep_dma_interleaved
  dmaengine: ioat: Fix error handling path
  509: fix printing uninitialized stack memory when OID is empty
  btrfs: Fix possible off-by-one in btrfs_search_path_in_tree
  net_sched: red: Avoid illegal values
  net_sched: red: Avoid devision by zero
  gianfar: fix a flooded alignment reports because of padding issue.
  s390/dasd: prevent prefix I/O error
  powerpc/perf: Fix oops when grouping different pmu events
  ipvlan: Add the skb->mark as flow4's member to lookup route
  scripts/kernel-doc: Don't fail with status != 0 if error encountered with -none
  RDMA/cma: Make sure that PSN is not over max allowed
  pinctrl: sunxi: Fix A80 interrupt pin bank
  media: s5k6aa: describe some function parameters
  perf bench numa: Fixup discontiguous/sparse numa nodes
  perf top: Fix window dimensions change handling
  ARM: dts: am4372: Correct the interrupts_properties of McASP
  ARM: dts: Fix omap4 hang with GPS connected to USB by using wakeupgen
  ARM: AM33xx: PRM: Remove am33xx_pwrdm_read_prev_pwrst function
  ARM: OMAP2+: Fix SRAM virt to phys translation for save_secure_ram_context
  usb: build drivers/usb/common/ when USB_SUPPORT is set
  usbip: keep usbip_device sockfd state in sync with tcp_socket
  staging: iio: adc: ad7192: fix external frequency setting
  binder: check for binder_thread allocation failure in binder_poll()
  staging: android: ashmem: Fix a race condition in pin ioctls
  dn_getsockoptdecnet: move nf_{get/set}sockopt outside sock lock
  Make DST_CACHE a silent config option
  arm64: dts: add #cooling-cells to CPU nodes
  video: fbdev/mmp: add MODULE_LICENSE
  ASoC: ux500: add MODULE_LICENSE tag
  net: avoid skb_warn_bad_offload on IS_ERR
  netfilter: xt_RATEEST: acquire xt_rateest_mutex for hash insert
  netfilter: on sockopt() acquire sock lock only in the required scope
  netfilter: ipt_CLUSTERIP: fix out-of-bounds accesses in clusterip_tg_check()
  netfilter: x_tables: avoid out-of-bounds reads in xt_request_find_{match|target}
  netfilter: x_tables: fix int overflow in xt_alloc_table_info()
  KVM: x86: fix escape of guest dr6 to the host
  crypto: x86/twofish-3way - Fix %rbp usage
  selinux: skip bounded transition processing if the policy isn't loaded
  selinux: ensure the context is NUL terminated in security_context_to_sid_core()
  Provide a function to create a NUL-terminated string from unterminated data
  drm: Require __GFP_NOFAIL for the legacy drm_modeset_lock_all
  blktrace: fix unlocked registration of tracepoints
  xfrm: check id proto in validate_tmpl()
  xfrm: Fix stack-out-of-bounds read on socket policy lookup.
  mm,vmscan: Make unregister_shrinker() no-op if register_shrinker() failed.
  cfg80211: check dev_set_name() return value
  net: replace dst_cache ip6_tunnel implementation with the generic one
  net: add dst_cache support
  ANDROID: sdcardfs: Hold i_mutex for i_size_write
  BACKPORT, FROMGIT: crypto: speck - add test vectors for Speck64-XTS
  BACKPORT, FROMGIT: crypto: speck - add test vectors for Speck128-XTS
  BACKPORT, FROMGIT: crypto: arm/speck - add NEON-accelerated implementation of Speck-XTS
  FROMGIT: crypto: speck - export common helpers
  BACKPORT, FROMGIT: crypto: speck - add support for the Speck block cipher
  UPSTREAM: ANDROID: binder: synchronize_rcu() when using POLLFREE.
  f2fs: updates on v4.16-rc1

Conflicts:
net/Kconfig
net/core/Makefile

Change-Id: I659b0444812b04252f1f1fba8bc62410ce42b061
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
6 years agoMerge android-4.4.117 (4ec3656) into msm-4.4
Srinivasarao P [Tue, 27 Feb 2018 13:30:00 +0000 (19:00 +0530)]
Merge android-4.4.117 (4ec3656) into msm-4.4

* refs/heads/tmp-4ec3656
  Linux 4.4.117
  media: r820t: fix r820t_write_reg for KASAN
  ARM: dts: s5pv210: add interrupt-parent for ohci
  ARM: pxa/tosa-bt: add MODULE_LICENSE tag
  vfs: don't do RCU lookup of empty pathnames
  x86: fix build warnign with 32-bit PAE
  dm: correctly handle chained bios in dec_pending()
  mvpp2: fix multicast address filter
  ALSA: seq: Fix racy pool initializations
  ALSA: usb-audio: add implicit fb quirk for Behringer UFX1204
  ALSA: hda/realtek: PCI quirk for Fujitsu U7x7
  ALSA: usb-audio: Fix UAC2 get_ctl request with a RANGE attribute
  ALSA: hda - Fix headset mic detection problem for two Dell machines
  Btrfs: fix unexpected -EEXIST when creating new inode
  Btrfs: fix crash due to not cleaning up tree log block's dirty bits
  Btrfs: fix deadlock in run_delalloc_nocow
  rtlwifi: rtl8821ae: Fix connection lost problem correctly
  console/dummy: leave .con_font_get set to NULL
  video: fbdev: atmel_lcdfb: fix display-timings lookup
  mm: hide a #warning for COMPILE_TEST
  ext4: correct documentation for grpid mount option
  ext4: save error to disk in __ext4_grp_locked_error()
  rtc-opal: Fix handling of firmware error codes, prevent busy loops
  drm/radeon: adjust tested variable
  x86/cpu: Change type of x86_cache_size variable to unsigned int
  KVM/x86: Reduce retpoline performance impact in slot_handle_level_range(), by always inlining iterator helper methods
  ALSA: seq: Fix regression by incorrect ioctl_mutex usages
  arm: spear13xx: Fix spics gpio controller's warning
  arm: spear13xx: Fix dmas cells
  arm: spear600: Add missing interrupt-parent of rtc
  ARM: dts: STi: Add gpio polarity for "hdmi,hpd-gpio" property
  s390: fix handling of -1 in set{,fs}[gu]id16 syscalls
  PM / devfreq: Propagate error from devfreq_add_device()
  IB/mlx4: Fix incorrectly releasing steerable UD QPs when have only ETH ports
  BACKPORT: tee: shm: Potential NULL dereference calling tee_shm_register()
  BACKPORT: tee: shm: don't put_page on null shm->pages
  BACKPORT: tee: shm: make function __tee_shm_alloc static
  BACKPORT: tee: optee: check type of registered shared memory
  BACKPORT: tee: add start argument to shm_register callback
  BACKPORT: tee: optee: fix header dependencies
  BACKPORT: tee: shm: inline tee_shm_get_id()
  BACKPORT: tee: use reference counting for tee_context
  BACKPORT: tee: optee: enable dynamic SHM support
  BACKPORT: tee: optee: add optee-specific shared pool implementation
  BACKPORT: tee: optee: store OP-TEE capabilities in private data
  BACKPORT: tee: optee: add registered buffers handling into RPC calls
  BACKPORT: tee: optee: add registered shared parameters handling
  BACKPORT: tee: optee: add shared buffer registration functions
  BACKPORT: tee: optee: add page list manipulation functions
  BACKPORT: tee: optee: Update protocol definitions
  BACKPORT: tee: shm: add page accessor functions
  BACKPORT: tee: shm: add accessors for buffer size and page offset
  BACKPORT: tee: add register user memory
  BACKPORT: tee: flexible shared memory pool creation
  BACKPORT: optee: support asynchronous supplicant requests
  BACKPORT: tee: add TEE_IOCTL_PARAM_ATTR_META
  BACKPORT: tee: add tee_param_is_memref() for driver use
  f2fs: fix build error with multiply defined inode_nohighmem()

Change-Id: I6b4b025e4b03fe9433de0bf2ff292a8f24e3c3cb
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
6 years agoMerge android-4.4.116 (20ddb25) into msm-4.4
Srinivasarao P [Tue, 27 Feb 2018 13:26:06 +0000 (18:56 +0530)]
Merge android-4.4.116 (20ddb25) into msm-4.4

* refs/heads/tmp-20ddb25
  Linux 4.4.116
  ftrace: Remove incorrect setting of glob search field
  mn10300/misalignment: Use SIGSEGV SEGV_MAPERR to report a failed user copy
  ovl: fix failure to fsync lower dir
  ACPI: sbshc: remove raw pointer from printk() message
  nvme: Fix managing degraded controllers
  btrfs: Handle btrfs_set_extent_delalloc failure in fixup worker
  pktcdvd: Fix pkt_setup_dev() error path
  EDAC, octeon: Fix an uninitialized variable warning
  xtensa: fix futex_atomic_cmpxchg_inatomic
  alpha: fix reboot on Avanti platform
  alpha: fix crash if pthread_create races with signal delivery
  signal/sh: Ensure si_signo is initialized in do_divide_error
  signal/openrisc: Fix do_unaligned_access to send the proper signal
  Bluetooth: btusb: Restore QCA Rome suspend/resume fix with a "rewritten" version
  Revert "Bluetooth: btusb: fix QCA Rome suspend/resume"
  Bluetooth: btsdio: Do not bind to non-removable BCM43341
  HID: quirks: Fix keyboard + touchpad on Toshiba Click Mini not working
  kernel/async.c: revert "async: simplify lowest_in_progress()"
  media: cxusb, dib0700: ignore XC2028_I2C_FLUSH
  media: ts2020: avoid integer overflows on 32 bit machines
  watchdog: imx2_wdt: restore previous timeout after suspend+resume
  KVM: nVMX: Fix races when sending nested PI while dest enters/leaves L2
  arm: KVM: Fix SMCCC handling of unimplemented SMC/HVC calls
  crypto: caam - fix endless loop when DECO acquire fails
  media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic
  media: v4l2-compat-ioctl32.c: don't copy back the result for certain errors
  media: v4l2-compat-ioctl32.c: drop pr_info for unknown buffer type
  media: v4l2-compat-ioctl32.c: copy clip list in put_v4l2_window32
  media: v4l2-compat-ioctl32: Copy v4l2_window->global_alpha
  media: v4l2-compat-ioctl32.c: make ctrl_is_pointer work for subdevs
  media: v4l2-compat-ioctl32.c: fix ctrl_is_pointer
  media: v4l2-compat-ioctl32.c: copy m.userptr in put_v4l2_plane32
  media: v4l2-compat-ioctl32.c: avoid sizeof(type)
  media: v4l2-compat-ioctl32.c: move 'helper' functions to __get/put_v4l2_format32
  media: v4l2-compat-ioctl32.c: fix the indentation
  media: v4l2-compat-ioctl32.c: add missing VIDIOC_PREPARE_BUF
  vb2: V4L2_BUF_FLAG_DONE is set after DQBUF
  media: v4l2-ioctl.c: don't copy back the result for -ENOTTY
  nsfs: mark dentry with DCACHE_RCUACCESS
  crypto: poly1305 - remove ->setkey() method
  crypto: cryptd - pass through absence of ->setkey()
  crypto: hash - introduce crypto_hash_alg_has_setkey()
  ahci: Add Intel Cannon Lake PCH-H PCI ID
  ahci: Add PCI ids for Intel Bay Trail, Cherry Trail and Apollo Lake AHCI
  ahci: Annotate PCI ids for mobile Intel chipsets as such
  kernfs: fix regression in kernfs_fop_write caused by wrong type
  NFS: reject request for id_legacy key without auxdata
  NFS: commit direct writes even if they fail partially
  NFS: Add a cond_resched() to nfs_commit_release_pages()
  nfs/pnfs: fix nfs_direct_req ref leak when i/o falls back to the mds
  ubi: block: Fix locking for idr_alloc/idr_remove
  mtd: nand: sunxi: Fix ECC strength choice
  mtd: nand: Fix nand_do_read_oob() return value
  mtd: nand: brcmnand: Disable prefetch by default
  mtd: cfi: convert inline functions to macros
  media: dvb-usb-v2: lmedm04: move ts2020 attach to dm04_lme2510_tuner
  media: dvb-usb-v2: lmedm04: Improve logic checking of warm start
  dccp: CVE-2017-8824: use-after-free in DCCP code
  sched/rt: Up the root domain ref count when passing it around via IPIs
  sched/rt: Use container_of() to get root domain in rto_push_irq_work_func()
  usb: gadget: uvc: Missing files for configfs interface
  posix-timer: Properly check sigevent->sigev_notify
  netfilter: nf_queue: Make the queue_handler pernet
  kaiser: fix compile error without vsyscall
  x86/kaiser: fix build error with KASAN && !FUNCTION_GRAPH_TRACER
  dmaengine: dmatest: fix container_of member in dmatest_callback
  CIFS: zero sensitive data when freeing
  cifs: Fix autonegotiate security settings mismatch
  cifs: Fix missing put_xid in cifs_file_strict_mmap
  powerpc/pseries: include linux/types.h in asm/hvcall.h
  x86/microcode: Do the family check first
  x86/microcode/AMD: Do not load when running on a hypervisor
  crypto: tcrypt - fix S/G table for test_aead_speed()
  don't put symlink bodies in pagecache into highmem
  KEYS: encrypted: fix buffer overread in valid_master_desc()
  media: soc_camera: soc_scale_crop: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE
  vhost_net: stop device during reset owner
  tcp: release sk_frag.page in tcp_disconnect
  r8169: fix RTL8168EP take too long to complete driver initialization.
  qlcnic: fix deadlock bug
  net: igmp: add a missing rcu locking section
  ip6mr: fix stale iterator
  x86/asm: Fix inline asm call constraints for GCC 4.4
  drm: rcar-du: Fix race condition when disabling planes at CRTC stop
  drm: rcar-du: Use the VBK interrupt for vblank events
  ASoC: rsnd: avoid duplicate free_irq()
  ASoC: rsnd: don't call free_irq() on Parent SSI
  ASoC: simple-card: Fix misleading error message
  net: cdc_ncm: initialize drvflags before usage
  usbip: fix 3eee23c3ec14 tcp_socket address still in the status file
  usbip: vhci_hcd: clear just the USB_PORT_STAT_POWER bit
  ASoC: pcm512x: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE
  powerpc/64s: Allow control of RFI flush via debugfs
  powerpc/64s: Wire up cpu_show_meltdown()
  powerpc/powernv: Check device-tree for RFI flush settings
  powerpc/pseries: Query hypervisor for RFI flush settings
  powerpc/64s: Support disabling RFI flush with no_rfi_flush and nopti
  powerpc/64s: Add support for RFI flush of L1-D cache
  powerpc/64s: Convert slb_miss_common to use RFI_TO_USER/KERNEL
  powerpc/64: Convert the syscall exit path to use RFI_TO_USER/KERNEL
  powerpc/64: Convert fast_exception_return to use RFI_TO_USER/KERNEL
  powerpc/64s: Simple RFI macro conversions
  powerpc/64: Add macros for annotating the destination of rfid/hrfid
  powerpc/pseries: Add H_GET_CPU_CHARACTERISTICS flags & wrapper
  powerpc: Simplify module TOC handling
  powerpc: Fix VSX enabling/flushing to also test MSR_FP and MSR_VEC
  powerpc/64: Fix flush_(d|i)cache_range() called from modules
  powerpc/bpf/jit: Disable classic BPF JIT on ppc64le
  BACKPORT: xfrm: Fix return value check of copy_sec_ctx.
  time: Fix ktime_get_raw() incorrect base accumulation
  sched/fair: prevent possible infinite loop in sched_group_energy
  UPSTREAM: MIPS: Fix build of compressed image
  ANDROID: qtaguid: Fix the UAF probelm with tag_ref_tree
  UPSTREAM: ANDROID: binder: remove waitqueue when thread exits.
  UPSTREAM: arm64/efi: Make strnlen() available to the EFI namespace
  UPSTREAM: ARM: boot: Add an implementation of strnlen for libfdt
  ANDROID: MIPS: Add ranchu[32r5|32r6|64]_defconfig
  FROMLIST: tty: goldfish: Enable 'earlycon' only if built-in
  FROMLIST: MIPS: ranchu: Add Ranchu as a new generic-based board
  FROMLIST: MIPS: Add noexec=on|off kernel parameter
  FROMLIST: MIPS: CPC: Map registers using DT in mips_cpc_default_phys_base()
  FROMLIST: dt-bindings: Document mti,mips-cpc binding
  FROMLIST: MIPS: math-emu: Mark fall throughs in switch statements with a comment
  FROMLIST: MIPS: math-emu: Avoid multiple assignment
  FROMLIST: MIPS: math-emu: Avoid an assignment within if statement condition
  FROMLIST: MIPS: math-emu: Declare function srl128() as static
  FROMLIST: MIPS: math-emu: Avoid definition duplication for macro DPXMULT()
  FROMLIST: MIPS: math-emu: Remove an unnecessary header inclusion
  UPSTREAM: scripts/dtc: Update to upstream version 0931cea3ba20
  UPSTREAM: scripts/dtc: dt_to_config - kernel config options for a devicetree
  UPSTREAM: scripts/dtc: Update to upstream version 53bf130b1cdd
  UPSTREAM: scripts/dtc: Update to upstream commit b06e55c88b9b
  UPSTREAM: scripts/dtc: dtx_diff - add info to error message
  UPSTREAM: dtc: create tool to diff device trees
  UPSTREAM: config: android-base: disable CONFIG_NFSD and CONFIG_NFS_FS
  UPSTREAM: config: android-base: add CGROUP_BPF
  UPSTREAM: config: android-base: add CONFIG_MODULES option
  UPSTREAM: config: android-base: add CONFIG_IKCONFIG option
  UPSTREAM: config: android-base: disable CONFIG_USELIB and CONFIG_FHANDLE
  UPSTREAM: config: android-base: enable hardened usercopy and kernel ASLR
  UPSTREAM: config: android: enable CONFIG_SECCOMP
  UPSTREAM: config: android: set SELinux as default security mode
  UPSTREAM: config: android: move device mapper options to recommended
  UPSTREAM: config/android: Remove CONFIG_IPV6_PRIVACY
  UPSTREAM: config: add android config fragments
  BACKPORT: MIPS: generic: Add a MAINTAINERS entry
  BACKPORT: irqchip/irq-goldfish-pic: Add Goldfish PIC driver
  UPSTREAM: dt-bindings/goldfish-pic: Add device tree binding for Goldfish PIC driver
  UPSTREAM: MIPS: Allow storing pgd in C0_CONTEXT for MIPSr6
  UPSTREAM: MIPS: CPS: Handle spurious VP starts more gracefully
  UPSTREAM: MIPS: CPS: Handle cores not powering down more gracefully
  UPSTREAM: MIPS: CPS: Prevent multi-core with dcache aliasing
  UPSTREAM: MIPS: CPS: Select CONFIG_SYS_SUPPORTS_SCHED_SMT for MIPSr6
  UPSTREAM: MIPS: CM: WARN on attempt to lock invalid VP, not BUG
  UPSTREAM: MIPS: CM: Avoid per-core locking with CM3 & higher
  UPSTREAM: MIPS: smp-cps: Avoid BUG() when offlining pre-r6 CPUs
  UPSTREAM: MIPS: smp-cps: Add support for CPU hotplug of MIPSr6 processors
  UPSTREAM: MIPS: generic: Bump default NR_CPUS to 16
  UPSTREAM: MIPS: pm-cps: Change FSB workaround to CPU blacklist
  UPSTREAM: MIPS: Fix early CM probing
  UPSTREAM: MIPS: smp-cps: Stop printing EJTAG exceptions to UART
  UPSTREAM: MIPS: smp-cps: Add nothreads kernel parameter
  UPSTREAM: MIPS: smp-cps: Support MIPSr6 Virtual Processors
  UPSTREAM: MIPS: smp-cps: Skip core setup if coherent
  UPSTREAM: MIPS: smp-cps: Pull boot config retrieval out of mips_cps_boot_vpes
  UPSTREAM: MIPS: smp-cps: Pull cache init into a function
  UPSTREAM: MIPS: smp-cps: Ensure our VP ident calculation is correct
  UPSTREAM: irqchip: mips-gic: Provide VP ID accessor
  UPSTREAM: irqchip: mips-gic: Use HW IDs for VPE_OTHER_ADDR
  UPSTREAM: MIPS: CM: Fix mips_cm_max_vp_width for UP kernels
  UPSTREAM: MIPS: CM: Add CM GCR_BEV_BASE accessors
  UPSTREAM: MIPS: CPC: Add start, stop and running CM3 CPC registers
  UPSTREAM: MIPS: pm-cps: Avoid offset overflow on MIPSr6
  UPSTREAM: MIPS: traps: Make sure secondary cores have a sane ebase register
  UPSTREAM: MIPS: Detect MIPSr6 Virtual Processor support
  UPSTREAM: Documentation: Add device tree binding for Goldfish FB driver
  UPSTREAM: MIPS: math-emu: Use preferred flavor of unsigned integer declarations
  UPSTREAM: MIPS: math-emu: <MADDF|MSUBF>.D: Fix accuracy (64-bit case)
  UPSTREAM: MIPS: math-emu: <MADDF|MSUBF>.S: Fix accuracy (32-bit case)
  UPSTREAM: MIPS: Update Goldfish RTC driver maintainer email address
  UPSTREAM: MIPS: Update RINT emulation maintainer email address
  UPSTREAM: MIPS: math-emu: do not use bools for arithmetic
  UPSTREAM: rtc: goldfish: Add RTC driver for Android emulator
  BACKPORT: dt-bindings: Add device tree binding for Goldfish RTC driver
  UPSTREAM: tty: goldfish: Implement support for kernel 'earlycon' parameter
  UPSTREAM: tty: goldfish: Use streaming DMA for r/w operations on Ranchu platforms
  UPSTREAM: tty: goldfish: Refactor constants to better reflect their nature
  UPSTREAM: MIPS: math-emu: Add FP emu debugfs stats for individual instructions
  UPSTREAM: MIPS: math-emu: Add FP emu debugfs clear functionality
  UPSTREAM: MIPS: math-emu: Add FP emu debugfs statistics for branches
  BACKPORT: MIPS: math-emu: CLASS.D: Zero bits 32-63 of the result
  BACKPORT: MIPS: math-emu: RINT.<D|S>: Fix several problems by reimplementation
  UPSTREAM: MIPS: math-emu: CMP.Sxxx.<D|S>: Prevent occurrences of SIGILL crashes
  UPSTREAM: MIPS: math-emu: <MADDF|MSUBF>.<D|S>: Clean up "maddf_flags" enumeration
  UPSTREAM: MIPS: math-emu: <MADDF|MSUBF>.<D|S>: Fix some cases of zero inputs
  UPSTREAM: MIPS: math-emu: <MADDF|MSUBF>.<D|S>: Fix some cases of infinite inputs
  UPSTREAM: MIPS: math-emu: <MADDF|MSUBF>.<D|S>: Fix NaN propagation
  UPSTREAM: tty: goldfish: Fix a parameter of a call to free_irq
  UPSTREAM: MIPS: VDSO: Fix clobber lists in fallback code paths
  UPSTREAM: MIPS: VDSO: Fix a mismatch between comment and preprocessor constant
  UPSTREAM: MIPS: VDSO: Add implementation of gettimeofday() fallback
  UPSTREAM: MIPS: VDSO: Add implementation of clock_gettime() fallback
  UPSTREAM: MIPS: VDSO: Fix conversions in do_monotonic()/do_monotonic_coarse()
  UPSTREAM: MIPS: unaligned: Add DSP lwx & lhx missaligned access support
  UPSTREAM: MIPS: build: Fix "-modd-spreg" switch usage when compiling for mips32r6
  UPSTREAM: MIPS: cmdline: Add support for 'memmap' parameter
  UPSTREAM: MIPS: math-emu: Handle zero accumulator case in MADDF and MSUBF separately
  UPSTREAM: MIPS: Support per-device DMA coherence
  UPSTREAM: MIPS: dma-default: Don't check hw_coherentio if device is non-coherent
  UPSTREAM: MIPS: Sanitise coherentio semantics
  UPSTREAM: MIPS: CPC: Provide default mips_cpc_default_phys_base to ignore CPC
  UPSTREAM: MIPS: generic: Introduce generic DT-based board support
  UPSTREAM: MIPS: Support generating Flattened Image Trees (.itb)
  UPSTREAM: MIPS: Allow emulation for unaligned [LS]DXC1 instructions
  UPSTREAM: MIPS: math-emu: Fix BC1EQZ and BC1NEZ condition handling
  UPSTREAM: MIPS: r2-on-r6-emu: Clear BLTZALL and BGEZALL debugfs counters
  UPSTREAM: MIPS: r2-on-r6-emu: Fix BLEZL and BGTZL identification
  UPSTREAM: MIPS: remove aliasing alignment if HW has antialising support
  BACKPORT: MIPS: store the appended dtb address in a variable
  UPSTREAM: MIPS: Fix FCSR Cause bit handling for correct SIGFPE issue
  UPSTREAM: MIPS: kernel: Audit and remove any unnecessary uses of module.h
  UPSTREAM: MIPS: c-r4k: Fix sigtramp SMP call to use kmap
  UPSTREAM: MIPS: c-r4k: Fix protected_writeback_scache_line for EVA
  UPSTREAM: MIPS: Spelling fix lets -> let's
  UPSTREAM: MIPS: R6: Fix typo
  UPSTREAM: MIPS: traps: Correct the SIGTRAP debug ABI in `do_watch' and `do_trap_or_bp'
  UPSTREAM: MIPS: inst.h: Rename cbcond{0,1}_op to pop{1,3}0_op
  UPSTREAM: MIPS: inst.h: Rename b{eq,ne}zcji[al]c_op to pop{6,7}6_op
  UPSTREAM: MIPS: math-emu: Fix m{add,sub}.s shifts
  UPSTREAM: MIPS: inst: Declare fsel_op for sel.fmt instruction
  UPSTREAM: MIPS: math-emu: Fix code indentation
  UPSTREAM: MIPS: math-emu: Fix bit-width in ieee754dp_{mul, maddf, msubf} comments
  UPSTREAM: MIPS: math-emu: Add z argument macros
  UPSTREAM: MIPS: math-emu: Unify ieee754dp_m{add,sub}f
  UPSTREAM: MIPS: math-emu: Unify ieee754sp_m{add,sub}f
  UPSTREAM: MIPS: math-emu: Emulate MIPSr6 sel.fmt instruction
  UPSTREAM: MIPS: math-emu: Fix BC1{EQ,NE}Z emulation
  UPSTREAM: MIPS: math-emu: Always propagate sNaN payload in quieting
  UPSTREAM: MIPS: Fix misspellings in comments.
  UPSTREAM: MIPS: math-emu: Add IEEE Std 754-2008 NaN encoding emulation
  UPSTREAM: MIPS: math-emu: Add IEEE Std 754-2008 ABS.fmt and NEG.fmt emulation
  UPSTREAM: MIPS: non-exec stack & heap when non-exec PT_GNU_STACK is present
  UPSTREAM: MIPS: Add IEEE Std 754 conformance mode selection
  UPSTREAM: MIPS: Determine the presence of IEEE Std 754-2008 features
  UPSTREAM: MIPS: Define the legacy-NaN and 2008-NaN features
  UPSTREAM: MIPS: ELF: Interpret the NAN2008 file header flag
  UPSTREAM: ELF: Also pass any interpreter's file header to `arch_check_elf'
  UPSTREAM: MIPS: Use a union to access the ELF file header
  UPSTREAM: MIPS: Fix delay slot emulation count in debugfs
  BACKPORT: exit_thread: accept a task parameter to be exited
  UPSTREAM: mn10300: let exit_fpu accept a task
  UPSTREAM: MIPS: Use per-mm page to execute branch delay slot instructions
  BACKPORT: s390: get rid of exit_thread()
  BACKPORT: exit_thread: remove empty bodies
  UPSTREAM: MIPS: Make flush_thread
  UPSTREAM: MIPS: Properly disable FPU in start_thread()
  UPSTREAM: MIPS: Select CONFIG_HANDLE_DOMAIN_IRQ and make it work.
  UPSTREAM: MIPS: math-emu: Fix typo
  UPSTREAM: MIPS: math-emu: dsemul: Remove an unused bit in ADDIUPC emulation
  UPSTREAM: MIPS: math-emu: dsemul: Reduce `get_isa16_mode' clutter
  UPSTREAM: MIPS: math-emu: dsemul: Correct description of the emulation frame
  UPSTREAM: MIPS: math-emu: Correct the emulation of microMIPS ADDIUPC instruction
  UPSTREAM: MIPS: math-emu: Make microMIPS branch delay slot emulation work
  UPSTREAM: MIPS: math-emu: dsemul: Fix ill formatting of microMIPS part
  UPSTREAM: MIPS: math-emu: Correctly handle NOP emulation

Conflicts:
drivers/irqchip/Kconfig
drivers/irqchip/Makefile
drivers/media/v4l2-core/v4l2-compat-ioctl32.c

Change-Id: I98374358ab24ce80dba3afa2f4562c71f45b7aab
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
6 years agodefconfig: msm: Enable FW loader user space helper for GVM
Ferry Zhou [Tue, 27 Feb 2018 03:00:50 +0000 (11:00 +0800)]
defconfig: msm: Enable FW loader user space helper for GVM

WLAN firmware files are located at non-standard firmware path.
So, enable user space helper to load firmware from non-standard
fs paths like /vendor/firmware and /firmware/image etc.

Change-Id: I60bbc89953ad66dabd76badc4f2117a06f5f0cc7
Signed-off-by: Ferry Zhou <tianguiz@codeaurora.org>
6 years agoi2c-msm-v2: Replace HW recovery mechanism with SW bit-banging
Shrey Vijay [Mon, 8 May 2017 14:09:59 +0000 (19:39 +0530)]
i2c-msm-v2: Replace HW recovery mechanism with SW bit-banging

HW recovery mechanism may not function as expected when HW samples
data line and finds it low during particular clocking period of the
recovery. Use SW bit-banging instead where SW generates clocks and
sniffs data line until data line is released by the slave.

Change-Id: I1a8b7930f256e0ff89f70b5267ee9d277c37bc42
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Signed-off-by: Shrey Vijay <shreyv@codeaurora.org>
6 years agomsm: mdss: Fix scalar LUT handling
Animesh Kishore [Fri, 23 Feb 2018 12:34:28 +0000 (18:04 +0530)]
msm: mdss: Fix scalar LUT handling

Add lock to serialize access between userspace
and kernel. Fix error handling for LUT allocation.

Change-Id: Ie86a8eb3e2a11852ae16d87ebc851afb6566732f
Signed-off-by: Animesh Kishore <animeshk@codeaurora.org>
6 years agoMerge "DBA: add VREG sequence in power on / off sequence"
Linux Build Service Account [Wed, 28 Feb 2018 06:06:14 +0000 (22:06 -0800)]
Merge "DBA:  add VREG sequence in power on / off sequence"

6 years agoMerge "msm: kgsl: Fix reading lm_sequence in _execute_reg_sequence()"
Linux Build Service Account [Wed, 28 Feb 2018 06:06:12 +0000 (22:06 -0800)]
Merge "msm: kgsl: Fix reading lm_sequence in _execute_reg_sequence()"

6 years agoMerge "ASoC: wcd934x-dsp-cntl: Limit array size of val"
Linux Build Service Account [Wed, 28 Feb 2018 06:06:11 +0000 (22:06 -0800)]
Merge "ASoC: wcd934x-dsp-cntl: Limit array size of val"

6 years agomsm: kgsl: Fix reading lm_sequence in _execute_reg_sequence()
Archana Sriram [Fri, 9 Feb 2018 12:20:19 +0000 (17:50 +0530)]
msm: kgsl: Fix reading lm_sequence in _execute_reg_sequence()

Added proper checks while reading lm_sequence array so that it
is not accessed beyond lm_size.

CRs-Fixed: 2175951
Change-Id: I639b07fba275aad0f62cc03fa11201c126e24812
Signed-off-by: Archana Sriram <apsrir@codeaurora.org>
6 years agosoc: qcom: hab: clean the pr_fmt redefined build warning
Yong Ding [Mon, 26 Feb 2018 09:32:11 +0000 (17:32 +0800)]
soc: qcom: hab: clean the pr_fmt redefined build warning

In include/linux/printk.h, pr_fmt is programmed in such
below way.
#ifndef pr_fmt
#define pr_fmt(fmt) fmt
#endif
And in hab.h, there is a customized pr_fmt definition. To
avoid its redefinition warning, it should be undefed before
the customized one if it already exists. And such warning
happens in building khab.c now.

Change-Id: Ia7a58bc32c7205ac27767f9738271ddce8fef339
Signed-off-by: Yong Ding <yongding@codeaurora.org>
6 years agoMerge "ARM: dts: qcom: Remove lpm performance index for sdm660"
Linux Build Service Account [Tue, 27 Feb 2018 03:08:43 +0000 (19:08 -0800)]
Merge "ARM: dts: qcom: Remove lpm performance index for sdm660"

6 years agoMerge "Revert "ARM: dts: msm: Enable ACD functionality for SDM660 silver cluster""
Linux Build Service Account [Tue, 27 Feb 2018 03:08:42 +0000 (19:08 -0800)]
Merge "Revert "ARM: dts: msm: Enable ACD functionality for SDM660 silver cluster""

6 years agoMerge "f_audio_source: Implement get_alt() support"
Linux Build Service Account [Tue, 27 Feb 2018 03:08:41 +0000 (19:08 -0800)]
Merge "f_audio_source: Implement get_alt() support"

6 years agoMerge "cnss2: Check pcie link state when resume"
Linux Build Service Account [Mon, 26 Feb 2018 14:11:56 +0000 (06:11 -0800)]
Merge "cnss2: Check pcie link state when resume"

6 years agoMerge "trace: ipc_logging: fix compile error when disable ipc_logging"
Linux Build Service Account [Mon, 26 Feb 2018 14:11:54 +0000 (06:11 -0800)]
Merge "trace: ipc_logging: fix compile error when disable ipc_logging"

6 years agoMerge "msm: camera_v2: Define new mcros for result success"
Linux Build Service Account [Mon, 26 Feb 2018 14:11:53 +0000 (06:11 -0800)]
Merge "msm: camera_v2: Define new mcros for result success"

6 years agof_audio_source: Implement get_alt() support
Vijayavardhan Vennapusa [Thu, 8 Feb 2018 07:54:05 +0000 (13:24 +0530)]
f_audio_source: Implement get_alt() support

Implement get_alt() callback which is required to support multiple
alternate settings of audio_source interface.

Change-Id: Id857af047759687ae2d626839b2dd31ad59db452
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
6 years agoMerge 4.4.118 into android-4.4
Greg Kroah-Hartman [Mon, 26 Feb 2018 08:24:57 +0000 (09:24 +0100)]
Merge 4.4.118 into android-4.4

Changes in 4.4.118
net: add dst_cache support
net: replace dst_cache ip6_tunnel implementation with the generic one
cfg80211: check dev_set_name() return value
mm,vmscan: Make unregister_shrinker() no-op if register_shrinker() failed.
xfrm: Fix stack-out-of-bounds read on socket policy lookup.
xfrm: check id proto in validate_tmpl()
blktrace: fix unlocked registration of tracepoints
drm: Require __GFP_NOFAIL for the legacy drm_modeset_lock_all
Provide a function to create a NUL-terminated string from unterminated data
selinux: ensure the context is NUL terminated in security_context_to_sid_core()
selinux: skip bounded transition processing if the policy isn't loaded
crypto: x86/twofish-3way - Fix %rbp usage
KVM: x86: fix escape of guest dr6 to the host
netfilter: x_tables: fix int overflow in xt_alloc_table_info()
netfilter: x_tables: avoid out-of-bounds reads in xt_request_find_{match|target}
netfilter: ipt_CLUSTERIP: fix out-of-bounds accesses in clusterip_tg_check()
netfilter: on sockopt() acquire sock lock only in the required scope
netfilter: xt_RATEEST: acquire xt_rateest_mutex for hash insert
net: avoid skb_warn_bad_offload on IS_ERR
ASoC: ux500: add MODULE_LICENSE tag
video: fbdev/mmp: add MODULE_LICENSE
arm64: dts: add #cooling-cells to CPU nodes
Make DST_CACHE a silent config option
dn_getsockoptdecnet: move nf_{get/set}sockopt outside sock lock
staging: android: ashmem: Fix a race condition in pin ioctls
binder: check for binder_thread allocation failure in binder_poll()
staging: iio: adc: ad7192: fix external frequency setting
usbip: keep usbip_device sockfd state in sync with tcp_socket
usb: build drivers/usb/common/ when USB_SUPPORT is set
ARM: OMAP2+: Fix SRAM virt to phys translation for save_secure_ram_context
ARM: AM33xx: PRM: Remove am33xx_pwrdm_read_prev_pwrst function
ARM: dts: Fix omap4 hang with GPS connected to USB by using wakeupgen
ARM: dts: am4372: Correct the interrupts_properties of McASP
perf top: Fix window dimensions change handling
perf bench numa: Fixup discontiguous/sparse numa nodes
media: s5k6aa: describe some function parameters
pinctrl: sunxi: Fix A80 interrupt pin bank
RDMA/cma: Make sure that PSN is not over max allowed
scripts/kernel-doc: Don't fail with status != 0 if error encountered with -none
ipvlan: Add the skb->mark as flow4's member to lookup route
powerpc/perf: Fix oops when grouping different pmu events
s390/dasd: prevent prefix I/O error
gianfar: fix a flooded alignment reports because of padding issue.
net_sched: red: Avoid devision by zero
net_sched: red: Avoid illegal values
btrfs: Fix possible off-by-one in btrfs_search_path_in_tree
509: fix printing uninitialized stack memory when OID is empty
dmaengine: ioat: Fix error handling path
dmaengine: at_hdmac: fix potential NULL pointer dereference in atc_prep_dma_interleaved
clk: fix a panic error caused by accessing NULL pointer
ASoC: rockchip: disable clock on error
spi: sun4i: disable clocks in the remove function
xfrm: Fix stack-out-of-bounds with misconfigured transport mode policies.
drm/armada: fix leak of crtc structure
dmaengine: jz4740: disable/unprepare clk if probe fails
mm/early_ioremap: Fix boot hang with earlyprintk=efi,keep
x86/mm/kmmio: Fix mmiotrace for page unaligned addresses
xen: XEN_ACPI_PROCESSOR is Dom0-only
hippi: Fix a Fix a possible sleep-in-atomic bug in rr_close
virtio_balloon: prevent uninitialized variable use
isdn: icn: remove a #warning
vmxnet3: prevent building with 64K pages
gpio: intel-mid: Fix build warning when !CONFIG_PM
platform/x86: intel_mid_thermal: Fix suspend handlers unused warning
video: fbdev: via: remove possibly unused variables
scsi: advansys: fix build warning for PCI=n
x86/ras/inject: Make it depend on X86_LOCAL_APIC=y
arm64: define BUG() instruction without CONFIG_BUG
x86/fpu/math-emu: Fix possible uninitialized variable use
tools build: Add tools tree support for 'make -s'
x86/build: Silence the build with "make -s"
thermal: fix INTEL_SOC_DTS_IOSF_CORE dependencies
x86: add MULTIUSER dependency for KVM
x86/platform: Add PCI dependency for PUNIT_ATOM_DEBUG
scsi: advansys: fix uninitialized data access
arm64: Kconfig: select COMPAT_BINFMT_ELF only when BINFMT_ELF is set
ALSA: hda/ca0132 - fix possible NULL pointer use
reiserfs: avoid a -Wmaybe-uninitialized warning
ssb: mark ssb_bus_register as __maybe_unused
thermal: spear: use __maybe_unused for PM functions
x86/boot: Avoid warning for zero-filling .bss
scsi: sim710: fix build warning
drivers/net: fix eisa_driver probe section mismatch
dpt_i2o: fix build warning
profile: hide unused functions when !CONFIG_PROC_FS
md: avoid warning for 32-bit sector_t
mtd: ichxrom: maybe-uninitialized with gcc-4.9
mtd: maps: add __init attribute
mptfusion: hide unused seq_mpt_print_ioc_summary function
scsi: fdomain: drop fdomain_pci_tbl when built-in
video: fbdev: sis: remove unused variable
staging: ste_rmi4: avoid unused function warnings
fbdev: sis: enforce selection of at least one backend
video: Use bool instead int pointer for get_opt_bool() argument
scsi: mvumi: use __maybe_unused to hide pm functions
SCSI: initio: remove duplicate module device table
pwc: hide unused label
usb: musb/ux500: remove duplicate check for dma_is_compatible
tty: hvc_xen: hide xen_console_remove when unused
target/user: Fix cast from pointer to phys_addr_t
driver-core: use 'dev' argument in dev_dbg_ratelimited stub
fbdev: auo_k190x: avoid unused function warnings
amd-xgbe: Fix unused suspend handlers build warning
mtd: sh_flctl: pass FIFO as physical address
mtd: cfi: enforce valid geometry configuration
fbdev: s6e8ax0: avoid unused function warnings
modsign: hide openssl output in silent builds
Drivers: hv: vmbus: fix build warning
fbdev: sm712fb: avoid unused function warnings
hwrng: exynos - use __maybe_unused to hide pm functions
USB: cdc_subset: only build when one driver is enabled
rtlwifi: fix gcc-6 indentation warning
staging: wilc1000: fix kbuild test robot error
x86/platform/olpc: Fix resume handler build warning
netfilter: ipvs: avoid unused variable warnings
ipv4: ipconfig: avoid unused ic_proto_used symbol
tc1100-wmi: fix build warning when CONFIG_PM not enabled
tlan: avoid unused label with PCI=n
drm/vmwgfx: use *_32_bits() macros
tty: cyclades: cyz_interrupt is only used for PCI
genirq/msi: Add stubs for get_cached_msi_msg/pci_write_msi_msg
ASoC: mediatek: add i2c dependency
iio: adc: axp288: remove redundant duplicate const on axp288_adc_channels
infiniband: cxgb4: use %pR format string for printing resources
b2c2: flexcop: avoid unused function warnings
i2c: remove __init from i2c_register_board_info()
staging: unisys: visorinput depends on INPUT
tc358743: fix register i2c_rd/wr functions
drm/nouveau: hide gcc-4.9 -Wmaybe-uninitialized
Input: tca8418_keypad - hide gcc-4.9 -Wmaybe-uninitialized warning
KVM: add X86_LOCAL_APIC dependency
go7007: add MEDIA_CAMERA_SUPPORT dependency
em28xx: only use mt9v011 if camera support is enabled
ISDN: eicon: reduce stack size of sig_ind function
ASoC: rockchip: use __maybe_unused to hide st_irq_syscfg_resume
serial: 8250_mid: fix broken DMA dependency
drm/gma500: Sanity-check pipe index
hdpvr: hide unused variable
v4l: remove MEDIA_TUNER dependency for VIDEO_TUNER
cw1200: fix bogus maybe-uninitialized warning
wireless: cw1200: use __maybe_unused to hide pm functions_
perf/x86: Shut up false-positive -Wmaybe-uninitialized warning
dmaengine: zx: fix build warning
net: hp100: remove unnecessary #ifdefs
gpio: xgene: mark PM functions as __maybe_unused
ncpfs: fix unused variable warning
Revert "power: bq27xxx_battery: Remove unneeded dependency in Kconfig"
power: bq27xxx_battery: mark some symbols __maybe_unused
isdn: sc: work around type mismatch warning
binfmt_elf: compat: avoid unused function warning
idle: i7300: add PCI dependency
usb: phy: msm add regulator dependency
ncr5380: shut up gcc indentation warning
ARM: tegra: select USB_ULPI from EHCI rather than platform
ASoC: Intel: Kconfig: fix build when ACPI is not enabled
netlink: fix nla_put_{u8,u16,u32} for KASAN
dell-wmi, dell-laptop: depends DMI
genksyms: Fix segfault with invalid declarations
x86/microcode/AMD: Change load_microcode_amd()'s param to bool to fix preemptibility bug
drm/gma500: remove helper function
kasan: rework Kconfig settings
KVM: async_pf: Fix #DF due to inject "Page not Present" and "Page Ready" exceptions simultaneously
x86/retpoline: Remove the esp/rsp thunk
KVM: x86: Make indirect calls in emulator speculation safe
KVM: VMX: Make indirect call speculation safe
module/retpoline: Warn about missing retpoline in module
x86/nospec: Fix header guards names
x86/bugs: Drop one "mitigation" from dmesg
x86/cpu/bugs: Make retpoline module warning conditional
x86/spectre: Check CONFIG_RETPOLINE in command line parser
Documentation: Document array_index_nospec
array_index_nospec: Sanitize speculative array de-references
x86: Implement array_index_mask_nospec
x86: Introduce barrier_nospec
x86/get_user: Use pointer masking to limit speculation
x86/syscall: Sanitize syscall table de-references under speculation
vfs, fdtable: Prevent bounds-check bypass via speculative execution
nl80211: Sanitize array index in parse_txq_params
x86/spectre: Report get_user mitigation for spectre_v1
x86/spectre: Fix spelling mistake: "vunerable"-> "vulnerable"
x86/paravirt: Remove 'noreplace-paravirt' cmdline option
x86/kvm: Update spectre-v1 mitigation
x86/retpoline: Avoid retpolines for built-in __init functions
x86/spectre: Simplify spectre_v2 command line parsing
x86/speculation: Fix typo IBRS_ATT, which should be IBRS_ALL
KVM: nVMX: kmap() can't fail
KVM: nVMX: vmx_complete_nested_posted_interrupt() can't fail
kvm: nVMX: Fix kernel panics induced by illegal INVEPT/INVVPID types
KVM: VMX: clean up declaration of VPID/EPT invalidation types
KVM: nVMX: invvpid handling improvements
crypto: s5p-sss - Fix kernel Oops in AES-ECB mode
net: dst_cache_per_cpu_dst_set() can be static
Linux 4.4.118

Change-Id: I01c76e1c15a611e13a1e98092bc5c01cdb5b6adb
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
6 years agoARM: dts: qcom: Remove lpm performance index for sdm660
Tirupathi Reddy [Fri, 12 Jan 2018 04:44:37 +0000 (10:14 +0530)]
ARM: dts: qcom: Remove lpm performance index for sdm660

Do not use a fixed OSM performance index for sdm660 CPU
clusters while entering certain low power modes.

CRs-Fixed: 2171214
Change-Id: I4cdcd1f950174ce5570d9546590e6d135d42b426
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
6 years agoRevert "ARM: dts: msm: Enable ACD functionality for SDM660 silver cluster"
Tirupathi Reddy [Fri, 12 Jan 2018 03:59:06 +0000 (09:29 +0530)]
Revert "ARM: dts: msm: Enable ACD functionality for SDM660 silver cluster"

This reverts commit 791e28b55c04a0c786d64dd8e8a2083b9a225a10.
Disable ACD functionality for SDM660 silver cluster
to address stability issues.

CRs-Fixed: 2171214
Change-Id: Id598c7348e656bf01a21510a27d68fb8beb08fbb
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
6 years agoDBA: add VREG sequence in power on / off sequence
Camus Wong [Sun, 25 Feb 2018 06:57:30 +0000 (01:57 -0500)]
DBA:  add VREG sequence in power on / off sequence

VREG was enabled during init and never turn off until the bridge chip
unregister.  We need to add VREG on/off sequence into bridge chip
power on/off in order to reduce platform current draw.

Change-Id: Ib8d59665c55035c36d10d868fb256fcfaa243f84
Signed-off-by: Camus Wong <camusw@codeaurora.org>
6 years agomsm: ipa3: Fix to validate the user inputs
Mohammed Javid [Wed, 14 Feb 2018 13:21:10 +0000 (18:51 +0530)]
msm: ipa3: Fix to validate the user inputs

Miss to Validate user inputs for last entry while
sending the QMI message to modem. Adding code changes to
fix to validate user inputs for last entry.

Change-Id: If2c6c4fbfc922d56355d26a16f844fd57d4992ac
Acked-by: Ashok Vuyyuru <avuyyuru@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
6 years agoLinux 4.4.118
Greg Kroah-Hartman [Sun, 25 Feb 2018 10:03:55 +0000 (11:03 +0100)]
Linux 4.4.118

6 years agonet: dst_cache_per_cpu_dst_set() can be static
Wu Fengguang [Fri, 18 Mar 2016 15:27:28 +0000 (23:27 +0800)]
net: dst_cache_per_cpu_dst_set() can be static

commit b73f96fcb49ec90c2f837719893e7b25fcdf08d8 upstream.

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agocrypto: s5p-sss - Fix kernel Oops in AES-ECB mode
Kamil Konieczny [Wed, 7 Feb 2018 15:52:09 +0000 (16:52 +0100)]
crypto: s5p-sss - Fix kernel Oops in AES-ECB mode

commit c927b080c67e3e97193c81fc1d27f4251bf4e036 upstream.

In AES-ECB mode crypt is done with key only, so any use of IV
can cause kernel Oops. Use IV only in AES-CBC and AES-CTR.

Signed-off-by: Kamil Konieczny <k.konieczny@partner.samsung.com>
Reported-by: Anand Moon <linux.amoon@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Cc: stable@vger.kernel.org # can be applied after commit 8f9702aad138
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoKVM: nVMX: invvpid handling improvements
Jan Dakinevich [Fri, 23 Feb 2018 10:42:18 +0000 (11:42 +0100)]
KVM: nVMX: invvpid handling improvements

commit bcdde302b8268ef7dbc4ddbdaffb5b44eafe9a1e upstream

 - Expose all invalidation types to the L1

 - Reject invvpid instruction, if L1 passed zero vpid value to single
   context invalidations

Signed-off-by: Jan Dakinevich <jan.dakinevich@gmail.com>
Tested-by: Ladi Prosek <lprosek@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
[jwang: port to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoKVM: VMX: clean up declaration of VPID/EPT invalidation types
Jan Dakinevich [Fri, 23 Feb 2018 10:42:17 +0000 (11:42 +0100)]
KVM: VMX: clean up declaration of VPID/EPT invalidation types

commit 63f3ac48133a19110c8a3666028dbd9b1bf3dcb3 upstream

- Remove VMX_EPT_EXTENT_INDIVIDUAL_ADDR, since there is no such type of
   EPT invalidation

 - Add missing VPID types names

Signed-off-by: Jan Dakinevich <jan.dakinevich@gmail.com>
Tested-by: Ladi Prosek <lprosek@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
[jwang: port to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agokvm: nVMX: Fix kernel panics induced by illegal INVEPT/INVVPID types
Jim Mattson [Fri, 23 Feb 2018 10:42:16 +0000 (11:42 +0100)]
kvm: nVMX: Fix kernel panics induced by illegal INVEPT/INVVPID types

commit 85c856b39b479dde410ddd09df1da745343010c9 upstream

Bitwise shifts by amounts greater than or equal to the width of the left
operand are undefined. A malicious guest can exploit this to crash a
32-bit host, due to the BUG_ON(1)'s in handle_{invept,invvpid}.

Signed-off-by: Jim Mattson <jmattson@google.com>
Message-Id: <1477496318-17681-1-git-send-email-jmattson@google.com>
[Change 1UL to 1, to match the range check on the shift count. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
[jwang: port from linux-4.9 to 4.4 ]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoKVM: nVMX: vmx_complete_nested_posted_interrupt() can't fail
David Hildenbrand [Fri, 23 Feb 2018 10:42:15 +0000 (11:42 +0100)]
KVM: nVMX: vmx_complete_nested_posted_interrupt() can't fail

(cherry picked from commit 6342c50ad12e8ce0736e722184a7dbdea4a3477f)

vmx_complete_nested_posted_interrupt() can't fail, let's turn it into
a void function.

Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[jwang: port to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoKVM: nVMX: kmap() can't fail
David Hildenbrand [Fri, 23 Feb 2018 10:42:14 +0000 (11:42 +0100)]
KVM: nVMX: kmap() can't fail

commit 42cf014d38d8822cce63703a467e00f65d000952 upstream.

kmap() can't fail, therefore it will always return a valid pointer. Let's
just get rid of the unnecessary checks.

Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
[jwang: port to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agox86/speculation: Fix typo IBRS_ATT, which should be IBRS_ALL
Darren Kenny [Fri, 23 Feb 2018 10:42:13 +0000 (11:42 +0100)]
x86/speculation: Fix typo IBRS_ATT, which should be IBRS_ALL

(cherry picked from commit af189c95a371b59f493dbe0f50c0a09724868881)

Fixes: 117cc7a908c83 ("x86/retpoline: Fill return stack buffer on vmexit")
Signed-off-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Link: https://lkml.kernel.org/r/20180202191220.blvgkgutojecxr3b@starbug-vm.ie.oracle.com
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[jwang: cherry pick to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agox86/spectre: Simplify spectre_v2 command line parsing
KarimAllah Ahmed [Fri, 23 Feb 2018 10:42:12 +0000 (11:42 +0100)]
x86/spectre: Simplify spectre_v2 command line parsing

(cherry picked from commit 9005c6834c0ffdfe46afa76656bd9276cca864f6)

[dwmw2: Use ARRAY_SIZE]

Signed-off-by: KarimAllah Ahmed <karahmed@amazon.de>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: peterz@infradead.org
Cc: bp@alien8.de
Link: https://lkml.kernel.org/r/1517484441-1420-3-git-send-email-dwmw@amazon.co.uk
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[jwang: cherry pick to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agox86/retpoline: Avoid retpolines for built-in __init functions
David Woodhouse [Fri, 23 Feb 2018 10:42:11 +0000 (11:42 +0100)]
x86/retpoline: Avoid retpolines for built-in __init functions

(cherry picked from commit 66f793099a636862a71c59d4a6ba91387b155e0c)

There's no point in building init code with retpolines, since it runs before
any potentially hostile userspace does. And before the retpoline is actually
ALTERNATIVEd into place, for much of it.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: karahmed@amazon.de
Cc: peterz@infradead.org
Cc: bp@alien8.de
Link: https://lkml.kernel.org/r/1517484441-1420-2-git-send-email-dwmw@amazon.co.uk
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[jwang: port to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agox86/kvm: Update spectre-v1 mitigation
Dan Williams [Fri, 23 Feb 2018 10:42:10 +0000 (11:42 +0100)]
x86/kvm: Update spectre-v1 mitigation

(cherry picked from commit 085331dfc6bbe3501fb936e657331ca943827600)

Commit 75f139aaf896 "KVM: x86: Add memory barrier on vmcs field lookup"
added a raw 'asm("lfence");' to prevent a bounds check bypass of
'vmcs_field_to_offset_table'.

The lfence can be avoided in this path by using the array_index_nospec()
helper designed for these types of fixes.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: Andrew Honig <ahonig@google.com>
Cc: kvm@vger.kernel.org
Cc: Jim Mattson <jmattson@google.com>
Link: https://lkml.kernel.org/r/151744959670.6342.3001723920950249067.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[jwang: cherry pick to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agox86/paravirt: Remove 'noreplace-paravirt' cmdline option
Josh Poimboeuf [Fri, 23 Feb 2018 10:42:09 +0000 (11:42 +0100)]
x86/paravirt: Remove 'noreplace-paravirt' cmdline option

(cherry picked from commit 12c69f1e94c89d40696e83804dd2f0965b5250cd)

The 'noreplace-paravirt' option disables paravirt patching, leaving the
original pv indirect calls in place.

That's highly incompatible with retpolines, unless we want to uglify
paravirt even further and convert the paravirt calls to retpolines.

As far as I can tell, the option doesn't seem to be useful for much
other than introducing surprising corner cases and making the kernel
vulnerable to Spectre v2.  It was probably a debug option from the early
paravirt days.  So just remove it.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Juergen Gross <jgross@suse.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Jun Nakajima <jun.nakajima@intel.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Asit Mallick <asit.k.mallick@intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jason Baron <jbaron@akamai.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Alok Kataria <akataria@vmware.com>
Cc: Arjan Van De Ven <arjan.van.de.ven@intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Link: https://lkml.kernel.org/r/20180131041333.2x6blhxirc2kclrq@treble
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[jwang: chery pick to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agox86/spectre: Fix spelling mistake: "vunerable"-> "vulnerable"
Colin Ian King [Fri, 23 Feb 2018 10:42:08 +0000 (11:42 +0100)]
x86/spectre: Fix spelling mistake: "vunerable"-> "vulnerable"

(cherry picked from commit e698dcdfcda41efd0984de539767b4cddd235f1e)

Trivial fix to spelling mistake in pr_err error message text.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: kernel-janitors@vger.kernel.org
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Link: https://lkml.kernel.org/r/20180130193218.9271-1-colin.king@canonical.com
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[jwang: cherry pick to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agox86/spectre: Report get_user mitigation for spectre_v1
Dan Williams [Fri, 23 Feb 2018 10:42:07 +0000 (11:42 +0100)]
x86/spectre: Report get_user mitigation for spectre_v1

(cherry picked from commit edfbae53dab8348fca778531be9f4855d2ca0360)

Reflect the presence of get_user(), __get_user(), and 'syscall' protections
in sysfs. The expectation is that new and better tooling will allow the
kernel to grow more usages of array_index_nospec(), for now, only claim
mitigation for __user pointer de-references.

Reported-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arch@vger.kernel.org
Cc: kernel-hardening@lists.openwall.com
Cc: gregkh@linuxfoundation.org
Cc: torvalds@linux-foundation.org
Cc: alan@linux.intel.com
Link: https://lkml.kernel.org/r/151727420158.33451.11658324346540434635.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[jwang: cherry pick to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agonl80211: Sanitize array index in parse_txq_params
Dan Williams [Fri, 23 Feb 2018 10:42:06 +0000 (11:42 +0100)]
nl80211: Sanitize array index in parse_txq_params

(cherry picked from commit 259d8c1e984318497c84eef547bbb6b1d9f4eb05)

Wireless drivers rely on parse_txq_params to validate that txq_params->ac
is less than NL80211_NUM_ACS by the time the low-level driver's ->conf_tx()
handler is called. Use a new helper, array_index_nospec(), to sanitize
txq_params->ac with respect to speculation. I.e. ensure that any
speculation into ->conf_tx() handlers is done with a value of
txq_params->ac that is within the bounds of [0, NL80211_NUM_ACS).

Reported-by: Christian Lamparter <chunkeey@gmail.com>
Reported-by: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-arch@vger.kernel.org
Cc: kernel-hardening@lists.openwall.com
Cc: gregkh@linuxfoundation.org
Cc: linux-wireless@vger.kernel.org
Cc: torvalds@linux-foundation.org
Cc: "David S. Miller" <davem@davemloft.net>
Cc: alan@linux.intel.com
Link: https://lkml.kernel.org/r/151727419584.33451.7700736761686184303.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[jwang: cherry pick to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agovfs, fdtable: Prevent bounds-check bypass via speculative execution
Dan Williams [Fri, 23 Feb 2018 10:42:05 +0000 (11:42 +0100)]
vfs, fdtable: Prevent bounds-check bypass via speculative execution

(cherry picked from commit 56c30ba7b348b90484969054d561f711ba196507)

'fd' is a user controlled value that is used as a data dependency to
read from the 'fdt->fd' array.  In order to avoid potential leaks of
kernel memory values, block speculative execution of the instruction
stream that could issue reads based on an invalid 'file *' returned from
__fcheck_files.

Co-developed-by: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arch@vger.kernel.org
Cc: kernel-hardening@lists.openwall.com
Cc: gregkh@linuxfoundation.org
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: torvalds@linux-foundation.org
Cc: alan@linux.intel.com
Link: https://lkml.kernel.org/r/151727418500.33451.17392199002892248656.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[jwang: cherry pick to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agox86/syscall: Sanitize syscall table de-references under speculation
Dan Williams [Fri, 23 Feb 2018 10:42:04 +0000 (11:42 +0100)]
x86/syscall: Sanitize syscall table de-references under speculation

(cherry picked from commit 2fbd7af5af8665d18bcefae3e9700be07e22b681)

The syscall table base is a user controlled function pointer in kernel
space. Use array_index_nospec() to prevent any out of bounds speculation.

While retpoline prevents speculating into a userspace directed target it
does not stop the pointer de-reference, the concern is leaking memory
relative to the syscall table base, by observing instruction cache
behavior.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arch@vger.kernel.org
Cc: kernel-hardening@lists.openwall.com
Cc: gregkh@linuxfoundation.org
Cc: Andy Lutomirski <luto@kernel.org>
Cc: alan@linux.intel.com
Link: https://lkml.kernel.org/r/151727417984.33451.1216731042505722161.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[jwang: port to 4.4, no syscall_64]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agox86/get_user: Use pointer masking to limit speculation
Dan Williams [Fri, 23 Feb 2018 10:42:03 +0000 (11:42 +0100)]
x86/get_user: Use pointer masking to limit speculation

(cherry picked from commit c7f631cb07e7da06ac1d231ca178452339e32a94)

Quoting Linus:

    I do think that it would be a good idea to very expressly document
    the fact that it's not that the user access itself is unsafe. I do
    agree that things like "get_user()" want to be protected, but not
    because of any direct bugs or problems with get_user() and friends,
    but simply because get_user() is an excellent source of a pointer
    that is obviously controlled from a potentially attacking user
    space. So it's a prime candidate for then finding _subsequent_
    accesses that can then be used to perturb the cache.

Unlike the __get_user() case get_user() includes the address limit check
near the pointer de-reference. With that locality the speculation can be
mitigated with pointer narrowing rather than a barrier, i.e.
array_index_nospec(). Where the narrowing is performed by:

cmp %limit, %ptr
sbb %mask, %mask
and %mask, %ptr

With respect to speculation the value of %ptr is either less than %limit
or NULL.

Co-developed-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arch@vger.kernel.org
Cc: Kees Cook <keescook@chromium.org>
Cc: kernel-hardening@lists.openwall.com
Cc: gregkh@linuxfoundation.org
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: torvalds@linux-foundation.org
Cc: alan@linux.intel.com
Link: https://lkml.kernel.org/r/151727417469.33451.11804043010080838495.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[jwang: port to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agox86: Introduce barrier_nospec
Dan Williams [Fri, 23 Feb 2018 10:42:02 +0000 (11:42 +0100)]
x86: Introduce barrier_nospec

(cherry picked from commit b3d7ad85b80bbc404635dca80f5b129f6242bc7a)

Rename the open coded form of this instruction sequence from
rdtsc_ordered() into a generic barrier primitive, barrier_nospec().

One of the mitigations for Spectre variant1 vulnerabilities is to fence
speculative execution after successfully validating a bounds check. I.e.
force the result of a bounds check to resolve in the instruction pipeline
to ensure speculative execution honors that result before potentially
operating on out-of-bounds data.

No functional changes.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Suggested-by: Andi Kleen <ak@linux.intel.com>
Suggested-by: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arch@vger.kernel.org
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: kernel-hardening@lists.openwall.com
Cc: gregkh@linuxfoundation.org
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: alan@linux.intel.com
Link: https://lkml.kernel.org/r/151727415361.33451.9049453007262764675.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[jwang: cherry pick to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agox86: Implement array_index_mask_nospec
Dan Williams [Fri, 23 Feb 2018 10:42:01 +0000 (11:42 +0100)]
x86: Implement array_index_mask_nospec

(cherry picked from commit babdde2698d482b6c0de1eab4f697cf5856c5859)

array_index_nospec() uses a mask to sanitize user controllable array
indexes, i.e. generate a 0 mask if 'index' >= 'size', and a ~0 mask
otherwise. While the default array_index_mask_nospec() handles the
carry-bit from the (index - size) result in software.

The x86 array_index_mask_nospec() does the same, but the carry-bit is
handled in the processor CF flag without conditional instructions in the
control flow.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arch@vger.kernel.org
Cc: kernel-hardening@lists.openwall.com
Cc: gregkh@linuxfoundation.org
Cc: alan@linux.intel.com
Link: https://lkml.kernel.org/r/151727414808.33451.1873237130672785331.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[jwang:chery pick to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoarray_index_nospec: Sanitize speculative array de-references
Dan Williams [Fri, 23 Feb 2018 10:42:00 +0000 (11:42 +0100)]
array_index_nospec: Sanitize speculative array de-references

(cherry picked from commit f3804203306e098dae9ca51540fcd5eb700d7f40)

array_index_nospec() is proposed as a generic mechanism to mitigate
against Spectre-variant-1 attacks, i.e. an attack that bypasses boundary
checks via speculative execution. The array_index_nospec()
implementation is expected to be safe for current generation CPUs across
multiple architectures (ARM, x86).

Based on an original implementation by Linus Torvalds, tweaked to remove
speculative flows by Alexei Starovoitov, and tweaked again by Linus to
introduce an x86 assembly implementation for the mask generation.

Co-developed-by: Linus Torvalds <torvalds@linux-foundation.org>
Co-developed-by: Alexei Starovoitov <ast@kernel.org>
Suggested-by: Cyril Novikov <cnovikov@lynx.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arch@vger.kernel.org
Cc: kernel-hardening@lists.openwall.com
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: gregkh@linuxfoundation.org
Cc: torvalds@linux-foundation.org
Cc: alan@linux.intel.com
Link: https://lkml.kernel.org/r/151727414229.33451.18411580953862676575.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[jwang: cherry pick to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoDocumentation: Document array_index_nospec
Mark Rutland [Fri, 23 Feb 2018 10:41:59 +0000 (11:41 +0100)]
Documentation: Document array_index_nospec

(cherry picked from commit f84a56f73dddaeac1dba8045b007f742f61cd2da)

Document the rationale and usage of the new array_index_nospec() helper.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Kees Cook <keescook@chromium.org>
Cc: linux-arch@vger.kernel.org
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: gregkh@linuxfoundation.org
Cc: kernel-hardening@lists.openwall.com
Cc: torvalds@linux-foundation.org
Cc: alan@linux.intel.com
Link: https://lkml.kernel.org/r/151727413645.33451.15878817161436755393.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[jwang: cherry pick to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agox86/spectre: Check CONFIG_RETPOLINE in command line parser
Dou Liyang [Fri, 23 Feb 2018 10:41:58 +0000 (11:41 +0100)]
x86/spectre: Check CONFIG_RETPOLINE in command line parser

(cherry picked from commit 9471eee9186a46893726e22ebb54cade3f9bc043)

The spectre_v2 option 'auto' does not check whether CONFIG_RETPOLINE is
enabled. As a consequence it fails to emit the appropriate warning and sets
feature flags which have no effect at all.

Add the missing IS_ENABLED() check.

Fixes: da285121560e ("x86/spectre: Add boot time option to select Spectre v2 mitigation")
Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: ak@linux.intel.com
Cc: peterz@infradead.org
Cc: Tomohiro <misono.tomohiro@jp.fujitsu.com>
Cc: dave.hansen@intel.com
Cc: bp@alien8.de
Cc: arjan@linux.intel.com
Cc: dwmw@amazon.co.uk
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/f5892721-7528-3647-08fb-f8d10e65ad87@cn.fujitsu.com
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[jwang: cherry-pick to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agox86/cpu/bugs: Make retpoline module warning conditional
Thomas Gleixner [Fri, 23 Feb 2018 10:41:57 +0000 (11:41 +0100)]
x86/cpu/bugs: Make retpoline module warning conditional

(cherry picked from commit e383095c7fe8d218e00ec0f83e4b95ed4e627b02)

If sysfs is disabled and RETPOLINE not defined:

arch/x86/kernel/cpu/bugs.c:97:13: warning: ‘spectre_v2_bad_module’ defined but not used
[-Wunused-variable]
 static bool spectre_v2_bad_module;

Hide it.

Fixes: caf7501a1b4e ("module/retpoline: Warn about missing retpoline in module")
Reported-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[jwang: port to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agox86/bugs: Drop one "mitigation" from dmesg
Borislav Petkov [Fri, 23 Feb 2018 10:41:56 +0000 (11:41 +0100)]
x86/bugs: Drop one "mitigation" from dmesg

(cherry picked from commit 55fa19d3e51f33d9cd4056d25836d93abf9438db)

Make

[    0.031118] Spectre V2 mitigation: Mitigation: Full generic retpoline

into

[    0.031118] Spectre V2: Mitigation: Full generic retpoline

to reduce the mitigation mitigations strings.

Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: riel@redhat.com
Cc: ak@linux.intel.com
Cc: peterz@infradead.org
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: jikos@kernel.org
Cc: luto@amacapital.net
Cc: dave.hansen@intel.com
Cc: torvalds@linux-foundation.org
Cc: keescook@google.com
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: tim.c.chen@linux.intel.com
Cc: pjt@google.com
Link: https://lkml.kernel.org/r/20180126121139.31959-5-bp@alien8.de
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[jwang: port to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agox86/nospec: Fix header guards names
Borislav Petkov [Fri, 23 Feb 2018 10:41:55 +0000 (11:41 +0100)]
x86/nospec: Fix header guards names

(cherry picked from commit 7a32fc51ca938e67974cbb9db31e1a43f98345a9)

... to adhere to the _ASM_X86_ naming scheme.

No functional change.

Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: riel@redhat.com
Cc: ak@linux.intel.com
Cc: peterz@infradead.org
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: jikos@kernel.org
Cc: luto@amacapital.net
Cc: dave.hansen@intel.com
Cc: torvalds@linux-foundation.org
Cc: keescook@google.com
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: tim.c.chen@linux.intel.com
Cc: gregkh@linux-foundation.org
Cc: pjt@google.com
Link: https://lkml.kernel.org/r/20180126121139.31959-3-bp@alien8.de
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[cherry-pick to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agomodule/retpoline: Warn about missing retpoline in module
Andi Kleen [Fri, 23 Feb 2018 10:41:54 +0000 (11:41 +0100)]
module/retpoline: Warn about missing retpoline in module

(cherry picked from commit caf7501a1b4ec964190f31f9c3f163de252273b8)

There's a risk that a kernel which has full retpoline mitigations becomes
vulnerable when a module gets loaded that hasn't been compiled with the
right compiler or the right option.

To enable detection of that mismatch at module load time, add a module info
string "retpoline" at build time when the module was compiled with
retpoline support. This only covers compiled C source, but assembler source
or prebuilt object files are not checked.

If a retpoline enabled kernel detects a non retpoline protected module at
load time, print a warning and report it in the sysfs vulnerability file.

[ tglx: Massaged changelog ]

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: gregkh@linuxfoundation.org
Cc: torvalds@linux-foundation.org
Cc: jeyu@kernel.org
Cc: arjan@linux.intel.com
Link: https://lkml.kernel.org/r/20180125235028.31211-1-andi@firstfloor.org
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[jwang: port to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoKVM: VMX: Make indirect call speculation safe
Peter Zijlstra [Fri, 23 Feb 2018 10:41:53 +0000 (11:41 +0100)]
KVM: VMX: Make indirect call speculation safe

(cherry picked from commit c940a3fb1e2e9b7d03228ab28f375fb5a47ff699)

Replace indirect call with CALL_NOSPEC.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Jun Nakajima <jun.nakajima@intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: rga@amazon.de
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Asit Mallick <asit.k.mallick@intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Jason Baron <jbaron@akamai.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Arjan Van De Ven <arjan.van.de.ven@intel.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Link: https://lkml.kernel.org/r/20180125095843.645776917@infradead.org
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[backport to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoKVM: x86: Make indirect calls in emulator speculation safe
Peter Zijlstra [Fri, 23 Feb 2018 10:41:52 +0000 (11:41 +0100)]
KVM: x86: Make indirect calls in emulator speculation safe

(cherry picked from commit 1a29b5b7f347a1a9230c1e0af5b37e3e571588ab)

Replace the indirect calls with CALL_NOSPEC.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Jun Nakajima <jun.nakajima@intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: rga@amazon.de
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Asit Mallick <asit.k.mallick@intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Jason Baron <jbaron@akamai.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Arjan Van De Ven <arjan.van.de.ven@intel.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Link: https://lkml.kernel.org/r/20180125095843.595615683@infradead.org
[dwmw2: Use ASM_CALL_CONSTRAINT like upstream, now we have it]
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[backport to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agox86/retpoline: Remove the esp/rsp thunk
Waiman Long [Fri, 23 Feb 2018 10:41:51 +0000 (11:41 +0100)]
x86/retpoline: Remove the esp/rsp thunk

commit 1df37383a8aeabb9b418698f0bcdffea01f4b1b2 upstream.

It doesn't make sense to have an indirect call thunk with esp/rsp as
retpoline code won't work correctly with the stack pointer register.
Removing it will help compiler writers to catch error in case such
a thunk call is emitted incorrectly.

Fixes: 76b043848fd2 ("x86/retpoline: Add initial retpoline support")
Suggested-by: Jeff Law <law@redhat.com>
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: David Woodhouse <dwmw@amazon.co.uk>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Kees Cook <keescook@google.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linux-foundation.org>
Cc: Paul Turner <pjt@google.com>
Link: https://lkml.kernel.org/r/1516658974-27852-1-git-send-email-longman@redhat.com
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
[jwang: cherry pick to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoKVM: async_pf: Fix #DF due to inject "Page not Present" and "Page Ready" exceptions...
Wanpeng Li [Thu, 14 Sep 2017 10:54:16 +0000 (03:54 -0700)]
KVM: async_pf: Fix #DF due to inject "Page not Present" and "Page Ready" exceptions simultaneously

commit 9a6e7c39810e4a8bc7fc95056cefb40583fe07ef upstream.

qemu-system-x86-8600  [004] d..1  7205.687530: kvm_entry: vcpu 2
qemu-system-x86-8600  [004] ....  7205.687532: kvm_exit: reason EXCEPTION_NMI rip 0xffffffffa921297d info ffffeb2c0e44e018 80000b0e
qemu-system-x86-8600  [004] ....  7205.687532: kvm_page_fault: address ffffeb2c0e44e018 error_code 0
qemu-system-x86-8600  [004] ....  7205.687620: kvm_try_async_get_page: gva = 0xffffeb2c0e44e018, gfn = 0x427e4e
qemu-system-x86-8600  [004] .N..  7205.687628: kvm_async_pf_not_present: token 0x8b002 gva 0xffffeb2c0e44e018
    kworker/4:2-7814  [004] ....  7205.687655: kvm_async_pf_completed: gva 0xffffeb2c0e44e018 address 0x7fcc30c4e000
qemu-system-x86-8600  [004] ....  7205.687703: kvm_async_pf_ready: token 0x8b002 gva 0xffffeb2c0e44e018
qemu-system-x86-8600  [004] d..1  7205.687711: kvm_entry: vcpu 2

After running some memory intensive workload in guest, I catch the kworker
which completes the GUP too quickly, and queues an "Page Ready" #PF exception
after the "Page not Present" exception before the next vmentry as the above
trace which will result in #DF injected to guest.

This patch fixes it by clearing the queue for "Page not Present" if "Page Ready"
occurs before the next vmentry since the GUP has already got the required page
and shadow page table has already been fixed by "Page Ready" handler.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Fixes: 7c90705bf2a3 ("KVM: Inject asynchronous page fault into a PV guest if page is swapped out.")
[Changed indentation and added clearing of injected. - Radim]
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
[port from upstream v4.14-rc1, Don't assign to kvm_queued_exception::injected or
 x86_exception::async_page_fault]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>