705035 Commits

Author SHA1 Message Date
sidex15
4690f60df1 [BACKPORT] fs: implement SUSFS v1.5.9
There is a few change in here:
- sus_mount functionality still remain in v1.5.5 as backporting it to the latest version will result a mount detection leak in some apps/detectors

Thank you @simonpunk for the help of sus_path backport

Co-authored-by: sidex15 <24408329+sidex15@users.noreply.github.com>
Co-authored-by: simonpunk <simonpunk2016@gmail.com>
2025-08-19 13:31:18 +02:00
c5b5a845ca KernelSU-Next: bump version string to 12797 manually
Since we don't use a git submodule, we need this tweat in order to have the correct version in the manager

Signed-off-by: Onelots <onelots@onelots.fr>
2025-08-19 12:33:32 +02:00
040a963057 b1c1: KernelSU-Next: uprev to 1.0.9
Signed-off-by: Onelots <onelots@onelots.fr>
2025-08-19 12:33:32 +02:00
748f871653 arch/arm64: defconfig: define caelum as localversion
Signed-off-by: Onelots <onelots@onelots.fr>
2025-08-19 12:33:32 +02:00
05f1f0e8ed KernelSU-Next: Update to 1.0.8
Signed-off-by: Onelots <onelots@onelots.fr>
2025-08-19 12:33:32 +02:00
de0192dc4a arm64/configs: define caelum-plus as localversion for ksu kernel
Signed-off-by: Onelots <onelots@onelots.fr>
2025-08-19 12:33:32 +02:00
80e2aa98df b1c1: enable SUSFS in kernelsu.defconfig only
Signed-off-by: Onelots <onelots@onelots.fr>
2025-08-19 12:33:32 +02:00
Kiran Kumar Lokere
a55c22fb49 qcacld-5.0: Fix the possible OOB write in country IE unpack
Fix the possible OOB write in unpacking the country IE due to
the IE length check against integer division.

CRs-Fixed: 3910626
Change-Id: I800290ab7285fb46ed43a46ce38967046b4881fa
2025-06-18 10:53:30 +02:00
Jinfeng Gu
c2ed70f194 BACKPORT: disp: msm: dsi: add null pointer check in dsi_display_dev_remove
This change add display null pointer check in dsi_display_dev_remove.

Change-Id: Ib31756c3b22256d19cbcb508f60de4550e3834e1
Signed-off-by: Jinfeng Gu <quic_gjinfeng@quicinc.com>
2025-06-18 10:53:30 +02:00
Jiri Kosina
a8e2438ed7 UPSTREAM: HID: core: zero-initialize the report buffer
[ Upstream commit 177f25d1292c7e16e1199b39c85480f7f8815552 ]

Since the report buffer is used by all kinds of drivers in various ways, let's
zero-initialize it during allocation to make sure that it can't be ever used
to leak kernel memory via specially-crafted report.

Bug: 380395346
Fixes: 27ce405039 ("HID: fix data access in implement()")
Reported-by: Benoît Sevens <bsevens@google.com>
Acked-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 9d9f5c75c0c7f31766ec27d90f7a6ac673193191)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I31f64f2745347137bbc415eb35b7fab5761867f3
2025-06-18 10:53:30 +02:00
Le Hong Duc
80f8e3c2cd arm64/configs: Add config fragment for KernelSU
Signed-off-by: Onelots <onelots@onelots.fr>
2025-06-18 10:53:30 +02:00
82e165bf0f arm64/configs: Disable KernelSU
Signed-off-by: Onelots <onelots@onelots.fr>
2025-06-18 10:53:30 +02:00
554cb1a323 b1c1/configs: rebrand to Caelum Kernel
Signed-off-by: Onelots <onelots@onelots.fr>
2025-06-18 10:53:14 +02:00
ad59cb74fb b1c1: enable KernelSU (next)
Signed-off-by: Onelots <onelots@onelots.fr>
2025-06-18 10:53:04 +02:00
backslashxx
279a6593f7 KernelSU: integrate scope-minimized manual hooks
This refactors original KSU hooks to replace deep kernel function hooks with targeted hooks.
This backports KernelSU pr#1657 and having pr#2084 elements (32-bit sucompat).
It reduces the scope of kernel function interception and still maintains full fucntionality.

