Commit Graph

1056268 Commits

Author SHA1 Message Date
Youngmin Nam f7ead06213 ANDROID: GKI: Update symbol list for Exynos SoC
We only added "stack_trace_save_tsk" to exynos symbol list which already
exist in main KMI.

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

Bug: 238823970
Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
Change-Id: I64a771610459c3c840d21085a41b5b09aebbbccd
2022-07-14 14:15:40 +00:00
Zhuguangqing 254fb1f403 ANDROID: Add vendor hooks for binder perf tuning
Add vendor hook to get the binder message for vendor-specific power and
performance tuning.

Bug: 182496370
Bug: 235925535

Signed-off-by: Zhuguangqing <zhuguangqing@xiaomi.com>
Change-Id: Id47e59c4e3ccd07b26eef758ada147b98cd1964e
(cherry picked from commit 301e89472f3e00a2f02f1967d77efd051ada37f5)
Signed-off-by: heshuai1 <heshuai1@xiaomi.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
[ cmllamas: don't export complete private definition struct binder_alloc
  in vendor hooks, instead just pass member alloc->free_async_space as
  implemented by heshuai1 and squashed here ]
2022-07-12 21:20:26 +00:00
David Collins d559034f20 FROMLIST: spmi: trace: fix stack-out-of-bound access in SPMI tracing functions
trace_spmi_write_begin() and trace_spmi_read_end() both call
memcpy() with a length of "len + 1".  This leads to one extra
byte being read beyond the end of the specified buffer.  Fix
this out-of-bound memory access by using a length of "len"
instead.

Here is a KASAN log showing the issue:

BUG: KASAN: stack-out-of-bounds in trace_event_raw_event_spmi_read_end+0x1d0/0x234
Read of size 2 at addr ffffffc0265b7540 by task thermal@2.0-ser/1314
...
Call trace:
 dump_backtrace+0x0/0x3e8
 show_stack+0x2c/0x3c
 dump_stack_lvl+0xdc/0x11c
 print_address_description+0x74/0x384
 kasan_report+0x188/0x268
 kasan_check_range+0x270/0x2b0
 memcpy+0x90/0xe8
 trace_event_raw_event_spmi_read_end+0x1d0/0x234
 spmi_read_cmd+0x294/0x3ac
 spmi_ext_register_readl+0x84/0x9c
 regmap_spmi_ext_read+0x144/0x1b0 [regmap_spmi]
 _regmap_raw_read+0x40c/0x754
 regmap_raw_read+0x3a0/0x514
 regmap_bulk_read+0x418/0x494
 adc5_gen3_poll_wait_hs+0xe8/0x1e0 [qcom_spmi_adc5_gen3]
 ...
 __arm64_sys_read+0x4c/0x60
 invoke_syscall+0x80/0x218
 el0_svc_common+0xec/0x1c8
 ...

addr ffffffc0265b7540 is located in stack of task thermal@2.0-ser/1314 at offset 32 in frame:
 adc5_gen3_poll_wait_hs+0x0/0x1e0 [qcom_spmi_adc5_gen3]

this frame has 1 object:
 [32, 33) 'status'

Memory state around the buggy address:
 ffffffc0265b7400: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
 ffffffc0265b7480: 04 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
>ffffffc0265b7500: 00 00 00 00 f1 f1 f1 f1 01 f3 f3 f3 00 00 00 00
                                           ^
 ffffffc0265b7580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffffc0265b7600: f1 f1 f1 f1 01 f2 07 f2 f2 f2 01 f3 00 00 00 00
==================================================================

Bug: 238461606
Link: https://lore.kernel.org/lkml/20220627235512.2272783-1-quic_collinsd@quicinc.com/
Fixes: a9fce37481 ("spmi: add command tracepoints for SPMI")
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: David Collins <quic_collinsd@quicinc.com>
Change-Id: Ibd6767db2bd92118e30be27464005dff8aa5467e
2022-07-11 23:22:13 +00:00
Darshana Patil 409a652434 ANDROID: GKI: Update abi_gki_aarch64_qcom for best fit algo
Add iommu_dma_enable_best_fit_algo symbol.

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 int iommu_dma_enable_best_fit_algo(device*)'

Bug: 238414450
Change-Id: If5f832de3055baf61a828dba20827ce387489839
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-07-08 15:37:53 -07:00
Li Li ed6b498587 FROMGIT: Binder: add TF_UPDATE_TXN to replace outdated txn
When the target process is busy, incoming oneway transactions are
queued in the async_todo list. If the clients continue sending extra
oneway transactions while the target process is frozen, this queue can
become too large to accommodate new transactions. That's why binder
driver introduced ONEWAY_SPAM_DETECTION to detect this situation. It's
helpful to debug the async binder buffer exhausting issue, but the
issue itself isn't solved directly.

