Commit Graph
822017 Commits
Author SHA1 Message Date
Todd Kjos 154e67bd72 UPSTREAM: binder: use cred instead of task for getsecid
commit 4d5b5539742d2554591751b4248b0204d20dcc9d upstream.

Use the 'struct cred' saved at binder_open() to lookup
the security ID via security_cred_getsecid(). This
ensures that the security context that opened binder
is the one used to generate the secctx.

Mot-CRs-fixed: (CR)
CVE-Fixed: CVE-2021-39686
Bug: 200688826

Cc: stable@vger.kernel.org # 5.4+
Fixes: ec74136ded79 ("binder: create node flag to request sender's security context")
Signed-off-by: Todd Kjos <tkjos@google.com>
Suggested-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Change-Id: Ia7b59804a0bdbd51191bbcca556414840307c623
Bug: 200688826
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Gajjala Chakradhar <gajjalac@motorola.com>
Reviewed-on: https://gerrit.mot.com/2190144
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:52 -03:00
Todd Kjos 53ea623908 BACKPORT: binder: use cred instead of task for selinux checks
commit 52f88693378a58094c538662ba652aff0253c4fe upstream.

Since binder was integrated with selinux, it has passed
'struct task_struct' associated with the binder_proc
to represent the source and target of transactions.
The conversion of task to SID was then done in the hook
implementations. It turns out that there are race conditions
which can result in an incorrect security context being used.

Fix by using the 'struct cred' saved during binder_open and pass
it to the selinux subsystem.

Mot-CRs-fixed: (CR)
CVE-Fixed: CVE-2021-39686
Bug: 200688826

Cc: stable@vger.kernel.org # 5.14 (need backport for earlier stables)
Fixes: 79af73079d ("Add security hooks to binder and implement the hooks for SELinux.")
Suggested-by: Jann Horn <jannh@google.com>
Signed-off-by: Todd Kjos <tkjos@google.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Change-Id: Id7157515d2b08f11683aeb8ad9b8f1da075d34e7
Bug: 200688826
[ tkjos@ fixed minor conflict ]
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Gajjala Chakradhar <gajjalac@motorola.com>
Reviewed-on: https://gerrit.mot.com/2190143
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:51 -03:00
Todd Kjos 0ccc436baa UPSTREAM: binder: use euid from cred instead of using task
commit 29bc22ac5e5bc63275e850f0c8fc549e3d0e306b upstream.

Save the 'struct cred' associated with a binder process
at initial open to avoid potential race conditions
when converting to an euid.

Set a transaction's sender_euid from the 'struct cred'
saved at binder_open() instead of looking up the euid
from the binder proc's 'struct task'. This ensures
the euid is associated with the security context that
of the task that opened binder.

Mot-CRs-fixed: (CR)
CVE-Fixed: CVE-2021-39686
Bug: 200688826

Cc: stable@vger.kernel.org # 4.4+
Fixes: 457b9a6f09 ("Staging: android: add binder driver")
Signed-off-by: Todd Kjos <tkjos@google.com>
Suggested-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Suggested-by: Jann Horn <jannh@google.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Change-Id: I91922e7f359df5901749f1b09094c3c68d45aed4
Bug: 200688826
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Gajjala Chakradhar <gajjalac@motorola.com>
Reviewed-on: https://gerrit.mot.com/2190142
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:51 -03:00
liujg6 0e12c41d5d arm64/defconfig: add devon extra configs
Add devon extra configs
Define DEVON_DTB

Change-Id: I34e8ac0418dbffbb84fc3d9dcf24c2434a43ecea
Reviewed-on: https://gerrit.mot.com/2196702
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Submit-Approved: Jira Key
Tested-by: Jira Key
Reviewed-by: Xianhong Li <lixh8@lenovo.com>
(cherry picked from commit a68f387b0be63ea8c941ea4492bfeb0a3c4d68a9)
Reviewed-on: https://gerrit.mot.com/2200067
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
2023-06-01 00:48:51 -03:00
lixh8 012a6da66b hawao: devconfig: enable CHACHA20 crypto configs
enable CHACHA20 Crypto support
Fix cts cases: CtsNetTestCases