This commit is a squash of the following:
*	fs/exec: do_execve: ksu_handle_execveat hook
*	fs/exec: compat_do_execve: ksu_handle_execveat_sucompat hook
	fs/open: sys_faccessat: ksu_handle_faccessat hook
*	fs/read_write: sys_read: ksu_handle_sys_read hook
*	fs/stat: sys_newfstatat: ksu_handle_stat hook
*	fs/stat: sys_fstatat64: ksu_handle_stat hook
*	drivers: input: input_event: ksu_handle_input_handle_event hook
*	drivers: tty/pty.c: pts_unix98_lookup: ksu_handle_devpts hook

references: KernelSU pr#1657, pr#2084
	https://kernelsu.org/guide/how-to-integrate-for-non-gki.html

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
2025-06-18 10:52:54 +02:00
chiteroman
8ca971ee16 fs: Backport path_umount for KernelSu 2025-06-18 10:52:48 +02:00
ShevT
4ae147b467 devpts: KernelSU: Fix: Failed to execute pm in terminal 2025-06-18 10:52:40 +02:00
kaderbava
a085d1695a selinux: Allow init exec ksud under nosuid 2025-06-18 10:52:32 +02:00
b6a9ff0178 b1c1: KernelSU-Next: init KSU next
Signed-off-by: Onelots <onelots@onelots.fr>
2025-06-18 10:52:04 +02:00
abhinav kumar
1643b6cef5 qcacld-3.0: Possible buffer overflow issue in wma
Possible bufer overflow risk in function
wmi_unified_bcn_tmpl_send.

Validate the beacon template length against
WMI_BEACON_TX_BUFFER_SIZE length to avoid overflow.

Change-Id: I98665de677f314f30a57991f48191f847718740c
CRs-Fixed: 2960714
2025-03-02 23:26:35 +01:00
Yeshwanth Sriram Guntuka
86817f750f qcacld-3.0: Do not intrabss fwd frag EAPOL frames in HL
Do not intrabss forward fragmented EAPOL frames that have
DA different from the SAP vdev mac addr when high latency
is enabled.

Change-Id: Idb6e6c001f4dae51c2181e70ab9adbbb964f0ee3
CRs-Fixed:
2025-03-02 23:26:35 +01:00
Lee Jones
137a69b89f ANDROID: usb: gadget: f_accessory: Mitgate handling of non-existent USB request
Prevents mishandling USB requests that are no longer present.

Bug: 161010552
Fixes: 483cb5629ea78 ("ANDROID: usb: gadget: f_accessory: Add Android Accessory function")
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: I8ff24d6d49214c3bd10a1b5d5e72814ec2a91c61
2025-03-02 23:26:35 +01:00
wenji
c005bd11ee smcinvoke : Make sure tzhandle is set before f frees
Make sure tzhandle is set before f frees.

Change-Id: I78d87bb37b22c66b008effc86fe7a2ae25b19b76
Signed-off-by: Wenjie Li <quic_wenji@quicinc.com>
2025-03-02 23:26:35 +01:00
Raghavendra Ambadas
a659afac2e msm: mdp3: fix the use after free problem
currently the fdget is failed and freed in mdp3_get_img,
and again same is freed in mdp3_put_img function.
This can cause a use after free issue.

Change-Id: Ic2ad97a201d36b2bb49d3fdc93bb19ce089b6cb4
Signed-off-by: Raghavendra Ambadas <quic_c_rambad@quicinc.com>
Signed-off-by: srikanthreddy ponogoti <quic_sponogot@quicinc.com>
2025-03-02 23:26:35 +01:00
Raghavendra Ambadas
5c32ae4b36 fbdev: msm: check for valid fence before using objects
Validate the input fence for mdss and sde rotator before
referencing the structure objects.
and also log the fence driver name waiting for the fence.
Earlier the fence name was null irrespective of the
driver.

