Commit graph

916,646 commits

Author SHA1 Message Date
zhaoxp3
f88628ff2a defconfig: define bangkk dtb
Change-Id: I0a033f34b473e1d325900f5697dfa48cfe69d252
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/2538318
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hua Tan <tanhua1@motorola.com>
Submit-Approved: tongkun1 <tongkun1@motorola.com>
2024-04-18 14:45:13 +08:00
Fernanda Schmidt
5af4f0287d Disabling some Debug configs
Disabling CONFIG_SLUB_DEBUG_ON, CONFIG_DEBUG_MUTEXES,
CONFIG_DEBUG_SPINLOCK and CONFIG_DEBUG_SPINLOCK_PANIC_ON_BUG configs,
which are severily impacting on device's memory pressure.

Change-Id: Id610358654b687110d9a2302ec17a8bcfe12f3b6
Reviewed-on: https://gerrit.mot.com/2539189
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Rafael Ortolan <rafones@motorola.com>
Reviewed-by: Carlos Pinho <cpinho@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
2024-04-18 14:45:12 +08:00
Yunxian He
bf8cede7f6 integrate samsung RN4V NFC driver
integrate samsung RN4V NFC driver
this driver support RN4V and SN4V

Change-Id: Ibea9dcded110f0d058fcbc84516912a1be9d1915
Signed-off-by: Yunxian He <heyx6@motorola.com>
Reviewed-on: https://gerrit.mot.com/2533690
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:12 +08:00
Yunxian He
53ad4b3fb9 Enable samsung RN4V NFC driver
integrate samsung RN4V NFC driver
this driver support RN4V and SN4V

Change-Id: I022f009eb7db4ad3e0bc96ca0fa9aad8b9f5003b
Signed-off-by: Yunxian He <heyx6@motorola.com>
Reviewed-on: https://gerrit.mot.com/2538504
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:12 +08:00
tongkun1
b6b62eb330 configs: vendor/ext_config: init configuration for Bangkk to pass build
Change-Id: Ic8f6e1e5b651da856ae2f294ebc57edc1e8171d2
Reviewed-on: https://gerrit.mot.com/2513550
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Submit-Approved: Jira Key
Tested-by: Jira Key
Reviewed-by: Hao Li <lihao24@motorola.com>
(cherry picked from commit ce397efc28e4e9e45e15180dd8630a2c66166978)
Reviewed-on: https://gerrit.mot.com/2532084
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: tongkun1 <tongkun1@motorola.com>
2024-04-18 14:45:12 +08:00
panzh2
c318647637 [PnangNA][configs] disable HPB in pnang 5G NA
Disable the HPB in penang5G NA
follow the product family decision

Change-Id: I07daa682ddd5675263763befe1965851f37cbee7
Signed-off-by: panzh2 <panzh2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2501716
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianguo Liu <liujg6@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2024-04-18 14:45:12 +08:00
tanhua1
40b836f15d disable HPB in penang5g
Disable the HPB in penang5G
To follow the product family decision

Change-Id: I1eac669c626f26f26c365626df97086e816343e7
Signed-off-by: tanhua1 <tanhua1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2438990
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:12 +08:00
xiewen3
4bcc5f3769 arm64/configs: Enable CONFIG_FELICA_MOUNT_BLOCK for penang 5G.
Enable CONFIG_FELICA_MOUNT_BLOCK to block mount in the
root environment.

Change-Id: Ia9c71f44ac00bced7a374bca70ffd0b4dbd4ee01
Signed-off-by: xiewen3 <xiewen3@motorola.com>
Reviewed-on: https://gerrit.mot.com/2428915
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2024-04-18 14:45:12 +08:00
Yunxian He
9d8582cf76 no need btfm enable delay when freq 48000 rxport 0
main change:
when freq 48000, rxport 0, btfm enable no need delay.
revert change in (CR)

Change-Id: I1dec2ada86501b6690b08718c038e465c14b2029
Signed-off-by: Yunxian He <heyx6@motorola.com>
Reviewed-on: https://gerrit.mot.com/2428502
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2024-04-18 14:45:12 +08:00
Yunxian He
e819d7d240 update btfm enable ch delay when freq 48000 ch 0
main changes:
btfm_slim.c

Change-Id: I6c38d3956da85b13a8946cb5db7bad312320bba5
Signed-off-by: Yunxian He <heyx6@motorola.com>
Reviewed-on: https://gerrit.mot.com/2427412
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:12 +08:00
YangYi
485bfce748 penang: device suspend tests fail
Penang:
fix the problem of device suspend tests fail.

