1. 12 Apr, 2016 25 commits
  2. 07 Apr, 2016 1 commit
  3. 03 Apr, 2016 1 commit
  4. 29 Mar, 2016 3 commits
  5. 22 Mar, 2016 10 commits
    • Steven Rostedt (Red Hat)'s avatar
      tracing: Fix check for cpu online when event is disabled · 3a4377e4
      Steven Rostedt (Red Hat) authored
      [ Upstream commit dc17147d ]
      
      Commit f3775549 ("tracepoints: Do not trace when cpu is offline") added
      a check to make sure that tracepoints only get called when the cpu is
      online, as it uses rcu_read_lock_sched() for protection.
      
      Commit 3a630178 ("tracing: generate RCU warnings even when tracepoints
      are disabled") added lockdep checks (including rcu checks) for events that
      are not enabled to catch possible RCU issues that would only be triggered if
      a trace event was enabled. Commit f3775549 only stopped the warnings
      when the trace event was enabled but did not prevent warnings if the trace
      event was called when disabled.
      
      To fix this, the cpu online check is moved to where the condition is added
      to the trace event. This will place the cpu online check in all places that
      it may be used now and in the future.
      
      Cc: stable@vger.kernel.org # v3.18+
      Fixes: f3775549 ("tracepoints: Do not trace when cpu is offline")
      Fixes: 3a630178 ("tracing: generate RCU warnings even when tracepoints are disabled")
      Reported-by: default avatarSudeep Holla <sudeep.holla@arm.com>
      Tested-by: default avatarSudeep Holla <sudeep.holla@arm.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      3a4377e4
    • Alex Deucher's avatar
      Revert "drm/radeon/pm: adjust display configuration after powerstate" · a077ab0b
      Alex Deucher authored
      [ Upstream commit d74e766e ]
      
      This reverts commit 39d42750.
      
      This caused a regression on some older hardware.
      
      bug:
      https://bugzilla.kernel.org/show_bug.cgi?id=113891Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      a077ab0b
    • Radim Krčmář's avatar
      KVM: VMX: disable PEBS before a guest entry · 306cc4da
      Radim Krčmář authored
      [ Upstream commit 7099e2e1 ]
      
      Linux guests on Haswell (and also SandyBridge and Broadwell, at least)
      would crash if you decided to run a host command that uses PEBS, like
        perf record -e 'cpu/mem-stores/pp' -a
      
      This happens because KVM is using VMX MSR switching to disable PEBS, but
      SDM [2015-12] 18.4.4.4 Re-configuring PEBS Facilities explains why it
      isn't safe:
        When software needs to reconfigure PEBS facilities, it should allow a
        quiescent period between stopping the prior event counting and setting
        up a new PEBS event. The quiescent period is to allow any latent
        residual PEBS records to complete its capture at their previously
        specified buffer address (provided by IA32_DS_AREA).
      
      There might not be a quiescent period after the MSR switch, so a CPU
      ends up using host's MSR_IA32_DS_AREA to access an area in guest's
      memory.  (Or MSR switching is just buggy on some models.)
      
      The guest can learn something about the host this way:
      If the guest doesn't map address pointed by MSR_IA32_DS_AREA, it results
      in #PF where we leak host's MSR_IA32_DS_AREA through CR2.
      
      After that, a malicious guest can map and configure memory where
      MSR_IA32_DS_AREA is pointing and can therefore get an output from
      host's tracing.
      
      This is not a critical leak as the host must initiate with PEBS tracing
      and I have not been able to get a record from more than one instruction
      before vmentry in vmx_vcpu_run() (that place has most registers already
      overwritten with guest's).
      
      We could disable PEBS just few instructions before vmentry, but
      disabling it earlier shouldn't affect host tracing too much.
      We also don't need to switch MSR_IA32_PEBS_ENABLE on VMENTRY, but that
      optimization isn't worth its code, IMO.
      
      (If you are implementing PEBS for guests, be sure to handle the case
       where both host and guest enable PEBS, because this patch doesn't.)
      
      Fixes: 26a4f3c0 ("perf/x86: disable PEBS on a guest entry.")
      Cc: <stable@vger.kernel.org>
      Reported-by: default avatarJiří Olša <jolsa@redhat.com>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      306cc4da
    • Paul Mackerras's avatar
      KVM: PPC: Book3S HV: Sanitize special-purpose register values on guest exit · c518a1b3
      Paul Mackerras authored
      [ Upstream commit ccec4456 ]
      
      Thomas Huth discovered that a guest could cause a hard hang of a
      host CPU by setting the Instruction Authority Mask Register (IAMR)
      to a suitable value.  It turns out that this is because when the
      code was added to context-switch the new special-purpose registers
      (SPRs) that were added in POWER8, we forgot to add code to ensure
      that they were restored to a sane value on guest exit.
      
      This adds code to set those registers where a bad value could
      compromise the execution of the host kernel to a suitable neutral
      value on guest exit.
      
      Cc: stable@vger.kernel.org # v3.14+
      Fixes: b005255eReported-by: default avatarThomas Huth <thuth@redhat.com>
      Reviewed-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      c518a1b3
    • Mugunthan V N's avatar
      ARM: dts: dra7: do not gate cpsw clock due to errata i877 · 05ec9a3e
      Mugunthan V N authored
      [ Upstream commit 0f514e69 ]
      
      Errata id: i877
      
      Description:
      ------------
      The RGMII 1000 Mbps Transmit timing is based on the output clock
      (rgmiin_txc) being driven relative to the rising edge of an internal
      clock and the output control/data (rgmiin_txctl/txd) being driven relative
      to the falling edge of an internal clock source. If the internal clock
      source is allowed to be static low (i.e., disabled) for an extended period
      of time then when the clock is actually enabled the timing delta between
      the rising edge and falling edge can change over the lifetime of the
      device. This can result in the device switching characteristics degrading
      over time, and eventually failing to meet the Data Manual Delay Time/Skew
      specs.
      To maintain RGMII 1000 Mbps IO Timings, SW should minimize the
      duration that the Ethernet internal clock source is disabled. Note that
      the device reset state for the Ethernet clock is "disabled".
      Other RGMII modes (10 Mbps, 100Mbps) are not affected
      
      Workaround:
      -----------
      If the SoC Ethernet interface(s) are used in RGMII mode at 1000 Mbps,
      SW should minimize the time the Ethernet internal clock source is disabled
      to a maximum of 200 hours in a device life cycle. This is done by enabling
      the clock as early as possible in IPL (QNX) or SPL/u-boot (Linux/Android)
      by setting the register CM_GMAC_CLKSTCTRL[1:0]CLKTRCTRL = 0x2:SW_WKUP.
      
      So, do not allow to gate the cpsw clocks using ti,no-idle property in
      cpsw node assuming 1000 Mbps is being used all the time. If someone does
      not need 1000 Mbps and wants to gate clocks to cpsw, this property needs
      to be deleted in their respective board files.
      Signed-off-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: default avatarLokesh Vutla <lokeshvutla@ti.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      05ec9a3e
    • Mugunthan V N's avatar
      ARM: dts: dra7: Add CPSW and MDIO module nodes for dra7 · 2497fc12
      Mugunthan V N authored
      [ Upstream commit ef9c5b69 ]
      
      Add CPSW and MDIO related device tree data for DRA7XX and made as status
      disabled. Phy-id, pinmux for active and sleep state needs to be added in
      board dts files and enable the CPSW device.
      Signed-off-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      2497fc12
    • Nicholas Bellinger's avatar
      target: Drop incorrect ABORT_TASK put for completed commands · a302f98e
      Nicholas Bellinger authored
      [ Upstream commit 7f54ab5f ]
      
      This patch fixes a recent ABORT_TASK regression associated
      with commit febe562c, where a left-over target_put_sess_cmd()
      would still be called when __target_check_io_state() detected
      a command has already been completed, and explicit ABORT must
      be avoided.
      
      Note commit febe562c dropped the local kref_get_unless_zero()
      check in core_tmr_abort_task(), but did not drop this extra
      corresponding target_put_sess_cmd() in the failure path.
      
      So go ahead and drop this now bogus target_put_sess_cmd(),
      and avoid this potential use-after-free.
      Reported-by: default avatarDan Lane <dracodan@gmail.com>
      Cc: Quinn Tran <quinn.tran@qlogic.com>
      Cc: Himanshu Madhani <himanshu.madhani@qlogic.com>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Andy Grover <agrover@redhat.com>
      Cc: Mike Christie <mchristi@redhat.com>
      Cc: stable@vger.kernel.org # 3.14+
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      a302f98e
    • Konstantin Khlebnikov's avatar
      ovl: copy new uid/gid into overlayfs runtime inode · a91db621
      Konstantin Khlebnikov authored
      [ Upstream commit b81de061 ]
      
      Overlayfs must update uid/gid after chown, otherwise functions
      like inode_owner_or_capable() will check user against stale uid.
      Catched by xfstests generic/087, it chowns file and calls utimes.
      Signed-off-by: default avatarKonstantin Khlebnikov <koct9i@gmail.com>
      Signed-off-by: default avatarMiklos Szeredi <miklos@szeredi.hu>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      a91db621
    • Rui Wang's avatar
      ovl: fix getcwd() failure after unsuccessful rmdir · c190fea9
      Rui Wang authored
      [ Upstream commit ce9113bb ]
      
      ovl_remove_upper() should do d_drop() only after it successfully
      removes the dir, otherwise a subsequent getcwd() system call will
      fail, breaking userspace programs.
      
      This is to fix: https://bugzilla.kernel.org/show_bug.cgi?id=110491Signed-off-by: default avatarRui Wang <rui.y.wang@intel.com>
      Reviewed-by: default avatarKonstantin Khlebnikov <koct9i@gmail.com>
      Signed-off-by: default avatarMiklos Szeredi <miklos@szeredi.hu>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      c190fea9
    • Jouni Malinen's avatar
      mac80211: Fix Public Action frame RX in AP mode · 1c767580
      Jouni Malinen authored
      [ Upstream commit 1ec7bae8 ]
      
      Public Action frames use special rules for how the BSSID field (Address
      3) is set. A wildcard BSSID is used in cases where the transmitter and
      recipient are not members of the same BSS. As such, we need to accept
      Public Action frames with wildcard BSSID.
      
      Commit db8e1732 ("mac80211: ignore frames between TDLS peers when
      operating as AP") added a rule that drops Action frames to TDLS-peers
      based on an Action frame having different DA (Address 1) and BSSID
      (Address 3) values. This is not correct since it misses the possibility
      of BSSID being a wildcard BSSID in which case the Address 1 would not
      necessarily match.
      
      Fix this by allowing mac80211 to accept wildcard BSSID in an Action
      frame when in AP mode.
      
      Fixes: db8e1732 ("mac80211: ignore frames between TDLS peers when operating as AP")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJouni Malinen <jouni@qca.qualcomm.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      1c767580