Fixes implementation of cache cleaning, it was implemented using outdated
code which cleaned valid pages as well by mistake. The fix uses the
original implementation from mm layer which was tweaked to zero pages
after releasing them. Also it is now invoked only when there is HW
encryption (meaning that cache is unencrypted)
Change-Id: If713fd17a89be6d998c1a7ba86bee4c17d2bca0f
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
Conflicts:
fs/ecryptfs/caches_utils.c
Exposes drop_pagecache_sb (required by eCryptfs cache wiping)
Adds truncate_inode_pages_fill_zero (required by eCryptfs cache wiping),
which not only truncates pages but also fills them with 0, so that the
cached data can no longer be retrieved.
Change-Id: Icfc18a2c8cdc922e71ee17add6459a1355e77ba6
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
[gbroner@codeaurora.org: fix merge conflict]
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
1. Fixed bug which didn't allow several threads to work simultaneously
on files in eCryptfs mounted folder
2. Fixed bug where PFK close callback was invoked multiple times when
files was opened and closed multiple times. Now it is invoked just once
when files is closed for the last time
Change-Id: Iaa3ada03500e5a12752918b5d2bb4a852ddca5f0
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
Also added useful function for translation between inode to filename
Change-Id: If0d5db3545a71c85223ef53980ee61f9dbd002d9
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
Our logic that distinguished eCryptfs files from non eCryptfs ones
checked bi_vcnt field in bio to make sure it has valid bio vecs.
Apparently this field is not updated in some cases by block layer
and in general can't be trusted outside of code that own bio.
There is another field that need to be used for this purpose - bi_size
Change-Id: Ibf225543618373699a0d5adc3295daf9ded6169a
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
ICE clocks need to be turned on to clear the key, fixed
Change-Id: I1cd5a10899c2f128b138fe380beb34a5a310fa05
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
When key is set in ICE via TZ, HLOS should send two parts, SALT and
the KEY itself according to AES standards. KEY was used for both parts.
Change-Id: I453dea289b01bdf49352d5209255966052f5dc1b
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
PFK is a new module that accompanies eCryptfs and
enables it to utilize ICE hw encryption engine. Module
is responsible for storing encryption/decryption keys
inside eCryptfs inodes for each file and loading them
to ICE
Change-Id: I6e755ca657164919147fe0d9482477e14a4be5eb
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
[gbroner@codeaurora.org: fix merge conflicts, adapted LSM hooks
and added missing qseecom headers to fix compilation]
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
enabled eCryptfs for qcom targets. In addition to the usual
options, a special mode 'aes-xts' was added for qcom ICE hw
encryption
Change-Id: I20c01adc46c977b4a5db0be9ff93384cda14bc56
Signed-off-by: Lina Zarivach <linaz@codeaurora.org>
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
[gbroner@codeaurora.org: fix merge conflict]
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
QCOM security components were moved to security folder inside
kernel which is more appropriate
Change-Id: I4e450a23583ceac929a3980b1b5998f4e0c7cfa9
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
[gbroner@codeaurora.org: fix merge conflicts and updated ARCH_QCOM]
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Integrated from msm-3.14. Additional fixes were made to compile with the
new kernel and various new warnings and checkpatch issues were fixed
Change-Id: I073db1041e41eac9066e37ee099f1da9e4eed6c0
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
[gbroner@codeaurora.org: fixed merge conflict and adapted the LSM
security hooks]
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Export sched_setscheduler_nocheck() so that external kernel modules
can use it.
Change-Id: Ib50f537f5aef50c365ba63fb8ffce05bc1c7c431
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
regcache sync can call multi register write to sync multiple
register writes to hardware in one transaction. Change enables
support from soundwire framework to sync multiple registers
in one transaction.
Change-Id: Iafe35bf9b8987fb7214efff0d7d4ae3e0a6a4072
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Call regmap_raw_multi_reg_write API from regcache sync to sync
multiple registers to the hardware if bus interface supports
multi register write. This change will help in reducing the
latency for syncing the registers to the hardware.
Change-Id: I94d19434dc7465434f10db9f7bd62fcc8246d845
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Compress devices in ALSA framework on kernel 4.4 does not support
both playback and capture at the same time. So, remove capture
support from compress 1 front end dai link as this is not being
used by any audio usecase.
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
In ALSA framework on kernel 4.4, compress devices are unidirectional
and does not support both playback and capture at the same time.
Change removes capture support for MultiMedia4 front-end as this
is not being used in any of the audio usecases.
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Squash and apply the following changes taken from the msm-3.14
kernel branch as of msm-3.14
commit 8139d0b4e7a6d ("ARM: dts: msm: Set flag to manage clks")
commit c24a3df92a457643cc0821eb9e8f392ae5a907ee
Author: Amy Maloche <amaloche@codeaurora.org>
Date: Thu May 9 10:23:41 2013 -0700
input: gen_vkeys: Make y_offset an optional property
Not all targets will need the y coordinate shifted to
function properly, so set this value as default 0.
Change-Id: I1816433c3601fe099ffb8ee275637e573990e432
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
Documentation/devicetree/bindings/input/gen_vkeys.txt
drivers/input/touchscreen/gen_vkeys.c
2 files changed, 13 insertions(+), 5 deletions(-)
commit bb2ac18f8fab38fa12d8a7d8b7ee80d9c0049329
Author: Amy Maloche <amaloche@codeaurora.org>
Date: Wed Apr 17 12:15:56 2013 -0700
vkeys: gen_vkeys: Add key position offset
Add virtual key position offset to match virtual key
positions with front panel.
Change-Id: Ibbf89e816d9654f202b75470df0c673aa42439c8
Acked-by: Chun Zhang <chunz@qti.qualcomm.com>
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
Documentation/devicetree/bindings/input/gen_vkeys.txt
drivers/input/touchscreen/gen_vkeys.c
include/linux/input/gen_vkeys.h
3 files changed, 10 insertions(+), 2 deletions(-)
commit 1a6d213cf5a3e40d8b39507e2b010dc81de63630
Author: Mohan Pallaka <mpallaka@codeaurora.org>
Date: Wed Aug 8 11:25:52 2012 +0530
input: Add support for virtual key generation
Virtual keys are used for navigation on Android.
These are not specific to the controller used
in the target but are specific to the target.
Add a module to generate virtual keys independently
of the controller.
Change-Id: I0c86dc77f1bc53c283e990be419c2715edf4e1c0
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
[stepanm@codeaurora.org: resolve Kconfig conflicts]
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
.../devicetree/bindings/input/gen_vkeys.txt
drivers/input/touchscreen/Kconfig
drivers/input/touchscreen/Makefile
drivers/input/touchscreen/gen_vkeys.c
include/linux/input/gen_vkeys.h
5 files changed, 278 insertions(+)
Change-Id: Ie0e14d201a42632af57ff23dc85cec8881125e5a
Signed-off-by: Alex Sarraf <asarraf@codeaurora.org>
Currently we're not returning a proper error value for the
devices which doesn't have default pinctrl state 0. This adds the
device to the pinctrl list and cause problems later. Fix this by
returning a proper error value when necessary.
Change-Id: Ia62a411376bddc446575f4c630ae185c6d584350
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
The open fault status flag depends on fault status register. However,
the register value is reset when LED module is disabled. In this
case, use OR logic to make sure the value is always set even if
module gets disabled.
Change-Id: If89f8fca25abc79d9d200d59031b8654f812105d
Signed-off-by: Chun Zhang <chunz@codeaurora.org>
Add a macro definition for the input device name.
Change-Id: I084e073186765228c48b6dec9ea05d7085350617
Signed-off-by: Alex Sarraf <asarraf@codeaurora.org>
When there is heavy diag traffic, all the read buffers
for MHI are used. This change doubles the amount of buffers to
increase the packet throughput.
CRs-Fixed: 971043
Change-Id: I854abe0ba5273add8dee6a9762598706db12804a
Signed-off-by: Chris Lew <clew@codeaurora.org>
Make changes to support diag over MHI.
Change-Id: I6a1ff44da275c12144c0a83dbb317a00487f62be
Signed-off-by: Sreelakshmi Gownipalli <sgownipa@codeaurora.org>
Make change to support new AEAD API on 4.4 kernel; also, take
code with ce_support.aligned_only and ce_bam_info.minor_version
=0 out as 4.4 support only for msm which has crypto 5.2 or
even higher.
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
lpm-level headers required only when CONFIG_MSM_PM is set.
To compile msm kernel for other targets (arch=um), add config
check to include lpm levels.
Change-Id: Ia1bd51da4952e56b945a5e51a3b1ff8aaa643cd5
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Currently, RTC_ALARM is used to wake-up target from
suspend state and is also used for power-off alarm
feature. This patch uses qtimer to wake-up from
suspend state.
Change-Id: Ia42cfecd573309be2f03c18b4f1c321be8202d7d
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
debug objects are placed in a list obj_pool which is static.
This is placed in __initdata which kmemleak will not scan
unless task stack scan is enabled.
We have taken the explicit choice of disabling task stack
scan by default through the creation of config in the
'commit 7f15dd8a750e ("kmemleak : Make kmemleak_stack_scan
optional using config")'
Thus kmemleak would think that there is no reference to this
and thus we will see this report as leaking memory.
Further, this memory would be freed by the debugobjects
framework when there is a memory crunch or when the
object size exceeds the max limit of ODEBUG_POOL_SIZE.
Fix this by using kmemleak_not_leak() when a debug object
is allocated to specify explicitly that this is not a leak.
Change-Id: I0ce66b1be4e5984681af9fd61883e7010e7bbd1b
Signed-off-by: Vignesh Radhakrishnan <vigneshr@codeaurora.org>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Currently kmemleak scans module memory as provided
in the area list. This takes up lot of time with
irq's and preemption disabled. Provide a compile
time configurable config to enable this functionality.
Change-Id: I5117705e7e6726acdf492e7f87c0703bc1f28da0
Signed-off-by: Vignesh Radhakrishnan <vigneshr@codeaurora.org>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
[satyap: trivial merge conflict resolution and remove duplicate entry]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Kmemleak reports the following memory leak :
[<ffffffc0002faef8>] create_object+0x140/0x274
[<ffffffc000cc3598>] kmemleak_alloc+0x80/0xbc
[<ffffffc0002f707c>] kmem_cache_alloc_trace+0x148/0x1d8
[<ffffffc00024504c>] __smpboot_create_thread.part.2+0x2c/0xec
[<ffffffc0002452b4>] smpboot_register_percpu_thread+0x90/0x118
[<ffffffc0016067c0>] spawn_ksoftirqd+0x1c/0x30
[<ffffffc000200824>] do_one_initcall+0xb0/0x14c
[<ffffffc001600820>] kernel_init_freeable+0x84/0x1e0
[<ffffffc000cc273c>] kernel_init+0x10/0xcc
[<ffffffc000203bbc>] ret_from_fork+0xc/0x50
This memory allocated here points to smpboot_thread_data.
Data is used as an argument for this kthread.
This will be used when smpboot_thread_fn runs. Therefore,
is not a leak.
Call kmemleak_not_leak for smpboot_thread_data pointer
to ensure that kmemleak doesn't report it as a memory
leak.
Change-Id: I02b0a7debea3907b606856e069d63d7991b67cd9
Signed-off-by: Vignesh Radhakrishnan <vigneshr@codeaurora.org>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
arch_timer register accesses happen more frequently flooding the
RTB logs. Since they are not that useful for debugging purposes,
use _no_log variants while accessing those registers.
Change-Id: Ide35ef1a01e4792c1b3b7b7be7ad3f069dc2f694
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
[satyap: trivial merge conflict resolution]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Ghost image is displayed on R69006 panel after certain
operations in some extreme cases. Fix this issue by
optimizing its flicker value.
Change-Id: Id36dcc67a419123c2ef45cbecf4c592222d95a2b
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflicts]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
commit 269a1b78 "usb: gadget: Add support for DMA mapping
optimization of request buffers" added checks to
usb_gadget_{map,unmap}_request() to support the pre-mapped
DMA buffers that a function can map ahead of time before
enqueing the request. However, these routines check the
req->dma for a sentinel value, DMA_ERROR_CODE, in order to
determine whether or not to proceed with dma_map/unmap().
This means that UDC drivers should initialize to this value
when allocating each new request. Do this in the dwc3
gadget driver in order to properly support this. This fixes
an issue in which usb_gadget_unmap_request() was incorrectly
being called on an uninitialized (as 0) req->dma address,
and proceeds to call dma_unmap() which interprets it as
physical address 0x0.
Change-Id: I514d2b824e272c6c42c483febaa1c4084b0d09ee
Signed-off-by: Jack Pham <jackp@codeaurora.org>
In order to improve performance, this patch enabled mapping of USB request
buffers in advance, before queueing them to the HW. This can be used when
there is a pool or pre-mapped request buffers so we don't need to map it
again every time the request gets queued.
Change-Id: Ic3a6db749343ef1345e0816210517755aee055b3
Signed-off-by: Danny Segal <dsegal@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
NULL pointer crash is seen when starting USB QDSS data transfer
from usb_qdss_connect_work() as cdev was not updated. Issue can
be fixed by updating cdev from qdss_bind(). It seems that cdev
has been used couple of places to provide gadget related information.
Hence removing usage of cdev from qdss data structure and use gadget
directly.
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This change enables USB BAM driver (CONFIG_USB_BAM) and USB QDSS
driver (CONFIG_USB_CONFIGFS_F_QDSS) for BAM2BAM communication
between USB and QDSS peripherals.
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
USB BAM driver is accessing some of APIs which are specific to
CI controller. Hence add definitions of those APIs as No-ops
when CI is not enable to compile USB BAM driver.
Change-Id: Id121f042023f4a176936c8b575613244ec46de7f
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
- This change adds configfs usage with USB QDSS driver.
- It removes all different supported control and data transports
and assume BAM2BAM as default mode.
- It also removes supported DPL functionality from this driver.
Change-Id: I9678c9e9a397445f36272616e517bbb83a59e88a
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This change adds USB QDSS function driver which is used for
USB QDSS functionality. This snapshot is taken as of msm-3.18
kernel commit d5809484bb1b.
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Add USB BAM driver used which allows USB BAM to communicate with other
other peripherals (e.g QDSS or IPA) BAM.
This snapshot is taken as of msm-3.18 commit d5809484bb1b.
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
HW MAD bypass feature is to facilitate input to CPE by avoiding
MAD in codec. This is done by routing DEC1 data to CPE. Add the
required changes to support this feature.
CRs-fixed: 938514
Change-Id: I7788b1475cd22bdea291bcae47f048131b220ce3
Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>