Commit graph

886,617 commits

Author SHA1 Message Date
Paul Lawrence
dbee4e7bc4 Revert "ANDROID: Incremental fs: Set credentials before reading/writing"
This reverts commit 28688d32ed.

Reason for revert: rolling the three fixes into one with feature flag
Bug: 174692664
Test: incfs_test passes
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I85cb75b7acb5606659698a6d0e0918ffb731009d
2021-04-22 22:34:05 +00:00
Paul Lawrence
b6221e3495 Revert "ANDROID: Incremental fs: Fix selinux issues"
This reverts commit 75c93eb439.

Reason for revert: rolling the three fixes into one with feature flag
Bug: 174692664
Test: incfs_test passes
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I838bed85d6682aba44165a58c22e6a0e10c49d58
2021-04-22 22:33:56 +00:00
Mukesh Ojha
0ade8c4105 ANDROID: ABI: update allowed list for QCOM
Update the android/abi_gki_aarch64_qcom with rtc_add_group addition.
No need to update the .xml file, as it is already updated with
rtc_add_group symbol.

Bug: 185539583
Change-Id: I581bcf83a02a4114a9e7a22397fb52934ea0c52b
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
2021-04-22 18:30:58 +00:00
Howard Chen
ccdcd307cf ANDROID: Update the KMI for virtual platform modules
Leaf changes summary: 1 artifact changed (26 filtered out)
Changed leaf types summary: 0 (26 filtered out) leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

1 Added function:

  [A] 'function void* vmemdup_user(void*, size_t)'

Bug: 184721371
Test: \
    BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh \
    BUILD_CONFIG=common-modules/virtual-device/build.config.virtual_device.aarch64 build/build.sh \
    BUILD_CONFIG=common-modules/virtual-device/build.config.virtual_device.aarch64 build/build_abi.sh --update-symbol-list \
    BUILD_CONFIG=common/build.config.gki.aarch64 build/build_abi.sh --update --print-report

Change-Id: Ib945211cb33806687eccdbe52533abf2db04abcf
Signed-off-by: Howard Chen <howardsoc@google.com>
2021-04-22 11:30:41 +08:00
Jindong Yue
b3f4130630 ANDROID: ABI: Update symbol list for imx
Update imx symbol list according to below changes:
 - Replace imx_rproc with imx_rpmsg driver
 - Add two modules: snd-soc-rpmsg-pcm512x.ko and
snd-soc-rpmsg-imx-pcm512x.ko

Leaf changes summary: 4 artifacts changed (26 filtered out)
Changed leaf types summary: 0 (26 filtered out) leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 4 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

4 Added functions:

  [A] 'function int snd_interval_ranges(snd_interval*, unsigned int, const snd_interval*, unsigned int)'
  [A] 'function int snd_pcm_hw_constraint_ratnums(snd_pcm_runtime*, unsigned int, snd_pcm_hw_param_t, const snd_pcm_hw_constraint_ratnums*)'
  [A] 'function int snd_soc_limit_volume(snd_soc_card*, const char*, int)'
  [A] 'function int snd_soc_params_to_frame_size(snd_pcm_hw_params*)'

Bug: 159736148
Signed-off-by: Jindong Yue <jindong.yue@nxp.com>
Change-Id: I04c696219cdfead30a00201000251bd989814ec5
2021-04-21 10:37:50 +08:00
Nick Desaulniers
67e9dbddb5 ANDROID: clang: update to 12.0.5
Bug: 185804542
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: If3d0c122472d8979b326d8a6fece30d8b2af962a
2021-04-19 19:41:50 +00:00
A. Cody Schuffelen
91d8a13f43 FROMGIT: virt_wifi: Return micros for BSS TSF values
cfg80211_inform_bss expects to receive a TSF value, but is given the
time since boot in nanoseconds. TSF values are expected to be at
microsecond scale rather than nanosecond scale.

Bug: 181840234
Test: atest CtsWifiTestCases:android.net.wifi.cts.ScanResultTest#testScanResultTimeStamp -- --abi x86_64
Signed-off-by: A. Cody Schuffelen <schuffelen@google.com>
Link: https://lore.kernel.org/r/20210318200419.1421034-1-schuffelen@google.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(cherry picked from commit b57aa17f07c9270e576ef7df09f142978b5a75f0
https: //git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git master)
Change-Id: Icafc24ad303357926cbe955ffa12e28e0bf31e6f
2021-04-12 20:35:25 -07:00
Matthias Maennich
8aa2c72ddf ANDROID: android/OWNERS: drop gki-abi-approvers@
Group support is not implemented and this rather disturbes downstream
merges. So, drop them.

Fixes: 2fa0951b66b3 ("ANDROID: Initial Android 12 OWNERS for abi metafiles")
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: I7d1462ff87b05eb678b1c97f5e0b89b97d4e91a5
2021-04-07 10:22:34 +01:00
Matthias Maennich
9b465a062d ANDROID: Add OWNERS files referring to the respective android-mainline OWNERS
This was generated with
  $ build/synchronize_owners common-mainline/ android-mainline common11-5.4/

Bug: 184248201
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: I5e56eb34fcbb5a2a013dd03bc9dcc4f159fb90de
2021-04-01 13:45:14 +00:00
Ram Muthiah
884688fe0c ANDROID: Make vsock virtio packet buff size configurable
When the android virtual device stays up for long periods of time, the
SLAB sustains everincreasing fragmentation. Contributing to this
fragmentation are the virtio packet buffer allocations which are a
drain on 64Kb compound pages. Eventually these can't be allocated due to
fragmentation.

To enable successful allocations for this packet buffer, the packet
buffer's size needs to be reduced.

To enable a reduction without impacting other partners, this var is
being exposed as a command line param.

Bug: 149494272
Test: atest ManagedProfileLifecycleStressTest#testCreateStartDelete on
local cuttlefish device
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
Change-Id: Ia4f9180025b64d61d9e2b882daa84460b8f08fd2
2021-03-25 19:12:07 +00:00
Giuliano Procida
ae37e86392 ANDROID: refresh ABI XML to new version
This is an incompatible ABI XML version change.

Bitfield offsets are now correct.

Bug: 183612421
Change-Id: Id1c656ffb78535b999cae5e395deaf32656b58b2
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-03-25 00:08:43 +00:00
Giuliano Procida
35b7fe6c12 ANDROID: Refresh GKI ABI XML
There are no actually ABI differences. This is just a refresh before
switching to a new version of libabigail and an incompatible ABI XML
version.

Bug: 183612421
Change-Id: I62e7eb766df62dd8b4b459f16fc321d40eb75772
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-03-24 23:59:59 +00:00
Howard Chen
d71d55b76b ANDROID: ABI: Update symbol list for cuttlefish
The cuttlefish symbol list is out-of-date. Add init_user_ns and
ns_capable_noaudit required by vsock.ko

This update is required by the merge to 5.4.86 which saw the vsock.ko
module add a dependency.

Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 1 Added variable