In real cases applications are designed to send oneway transactions
repeatedly, delivering updated inforamtion to the target process.
Typical examples are Wi-Fi signal strength and some real time sensor
data. Even if the apps might only care about the lastet information,
all outdated oneway transactions are still accumulated there until the
frozen process is thawed later. For this kind of situations, there's
no existing method to skip those outdated transactions and deliver the
latest one only.

This patch introduces a new transaction flag TF_UPDATE_TXN. To use it,
use apps can set this new flag along with TF_ONE_WAY. When such an
oneway transaction is to be queued into the async_todo list of a frozen
process, binder driver will check if any previous pending transactions
can be superseded by comparing their code, flags and target node. If
such an outdated pending transaction is found, the latest transaction
will supersede that outdated one. This effectively prevents the async
binder buffer running out and saves unnecessary binder read workloads.

Acked-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Li Li <dualli@google.com>
Link: https://lore.kernel.org/r/20220526220018.3334775-2-dualli@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 231624308
Test: manually check async binder buffer size of frozen apps
Test: stress test with kernel 4.14/4.19/5.10/5.15
(cherry picked from commit 9864bb4801331daa48514face9d0f4861e4d485b
 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
  char-misc-next)
Change-Id: I1c4bff1eda1ca15aaaad5bf696c8fc00be743176
2022-07-08 17:51:55 +00:00
xieliujie b4c3d5d118 ANDROID: GKI: Update symbols to symbol list
Update symbols to symbol list externed by oem modules.

Leaf changes summary: 14 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 8 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 6 Added variables

8 Added functions:

  [A] 'function int __traceiter_sched_stat_blocked(void*, task_struct*, u64)'
  [A] 'function int __traceiter_sched_stat_iowait(void*, task_struct*, u64)'
  [A] 'function int __traceiter_sched_stat_sleep(void*, task_struct*, u64)'
  [A] 'function int __traceiter_sched_stat_wait(void*, task_struct*, u64)'
  [A] 'function int __traceiter_sched_waking(void*, task_struct*)'
  [A] 'function int __traceiter_task_rename(void*, task_struct*, const char*)'
  [A] 'function unsigned long int get_wchan(task_struct*)'
  [A] 'function void wq_worker_comm(char*, size_t, task_struct*)'

6 Added variables:

  [A] 'tracepoint __tracepoint_sched_stat_blocked'
  [A] 'tracepoint __tracepoint_sched_stat_iowait'
  [A] 'tracepoint __tracepoint_sched_stat_sleep'
  [A] 'tracepoint __tracepoint_sched_stat_wait'
  [A] 'tracepoint __tracepoint_sched_waking'
  [A] 'tracepoint __tracepoint_task_rename'

Bug: 193384408

Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: I9bc192dc53fcedfc662d165150ac8d71c64de0e0
2022-07-08 17:58:44 +08:00
Wei Liu d79ff7f931 ANDROID: GKI: Update symbols to symbol list
Update symbols to symbol list externed by oppo network group.

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

8 Added functions:

  [A] 'function sock* __inet6_lookup_established(net*, inet_hashinfo*, const in6_addr*, const __be16, const in6_addr*, const u16, const int, const int)'
  [A] 'function sock* __inet_lookup_established(net*, inet_hashinfo*, const __be32, const __be16, const __be32, const u16, const int, const int)'
  [A] 'function __sum16 __skb_checksum_complete(sk_buff*)'
  [A] 'function int ip6_route_me_harder(net*, sock*, sk_buff*)'
  [A] 'function int ip_route_me_harder(net*, sock*, sk_buff*, unsigned int)'
  [A] 'function void nf_ct_attach(sk_buff*, const sk_buff*)'
  [A] 'function bool nf_ct_delete(nf_conn*, u32, int)'
  [A] 'function void skb_dump(const char*, const sk_buff*, bool)'

1 Added variable:

  [A] 'inet_hashinfo tcp_hashinfo'

Bug: 193384408

Signed-off-by: Wei Liu <liuwei.a@oppo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia7834ad5bed66b98ea9712c9057ab7a046a39bc2
2022-07-07 18:31:21 +00:00
Liangliang Li bba640d1ea ANDROID: mm: add vendor hook for vmpressure
Add vendor hook for bypass vmpressure accounting when doing oem's
custom memory reclaim.

Bug: 191534577

Change-Id: I0c2263e03943596312aa6b01cf8506f2ae87213e
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
(cherry picked from commit 444a0b77522e1fca71ac16848d5da5bd7a27908e)
2022-07-07 18:22:37 +00:00
Greg Kroah-Hartman 8508df8a84 ANDROID: update android/abi_gki_aarch64.xml file
Due to some recent kernel updates, and symbol updates, the .xml file has
gotten out of sync such that any symbol update will cause massive churn
in the .xml file.

Resolve this by merely updateing the .xml file to the state of the
current tree, allowing future changes to be much smaller.