Change-Id: I2477d57440b40dcf930fff27631554c2024ec444
Signed-off-by: YangYi <yangyi31@motorola.com>
Reviewed-on: https://gerrit.mot.com/2424757
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yuchang Guo <guoyc1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:12 +08:00
YangYi
0ab43c2ab5 Penang: kasan panic
Penang:
resolve kasan panic.

Change-Id: I69112a4f4717c8f8c8bf958316ae9a0516dad945
Signed-off-by: YangYi <yangyi31@motorola.com>
Reviewed-on: https://gerrit.mot.com/2417581
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yuchang Guo <guoyc1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:12 +08:00
YangYi
a65aa65ad1 Penang: resolve kasan panic
Penang:
KASAN: slab-out-of-bounds in qrtr_endpoint_register

Change-Id: I7542a0f2af0ceb0fdd04291b86795ba942ffe8d7
Signed-off-by: YangYi <yangyi31@motorola.com>
Reviewed-on: https://gerrit.mot.com/2413704
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yuchang Guo <guoyc1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:12 +08:00
liujg6
7ea5934176 arm64/configs: disable NFC on pnangn
[Details]
Penang5G NA does not support NFC, disable NFC config which inheritted
from Penang ROW.

Change-Id: I785a3234df733f4ce5d548ebdc04bbc3675b09d8
Reviewed-on: https://gerrit.mot.com/2411025
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2024-04-18 14:45:12 +08:00
YangYi
f536ebe9fc Penang: fix for device suspend tests fail. [1/2]
Penang:
Fix for device suspend tests fail.
qcom cr number: 3243388, 3208991.

Change-Id: Idedf1825a3237cd85cf463ec459f6d5a31662c8d
Signed-off-by: YangYi <yangyi31@motorola.com>
Reviewed-on: https://gerrit.mot.com/2400062
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yuchang Guo <guoyc1@lenovo.com>
Reviewed-by: Jiacheng Ou <oujc1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:12 +08:00
HQ Cam LiJunyu
42d17b3910 penang: Adjust actuator noise reduction
details:
Add drive node
Modify the motor voltage value

Change-Id: I2cd674e7df7a2e02829c6afe5889c61a9e835e29
Signed-off-by: HQ Cam LiJunyu <lijunyu@huaqin.com>
Reviewed-on: https://gerrit.mot.com/2385577
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Pengfei Qiao <qiaopf1@motorola.com>
Reviewed-by: <chenlj26@motorola.com>
Reviewed-by: <liuzy55@motorola.com>
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Wang Liu <liuwang2@lenovo.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:12 +08:00
liujg6
38414b7380 disable CONFIG_SLUB_DEBUG_ON on pnangn
Performance on pnangn is worse due to CONFIG_SLUB_DEBUG_ON is enabled.
Disable it to optimize performance on userdebug build.

Change-Id: I3c46ffc87d95271a4ceef73914c7a13ee052e11e
Reviewed-on: https://gerrit.mot.com/2383580
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2024-04-18 14:45:12 +08:00
William Liu
84a58d6dd0 include:statfs.h:reduce boilerplate in fsid handling
Get rid of boilerplate in most of ->statfs()
    instances...

