Commit Graph

1068029 Commits

Author SHA1 Message Date
Yunju Lee
11a15a4dcf ANDROID: Update the ABI symbol list
Adding the following symbols:
  - debugfs_create_file_unsafe
  - strnchr

Bug: 267758398
Change-Id: I10fe6db5fb6f4cf58f8e4b1760817ec5add9fd81
Signed-off-by: Yunju Lee <yunjulee@google.com>
2023-05-03 17:04:06 +00:00
Robin Peng
ee8644eacf ANDROID: Update the ABI symbol list
Adding the following symbols:
  - dmabuf_page_pool_get_size

Bug: 260174400
Change-Id: Iaa09256831aa65563fd5b8bc825a3f9d10722c4e
Signed-off-by: Robin Peng <robinpeng@google.com>
2023-05-03 02:49:24 +00:00
Peifeng Li
08a2bdeaad ANDROID: uid_sys_stat: split the global lock uid_lock to the fine-grained
locks for each hlist in hash_table.

Hash_table in uid_sys_stat is protected by a global lock named id_lock,
which causes some lock competition issue. Actually, uid_lock can be split to
several file-grained locks for each hlist in hash_table, which avoid
the unnecessary lock competition when get different-uid process info.

Bug: 278138377
Signed-off-by: Peifeng Li <lipeifeng@oppo.com>
Change-Id: I04c564ce42b62d8cfb9ed29e99f310ba76244763
2023-05-02 22:46:13 +00:00
Badhri Jagan Sridharan
7c58a7d3b6 ANDROID: Update the TCPM ABI symbol list
6 function symbol(s) added
  'int __traceiter_android_rvh_typec_tcpci_get_vbus(void*, struct tcpci*, struct tcpci_data*, int*, int*)'
  'int __traceiter_android_vh_typec_store_partner_src_caps(void*, unsigned int*, u32(*)[0])'
  'int __traceiter_android_vh_typec_tcpci_override_toggling(void*, struct tcpci*, struct tcpci_data*, int*)'
  'int __traceiter_android_vh_typec_tcpm_get_timer(void*, const char*, enum typec_timer, unsigned int*)'
  'int __traceiter_android_vh_typec_tcpm_log(void*, const char*, bool*)'
  'int __traceiter_android_vh_typec_tcpm_modify_src_caps(void*, unsigned int*, u32(*)[0], bool*)'

6 variable symbol(s) added
  'struct tracepoint __tracepoint_android_rvh_typec_tcpci_get_vbus'
  'struct tracepoint __tracepoint_android_vh_typec_store_partner_src_caps'
  'struct tracepoint __tracepoint_android_vh_typec_tcpci_override_toggling'
  'struct tracepoint __tracepoint_android_vh_typec_tcpm_get_timer'
  'struct tracepoint __tracepoint_android_vh_typec_tcpm_log'
  'struct tracepoint __tracepoint_android_vh_typec_tcpm_modify_src_caps'

Bug: 271294543
Change-Id: I3082c0f72354bce7b2c5e957a428cb743d100cba
Signed-off-by: Kyle Tso <kyletso@google.com>
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
2023-05-02 22:10:01 +00:00
Badhri Jagan Sridharan
a8403c07e3 ANDROID: usb: typec: tcpm: Add vendor hook for tcpm logs
Context: https://lore.kernel.org/lkml/CAPTae5LbWVc4Bdiwe69cwwxEGfSYvRv=419dUGR1u8n-WUkYAA@mail.gmail.com/t/

Logs in /sys/kernel/debug/usb/tcpm* are key to debug issues related to
USB charging or data. However, tcpm logbuffer logs do not wraparound
once full. Whereas we want it to wrap around so that we capture relevant
info in the bugreport when the user collects one. There is sentiment in
upstream to get rid of the logbuffer altogether and move to tracing.
But trace events are not default enabled in Android, so that implies,
even if user can somehow enable the trace event, user would have to
repro the issue and collect the bugreport. That would cause
inconvenience to the end user. The vendor hooks is needed till upstream
either allows wrapping around logs (or) Android has a generic way to
default enable trace events which can be captured in bugreport.

bypass_log is set to true by the handler if logging into logbuffer is
not needed.

Bug: 189792358
Bug: 271294543
Change-Id: Icacfed2264b6c49b8e803c62f8bd820a146c169a
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
(cherry picked from commit bbc22694d4)
2023-05-02 22:10:01 +00:00
Kyle Tso
4f8b716aa9 ANDROID: usb: typec: tcpm: Add vendor hook to modify port src caps
Add a vendor hook to modify the port Source Capabilities. If the caps
are changed and the port state is feasible, start a Power Negotiation
AMS to update the current contract to the new one.