Bug: 193384408
Cc: Giuliano Procida <gprocida@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I063d66fae9e8a1a8cf46b7dd9e66c711252534ce
2022-07-07 14:08:42 +02:00
Yunfei Wang 8a410d778a BACKPORT: iommu/dma: Fix race condition during iova_domain initialization
When many devices share the same iova domain, iommu_dma_init_domain()
may be called at the same time. The checking of iovad->start_pfn will
all get false in iommu_dma_init_domain() and both enter init_iova_domain()
to do iovad initialization.

Fix this by protecting init_iova_domain() with iommu_dma_cookie->mutex.

Exception backtrace:
rb_insert_color(param1=0xFFFFFF80CD2BDB40, param3=1) + 64
init_iova_domain() + 180
iommu_setup_dma_ops() + 260
arch_setup_dma_ops() + 132
of_dma_configure_id() + 468
platform_dma_configure() + 32
really_probe() + 1168
driver_probe_device() + 268
__device_attach_driver() + 524
__device_attach() + 524
bus_probe_device() + 64
deferred_probe_work_func() + 260
process_one_work() + 580
worker_thread() + 1076
kthread() + 332
ret_from_fork() + 16

Signed-off-by: Ning Li <ning.li@mediatek.com>
Signed-off-by: Yunfei Wang <yf.wang@mediatek.com>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Miles Chen <miles.chen@mediatek.com>
Link: https://lore.kernel.org/r/20220530120748.31733-1-yf.wang@mediatek.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>

Bug: 236922015
(cherry picked from commit ac9a5d522bb80be50ea84965699e1c8257d745ce
 https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git core)
[Yunfei: Embed iommu_dma_cookie into iommu_dma_cookie_ext to avoid
 changing struct iommu_dma_cookie]
Signed-off-by: Yunfei Wang <yf.wang@mediatek.com>
Change-Id: I9b7931bea912837f17d2322713ba68a37122499d
2022-07-07 02:25:07 +00:00
Aloka Dixit 4266791c6f UPSTREAM: wifi: nl80211: retrieve EHT related elements in AP mode
Add support to retrieve EHT capabilities and EHT operation elements
passed by the userspace in the beacon template and store the pointers
in struct cfg80211_ap_settings to be used by the drivers.