Change-Id: I630d57a8016013d7d4a2854e2c2c43b1563c27ef
Signed-off-by: William Liu <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/2380706
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:12 +08:00
Guoqing Jiang
be4fac7c66 include/linux/pagemap.h: introduce attach/detach_page_private
Patch series "Introduce attach/detach_page_private to cleanup code".

    This patch (of 10):

    The logic in attach_page_buffers and __clear_page_buffers are quite
    paired, but

    1. they are located in different files.

    2. attach_page_buffers is implemented in buffer_head.h, so it could be
       used by other files. But __clear_page_buffers is static function in
       buffer.c and other potential users can't call the function, md-bitmap
       even copied the function.

    So, introduce the new attach/detach_page_private to replace them.  With
    the new pair of function, we will remove the usage of attach_page_buffers
    and __clear_page_buffers in next patches.  Thanks for suggestions about
    the function name from Alexander Viro, Andreas Grünbacher, Christoph
    Hellwig and Matthew Wilcox.

    Suggested-by: Matthew Wilcox <willy@infradead.org>
    Signed-off-by: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
    Cc: "Darrick J. Wong" <darrick.wong@oracle.com>
    Cc: William Kucharski <william.kucharski@oracle.com>
    Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
    Cc: Andreas Gruenbacher <agruenba@redhat.com>
    Cc: Yang Shi <yang.shi@linux.alibaba.com>
    Cc: Yafang Shao <laoar.shao@gmail.com>
    Cc: Song Liu <song@kernel.org>
    Cc: Chris Mason <clm@fb.com>
    Cc: Josef Bac(CR) <josef@toxicpanda.com>
    Cc: David Sterba <dsterba@suse.com>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: Jaegeuk Kim <jaegeuk@kernel.org>
    Cc: Chao Yu <chao@kernel.org>
    Cc: Christoph Hellwig <hch@infradead.org>
    Cc: Anton Altaparmakov <anton@tuxera.com>
    Cc: M(CR)e Marshall <hubcap@omnibond.com>
    Cc: Martin Brandenburg <martin@omnibond.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Cc: Roman Gushchin <guro@fb.com>
    Cc: Andreas Dilger <adilger@dilger.ca>
    Cc: Chao Yu <yuchao0@huawei.com>
    Cc: Dave Chinner <david@fromorbit.com>
    Link: http://lkml.kernel.org/r/20200517214718.468-1-guoqing.jiang@cloud.ionos.com
    Link: http://lkml.kernel.org/r/20200517214718.468-2-guoqing.jiang@cloud.ionos.com
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

    Moto-CRs-Fixed:(CR)

Change-Id: Id4bbb98c9a658b834988f37843d09f065e246668
Signed-off-by: William Liu <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/2380691
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:12 +08:00
William Liu
fa3b0b74bb fs:EROFS:Porting 5.10 erofs to 5.4
Porting erfos changes from 5.10 common kernel
And some glue code to make it pass build on 5.4

be3f6035831a erofs: fix unsafe pagevec reuse of hooked pclusters
6c1ad56b2d78 erofs: remove the occupied parameter from z_erofs_pagevec_enqueue()
ee75174f6ab9 erofs: don't trigger WARN() when decompression fails
8326be9e5121 erofs: fix up erofs_lookup tracepoint
ca9ee53cea1f18edf318a01a19653ae3847474a9
UPSTREAM: erofs: fix deadlock when shrink erofs slab
b943d328889d25cdb1aa397880c079b7d55a0901
UPSTREAM: erofs: fix unsafe pagevec reuse of hooked pclusters
028f7128c4fbb75ba113824f8600ca9a7097a0ed
UPSTREAM: erofs: remove the occupied parameter from z_erofs_pagevec_enqueue()
ee75174f6ab93611e1623f0ae5590beda008aef5
erofs: don't trigger WARN() when decompression fail
dcd77f0b7453 UPSTREAM: erofs: fix 1 lcluster-sized pcluster for big pcluster
e085d3f0d0dc UPSTREAM: erofs: enable big pcluster feature
ed0607cc5256 UPSTREAM: erofs: support decompress big pcluster for lz4 backend
d34cb6cdc044 UPSTREAM: erofs: support parsing big pcluster compact indexes
051d76b899bd UPSTREAM: erofs: support parsing big pcluster compress indexes
d14993160141 UPSTREAM: erofs: adjust per-CPU buffers according to max_pclusterblks
95a1d5df840a UPSTREAM: erofs: add big physical cluster definition
8043aaed1dad UPSTREAM: erofs: fix up inplace I/O pointer for big pcluster
6ad2f8f1699c UPSTREAM: erofs: introduce physical cluster slab pools
432f58b100f0 UPSTREAM: erofs: introduce multipage per-CPU buffers
571c9a0bd334 UPSTREAM: erofs: remove a void EROFS_VERSION macro set in Makefile
431d73396dad UPSTREAM: erofs: reserve physical_clusterbits[]
89dbc6246a86 UPSTREAM: erofs: Clean up spelling mistakes found in fs/erofs
ac1f14e9d5a8 UPSTREAM: erofs: add on-disk compression configurations
cd21e62366bb UPSTREAM: erofs: introduce on-disk lz4 fs configurations
e17fd2ac9dfc UPSTREAM: erofs: introduce erofs_sb_has_xxx() helpers
ba1a3d1fb2db UPSTREAM: erofs: don't use erofs_map_blocks() any more
384b2cdaf83e UPSTREAM: erofs: complete a missing case for inplace I/O
8326be9e51218d23ebe52c8d4c2d7c23302f6e44
erofs: fix up erofs_lookup tracepoint
51c19f4a62129bca096df760c7690833958ce9cf
erofs: fix error return code in erofs_read_superblock()
06229c49eb7f UPSTREAM: erofs: support adjust lz4 history window size
0a24d25f0882 UPSTREAM: erofs: use sync decompression for atomic contexts only
0ca4eafb3928 UPSTREAM: erofs: use workqueue decompression for atomic contexts only

