aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc
Commit message (Collapse)AuthorAgeFilesLines
...
* max77819: more logspam removalMister Oyster2017-09-232-0/+10
|
* flashlight: remove logspamMister Oyster2017-09-231-0/+2
|
* mali: remove some logspamMister Oyster2017-09-232-0/+8
|
* max77819: remove log & dead code, fix indentMister Oyster2017-09-232-655/+456
|
* misc: replace __FUNCTION__ by __function__Moyster2017-09-23288-1320/+1320
| | | | | result of : git grep -l '__FUNCTION__' | xargs sed -i 's/__FUNCTION__/__func__/g'
* MSDC: Denali Secruity VolnerabilityHuan Tang2017-09-201-9/+20
| | | | | | | | | | | | | | [Detail] Stack overflow & Null Pointer [Solution] 1.Limited the param 'count' for 'copy_from_user' 2.Check Pointer Change-Id: I81a91a64494b5f088c131f2d1ebc11fcf4b21939 Signed-off-by: Huan Tang <huan.tang@mediatek.com> CR-Id: ALPS03361487 Feature: Others Backported to 3.10 and a few code style ocds Signed-off-by: Mister Oyster <oysterized@gmail.com>
* auxadc: fix auxadc security defectXuexi Bai2017-09-202-12/+40
| | | | | | | | | | | | | [Detail] auxadc: 1. fix auxadc security defect` Change-Id: I60eeade13b8ddef14cbc2773d7f6fb9d7e8d49b0 Signed-off-by: Xuexi Bai <xuexi.bai@mediatek.com> CR-Id: ALPS03353887 Feature: Others Backported to 3.10 Signed-off-by: Mister Oyster <oysterized@gmail.com>
* drivers: mtk: remove mlog driverMister Oyster2017-09-185-977/+0
| | | | best it can do is crash the whole kernel when zram is used
* ANDROID: uid_sys_stats: Fix implicit declaration of get_cmdline()Amit Pundir2017-09-161-0/+1
| | | | | | | | | Include linux/mm.h for get_cmdline() declaration. Change-Id: Icad6ef7deef4d93d92d423c96bfa61fb5d66d0b7 Fixes: Change-Id: I30083b757eaef8c61e55a213a883ce8d0c9cf2b1 ("uid_sys_stats: log task io with a debug flag") Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
* uid_sys_stats: log task io with a debug flagYang Jin2017-09-162-60/+267
| | | | | | | | | Add a hashmap inside each uid_entry to keep track of task name and io. Task full name is a combination of thread and process name. Bug: 63739275 Change-Id: I30083b757eaef8c61e55a213a883ce8d0c9cf2b1 Signed-off-by: Yang Jin <yajin@google.com>
* sensor: fix memory leak issuehongxu.zhao2017-09-161-1/+1
| | | | | | | | | | | | [Detail] dat initialize to 0 [Solution] Change-Id: Ib539e9624b1b8153eda8dd8f7ce55cb67052be59 CR-Id: ALPS03288635 Feature: Others Signed-off-by: hongxu.zhao <hongxu.zhao@mediatek.com> (cherry picked from commit ba50a5f9d3254520dda3a70db87a35401e4e14ac)
* display: fbconfig use after freeQinglong Chai2017-09-161-0/+6
| | | | | | | | | | | [Detail] add mutex protect list_add and list_del to avoid use after free Change-Id: Ic7d02a5b97955eaee4d3684e13a4a67f3349b42b Signed-off-by: Qinglong Chai <qinglong.chai@mediatek.com> CR-Id: ALPS03275524 Feature: disp
* mtk: gps: derpMister Oyster2017-08-311-2/+2
|
* mtk: gps: upstream changesMister Oyster2017-08-202-4/+46
|
* Merge mediatek security patchesfire8552017-08-205-30/+66
| | | | | | | * Revert : Merge mediatek security patches (14326e25d3fc3b4d780c2d9d2eebbe3231ad5376) * Reapply : 14326e25d3fc3b4d780c2d9d2eebbe3231ad5376 Signed-off-by: Mister Oyster <oysterized@gmail.com>
* uid_sys_stats: fix overflow when io usage delta is negativeJin Qian2017-08-121-5/+21
| | | | | | | | | Setuid can cause negative delta. Check this and update total usage only if delta is positive. Bug: 64317562 Change-Id: I4818c246db66cabf3b11d277faceedec1678694a Signed-off-by: Jin Qian <jinqian@google.com>
* mtk: smi: byebye debugMoyster2017-08-121-63/+0
|
* mtk: cmdq: upstream updateMister Oyster2017-08-111-2/+26
|
* mtk: gud: upstream update (up to ~june 17)Mister Oyster2017-08-111-5/+12
|
* mt6735: Add an option to multiplex AP and STA on wlan0Diogo Ferreira2017-06-044-8/+13
| | | | | | | | | | | | | This adds CONFIG_MTK_COMBO_AOSP_TETHERING_SUPPORT which, when enabled, allows ap and wlan to co-exist in the same interface, as Android expects. Most of this functionality is also available (albeit not compilable broken) under CFG_TC1_FEATURE but that has larger implications around the radio and usb stack that we do not want to adopt. Change-Id: Ib1d1be40566f1bb9ccc7be45b49ec8d1f3b3ba58 Ticket: PORRIDGE-30
* Fix "Information disclosure vulnerability in MediaTek driver"fire8552017-05-281-93/+14
| | | | CVE-2017-0529
* Fix "Elevation of privilege vulnerability in MediaTek components"fire8552017-05-283-32/+38
| | | | CVE-2017-0502
* Fix security vulnerablity in cmdq driverfire8552017-05-282-1/+10
|
* Fix "Elevation of privilege vulnerability in MediaTek Hardware Sensor Driver"fire8552017-05-281-2/+2
| | | | CVE-2017-0517
* Kconfig: add depends for UID_SYS_STATSGanesh Mahendran2017-05-241-1/+1
| | | | | | | | uid_io depends on TASK_XACCT and TASK_IO_ACCOUNTING. So add depends in Kconfig before compiling code. Change-Id: Ie6bf57ec7c2eceffadf4da0fc2aca001ce10c36e Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
* ANDROID: uid_sys_stats: defer io stats calulation for dead tasksJin Qian2017-05-241-65/+42
| | | | | | | | | Store sum of dead task io stats in uid_entry and defer uid io calulation until next uid proc stat change or dumpsys. Bug: 37754877 Change-Id: I970f010a4c841c5ca26d0efc7e027414c3c952e0 Signed-off-by: Jin Qian <jinqian@google.com>
* ANDROID: uid_sys_stats: fix access of task_uid(task)Ganesh Mahendran2017-05-241-4/+5
| | | | | | | | struct task_struct *task should be proteced by tasklist_lock. Change-Id: Iefcd13442a9b9d855a2bbcde9fd838a4132fee58 Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com> (cherry picked from commit 90d78776c4a0e13fb7ee5bd0787f04a1730631a6)
* ANDROID: uid_sys_stats: reduce update_io_stats overheadJin Qian2017-05-241-10/+51
| | | | | | | | | | | | Replaced read_lock with rcu_read_lock to reduce time that preemption is disabled. Added a function to update io stats for specific uid and moved hash table lookup, user_namespace out of loops. Bug: 37319300 Change-Id: I2b81b5cd3b6399b40d08c3c14b42cad044556970 Signed-off-by: Jin Qian <jinqian@google.com>
* mtk: mt_logger: update & cleanupMister Oyster2017-05-231-26/+37
|
* ANDROID: uid_sys_stats: fix typo in initJin Qian2017-05-231-1/+1
| | | | | Change-Id: I8a41b331c973898015d11d2018257727083f7910 Signed-off-by: Jin Qian <jinqian@google.com>
* ANDROID: uid_sys_stats: change to use rt_mutexWei Wang2017-05-231-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | We see this happens multiple times in heavy workload in systrace and AMS stuck in uid_lock. Running process: Process 953 Running thread: android.ui State: Uninterruptible Sleep Start: 1,025.628 ms Duration: 27,955.949 ms On CPU: Running instead: system_server Args: {kernel callsite when blocked:: "uid_procstat_write+0xb8/0x144"} Changing to rt_mutex can mitigate the priority inversion Bug: 34991231 Bug: 34193533 Change-Id: I481baad840b7bc2dfa9b9a59b4dff93cafb90077 Test: on marlin Signed-off-by: Wei Wang <wvw@google.com>
* ANDROID: uid_sys_stats: account for fsync syscallsJin Qian2017-05-231-2/+9
| | | | | Change-Id: Ie888d8a0f4ec7a27dea86dc4afba8e6fd4203488 Signed-off-by: Jin Qian <jinqian@google.com>
* ANDROID: uid_sys_stats: fix negative write bytes.Jin Qian2017-05-231-4/+10
| | | | | | | | | | | | A task can cancel writes made by other tasks. In rare cases, cancelled_write_bytes is larger than write_bytes if the task itself didn't make any write. This doesn't affect total size but may cause confusion when looking at IO usage on individual tasks. Bug: 35851986 Change-Id: If6cb549aeef9e248e18d804293401bb2b91918ca Signed-off-by: Jin Qian <jinqian@google.com>
* ANDROID: uid_sys_stats: remove unnecessary code in procstat switchJin Qian2017-05-231-14/+1
| | | | | | | | | No need to aggregate the switched uid separately since update_io_stats_locked covers all uids. Bug: 34198239 Change-Id: Ifed347264b910de02e3f3c8dec95d1a2dbde58c0 Signed-off-by: Jin Qian <jinqian@google.com>
* ANDROID: uid_sys_stats: return full size when state is not changed.Jin Qian2017-05-231-1/+1
| | | | | | | Userspace keeps retrying when it sees nothing is written. Bug: 34364961 Change-Id: Ie288c90c6a206fb863dcad010094fcd1373767aa
* ANDROID: uid_sys_stats: allow writing same stateJin Qian2017-05-231-1/+6
| | | | | | Signed-off-by: Jin Qian <jinqian@google.com> Bug: 34360629 Change-Id: Ia748351e07910b1febe54f0484ca1be58c4eb9c7
* ANDROID: uid_sys_stats: rename uid_cputime.c to uid_sys_stats.cJin Qian2017-05-233-3/+4
| | | | | | | | This module tracks cputime and io stats. Signed-off-by: Jin Qian <jinqian@google.com> Bug: 34198239 Change-Id: I9ee7d9e915431e0bb714b36b5a2282e1fdcc7342
* ANDROID: uid_cputime: add per-uid IO usage accountingJin Qian2017-05-231-16/+233
| | | | | | | | | | | | | | | | | | IO usages are accounted in foreground and background buckets. For each uid, io usage is calculated in two steps. delta = current total of all uid tasks - previus total current bucket += delta Bucket is determined by current uid stat. Userspace writes to /proc/uid_procstat/set <uid> <stat> when uid stat is updated. /proc/uid_io/stats shows IO usage in this format. <uid> <foreground IO> <background IO> Signed-off-by: Jin Qian <jinqian@google.com> Bug: 34198239 Change-Id: I3369e59e063b1e5ee0dfe3804c711d93cb937c0c
* mtk: mlog: fix build without lmkMister Oyster2017-05-201-0/+4
|
* cam: Sync code from L1.Mp10Anmin Hsu2017-05-111-0/+1
| | | | | | | | | | | | | | [Detail] sync code from L1.MP10 [Solution] manual sync in 1 commit [Feature] Camcorder Application MTK-Commit-Id: 7009349bf8a23dd0377dad6759af3da264f6b863 Change-Id: Idba37e1f05a9b05d7da6200c28da114d63f5c33d Signed-off-by: John.Wei <john.wei@mediatek.com> CR-Id: ALPS02321162
* aee: enable mt_dump flowAnmin Hsu2017-05-111-0/+11
| | | | | | | | | | | | | | | | | | | [Detail] ipanic flow need to use mt_dump flow to avoid reserve memory for preloader/lk [Solution] 1.Enable mt_dump ke flow 2.remove preloader/lk memory reserve in MT6735 [Feature] CTS(*) MTK-Commit-Id: aff7a2ce6a1c6bd805b2acdeaef7c8c28a0cd613 Change-Id: I2264b0544d3219b4ed2dd53483a134182d76aa17 Signed-off-by: Ji Zhang <ji.zhang@mediatek.com> CR-Id: ALPS02296880 (cherry picked from commit abaf1e786c9856e1a048e55714faa7f98309b96d)
* AEE: fix code defects.Anmin Hsu2017-05-112-1/+7
| | | | | | | | | | | | | | | [Detail] defects found out by Coverity: memroy leak risk. related files:aee kernel driver aed-debug.c & aed-main.c [Solution] fix the defects with kfree(). [Feature] Android Exception Engine(AEE) MTK-Commit-Id: 3c664402362bd16414b09e9050b91f45849b6a3f Change-Id: Ib4a67f16d5552a5c5c1096eedef1e8b4ef8faece Signed-off-by: Zhiyong Wang <zhiyong.wang@mediatek.com> CR-Id: ALPS02319644
* mlog: use round_jiffies in mlog timerAnmin Hsu2017-04-251-1/+1
| | | | | | | | | | | | | | | | [Detail] CPU0 off [Solution] use round_jiffies in mlog timer [Feature] Others MTK-Commit-Id: b39445fa9c9c93fbd6bb660011c242688af44f0b Change-Id: I2b209908f2a7493e1760faafe5bd394969445996 Signed-off-by: mtk10008 <tehsin.lin@mediatek.com> CR-Id: ALPS02298339
* mlog: Fixed stack overflowAnmin Hsu2017-04-251-1/+1
| | | | | | | | | | | | | | | | [Detail] Function sprintf does not check the length of buffer. [Solution] Using snprintf prevent stack overflow. [Feature] Monkey Test MTK-Commit-Id: 699464af6ac730e4edd21773b02aa5e1f6dc9403 Change-Id: I238b71ac9966b1967f4c93ffeb29a7c88d441193 Signed-off-by: mtk10008 <tehsin.lin@mediatek.com> CR-Id: ALPS02316340
* AEE: kernel driver memory leak riskAnmin Hsu2017-04-251-1/+1
| | | | | | | | | | | | | | [Detail] It has memory leak risk while call aee_kernel_dal_api(). [Solution] Modify aee_kernel_dal_api() with kfree() system call. [Feature] Memory Optimization MTK-Commit-Id: 09f75c2a0814049e8285693b5b5c715efe1298f7 Change-Id: I9902927084839175bb72e746c481b0d969d819d6 Signed-off-by: Zhiyong Wang <zhiyong.wang@mediatek.com> CR-Id: ALPS02312652
* drivers: mtk: conn_md: backport from 3.18Mister Oyster2017-04-2511-160/+65
|
* Security patchesfire8552017-04-169-4/+20
| | | | Signed-off-by: Mister Oyster <oysterized@gmail.com>
* mtk: nfc: remove nfc driverMister Oyster2017-04-165-902/+0
|
* conn_soc: Security Vulnerability in Mediatek driver : arbitrary kernel writeEddie Chen2017-04-131-9/+19
| | | | | | | | | | google security issue fix Bug num:25873324 Change-Id: I2eb8e03dc67209d9a709fc4a27976f986f0b7606 Signed-off-by: Eddie Chen <eddie.chen@mediatek.com> Signed-off-by: Mister Oyster <oysterized@gmail.com>
* GPIO: Remove unused gpio debug cmd arraryDavid Chu2017-04-131-20/+2
| | | | | | | | | [Detail] Remove unused gpio debug cmd arrary which will cause secure problem Bug: ALPS02943506 Change-Id: If5f63928fd5788f853e5e956d7117775e58e32a2