Change-Id: Ie277d861057a41092505c73ef3815f7d769d114e
Signed-off-by: Raghavendra Ambadas <quic_c_rambad@quicinc.com>
2025-03-02 23:26:35 +01:00
Daniel Vetter
0881085b80 drm/vgem: Close use-after-free race in vgem_gem_create
commit 4b848f20eda5974020f043ca14bacf7a7e634fc8 upstream.

There's two references floating around here (for the object reference,
not the handle_count reference, that's a different thing):

- The temporary reference held by vgem_gem_create, acquired by
  creating the object and released by calling
  drm_gem_object_put_unlocked.

- The reference held by the object handle, created by
  drm_gem_handle_create. This one generally outlives the function,
  except if a 2nd thread races with a GEM_CLOSE ioctl call.

So usually everything is correct, except in that race case, where the
access to gem_object->size could be looking at freed data already.
Which again isn't a real problem (userspace shot its feet off already
with the race, we could return garbage), but maybe someone can exploit
this as an information leak.

Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Hillf Danton <hdanton@sina.com>
Reported-by: syzbot+0dc4444774d419e916c8@syzkaller.appspotmail.com
Cc: stable@vger.kernel.org
Cc: Emil Velikov <emil.velikov@collabora.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Eric Anholt <eric@anholt.net>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Rob Clark <robdclark@chromium.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Change-Id: Ie60eb85499e5fe3cd27118c03829faf9ab67d7bc
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200202132133.1891846-1-daniel.vetter@ffwll.ch
[OP: backport to 4.19: adjusted DRM_DEBUG() -> DRM_DEBUG_DRIVER()]
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[mkbestas: backport to 4.9]
Signed-off-by: Michael Bestas <mkbestas@lineageos.org>
2025-03-02 23:26:35 +01:00
Manoj Prabhu B
405a6a0f5e diag: Ensure dci entry is valid before sending the packet
Possibility of a race condition which can free the dci entry
causing use after free case is prevented by adding the check
for entry's validity.

Change-Id: Ib436ffd16c266636d99885d6091eb1a6887737c7
Signed-off-by: Manoj Prabhu B <quic_bmanoj@quicinc.com>
2025-03-02 23:26:35 +01:00
Hangyu Hua
cb0435de32 BACKPORT: can: usb_8dev: usb_8dev_start_xmit(): fix double dev_kfree_skb() in error path
commit 3d3925ff6433f98992685a9679613a2cc97f3ce2 upstream.

There is no need to call dev_kfree_skb() when usb_submit_urb() fails
because can_put_echo_skb() deletes original skb and
can_free_echo_skb() deletes the cloned skb.

Bug: 228694483
Fixes: 0024d8ad16 ("can: usb_8dev: Add support for USB2CAN interface from 8 devices")
Link: https://lore.kernel.org/all/20220311080614.45229-1-hbh25y@gmail.com
Cc: stable@vger.kernel.org
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: I3c9191dd936d82e7c692fad33919b766e69ed7b5
2025-03-02 23:26:35 +01:00
Puranam V G Tejaswi
c39f5c3adb msm: kgsl: Perform cache flush on the pages obtained using get_user_pages()
Consider a scenario where user allocates anonymous memory but does not
write to it. Here the physical pages are not yet allocated. Now when this
memory is requested to be imported, a list of newly allocated zero pages
is obtained using get_user_pages(). Currently cache flush is not done for
these pages and hence GPU sees stale data. Fix this by performing cache
flush on these pages.

Change-Id: Id1e8aa20e8a9de112761732ed92f30c01088840b
Signed-off-by: Puranam V G Tejaswi <quic_pvgtejas@quicinc.com>
2025-03-02 23:26:35 +01:00
Dongliang Mu
399afb2902 UPSTREAM: f2fs: fix UAF in f2fs_available_free_memory
if2fs_fill_super
-> f2fs_build_segment_manager
   -> create_discard_cmd_control
      -> f2fs_start_discard_thread

It invokes kthread_run to create a thread and run issue_discard_thread.

