Commit graph

588032 commits

Author SHA1 Message Date
Vinayak Menon
49118fe6a3 mm: enable page poisoning early at boot
On SPARSEMEM systems page poisoning is enabled after buddy is up, because
of the dependency on page extension init.  This causes the pages released
by free_all_bootmem not to be poisoned.  This either delays or misses the
identification of some issues because the pages have to undergo another
cycle of alloc-free-alloc for any corruption to be detected.

Enable page poisoning early by getting rid of the PAGE_EXT_DEBUG_POISON
flag.  Since all the free pages will now be poisoned, the flag need not be
verified before checking the poison during an alloc.

Link: http://lkml.kernel.org/r/1490358246-11001-1-git-send-email-vinmenon@codeaurora.org
Acked-by: Laura Abbott <labbott@redhat.com>
Tested-by: Laura Abbott <labbott@redhat.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
[vinmenon@codeaurora.org: resolve trivial merge conflicts.
 Remove the redundant free pages RO feature from the
 page_poison.c file which is the reason for conflicts +
 squash the addendum commit 40961ef8d65f51093bc94de110b97b590b6b9275
 ('mm-enable-page-poisoning-early-at-boot-v2')]
Git-commit: c5b7cd344fd6341e6db79e55c0f1f4d1d9c67a7e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Change-Id: I1bb1f99d3a2e1135131911905e0916c837ba9d8a
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2017-04-14 23:43:05 +05:30
Laura Abbott
2c00b603db mm/page_poisoning.c: allow for zero poisoning
By default, page poisoning uses a poison value (0xaa) on free.  If this
is changed to 0, the page is not only sanitized but zeroing on alloc
with __GFP_ZERO can be skipped as well.  The tradeoff is that detecting
corruption from the poisoning is harder to detect.  This feature also
cannot be used with hibernation since pages are not guaranteed to be
zeroed after hibernation.

Credit to Grsecurity/PaX team for inspiring this work

Change-Id: If7116e6bff246abbafc38bdfeb3601d3ea063ad2
Signed-off-by: Laura Abbott <labbott@fedoraproject.org>
Acked-by: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Mathias Krause <minipli@googlemail.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Jianyu Zhan <nasa4836@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit: 1414c7f4f7d72d138fff35f00151d15749b5beda
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2017-04-14 23:43:04 +05:30
Laura Abbott
5c69adad61 mm/page_poison.c: enable PAGE_POISONING as a separate option
Page poisoning is currently set up as a feature if architectures don't
have architecture debug page_alloc to allow unmapping of pages.  It has
uses apart from that though.  Clearing of the pages on free provides an
increase in security as it helps to limit the risk of information leaks.
Allow page poisoning to be enabled as a separate option independent of
kernel_map pages since the two features do separate work.  Because of
how hiberanation is implemented, the checks on alloc cannot occur if
hibernation is enabled.  The runtime alloc checks can also be enabled
with an option when !HIBERNATION.

Credit to Grsecurity/PaX team for inspiring this work

Change-Id: I77a36f844ddae54695089c98a97bf0a6e226a025
Signed-off-by: Laura Abbott <labbott@fedoraproject.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Mathias Krause <minipli@googlemail.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Jianyu Zhan <nasa4836@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit: 8823b1dbc05fab1a8bec275eeae4709257c2661d
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2017-04-14 23:43:04 +05:30
Patrick Fay
c079e157fd Perf: arm64: disable irq for hotplug offline
Currently the hotplug notifier calls cpu_pmu_enable_percpu_irq
when a CPU comes online. The notifier doesn't have a corresponding
call to cpu_pmu_disable_percpu_irq when the CPU goes offline.
Change the code to follow what was done in 3.18 including
tracking whether the PMU is active and the IRQ number in use.