Co-developed-by: Vikram Kandukuri <quic_vikram@quicinc.com>
Signed-off-by: Vikram Kandukuri <quic_vikram@quicinc.com>
Co-developed-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
Link: https://lore.kernel.org/r/20220523064904.28523-1-quic_alokad@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 238103864
Change-Id: If5998e279b39136a6f9b24a9ceedbc0248fe7810
(cherry picked from commit 8bc65d38ee466897a264c9e336fe21058818b1b1)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-07-07 02:12:53 +00:00
Johannes Berg a52f88e542 UPSTREAM: wifi: cfg80211: remove chandef check in cfg80211_cac_event()
The current check only worked for AP mode, but we can do
radar detection in mesh as well (for example). We could
try to check this using wdev_chandef(), but we also don't
really care since the chandef is passed in and we have no
need to use it anymore (since we added the argument in
commit d2859df5e7 ("cfg80211/mac80211: DFS setup chandef
for cac event")).

Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 238103864
Change-Id: I856e4344d5e64ff4d2eead0b4c53b11f264be9b8
(cherry picked from commit d6f671c8a339d5b655acfacb8be6918c744fbabf)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-07-07 02:12:53 +00:00
Johannes Berg 932fdaab49 UPSTREAM: wifi: nl80211: relax wdev mutex check in wdev_chandef()
In many cases we might get here from driver code that's
not really set up to care about the locking, and for the
non-MLO cases we really don't care so much about it. So
relax the checking here for now, perhaps we should even
remove it completely since we might not really care if
we point to an invalid link's chandef and can require
the caller to check the link validity first.

Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 238103864
Change-Id: I75a713b503b1c89834c9264360d0002f3f060508
(cherry picked from commit 31177127e067eb73d5ca46ce32a410e41333d42f)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-07-07 02:12:53 +00:00
Johannes Berg cd3a4ce1b5 UPSTREAM: wifi: nl80211: acquire wdev mutex earlier in start_ap
We need to hold the wdev mutex already in order to call
nl80211_parse_tx_bitrate_mask(), so acquire it earlier.

Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 238103864
Change-Id: I9fad6b8a0efbc388fb59dfc92e5a8daa948bde0d
(cherry picked from commit c2653990d5729a445296d6d04395be5dea8e282e)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-07-07 02:12:53 +00:00
Johannes Berg 2551bf276f UPSTREAM: wifi: nl80211: hold wdev mutex for tid config
We need wdev_chandef() in this code, which now requires
the wdev mutex due to the per-link nature. Hold it here
to make sure we can access the link.

Reported-by: syzbot+b4e9aa0f32ffd9902442@syzkaller.appspotmail.com
Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 238103864
Change-Id: I27127159c6b4e35799e111cbee3f01bb5e60231a
(cherry picked from commit 206bbcf76121664e95a42e1c014c3fe168d07a3d)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-07-07 02:12:53 +00:00
Johannes Berg c499132b70 UPSTREAM: wifi: cfg80211: handle IBSS in channel switch
Prior to commit 7b0a0e3c3a88 ("wifi: cfg80211: do some
rework towards MLO link APIs") the interface type didn't
really matter here, but now we need to handle all of the
possible cases. Add IBSS ("ADHOC") and handle it.

Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs")
Reported-by: syzbot+90d912872157e63589e4@syzkaller.appspotmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 238103864
Change-Id: I0ba10a060de3a9f94719dedc5525373bf38cb93f
(cherry picked from commit 77e7b6ba78edf817bddfa97fadb15a971992b1ee)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-07-07 02:12:53 +00:00
Johannes Berg 32e62e4dc9 UPSTREAM: wifi: cfg80211: remove redundant documentation
These struct members no longer exist, remove them
from documentation.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 238103864
Change-Id: I36c2f56679916384dbc4252e03d54a83e1d0517e
(cherry picked from commit c8a9415e6ddef98a948f8c30d9ec2e749c0ccd9d)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-07-07 02:12:53 +00:00
Mauro Carvalho Chehab fafb6a10de UPSTREAM: wifi: cfg80211: fix kernel-doc warnings all over the file
There are currently 17 kernel-doc warnings on this file:
	include/net/cfg80211.h:391: warning: Function parameter or member 'bw' not described in 'ieee80211_eht_mcs_nss_supp'
	include/net/cfg80211.h:437: warning: Function parameter or member 'eht_cap' not described in 'ieee80211_sband_iftype_data'
	include/net/cfg80211.h:507: warning: Function parameter or member 's1g' not described in 'ieee80211_sta_s1g_cap'
	include/net/cfg80211.h:1390: warning: Function parameter or member 'counter_offset_beacon' not described in 'cfg80211_color_change_settings'
	include/net/cfg80211.h:1390: warning: Function parameter or member 'counter_offset_presp' not described in 'cfg80211_color_change_settings'
	include/net/cfg80211.h:1430: warning: Enum value 'STATION_PARAM_APPLY_STA_TXPOWER' not described in enum 'station_parameters_apply_mask'
	include/net/cfg80211.h:2195: warning: Function parameter or member 'dot11MeshConnectedToAuthServer' not described in 'mesh_config'
	include/net/cfg80211.h:2341: warning: Function parameter or member 'short_ssid' not described in 'cfg80211_scan_6ghz_params'
	include/net/cfg80211.h:3328: warning: Function parameter or member 'kck_len' not described in 'cfg80211_gtk_rekey_data'
	include/net/cfg80211.h:3698: warning: Function parameter or member 'ftm' not described in 'cfg80211_pmsr_result'
	include/net/cfg80211.h:3828: warning: Function parameter or member 'global_mcast_stypes' not described in 'mgmt_frame_regs'
	include/net/cfg80211.h:4977: warning: Function parameter or member 'ftm' not described in 'cfg80211_pmsr_capabilities'
	include/net/cfg80211.h:5742: warning: Function parameter or member 'u' not described in 'wireless_dev'
	include/net/cfg80211.h:5742: warning: Function parameter or member 'links' not described in 'wireless_dev'
	include/net/cfg80211.h:5742: warning: Function parameter or member 'valid_links' not described in 'wireless_dev'
	include/net/cfg80211.h:6076: warning: Function parameter or member 'is_amsdu' not described in 'ieee80211_data_to_8023_exthdr'
	include/net/cfg80211.h:6949: warning: Function parameter or member 'sig_dbm' not described in 'cfg80211_notify_new_peer_candidate'

Address them, in order to build a better documentation from this
header.

Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Link: https://lore.kernel.org/r/f6f522cdc716a01744bb0eae2186f4592976222b.1656409369.git.mchehab@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 238103864
Change-Id: Idb23aabf8153a45a553dc32bcb469e4c860e62f0
(cherry picked from commit 2d8b08fef0af23aa2fe7f1a1719ac5b11478042f)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-07-07 02:12:53 +00:00
Johannes Berg e2034a4fab UPSTREAM: wifi: nl80211: expose link ID for associated BSSes
When retrieving scan data, expose not just whether or not the
interface (possibly an MLD) is associated to the BSS or not,
but also on which link ID if it is an MLD.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 238103864
Change-Id: I1d66e4f10e2e4ac9829bcd1f3349aada78a99a4b
(cherry picked from commit dd374f84baecd76cbd12fc543c763ff78338d4ad)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-07-07 02:12:53 +00:00
Johannes Berg 3a516bbc6a UPSTREAM: wifi: nl80211: expose link information for interfaces
When getting/dumping an interface, expose information about
valid links.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 238103864
Change-Id: I32a34f870e4f8616775f61bf84ea4bd757d9be0b
(cherry picked from commit ce08cd344a0027076b2f46b9e8988d08f6641252)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-07-07 02:12:53 +00:00
Johannes Berg f6bdf3d697 UPSTREAM: nl80211: fix locking in nl80211_set_tx_bitrate_mask()
This accesses the wdev's chandef etc., so cannot safely
be used without holding the lock.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20220506102136.06b7205419e6.I2a87c05fbd8bc5e565e84d190d4cfd2e92695a90@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 238103864
Change-Id: I767902ba2c7f73a2575816d4b6f501abab50d372
(cherry picked from commit f971e1887fdb3ab500c9bebf4b98f62d49a20655)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-07-07 02:12:53 +00:00
Johannes Berg 32f0d86873 UPSTREAM: nl80211: use RCU to read regdom in reg get/dump
Use RCU here to read the regdomain, this will allow us
to remove the RTNL locking from the setter.

Note in nl80211_get_reg_do() we still need the RTNL to
do the wiphy lookup.

Link: https://lore.kernel.org/r/20220214101820.5d4acbcf2a46.Ibfc91980439862125e983d9adeebaba73fe38e2d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 238103864
Change-Id: I33a5e791848dff6794ff2c53661de0de50447a72
(cherry picked from commit 024fcf5efda73d95394ec7448bc9751e265fb18f)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-07-07 02:12:53 +00:00
Johannes Berg 999c050a53 UPSTREAM: nl80211: use element finding functions
The element finding functions are safer, so use them
instead of the "find_ie" functions.

Link: https://lore.kernel.org/r/20210930131130.b838f139cc8e.I2b641262d3fc6e0d498719bf343fdc1c0833b845@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 238103864
Change-Id: I94a51200dee470cc329783cf73fd217cecabb543
(cherry picked from commit 153e2a11c99b7382597614ddb995618c22aa1b5f)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-07-07 02:12:53 +00:00
Veerendranath Jakkam 4238cf1087 ANDROID: nl80211: bring delta changes from final upstream MLO commits
This commit brings in delta changes merged in final upstream commits of
backport commits merged with b/233387627.

Update netlink attributes order to be in sync with final changes. Since
the changes are upstream replace corresponding reserved attributes with
actual attributes. Also, add missing changes from upstream commits.

Fixes:
- af34adaa6a ("BACKPORT: FROMLIST: cfg80211: Increase akm_suites array size in cfg80211_crypto_settings")
- d975927513 ("BACKPORT: FROMGIT: wifi: cfg80211: do some rework towards MLO link APIs")
- 3f048cd911 ("BACKPORT: FROMGIT: wifi: nl80211: support MLO in auth/assoc")
- 6abf3c5ef2 ("BACKPORT: FROMLIST: cfg80211: Indicate MLO connection info in connect and roam callbacks")

Corresponding upstream commits:
- ecad3b0b99bf ("wifi: cfg80211: Increase akm_suites array size in cfg80211_crypto_settings")
- 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs")
- d648c23024bd ("wifi: nl80211: support MLO in auth/assoc")
- efbabc116500 ("cfg80211: Indicate MLO connection info in connect and roam callbacks")

Bug: 238103864
Change-Id: I160f11a150cd275105fb7261b4facb468aa04325
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-07-07 02:12:53 +00:00
Lecopzer Chen 885990cd85 BACKPORT: module: show disallowed symbol name for inherit_taint()
The error log for inherit_taint() doesn't really help to find the
symbol which violates GPL rules.

For example,
if a module has 300 symbol and includes 50 disallowed symbols,
the log only shows the content below and we have no idea what symbol is.
    AAA: module using GPL-only symbols uses symbols from proprietary module BBB.

It's hard for user who doesn't really know how the symbol was parsing.

This patch add symbol name to tell the offending symbols explicitly.
    AAA: module using GPL-only symbols uses symbols SSS from proprietary module BBB.

Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>

Bug: 237738770
(cherry picked from commit 8eac910a49347821cbafc770a319e00ccd69d58b)
[lecopzer: change file from kernel/module/main.c to kernel/module.c]
Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
Change-Id: I9d7f8f68ffaf8670cc47c597404b5a8f0110b42d
2022-07-06 20:25:01 +00:00
xieliujie 709679142d ANDROID: vendor_hooks: Add hooks for signal
Add hook to boost thread when process killed.

Bug: 237749933
Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: I7cc6f248397021f3a8271433144a0e582ed27cfa
2022-07-05 19:37:46 +00:00
Chetan C R 28dfafa8b2 ANDROID: GKI: Add Alarm and Iio to API list
Add alarm_expires_remaining, iio_channel_get,
iio_channel_release and regulator_get_drvdata symbols
to API list

Bug: 237981128
Change-Id: Idbc74019fed82dbb388e38517145491ac240e5de
Signed-off-by: Chetan C R <quic_cchinnad@quicinc.com>
2022-07-05 16:40:31 +00:00
Youngmin Nam 3c0674ae4a ANDROID: GKI: Update symbol list for Exynos SoC
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 __traceiter_android_rvh_do_sched_yield(void*, rq*)'
  [A] 'function int __traceiter_android_rvh_flush_task(void*, task_struct*)'
  [A] 'function int __traceiter_android_vh_binder_wakeup_ilocked(void*, task_struct*, bool, binder_proc*)'
  [A] 'function int __traceiter_binder_transaction_received(void*, binder_transaction*)'
  [A] 'function void drm_mode_sort(list_head*)'

Bug: 237959613
Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
Change-Id: I125ee9608ca8b382155b2347106d61a1f8e7c440
2022-07-04 13:44:24 +00:00
Vincent Donnefort 148e21d8f2 ANDROID: KVM: arm64: Free shadow data vCPUs memcache
In protected mode, shadow VM structures are created at EL2. They include
shadow vCPUs and their memcache where some pages donated by the host might
be temporarily stored. They need to be freed on VM teardown to not get
lost. Pages found there have not been used for anything by the hypervisor.
Clearing is therefore not necessary.

Bug: 237506543
Change-Id: Ic37d794ac33e9f844fa6ae1b4943febcdad5b033
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
2022-07-04 09:47:13 +00:00
zhangchuang3 8db214e1e2 ANDROID: binder: Export binder_txn_latency_free trace point
We use ANDROID_VENDOR_DATA to point to our custom data structure, we need to free it by binder_txn_latency_free

Bug: 235773151

Signed-off-by: zhangchuang3 <zhangchuang3@xiaomi.com>
Change-Id: Ib6e9af5e52e13a658555908ac46d4b13904b1d0c
2022-07-01 17:49:00 +00:00
Lecopzer Chen 8dc8b94eac ANDROID: Update mtktv symbol list
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 serial8250_rpm_put_tx(uart_8250_port*)'

Bug: 237728433
Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
Change-Id: I943decaa9f2fd02fd6e0664493bb2ddbda5bcf3a
2022-07-01 17:46:59 +00:00
Prashanth K 5ab37a1c7c FROMGIT: usb: common: usb-conn-gpio: Allow wakeup from system suspend
Currently the VBUS/ID detection interrupts are disabled during system
suspend. So the USB cable connect/disconnect event can't wakeup the
system from low power mode. To allow this, we keep these interrupts
enabled and configure them as wakeup capable. This behavior can be
controlled through device wakeup source policy by the user space.
This was tested and verified on a target.

(cherry picked from commit 7afe69ad9221a77dc782b81f49cd7f99987740ed https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ usb-next)

Bug: 234808630
Link: https://lore.kernel.org/r/1653634146-12215-1-git-send-email-quic_prashk@quicinc.com
Signed-off-by: Prashanth K <quic_prashk@quicinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: I8767f91aa78805984856334821072e0c7986eea0
(cherry picked from commit 564ba930506ef0035eaecfbae96849512ef7eeb1)
2022-07-01 08:52:55 +00:00
Liujie Xie d26c0e1c40 ANDROID: vendor_hooks: Add hooks to select binder worklist
trace_android_vh_binder_proc_transaction_entry:
We need change binder thread so that this work can be added in
proc->todo, if we found the binder thread, skip native logic.

trace_android_vh_binder_select_worklist_ilocked:
we need this because we can't change list point in ”trace_android_vh_binder_thread_read“,
otherwise, If a work has beed added in our own defined list before,
current may goto retry and loop again and again.

Bug: 219898723
Change-Id: Ifdb3429c9ddac521bc75c1d21740ee7cc4b8f143
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
(cherry picked from commit acefa91e517b9321295429d3a0e534908e2939c1)
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2022-07-01 04:44:24 +00:00
Liujie Xie d4528a28cb ANDROID: vendor_hooks: Add hooks for rwsem and mutex
Add hooks to apply oem's optimization of rwsem and mutex

Bug: 182237112
Signed-off-by: xieliujie <xieliujie@oppo.com>
(cherry picked from commit 80b4341d0520dce2ef1e33aef06c6a2bc8ada518)

Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: I36895c432e5b6d6bff8781b4a7872badb693284c
Signed-off-by: Carlos Llamas <cmllamas@google.com>
[cmllamas: completes the cherry-pick of original commit 80b4341d0520
since commit 0902cc73b7 was only partial]
2022-07-01 04:44:24 +00:00
Liujie Xie 944f06e3e0 ANDROID: vendor_hooks: Add hooks for futex
We want to use this hook to record the sleeping time due to Futex

Bug: 210947226

Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: I637f889dce42937116d10979e0c40fddf96cd1a2
(cherry picked from commit a7ab784f601a93a78c1c22cd0aacc2af64d8e3c8)
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2022-07-01 04:44:24 +00:00
Liujie Xie b7a1174cc5 ANDROID: vendor_hooks: Add hooks to record the time of the process in various states
These hooks will do the following works:
a) record the time of the process in various states
b) Make corresponding optimization strategies in different hooks

Bug: 205938967

Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: Ia3c47bbf0aadd17337ce18fd910343b1b8c3ef93
(cherry picked from commit a61d61bab7c3d221d5d2250eacab2e4e9f59b252)
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2022-07-01 04:44:24 +00:00
lixiang 49e728c82c ANDROID: GKI: Update abi_gki_aarch64_qcom for page_is_ram
Add page_is_ram symbol.

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 int page_is_ram(unsigned long int)'

Bug: 237600221
Change-Id: I0fd38f8c1a4ef6ca792324caebbde313bb79b000
Signed-off-by: lixiang <quic_lixian@quicinc.com>
2022-06-30 17:08:35 +00:00
Chun-Hung Wu 825851ec5d ANDROID: Update symbol list for mtk
Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 2 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

2 Added functions:

  [A] 'function int mmc_get_ext_csd(mmc_card*, u8**)'
  [A] 'function int ufshcd_uic_change_pwr_mode(ufs_hba*, u8)'

Bug: 228415386
Signed-off-by: Chun-Hung Wu <chun-hung.wu@mediatek.com>
Change-Id: Ic88591e164b96bc18f82b46fdd2beaae255f5f8e
2022-06-29 20:56:20 +00:00
Maulik Shah 15d2618bb4 ANDROID: GKI: Update symbols list and ABI for qcom
Whitelist gic_v2_resume and update ABI representation accordingly.

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 void gic_v2_resume()'

1 Added variable:

  [A] 'tracepoint __tracepoint_android_vh_gic_v2_resume'

Bug: 234108369
Change-Id: I4bccc2dba1e61dcdd7fab47cba168fbc8fc7dff0
Signed-off-by: Maulik Shah <quic_mkshah@quicinc.com>
2022-06-29 19:46:57 +00:00
lijianzhong 7cf9646c24 ANDROID: sched: Add vendor hooks for cpu affinity.
add vendor hooks for cpu affinity to support oem's feature.

Bug: 183674818

Signed-off-by: lijianzhong <lijianzhong@xiaomi.com>
Change-Id: I3402abec4d9faa08f564409bfb8db8d7902f3aa2
2022-06-29 10:48:28 +08:00
lijianzhong a188361628 ANDROID: cgroup: Add vendor hook for cpuset.
add vendor hook for cpuset to support oem's feature.

Bug: 183674818
Signed-off-by: lijianzhong <lijianzhong@xiaomi.com>
Change-Id: Ib93e05e5f6c338c5f7ada56bfebdd705f87f1f66
2022-06-28 19:45:00 +00:00
Liujie Xie 869954e72d ANDROID: vendor_hooks: Export the tracepoints sched_stat_sleep
and sched_waking to let module probe them

Get task info about sleep and waking

Bug: 190422437
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: I828c93f531f84e6133c2c3a7f8faada51683afcf
(cherry picked from commit 13af062abf9b3586623adf7c3cdc5ced7bb5caed)
2022-06-28 19:44:20 +00:00
Todd Kjos 43074ecaf6 ANDROID: Fix kernelci build break due to typo
Fix a typo that results in build error:

drivers/irqchip/irq-gic.c:1266:2: error: implicit declaration of function 'gic_v2_syscore_init'

Fixes: 61b67cda34 ("ANDROID: irqchip: irq-gic: Add vendor hook for gic-v2 resume")
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I48c677c2f167dbdb49db6debbc41966cfcb79b3e
2022-06-28 19:12:49 +00:00
Prasad Sodagudi d3b1101453 ANDROID: printk: Export symbols for loadable modules
Export log_buf_addr_get and log_buf_len_get symbols for vendor
loadable modules.

Bug: 176125612
Change-Id: Iece1c60c60525f71d27031554711661ce57ab8b6
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
2022-06-28 19:09:00 +00:00
JianMin Liu 8c671bfa74 ANDROID: Update symbol list of mediatek
Leaf changes summary: 7 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added
functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 4 Added
variables

3 Added functions:

  [A] 'function int __traceiter_android_rvh_dequeue_task_fair(void*,
rq*, task_struct*, int)'
  [A] 'function int __traceiter_android_rvh_enqueue_task_fair(void*,
