Commit graph

576581 commits

Author SHA1 Message Date
Badhri Jagan Sridharan
d152189385 ANDROID: dm: android-verity: Verify header before fetching table
Move header validation logic before reading the verity_table as
an invalid header implies the table is invalid as well.

(Cherry-picked from:
https://partner-android-review.git.corp.google.com/#/c/625203)

BUG: 29940612
Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Change-Id: Ib34d25c0854202f3e70df0a6d0ef1d96f0250c8e
Git-commit: ad2f6cf0be
Git-repo: https://android.googlesource.com/kernel/common
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2016-10-28 14:47:03 -07:00
Badhri Jagan Sridharan
ec17b238f7 ANDROID: dm: allow adb disable-verity only in userdebug
adb disable-verity was allowed when the phone is in the
unlocked state. Since the driver is now aware of the build
variant, honor "adb disable-verity" only in userdebug
builds.

(Cherry-picked from
https://partner-android-review.git.corp.google.com/#/c/622117)

BUG: 29276559
Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Change-Id: I7ce9f38d8c7a62361392c5a8ccebb288f8a3a2ea
Git-commit: f74284f6c2
Git-repo: https://android.googlesource.com/kernel/common
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2016-10-28 14:47:03 -07:00
Badhri Jagan Sridharan
1e19beb791 ANDROID: dm: mount as linear target if eng build
eng builds dont have verity enabled i.e it does even
have verity metadata appended to the parition. Therefore
add rootdev as linear device and map the entire partition
if build variant is "eng".

(Cherry-picked based on
https://partner-android-review.git.corp.google.com/#/c/618690/)

BUG: 29276559
Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Change-Id: I8f5c2289b842b820ca04f5773525e5449bb3f355
Git-commit: 58bae772a7
Git-repo: https://android.googlesource.com/kernel/common
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2016-10-28 14:47:02 -07:00
Badhri Jagan Sridharan
6bcdcfa92b ANDROID: dm: use default verity public key
If the dm-android-verity target does not provide a default
key try using the default public key from the system keyring.
The defualt verity keyid is passed as a kernel command line
argument veritykeyid=.

The order of the dm-android-verity params have been reversed
to facilitate the change.

Old format example:
dm="system none ro,0 1 android-verity Android:#7e4333f9bba00adfe0ede979e28ed1920492b40f /dev/mmcblk0p43"

New formats supported:
dm="system none ro,0 1 android-verity /dev/mmcblk0p43 Android:#7e4333f9bba00adfe0ede979e28ed1920492b40f"

(or)

dm="system none ro,0 1 android-verity /dev/mmcblk0p43"
when veritykeyid= is set in the kernel command line.

BUG: 28384658
Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Change-Id: I506c89b053d835ab579e703eef2bc1f8487250de
(cherry picked from commit c5c74d0327729f35b576564976885596c6d0e7fb)
Git-commit: 051d4706c6
Git-repo: https://android.googlesource.com/kernel/common
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2016-10-28 14:47:01 -07:00
Badhri Jagan Sridharan
b1b24b49e2 ANDROID: dm: fix signature verification flag
The bug was that the signature verification was only
happening when verity was disabled. It should always
happen when verity is enabled.

Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Change-Id: I2d9354e240d36ea06fc68c2d18d8e87b823a4c2f
(cherry picked from commit 5364b5ca0b1a12a58283b51408e43fc36d4e4fe7)
Git-commit: 9c43aca47b
Git-repo: https://android.googlesource.com/kernel/common
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2016-10-28 14:47:01 -07:00
Jeremy Compostella
cf53c29528 ANDROID: dm: use name_to_dev_t
This patch makes android_verity_ctr() parse its block device string
parameter with name_to_dev_t().  It allows the use of less hardware
related block device reference like PARTUUID for instance.

Change-Id: Idb84453e70cc11abd5ef3a0adfbb16f8b5feaf07
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Git-commit: a517817c17
Git-repo: https://android.googlesource.com/kernel/common
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2016-10-28 14:47:00 -07:00
Badhri Jagan Sridharan
583c9f05ff ANDROID: dm: rename dm-linear methods for dm-android-verity
This keeps linear_target as static variable and just exposes
the linear target methods for android-verity

Cherry-picked: https://android-review.googlesource.com/#/c/212858

Change-Id: I4a377e417b00afd9ecccdb3e605fea31a7df112e
Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
(cherry picked from commit a6d1b091f40b25d97849487e29ec097bc5f568dd)
Git-commit: 86fd82659f
Git-repo: https://android.googlesource.com/kernel/common
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2016-10-28 14:46:59 -07:00
Badhri Jagan Sridharan
b90e0fa9b9 ANDROID: dm: Minor cleanup
Compacts the linear device arguments removing the
unnecessary variables.

Bug: 27175947
Change-Id: I157170eebe3c0f89a68ae05870a1060f188d0da0
Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Git-commit: 438e162621
Git-repo: https://android.googlesource.com/kernel/common
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2016-10-28 14:46:58 -07:00
Badhri Jagan Sridharan
38aede51f3 ANDROID: dm: Mounting root as linear device when verity disabled
This CL makes android-verity target to be added as linear
dm device if when bootloader is unlocked and verity is disabled.

Bug: 27175947
Change-Id: Ic41ca4b8908fb2777263799cf3a3e25934d70f18
Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Git-commit: 67ce481897
Git-repo: https://android.googlesource.com/kernel/common
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2016-10-28 14:46:58 -07:00
Badhri Jagan Sridharan
03b451f737 ANDROID: dm-android-verity: Rebase on top of 4.1
Following CLs in upstream causes minor changes to dm-android-verity target.
1. keys: change asymmetric keys to use common hash definitions
2. block: Abstract out bvec iterator
Rebase dm-android-verity on top of these changes.

Bug: 27175947

Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Change-Id: Icfdc3e7b3ead5de335a059cade1aca70414db415
Git-commit: f42f971b7b
Git-repo: https://android.googlesource.com/kernel/common
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2016-10-28 14:46:57 -07:00
Badhri Jagan Sridharan
6fad3408f5 ANDROID: dm: Add android verity target
This device-mapper target is virtually a VERITY target. This
target is setup by reading the metadata contents piggybacked
to the actual data blocks in the block device. The signature
of the metadata contents are verified against the key included
in the system keyring. Upon success, the underlying verity
target is setup.

BUG: 27175947

Change-Id: I7e99644a0960ac8279f02c0158ed20999510ea97
Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Git-commit: 36d01a590d
Git-repo: https://android.googlesource.com/kernel/common
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2016-10-28 14:46:56 -07:00
Vikram Mulukutla
d3dd1af9c3 dm-verity: Add a temporary dummy opaque struct declaration
Upcoming dm-verity changes include a series that introduces
an extern in dm-verity.h that is both useless (isn't defined)
and causes a warning that breaks compilation. Introduce a
dummy opaque struct to allow compilation and revert it later
when the offending declaration is fixed.

Change-Id: I82a911cf963367b1f311c5035bf894a380a76e54
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2016-10-28 14:46:47 -07:00
Sameer Thalappil
3547f54f46 icnss: Shutdown Adrastea before remapping MSA0
MSA0 is remapped to HLOS during SSR/PDR for ramdump purposes.
Remap this memory region only after Adrastea is being shutdown, otherwise
Adrastea could still try to access this region resulting in SMMU fault.

CRs-Fixed: 1082630
Change-Id: I490b5679de4cb4837f5ed5d4e40d339e12c8ecc9
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2016-10-28 14:34:57 -07:00
Skylar Chang
d402048fac msm: ipa3: fix send_cmd_timeout logic
When sending commands to IPA with timeout, the completion
object needs to be allocated on heap to make sure memory
is still available when EOT is received for this command.

Change-Id: I0228967ca3b33a56489a80833c0565ba2dfe8c2a
CRs-Fixed: 1082708
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2016-10-28 14:22:59 -07:00
Abhijeet Dharmapurikar
571aaf3df7 smb138x-charger: Fix FCC and FV parameters
The float voltage min value is 2450mV and the max value is 4950mV.
Also the FCC can go up to 6Amps.
Make these corrections.

Change-Id: I2d3f3a299939a061a43b4f552aedc7cac897d8b7
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-10-28 14:03:42 -07:00
Syed Rameez Mustafa
6385a475e0 sched/hmp: Disable interrupts when resetting all task stats
Taking the pi_lock without disabling interrupts in reset_all_task_stats()
is problematic. In that an interrupt can end up waking a task which in
turn needs the pi_lock again causing a deadlock. Disable interrupts along
with taking the lock to avoid this problem.

Change-Id: If27cb2bb3fcaafa5c8435f3c2e0e4be9b8f1e987
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
2016-10-28 12:12:41 -07:00
Zhen Kong
8af0e6f36a qseecom: check error return value of ion_map_kernel
ion_map_kernel() is called without checking for or acting upon the
possible error conditions this function may return, make change to
check its error return value.

CRs-fixed: 1081637
Change-Id: I0a34f0bbc9f2049b826777a31e14d2cf62cdc211
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2016-10-28 10:31:02 -07:00
Sathish Ambley
1a8a029dca msm: ADSPRPC: Do not pass offset for secure buffers
The secure buffers does not allow passing offset into the buffer
and hence skip calculation of offset for secure buffers.

Change-Id: I2cd3b87aca032d4c5868cc9db35987213349a337
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
2016-10-28 09:50:42 -07:00
Osvaldo Banuelos
38833d6621 clk: msm: clock-osm: Request Nominal Fmax frequency after OSM enable
Index 0 LUT entry must be selected before enabling OSM. The final
desired boot rate should be selected once OSM is enabled.
Fix this.

CRs-Fixed: 1082804
Change-Id: I7901df15ec03273304c5e4d417f272497ad1523c
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
2016-10-28 09:06:09 -07:00
Andy Yan
b336bec1bc dt-bindings: power: reset: add document for reboot-mode driver
Add device tree bindings document for reboot-mode driver.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Git-commit: 376e27e485cbe9f903369a002d07d5a01225d1d3
Git-repo: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/
Change-Id: Ic0f2a51b5af661fd23576ae5135c920b92f0cdfd
Signed-off-by: Xiaogang Cui <xiaogang@codeaurora.org>
2016-10-27 22:47:37 -07:00
Andy Yan
56f1cc5f65 power: reset: add reboot mode driver
This driver parses the reboot commands like "reboot bootloader"
and "reboot recovery" to get a boot mode described in the
device tree , then call the write interfae to store the boot
mode in some place like special register or sram, which can
be read by the bootloader after system reboot, then the bootloader
can take different action according to the mode stored.

This is commonly used on Android based devices, in order to
reboot the device into fastboot or recovery mode.

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: Moritz Fischer <moritz.fischer@ettus.com>
Tested-by: John Stultz <john.stultz@linaro.org>
Acked-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Git-commit: 4fcd504edbf7c793325511c2df8dcd083958e28a
Git-repo: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/

Change-Id: Id65f6b9186e7a5209542a380bae31a1d8933b931
Signed-off-by: Wufeng.jiang <wufeng.jiang@codeaurora.org>
Signed-off-by: Xiaogang Cui <xiaogang@codeaurora.org>
2016-10-27 22:46:42 -07:00
Purushottam Kushwaha
9b8f3f2e31 cfg80211: pass struct to interface combination check/iter
Move the growing parameter list to a structure for the interface
combination check and iteration functions in cfg80211 and mac80211
to make the code easier to understand.

Signed-off-by: Purushottam Kushwaha <pkushwah@qti.qualcomm.com>
[edit commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
Git-commit: e227300c8395dffaa7614ce7c7666a82180ebc60
CRs-fixed: 1025311
Change-Id: Ic4c7f66e84c8898d9db630d373b8a3cc8472e826
Signed-off-by: Purushottam Kushwaha <pkushwah@codeaurora.org>
2016-10-27 22:30:05 -07:00
Nick Desaulniers
903aee4774 binder: prevent kptr leak by using %pK format specifier
Works in conjunction with kptr_restrict.
Bug: 30143283

Change-Id: Ibe0053e8bd4d8219098ba09041d66fcd5b4592fd
Git-repo: https://android.googlesource.com/kernel/msm.git
Git-commit: b884cbf06200b18e660514a30293931a61126ef5
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
Signed-off-by: Ravi Kumar Siddojigari <rsiddoji@codeaurora.org>
2016-10-27 18:16:46 -07:00
David Collins
e3e4132326 ARM: dts: msm: correct pmicobalt_bob regulator name for msmcobalt
The regulator name for the PMICOBALT BOB regulators uses the
prefix "pmcobalt_bob".  Change this to "pmicobalt_bob" so that
the regulator name correctly reflects which PMIC the regulator
is found on.

Change-Id: I018729af22dbd787f42fc3788cbff018be7b4014
CRs-Fixed: 1083306
Signed-off-by: David Collins <collinsd@codeaurora.org>
2016-10-27 17:03:21 -07:00
Linux Build Service Account
ce610f2fc9 Merge "ASoC: msm: Add routes for all TDM modes" 2016-10-27 15:49:28 -07:00
Linux Build Service Account
a8a45f5fcb Merge "ASoC: msmcobalt: Add support for all TDM modes" 2016-10-27 15:49:26 -07:00
Linux Build Service Account
4578a0a555 Merge "ARM: dts: msm: fix sd card detection for msmcobalt QRD SKUK board" 2016-10-27 15:49:25 -07:00
Linux Build Service Account
dbcf7687b3 Merge "ASoC: msm: Enable Media Format converter for all resampling usecases" 2016-10-27 15:49:24 -07:00
Linux Build Service Account
dceddf2339 Merge "msm: mdss: Fix memleak in framebuffer register and remove" 2016-10-27 15:49:22 -07:00
Linux Build Service Account
d4d8e11cce Merge "msm: mdss: Correct settings when on/off happens in dest-scaler" 2016-10-27 15:49:21 -07:00
Linux Build Service Account
57054d8cd6 Merge "msm: mdss: Avoid adaptive variable refresh during dynaminc FPS" 2016-10-27 15:49:20 -07:00
Linux Build Service Account
8493ec68b0 Merge "msm: mdss: dp: remove programming of maud/naud for audio" 2016-10-27 15:49:19 -07:00
Linux Build Service Account
c2e7ee2c2a Merge "ARM: dts: msm: enable esd for jdi qhd cmd mode panel in msmcobalt" 2016-10-27 15:49:18 -07:00
Linux Build Service Account
a04b622efd Merge "qcom-charger: set optimal buck switching frequency" 2016-10-27 15:49:17 -07:00
Linux Build Service Account
66f8ffa044 Merge "ARM: dts: msm: add SLPI fw name property for msmcobalt" 2016-10-27 15:49:16 -07:00
Linux Build Service Account
8779c92e1a Merge "sensors: ssc: add support to read SLPI fw name" 2016-10-27 15:49:15 -07:00
Linux Build Service Account
e155d614ea Merge "msm: ipa: Fix the memory leak in error cases" 2016-10-27 15:49:14 -07:00
Linux Build Service Account
42d02f4156 Merge "qseecom: check buffer size when loading firmware images" 2016-10-27 15:49:13 -07:00
Linux Build Service Account
e223d02cbb Merge "leds: qpnp-flash-v2: fix safety timer configuration" 2016-10-27 15:49:12 -07:00
Linux Build Service Account
a7981f61bc Merge "msm: ipa: fix ioctl input param validation" 2016-10-27 15:49:11 -07:00
Linux Build Service Account
6600841f13 Merge "defconfig: Enable CONFIG_ICNSS_DEBUG for 32-bit msmfalcon" 2016-10-27 15:49:10 -07:00
Linux Build Service Account
7f8343eaa4 Merge "defconfig: Enable CONFIG_ICNSS_DEBUG for 32-bit msmcortex" 2016-10-27 15:49:09 -07:00
Linux Build Service Account
97d4de6ccb Merge "ASoC: msmcobalt: Fix MCLK routing on msmcobalt for WCD9340" 2016-10-27 15:49:08 -07:00
Linux Build Service Account
201f4347e2 Merge "ARM: dts: msm: Add dmic clock rate on ECPP path for msmcobalt" 2016-10-27 15:49:07 -07:00
Linux Build Service Account
10fb467dd6 Merge "soc: qcom: add support for fingerprint sensor driver" 2016-10-27 15:49:06 -07:00
Linux Build Service Account
c60241fc75 Merge "ASoC: wcd-dsp-mgr: fix restart logic when codec comes back online" 2016-10-27 15:49:05 -07:00
Linux Build Service Account
59ba1d179c Merge "ASoC: wcd934x-dsp-cntl: fix memory enable/disable sequence" 2016-10-27 15:49:04 -07:00
Linux Build Service Account
5df4ae6428 Merge "USB: dwc3-msm: Disable pipe clock requirement for HS/FS only mode" 2016-10-27 15:49:04 -07:00
Linux Build Service Account
094d9bc859 Merge "clk: qcom: Change clock index for mmssnoc_axi clock for MSMfalcon" 2016-10-27 15:49:03 -07:00
Linux Build Service Account
df255661d4 Merge "msm: sde: Fix SDE rotator clock disable sequence" 2016-10-27 15:49:02 -07:00