Bug: 201006190
Bug: 206108037
Bug: 271294543
Signed-off-by: Kyle Tso <kyletso@google.com>
Change-Id: I8b524242353781cb39b3ba85c6a75bd5a204ebcf
(cherry picked from commit b499bac439)
2023-05-02 22:10:01 +00:00
Kyle Tso
bf28ed028d ANDROID: usb: typec: tcpm: Add vendor hook to store partner source capabilities
Add a hook after receiving the source capabilities from the partner
port. Pass the address of the source capability array so that vendor
code is able to access them.

OOT bug:
Bug: 181629276
Bug: 169215197
Bug: 271294543
Signed-off-by: Kyle Tso <kyletso@google.com>
Change-Id: I11c4a7919c248690e63c3bfbebfa6b8d711175a6
(cherry picked from commit c8314fcb76)
2023-05-02 22:10:01 +00:00
Badhri Jagan Sridharan
fca91a7cfa ANDROID: usb: typec: tcpm: vendor hook for timer adjustments
linux/usb/pd.h has a bunch of timers for which the Type-C spec defines
a range of values. These values have to be tuned based on the latency
observed in a specific architecture. However, linux opensource sets
them to a specific value without providing a mechanism to set board
specific values. While a generic way is figured out, a vendor hook
is needed in the interim.

For instance, tCCDebounce can have a value between 100msec - 200msec.

Squashed <d98a1df78740eedcc4d3d4c8d44b39b73f81df2d>
"ANDROID: usb: typec: tcpm: Fixup the wait time for SNK_DISCOVERY"

OOT_bug:
Bug: 184308605
Bug: 168245874
Bug: 173252019
Bug: 271294543
Change-Id: I278b34654a7e48990b6ebe25fbe17e3aa4165098
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
(cherry picked from commit 081a88febb)
2023-05-02 22:10:01 +00:00
Badhri Jagan Sridharan
636890621d ANDROID: usb: typec: tcpci: Add vendor hook to mask vbus present
This hook is for addressing hardware anomalies where
TCPC_POWER_STATUS_VBUS_PRES bit can return 0 even before falling
below sSinkDisconnect threshold.

Handler has to set bypass to override the value that would otherwise
be returned by this function.
Handler can set vbus or clear vbus to indicate vbus present or absent

Squashed <89f633a9f41259a168473917674dd5cb1bfb991d>
"ANDROID: usb: typec: tcpci: Migrate restricted vendor hook"

OOT_bug:
Bug: 183149028
Bug: 168245874
Bug: 173252019
Bug: 271294543
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: I2ca994d49b37bf8600c5913b892fde9acd0dc896
(cherry picked from commit eeffe02c96)
2023-05-02 22:10:01 +00:00
Badhri Jagan Sridharan
9870606283 ANDROID: usb: typec: tcpci: Add vendor hooks for tcpci interface
Needed for controlling BC1.2 detection logic specific to the chip
architecture. Also, needed to implement additional logic to make debug
accessories specifically designed for Pixel work.
These are outside the purview of Type-C spec.

OOT_bug:
Bug: 169213252
Bug: 168245874
Bug: 173252019
Bug: 271294543
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: I36fe75dddd8cd4e2054db01ed4fee7ea08dd8702
(cherry picked from commit b6325c997c)
2023-05-02 22:10:01 +00:00
Ulises Mendez Martinez
54e26291eb ANDROID: Unnest MAKE_GOALS from build configs
* This is in preparation for migrating these
as `kernel_build` attributes. i.e. these will
be removed as a follow-up.

Bug: 236012223
Change-Id: I168c44fd76f9f2732caf8f5c00bec4ed8c96ee65
(cherry picked from commit ccc4fb8185b50958354d8d511823491030988131)
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
2023-05-02 16:38:39 +00:00
Petri Gynther
d8a482963f ANDROID: Update the ABI symbol list
Adding the following symbols:
  - drm_add_edid_modes
  - drm_atomic_helper_connector_destroy_state
  - drm_atomic_helper_connector_duplicate_state
  - drm_atomic_helper_connector_reset
  - drm_connector_update_edid_property
  - drm_do_get_edid
  - drm_dp_aux_init
  - drm_dp_bw_code_to_link_rate
  - drm_dp_channel_eq_ok
  - drm_dp_clock_recovery_ok
  - drm_dp_dpcd_read
  - drm_dp_dpcd_read_link_status
  - drm_dp_dpcd_write
  - drm_dp_get_adjust_request_pre_emphasis
  - drm_dp_get_adjust_request_voltage
  - drm_dp_link_rate_to_bw_code
  - drm_dp_read_sink_count
  - drm_edid_get_monitor_name
  - drm_edid_to_sad
  - drm_match_cea_mode
  - drm_mode_copy
  - drm_mode_destroy
  - __traceiter_dwc3_readl
  - __tracepoint_dwc3_readl