rq*, task_struct*, int)'
  [A] 'function int __traceiter_sched_update_nr_running_tp(void*, rq*,
int)'

4 Added variables:

  [A] 'tracepoint __tracepoint_android_rvh_dequeue_task_fair'
  [A] 'tracepoint __tracepoint_android_rvh_enqueue_task_fair'
  [A] 'tracepoint __tracepoint_sched_update_nr_running_tp'
  [A] 'srcu_struct tracepoint_srcu'

Bug: 237372322

Change-Id: I48c1fd44616fc3da4ed699b9333b1c1e066a1783
Signed-off-by: JianMin Liu <jian-min.liu@mediatek.com>
2022-06-28 18:45:39 +00:00
Liujie Xie 8968875ad6 ANDROID: vendor_hooks: Add hooks for binder proc transaction
We need pointers to proc and t, the current hooks in binder_proc_transaction
are unable to use.

Bug: 208910215
Change-Id: I730964f965a015e5f5a3e237d9b3bd084b5bd0d0
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
(cherry picked from commit cb7e10d31bca4f247c34d6791d6db048edf7e7a8)
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2022-06-28 17:43:21 +00:00
Todd Kjos dd641cb2a4 ANDROID: fix kernelci error due to fallthrough
Fix error flagged by kernelci for allmodconfig builds. Need
explicit "fallthrough" statement.