Change-Id: I68102d2ce4791b2d053cd1a4d6af3d4c3a881cf2
Signed-off-by: lixh8 <lixh8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2184568
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Hao Li <lihao24@motorola.com>
2023-06-01 00:48:51 -03:00
wangwang1 9a588abe5f rhode: devconfig: enable CHACHA20 crypto configs
enable CHACHA20 Crypto support
Fix cts cases: CtsNetTestCases

Change-Id: I9b46e1ff572aeebcd057b2d4edb79741d440b6e3
Reviewed-on: https://gerrit.mot.com/2184422
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:51 -03:00
qiaopf1 f2f299b8ed regulator: Force shutdown all regulators when system power off.
Add shutdown procedure for WL2868C and force disable all regulators when
system power off to avoid unexpected current leakage.

Change-Id: I4851e250460962867e27133452a9bbc9d6224a85
Signed-off-by: qiaopf1 <qiaopf1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2178320
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:51 -03:00
kankan17 9fc27a2864 arm64: defconfig: Flash compatible
Distinguish IIC Flash Supplier.
1.add CAMERA_FLASH_IIC_COMPATIBLE config
2.add "CONFIG_CAMERA_FLASH_IIC_COMPATIBLE=y" in the hawao default config

Change-Id: Ia495f91774971b142cca2c9078b5165d857d9a69
Signed-off-by: kankan17 <kankan17@motorola.com>
Reviewed-on: https://gerrit.mot.com/2175299
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: <chenlj26@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
Reviewed-by: <liuzy55@motorola.com>
Reviewed-by: PengFei Qiao <qiaopf1@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:51 -03:00
xiewen3 0cb901fdfa TZ: Distinguishes encrypted and unencrypted TZ logs interfaces.
Both encrypted and unencrypted TZ logs for
the user release version need to be read from the procfs.

Change-Id: I68e90e5248e3fa0012c347753b8be4c0ef5d3934
Signed-off-by: xiewen3 <xiewen3@motorola.com>
Reviewed-on: https://gerrit.mot.com/2167248
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:48:51 -03:00
xiewen3 e7cd7474ca TZ: Fix build err
Build err:
/localrepo/hudson/workspace/S1SR32_rhode-g_user_mr_r-qsm2020_release-keys_derivative_cid_gc/platform/kernel/msm-4.19/drivers/firmware/qcom/tz_log.c:1146:35: warning: comparison between pointer and integer ('int *' and 'int') [-Wpointer-integer-compare]
error, forbidden warning: tz_log.c:1146

Change-Id: Ic4cab5150e37f4b466db6e01e4cdf6bbca6e35c5
Signed-off-by: xiewen3 <xiewen3@motorola.com>
Reviewed-on: https://gerrit.mot.com/2167117
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:51 -03:00
tinno18 8fd9cfc563 Hawaii+OLED:remove CONFIG_QCOM_FSA4480_I2C
There's no fsa4480 chip on Rhode, remove it, otherwise usb event can't
be notified.
remove CONFIG_QCOM_FSA4480_I2C

Change-Id: Id0f6cc01ff468f0843ceee448581ed4d12338c33
Reviewed-on: https://gerrit.mot.com/2166953
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: <tinno18@motorola.com>
Reviewed-by: Nan Wu <wunan3@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:48:51 -03:00
xiewen3 c950220d4a defconfig: Disable SLAB_MERGE.
Qcom baseline default disable SLAB_MERGE,
qcom init.qcom.post_boot.sh need to process zspage/zs_handle,
otherwise the following error will occur:
avc denied:{ write } for comm="init.qcom.post_" name="store_user" dev="sysfs" ino=81436
scontext=u:r:vendor_qti_init_shell:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 pkg=""

Change-Id: I40a5339ba7050ed68626de982802b5c1bad6fd88
Signed-off-by: xiewen3 <xiewen3@motorola.com>
Reviewed-on: https://gerrit.mot.com/2165870
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
2023-06-01 00:48:51 -03:00
lulei1 3acf485a97 arm64/config:Enable Zram writeback on hawao
enable zram writeback for hawao
set CONFIG_ZRAM_WRITEBACK to y