1 Added function:

  [A] 'function bool ns_capable_noaudit(user_namespace*, int)'

1 Added variable:

  [A] 'user_namespace init_user_ns'

Bug: 183086563
Signed-off-by: Howard Chen <howardsoc@google.com>
Change-Id: I7c175da4ab2fa7220408e6b8d69b3c2803915ce3
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2021-03-24 16:35:47 +00:00
Steve Muckle
a5dc6e5d9e ANDROID: GKI: enable CONFIG_SONY_FF
Bug: 168719305
Signed-off-by: Steve Muckle <smuckle@google.com>
Change-Id: Id9ebb1937b669b999ccc5daccaadb04f88449497
2021-03-24 15:28:35 +00:00
Jian Gong
e01b338f5e ANDROID: ABI: update symbols to unisoc whitelist to android11-k5.4
Update whitelist for the symbols used by the unisoc device and
update the ABI representation accordingly.

Leaf changes summary: 1 artifact changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

1 Added function:

  [A] 'function void clear_nlink(inode*)'

Bug: 183260329
Change-Id: Ia406458f6f80abf9a34528c77a8184513f3cfc11
Signed-off-by: Jian Gong <jian.gong@unisoc.com>
2021-03-23 11:08:03 +00:00
Xiaowen Wu
c9c1aa8cfe ANDROID: ABI: Update allowed list for QCOM
Leaf changes summary: 5 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 5 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

5 Added functions:

  [A] 'function int drm_gem_shmem_dumb_create(drm_file*, drm_device*, drm_mode_create_dumb*)'
  [A] 'function sg_table* drm_gem_shmem_get_pages_sgt(drm_gem_object*)'
  [A] 'function int drm_gem_shmem_mmap(file*, vm_area_struct*)'
  [A] 'function drm_gem_object* drm_gem_shmem_prime_import_sg_table(drm_device*, dma_buf_attachment*, sg_table*)'
  [A] 'function drm_plane* drm_plane_from_index(drm_device*, int)'

Bug: 183217899
Change-Id: Ifac20381e983ed9030026f232838120df424e9b3
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
2021-03-20 12:03:02 +00:00
Xiaowen Wu
408366e170 ANDROID: GKI: Enable DRM_GEM_SHMEM_HELPER
DRM_GEM_SHMEM_HELPER is needed by DRM driver to support large
shared memory allocation.

Bug: 183221396
Change-Id: I76d58abc357f1685e65fc8dd5e2568e1d307cc38
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
2021-03-20 12:02:49 +00:00
Ashish Chavan
a7c0b02b68 ANDROID: GKI: Update abi_gki_aarch64_qcom
Add alarm_expires_remaining symbol in abi_gki_aarch64_qcom
to be used in smb5 driver.

Bug: 183182450
Change-Id: Ifba9354ed4249c2408782ffef577d965bd4ef206
Signed-off-by: Ashish Chavan <ashichav@codeaurora.org>
2021-03-19 23:11:47 +00:00
Nick Desaulniers
4a669f5150 ANDROID: clang: update to 12.0.4
Bug: 183031914
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: Ib32ee605e010362c855f11f551755755bbb1e967
2021-03-19 13:17:21 -07:00
Daiyue Zhang
3c6774301d FROMGIT: configfs: fix a use-after-free in __configfs_open_file
Commit b0841eefd9 ("configfs: provide exclusion between IO and removals")
uses ->frag_dead to mark the fragment state, thus no bothering with extra
refcount on config_item when opening a file. The configfs_get_config_item
was removed in __configfs_open_file, but not with config_item_put. So the
refcount on config_item will lost its balance, causing use-after-free
issues in some occasions like this:

Test:
1. Mount configfs on /config with read-only items:
drwxrwx--- 289 root   root            0 2021-04-01 11:55 /config
drwxr-xr-x   2 root   root            0 2021-04-01 11:54 /config/a
--w--w--w-   1 root   root         4096 2021-04-01 11:53 /config/a/1.txt
......

2. Then run:
for file in /config
do
echo $file
grep -R 'key' $file
done