see https://linux.kernelci.org/build/id/62ba68b0fdb9daa19ca39bde/logs/

Fixes: 6bcb23254b ("ANDROID: Add vendor hook to skip usb audio suspend in offload mode")
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I709ca3ab667cd31f6a9d8c83d48a8223a28dc911
2022-06-28 04:47:07 +00:00
Subash Abhinov Kasiviswanathan 7cc36d07bb FROMGIT: net: Print hashed skb addresses for all net and qdisc events
The following commits added support for printing the real address-
65875073ed ("net: use %px to print skb address in trace_netif_receive_skb")
70713dddf3 ("net_sched: introduce tracepoint trace_qdisc_enqueue()")
851f36e409 ("net_sched: use %px to print skb address in trace_qdisc_dequeue()")

However, tracing the packet traversal shows a mix of hashes and real
addresses. Pasting a sample trace for reference-

ping-14249   [002] .....  3424.046612: netif_rx_entry: dev=lo napi_id=0x3 queue_mapping=0
skbaddr=00000000dcbed83e vlan_tagged=0 vlan_proto=0x0000 vlan_tci=0x0000 protocol=0x0800
ip_summed=0 hash=0x00000000 l4_hash=0 len=84 data_len=0 truesize=768 mac_header_valid=1
mac_header=-14 nr_frags=0 gso_size=0 gso_type=0x0
ping-14249   [002] .....  3424.046615: netif_rx: dev=lo skbaddr=ffffff888e5d1000 len=84

