727103 Commits

Author SHA1 Message Date
qctecmdr Service
9f234b8c51 Merge "Merge android-4.14-p.62 (366527f) into msm-4.14" 2018-08-25 09:20:43 -07:00
qctecmdr Service
0380ccaba3 Merge "ARM: dts: msm: Update haptics configuration for SM8150 platforms" 2018-08-25 09:20:42 -07:00
qctecmdr Service
ac05f5bb07 Merge "soc: qcom: Add ODL support for qdss bridge driver" 2018-08-25 09:20:42 -07:00
qctecmdr Service
272c4347d9 Merge "defconfig: sdxprairie: enable RPMh driver API" 2018-08-24 23:32:35 -07:00
qctecmdr Service
d18f8ca0fa Merge "Merge remote-tracking branch 'quic/dev/msm-4.14-display' into msm-4.14" 2018-08-24 23:32:35 -07:00
Namratha Siddappa
1d42f5a0f0 Merge remote-tracking branch 'quic/dev/msm-4.14-display' into msm-4.14
* quic/dev/msm-4.14-display:
  drm/msm/dp: clear HDR data for each session
  drm/msm/sde: Send blank notification only when CRTC active changed
  drm/msm/sde: allow PP buffer overflow irq disable after encoder disable
  drm/msm: export symbols for drm client registration API
  drm/msm/dp: complete link training before hot plug notification
  drm/msm/sde: prevent null pointer access on disabled encoder
  drm/msm/sde: manage sde pm_qos vote through atomic counter
  drm/msm/sde: fix out of bounds memory access in sde kms
  drm/msm: avoid memory allocation when sgt is imported

Change-Id: I5d2dd5bc966875d05e717719ac62633b8106a033
Signed-off-by: Namratha Siddappa <namratha@codeaurora.org>
2018-08-24 18:56:55 -07:00
qctecmdr Service
71de1f3e70 Merge "iommu: arm-smmu: Add more logging during tlb sync timeout" 2018-08-24 16:15:47 -07:00
qctecmdr Service
a4f5e29a10 Merge "ARM: dts: msm: Opt-out PCIe TBU from halting" 2018-08-24 16:15:46 -07:00
qctecmdr Service
01cb9bc9df Merge "ARM: dts: msm: Update audio routing and dmic sample rate for sm6150" 2018-08-24 16:15:46 -07:00
qctecmdr Service
6f03c7b163 Merge "ARM: dts: msm: Fix the core numbering in sdmmagpie" 2018-08-24 16:15:45 -07:00
qctecmdr Service
e48f6bba50 Merge "ARM: dts: msm: Enable PM for IPA device on SM6150" 2018-08-24 12:24:04 -07:00
qctecmdr Service
58676f6cda Merge "ARM: dts: msm: Fix compilation issue with camera nodes on sm6150" 2018-08-24 12:24:03 -07:00
qctecmdr Service
fcb93c3e29 Merge "rpmsg: glink: Move intent work to private workqueue" 2018-08-24 12:24:03 -07:00
qctecmdr Service
9b4c05670c Merge "defconfig: sm8150: Enable ICE metadata encryption" 2018-08-24 12:24:03 -07:00
qctecmdr Service
bfd3d176b2 Merge "msm: vidc: Remove duplicate flag" 2018-08-24 12:24:02 -07:00
qctecmdr Service
3d5886a608 Merge "Revert "sched: Remove sched_ktime_clock()"" 2018-08-24 12:24:02 -07:00
qctecmdr Service
fce7d4591c Merge "ARM: dts: msm: Enable WCD9335 in QCS405 sEVB,SLT and RCM variants" 2018-08-24 12:24:02 -07:00
qctecmdr Service
751dcaa44b Merge "ARM: dts: msm: Enable BT Audio usecases" 2018-08-24 12:24:01 -07:00
qctecmdr Service
63aa86f319 Merge "msm: vidc: Fix minimum supported resolution for HW HEIC encode" 2018-08-24 12:24:01 -07:00
qctecmdr Service
26f2554b44 Merge "msm: vidc: access vb2 buffer under vb2_queue lock" 2018-08-24 12:24:00 -07:00
qctecmdr Service
b278d1573b Merge "drm/msm/dp: complete link training before hot plug notification" 2018-08-24 11:35:18 -07:00
Shivaprasad Hongal
87a38fbdf3 defconfig: sm8150: Enable ICE metadata encryption
Enable the device-mapper target "dm-default-key" which assigns
an encryption key to bios that don't already have one. This will
be used on Android's userdata partition, so that all data not
already encrypted with ext4 encryption is still encrypted with a
default key.