Bug: 272184398
Change-Id: I0a0f02ac9fd16702308dedd59d3550e3195269d4
Signed-off-by: Petri Gynther <pgynther@google.com>
2023-05-02 01:57:23 +00:00
Paul Lawrence
9e9e157a6b ANDROID: fuse-bpf: Simplify and fix setting bpf program
Fix case when an existing bpf prog is being removed
Tidy up code

Bug: 279363668
Test: Boots, can copy file to /sdcardfs/Android/data, fuse_test passes
Signed-off-by: Paul Lawrence <paullawrence@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:64366661e8a9a6d691e5ab6499872d495aed5266)
Merged-In: If0e682f43cbeb62764a7a2be543b90cb974b0aa0
Change-Id: If0e682f43cbeb62764a7a2be543b90cb974b0aa0
2023-05-01 18:49:58 +00:00
Weizhao Ouyang
dbfbd63968 ANDROID: fuse-bpf: Fix bpf_test_xattr testcase error
Skipped selinux xattr checking.

Bug: 279996548
Test: fuse_test compiles and passes
Change-Id: I56ac1d5fe3865310a99c091e9688e70aa515e96f
Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>
2023-05-01 18:25:28 +00:00
Badhri Jagan Sridharan
593678ca92 FROMGIT: usb: gadget: udc: core: Prevent redundant calls to pullup
usb_gadget_connect calls gadget->ops->pullup without checking whether
gadget->connected was previously set. Make this symmetric to
usb_gadget_disconnect by returning early if gadget->connected is
already set.

Bug: 279501392
Bug: 276227797
Fixes: 5a1da544e5 ("usb: gadget: core: do not try to disconnect gadget if it is not connected")
Cc: stable@vger.kernel.org
Change-Id: I60b23114c0df7b282bcb1ce638683960305992c5
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20230407030741.3163220-2-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit a3afbf5cc8
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ usb-next)
2023-05-01 18:17:17 +00:00
Badhri Jagan Sridharan
b142000da9 BACKPORT: FROMGIT: usb: gadget: udc: core: Invoke usb_gadget_connect only when started
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: 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 0db213ea8e
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ usb-next)
2023-05-01 18:17:17 +00:00
Peter Collingbourne
f62ca752d1 FROMLIST: arm64: mte: Do not set PG_mte_tagged if tags were not initialized
The mte_sync_page_tags() function sets PG_mte_tagged if it initializes
page tags. Then we return to mte_sync_tags(), which sets PG_mte_tagged
again. At best, this is redundant. However, it is possible for
mte_sync_page_tags() to return without having initialized tags for the
page, i.e. in the case where check_swap is true (non-compound page),
is_swap_pte(old_pte) is false and pte_is_tagged is false. So at worst,
we set PG_mte_tagged on a page with uninitialized tags. This can happen
if, for example, page migration causes a PTE for an untagged page to
be replaced. If the userspace program subsequently uses mprotect() to
enable PROT_MTE for that page, the uninitialized tags will be exposed
to userspace.

Fix it by removing the redundant call to set_page_mte_tagged().

Fixes: e059853d14 ("arm64: mte: Fix/clarify the PG_mte_tagged semantics")
Signed-off-by: Peter Collingbourne <pcc@google.com>
Cc: <stable@vger.kernel.org> # 6.1
Link: https://linux-review.googlesource.com/id/Ib02d004d435b2ed87603b858ef7480f7b1463052
Link: https://lore.kernel.org/all/20230420214327.2357985-1-pcc@google.com/
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Bug: 263910115
Change-Id: Ib02d004d435b2ed87603b858ef7480f7b1463052
2023-04-29 10:52:30 +00:00
Peter Collingbourne
132feb89b3 BACKPORT: FROMLIST: arm64: Also reset KASAN tag if page is not PG_mte_tagged
Consider the following sequence of events:

1) A page in a PROT_READ|PROT_WRITE VMA is faulted.
2) Page migration allocates a page with the KASAN allocator,
   causing it to receive a non-match-all tag, and uses it
   to replace the page faulted in 1.
3) The program uses mprotect() to enable PROT_MTE on the page faulted in 1.