Change-Id: I4bd067e7da1eba13ec6b6519f37ca6fb292f88c8
Signed-off-by: lulei1 <lulei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2162957
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianguo Liu <liujg6@motorola.com>
Reviewed-by: Zhangqing Huang <huangzq2@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:51 -03:00
wanggl3 d10533e2e3 Enable LZ4 on Rhode4G and Hawao
The configuration of lz4 is missed on Rhode4G and Hawao
Need to add it to make lz4 work

Change-Id: Ida5e46cb19dda1e0b94def6cab40c30947f13c35
Reviewed-on: https://gerrit.mot.com/2162305
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhangqing Huang <huangzq2@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:51 -03:00
zhangh12 796ced767e dts: rhode: remove CONFIG_QCOM_FSA4480_I2C
There's no fsa4480 chip on Rhode, remove it, otherwise usb event can't
be notified.

Change-Id: Ib7882f43726852b909a6ea2c64b911db45c3c286
Signed-off-by: zhangh12 <zhangh12@motorola.com>
Reviewed-on: https://gerrit.mot.com/2162020
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:51 -03:00
lulei1 07068613e9 mm: zram: fix build error when zram wb disabled
fix build error 
when zram wb disabled

Change-Id: I59b1dc0756d10424b76df587d8f9a3f923647882
Signed-off-by: lulei1 <lulei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2157751
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhangqing Huang <huangzq2@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2023-06-01 00:48:51 -03:00
lulei1 eb80d2507d mm : zram fix swapcached issue on Zram Writeback
Afer Zram backing dev setuped, zram will be treated as a ASYNC IO
swap device, no longer SYNC IO device, because WB pages do have IO
operation on swap in, so the optimization on skiping swapcache
for fast swap device will no longer be applyed on such case.

Now we refactor this optimization, skip the swapcache by checking
SYNC IO state on each swap page via ioctl. Reuse ioctl because we
should not break the GKI.

Change-Id: Ie4316c9a43f481ccd4dff6b90c63da108bed916c
Signed-off-by: lulei1 <lulei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2156790
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhangqing Huang <huangzq2@motorola.com>
Reviewed-by: Guolin Wang <wanggl3@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:51 -03:00
lulei1 93b53df183 fs:proc:abort reclaim once process goes to foreground
App compaction can not be aborted due to current design,
it causes app get stuck for a while when it resume to foreground
if app is compacting by kernel. So now we add check in kernel
while loop to abort the compaction if adj is zero.

Change-Id: I962171d99e8911219984563d24fdf27e15e648e5
Signed-off-by: lulei1 <lulei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2156599
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhangqing Huang <huangzq2@motorola.com>
Reviewed-by: Guolin Wang <wanggl3@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:51 -03:00
Shreyansh Chouhan bc23012f17 ip_gre: add validation for csum_start
[ Upstream commit 1d011c4803c72f3907eccfc1ec63caefb852fcbf ]

Validate csum_start in gre_handle_offloads before we call _gre_xmit so
that we do not crash later when the csum_start value is used in the
lco_csum function call.

This patch deals with ipv4 code.

Mot-CRs-fixed: (CR)
CVE-Fixed: CVE-2021-39633
Bug: 150694665

Change-Id: I5af91cc13c968081f7357f3b6a91eb82ee44175d
Fixes: c544193214 ("GRE: Refactor GRE tunneling code.")
Reported-by: syzbot+ff8e1b9f2f36481e2efc@syzkaller.appspotmail.com
Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh630@gmail.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Gajjala Chakradhar <gajjalac@motorola.com>
Reviewed-on: https://gerrit.mot.com/2153495
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:51 -03:00
lulei1 735876a5ad arm64/config:Enable Zram writeback on Rhode
enable zram writeback for rhode
set CONFIG_ZRAM_WRITEBACK to y

Change-Id: I879cf53bb58afeac91a5ea102947736758ca4b96
Signed-off-by: lulei1 <lulei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2154119
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhangqing Huang <huangzq2@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:51 -03:00
xuwei9 ae5a13149d kernel:add charger termination definition
Add charger enable termination
id definition.

Change-Id: I782d36a8a998fae10c0e0c89019d448ac58d7f41
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2148117
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:51 -03:00
huaqin87 a357336689 rhode:kernel: add wt6670 get firmware num node
charging qc3+ wt6670
add wt6670 get firmware num node for factory test