However, if f2fs_build_node_manager fails, the control flow goes to
free_nm and calls f2fs_destroy_node_manager. This function will free
sbi->nm_info. However, if issue_discard_thread accesses sbi->nm_info
after the deallocation, but before the f2fs_stop_discard_thread, it will
cause UAF(Use-after-free).

-> f2fs_destroy_segment_manager
   -> destroy_discard_cmd_control
      -> f2fs_stop_discard_thread

Fix this by stopping discard thread before f2fs_destroy_node_manager.

Note that, the commit d6d2b491a82e1 introduces the call of
f2fs_available_free_memory into issue_discard_thread.

Cc: stable@vger.kernel.org
Fixes: d6d2b491a82e ("f2fs: allow to change discard policy based on cached discard cmds")
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit 5429c9dbc9025f9a166f64e22e3a69c94fd5b29b)
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: If121b453455b11b2aded8ba8a3899faad431dbd3
2025-03-02 23:26:35 +01:00
Sahitya Tummala
fdf4a34e3d BACKPORT: f2fs: allow to change discard policy based on cached discard cmds
With the default DPOLICY_BG discard thread is ioaware, which prevents
the discard thread from issuing the discard commands. On low RAM setups,
it is observed that these discard commands in the cache are consuming
high memory. This patch aims to relax the memory pressure on the system
due to f2fs pending discard cmds by changing the policy to DPOLICY_FORCE
based on the nm_i->ram_thresh configured.

Change-Id: I5f48f908cd6bbe6c6f3addda7018f7daffbb53b5
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
[mkbestas: backport to 4.9]
Signed-off-by: Michael Bestas <mkbestas@lineageos.org>
2025-03-02 23:26:35 +01:00
Jens Wiklander
a4fd838958 BACKPORT: tee: handle lookup of shm with reference count 0
commit dfd0743f1d9ea76931510ed150334d571fbab49d upstream.

Since the tee subsystem does not keep a strong reference to its idle
shared memory buffers, it races with other threads that try to destroy a
shared memory through a close of its dma-buf fd or by unmapping the
memory.

In tee_shm_get_from_id() when a lookup in teedev->idr has been
successful, it is possible that the tee_shm is in the dma-buf teardown
path, but that path is blocked by the teedev mutex. Since we don't have
an API to tell if the tee_shm is in the dma-buf teardown path or not we
must find another way of detecting this condition.

Fix this by doing the reference counting directly on the tee_shm using a
new refcount_t refcount field. dma-buf is replaced by using
anon_inode_getfd() instead, this separates the life-cycle of the
underlying file from the tee_shm. tee_shm_put() is updated to hold the
mutex when decreasing the refcount to 0 and then remove the tee_shm from
teedev->idr before releasing the mutex. This means that the tee_shm can
never be found unless it has a refcount larger than 0.

Fixes: 967c9cca2cc5 ("tee: generic TEE subsystem")
Cc: stable@vger.kernel.org
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Lars Persson <larper@axis.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Reported-by: Patrik Lantz <patrik.lantz@axis.com>
[JW: backport to 5.4-stable]
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
[mkbestas: backport to 4.9]
Signed-off-by: Michael Bestas <mkbestas@lineageos.org>
Change-Id: Ibd2809a225b167563c65faff4a44e56e23c2e97b
2025-03-02 23:26:35 +01:00
Lee Jones
17c2c0be81 ANDROID: dm-bow: Protect Ranges fetched and erased from the RB tree
Bug: 195565510
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change-Id: Ic8134eb902aa7d929e3121b2f69b1d258f570652
2025-03-02 23:26:35 +01:00
Rohith Kollalsi
421e27a46e usb: gadget: f_cdev: Fix use after free of port in f_cdev
With the configfs filesystem it’s possible to manipulate kernel
object by creating/deleting folders into /config path. Here port
object is created by a mkdir and leads to allocate this object,
while the rmdir syscall leads to free this object.
If one thread does these two operations of creation and deletion
of the folder and one tries to open it, it can lead to a
race condition where port object can be freed by the time
it is used in f_cdev_open leading to use after free error.