Change-Id: If6ef872019b1ae489ff1122a56ced0917a9aae85
Signed-off-by: Shivaprasad Hongal <shongal@codeaurora.org>
2018-08-24 10:37:36 -07:00
Jaegeuk Kim
1aa7229fbc dm-default-key: fix wrong encryption/decryption when f2fs moves blocks
commit 2b425b7413e2 ("dm-default-key, f2fs, ICE: support dm-default-key with f2fs/ICE")

supports bio->bi_crypt_skip, so this patch should address the original issue by
adding this condition.

Change-Id: I215cd9d02e364af07eebf388000809cdf0cce472
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Signed-off-by: Shivaprasad Hongal <shongal@codeaurora.org>
2018-08-24 10:37:23 -07:00
Jaegeuk Kim
af4ef71b89 dm-default-key, f2fs, ICE: support dm-default-key with f2fs/ICE
This patch fixes assigning bi_crypt_key for moving data which was previously
encrypted by f2fs.

Note that, dm-default-key should not assign bi_crypt_key, if bi_crypt_skip is
set.

The bug sceanrios is:

1. write data with user key by f2fs
  -  ENC(KU, IVU, DATA)
2. log out user key
3. read data #1 w/o user key from LBA #a
4. dm-default-key assigns default key
  - DEC(KD, LBA#a, ENC(KU, IVU, DATA))
5. write data #1 w/o user key into LBA #b
6. dm-default-key assigns default key
  - ENC(KD, LBA#b, DEC(KD, LBA#a, ENC(KU, IVU, DATA)))
7. Read DATA out with valid logged-in user key
  - DEC(KU, IVU, ENC(KD, LBA#b, DEC(KD, LBA#a, ENC(KU, IVU, DATA))))

So, this patch introduces bi_crypt_skip to avoid 4. ~ 6 with right flow:
1. write data with user key by f2fs
  -  ENC(KU, IVU, DATA)
2. log out user key
3. read data #1 w/o user key from LBA #a
4. dm-default-key skip to assign default key
  - ENC(KU, IVU, DATA)
5. write data #1 w/o user key into LBA #b
6. dm-default-key skips to assign default key
  - ENC(KU, IVU, DATA)
7. Try to read DATA with valid logged-in user key
  - DEC(KU, IVU, ENC(KU, IVU, DATA))

Bug: 68721442
Change-Id: Icefe85f608b7c3c84beb2bfa4267efd0f3787453
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Signed-off-by: Shivaprasad Hongal <shongal@codeaurora.org>
2018-08-24 10:36:55 -07:00
Eric Biggers
1611298c81 ANDROID: dm table: propagate inline encryption flag to dm devices
If all targets in a device-mapper table support inline encryption, mark
the mapped device as supporting inline encryption.  This will allow
filesystems such as ext4 to tell whether the hardware supports inline
encryption even in the case where there is an intervening dm device.

Change-Id: I596829f6c5a39fb0d5bedfac9f18828ae27444cb
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Shivaprasad Hongal <shongal@codeaurora.org>
2018-08-24 10:36:43 -07:00
Eric Biggers
8d7d063acc ANDROID: add dm-default-key target for ICE metadata encryption
Add a device-mapper target "dm-default-key" which assigns an encryption
key to bios that don't already have one.  This will be used on Android's
userdata partition, so that all data not already encrypted with ext4
encryption is still encrypted with a default key (which will not be
derived from a user credential but will still be protected in some way).

Currently this feature depends on inline encryption support in hardware
via Qualcomm ICE; no software fallback is implemented yet.

An alternate approach considered was to introduce a block device ioctl
which would associate an encryption key with a struct block_device,
which would then be used as the default for bios issued to that
block_device.  However, that approach had some issues which made the dm
target seem like the better solution, and perhaps more likely to be
accepted upstream in some form someday (at least, once we have
vendor-independent inline encryption support upstream).  Specifically:

1.) The struct block_device for a partition really only represents a
    part of some underlying disk along with some state associated with
    its current users.  Notably, the block_device for a given partition
    is not guaranteed to stay around while no one has it opened or
    mounted.  This means that any extra state like an encryption key we
    may try to tie a block_device can be lost if there is a period of
    time when no one is using the block device.  Granted, this can't
    happen while the filesystem on the device is mounted, and it also
    can't happen on systems that use tmpfs for their /dev because the
    block_device will be pinned by the device node.  But either way, a
    dm target does not have this problem.

2.) The block_device for a partition doesn't have its own request_queue
    or queue_limits.  One way in which this could cause problems is that
    the disk could support discard requests and have discard_zeroes_data
    set to true, which specifies that data read back following a discard
    is guaranteed to be zeros.  That will not be true for an encrypted
    partition, so any filesystem that issues zeroouts (which the block
    layer may implement with discard) would potentially be broken.  We
    can handle this correctly in a dm target since each dm device has
    its own request_queue and we can disable discard_zeroes_data, just
    as dm-crypt does for example.

3.) Since the block layer remaps bios from partitions to the devices
    containing them, we'd still need to have ->bi_crypt_key and
    initialize it somewhere, e.g. in generic_make_request_checks()
    before it does the partition remapping.  We can't simply read
    ->bi_bdev->bd_default_key from the PFK module.

4.) With a block device ioctl, we'd need to carefully handle the cases
    where the ioctl is executed while someone else has the block device
    open (fail with EBUSY?) or while the block device's mapping already
    has pages cached (sync and invalidate them?).  This would not be too
    difficult, but with a dm target neither of these is a problem.