Change-Id: I28f737181e1f10a9140e78d2859ca3b9ffc47557
Signed-off-by: huaqin87 <huaqin87@motorola.com>
Reviewed-on: https://gerrit.mot.com/2144714
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:50 -03:00
hujing3 7788fc5d0c kernel/config:hawao:remove FTS TP config to use module
hawao: 1st LCD touch driver update for ko
remove FTS TP config to use module ko

Change-Id: I81d95255046fea92d2bab1ea861d99177ad3a3e0
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2142893
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:50 -03:00
hujing3 128857f989 kernel/input:hawao:update to use TP module ko
hawao use TP module KO
remove MMI_STOPSHIP in ft3519 since it's not used

Change-Id: Ibe0a6bc4c16fd303a2824feec6308dc31edac136
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2143996
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:50 -03:00
huaqin87 61618d322d kernel: remove wt6670 isp macro definition for user version
charging qc3+ wt6670
remove wt6670 isp macro definition for user version

Change-Id: I740133f825375701f85594344bff578ca91aac40
Signed-off-by: huaqin87 <huaqin87@motorola.com>
Reviewed-on: https://gerrit.mot.com/2143952
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:50 -03:00
hujing3 42515d4014 kernel/config:hawao: add new FTS config to fix build error
hawao: bringup: add new config FTS
to fix build error on other products.
will remove when fts module ready

Change-Id: I6c365e08525f3af349dc58e2d2174d37812c838a
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2142625
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:50 -03:00
hujing3 585795d53d input/touchscreen: add ft3519 source config
input/touchscreen:
hawao bringup: add ft3519 source config

Change-Id: I2cbf0b57b6b879061fd28be768f2a71ecc09a59b
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2142684
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
2023-06-01 00:48:50 -03:00
hujing3 5d6b458d97 input/ft3519: hawao touch driver bringup
hawaii OLED: 1st LCD
ft3519 touch drvier bringup

Change-Id: I84c2d8e94be8e0979e757badd686de9445abccd4
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2142574
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:50 -03:00
hujing3 979a919215 Revert "(CR) hawaii OLED: visionox ft3519 touch drvier bringup"
(CR) revert to fix build error
This reverts commit 9569249223bac69cac391e7dca8f0f55753c8ef5.

Change-Id: I65f9df3f8e7e04e2d404e5107ddc0baedbfe08c1
Reviewed-on: https://gerrit.mot.com/2142565
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:50 -03:00
huaqin87 12e83dba09 kernel: add wt6670 macro definition to control i2c nack
charging qc3+ wt6670
add wt6670 macro definition to control i2c nack

Change-Id: I1fe0c47b88e31f640320a2a0f6033b7ad05f5b7f
Signed-off-by: huaqin87 <huaqin87@motorola.com>
Reviewed-on: https://gerrit.mot.com/2138663
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:50 -03:00
xuwei9 2c45a41a87 QC3P:add iio channel definition
Add iio channel definition for
qc3p turbo charger module

Change-Id: I77b5ca149569d3271d8edebf3be9a0a23f102291
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2139192
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:50 -03:00
huaqin78 d9df001ab8 Rhode: define CONFIG_CAMERA_FLASH_PWM
details: define CONFIG_CAMERA_FLASH_PWM for rhode
Eliminate impact on other projects

Change-Id: I8507a14f3566b9be46b7e1040a06ea7c704a7309
Signed-off-by: huaqin78 <huaqin78@motorola.com>
Reviewed-on: https://gerrit.mot.com/2137558
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-by: PengFei Qiao <qiaopf1@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
2023-06-01 00:48:50 -03:00
huaqin79 58d8c425e8 display: Modify LDO driver initialization voltage compatibility
1. During startup, judge whether to register the LDO driver
   for the first time. If it is the first time, it is not
   necessary to disable all LDOS;

2. When different pmics are used, different initialization
   voltages are used for initialization;

Change-Id: Ic22e2c05fb9edcb48f93f51add369cb71997741f
Signed-off-by: huaqin79 <huaqin79@motorola.com>
Reviewed-on: https://gerrit.mot.com/2138715
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hua Tan <tanhua1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:50 -03:00
panzh2 ee4fd45d57 Hawao: NFC Bringup(4) - driver
Add samsung nfc drvier
for Hawao