3. __configfs_open_file will be called in parallel, the first one
got called will do:
if (file->f_mode & FMODE_READ) {
	if (!(inode->i_mode & S_IRUGO))
		goto out_put_module;
			config_item_put(buffer->item);
				kref_put()
					package_details_release()
						kfree()

the other one will run into use-after-free issues like this:
BUG: KASAN: use-after-free in __configfs_open_file+0x1bc/0x3b0
Read of size 8 at addr fffffff155f02480 by task grep/13096
CPU: 0 PID: 13096 Comm: grep VIP: 00 Tainted: G        W       4.14.116-kasan #1
TGID: 13096 Comm: grep
Call trace:
dump_stack+0x118/0x160
kasan_report+0x22c/0x294
__asan_load8+0x80/0x88
__configfs_open_file+0x1bc/0x3b0
configfs_open_file+0x28/0x34
do_dentry_open+0x2cc/0x5c0
vfs_open+0x80/0xe0
path_openat+0xd8c/0x2988
do_filp_open+0x1c4/0x2fc
do_sys_open+0x23c/0x404
SyS_openat+0x38/0x48

Allocated by task 2138:
kasan_kmalloc+0xe0/0x1ac
kmem_cache_alloc_trace+0x334/0x394
packages_make_item+0x4c/0x180
configfs_mkdir+0x358/0x740
vfs_mkdir2+0x1bc/0x2e8
SyS_mkdirat+0x154/0x23c
el0_svc_naked+0x34/0x38

Freed by task 13096:
kasan_slab_free+0xb8/0x194
kfree+0x13c/0x910
package_details_release+0x524/0x56c
kref_put+0xc4/0x104
config_item_put+0x24/0x34
__configfs_open_file+0x35c/0x3b0
configfs_open_file+0x28/0x34
do_dentry_open+0x2cc/0x5c0
vfs_open+0x80/0xe0
path_openat+0xd8c/0x2988
do_filp_open+0x1c4/0x2fc
do_sys_open+0x23c/0x404
SyS_openat+0x38/0x48
el0_svc_naked+0x34/0x38

To fix this issue, remove the config_item_put in
__configfs_open_file to balance the refcount of config_item.

Fixes: b0841eefd9 ("configfs: provide exclusion between IO and removals")
Signed-off-by: Daiyue Zhang <zhangdaiyue1@huawei.com>
Signed-off-by: Yi Chen <chenyi77@huawei.com>
Signed-off-by: Ge Qiu <qiuge@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Bug: 174049066
(cherry picked from commit 14fbbc8297728e880070f7b077b3301a8c698ef9
 git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master)
Cc: Daniel Rosenberg <drosen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I745711ed546c1be97360670b77aedfb929bffcec
2021-03-13 14:31:17 +00:00
Farid Chahla
b0cd259c16 ANDROID: GKI: enable hid-playstation driver/rumble
To enable DualSense driver, i.e. hid-playstation, we need to set
CONFIG_HID_PLAYSTATION to "y". To enable Dualsense rumble, we need to
set CONFIG_PLAYSTATION_FF to "y".

Bug: 167947264
Change-Id: Ic2e31a6f53bfdef113eeee07277ef6b2a28dce2d
Signed-off-by: Farid Chahla <farid.chahla@sony.com>
2021-03-12 17:11:37 -08:00
Roderick Colenbrander
fb66b3f219 UPSTREAM: HID: playstation: add DualSense player LED support.
The DualSense features 5 player LEDs below its touchpad, which are
meant as player id indications. The LEDs are configured with a
player ID determined by an ID allocator, which assign player ids
to ps_device instances.

This patch is a combination of the following original patches
minus use of LED framework APIs:
- HID: playstation: add DualSense player LEDs support.
- HID: playstation: DualSense set LEDs to default player id.

Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Reviewed-by: Barnabás Pőcze <pobrn@protonmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Bug: 167947264
Change-Id: I2a9ef9949bb82df18247a14e64cb8c54e9b3924c
(cherry picked from commit 949aaccda019723050a2cd98d7b4492b06423f27)
Signed-off-by: Farid Chahla <farid.chahla@sony.com>
2021-03-12 17:11:37 -08:00
Roderick Colenbrander
faff2c6cd8 UPSTREAM: HID: playstation: add microphone mute support for DualSense.
The DualSense controller has a built-in microphone exposed as an
audio device over USB (or HID using Bluetooth). A dedicated
button on the controller handles mute, but software has to configure
the device to mute the audio stream.

This patch captures the mute button and schedules an output report
to mute/unmute the audio stream as well as toggle the mute LED.

Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Reviewed-by: Barnabás Pőcze <pobrn@protonmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Bug: 167947264
Change-Id: I6fce08b0b28c1cf41c682a2ff5655f00d7a52843
(cherry picked from commit c26e48b150fccb07c4b7f0f419f2b0a2c42e57d2)
Signed-off-by: Farid Chahla <farid.chahla@sony.com>
2021-03-12 17:11:37 -08:00
Roderick Colenbrander
669066bd53 UPSTREAM: HID: playstation: add initial DualSense lightbar support.
Provide initial support for the DualSense lightbar and configure it
with a default PlayStation blue color.

Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Reviewed-by: Barnabás Pőcze <pobrn@protonmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Bug: 167947264
Change-Id: I4f5a78e20b2e11c68e67c539b9c21197e42a722f
(cherry picked from commit 8e5198a12d6416f0a1e9393bdb3a533854ed577b)
Signed-off-by: Farid Chahla <farid.chahla@sony.com>
2021-03-12 17:11:36 -08:00
Colin Ian King
6f239ba207 UPSTREAM: HID: playstation: fix array size comparison (off-by-one)
The comparison of value with the array size ps_gamepad_hat_mapping
appears to be off-by-one. Fix this by using >= rather than > for the
size comparison.

Addresses-Coverity: ("Out-of-bounds read")
Fixes: bc2e15a9a022 ("HID: playstation: initial DualSense USB support.")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Bug: 167947264
Change-Id: I24f4c7f8d48ab8ff1d117d33c7914b8d2e4292f8
(cherry picked from commit 50ab1ffd7c41c5c7759b62fb42d3006b751bb12b)
Signed-off-by: Farid Chahla <farid.chahla@sony.com>
2021-03-12 17:11:36 -08:00
Roderick Colenbrander
8e0061c2c3 UPSTREAM: HID: playstation: fix unused variable in ps_battery_get_property.
The ret variable in ps_battery_get_property is set in an error path,
but never actually returned. Change the function to return ret.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Bug: 167947264
Change-Id: Ieeaff4d249a6ee6d02eb4746f9fe502c91c6f40a
(cherry picked from commit 5fb52551248f54ddc8f72bc252661468b603cfcc)
Signed-off-by: Farid Chahla <farid.chahla@sony.com>
2021-03-12 17:11:36 -08:00
Roderick Colenbrander
6c0bf9e6af BACKPORT: HID: playstation: report DualSense hardware and firmware version.
Retrieve DualSense hardware and firmware information using a vendor
specific feature report. Report the data through sysfs and also
report using hid_info as there can be signficant differences between
versions.

Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Reviewed-by: Barnabás Pőcze <pobrn@protonmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Bug: 167947264
Change-Id: I9a8e338d1a9726510194a4d41911dda8bb6371fc
(cherry picked from commit 0b25b55d34f554b43a679e7e1303beb973b63e27)
[roderick: Modified "show" calls to use snprintf instead of sysfs_emit]
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Signed-off-by: Farid Chahla <farid.chahla@sony.com>
2021-03-12 17:11:36 -08:00
Roderick Colenbrander
8d5f8d63af UPSTREAM: HID: playstation: add DualSense classic rumble support.
The DualSense features a haptics system based on voicecoil motors,
which requires PCM data (or special HID packets using Bluetooth). There
is no appropriate API yet in the Linux kernel to expose these. The
controller also provides a classic rumble feature for backwards
compatibility. Expose this classic rumble feature using the FF framework.

Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Reviewed-by: Barnabás Pőcze <pobrn@protonmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Bug: 167947264
Change-Id: Ia4d664c4a1dedbadce6baf54962595616265eb4f
(cherry picked from commit 51151098d7ab832f2a8b8f5c51fe224a9c98fdd5)
Signed-off-by: Farid Chahla <farid.chahla@sony.com>
2021-03-12 17:11:36 -08:00
Roderick Colenbrander
ea8ed83665 UPSTREAM: HID: playstation: add DualSense Bluetooth support.
This patch adds support for the DualSense when operating in Bluetooth mode.
The device has the same behavior as the DualShock 4 in that by default it
sends a limited input report (0x1), but after requesting calibration data,
it switches to an extended input report (report 49), which adds data for
touchpad, motion sensors, battery and more.

Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Reviewed-by: Barnabás Pőcze <pobrn@protonmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Bug: 167947264
Change-Id: I6ba3eb018f9938b71bb63cb70b26e4acdcfb788a
(cherry picked from commit 799b2b533a299ba5b64ddd22639836c2a5eaee31)
Signed-off-by: Farid Chahla <farid.chahla@sony.com>
2021-03-12 17:11:36 -08:00
Roderick Colenbrander
3dd150cf16 UPSTREAM: HID: playstation: track devices in list.
Track devices in a list, so we can detect when a device is connected
twice when using Bluetooth and USB.

Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Reviewed-by: Barnabás Pőcze <pobrn@protonmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Bug: 167947264
Change-Id: Ibfa0e5b3821891240545f484f1ceb59b211cb6fb
(cherry picked from commit 53f04e83577c5e146eeee1a671efeb58db14afd1)
Signed-off-by: Farid Chahla <farid.chahla@sony.com>
2021-03-12 17:11:36 -08:00
Roderick Colenbrander
a4a27b5d2a UPSTREAM: HID: playstation: add DualSense accelerometer and gyroscope support.
The DualSense features an accelerometer and gyroscope. The data is
embedded into the main HID input reports. Expose both sensors through
through a separate evdev node.

Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Reviewed-by: Barnabás Pőcze <pobrn@protonmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Bug: 167947264
Change-Id: I27909fb116a56be52cc12336dc34ca8b4189423e
(cherry picked from commit 402987c5d98a9dd0d611cfe3af5e5bdc13d122d0)
Signed-off-by: Farid Chahla <farid.chahla@sony.com>
2021-03-12 17:11:35 -08:00
Roderick Colenbrander
bd87612ff7 UPSTREAM: HID: playstation: add DualSense touchpad support.
Implement support for DualSense touchpad as a separate input device.

Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Reviewed-by: Barnabás Pőcze <pobrn@protonmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Bug: 167947264
Change-Id: I59b1d77b1d778366d05f5a929bbb205127914304
(cherry picked from commit f6bb05fcb2a10ff26ac5af1c29066d42019dc464)
Signed-off-by: Farid Chahla <farid.chahla@sony.com>
2021-03-12 17:11:35 -08:00
Roderick Colenbrander
f8e26f21e9 UPSTREAM: HID: playstation: add DualSense battery support.
Report DualSense battery status information through power_supply class.

Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Reviewed-by: Barnabás Pőcze <pobrn@protonmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Bug: 167947264
Change-Id: I161c0ebbb47c4a58bfed75748e23ca8fd214af53
(cherry picked from commit d30bca44809eb1d2937e59d3d09694f40613070d)
Signed-off-by: Farid Chahla <farid.chahla@sony.com>
2021-03-12 17:11:35 -08:00
Roderick Colenbrander
69844f8c10 UPSTREAM: HID: playstation: use DualSense MAC address as unique identifier.
Use the DualSense MAC address as a unique identifier for the HID device.

Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Reviewed-by: Barnabás Pőcze <pobrn@protonmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Bug: 167947264
Change-Id: If1c5a6ab0f8ebb1bdaf2528d85f5431a306aca6d
(cherry picked from commit b99dcefd78ff13349ce5c8641605d1de3d638ea0)
Signed-off-by: Farid Chahla <farid.chahla@sony.com>
2021-03-12 17:11:35 -08:00
Roderick Colenbrander
e694a1fc90 UPSTREAM: HID: playstation: initial DualSense USB support.
Implement support for PlayStation DualSense gamepad in USB mode.
Support features include buttons and sticks, which adhere to the
Linux gamepad spec.

Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Reviewed-by: Barnabás Pőcze <pobrn@protonmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Bug: 167947264
Change-Id: I7cf496f9b6f721cdd3e79387caa86b2ccc6378fb
(cherry picked from commit bc2e15a9a0228b10fece576d4f6a974c002ff07b)
Signed-off-by: Farid Chahla <farid.chahla@sony.com>
2021-03-12 17:11:35 -08:00
Jindong Yue
ce582b2960 ANDROID: GKI: Add IMX KMI symbol list
Add initial IMX KMI symbol file: abi_gki_aarch64_imx.

Leaf changes summary: 170 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 165 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 5 Added variables

165 Added functions:

  [A] 'function int __device_reset(device*, bool)'
  [A] 'function void* __v4l2_find_nearest_size(void*, size_t, size_t, size_t, size_t, s32, s32)'
  [A] 'function int _vb2_fop_release(file*, mutex*)'
  [A] 'function void cec_fill_conn_info_from_drm(cec_connector_info*, const drm_connector*)'
  [A] 'function cec_notifier* cec_notifier_cec_adap_register(device*, const char*, cec_adapter*)'
  [A] 'function void cec_notifier_cec_adap_unregister(cec_notifier*)'
  [A] 'function cec_notifier* cec_notifier_conn_register(device*, const char*, const cec_connector_info*)'
  [A] 'function void cec_notifier_conn_unregister(cec_notifier*)'
  [A] 'function void cec_notifier_set_phys_addr(cec_notifier*, u16)'
  [A] 'function void cec_notifier_set_phys_addr_from_edid(cec_notifier*, const edid*)'
  [A] 'function void cfg80211_cac_event(net_device*, const cfg80211_chan_def*, nl80211_radar_event, gfp_t)'
  [A] 'function void cfg80211_radar_event(wiphy*, cfg80211_chan_def*, gfp_t)'
  [A] 'function void cfg80211_report_wowlan_wakeup(wireless_dev*, cfg80211_wowlan_wakeup*, gfp_t)'
  [A] 'function clk_hw* clk_hw_register_composite(device*, const char*, const char* const*, int, clk_hw*, const clk_ops*, clk_hw*, const clk_ops*, clk_hw*, const clk_ops*, unsigned long int)'
  [A] 'function bool clk_is_match(const clk*, const clk*)'
  [A] 'function clk* clk_register_mux(device*, const char*, const char* const*, u8, unsigned long int, void*, u8, u8, u8, spinlock_t*)'
  [A] 'function device* dev_pm_domain_attach_by_id(device*, unsigned int)'
  [A] 'function drm_bridge* devm_drm_panel_bridge_add(device*, drm_panel*, u32)'
  [A] 'function irq_chip_generic* devm_irq_alloc_generic_chip(device*, const char*, int, unsigned int, void*, irq_flow_handler_t)'
  [A] 'function int devm_irq_setup_generic_chip(device*, irq_chip_generic*, u32, irq_gc_flags, unsigned int, unsigned int)'
  [A] 'function phy* devm_of_phy_get(device*, device_node*, const char*)'
  [A] 'function phy* devm_phy_optional_get(device*, const char*)'
  [A] 'function int devm_pinctrl_register_and_init(device*, pinctrl_desc*, void*, pinctrl_dev**)'
  [A] 'function void devm_remove_action(device*, void (void*)*, void*)'
  [A] 'function int driver_create_file(device_driver*, const driver_attribute*)'
  [A] 'function void driver_remove_file(device_driver*, const driver_attribute*)'
  [A] 'function int drm_connector_init_with_ddc(drm_device*, drm_connector*, const drm_connector_funcs*, int, i2c_adapter*)'
  [A] 'function hdmi_quantization_range drm_default_rgb_quant_range(const drm_display_mode*)'
  [A] 'function int drm_display_info_set_bus_formats(drm_display_info*, const u32*, unsigned int)'
  [A] 'function int drm_gem_cma_dumb_create(drm_file*, drm_device*, drm_mode_create_dumb*)'
  [A] 'function void drm_hdmi_avi_infoframe_colorspace(hdmi_avi_infoframe*, const drm_connector_state*)'
  [A] 'function void drm_hdmi_avi_infoframe_quant_range(hdmi_avi_infoframe*, drm_connector*, const drm_display_mode*, hdmi_quantization_range)'
  [A] 'function int drm_hdmi_infoframe_set_hdr_metadata(hdmi_drm_infoframe*, const drm_connector_state*)'
  [A] 'function int drm_hdmi_vendor_infoframe_from_display_mode(hdmi_vendor_infoframe*, drm_connector*, const drm_display_mode*)'
  [A] 'function int drm_mode_create_hdmi_colorspace_property(drm_connector*)'
  [A] 'function drm_display_mode* drm_mode_find_dmt(drm_device*, int, int, int, bool)'
  [A] 'function bool drm_mode_is_420_also(const drm_display_info*, const drm_display_mode*)'
  [A] 'function bool drm_mode_is_420_only(const drm_display_info*, const drm_display_mode*)'
  [A] 'function int drm_of_encoder_active_endpoint(device_node*, drm_encoder*, of_endpoint*)'
  [A] 'function int drm_of_find_panel_or_bridge(const device_node*, int, int, drm_panel**, drm_bridge**)'
  [A] 'function ssize_t drm_scdc_read(i2c_adapter*, u8, void*, size_t)'
  [A] 'function bool drm_scdc_set_high_tmds_clock_ratio(i2c_adapter*, bool)'
  [A] 'function bool drm_scdc_set_scrambling(i2c_adapter*, bool)'
  [A] 'function ssize_t drm_scdc_write(i2c_adapter*, u8, void*, size_t)'
  [A] 'function int dw_pcie_ep_raise_legacy_irq(dw_pcie_ep*, unsigned char)'
  [A] 'function int dw_pcie_ep_raise_msi_irq(dw_pcie_ep*, unsigned char, unsigned char)'
  [A] 'function int dw_pcie_ep_raise_msix_irq(dw_pcie_ep*, unsigned char, unsigned short int)'
  [A] 'function void dw_pcie_ep_reset_bar(dw_pcie*, pci_barno)'
  [A] 'function int dw_pcie_link_up(dw_pcie*)'
  [A] 'function bool fwnode_device_is_available(const fwnode_handle*)'
  [A] 'function fwnode_handle* fwnode_get_next_parent(fwnode_handle*)'
  [A] 'function fwnode_handle* fwnode_graph_get_next_endpoint(const fwnode_handle*, fwnode_handle*)'
  [A] 'function fwnode_handle* fwnode_graph_get_port_parent(const fwnode_handle*)'
  [A] 'function fwnode_handle* fwnode_graph_get_remote_endpoint(const fwnode_handle*)'
  [A] 'function fwnode_handle* fwnode_graph_get_remote_port_parent(const fwnode_handle*)'
  [A] 'function int fwnode_graph_parse_endpoint(const fwnode_handle*, fwnode_endpoint*)'
  [A] 'function int fwnode_property_read_u64_array(const fwnode_handle*, const char*, u64*, size_t)'
  [A] 'function void* gen_pool_dma_alloc(gen_pool*, size_t, dma_addr_t*)'
  [A] 'function int hdmi_avi_infoframe_check(hdmi_avi_infoframe*)'
  [A] 'function ssize_t hdmi_drm_infoframe_pack(hdmi_drm_infoframe*, void*, size_t)'
  [A] 'function ssize_t hdmi_vendor_infoframe_pack(hdmi_vendor_infoframe*, void*, size_t)'
  [A] 'function irq_domain* irq_domain_add_legacy(device_node*, unsigned int, unsigned int, irq_hw_number_t, const irq_domain_ops*, void*)'
  [A] 'function int iw_handler_get_spy(net_device*, iw_request_info*, iwreq_data*, char*)'
  [A] 'function int iw_handler_get_thrspy(net_device*, iw_request_info*, iwreq_data*, char*)'
  [A] 'function int iw_handler_set_spy(net_device*, iw_request_info*, iwreq_data*, char*)'
  [A] 'function int iw_handler_set_thrspy(net_device*, iw_request_info*, iwreq_data*, char*)'
  [A] 'function char* iwe_stream_add_event(iw_request_info*, char*, char*, iw_event*, int)'
  [A] 'function char* iwe_stream_add_point(iw_request_info*, char*, char*, iw_event*, char*)'
  [A] 'function char* iwe_stream_add_value(iw_request_info*, char*, char*, char*, iw_event*, int)'
  [A] 'function dentry* kern_path_create(int, const char*, path*, unsigned int)'
  [A] 'function void ktime_get_snapshot(system_time_snapshot*)'
  [A] 'function void mctrl_gpio_disable_ms(mctrl_gpios*)'
  [A] 'function void mctrl_gpio_enable_ms(mctrl_gpios*)'
  [A] 'function unsigned int mctrl_gpio_get(mctrl_gpios*, unsigned int*)'
  [A] 'function mctrl_gpios* mctrl_gpio_init(uart_port*, unsigned int)'
  [A] 'function void mctrl_gpio_set(mctrl_gpios*, unsigned int)'
  [A] 'function bool mdiobus_is_registered_device(mii_bus*, int)'
  [A] 'function void media_graph_walk_cleanup(media_graph*)'
  [A] 'function int mipi_dsi_dcs_enter_sleep_mode(mipi_dsi_device*)'
  [A] 'function int mipi_dsi_dcs_exit_sleep_mode(mipi_dsi_device*)'
  [A] 'function int mipi_dsi_dcs_get_display_brightness(mipi_dsi_device*, u16*)'
  [A] 'function int mipi_dsi_dcs_set_display_off(mipi_dsi_device*)'
  [A] 'function int mipi_dsi_dcs_set_display_on(mipi_dsi_device*)'
  [A] 'function int mipi_dsi_dcs_set_pixel_format(mipi_dsi_device*, u8)'
  [A] 'function int mipi_dsi_dcs_set_tear_on(mipi_dsi_device*, mipi_dsi_dcs_tear_mode)'
  [A] 'function int mipi_dsi_dcs_set_tear_scanline(mipi_dsi_device*, u16)'
  [A] 'function int mipi_dsi_dcs_soft_reset(mipi_dsi_device*)'
  [A] 'function void mmc_retune_timer_stop(mmc_host*)'
  [A] 'function gen_pool* of_gen_pool_get(device_node*, const char*, int)'
  [A] 'function int of_get_display_timing(const device_node*, const char*, display_timing*)'
  [A] 'function i2c_adapter* of_get_i2c_adapter_by_node(device_node*)'
  [A] 'function phy_device* of_phy_connect(net_device*, device_node*, void (net_device*)*, u32, phy_interface_t)'
  [A] 'function phy_device* of_phy_find_device(device_node*)'
  [A] 'function int of_regulator_match(device*, device_node*, of_regulator_match*, unsigned int)'
  [A] 'function int of_usb_update_otg_caps(device_node*, usb_otg_caps*)'
  [A] 'function pci_power_t pci_choose_state(pci_dev*, pm_message_t)'
  [A] 'function int pci_msi_enabled()'
  [A] 'function int phy_reset_after_clk_enable(phy_device*)'
  [A] 'function int phy_set_max_speed(phy_device*, u32)'
  [A] 'function void phy_set_sym_pause(phy_device*, bool, bool, bool)'
  [A] 'function void phy_support_sym_pause(phy_device*)'
  [A] 'function int pinctrl_enable(pinctrl_dev*)'
  [A] 'function group_desc* pinctrl_generic_get_group(pinctrl_dev*, unsigned int)'
  [A] 'function int pinctrl_generic_get_group_count(pinctrl_dev*)'
  [A] 'function const char* pinctrl_generic_get_group_name(pinctrl_dev*, unsigned int)'
  [A] 'function int pinctrl_generic_get_group_pins(pinctrl_dev*, unsigned int, const unsigned int**, unsigned int*)'
  [A] 'function function_desc* pinmux_generic_get_function(pinctrl_dev*, unsigned int)'
  [A] 'function int pinmux_generic_get_function_count(pinctrl_dev*)'
  [A] 'function int pinmux_generic_get_function_groups(pinctrl_dev*, unsigned int, const char* const**, unsigned int* const)'
  [A] 'function const char* pinmux_generic_get_function_name(pinctrl_dev*, unsigned int)'
  [A] 'function int posix_clock_register(posix_clock*, device*)'
  [A] 'function void posix_clock_unregister(posix_clock*)'
  [A] 'function power_supply* power_supply_get_by_phandle(device_node*, const char*)'
  [A] 'function int regmap_attach_dev(device*, regmap*, const regmap_config*)'
  [A] 'function int regulator_map_voltage_iterate(regulator_dev*, int, int)'
  [A] 'function int reset_control_status(reset_control*)'
  [A] 'function device* rpmsg_find_device(device*, rpmsg_channel_info*)'
  [A] 'function int rpmsg_sendto(rpmsg_endpoint*, void*, int, u32)'
  [A] 'function void rproc_add_carveout(rproc*, rproc_mem_entry*)'
  [A] 'function void* rproc_da_to_va(rproc*, u64, int)'
  [A] 'function resource_table* rproc_elf_find_loaded_rsc_table(rproc*, const firmware*)'
  [A] 'function int rproc_elf_load_rsc_table(rproc*, const firmware*)'
  [A] 'function int rproc_elf_load_segments(rproc*, const firmware*)'
  [A] 'function int rproc_elf_sanity_check(rproc*, const firmware*)'
  [A] 'function rproc_mem_entry* rproc_mem_entry_init(device*, void*, dma_addr_t, int, u32, int (rproc*, rproc_mem_entry*)*, int (rproc*, rproc_mem_entry*)*, const char*, ...)'
  [A] 'function rproc_mem_entry* rproc_of_resm_mem_entry_init(device*, u32, int, u32, const char*, ...)'
  [A] 'function irqreturn_t rproc_vq_interrupt(rproc*, int)'
  [A] 'function int schedule_hrtimeout(ktime_t*, const hrtimer_mode)'
  [A] 'function int sdhci_execute_tuning(mmc_host*, u32)'
  [A] 'function int sdhci_resume_host(sdhci_host*)'
  [A] 'function int sdhci_suspend_host(sdhci_host*)'
  [A] 'function void snd_dmaengine_pcm_set_config_from_dai_data(const snd_pcm_substream*, const snd_dmaengine_dai_dma_data*, dma_slave_config*)'
  [A] 'function int snd_pcm_format_big_endian(snd_pcm_format_t)'
  [A] 'function int snd_pcm_format_linear(snd_pcm_format_t)'
  [A] 'function int snd_pcm_format_unsigned(snd_pcm_format_t)'
  [A] 'function snd_pcm_substream* snd_soc_dpcm_get_substream(snd_soc_pcm_runtime*, int)'
  [A] 'function regmap* syscon_regmap_lookup_by_compatible(const char*)'
  [A] 'function int thermal_zone_bind_cooling_device(thermal_zone_device*, int, thermal_cooling_device*, unsigned long int, unsigned long int, unsigned int)'
  [A] 'function u64 timecounter_cyc2time(timecounter*, u64)'
  [A] 'function void tso_build_data(sk_buff*, tso_t*, int)'
  [A] 'function void tso_build_hdr(sk_buff*, char*, tso_t*, int, bool)'
  [A] 'function int tso_count_descs(sk_buff*)'
  [A] 'function void tso_start(sk_buff*, tso_t*)'
  [A] 'function int tty_port_install(tty_port*, tty_driver*, tty_struct*)'
  [A] 'function int tty_prepare_flip_string(tty_port*, unsigned char**, size_t)'
  [A] 'function void* typec_switch_get_drvdata(typec_switch*)'
  [A] 'function typec_switch* typec_switch_register(device*, const typec_switch_desc*)'
  [A] 'function void typec_switch_unregister(typec_switch*)'
  [A] 'function void uart_get_rs485_mode(device*, serial_rs485*)'
  [A] 'function v4l2_async_subdev* v4l2_async_notifier_add_fwnode_subdev(v4l2_async_notifier*, fwnode_handle*, unsigned int)'
  [A] 'function int v4l2_async_notifier_add_subdev(v4l2_async_notifier*, v4l2_async_subdev*)'
  [A] 'function void v4l2_async_notifier_cleanup(v4l2_async_notifier*)'
  [A] 'function void v4l2_async_notifier_init(v4l2_async_notifier*)'
  [A] 'function int v4l2_async_notifier_register(v4l2_device*, v4l2_async_notifier*)'
  [A] 'function void v4l2_async_notifier_unregister(v4l2_async_notifier*)'
  [A] 'function int v4l2_async_register_subdev(v4l2_subdev*)'
  [A] 'function int v4l2_async_subdev_notifier_register(v4l2_subdev*, v4l2_async_notifier*)'
  [A] 'function void v4l2_async_unregister_subdev(v4l2_subdev*)'
  [A] 'function void v4l2_ctrl_auto_cluster(unsigned int, v4l2_ctrl**, u8, bool)'
  [A] 'function v4l2_ctrl* v4l2_ctrl_new_std_menu_items(v4l2_ctrl_handler*, const v4l2_ctrl_ops*, u32, u8, u64, u8, const char* const*)'
  [A] 'function __poll_t v4l2_ctrl_poll(file*, poll_table_struct*)'
  [A] 'function int v4l2_ctrl_subdev_log_status(v4l2_subdev*)'
  [A] 'function int v4l2_g_parm_cap(video_device*, v4l2_subdev*, v4l2_streamparm*)'
  [A] 'function int v4l2_s_parm_cap(video_device*, v4l2_subdev*, v4l2_streamparm*)'
  [A] 'function int vm_munmap(unsigned long int, unsigned long int)'

5 Added variables:

  [A] 'const clk_ops clk_divider_ops'
  [A] 'const clk_ops clk_fractional_divider_ops'
  [A] 'const clk_ops clk_gate_ops'
  [A] 'const clk_ops clk_mux_ops'
  [A] 'unsigned int hrtimer_resolution'

Bug: 159736148
Signed-off-by: Jindong Yue <jindong.yue@nxp.com>
Change-Id: Icf5ee355ae27eef5f3bf32cc5bbfed3a33ce7152
2021-03-10 20:18:36 +00:00
Frankie.Chang
c6c9823ce8 BACKPORT: binder: move structs from core file to header file
Moving all structs to header file makes module more
extendable, and makes all these structs to be defined
in the same file.

Signed-off-by: Frankie.Chang <Frankie.Chang@mediatek.com>
Acked-by: Todd Kjos <tkjos@google.com>
Link: https://lore.kernel.org/r/1605063764-12930-2-git-send-email-Frankie.Chang@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 182234755
Change-Id: Ifd9c159195011e9311a5dda6e15f102b584d4b5a
(cherry picked from commit 1987f112f1425cba2671d878f6952087e9456a0a)
Signed-off-by: Frankie Chang <frankie.chang@mediatek.com>
(cherry picked from commit a9c29b897d9ed7cec7f11c59f1035c96c09f4b96)
2021-03-10 01:58:04 +00:00
Woogeun Lee
5d7dfa34c6 ANDROID: ABI: update allowed list for galaxy
Leaf changes summary: 31 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 31 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

31 Added functions:

  [A] 'function void* __alloc_percpu_gfp(size_t, size_t, gfp_t)'
  [A] 'function int __sbitmap_queue_get(sbitmap_queue*)'
  [A] 'function bool blk_mq_bio_list_merge(request_queue*, list_head*, bio*, unsigned int)'
  [A] 'function bool blk_mq_run_hw_queue(blk_mq_hw_ctx*, bool)'
  [A] 'function void blk_mq_sched_mark_restart_hctx(blk_mq_hw_ctx*)'
  [A] 'function void blk_mq_sched_request_inserted(request*)'
  [A] 'function bool blk_mq_sched_try_insert_merge(request_queue*, request*)'
  [A] 'function bool blk_mq_sched_try_merge(request_queue*, bio*, unsigned int, request**)'
  [A] 'function void blk_stat_enable_accounting(request_queue*)'
  [A] 'function elevator_queue* elevator_alloc(request_queue*, elevator_type*)'
  [A] 'function bool elv_bio_merge_ok(request*, bio*)'
  [A] 'function void elv_rb_add(rb_root*, request*)'
  [A] 'function void elv_rb_del(rb_root*, request*)'
  [A] 'function request* elv_rb_find(rb_root*, long long unsigned int)'
  [A] 'function request* elv_rb_former_request(request_queue*, request*)'
  [A] 'function request* elv_rb_latter_request(request_queue*, request*)'
  [A] 'function int elv_register(elevator_type*)'
  [A] 'function void elv_rqhash_add(request_queue*, request*)'
  [A] 'function void elv_rqhash_del(request_queue*, request*)'
  [A] 'function void elv_unregister(elevator_type*)'
  [A] 'function io_cq* ioc_lookup_icq(io_context*, request_queue*)'
  [A] 'function cgroup_subsys_state* kthread_blkcg()'
  [A] 'function void sbitmap_add_wait_queue(sbitmap_queue*, sbq_wait_state*, sbq_wait*)'
  [A] 'function bool sbitmap_any_bit_set(const sbitmap*)'
  [A] 'function void sbitmap_del_wait_queue(sbq_wait*)'
  [A] 'function int sbitmap_init_node(sbitmap*, unsigned int, int, unsigned int, int)'
  [A] 'function void sbitmap_queue_clear(sbitmap_queue*, unsigned int, unsigned int)'
  [A] 'function int sbitmap_queue_init_node(sbitmap_queue*, unsigned int, int, bool, unsigned int, int)'
  [A] 'function void sbitmap_queue_min_shallow_depth(sbitmap_queue*, unsigned int)'
  [A] 'function void sbitmap_queue_resize(sbitmap_queue*, unsigned int)'
  [A] 'function int timer_reduce(timer_list*, unsigned long int)'

Bug: 182221332

Change-Id: Iff73dcf495c3c138dc8009d941a5990291fc636d
Signed-off-by: Woogeun Lee <woogeun.lee@samsung.com>
Signed-off-by: Giuliano Procida <gprocida@google.com>
2021-03-09 22:19:26 +00:00
Frankie Chang
7285ca6e97 ANDROID: Add vendor hooks when syscall prctl finished
Add vendor hook when syscall prctl finished for vendor-specific tuning.

Bug: 181819699

Signed-off-by: Frankie Chang <frankie.chang@mediatek.com>
Change-Id: Ica42d80ab4b540045330e9c5b211e0e814eed0ff
(cherry picked from commit 6904f0001e4ec3c637539c18969e46755eaa01f4)
2021-03-09 21:57:07 +00:00
Frankie Chang
4b22a63233 ANDROID: cgroup: Add vendor hook to the cgroup
Add a vendor hook after attaching a task to a cgroup to 
recognize the group_id for performance tuning

Bug: 181917687

Signed-off-by: Frankie Chang <frankie.chang@mediatek.com>
Change-Id: I603afa3d893dd575a7dcb97f83bd9eacb8315bab
(cherry picked from commit bed1e2a75b0000d99a00177272b93e5c8430308b)
2021-03-09 21:56:56 +00:00
Elliot Berman
47c864ead1 ANDROID: db845c: Use FRAGMENT_CONFIG
./build/config.sh provides Kbuild's configuration editor in kernel/build
environment, plus support for editing config fragments. Set
FRAGMENT_CONFIG for ./build/config.sh.

Bug: 169398826
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
[jstultz: Dropped sorting the config fragment]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: Id09967bb06d0652788d17373ade2619a310c9e87
2021-03-08 19:14:48 +00:00
John Stultz
c037b5c852 ANDROID: abi_gki_aarch64_db845c: Update symbols for boot regression
Commit 28688d32ed ("ANDROID: Incremental fs: Set credentials
before reading/writing") changed the symbols needed to boot,
so update the db845c symbols list

Generated with:
  BUILD_CONFIG=common/build.config.db845c build/build_abi.sh -s
  BUILD_CONFIG=common/build.config.gki.aarch64 build/build_abi.sh -u

Leaf changes summary: 1 artifact changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

1 Added function:

  [A] 'function void revert_creds(const cred*)'

Fixes: 28688d32ed ("ANDROID: Incremental fs: Set credentials before reading/writing")
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: Ie077311af0cbc6f6cd302b0b870833286685f565
2021-03-08 19:14:48 +00:00
Frankie Chang
66da798d24 ANDROID: sched: move vendor hook to check scheduling nice value
move hook to collect scheduling information and apply vendor's
tuning before task's scheduling priority is changed

Bug: 163431711

Signed-off-by: Frankie Chang <frankie.chang@mediatek.com>
Change-Id: I61a7ab663316c0fbcb28d1b6e523649a6374b492
(cherry picked from commit 5cf5bc7523bd5608590de487de896c1026161a18)
2021-03-08 09:31:36 +00:00
Greg Kroah-Hartman
32ff5fbcab ANDROID: GKI: bring back icmpv6_send
In 5.4.102 the icmpv6_send() was replaced with an inline function.
Bring it back to provide for modules that used this symbol to preserve
the ABI.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Id1a914518f6e850f6bb96b5449c15eda3a7a7fd8
2021-03-05 06:50:46 +01:00
Jason A. Donenfeld
797bd53ae8 UPSTREAM: net: icmp: pass zeroed opts from icmp{,v6}_ndo_send before sending
commit ee576c47db60432c37e54b1e2b43a8ca6d3a8dca upstream.

The icmp{,v6}_send functions make all sorts of use of skb->cb, casting
it with IPCB or IP6CB, assuming the skb to have come directly from the
inet layer. But when the packet comes from the ndo layer, especially
when forwarded, there's no telling what might be in skb->cb at that
point. As a result, the icmp sending code risks reading bogus memory
contents, which can result in nasty stack overflows such as this one
reported by a user:

    panic+0x108/0x2ea
    __stack_chk_fail+0x14/0x20
    __icmp_send+0x5bd/0x5c0
    icmp_ndo_send+0x148/0x160

In icmp_send, skb->cb is cast with IPCB and an ip_options struct is read
from it. The optlen parameter there is of particular note, as it can
induce writes beyond bounds. There are quite a few ways that can happen
in __ip_options_echo. For example:

    // sptr/skb are attacker-controlled skb bytes
    sptr = skb_network_header(skb);
    // dptr/dopt points to stack memory allocated by __icmp_send
    dptr = dopt->__data;
    // sopt is the corrupt skb->cb in question
    if (sopt->rr) {
        optlen  = sptr[sopt->rr+1]; // corrupt skb->cb + skb->data
        soffset = sptr[sopt->rr+2]; // corrupt skb->cb + skb->data
	// this now writes potentially attacker-controlled data, over
	// flowing the stack:
        memcpy(dptr, sptr+sopt->rr, optlen);
    }

In the icmpv6_send case, the story is similar, but not as dire, as only
IP6CB(skb)->iif and IP6CB(skb)->dsthao are used. The dsthao case is
worse than the iif case, but it is passed to ipv6_find_tlv, which does
a bit of bounds checking on the value.

This is easy to simulate by doing a `memset(skb->cb, 0x41,
sizeof(skb->cb));` before calling icmp{,v6}_ndo_send, and it's only by
good fortune and the rarity of icmp sending from that context that we've
avoided reports like this until now. For example, in KASAN:

    BUG: KASAN: stack-out-of-bounds in __ip_options_echo+0xa0e/0x12b0
    Write of size 38 at addr ffff888006f1f80e by task ping/89
    CPU: 2 PID: 89 Comm: ping Not tainted 5.10.0-rc7-debug+ #5
    Call Trace:
     dump_stack+0x9a/0xcc
     print_address_description.constprop.0+0x1a/0x160
     __kasan_report.cold+0x20/0x38
     kasan_report+0x32/0x40
     check_memory_region+0x145/0x1a0
     memcpy+0x39/0x60
     __ip_options_echo+0xa0e/0x12b0
     __icmp_send+0x744/0x1700

Actually, out of the 4 drivers that do this, only gtp zeroed the cb for
the v4 case, while the rest did not. So this commit actually removes the
gtp-specific zeroing, while putting the code where it belongs in the
shared infrastructure of icmp{,v6}_ndo_send.

This commit fixes the issue by passing an empty IPCB or IP6CB along to
the functions that actually do the work. For the icmp_send, this was
already trivial, thanks to __icmp_send providing the plumbing function.
For icmpv6_send, this required a tiny bit of refactoring to make it
behave like the v4 case, after which it was straight forward.

Fixes: a2b78e9b2c ("sunvnet: generate ICMP PTMUD messages for smaller port MTUs")
Reported-by: SinYu <liuxyon@gmail.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/netdev/CAF=yD-LOF116aHub6RMe8vB8ZpnrrnoTdqhobEx+bvoA8AsP0w@mail.gmail.com/T/
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Link: https://lore.kernel.org/r/20210223131858.72082-1-Jason@zx2c4.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 9875cb3c09)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5ca6554f162b3d64d2c4aad80c3382089b2438a4
2021-03-05 06:50:46 +01:00
Leon Romanovsky
899bfe24dc UPSTREAM: ipv6: silence compilation warning for non-IPV6 builds
commit 1faba27f11c8da244e793546a1b35a9b1da8208e upstream.

The W=1 compilation of allmodconfig generates the following warning:

net/ipv6/icmp.c:448:6: warning: no previous prototype for 'icmp6_send' [-Wmissing-prototypes]
  448 | void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info,
      |      ^~~~~~~~~~

Fix it by providing function declaration for builds with ipv6 as a module.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 354fb7244f)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2d4f57e63640c18bf93c103da0a3b72c67152ed6
2021-03-05 06:50:46 +01:00
Eric Dumazet
f1c0684934 UPSTREAM: ipv6: icmp6: avoid indirect call for icmpv6_send()
commit cc7a21b6fbd945f8d8f61422ccd27203c1fafeb7 upstream.

If IPv6 is builtin, we do not need an expensive indirect call
to reach icmp6_send().

v2: put inline keyword before the type to avoid sparse warnings.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit e528edf1e5)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0d19f581c6360b4317e6934972845f6a39203de5
2021-03-05 06:50:46 +01:00
Jason A. Donenfeld
0682eb7280 UPSTREAM: xfrm: interface: use icmp_ndo_send helper
commit 45942ba890e6f35232727a5fa33d732681f4eb9f upstream.