Change-Id: Ia3884842004cfb84d315ef38e54ab4f35b48cf5f
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Shivaprasad Hongal <shongal@codeaurora.org>
2018-08-24 10:36:12 -07:00
Shivaprasad Hongal
6af10d4d44 defconfig: sm8150: Enable wrapped key support for FBE
Enable wrapped key support for FBE where the keys are
wrapped and unwrapped in a secure environment before
using them.

Change-Id: I4f9a4a08d0b4795f81c7d1dfec43764e521dac77
Signed-off-by: Shivaprasad Hongal <shongal@codeaurora.org>
2018-08-24 10:35:24 -07:00
qctecmdr Service
175e38e4d4 Merge "drm/msm: export symbols for drm client registration API" 2018-08-24 02:37:12 -07:00
qctecmdr Service
cb2f1798e2 Merge "drm/msm/sde: allow PP buffer overflow irq disable after encoder disable" 2018-08-24 02:37:12 -07:00
qctecmdr Service
ac2b2415af Merge "drm/msm/sde: Send blank notification only when CRTC active changed" 2018-08-24 02:37:12 -07:00
qctecmdr Service
d581293e4b Merge "drm/msm/sde: prevent null pointer access on disabled encoder" 2018-08-24 02:37:11 -07:00
qctecmdr Service
86d6581503 Merge "drm/msm/sde: manage sde pm_qos vote through atomic counter" 2018-08-24 02:37:11 -07:00
qctecmdr Service
a9c689eab0 Merge "drm/msm/dp: clear HDR data for each session" 2018-08-24 02:37:10 -07:00
qctecmdr Service
6654fe8b40 Merge "drm/msm/sde: fix out of bounds memory access in sde kms" 2018-08-24 02:37:10 -07:00
Pavankumar Kondeti
c7ae8d74de Revert "sched: Remove sched_ktime_clock()"
This reverts 'commit 24c18127e9ba ("sched: Remove sched_ktime_clock()")'

WALT accounting uses ktime_get() as time source to keep windows in
align with the tick. ktime_get() API should not be called while the
timekeeping subsystem is suspended during the system suspend. The
code before the reverted patch has a wrapper around ktime_get() to
avoid calling ktime_get() when timekeeping subsystem is suspended.

The reverted patch removed this wrapper with the assumption that there
will not be any scheduler activity while timekeeping subsystem is
suspended. The timekeeping subsystem is resumed very early even before
non-boot CPUs are brought online. However it is possible that tasks
can wake up from the idle notifiers which gets called before timekeeping
subsystem is resumed.

When this happens, the time read from ktime_get() will not be consistent.
We see a jump from the values that would be returned later when timekeeping
subsystem is resumed. The rq->window_start update happens with incorrect
time. This rq->window_start becomes inconsistent with the rest of the
CPUs's rq->window_start and wallclock time after timekeeping subsystem is
resumed. This results in WALT accounting bugs.