4ae1c8a4d06a UPSTREAM: erofs: force inplace I/O under low memory scenario
46a00756cbf8 UPSTREAM: erofs: insert to managed cache after adding to pcl
b1c757466f42 UPSTREAM: erofs: get rid of magical Z_EROFS_MAPPING_STAGING

Change-Id: Ibc0d16af7424aa02806ec35b431d4faa28a126cd
Signed-off-by: William Liu <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/2379154
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:12 +08:00
xiewen3
5a9376b145 print qseelog to kernel buffer
debug feature:
Print qseelog to kernel buffer when debug cmdl
is programmed.

Change-Id: Ib8ebc5e60dd0b4b7b7c082a9d4537ed73a1ac992
Signed-off-by: xiewen3 <xiewen3@motorola.com>
Reviewed-on: https://gerrit.mot.com/2378108
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:12 +08:00
xiewen3
c1a407aada enable CONFIG_MSM_TZ_QSEE_LOG for penang
debug feature:
enable CONFIG_MSM_TZ_QSEE_LOG for penang

Change-Id: Ia122789a496aaff9f7e2a6a5be0def514e1a0670
Signed-off-by: xiewen3 <xiewen3@motorola.com>
Reviewed-on: https://gerrit.mot.com/2378109
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:11 +08:00
longc105
665a9f969c driver-kernel: Penang5G NA: change reserved gpio for camera
detials:
change reserved gpio
TZ protect gpio45,46,56,57 for NFC SPI,
but the four of them are used for other purpose
so we need to saperate them from holi baseline

Change-Id: Id22587c488a7ef3e63ffd9c090cd56a85b61bf05
Signed-off-by: longc105 <longc105@motorola.com>
Reviewed-on: https://gerrit.mot.com/2371429
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Liu <liuwang2@lenovo.com>
Reviewed-by: <zhaoxy41@motorola.com>
Reviewed-by: <chenlj26@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:11 +08:00
zhangpei5
54b29dd3e6 disable CONFIG_SLUB_DEBUG_ON on penang
disable config on penang debug

Change-Id: I0ba52b88d47c3f296adc83fa3a7dedf9a9ea7360
Reviewed-on: https://gerrit.mot.com/2370806
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Guolin Wang <wanggl3@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:11 +08:00
hujing3
cab90b27c8 dts/pnangn: disable useless TP configs to avoid confict
dts/pnangn:
disable useless TP configs to avoid confict

Change-Id: I6721695e98dbb66c48f14d017290f3b2d26bf236
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2368825
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2024-04-18 14:45:11 +08:00
guoyf2
a2bc7d6a71 arm64/configs: use aw882xx for pnangn
changes:
pnangn use aw88261 smartpa

Change-Id: I279449c0e26431d1bf3dbdc941ddeb03e1ce3bdc
Signed-off-by: guoyf2 <guoyf2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2368810
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yunfei Guo <guoyf2@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:11 +08:00
liujg6
2be82f3e94 arm64/configs: add init configs for pnangn
[Details]
Add initial extra config files for penang5G NA

Change-Id: I0c05fd818d88293161688fcb61c3c4bd72572f56
Reviewed-on: https://gerrit.mot.com/2355010
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 f737e24a8dd2d127022789641f83045e9a8e68e0)
Reviewed-on: https://gerrit.mot.com/2368040
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
2024-04-18 14:45:11 +08:00
zhangjun10
9b3bad04ef : penang : Enable NFC ESE SPI on TZ
SPI on TZ need GPIO 45,46,56,57
need remove it for reserved list

Change-Id: I3b7875573bd24f7ef8a5aad6140fdb044ad17def
Signed-off-by: zhangjun10 <zhangj10@motorola.com>
Reviewed-on: https://gerrit.mot.com/2367734
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:11 +08:00
hq_yexiuyon.wb_tmp
77cd16286f TP: The TP ft8057 close build kernel
Modify:
      fix TP for ft8057 , add TP fix for factory

Change-Id: I34aec889e04b44ab61b1dbb300391d4e02a41605
Signed-off-by: hq_yexiuyon.wb_tmp <yexiuyong.wb@huaqin.com>
Reviewed-on: https://gerrit.mot.com/2354323
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2024-04-18 14:45:11 +08:00
zhangjun10
d3e9132722 : Enable nfc for Penang
Enable nfc for pn557
on Penang