As a result of step 3, we are left with a non-match-all tag for a page
with tags accessible to userspace, which can lead to the same kind of
tag check faults that commit e74a684680 ("arm64: Reset KASAN tag in
copy_highpage with HW tags only") intended to fix.

The general invariant that we have for pages in a VMA with VM_MTE_ALLOWED
is that they cannot have a non-match-all tag. As a result of step 2, the
invariant is broken. This means that the fix in the referenced commit
was incomplete and we also need to reset the tag for pages without
PG_mte_tagged.

Fixes: e5b8d92189 ("arm64: mte: reset the page tag in page->flags")
Cc: <stable@vger.kernel.org> # 5.15
Link: https://linux-review.googlesource.com/id/I7409cdd41acbcb215c2a7417c1e50d37b875beff
Link: https://lore.kernel.org/all/20230420210945.2313627-1-pcc@google.com/
Signed-off-by: Peter Collingbourne <pcc@google.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Bug: 263910115
Change-Id: I7409cdd41acbcb215c2a7417c1e50d37b875beff
[pcc: resolved merge conflict]
2023-04-29 08:54:06 +00:00
xieliujie
83cfe3cd4a ANDROID: ABI: Update oplus symbol list
1 function symbol(s) added
  'int __traceiter_android_vh_sched_stat_runtime_rt(void*, struct task_struct*, u64)'

1 variable symbol(s) added
  'struct tracepoint __tracepoint_android_vh_sched_stat_runtime_rt'

Bug: 193384408
Change-Id: Ic8f9149260e947f5fc4f83baae2857d1aa7c0422
Signed-off-by: xieliujie <xieliujie@oppo.com>
2023-04-28 23:05:18 +00:00
Liujie Xie
e1f430a487 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 a61d61bab7)
Signed-off-by: Carlos Llamas <cmllamas@google.com>
(cherry picked from commit b7a1174cc5dfc68cf769547b91958df407e55981)
2023-04-28 23:05:18 +00:00
xieliujie
71f62a14d5 ANDROID: ABI: Update oplus symbol list
1 function symbol(s) added
  'int __traceiter_android_vh_map_util_freq_new(void*, unsigned long, unsigned long, unsigned long, unsigned long*, struct cpufreq_policy*, bool*)'

1 variable symbol(s) added
  'struct tracepoint __tracepoint_android_vh_map_util_freq_new'

Bug: 193384408
Change-Id: I7393e670e3da6ab9f03d1b3877100532a3066c03
Signed-off-by: xieliujie <xieliujie@oppo.com>
2023-04-28 23:02:59 +00:00
xieliujie
5491cac560 ANDROID: sched: Add vendor hooks to compute new cpu freq.
add vendor hooks to compute new cpu freq for oem feature.

Bug: 280021175

Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: I2b8e1f76f3b9792148f153190b862face679ebbd
2023-04-28 23:02:59 +00:00
xieliujie
65b61b57dc ANDROID: ABI: Update oplus symbol list
1 function symbol(s) added
  'int __traceiter_android_vh_futex_sleep_start(void*, struct task_struct*)'

1 variable symbol(s) added
  'struct tracepoint __tracepoint_android_vh_futex_sleep_start'

Bug: 193384408
Change-Id: I1151b9bbbe7df35a71f85caf4b9f53811d288617
Signed-off-by: xieliujie <xieliujie@oppo.com>
2023-04-28 22:58:52 +00:00
Liujie Xie
08d7a5f89e 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 a7ab784f60)
2023-04-28 22:58:52 +00:00
Ramji Jiyani
319d27a217 ANDROID: GKI: Convert USB network adpaters to modules
Converts these config items from built-in to GKI protected
modules:

CONFIG_USB_NET_DRIVERS
CONFIG_USB_USBNET
CONFIG_USB_RTL8150
CONFIG_USB_RTL8152
CONFIG_USB_NET_AX8817X
CONFIG_USB_NET_AX88179_178A
CONFIG_USB_NET_CDCETHER
CONFIG_USB_NET_CDC_EEM
CONFIG_USB_NET_CDC_NCM
CONFIG_USB_NET_AQC111
CONFIG_USB_RTL8153_ECM

Bug: 232431151
Bug: 279972445
Test: TH
Change-Id: I8a6e34be1ed86a8ea1d44e6721954fb5888e1fa4
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2023-04-28 20:53:10 +00:00
Keir Fraser
d7d80178a6 ANDROID: KVM: arm64: Prevent kmemleak from accessing EL2 module sections
Since these are unmapped from EL1, kmemleak will crash if it accesses
them.

Bug: 275004094
Signed-off-by: Keir Fraser <keirf@google.com>
Change-Id: Ieb15033c2dc21e6437a3a3c91a8b36e8dda31e98
2023-04-28 14:48:26 +00:00
Will Deacon
e8cf4c06e1 ANDROID: KVM: arm64: Move addr_is_allowed_memory() check into host callback
Since host stage-2 mappings are created lazily, we cannot rely on the
pte in order to recover the target physical address when checking a
host-initiated memory transition.

Instead, move the addr_is_allowed_memory() check into the host callback
function where it is passed the physical address directly from the
walker.

Bug: 279739439
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I84bdc43eded79f1f5e5a489dbc0874604491e5c8
2023-04-28 14:31:59 +00:00
Greg Kroah-Hartman
bad74575a1 Revert "sched/fair: Detect capacity inversion"
This reverts commit 99b704ae7a.

It breaks the current Android kernel abi.  It will be brought back at
the next KABI break update.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie9a141414435aa17dc97ef1e1ec8c23dbe7816e8
2023-04-28 10:37:41 +00:00
Greg Kroah-Hartman
114ae28faa Revert "sched/fair: Consider capacity inversion in util_fits_cpu()"
This reverts commit 98762616db.