Fix this by using embedded struct device and the refcounting
mechanism built-in which increases and decreases refcount upon
creation and deletion of port and port will be freed when
reference count is zero ensuring that "port" object survives
until the last user releases it.

Change-Id: I88701ef161c9f3215631da81c3a8d4c980d12b25
Signed-off-by: Rohith Kollalsi <rkollals@codeaurora.org>
2025-03-02 23:26:35 +01:00
Dan Carpenter
a47b783044 UPSTREAM: ALSA: usb-audio: Fix a DMA to stack memory bug
commit f7d306b47a24367302bd4fe846854e07752ffcd9 upstream.

The usb_get_descriptor() function does DMA so we're not allowed
to use a stack buffer for that.  Doing DMA to the stack is not portable
all architectures.  Move the "new_device_descriptor" from being stored
on the stack and allocate it with kmalloc() instead.

Bug: 382243530
Fixes: b909df18ce2a ("ALSA: usb-audio: Fix potential out-of-bound accesses for Extigy and Mbox devices")
Cc: stable@kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/60e3aa09-039d-46d2-934c-6f123026c2eb@stanley.mountain
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Benoît Sevens <bsevens@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 4e54dc4bbc602133217de301d9f814f3e6d22eee)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I469212aa538584e3d8cc5b0087b68c99acf43f64
2025-02-14 08:47:49 +01:00
Benoît Sevens
5359d1e083 UPSTREAM: ALSA: usb-audio: Fix potential out-of-bound accesses for Extigy and Mbox devices
commit b909df18ce2a998afef81d58bbd1a05dc0788c40 upstream.

A bogus device can provide a bNumConfigurations value that exceeds the
initial value used in usb_get_configuration for allocating dev->config.

This can lead to out-of-bounds accesses later, e.g. in
usb_destroy_configuration.

Bug: 382243530
Signed-off-by: Benoît Sevens <bsevens@google.com>
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Cc: stable@kernel.org
Link: https://patch.msgid.link/20241120124144.3814457-1-bsevens@google.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 9887d859cd60727432a01564e8f91302d361b72b)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I2df0d59750943fa34747bd4bae2e549320f2a0ce
2025-02-14 08:47:49 +01:00
Benoit Sevens
3716412865 UPSTREAM: USB: media: uvcvideo: Skip parsing frames of type UVC_VS_UNDEFINED in uvc_parse_format
This can lead to out of bounds writes since frames of this type were not
taken into account when calculating the size of the frames buffer in
uvc_parse_streaming.

Fixes: c0efd23292 ("V4L/DVB (8145a): USB Video Class driver")
Signed-off-by: Benoit Sevens <bsevens@google.com>
Cc: stable@vger.kernel.org
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 378455392
(cherry picked from commit ecf2b43018da9579842c774b7f35dbe11b5c38dd)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I959a6374ba7adf021fc19da755f5c7611fef9b8c
2025-02-14 08:47:49 +01:00
Swami Reddy Reddy
e1dcc91ee4 msm: camera: sensor: TOCTOU error handling
- Change to dereference s_ctrl only after proper
  NULL Dereference Check.

CRs-Fixed: 3875406
Change-Id: I8e2c717b22efff2a7d6503d38c048e30eff230da
Signed-off-by: Swami Reddy Reddy <quic_swamired@quicinc.com>
2025-02-14 08:47:49 +01:00
Ghanim Fodi
65b6d4cb61 msm: ipa: update msm_ipa.h with latest IPA versions constants
This is needed so common components between kernel
4.9 and kernel 4.14 can compile OK.

CRs-Fixed: 2295428
Change-Id: I36b28c0f9ee4a4aca1303d298e88b98cceac36e3
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
2025-01-08 00:56:54 +01:00
Amir Levy
fa45aa1c9d msm: ipa: Move NAT invalid protocol define to uapi
NAT invalid protocol is needed by user space process.
Move it to uapi to make it accessible to user space.