Change-Id: Idd7bcd332a0fa5102bca7a6b6b97681b607ad478
Signed-off-by: zhangjun10 <zhangj10@motorola.com>
Reviewed-on: https://gerrit.mot.com/2337430
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:11 +08:00
yaozm1
05ea5309b7 penang:kernel config:enable audio config
enable awinic K pa config;
for penang evb bringup.

Change-Id: I29b26c8ae207e3ce71c6a7eed3f14e1723eee5b1
Signed-off-by: yaozm1 <yaozm1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2333123
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2024-04-18 14:45:11 +08:00
duxu1
8e96178c99 Enable CONFIG_SLUB_DEBUG_ON on userdebug build
Enable CONFIG_SLUB_DEBUG_ON on userdebug
build to debug wlan tx timeout issue.
CONFIG_SLUB_DEBUG_ON=y

Change-Id: Ifa80d98e21c9649caf13f647027987f4a0c25d0f
Signed-off-by: duxu1 <duxu1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2327322
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hongshu Lou <louhs1@motorola.com>
Reviewed-by: Zhizhong Ge <gezz1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:11 +08:00
Li Li
06a2ad3c31 BACKPORT: FROMGIT: binder: fix freeze race
Mot-CRs-fixed: (CR)
Currently cgroup freezer is used to freeze the application threads, and
BINDER_FREEZE is used to freeze the corresponding binder interface.
There's already a mechanism in ioctl(BINDER_FREEZE) to wait for any
existing transactions to drain out before actually freezing the binder
interface.

But freezing an app requires 2 steps, freezing the binder interface with
ioctl(BINDER_FREEZE) and then freezing the application main threads with
cgroupfs. This is not an atomic operation. The following race issue
might happen.

1) Binder interface is frozen by ioctl(BINDER_FREEZE);
2) Main thread A initiates a new sync binder transaction to process B;
3) Main thread A is frozen by "echo 1 > cgroup.freeze";
4) The response from process B reaches the frozen thread, which will
unexpectedly fail.

This patch provides a mechanism to check if there's any new pending
transaction happening between ioctl(BINDER_FREEZE) and freezing the
main thread. If there's any, the main thread freezing operation can
be rolled back to finish the pending transaction.

Furthermore, the response might reach the binder driver before the
rollback actually happens. That will still cause failed transaction.

As the other process doesn't wait for another response of the response,
the response transaction failure can be fixed by treating the response
transaction l(CR) an oneway/async one, allowing it to reach the frozen
thread. And it will be consumed when the thread gets unfrozen later.

NOTE: This patch reuses the existing definition of struct
binder_frozen_status_info but expands the bit assignments of __u32
member sync_recv.

To ensure backward compatibility, bit 0 of sync_recv still indicates
there's an outstanding sync binder transaction. This patch adds new
information to bit 1 of sync_recv, indicating the binder transaction
happens exactly when there's a race.

If an existing userspace app runs on a new kernel, a sync binder call
will set bit 0 of sync_recv so ioctl(BINDER_GET_FROZEN_INFO) still
return the expected value (true). The app just doesn't check bit 1
intentionally so it doesn't have the ability to tell if there's a race.
This behavior is aligned with what happens on an old kernel which
doesn't set bit 1 at all.

A new userspace app can 1) check bit 0 to know if there's a sync binder
transaction happened when being frozen - same as before; and 2) check
bit 1 to know if that sync binder transaction happened exactly when
there's a race - a new information for rollback decision.

Fixes: 432ff1e91694 ("binder: BINDER_FREEZE ioctl")
Acked-by: Todd Kjos <tkjos@google.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Li Li <dualli@google.com>
Test: stress test with apps being frozen and initiating binder calls at
the same time, confirmed the pending transactions succeeded.
Link: https://lore.kernel.org/r/20210910164210.2282716-2-dualli@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 198493121
(cherry picked from commit b564171ade70570b7f335fa8ed17adb28409e3ac
 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
 char-misc-linus)
Reviewed-on: https://gerrit.mot.com/2140525
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/2161797
Reviewed-by: Zhangqing Huang <huangzq2@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>