Change-Id: I9e4ab8da78683ed2d0d244e4b877fdf5f4293d2e
Reviewed-on: https://gerrit.mot.com/2137010
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhenghai Pan <panzh2@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:50 -03:00
tinno18 0494ba54ad hawaii OLED: visionox ft3519 touch drvier bringup
hawaii OLED: 1st LCD
ft3519 touch drvier bringup

Change-Id: I8a67c0d8ae7aead0e76906b8c7110d4c580ca3f9
Reviewed-on: https://gerrit.mot.com/2133191
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Submit-Approved: Jira Key
Tested-by: Jira Key
Reviewed-by: Jing Hu <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2136692
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
2023-06-01 00:48:50 -03:00
huaqin87 aeb58891bc kernel: qc3p wt6760 isp download function
charging qc3+ wt6670
import blank firmware upgrade function

Change-Id: I192459c424b40e740d9ed0638063136b3a34f536
Signed-off-by: huaqin87 <huaqin87@motorola.com>
Reviewed-on: https://gerrit.mot.com/2133356
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ying Xu <xuying9@motorola.com>
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:50 -03:00
wutao 38175de2c4 kernel:add ADC_GPIO3_DIV3 adc channel
add ADC_GPIO3_DIV3 adc channel for read
vbus voltage for nopmi project

Change-Id: Ia4011ea66946fce882f25c469aa276c198462f60
Signed-off-by: wutao <huaqin89@motorola.com>
Reviewed-on: https://gerrit.mot.com/2133308
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:50 -03:00
huaqin79 021a853ac4 display/config: Add LDO driver config into the kernel.
Add LDO regulator config into the kernel for
Rhode

Change-Id: Icc6026ad875c1d1f3a66769f2dcb2149d6ce4a9d
Signed-off-by: huaqin79 <huaqin79@motorola.com>
Reviewed-on: https://gerrit.mot.com/2132726
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hua Tan <tanhua1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:50 -03:00
huaqin79 54f4fb3216 display: Load the regulator driver directly into the kernel.
When the regulator driver is loaded into the
kernel as KO, the LDO driver registration is
too slow, resulting in the LCD power on and
can not be controlled normally.

Change-Id: If1f62f5204a8eda235a5aea91d27b59f6021c704
Signed-off-by: huaqin79 <huaqin79@motorola.com>
Reviewed-on: https://gerrit.mot.com/2132717
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hua Tan <tanhua1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:50 -03:00
wutao bff6b41ded kernel: use orderly_poweroff when usb plugged out
google android R define CONFIG_STATIC_USERMODEHELPER
and CONFIG_STATIC_USERMODEHELPER_PATH = "", so sub_info->path
is always empty.

Change-Id: Ieddaa54f8097d3f172a0b1a6910558a75526bae2
Signed-off-by: wutao <huaqin89@motorola.com>
Reviewed-on: https://gerrit.mot.com/2132754
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:50 -03:00
a17671 52971f6876 tty:diag:Move tty_flip_buffer_push out of spinlock
Upstream pty kernel driver already moved the tty_flip_buffer_push
Out of tty_flip_buffer_push, adjust the tty_diag driver to do the same
Otherwise there will be lockup watchdog panic generated

Change-Id: Ib1ea301cff482b1b6905f20ce99995fe2f5b5aef
Signed-off-by: a17671 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/2130815
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:50 -03:00
a17671 9ad837c12c Revert "tty:revert the tty update from qcom for moto tty_diag driver"
Keep the upstream pty driver
Adjust the moto tty_diag to solve the watchdog panic

This reverts commit 257cf44a1f9264ced64fde12868ed543a7d270af.

Change-Id: Id362323694562ba26f5531099ce32da649872476
Signed-off-by: a17671 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/2130818
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:50 -03:00
wangwang1 1e6149dea3 kernel:dwc3 delay extcon module registeration
dwc3 driver now replies on extcon suppliers registered from another ko
in timing sequence, dwc3 is probed much earlier than the ko registeration.
To work with the related ko driver correctly, add a delayed work item to
check the extcon status periodicly. The frequency is 1HZ and it just stops
whenever the required extcon suppliers defined in dtsi have been found.