Switch the trace print formats to %p for all the events to have a
consistent format of printing the hashed addresses in all cases.

Bug: 237280735
(cherry picked from commit 6deb209dc6b0952a460da17ee61223ee3b3429d5
 https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git master)
Change-Id: I94b9b0fb1429389d67b9eaf909e3e9f7d6306bc0
Signed-off-by: Sean Tranchetti <quic_stranche@quicinc.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <quic_subashab@quicinc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-06-27 21:33:35 +00:00
Maulik Shah 61b67cda34 ANDROID: irqchip: irq-gic: Add vendor hook for gic-v2 resume
This change adds vendor hook for gic-v2 resume to allow vendor GIC
enhancement. This is inline with hook present today in irq-gic-v3.c
with one difference that vendor hooks in v2 driver do not pass entire
gic_chip_data struct to vendor module. Instead it passes the required
fields which are irq_domain and the gic dist base to know the wakeup
IRQ reason.

The newly added vendor hook can get invoked by two ways.
  1. By registering with syscore ops, .resume method can invoke vendor
     hook. This is applicable for cases like suspend-to-ram which
     invokes syscore ops.
  2. By exporting the gic_v2_resume(), the newly added vendor hook will
     get invoked during the first CPU waking up from suspend-to-idle
     case.

While at this move android_vh_gic_resume() to gic_v3.h as its specific
to v3 driver.

Bug: 234108369
Signed-off-by: Maulik Shah <quic_mkshah@quicinc.com>
Change-Id: I4c857b40f25ad58a6daca491e89adb90e8f6ca93
2022-06-27 21:15:28 +00:00
Wei.Chen 6bcb23254b ANDROID: Add vendor hook to skip usb audio suspend in offload mode
android_vh_audio_usb_offload_suspend:
	To skip pcm suspend in offload mode

We need a vendor hook to skip usb audio suspend in  offload mode.
In kernel5.4 the cmd SNDRV_PCM_TRIGGER_SUSPEND and SNDRV_PCM_TRIGGER_STOP are treated differently.
However, they are treated the same in kernel5.15, which will lead to system suspend while music playing in offload mode.

Bug: 237022398
Test: build pass / music playing / recording

Signed-off-by: Wei Chen <wei.chen3@unisoc.com>
Change-Id: Ib6ec0a1419493801aeba2e045b33384f246f43b5
2022-06-27 21:13:31 +00:00