Because xfrmi is calling icmp from network device context, it should use
the ndo helper so that the rate limiting applies correctly.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c30e93eee3)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I404cf4d493272eefd88c28b65712bca5f5e12744
2021-03-05 06:50:46 +01:00
Jason A. Donenfeld
fb836b54d0 UPSTREAM: sunvnet: use icmp_ndo_send helper
commit 67c9a7e1e3ac491b5df018803639addc36f154ba upstream.

Because sunvnet is calling icmp from network device context, it should use
the ndo helper so that the rate limiting applies correctly. While we're
at it, doing the additional route lookup before calling icmp_ndo_send is
superfluous, since this is the job of the icmp code in the first place.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit e1ec06b833)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia0ae7b14d4785c83547824563edb019c30cda79f
2021-03-05 06:50:46 +01:00
Jason A. Donenfeld
17060ca408 UPSTREAM: gtp: use icmp_ndo_send helper
commit e0fce6f945a26d4e953a147fe7ca11410322c9fe upstream.

Because gtp is calling icmp from network device context, it should use
the ndo helper so that the rate limiting applies correctly.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: Harald Welte <laforge@gnumonks.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit d8d268ce1a)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I87cecb7368e63ad10a3a6a43d990797997019f92
2021-03-05 06:50:46 +01:00