Change-Id: Ia7c50165eab13b0274590c744f49061fa6ef7c03
Reviewed-on: https://gerrit.mot.com/2130472
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:49 -03:00
Todd Kjos ce2ae0cb3b ANDROID: xt_quota2: set usersize in xt_match registration object
Explicitly set what is visible to userspace

Mot-CRs-fixed: (CR)
CVE-Fixed: CVE-2021-0961

Bug: 196046570
Test: passed netd test suites
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: Iacec0ef8ae290e01f1b60508d8abcd40a3653c83
Signed-off-by: Gajjala Chakradhar <gajjalac@motorola.com>
Reviewed-on: https://gerrit.mot.com/2119296
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:49 -03:00
Todd Kjos 1be3bb1f14 ANDROID: xt_quota2: clear quota2_log message before sending
Initialize message buffer for quota2_log to avoid sending
random data.

Mot-CRs-fixed: (CR)
CVE-Fixed: CVE-2021-0961

Bug: 196046570
Test: passed netd test suites
Fixes: 10cda83af99d ("ANDROID: netfilter: xt_quota2: adding the
original quota2 from xtables-addons")
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: Ic9f34aaa2593809b375fc649b74567190c99dc62
Signed-off-by: Gajjala Chakradhar <gajjalac@motorola.com>
Reviewed-on: https://gerrit.mot.com/2119295
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:49 -03:00
Sam Liddicott 62f2ba2d6c ANDROID: xt_quota2: remove trailing junk which might have a digit in it
Make sure string only contains the characters specified by userspace.

Fix cherry-picked from xtables-extensions project

Signed-off-by: Sam Liddicott <sam@liddicott.com>

Mot-CRs-fixed: (CR)
CVE-Fixed: CVE-2021-0961

Bug: 196046570
Test: passed netd test suites
Fixes: 10cda83af99d ("ANDROID: netfilter: xt_quota2: adding the
original quota2 from xtables-addons")
Signed-off-by: Todd Kjos <tkjos@google.com>
(cherry picked from https://git.code.sf.net/p/xtables-addons/xtables-addons
bc2bcc383c70b293bd816c29523a952ca8736fb5)
Change-Id: I965448564906e5fbf0fe6d6414f44d9e257ea195
Signed-off-by: Gajjala Chakradhar <gajjalac@motorola.com>
Reviewed-on: https://gerrit.mot.com/2119294
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:49 -03:00
liujg6 94a4bc0022 arm/defconfig: add hawao extra config
Add hawao extra configs
Define HAWAO_DTB

Change-Id: I432f4e10c9784e145f45eec392b677092df93e28
Reviewed-on: https://gerrit.mot.com/2123064
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Submit-Approved: Jira Key
Tested-by: Jira Key
Reviewed-by: Xianhong Li <lixh8@lenovo.com>
Tested-by: Xianhong Li <lixh8@lenovo.com>
(cherry picked from commit 8dc889feb89b2c9993ec0d9f998b0204cd9117df)
Reviewed-on: https://gerrit.mot.com/2129420
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
2023-06-01 00:48:49 -03:00
a17671 26e1a1e08d usb:diag:revert the f_diag update from qcom for moto tty_diag driver
Qcom update the f_diag in sm2020
And break the moto tty_diag function

Change-Id: Idf943d633fca1873e86f22c1126d8ef8ada52d72
Signed-off-by: a17671 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/2127809
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:49 -03:00
a17671 07159c0646 tty:revert the tty update from qcom for moto tty_diag driver
Qcom update the pty driver in sm2020
And break the moto tty_diag function

Change-Id: I7c951a1bfaec786432c2b4d92ed0e2230a3f6398
Signed-off-by: a17671 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/2127808
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:49 -03:00
zhangjun10 d55be9bd8e : Enable samsung NFC driver
Enable samsung NFC RN4V driver
for Rhode 4G

Change-Id: I1cb794c965e8133ca629268c093d9ecca1840a49
Signed-off-by: zhangjun10 <zhangj10@motorola.com>
Reviewed-on: https://gerrit.mot.com/2124670
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2023-06-01 00:48:49 -03:00