Change-Id: I2d3ac4dd1c11d7e0b4ba1c2fb97d183d4d3c7d6f
Reviewed-on: https://gerrit.mot.com/2325573
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Hongshu Lou <louhs1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
2024-04-18 14:45:11 +08:00
Marco Ballesio
e816fb5085 FROMGIT: binder: BINDER_GET_FROZEN_INFO ioctl
User space needs to know if binder transactions occurred to frozen
processes. Introduce a new BINDER_GET_FROZEN ioctl and keep track of
transactions occurring to frozen proceses.

Bug: 180989544
(cherry picked from commit c55019c24b22d6770bd8e2f12fbddf3f83d37547
 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git char-misc-testing)
Signed-off-by: Marco Ballesio <balejs@google.com>
Signed-off-by: Li Li <dualli@google.com>
Acked-by: Todd Kjos <tkjos@google.com>
Link: https://lore.kernel.org/r/20210316011630.1121213-4-dualli@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Change-Id: If2fb07bc002940d27ec9ec060504940a71c654e4
Reviewed-on: https://gerrit.mot.com/2119046
Reviewed-by: Vijayakumar Gn <vijaygn@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
Signed-off-by: Murilo Alves <alvesm@motorola.com>
Reviewed-on: https://gerrit.mot.com/2132252
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-on: https://gerrit.mot.com/2161796
Reviewed-by: Zhangqing Huang <huangzq2@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/2325561
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Hongshu Lou <louhs1@motorola.com>
2024-04-18 14:45:11 +08:00
marco Ballesio
a22f74aebc binder: BINDER_FREEZE ioctl
Frozen tasks can't process binder transactions, so a way is required to
inform transmitting ends of communication failures due to the frozen
state of their receiving counterparts. Additionally, races are possible
between transitions to frozen state and binder transactions enqueued to
a specific process.

Implement BINDER_FREEZE ioctl for user space to inform the binder driver
about the intention to freeze or unfreeze a process. When the ioctl is
called, block the caller until any pending binder transactions toward
the target process are flushed. Return an error to transactions to
processes marked as frozen.

Change-Id: I673f757a271574c4db50c4bafe143baf1bf7e490
Signed-off-by: Marco Ballesio <balejs@google.com>
Co-developed-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Li Li <dualli@google.com>
Signed-off-by: Kanagarathina kalathi <kalath(CR)@motorola.com>
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-on: https://gerrit.mot.com/2325560
Reviewed-by: Yonghui Jia <jiayh2@motorola.com>
Reviewed-by: Hongshu Lou <louhs1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:11 +08:00
chenlj26
20dab16401 miami: Remove unused macros CONFIG_CAMERA_FLASH_PWM
details:
miami use i2c to control flash but PWM

Change-Id: I4bd8032d54780eaf29470cd85bb8893954b041c9
Signed-off-by: chenlj26 <chenlj26@motorola.com>
Reviewed-on: https://gerrit.mot.com/2324313
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Liu <liuwang2@lenovo.com>
Reviewed-by: <huqian4@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:11 +08:00
zhaoxp3
8c5f2d8621 penang: change reserved gpio
TZ protect gpio45,46,56,57 for NFC SPI,
but the four of them are used for  other purpose
so we need to saperate them from holi baseline

Change-Id: Ia2d05a1c038706741a8b00ad923afa541026334c
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/2323872
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2024-04-18 14:45:11 +08:00
yaozm1
5ae660d013 kernal config:add CONFIG_SND_SOC_AW87XXX for penang
add CONFIG_SND_SOC_AW87XXX;
for awinic K PA.

Change-Id: I3a8b54faae9fb2adde7d4b5c748aab2eb11dca0d
Signed-off-by: yaozm1 <yaozm1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2321817
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:11 +08:00
zhouwl
d9d23eca0e fsa4480: optimize switch config flow
- When headset is present and not plug-out, if USB PD mis-trigger
recognize typec_accessory_device, this action will make fsa4480
change registers value, headset hardware signals will switch, then
headset function becomes abnormal. Optimize fsa4480 workflow, if
headset present state is not change, drop the update operation.
- Enable debug log for analysis headset case.

Change-Id: I40d3abc137db22ecdaf0cb74df081acbd4d2108d
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2310806
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:11 +08:00
zhouwl
4868706096 defconfig: miami: aw882xx mapsize
after aw882xx upgrade to get algorithm params for RAM,
need to enlarge AFE mapsize to 16K.

Change-Id: I927a5d8a1bf95810425ae08df73ecac4c9c8468b
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2309236
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:11 +08:00
zhouwl
3ce9097b98 defconfig: rhodec+rhodei: aw882xx mapsize
after aw882xx algo update to support get algo params from RAM,
need enlarge AFE mapsize to 16k.

