Add ramjiyani@ as per-file owner for list of protected
modules for all current & future architectures.
android/gki_*_protected_modules
Bug: 151893768
Test: TH
Change-Id: I0048c99a28cfe24e1ba7c7d6189fd8c7dfdf6f0d
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Add snd_usb_power_domain_set() to the symbol list, as it is exported for
modules to utilize. Class drivers may need this to ensure USB audio device
is placed in the proper power state if an alternative audio path is used.
(i.e. offload path)
Symbols added:
snd_usb_power_domain_set
Bug: 255912822
Change-Id: I667fcaf8c841fd63c9b4d0307ac86e178d15e8b8
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
pKVM modules may need to enable fine grain traps. To allow this
use-case, expose a function allowing to manipulate HFGWTR_EL2 on the
current CPU. This configuration will be persistent across power
management cycles and such as it is propagated all the way to the
init params per-cpu struct.
Bug: 245034629
Change-Id: If9c29849df50847d3a796345927bd51c37c358bc
Signed-off-by: Quentin Perret <qperret@google.com>
pKVM modules may need to enable additional traps on top of what pKVM
already enables. To allow this use-case, expose a function allowing to
manipulate HCR_EL2 on the current CPU. This configuration will be
persistent across power management cycles and such as it is propagated
all the way to the init params per-cpu struct.
Bug: 245034629
Change-Id: I21d596bd1d01f4edc48a188cc3c2eb78dc9a4444
Signed-off-by: Quentin Perret <qperret@google.com>
Converting cfg80211.ko & mac80211.ko as vendor modules
made some symbols cited in the symbol lists for partners
but are no longer available in ksymtab as these features
are disabled in the gki_defconfit to convert them to vendor
modules.
Manually trimmed the symbol lists for builds to succeed.
Bug: 281137343
Test: TH
Change-Id: Ieb60c12ddb4f2b89aa387df2d69c31f8cfee54d8
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Convert cfg80211.ko and mac80211.ko as vendor modules to
pave a way for merging 802.11be Wi-Fi 7 functionalities
from upstream over the next year without affecting the KMI.
Bug: 281137343
Test: TH
Change-Id: Id1823924a3e5d8d03518599e6b3209e9cdd771d5
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
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 a7ab784f60)
If an important task is going to sleep through do_futex(),
find out it's futex-owner by the pid comes from userspace,
and boost the owner by some means to shorten the sleep time.
How to boost? Depends on these hooks:
commit 53e8099784 ("ANDROID: vendor_hooks: Add hooks for scheduler")
Bug: 243110112
Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: I9a315cfb414fd34e0ef7a2cf9d57df50d4dd984f
(cherry picked from commit 548da5d23d)
Add support to use a random local address in authentication and
deauthentication frames sent to unassociated peer when the driver
supports.
The driver needs to configure receive behavior to accept frames with
random transmit address specified in TX path authentication frames
during the time of the frame exchange is pending and such frames need to
be acknowledged similarly to frames sent to the local permanent address
when this random address functionality is used.
This capability allows use of randomized transmit address for PASN
authentication frames to improve privacy of WLAN clients.
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Link: https://lore.kernel.org/r/20230112012415.167556-2-quic_vjakkam@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Bug: 280613325
Change-Id: Ife3ad20656cba20c1b971bb3a074cc27e21e2c5b
(cherry picked from commit 6933486133https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main)
Signed-off-by: Vinay Gannevaram <quic_vganneva@quicinc.com>
Add ANDROID_OEM_DATA_ARRAY to the struct user so that we can record the
necessary data to implement the OEM's scheduling policy.
Bug: 183674818
Signed-off-by: lijianzhong <lijianzhong@xiaomi.com>
Change-Id: I418293391bc62a68207eae51a79bd45a7f6cd2ed
(cherry picked from commit 77e791866b)
Add vendor hooks in add/update/remove frequency QoS request process to
ensure that we can access the OEM's "frequency watchdog" logic for
abnormal frequency monitoring. This is necessary for our power tuning
policy.
Bug: 187458531
Signed-off-by: heshuai1 <heshuai1@xiaomi.com>
Change-Id: I1fb8fd6134432ecfb44ad242c66ccd8280ab9b43
(cherry picked from commit c445fe4dc67ad74dacfa548bc78876a7ce057086)
INFO: ABI DIFFERENCES HAVE BEEN DETECTED!
INFO: 4 function symbol(s) added
'int __traceiter_android_vh_alloc_uid(void*, struct user_struct*)'
'int __traceiter_android_vh_free_user(void*, struct user_struct*)'
'struct user_struct* find_user(kuid_t)'
'void free_uid(struct user_struct*)'
2 variable symbol(s) added
'struct tracepoint __tracepoint_android_vh_alloc_uid'
'struct tracepoint __tracepoint_android_vh_free_user'
function symbol 'struct block_device* I_BDEV(struct inode*)' changed
CRC changed from 0xbf847796 to 0x9903391b
function symbol 'void __ClearPageMovable(struct page*)' changed
function symbol 'void __SetPageMovable(struct page*, const struct movable_operations*)' changed
CRC changed from 0x9c92af65 to 0xfd8bfc31
... 4297 omitted; 4300 symbols have only CRC changes
type 'struct user_struct' changed
byte size changed from 136 to 152
member 'u64 android_oem_data1[2]' was added
Bug: 277846574
Change-Id: Ifd44123eb32963e8e9f85de84c505a28cff12d14
Signed-off-by: wang qiankun <wangqiankun3@xiaomi.corp-partner.google.com>
Exporting the symbols find_user() & free_uid() to access user task
information in ko module for monitoring and optimization purposes. This
is a necessary component of our scheduling policy.
Bug: 183674818
Signed-off-by: lijianzhong <lijianzhong@xiaomi.com>
Change-Id: I12135c0af312904dd21b6f074beda086ad5ece98
(cherry picked from commit 16350016d8)
(cherry picked from commit eec2cd3df3aa2d92136658d3619dc5142155c7d4)
In order to implement our scheduling tuning policy in certain cases, we
need to initialize the variables that we have defined in the
user_struct. To achieve this, we will add a vendor hook to user.c at
alloc_uid, which will ensure that our own logic is executed during the
initialization of the user_struct.
Bug: 187458531
Signed-off-by: heshuai1 <heshuai1@xiaomi.com>
Change-Id: I078484aac2c3d396aba5971d6d0f491652f3781c
(cherry picked from commit c9b8fa644f)
(cherry picked from commit 9ac0923ef565e4de4e1f35edcba6fcb7e45948c9)
Add "cpufreq_policy" and "need_freq_update" parameters to the vendor
hook to enable frequency calculation in certain special cases related to
OEM's frequency tuning policy.
Bug: 183674818
Signed-off-by: lijianzhong <lijianzhong@xiaomi.com>
Change-Id: I232d2e1ae885d6736eca9e4709870f4272b4873d
usb_udc_connect_control does not check to see if the udc has already
been started. This causes gadget->ops->pullup to be called through
usb_gadget_connect when invoked from usb_udc_vbus_handler even before
usb_gadget_udc_start is called. Guard this by checking for udc->started
in usb_udc_connect_control before invoking usb_gadget_connect.
Guarding udc->vbus, udc->started, gadget->connect, gadget->deactivate
related functions with connect_lock. usb_gadget_connect_locked,
usb_gadget_disconnect_locked, usb_udc_connect_control_locked,
usb_gadget_udc_start_locked, usb_gadget_udc_stop_locked are called with
this lock held as they can be simulataneously invoked from different code
paths.
Adding an additional check to make sure udc is started(udc->started)
before pullup callback is invoked.
Bug: 279501392
Bug: 276227797
Fixes: 628ef0d273 ("usb: udc: add usb_udc_vbus_handler")
Cc: stable@vger.kernel.org
Change-Id: Iee7ac5fdf880be5565b9f178708240d619141237
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20230407030741.3163220-1-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit a3afbf5cc8https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ usb-next)
This reverts commit 067f7ca9fd.
It was perserving the ABI, but that is not needed anymore at this point
in time.
Change-Id: Ie5c4e8b82bac1966ea56834f02ddcc83dccbd7d1
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This reverts commit a8fa816c4d.
It was perserving the ABI, but that is not needed anymore at this point
in time.
Change-Id: I6ca9a9f70805782cdacd7fedc2a057405aae5774
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This reverts commit 7ddb50fff2.
It was perserving the ABI, but that is not needed anymore at this point
in time.
Change-Id: Ie92c7e1fa270672698399600076ac9be1e0ac4f4
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This reverts commit 9d29ba9c30.
It was perserving the ABI, but that is not needed anymore at this point
in time.
Change-Id: Iae5f3a6a9025e17aa7b1a0fd805c13953bc0c554
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This reverts commit af88eb49be.
It was perserving the ABI, but that is not needed anymore at this point
in time.
Change-Id: Iaf8c7af434912fc219d411c8c9b17292f1605af5
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This reverts commit 46e1414454.
It was perserving the ABI, but that is not needed anymore at this point
in time.
Change-Id: I935958cfe8d7e01c7469818609534cfd0e9ba6de
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This reverts commit 301169bd8c.
It was perserving the ABI, but that is not needed anymore at this point
in time.
Change-Id: I0ffa37b35a4abce29f9ddde7bebf0b8df159fa1e
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This reverts commit b8301c2638.
It was perserving the ABI, but that is not needed anymore at this point
in time.
Change-Id: I4e97d4fb46ce6596880749b8486bbeafb3151d4a
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This reverts commit 6996d13954.
It was perserving the ABI, but that is not needed anymore at this point
in time.
Change-Id: I29bcae8b8b502b7c4a4b79650996d1ba2556f1c7
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This reverts commit a3a763fb37.
It was perserving the ABI, but that is not needed anymore at this point
in time.
Change-Id: Ie5a36427c09a3cc7f89949e05c0bb6b013f9c591
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This reverts commit cc7a00d2d6.
It was perserving the ABI, but that is not needed anymore at this point
in time.
Change-Id: I30a89a414afcc3db54c040afff3ab067b33170be
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This reverts commit 2039635543.
It was perserving the ABI, but that is not needed anymore at this point
in time.
Change-Id: Iaa9f70751453325f43d15bc6e4f6cf5bc68d6ec2
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
The pKVM hypervisor uses the module_ops struct as a way to expose
services to loadable modules. It doesn't however allow fine-grained
definition of the license for each export, and doesn't have a way to
check the license of the loaded module (yet). As such, the assumption
is that said module is proprietary, and must NOT be allowed to use GPL
symbols.
Even though symbols such as __pkvm_load_el2_module are currently
exported as GPL, these exports only apply to the kernel part of the
module, which is usually only a proxy to load the hyp module, which
may be built separately.
Given the lack of license enforcement at load time, let's seek GPL
compliance by preventing the accidental export of GPL symbols to hyp
modules via pKVM's module_ops struct. To do so, add a build time check
for the absence of such symbols from the KVM nvhe code entirely.
In the future (Android 15+ and upstream), we should consider expanding
the pKVM module loader to allow finer grained licensing of exports.
This would allow exposing internal pKVM functions as GPL only for e.g.
selftests and such w/o risking exports to proprietary modules.
Bug: 263340138
Bug: 267430896
Change-Id: I09b81bfe322c0d2746c0349c5f217a5a76b6e33d
Signed-off-by: Quentin Perret <qperret@google.com>
... so it can be read by Bazel @kernel_toolchain_info
later.
Test: TH
Bug: 272164611
Change-Id: I04648f8fb28537544287797673810946dedb58f3
Signed-off-by: Yifan Hong <elsk@google.com>
This reverts commit 3a7f9f00f0.
Some module driver need to know current cpufreq change status
to profile cpu operation.
Bug: 280531400
Change-Id: Ibd7fa6c7e04695d2efc39775767b77b522ba6c06
Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
In one of the SMMU faults (NULL Pointer derefernce) the following
race condition was observed and func->interfaces_nums was being
accessed for f_fs interface after it was unbinded resulting in a
crash.
Thread-1 Thread-2
ffs_func_req_match+0x68/0xc8
drain_workqueue+0xac
gsi_unbind[usb_f_gsi]+0x64
purge_configs_funcs+0xb4
configfs_composite_unbind+0xac
usb_gadget_remove_driver+0xac
usb_gadget_unregister_driver+0xd8
gadget_dev_desc_UDC_store+0x114
android_setup+0x164/0x2a8
dwc3_ep0_inspect_setup+0x100/0x440
dwc3_ep0_interrupt+0xac/0x300
dwc3_process_event_entry+0x80/0x724
dwc3_process_event_buf+0x80/0x434
dwc3_thread_interrupt+0x60/0x124
irq_thread_fn+0x54/0xe4
irq_thread+0x3a4/0x6ec
kthread+0x188/0x1ec
ret_from_fork+0x10/0x20
The events happened in order are as follows:
We got a setup packet for ffs interface and was passed to android
setup callback from ep0.c. As part of the delegate request, the
dwc->lock is released.
At this instant a composition switch occurred and as per traces
and crash dumps:
1. UDC Stop was done successfully. So run stop is set to '0'
2. Composite disconnect was done and ep disable for all ep's is done
gadget->connected = FALSE
3. Async callbacks disabled
dwc->aysnc_callbacks = FALSE
4. composite unbind is going on and the ffs interface in question is
unbinded
udc->driver != NULL
(as per crash dump indicating that unbind is in progress)
5. Purge configs was ongoing because as per crash dumps:
otg_desc[0] = NULL;
cdev->os_desc_req->buf is not NULL
(configfs_composite_unbind is going on, but composite_dev_cleanup
not yet done)
As per the traces:
23.794712: dwc3_event event=49216 ep0state=1 str=
23.794909: dwc3_ctrl_req bRequestType=161 bRequest=1 wValue=0
wIndex=2 wLength=4096
23.799740: usb_gadget_disconnect speed=5 max_speed=6 state=7
mA=0 deactivated=0 connected=0 ret=0
This indicated that android setup came first followed by composite
disconnect. Since the dwc->lock was released by delegate_request,
soft disconnect gets unblocked and runs parallel to composite setup.
After this, there is no check in path of composite setup
indicating unbind happened and bail out is necessary instead of
executing any function ops.
Protect composite_setup (as part of android_setup) in a spinlock
to block composite_disconnect/unbind running in parallel.
Moreover, in the configfs counterpart of android_setup (configfs_
composite_stetup), the composite_setup call is done with spinlock
held.
It is only the android_setup missing this lock.
Bug: 280548269
Fixes: 7a160e2b96 ("ANDROID: usb: gadget: configfs: Add Uevent to notify userspace")
Change-Id: Id245e9f72801541689fcb185ba0459824bfb3904
Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
(cherry picked from commit 9ad803f257a8eb50a52c19a4cf33690cf1b85575)