Change-Id: I9c3b2fb9ffbf1103d1bd78778882450560dac09f
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
[clingutla@codeaurora.org: Resolved trivial merge conflicts.]
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2018-08-24 13:49:33 +05:30
Srinivas Ramana
fab1bdc07f ARM: dts: msm: Fix compilation issue with camera nodes on sm6150
New overlay files added for sm6150 does not include
camera headers and results in compilation issue. fix it.

Change-Id: I3874f18fa7d37ab36390cde2f09b6fa53062cfc7
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
2018-08-24 12:18:26 +05:30
qctecmdr Service
eaff0dd3d8 Merge "drm/msm: avoid memory allocation when sgt is imported" 2018-08-23 23:36:46 -07:00
Prateek Sood
5be1c5db9f ARM: dts: msm: Fix the core numbering in sdmmagpie
Fix the core numbering for cluster1 in sdmmagpie.
Without this change topology parsing fails while
parsing cluster1 cores.

Change-Id: Iff41eed6f5826b3c0439eba09bfa03891f0370da
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
2018-08-23 22:10:45 -07:00
Prateek Sood
9db00f1f73 ARM: dts: msm: add DSU PMU support for sdmmagpie
Add DT node to support the ARM DynamIQ Shared Unit (DSU) PMU.
This allows the perf subsystem clients to record the events
corresponding to the events related to L3 cache, snoop control
protocol, using its 32-bit counters.

Change-Id: If115f76a275ca1a5aab82b197d7e5baa644ea659
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
2018-08-23 22:10:25 -07:00
Prateek Sood
20265c7cad ARM: dts: msm: Add llcc perfmon device for sdmmagpie
Adding llcc perfmon configuration. Perfmon driver can monitor llcc
hardware events, which can be used for profiling.

Change-Id: I28c44081dba058515e57a3fcce5fa63adc3c0617
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
2018-08-23 22:10:01 -07:00
Prateek Sood
2ce5c32738 ARM: dts: msm: Add llcc cache dump support for sdmmagpie
sdmmagpie supports two instance of  Last level cache controller
with 256KB system cache. Add dump size to allocate buffers
for llcc cache dumps.

Change-Id: I205d9b5e024845c23e2d1a1e296817ffca963252
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
2018-08-23 22:09:46 -07:00
Prateek Sood
f64ff42aba ARM: dts: msm: Add EUD device node for sdmmagpie
The EUD (Embedded USB Debugger) is a mini-USB hub implemented
on chip to support the USB-based debug and trace capabilities.
Add device tree node to support EUD on sdmmagpie based platforms.

Change-Id: I6573b4064410ba9d0669976eaa8012116ce3ab04
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
2018-08-23 22:09:00 -07:00
qctecmdr Service
7803301623 Merge "Enable hardware based FBE on f2fs and adapt ext4 fs" 2018-08-23 22:01:16 -07:00
Shaoqing Liu
6b626a2a5f soc: qcom: Add ODL support for qdss bridge driver
Add ODL(On Device Logging) mode that it can read messages
from the mhi bus channel to user space via a device node
in qdss bridge driver.

Change-Id: I9d8f420ba8047adb4f27a284c6388faf899eada2
Signed-off-by: Shaoqing Liu <shaoqingliu@codeaurora.org>
2018-08-24 12:54:37 +08:00
qctecmdr Service
ceac4d9e49 Merge "msm: vidc: ignore processing responses in invalid state" 2018-08-23 18:09:35 -07:00
qctecmdr Service
a6595c7a75 Merge "ARM: dts: Update available frequenices in energy costs for SM6150" 2018-08-23 18:09:35 -07:00
qctecmdr Service
ec4a9a5e25 Merge "diag: Continue processing of remaining pkt when read len is zero" 2018-08-23 18:09:35 -07:00
qctecmdr Service
ded135efdc Merge "diag: Update msg mask's ranges properly" 2018-08-23 18:09:34 -07:00
qctecmdr Service
4978791dce Merge "ARM: dts: msm: Add coresight nodes for sdmmagpie" 2018-08-23 18:09:34 -07:00
qctecmdr Service
6cb440e89c Merge "cfg80211: never ignore user regulatory hint" 2018-08-23 18:09:34 -07:00