Change-Id: Id163b3078e338ffb54104a5dfd7f6a99b0f4bb22
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2304496
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:11 +08:00
duxu1
308c0bf516 Enable SPINLOCK and MUTEXES debug config
Enable SPINLOCK and MUTEXES debug config
in userdebug build to debug deadlock issue.
CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_MUTEXES=y

Change-Id: I2dee3eb1997b54ae18cba0c41fd8db32e68f3e3d
Signed-off-by: duxu1 <duxu1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2298955
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hongshu Lou <louhs1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Zhizhong Ge <gezz1@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00
Yiqiang Feng
b8596af400 Miami/config: Bootup fail after flash GKI
The micron HID macro defines the structure defined by
Google,need to be removed from moto-holi-config.

Change-Id: I1cf4ce67b0449658a87f6617f90119ef16122e0e
Signed-off-by: Yiqiang Feng <fengyq4@Lenovo.com>
Reviewed-on: https://gerrit.mot.com/2297699
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Chuanchun Zhu <zhucc2@motorola.com>
Reviewed-by: Hongshu Lou <louhs1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00
Alessio Balsini
f2355025d7 ANDROID: fs/fuse: Keep FUSE file times consistent with lower file
When FUSE passthrough is used, the lower file system file is manipulated
directly, but neither mtime, atime or ctime of the referencing FUSE file
is updated.

Fix by updating the file times when passthrough operations are
performed.