Change-Id: I1835fb543eb483713a30eb6c0ccd4e4a4b9908be
Signed-off-by: Patrick Fay <pfay@codeaurora.org>
2017-04-14 10:24:02 -07:00
Linux Build Service Account
4e6f40f24c Merge "ASoC: wcd9335: Initialize variables before use" 2017-04-14 07:30:09 -07:00
Linux Build Service Account
396203de3f Merge "ASoC: wcd_cpe_core: Initialize variables before use" 2017-04-14 07:30:08 -07:00
Linux Build Service Account
8ab454448f Merge "ASoC: msm: qdsp6v2: Initialize variables before use" 2017-04-14 07:30:06 -07:00
Linux Build Service Account
6e1631fbaa Merge "ASoC: wcd-spi: Initialize variables before use" 2017-04-14 07:30:05 -07:00
Linux Build Service Account
21f62e1d1e Merge "Revert "ASoC: msm: decrement slim channel ref to set the property"" 2017-04-14 07:30:04 -07:00
Linux Build Service Account
ff13dc2a6c Merge "ASoC: wcd934x: use analog mics in micbias mode for MAD" 2017-04-14 07:30:02 -07:00
Linux Build Service Account
9a97d47340 Merge "drivers: mfd: wcd934x: Set CDC_TOP_TOP_CFG1 register as non-volatile" 2017-04-14 07:30:01 -07:00
Linux Build Service Account
891c4ddf05 Merge "ASoC: msm: Update proper clock frequency for slave mode" 2017-04-14 07:30:00 -07:00
Linux Build Service Account
dc013b9093 Merge "ASoC: msm: Update proper clock frequency for slave mode" 2017-04-14 07:29:59 -07:00
Linux Build Service Account
15bc4d7721 Merge "diag: Update the read buffers status properly" 2017-04-14 07:29:58 -07:00
Linux Build Service Account
9584dd9b54 Merge "msm: ADSPRPC: Use SMD on targets that doesn't support GLINK" 2017-04-14 07:29:57 -07:00
Linux Build Service Account
b35f50a370 Merge "usb: gadget: ccid: Fix data types of header structures" 2017-04-14 07:29:56 -07:00
Linux Build Service Account
83a539d288 Merge "defconfig: msmcortex_mediabox: Disable CONFIG_ICNSS_DEBUG" 2017-04-14 07:29:55 -07:00
Linux Build Service Account
14d7d63b27 Merge "msm: isp: Fix dead lock in ISR" 2017-04-14 07:29:54 -07:00
Linux Build Service Account
92421c8558 Merge "drivers: cpuidle: lpm-levels: Log hotplug events" 2017-04-14 07:29:53 -07:00
Linux Build Service Account
4a17c9bb0a Merge "msm: camera: Bypass redundant creation of video node in stereo" 2017-04-14 07:29:03 -07:00
Linux Build Service Account
be634a49f4 Merge "msm: camera: ispif: adds 3D support" 2017-04-14 07:29:01 -07:00
Linux Build Service Account
ed74c93ee8 Merge "ARM: dts: msm: Fix interrupt-map property for msm8996" 2017-04-14 07:29:00 -07:00
Linux Build Service Account
7e6011e45d Merge "msm: mdss: add mdss smmu fault handler for sdm660" 2017-04-14 07:28:59 -07:00
Linux Build Service Account
65b6b46b80 Merge "msm: mdss: dp: skip transfer unit setup on link training requests" 2017-04-14 07:28:58 -07:00
Linux Build Service Account
40bf3261bd Merge "ARM: dts: msm: refine JDI a407 panel setting" 2017-04-14 07:28:57 -07:00
Linux Build Service Account
f822970e29 Merge "ARM: dts: msm: modify panel initial commands for SDM630 PM660A QRD" 2017-04-14 07:28:55 -07:00
Linux Build Service Account
8943ec9a23 Merge "msm: mdss: update the recovery sequence for DSI LP_RX_TIMEOUT/BTA_TIMEOUT" 2017-04-14 07:28:54 -07:00
Linux Build Service Account
c4b2538e43 Merge "msm: sde: map/unmap timestamp buffer for every rotator session" 2017-04-14 07:28:53 -07:00
Linux Build Service Account
a24ce2ce89 Merge "msm: kgsl: Fix the race between context create and destroy" 2017-04-14 07:28:52 -07:00
Linux Build Service Account
0e17c8db46 Merge "msm: kgsl: Fix kgsl memory allocation and free race condition" 2017-04-14 07:28:15 -07:00
Linux Build Service Account
28148dc542 Merge "msm: camera: Check for csid_irq status bit in case of time out" 2017-04-14 07:28:14 -07:00
Linux Build Service Account
5cd372e2ea Merge "soc: qcom: rpm: Use GENMASK APIs to generate bit masks" 2017-04-14 07:28:13 -07:00
Anirudh Ghayal
f222cd6254 power: qpnp-smb2: Specify the min/max charger switching frequency
Add a device tree property to override the minimum and maximum
charger buck/boost switching frequency.

Change-Id: I6b827157c23a389edf2daa412e6825b6ce07a886
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2017-04-14 19:36:19 +05:30
Anirudh Ghayal
7ba93fdab2 power: smb-lib: Fix sink/source insertion/removal function ordering
On PM660 the charger buck/boost frequency is configured in
the same register. Present ordering of the sink/source
removal function call causes incorrect charger frequency
configuration.

Fix this by first calling sink_removal and then source_insertion
function. Also, configure the buck frequency to the initial
5V USB value during source insertion.

Change-Id: I0d436f7e0843f2ddaa3d09db05cec403d03b6893
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2017-04-14 19:35:50 +05:30
Pavankumar Kondeti
b18b2f0cad cpu-hotplug: Fix false error message in cpu_up()
An error message is printed even when the task's scheduling class
is switched back successfully. Fix the error condition check and
print the error value in the message.

