summaryrefslogtreecommitdiff
path: root/drivers/platform/msm/sps (follow)
Commit message (Collapse)AuthorAge
* msm: sps: Update debug message format specifierJishnu Prakash2019-04-22
| | | | | | | | | | | | | | | Restrict printing of kernel virtual addresses in SPS driver. In debug prints, handles to bam device structures may be printed as integers. As these handles are obtained by casting pointer to bam device structures to integer, they can reveal addresses of the structures to attackers. Cast the handles in debug prints to pointers, printed with with %pK, which hides these values if kptr_restrict is set (default on Android). Change-Id: Idd28c7d11a06113605f7428a4cfc2505c1ae0073 Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
* msm: sps: Suppress bind/unbind attributesSiva Kumar Akkireddi2018-07-26
| | | | | | | | | | SPS driver does not support manual bind/unbind operations through sysfs. Suppress the bind/unbind nodes. Do not free SPS struct in sps_device_de_init since it is being done in sps_exit, and also to avoid use-after-free. Change-Id: If6da6c5fb9d1a44d0420c6151f7f9d0a33cb2d04 Signed-off-by: Siva Kumar Akkireddi <sivaa@codeaurora.org>
* msm: sps: Restore ipc log destroy commandsJishnu Prakash2017-11-24
| | | | | | | | | Changes got reverted accidentally with commit e498154c0976 ("msm: sps: Update debug message format specifier") restoring them again. Change-Id: I6c2c7b4d636131341139d89ff4d59b608df5da9b Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
* msm: sps: Update debug message format specifierJishnu Prakash2017-11-19
| | | | | | | | | | | Restrict printing of kernel virtual addresses in SPS driver. In debug code, %p is used to print virtual addresses of kernel objects, which can be exploited by attackers. It is replaced with %pK, which hides these values if kptr_restrict is set (default on Android). Change-Id: I57585fa655abc01b2e8d694c8f31b7617bbf4ec7 Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
* msm: sps: Destroy debug log during BAM deregistrationRama Krishna Phani A2017-08-22
| | | | | | | | | Clients can register and deregister to BAM based on usecase. IPC Log pages are created during clients registration to BAM. Update support to destroy log pages during BAM deregistration. Change-Id: I1da266c61ebd57d6cfead6fc5b64a05be5620cf4 Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
* msm: sps: Fix race condition in SPS debugfs APIsSiva Kumar Akkireddi2017-06-19
| | | | | | | | | SPS debugfs APIs can be called concurrently which can result in dangling pointer access. This change synchronizes access to the SPS debugfs buffer. Change-Id: I409b3f0618f760cb67eba47b43c81d166cdae4aa Signed-off-by: Siva Kumar Akkireddi <sivaa@codeaurora.org>
* msm: sps: add the checking of userspace input lengthYan He2017-01-06
| | | | | | | | Add the checking of the input length from userspace so kernel space will not copy any content outside the input buffer. Change-Id: I3cef834ed1df836356ba40e6e950a534ec49819d Signed-off-by: Yan He <yanhe@codeaurora.org>
* msm: sps: correct device base address for register dumpingYan He2016-09-28
| | | | | | | | Correct the base address of BAM device when dump registers of the BAM. Change-Id: I12f49919a278b176bb85f353f5ce538f22ddc059 Signed-off-by: Yan He <yanhe@codeaurora.org>
* msm: sps: Avoid pipe disconnect while IRQ is in progress and viceversaRama Krishna Phani A2016-09-13
| | | | | | | | | | | Client driver may disconnect pipe while some data is still pending on the pipe and might not need IRQ for that data. Current implementation might result in crash in case disconnect and IRQ happens on same pipe in parallel. Implement lock to avoid pipe disconnect while IRQ is in progress for that pipe and viceversa. Change-Id: Icf43c0a18cfc1644270b684a792632a6c81f1797 Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
* msm: sps: Change the default SPS IPC log levelRama Krishna Phani A2016-08-17
| | | | | | | | Set the default IPC logging level to minimal logging in case client driver does not specify ipc logging level. Change-Id: I83174225b4eb7ae72cb16bc8f6dcf9659bc1342e Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
* msm: sps: update SPS loggingYan He2016-03-23
| | | | | | | | Update the logging in SPS driver to catch additional info for the interaction between SPS driver and BAM client drivers. Change-Id: Icd5955d2d4dd83124f47e60e052ec3b3a2611025 Signed-off-by: Yan He <yanhe@codeaurora.org>
* msm: sps: support using cached write pointer for BAM-to-Sys modeYan He2016-03-23
| | | | | | | | Support using the cached write pointer for a BAM-to-Sys mode BAM pipe when check if the desc FIFO of that pipe is full. Change-Id: Ie480ecca9eff76388c504665b496e01bbf3e009f Signed-off-by: Yan He <yanhe@codeaurora.org>
* msm: sps: add the checking of ZLT in case of an empty pipeYan He2016-03-23
| | | | | | | | | Check if a ZLT descriptor is the last pending descriptor in the desc FIFO when determine if the desc FIFO of that pipe is empty. Change-Id: Ib8174953d6ad7d886f47f21e243e985b79ef41fb Signed-off-by: Yan He <yanhe@codeaurora.org>
* platform: msm: Add snapshot of the SPS/BAM driverYan He2016-03-22
Add the MSM SPS (Smart Peripheral Switch) driver. SPS may be used as a DMA engine to move data in either Peripheral-to- Peripheral (a.k.a. BAM-to-BAM) mode or Peripheral-to-Memory (a.k.a BAM-System) mode. This snapshot is taken as of msm-3.18 commit 132e1315c1 Change-Id: I7ec9781c3b608b9ee0fffdf7ba3e1b33bfa4dfcd Signed-off-by: Yan He <yanhe@codeaurora.org>