It breaks the current Android kernel abi.  It will be brought back at
the next KABI break update.

Bug: 161946584
Change-Id: I4ed9d6760b8d2e26bad66d9af39d7819e7b464d9
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-04-28 10:37:41 +00:00
Greg Kroah-Hartman
b06a054a03 Revert "sched/uclamp: Fix a uninitialized variable warnings"
This reverts commit 4ee882e0e1.

It breaks the current Android kernel abi.  It will be brought back at
the next KABI break update.

Bug: 161946584
Change-Id: I6f6c769ebcd31248b16f792add4d206c8c1b5c19
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-04-28 10:37:41 +00:00
Greg Kroah-Hartman
8ea8ecbd12 Revert "sched/fair: Fixes for capacity inversion detection"
This reverts commit e779884c71.

It breaks the current Android kernel abi.  It will be brought back at
the next KABI break update.

Bug: 161946584
Change-Id: Ic6ccde7b57e525a742602d783457c810a1ca0930
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-04-28 10:37:41 +00:00
Matthias Männich
b55e0c7a6b Merge "Merge 5.15.109 into android14-5.15" into android14-5.15 2023-04-28 10:37:41 +00:00
Paul Lawrence
19648ef3b9 ANDROID: fuse-bpf: Make fuse_test compile and pass
Remove ARRAY_SIZE definition
Uncomment FUSE_CANONICAL_PATH responses

Bug: 279912034
Test: fuse_test compiles and passes
Change-Id: I511bc0466a552261428347b1cf9f23f1088213e0
Signed-off-by: Paul Lawrence <paullawrence@google.com>
2023-04-27 22:57:42 +00:00
Chungkai Mei
3959036415 ANDROID: binder: store previous uclamp by uclamp_req
To restore previous uclamp value, we still need store uclamp_req directly. Otherwise, saved_priority will store effective uclamp value and restore it to uclamp_req later.

Bug: 277389699
Change-Id: I7b3e357fcfc3bd955789e85d730713c384d0ade7
Signed-off-by: Chungkai Mei <chungkai@google.com>
2023-04-27 16:26:43 +00:00
Treehugger Robot
356e60d592 Merge "Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.15.y' into android14-5.15" into android14-5.15 2023-04-27 15:54:57 +00:00
Quentin Perret
66affbc97f ANDROID: KVM: arm64: Prevent kmemleak from accessing .hyp.data
We've recently added a .data section for the hypervisor, which kmemleak
is eager to parse. This clearly doesn't go well, so add the section to
kmemleak's block list.

Bug: 232768943
Bug: 235903024
Change-Id: Ib1ee0009ce05bf7b0ba5d53fc8ca0429ec592102
Signed-off-by: Quentin Perret <qperret@google.com>
[re-merge: Accidentally reverted while cutting android14-5.15]
Bug: 275004094
Signed-off-by: Keir Fraser <keirf@google.com>
2023-04-27 09:23:50 +00:00
Jaegeuk Kim
0874e4661d Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.15.y' into android14-5.15
* aosp/upstream-f2fs-stable-linux-5.15.y:
  f2fs: remove unnessary comment in __may_age_extent_tree
  f2fs: allocate node blocks for atomic write block replacement
  f2fs: use cow inode data when updating atomic write
  f2fs: remove power-of-two limitation of zoned device
  f2fs: allocate trace path buffer from names_cache
  f2fs: add has_enough_free_secs()
  f2fs: relax sanity check if checkpoint is corrupted
  f2fs: refactor f2fs_gc to call checkpoint in urgent condition
  f2fs: remove folio_detach_private() in .invalidate_folio and .release_folio
  f2fs: fix to call clear_page_private_reference in .{release,invalid}_folio
  f2fs: remove bulk remove_proc_entry() and unnecessary kobject_del()
  f2fs: support iopoll method
  f2fs: remove batched_trim_sections node description
  f2fs: fix to check return value of inc_valid_block_count()
  f2fs: fix to check return value of f2fs_do_truncate_blocks()
  f2fs: fix passing relative address when discard zones
  f2fs: fix potential corruption when moving a directory
  f2fs: add radix_tree_preload_end in error case
  f2fs: fix to recover quota data correctly
  f2fs: fix to check readonly condition correctly
  docs: f2fs: Correct instruction to disable checkpoint
  f2fs: fix to keep consistent i_gc_rwsem lock order
  f2fs: fix to drop all dirty pages during umount() if cp_error is set
  f2fs: fix to avoid use-after-free for cached IPU bio
  f2fs: remove unneeded in-memory i_crtime copy
  f2fs: use f2fs_hw_is_readonly() instead of bdev_read_only()
  f2fs: use common implementation of file type
  f2fs: merge lz4hc_compress_pages() to lz4_compress_pages()
  f2fs: convert to use sysfs_emit
  f2fs: set default compress option only when sb_has_compression
  f2fs: Fix system crash due to lack of free space in LFS
  f2fs: remove struct victim_selection default_v_ops
  f2fs: fix null pointer panic in tracepoint in __replace_atomic_write_block
  f2fs: fix iostat lock protection
  f2fs: fix align check for npo2
  f2fs: add compression feature check for all compress mount opt
  f2fs: convert is_extension_exist() to return bool type
  f2fs: fix scheduling while atomic in decompression path
  f2fs: preserve direct write semantics when buffering is forced
  f2fs: compress: fix to call f2fs_wait_on_page_writeback() in f2fs_write_raw_pages()
  f2fs: remove else in f2fs_write_cache_pages()
  f2fs: apply zone capacity to all zone type
  f2fs: fix to handle filemap_fdatawrite() error in f2fs_ioc_decompress_file/f2fs_ioc_compress_file
  f2fs: convert to MAX_SBI_FLAG instead of 32 in stat_show()
  f2fs: Fix discard bug on zoned block devices with 2MiB zone size
  f2fs: remove entire rb_entry sharing
  f2fs: factor out discard_cmd usage from general rb_tree use
  f2fs: factor out victim_entry usage from general rb_tree use
  f2fs: fix uninitialized skipped_gc_rwsem
  f2fs: handle dqget error in f2fs_transfer_project_quota()
  f2fs: convert to use bitmap API
  f2fs: export compress_percent and compress_watermark entries
  f2fs: make f2fs_sync_inode_meta() static
  f2fs: Fix f2fs_truncate_partial_nodes ftrace event