Mot-CRs-fixed: (CR)
Bug: 200779468
Reported-by: Fengnan Chang <changfengnan@vivo.com>
Reported-by: Ed Tsai <ed.tsai@mediatek.com>
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I35b72196b2cc1d79a9f62ddb32e2cfa934c3b6d3
Reviewed-on: https://gerrit.mot.com/2294436
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00
Alessio Balsini
bb611b669f UPSTREAM: fuse: fix matching of FUSE_DEV_IOC_CLONE command
With commit f8425c939663 ("fuse: 32-bit user space ioctl compat for fuse
device") the matching constraints for the FUSE_DEV_IOC_CLONE ioctl command
are relaxed, limited to the testing of command type and number.  As Arnd
noticed, this is wrong as it wouldn't ensure the correctness of the data
size or direction for the received FUSE device ioctl.

Fix by bringing back the comparison of the ioctl received by the FUSE
device to the originally generated FUSE_DEV_IOC_CLONE.

Mot-CRs-fixed: (CR)
Fixes: f8425c939663 ("fuse: 32-bit user space ioctl compat for fuse device")
Reported-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Alessio Balsini <balsini@android.com>
Signed-off-by: M(CR) Szeredi <mszeredi@redhat.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alessio Balsini <balsini@android.com>
Change-Id: I372d8399db6d603ba20ef50528acf6645e4d3c66
(cherry picked from commit 6076f5f341e612152879bfda99f0b76c1953bf0b)
Reviewed-on: https://gerrit.mot.com/2294435
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00
Alessio Balsini
3833d57eea ANDROID: fuse/passthrough: API V2 with __u32 open argument
The initial FUSE passthrough interface has the issue of introducing an
ioctl which receives as a parameter a data structure containing a
pointer. What happens is that, depending on the architecture, the size
of this struct might change, and especially for 32-bit userspace running
on 64-bit kernel, the size mismatch results into different a single
ioctl the behavior of which depends on the data that is passed (e.g.,
with an enum). This is just a poor ioctl design as mentioned by Arnd
Bergmann [1].

Introduce the new FUSE_PASSTHROUGH_OPEN ioctl which only gets the fd of
the lower file system, which is a fixed-size __u32, dropping the
confusing fuse_passthrough_out data structure.

[1] https://lore.kernel.org/lkml/CAK8P3a2K2FzPvqBYL9W=Yut58SFXyetXwU4Fz50G5O3TsS0pPQ@mail.gmail.com/

Mot-CRs-fixed: (CR)
Bug: 175195837
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I486d71cbe20f3c0c87544fa75da4e2704fe57c7c
Reviewed-on: https://gerrit.mot.com/2294434
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00
Alessio Balsini
1f784ca6da FROMLIST: fuse: Allocate unl(CR) used ioctl number for passthrough V1
The current UAPI interface for FUSE passthrough is still under
discussion upstream, thus we are reserving this ioctl number to avoid
future conflicts with user space binaries.
The user space implementation in Android will take care of doing all the
checking to fall into the most appropriate ioctl number.

Mot-CRs-fixed: (CR)
Bug: 167695973
Link: https://lore.kernel.org/lkml/20210125153057.3623715-3-balsini@android.com/
Fixes: 9655e27a40d2 ("FROMLIST: fuse: Definitions and ioctl for passthrough")
Test: manual test with additional printks
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I658c5ab2ebfe2b76d20685a099ac1b1fee3549cc
Reviewed-on: https://gerrit.mot.com/2014525
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00
Alessio Balsini
201597f6c8 FROMLIST: fuse: Fix crediantials leak in passthrough read_iter
If the system doesn't have enough memory when fuse_passthrough_read_iter
is requested in asynchronous IO, an error is directly returned without
restoring the caller's credentials.
Fix by always ensuring credentials are restored.

Mot-CRs-fixed: (CR)
Fixes: 10b1e569ef010c240bfdaf1de1fb2360a4d08ead ("FROMLIST: fuse: Use daemon creds in passthrough mode")
Link: https://lore.kernel.org/lkml/YB0qPHVORq7bJy6G@google.com/
Reported-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Alessio Balsini <balsini@android.com>
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I4aff43f5dd8ddab2cc8871cd9f81438963ead5b6
Reviewed-on: https://gerrit.mot.com/2014524
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00
Alessio Balsini
7506f2d96b FROMLIST: fuse: Introduce passthrough for mmap
Enabling FUSE passthrough for mmap-ed operations not only affects
performance, but has also been shown as mandatory for the correct
functioning of FUSE passthrough.
yanwu noticed [1] that a FUSE file with passthrough enabled may suffer
data inconsistencies if the same file is also accessed with mmap. What
happens is that read/write operations are directly applied to the lower
file system (and its cache), while mmap-ed operations are affecting the
FUSE cache.

Extend the FUSE passthrough implementation to also handle memory-mapped
FUSE file, to both fix the cache inconsistencies and extend the
passthrough performance benefits to mmap-ed operations.

[1] https://lore.kernel.org/lkml/20210119110654.11817-1-wu-yan@tcl.com/

Mot-CRs-fixed: (CR)
Bug: 168023149
Link: https://lore.kernel.org/lkml/20210125153057.3623715-9-balsini@android.com/
Signed-off-by: Alessio Balsini <balsini@android.com>
Change-Id: Ifad4698b0380f6e004c487940ac6907b9a9f2964
Signed-off-by: Alessio Balsini <balsini@google.com>
Reviewed-on: https://gerrit.mot.com/2014523
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00
Alessio Balsini
6296c14ca0 FROMLIST: fuse: Use daemon creds in passthrough mode
When using FUSE passthrough, read/write operations are directly
forwarded to the lower file system file through VFS, but there is no
guarantee that the process that is triggering the request has the right
permissions to access the lower file system. This would cause the
read/write access to fail.

In passthrough file systems, where the FUSE daemon is responsible for
the enforcement of the lower file system access policies, often happens
that the process dealing with the FUSE file system doesn't have access
to the lower file system.
Being the FUSE daemon in charge of implementing the FUSE file
operations, that in the case of read/write operations usually simply
results in the copy of memory buffers from/to the lower file system
respectively, these operations are executed with the FUSE daemon
privileges.

This patch adds a reference to the FUSE daemon credentials, referenced
at FUSE_DEV_IOC_PASSTHROUGH_OPEN ioctl() time so that they can be used
to temporarily raise the user credentials when accessing lower file
system files in passthrough.
The process accessing the FUSE file with passthrough enabled temporarily
receives the privileges of the FUSE daemon while performing read/write
operations. Similar behavior is implemented in overlayfs.
These privileges will be reverted as soon as the IO operation completes.
This feature does not provide any higher security privileges to those
processes accessing the FUSE file system with passthrough enabled. This
is because it is still the FUSE daemon responsible for enabling or not
the passthrough feature at file open time, and should enable the feature
only after appropriate access policy checks.

Mot-CRs-fixed: (CR)
Bug: 168023149
Link: https://lore.kernel.org/lkml/20210125153057.3623715-8-balsini@android.com/
Signed-off-by: Alessio Balsini <balsini@android.com>
Change-Id: Idb4f03a2ce7c536691e5eaf8fadadfcf002e1677
Signed-off-by: Alessio Balsini <balsini@google.com>
Reviewed-on: https://gerrit.mot.com/2014522
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2024-04-18 14:45:10 +08:00