Change-Id: Ib75c4cfa22d58dd9309542e96096ac4e91f0c3db
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2017-04-14 15:08:01 +05:30
Tharun Kumar Merugu
8a3caf5c49 msm: ADSPRPC: Use SMD on targets that doesn't support GLINK
Enable SMD for backward compatibility on targets that doesn't
support glink.

Change-Id: I9e9073dd3b2d7b789c79a31ae77fff78e6e61e36
Acked-by: Bharath Kumar <bkumar@qti.qualcomm.com>
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
2017-04-14 00:29:38 -07:00
Manoj Prabhu B
bf21c5ef9e diag: Update the read buffers status properly
This patch updates the global variables and checks
for the logging mode status to mark the buffer
status properly.

CRs-Fixed: 2033760
Change-Id: I29a13e2fecaecacc1a0f46358ae7d4db1d2b3786
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
2017-04-14 12:56:17 +05:30
Abhishek Kondaveeti
747aadd03c msm: isp: Fix dead lock in ISR
Unlock spin lock before returning in case of
tasklet overflow. Increase tasklet queue size
to avoid tasklet overflow.

Change-Id: If9dc03b8dc0bd026b904b6339dd7a7c9c6443871
Signed-off-by: Abhishek Kondaveeti <akondave@codeaurora.org>
2017-04-13 23:38:47 -07:00
Neeraj Upadhyay
8c9ba5be5e defconfig: msm: Enable HWBinder for SDM660
Enable HWBinder Domain for SDM660.

Change-Id: I47c4155e8ce9c21700f80e13f6301b2fb49fa87a
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2017-04-13 23:36:24 -07:00
Rakesh Pillai
9b6b0de838 defconfig: msmcortex_mediabox: Disable CONFIG_ICNSS_DEBUG
Disable CONFIG_ICNSS_DEBUG

CRs-Fixed: 2033750
Change-Id: If22f155538877b18c71052363565f245da913ecb
Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
2017-04-13 23:28:56 -07:00
Linux Build Service Account
406ab7d2d4 Merge "msm: ipa: fix for wakelock refcnt" 2017-04-13 21:52:20 -07:00
Linux Build Service Account
59acd80684 Merge "msm: camera: isp: Fix stream on timeout in LPM" 2017-04-13 21:52:19 -07:00
Linux Build Service Account
180376b166 Merge "ARM: dts: msm: Enable APC0/1 CPR closed-loop operation for sdm630" 2017-04-13 21:52:17 -07:00
Linux Build Service Account
349ac7ea59 Merge "ath10k: Fix crash when SSR is done during packet transfer" 2017-04-13 21:52:16 -07:00
Linux Build Service Account
f6f01239b4 Merge "ARM: dts: msm: add panel parameters for sharp wuxga panel for sdm630" 2017-04-13 21:52:15 -07:00
Linux Build Service Account
2fce80230e Merge "msm: mdss: add split link panel support in mdss" 2017-04-13 21:52:14 -07:00
Ashay Jaiswal
d288491f1b qcom: smb2: ensure QC adapter is at 5V at shutdown
In the shutdown hook, driver forces adapter to 5V but
there is a possibility that the source change IRQ triggers
and moves back the adapter to 9V.
To avoid this and any race between the irq's and shutdown path,
disable all irqs as the first step in shutdown path.

CRs-Fixed: 2032575
Change-Id: I0d8f59a73b6631e9bf6f5d64dd215c239e7772fe
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2017-04-14 10:21:07 +05:30
Hamad Kadmany
0766e5db80 wil6210: add option to load FTM FW
Module parameter allows to load specific FW used
for FTM testing.

Change-Id: Ic6b4e1596edc0068a6cbd656ec7dfb82746c3f8a
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
2017-04-14 07:05:04 +03:00
Pavankumar Kondeti
a76d9370e8 core_ctl: Take state_lock while preparing the global_state
global_state file output is prepared by reading the members of CPU
and cluster data structures. These members are updated under state_lock,
so acquire the same lock while preparing the output.

Change-Id: I8cb3ca6f9100a24f0bc9b293d364ad6aa8aabefb
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2017-04-14 07:09:53 +05:30
Tatenda Chipeperekwa
058c973e7e msm: mdss: dp: fix HDCP 1.x state transitions
Fix HDCP 1.x state transitions by ensuring that transitions to
authenticating state can be made from both an uninitialized and
a failure state, and making sure that authentication thread is
synchronously canceled before transitioning to a disabled
state.

CRs-Fixed: 2006096
Change-Id: Ic097e16451166f589acbd7c23f87bd9b4c1a65f3
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2017-04-13 18:20:32 -07:00