Bug: 273795759
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I260f4009b3bb6a0ffca20488d0ad0e41e92fb9d2
2023-04-26 17:03:06 -07:00
Carlos Llamas
bef7cc8154 ANDROID: 4/26/2023 KMI update
Set KMI_GENERATION=5 for 4/26 KMI update

1 function symbol(s) added
  'unsigned long dmabuf_page_pool_get_size(struct dmabuf_page_pool*)'

function symbol changed from 'int pkvm_iommu_register(struct device*, u64, phys_addr_t, size_t, struct device*)' to 'int pkvm_iommu_register(struct device*, u64, phys_addr_t, size_t, struct device*, u8)'
  CRC changed from 0x5b4f6732 to 0x884bf4b6
  type changed from 'int(struct device*, u64, phys_addr_t, size_t, struct device*)' to 'int(struct device*, u64, phys_addr_t, size_t, struct device*, u8)'
    parameter 6 of type 'u8' was added

function symbol 'int ___pskb_trim(struct sk_buff*, unsigned int)' changed
  CRC changed from 0x7d722404 to 0x5078bf09

function symbol 'struct sk_buff* __alloc_skb(unsigned int, gfp_t, int, int)' changed
  CRC changed from 0x7d394cb3 to 0x3065de54

function symbol 'struct sk_buff* __cfg80211_alloc_event_skb(struct wiphy*, struct wireless_dev*, enum nl80211_commands, enum nl80211_attrs, unsigned int, int, int, gfp_t)' changed
  CRC changed from 0x3415238f to 0x7d26f3e2

... 719 omitted; 722 symbols have only CRC changes

type 'struct netns_ipv6' changed
  member 'struct list_head mr6_tables' was added
  member 'struct fib_rules_ops* mr6_rules_ops' was added
  member 'struct mr_table* mrt6' was removed
  9 members ('atomic_t dev_addr_genid' .. 'u64 android_kabi_reserved1') changed
    offset changed by 128

Bug: 279074305
Change-Id: Iadf86cb97ff76e52a19de8ec4d12c46c35e712c5
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2023-04-26 16:23:52 +00:00
Mostafa Saleh
970a9ef174 ANDROID: KVM: arm64: iommu: Pass device specific flags to hypervisor
We need to pass some device specific flags that are detected from EL1
(as built-in sync device) to the hypervisor. The flags are defined
by the driver but hosted in the main iommu struct.

As we use SMCCC1.1 we only have 7 args, which were already used, so
mem_size is removed as it really not needed as all page donations
are 1 page. so passing the base address is enough.

Bug: 255266847
Change-Id: I14e6d2573d7a822334455999aa9fd6f01ac97450
Signed-off-by: Mostafa Saleh <smostafa@google.com>
2023-04-26 16:23:52 +00:00
Carlos Llamas
9d58eeb9d6 ANDROID: gki_defconfig: enable IPV6_MROUTE_MULTIPLE_TABLES
Enable support for multicast policy routing. This will allow border
router devices to run multiple routing tables simultaneously.