Change-Id: I4d1700176483c93f78f48979d602f7568867b378
Acked-by: Michal Amsterdam <mamsterd@qti.qualcomm.com>
Signed-off-by: Amir Levy <alevy@codeaurora.org>
2025-01-08 00:56:54 +01:00
Christian Hoffmann
f67bb73597 arch: arm64: vdso32: Drop -no-integrated-as
Signed-off-by: Onelots <onelots@onelots.fr>
2024-12-24 00:26:11 +01:00
LuK1337
ed7a9566de ARM64: vdso32: Hardcode toolchain target
Fixes the following error when building with clang r530567:
error: version 'kernel' in target triple 'arm-unknown-linux-androidkernel' is invalid

Change-Id: I5a2d27bf0e8a22b2fe752c64efc0cc91c790b5f0
2024-12-23 23:36:18 +01:00
Chung-Hsien Hsu
6503c266b7 nl80211: add WPA3 definition for SAE authentication
Add definition of WPA version 3 for SAE authentication.

Change-Id: I19ca34b8965168f011cc1352eba420f2d54b0258
Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-12-23 23:36:18 +01:00
Jonglin Lee
43e39d2a76 cpuidle: lpm_levels: Don't print parent clocks during suspend
Calling clock_debug_print_enabled with print_parent = true
during suspend may cause a scheduling while atomic violation.
Call with print_parent = false instead to prevent the violation.

Bug: 132511008
Change-Id: I80f646d77d0cc98b4004084022ce1dce0e80cc93
Signed-off-by: Jonglin Lee <jonglin@google.com>
Signed-off-by: GeoPD <geoemmanuelpd2001@gmail.com>
2024-08-15 08:22:52 +05:30
Wei Wang
6400cd3b94 sched: restrict iowait boost to tasks with prefer_idle
Currently iowait doesn't distinguish background/foreground tasks and we
have seen cases where a device run to high frequency unnecessarily when
running some background I/O. This patch limits iowait boost to tasks with
prefer_idle only. Specifically, on Pixel, those are foreground and top
app tasks.

Bug: 130308826
Test: Boot and trace
Change-Id: I2d892beeb4b12b7e8f0fb2848c23982148648a10
Signed-off-by: Wei Wang <wvw@google.com>
Signed-off-by: Lau <laststandrighthere@gmail.com>
2024-08-15 08:22:43 +05:30
Maria Yu
b5c22baa21 sched: core: Clear walt rq request in cpu starting
Clear walt rq request in cpu starting.

Change-Id: Id3004337f3924984b8b812151a6ba01c6f1c013e
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
(cherry picked from commit 32df8f93e147dd54331161e9180d7ea488b750f9)
2024-08-15 08:22:18 +05:30
Pavankumar Kondeti
74a8607aa7 sched/walt: Fix the memory leak of idle task load pointers
The memory for task load pointers are allocated twice for each
idle thread except for the boot CPU. This happens during boot
from idle_threads_init()->idle_init() in the following 2 paths.

1. idle_init()->fork_idle()->copy_process()->
		sched_fork()->init_new_task_load()

2. idle_init()->fork_idle()-> init_idle()->init_new_task_load()

The memory allocation for all tasks happens through the 1st path,
so use the same for idle tasks and kill the 2nd path. Since
the idle thread of boot CPU does not go through fork_idle(),
allocate the memory for it separately.

Change-Id: I4696a414ffe07d4114b56d326463026019e278f1
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
(cherry picked from commit eb58f47212c9621be82108de57bcf3e94ce1035a)
2024-08-15 07:11:04 +05:30
DhineshCool
c0dd3261ad Revert "sched: Do not reduce perceived CPU capacity while idle"
This reverts commit 20dfb57cb1.
2024-08-15 06:33:57 +05:30
DhineshCool
f99e24746b Revert "cpufreq: schedutil: Enforce realtime priority"
This reverts commit 970b81bf75.
2024-08-15 06:17:11 +05:30
DhineshCool
158bbf5f52 Revert "binder: Reserve caches for small, high-frequency memory allocations"
This reverts commit fab295b5c9.
2024-08-14 19:17:42 +05:30