Bug: 233821827
Change-Id: Ib029f4db1c5bb9416c06813fa0b66c965fef8fd8
Signed-off-by: Carlos Llamas <cmllamas@google.com>
(cherry picked from commit c9e98bfeeeae4580143ec87b4f1f3ef8571dc331)
2023-04-26 16:23:52 +00:00
T.J. Mercier
0831e8804f ANDROID: dma-buf: heaps: dmabuf page pool spinlock should be spinlock_t
Address checkpatch warning:
WARNING: struct spinlock should be spinlock_t
+	struct spinlock lock;

Fixes: 060e38dce1 ("ANDROID: dma-buf: heaps: replace mutex lock with spinlock")
Bug: 275698445
Change-Id: I6f2fc7c5ec4bc56a43e8fa738577cb4b64cfcb3e
Signed-off-by: T.J. Mercier <tjmercier@google.com>
2023-04-26 16:23:52 +00:00
T.J. Mercier
1beded838c ANDROID: GKI: Update virtual_device symbol list for dmabuf_page_pool_get_size
Update symbol list after making the DMA-BUF heap page-pool helper
library built-in.

Bug: 275698445
Change-Id: Ib20070b0e2fa45fd3f3b6e3bd2236f64ba77f5fd
Signed-off-by: T.J. Mercier <tjmercier@google.com>
2023-04-26 16:23:52 +00:00
T.J. Mercier
1a1e567be4 ANDROID: GKI: Update db845c symbol list for dmabuf_page_pool_get_size
Update symbol list after making the DMA-BUF heap page-pool helper

Bug: 275698445
Change-Id: I676d44d7497cc33b552d1b6cbccbb89f4b4f088a
Signed-off-by: T.J. Mercier <tjmercier@google.com>
2023-04-26 16:23:52 +00:00
T.J. Mercier
7a3538cd40 ANDROID: dma-buf: heaps: Move dmabuf_page_pool struct out of the KMI
Users of dmabuf_page_pool should not need to refer to its fields, so
hide them from the KMI. Add dmabuf_page_pool_get_size to fullfill the
needs of users. Update the system_heap to use the new API.

Bug: 264474028
Bug: 275698445
Change-Id: I848ff52e73a13568f561deeb6aea48f40dc0960b
Signed-off-by: T.J. Mercier <tjmercier@google.com>
2023-04-26 16:23:52 +00:00
Greg Kroah-Hartman
66858c87b1 Merge 5.15.109 into android14-5.15
Changes in 5.15.109
	ARM: dts: rockchip: fix a typo error for rk3288 spdif node
	arm64: dts: qcom: ipq8074-hk01: enable QMP device, not the PHY node
	arm64: dts: meson-g12-common: specify full DMC range
	arm64: dts: imx8mm-evk: correct pmic clock source
	netfilter: br_netfilter: fix recent physdev match breakage
	regulator: fan53555: Explicitly include bits header
	regulator: fan53555: Fix wrong TCS_SLEW_MASK
	net: sched: sch_qfq: prevent slab-out-of-bounds in qfq_activate_agg
	virtio_net: bugfix overflow inside xdp_linearize_page()
	sfc: Split STATE_READY in to STATE_NET_DOWN and STATE_NET_UP.
	sfc: Fix use-after-free due to selftest_work
	netfilter: nf_tables: fix ifdef to also consider nf_tables=m
	i40e: fix accessing vsi->active_filters without holding lock
	i40e: fix i40e_setup_misc_vector() error handling
	netfilter: nf_tables: validate catch-all set elements
	netfilter: nf_tables: tighten netlink attribute requirements for catch-all elements
	bnxt_en: Do not initialize PTP on older P3/P4 chips
	mlxfw: fix null-ptr-deref in mlxfw_mfa2_tlv_next()
	bonding: Fix memory leak when changing bond type to Ethernet
	net: rpl: fix rpl header size calculation
	mlxsw: pci: Fix possible crash during initialization
	spi: spi-rockchip: Fix missing unwind goto in rockchip_sfc_probe()
	bpf: Fix incorrect verifier pruning due to missing register precision taints
	e1000e: Disable TSO on i219-LM card to increase speed
	f2fs: Fix f2fs_truncate_partial_nodes ftrace event
	Input: i8042 - add quirk for Fujitsu Lifebook A574/H
	platform/x86 (gigabyte-wmi): Add support for A320M-S2H V2
	selftests: sigaltstack: fix -Wuninitialized
	scsi: megaraid_sas: Fix fw_crash_buffer_show()
	scsi: core: Improve scsi_vpd_inquiry() checks
	net: dsa: b53: mmap: add phy ops
	s390/ptrace: fix PTRACE_GET_LAST_BREAK error handling
	nvme-tcp: fix a possible UAF when failing to allocate an io queue
	xen/netback: use same error messages for same errors
	platform/x86: gigabyte-wmi: add support for X570S AORUS ELITE
	rtmutex: Add acquire semantics for rtmutex lock acquisition slow path
	iio: light: tsl2772: fix reading proximity-diodes from device tree
	nilfs2: initialize unused bytes in segment summary blocks
	memstick: fix memory leak if card device is never registered
	kernel/sys.c: fix and improve control flow in __sys_setres[ug]id()
	mmc: sdhci_am654: Set HIGH_SPEED_ENA for SDR12 and SDR25
	drm/i915: Fix fast wake AUX sync len
	mm/khugepaged: check again on anon uffd-wp during isolation
	mm: page_alloc: skip regions with hugetlbfs pages when allocating 1G pages
	sched/uclamp: Fix fits_capacity() check in feec()
	sched/uclamp: Make cpu_overutilized() use util_fits_cpu()
	sched/uclamp: Cater for uclamp in find_energy_efficient_cpu()'s early exit condition
	sched/fair: Detect capacity inversion
	sched/fair: Consider capacity inversion in util_fits_cpu()
	sched/uclamp: Fix a uninitialized variable warnings
	sched/fair: Fixes for capacity inversion detection
	MIPS: Define RUNTIME_DISCARD_EXIT in LD script
	docs: futex: Fix kernel-doc references after code split-up preparation
	purgatory: fix disabling debug info
	fuse: fix attr version comparison in fuse_read_update_size()
	fuse: always revalidate rename target dentry
	fuse: fix deadlock between atomic O_TRUNC and page invalidation
	udp: Call inet6_destroy_sock() in setsockopt(IPV6_ADDRFORM).
	tcp/udp: Call inet6_destroy_sock() in IPv6 sk->sk_destruct().
	inet6: Remove inet6_destroy_sock() in sk->sk_prot->destroy().
	dccp: Call inet6_destroy_sock() via sk->sk_destruct().
	sctp: Call inet6_destroy_sock() via sk->sk_destruct().
	pwm: meson: Explicitly set .polarity in .get_state()
	pwm: iqs620a: Explicitly set .polarity in .get_state()
	pwm: hibvt: Explicitly set .polarity in .get_state()
	counter: 104-quad-8: Fix race condition between FLAG and CNTR reads
	iio: adc: at91-sama5d2_adc: fix an error code in at91_adc_allocate_trigger()
	mm/page_alloc: fix potential deadlock on zonelist_update_seq seqlock
	ASoC: fsl_asrc_dma: fix potential null-ptr-deref
	ASN.1: Fix check for strdup() success
	soc: sifive: l2_cache: fix missing iounmap() in error path in sifive_l2_init()
	soc: sifive: l2_cache: fix missing free_irq() in error path in sifive_l2_init()
	soc: sifive: l2_cache: fix missing of_node_put() in sifive_l2_init()
	Linux 5.15.109

Change-Id: I2165f73cd4b1056ffb268e8b6a12e71588309188
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-04-26 13:37:41 +00:00
Wanwei Jiang
754ba89a30 ANDROID: GKI: Update symbol list for Amlogic
2 function symbol(s) added
  'void usb_disable_autosuspend(struct usb_device*)'
  'int usb_interrupt_msg(struct usb_device*, unsigned int, void*, int, int*, int)'

Bug: 279715656
Change-Id: I0cd97b7005849ed41e2461c383e8b9ddec19f128
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2023-04-26 20:19:32 +08:00
Greg Kroah-Hartman
f48aeeaaa6 Linux 5.15.109
Link: https://lore.kernel.org/r/20230424131129.040707961@linuxfoundation.org
Tested-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Bagas Sanjaya <bagasdotme@gmail.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Chris Paterson (CIP) <chris.paterson2@renesas.com>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Ron Economos <re@w6rz.net>
Tested-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-26 13:51:56 +02:00
Yang Yingliang
4aed6b5809 soc: sifive: l2_cache: fix missing of_node_put() in sifive_l2_init()
commit 8fbf94fea0 upstream.

The device_node pointer returned by of_find_matching_node() with
refcount incremented, when finish using it, the refcount need be
decreased.

Fixes: a967a289f1 ("RISC-V: sifive_l2_cache: Add L2 cache controller driver for SiFive SoCs")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
[conor: cache -> l2_cache]
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-26 13:51:56 +02:00
Yang Yingliang
71e7ed6e3a soc: sifive: l2_cache: fix missing free_irq() in error path in sifive_l2_init()
commit 756344e7cb upstream.

Add missing free_irq() before return error from sifive_l2_init().

Fixes: a967a289f1 ("RISC-V: sifive_l2_cache: Add L2 cache controller driver for SiFive SoCs")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
[conor: ccache -> l2_cache]
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-26 13:51:56 +02:00
Yang Yingliang
48c5fd3733 soc: sifive: l2_cache: fix missing iounmap() in error path in sifive_l2_init()
commit 73e770f085 upstream.

Add missing iounmap() before return error from sifive_l2_init().

Fixes: a967a289f1 ("RISC-V: sifive_l2_cache: Add L2 cache controller driver for SiFive SoCs")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
[conor: ccache -> l2_cache]
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-26 13:51:56 +02:00