Merge remote-tracking branch 'aosp/android15-6.6-2024-08' into nxp-linux-sdk/lf-6.6.y_android

This commit is contained in:
Zhipeng Wang 2024-08-30 10:34:38 +09:00
commit 1fb989bcd9
15 changed files with 338 additions and 22 deletions

View File

@ -297425,6 +297425,13 @@ function {
parameter_id: 0x18bd6530
parameter_id: 0x0483e6f8
}
function {
id: 0x11cc1d33
return_type_id: 0x48b5725f
parameter_id: 0x0665e6b6
parameter_id: 0x3e10b518
parameter_id: 0xd5df6730
}
function {
id: 0x11cd9f23
return_type_id: 0x48b5725f
@ -297585,6 +297592,13 @@ function {
parameter_id: 0x054f691a
parameter_id: 0xc9082b19
}
function {
id: 0x11f73b29
return_type_id: 0x48b5725f
parameter_id: 0x0665e6b6
parameter_id: 0x3e10b518
parameter_id: 0x39470e64
}
function {
id: 0x11f90280
return_type_id: 0x48b5725f
@ -308729,6 +308743,13 @@ function {
parameter_id: 0x2e8d5f05
parameter_id: 0xc9082b19
}
function {
id: 0x39432140
return_type_id: 0x184052fc
parameter_id: 0x3e10b518
parameter_id: 0x1253769c
parameter_id: 0x184052fc
}
function {
id: 0x394343b5
return_type_id: 0x184052fc
@ -313489,6 +313510,12 @@ function {
parameter_id: 0x4585663f
parameter_id: 0x328870e8
}
function {
id: 0x8c2c6f32
return_type_id: 0x6720d32f
parameter_id: 0x4585663f
parameter_id: 0x33756485
}
function {
id: 0x8c2fe37e
return_type_id: 0x6720d32f
@ -327816,6 +327843,18 @@ function {
parameter_id: 0xc9082b19
parameter_id: 0x07dcdbe1
}
function {
id: 0x9b57de8b
return_type_id: 0x6720d32f
parameter_id: 0x18bd6530
parameter_id: 0x3e10b518
parameter_id: 0x0483e6f8
parameter_id: 0x4585663f
parameter_id: 0x4585663f
parameter_id: 0x6d7f5ff6
parameter_id: 0x13580d6c
parameter_id: 0x11cfee5a
}
function {
id: 0x9b57e4f6
return_type_id: 0x6720d32f
@ -327842,6 +327881,12 @@ function {
parameter_id: 0x02aa06b1
parameter_id: 0x02aa06b1
}
function {
id: 0x9b5a0a16
return_type_id: 0x6720d32f
parameter_id: 0x1d19a9d5
parameter_id: 0x6720d32f
}
function {
id: 0x9b5a0fe0
return_type_id: 0x6720d32f
@ -330637,6 +330682,13 @@ function {
parameter_id: 0x19238db3
parameter_id: 0x11cfee5a
}
function {
id: 0x9bdde64f
return_type_id: 0x6720d32f
parameter_id: 0x18bd6530
parameter_id: 0x1d19a9d5
parameter_id: 0x18ea2d6b
}
function {
id: 0x9bddee2d
return_type_id: 0x6720d32f
@ -331019,6 +331071,14 @@ function {
parameter_id: 0x2a670b41
parameter_id: 0x1c898f28
}
function {
id: 0x9bfc29dd
return_type_id: 0x6720d32f
parameter_id: 0x18bd6530
parameter_id: 0x18bd6530
parameter_id: 0xc9082b19
parameter_id: 0xc9082b19
}
function {
id: 0x9bfd1c84
return_type_id: 0x6720d32f
@ -331632,6 +331692,13 @@ function {
parameter_id: 0x35612b46
parameter_id: 0x29459f81
}
function {
id: 0x9c75b704
return_type_id: 0x6720d32f
parameter_id: 0x0665e6b6
parameter_id: 0x18ea6ae3
parameter_id: 0x3e10b518
}
function {
id: 0x9c77e7ef
return_type_id: 0x6720d32f
@ -336752,6 +336819,13 @@ function {
parameter_id: 0x0917901f
parameter_id: 0x10afcfdf
}
function {
id: 0x9f8801da
return_type_id: 0x6720d32f
parameter_id: 0x0bfc9031
parameter_id: 0x3e10b518
parameter_id: 0x3e10b518
}
function {
id: 0x9f89d33b
return_type_id: 0x6720d32f
@ -346167,6 +346241,15 @@ elf_symbol {
type_id: 0x9bdfaf3f
full_name: "__traceiter_android_rvh_cpuset_fork"
}
elf_symbol {
id: 0x2941af77
name: "__traceiter_android_rvh_create_worker"
is_defined: true
symbol_type: FUNCTION
crc: 0x255135f9
type_id: 0x9bdde64f
full_name: "__traceiter_android_rvh_create_worker"
}
elf_symbol {
id: 0x44c5f919
name: "__traceiter_android_rvh_ctl_dirty_rate"
@ -348750,6 +348833,15 @@ elf_symbol {
type_id: 0x9b222516
full_name: "__traceiter_android_vh_look_around_migrate_folio"
}
elf_symbol {
id: 0x127dff5c
name: "__traceiter_android_vh_lz4_decompress_bypass"
is_defined: true
symbol_type: FUNCTION
crc: 0x74e31cb2
type_id: 0x9b57de8b
full_name: "__traceiter_android_vh_lz4_decompress_bypass"
}
elf_symbol {
id: 0xfb6a92a8
name: "__traceiter_android_vh_madvise_cold_pageout_skip"
@ -350505,6 +350597,24 @@ elf_symbol {
type_id: 0x9b9916a4
full_name: "__traceiter_dwc3_ep_queue"
}
elf_symbol {
id: 0xafc53276
name: "__traceiter_dwc3_readl"
is_defined: true
symbol_type: FUNCTION
crc: 0x26871a2b
type_id: 0x9bfc29dd
full_name: "__traceiter_dwc3_readl"
}
elf_symbol {
id: 0xa1c053cb
name: "__traceiter_dwc3_writel"
is_defined: true
symbol_type: FUNCTION
crc: 0xcff87172
type_id: 0x9bfc29dd
full_name: "__traceiter_dwc3_writel"
}
elf_symbol {
id: 0x5e5d9a70
name: "__traceiter_error_report_end"
@ -351234,6 +351344,15 @@ elf_symbol {
type_id: 0x18ccbd2c
full_name: "__tracepoint_android_rvh_cpuset_fork"
}
elf_symbol {
id: 0x2a923aa1
name: "__tracepoint_android_rvh_create_worker"
is_defined: true
symbol_type: OBJECT
crc: 0xd02e93f6
type_id: 0x18ccbd2c
full_name: "__tracepoint_android_rvh_create_worker"
}
elf_symbol {
id: 0xd9e47a83
name: "__tracepoint_android_rvh_ctl_dirty_rate"
@ -353817,6 +353936,15 @@ elf_symbol {
type_id: 0x18ccbd2c
full_name: "__tracepoint_android_vh_look_around_migrate_folio"
}
elf_symbol {
id: 0x2f20ce5e
name: "__tracepoint_android_vh_lz4_decompress_bypass"
is_defined: true
symbol_type: OBJECT
crc: 0x3981cddc
type_id: 0x18ccbd2c
full_name: "__tracepoint_android_vh_lz4_decompress_bypass"
}
elf_symbol {
id: 0xcb34ca12
name: "__tracepoint_android_vh_madvise_cold_pageout_skip"
@ -355572,6 +355700,24 @@ elf_symbol {
type_id: 0x18ccbd2c
full_name: "__tracepoint_dwc3_ep_queue"
}
elf_symbol {
id: 0x53afc62c
name: "__tracepoint_dwc3_readl"
is_defined: true
symbol_type: OBJECT
crc: 0xc22b2b57
type_id: 0x18ccbd2c
full_name: "__tracepoint_dwc3_readl"
}
elf_symbol {
id: 0x66f49065
name: "__tracepoint_dwc3_writel"
is_defined: true
symbol_type: OBJECT
crc: 0x633e1a65
type_id: 0x18ccbd2c
full_name: "__tracepoint_dwc3_writel"
}
elf_symbol {
id: 0x3b13741e
name: "__tracepoint_error_report_end"
@ -390678,6 +390824,15 @@ elf_symbol {
type_id: 0x91ec6dfe
full_name: "phy_connect_direct"
}
elf_symbol {
id: 0x2bf61c61
name: "phy_create_lookup"
is_defined: true
symbol_type: FUNCTION
crc: 0x83af7e25
type_id: 0x9f8801da
full_name: "phy_create_lookup"
}
elf_symbol {
id: 0x5ebc16d0
name: "phy_disconnect"
@ -391830,6 +391985,15 @@ elf_symbol {
type_id: 0x8ce1baa0
full_name: "pinctrl_gpio_direction_output"
}
elf_symbol {
id: 0x54a103db
name: "pinctrl_gpio_set_config"
is_defined: true
symbol_type: FUNCTION
crc: 0x9b92d16e
type_id: 0x8c2c6f32
full_name: "pinctrl_gpio_set_config"
}
elf_symbol {
id: 0x173c6399
name: "pinctrl_lookup_state"
@ -393271,6 +393435,15 @@ elf_symbol {
type_id: 0x394343b5
full_name: "proc_mkdir_data"
}
elf_symbol {
id: 0xc5f878cf
name: "proc_mkdir_mode"
is_defined: true
symbol_type: FUNCTION
crc: 0x3abad788
type_id: 0x39432140
full_name: "proc_mkdir_mode"
}
elf_symbol {
id: 0xeb5eabdb
name: "proc_remove"
@ -398114,6 +398287,15 @@ elf_symbol {
type_id: 0x11c57e21
full_name: "seq_escape_mem"
}
elf_symbol {
id: 0xed1fea98
name: "seq_file_path"
is_defined: true
symbol_type: FUNCTION
crc: 0x029ce5bf
type_id: 0x9c75b704
full_name: "seq_file_path"
}
elf_symbol {
id: 0xb2b0c8fa
name: "seq_hex_dump"
@ -398195,6 +398377,24 @@ elf_symbol {
type_id: 0x11d02068
full_name: "seq_printf"
}
elf_symbol {
id: 0xe76b6b25
name: "seq_put_decimal_ll"
is_defined: true
symbol_type: FUNCTION
crc: 0x909b8a87
type_id: 0x11f73b29
full_name: "seq_put_decimal_ll"
}
elf_symbol {
id: 0x05b70a90
name: "seq_put_decimal_ull"
is_defined: true
symbol_type: FUNCTION
crc: 0xdfd63d37
type_id: 0x11cc1d33
full_name: "seq_put_decimal_ull"
}
elf_symbol {
id: 0x25bebf3b
name: "seq_putc"
@ -398222,6 +398422,15 @@ elf_symbol {
type_id: 0x12e4741f
full_name: "seq_read"
}
elf_symbol {
id: 0x8ad22c43
name: "seq_read_iter"
is_defined: true
symbol_type: FUNCTION
crc: 0x9051e458
type_id: 0x16637235
full_name: "seq_read_iter"
}
elf_symbol {
id: 0x91763ae6
name: "seq_release"
@ -398646,6 +398855,15 @@ elf_symbol {
type_id: 0x16c82e7e
full_name: "set_task_cpu"
}
elf_symbol {
id: 0x5e7a57c2
name: "set_task_ioprio"
is_defined: true
symbol_type: FUNCTION
crc: 0x0a1147ab
type_id: 0x9b5a0a16
full_name: "set_task_ioprio"
}
elf_symbol {
id: 0xdebcf3e9
name: "set_user_nice"
@ -414156,6 +414374,7 @@ interface {
symbol_id: 0x1baec33d
symbol_id: 0xf5806276
symbol_id: 0x1a7f4cf6
symbol_id: 0x2941af77
symbol_id: 0x44c5f919
symbol_id: 0x8f1b1c1e
symbol_id: 0xd6290b85
@ -414443,6 +414662,7 @@ interface {
symbol_id: 0x57087e9e
symbol_id: 0xe19d2bf8
symbol_id: 0x993f42ff
symbol_id: 0x127dff5c
symbol_id: 0xfb6a92a8
symbol_id: 0x78029b6d
symbol_id: 0x5832511c
@ -414638,6 +414858,8 @@ interface {
symbol_id: 0x7b03aae7
symbol_id: 0x92373f85
symbol_id: 0x1bf57293
symbol_id: 0xafc53276
symbol_id: 0xa1c053cb
symbol_id: 0x5e5d9a70
symbol_id: 0x104ffeec
symbol_id: 0xe56422fc
@ -414719,6 +414941,7 @@ interface {
symbol_id: 0x9f779ef7
symbol_id: 0x331f5cf0
symbol_id: 0xc53e6388
symbol_id: 0x2a923aa1
symbol_id: 0xd9e47a83
symbol_id: 0x3eb0f084
symbol_id: 0x832ab9cf
@ -415006,6 +415229,7 @@ interface {
symbol_id: 0x94ddd62c
symbol_id: 0xda2d53f2
symbol_id: 0x50a5a949
symbol_id: 0x2f20ce5e
symbol_id: 0xcb34ca12
symbol_id: 0x34f5699b
symbol_id: 0x7d21b9ee
@ -415201,6 +415425,8 @@ interface {
symbol_id: 0xef6e6795
symbol_id: 0xb2d6f207
symbol_id: 0xef33da29
symbol_id: 0x53afc62c
symbol_id: 0x66f49065
symbol_id: 0x3b13741e
symbol_id: 0xd8f3ca82
symbol_id: 0x8a660b52
@ -419093,6 +419319,7 @@ interface {
symbol_id: 0xc278f4fa
symbol_id: 0x9c15bd7a
symbol_id: 0x866cf90c
symbol_id: 0x2bf61c61
symbol_id: 0x5ebc16d0
symbol_id: 0xb39736f6
symbol_id: 0x9d35d830
@ -419221,6 +419448,7 @@ interface {
symbol_id: 0x761cec78
symbol_id: 0x0707a7ce
symbol_id: 0x470ca027
symbol_id: 0x54a103db
symbol_id: 0x173c6399
symbol_id: 0xecd5c994
symbol_id: 0xf439020c
@ -419381,6 +419609,7 @@ interface {
symbol_id: 0x7a8a2031
symbol_id: 0xd27c5bdf
symbol_id: 0xe2f2f3da
symbol_id: 0xc5f878cf
symbol_id: 0xeb5eabdb
symbol_id: 0x1561afad
symbol_id: 0x7ba3baed
@ -419919,6 +420148,7 @@ interface {
symbol_id: 0x17b3f8eb
symbol_id: 0x4814ecd5
symbol_id: 0x854e793d
symbol_id: 0xed1fea98
symbol_id: 0xb2b0c8fa
symbol_id: 0xfb710d3e
symbol_id: 0x0af60b8b
@ -419928,9 +420158,12 @@ interface {
symbol_id: 0xfae0b182
symbol_id: 0x9ef87854
symbol_id: 0xc5442265
symbol_id: 0xe76b6b25
symbol_id: 0x05b70a90
symbol_id: 0x25bebf3b
symbol_id: 0x59b4ca07
symbol_id: 0xba8007cd
symbol_id: 0x8ad22c43
symbol_id: 0x91763ae6
symbol_id: 0x2cc9ecc6
symbol_id: 0x56c495a4
@ -419978,6 +420211,7 @@ interface {
symbol_id: 0xc1ea8aaa
symbol_id: 0x500f328c
symbol_id: 0xe19d98a9
symbol_id: 0x5e7a57c2
symbol_id: 0xdebcf3e9
symbol_id: 0x8f1deac6
symbol_id: 0x7d05df74

View File

@ -2029,6 +2029,7 @@
phy_basic_t1_features
phy_connect
phy_connect_direct
phy_create_lookup
phy_disconnect
phy_do_ioctl_running
phy_drivers_register

View File

@ -71,3 +71,8 @@
clk_unregister_fixed_factor
clk_unregister_fixed_rate
clk_unregister_gate
__traceiter_dwc3_readl
__traceiter_dwc3_writel
__tracepoint_dwc3_readl
__tracepoint_dwc3_writel
pinctrl_gpio_set_config

View File

@ -36,6 +36,7 @@
noop_qdisc
of_css
pfifo_qdisc_ops
proc_mkdir_mode
profile_event_register
profile_event_unregister
put_device
@ -60,9 +61,14 @@
sbitmap_queue_show
sched_setattr_nocheck
schedule_timeout_killable
seq_file_path
seq_list_next
seq_list_start
seq_put_decimal_ll
seq_put_decimal_ull
seq_read_iter
set_blocksize
set_task_ioprio
__set_task_comm
skb_orphan_partial
static_key_enable
@ -75,6 +81,7 @@
__traceiter_android_rvh_bpf_skb_load_bytes
__traceiter_android_rvh_check_preempt_wakeup
__traceiter_android_rvh_cpufreq_transition
__traceiter_android_rvh_create_worker
__traceiter_android_rvh_dequeue_task_fair
__traceiter_android_rvh_enqueue_task_fair
__traceiter_android_rvh_inet_sock_create
@ -192,6 +199,7 @@
__tracepoint_android_rvh_bpf_skb_load_bytes
__tracepoint_android_rvh_check_preempt_wakeup
__tracepoint_android_rvh_cpufreq_transition
__tracepoint_android_rvh_create_worker
__tracepoint_android_rvh_dequeue_task_fair
__tracepoint_android_rvh_enqueue_task_fair
__tracepoint_android_rvh_inet_sock_create

View File

@ -16,6 +16,10 @@
__traceiter_android_vh_do_shrink_slab
__traceiter_android_vh_shrink_slab_bypass
# required by lz4 decompress module
__tracepoint_android_vh_lz4_decompress_bypass
__traceiter_android_vh_lz4_decompress_bypass
# required by SAGT module
__traceiter_android_rvh_before_do_sched_yield
__tracepoint_android_rvh_before_do_sched_yield

View File

@ -33,6 +33,7 @@
#include <trace/hooks/net.h>
#include <trace/hooks/cpuidle_psci.h>
#include <trace/hooks/vmscan.h>
#include <trace/hooks/lz4_decompress.h>
#include <trace/hooks/avc.h>
#include <trace/hooks/creds.h>
#include <trace/hooks/selinux.h>
@ -126,6 +127,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpu_idle_exit);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mpam_set);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_wq_lockup_pool);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_alloc_and_link_pwqs);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_create_worker);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ipi_stop);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sysrq_crash);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_printk_hotplug);
@ -187,6 +189,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_freq_qos_remove_request);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_set_balance_anon_file_reclaim);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_show_max_freq);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_shrink_slab_bypass);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_lz4_decompress_bypass);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_free_unref_page_bypass);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_kvmalloc_node_use_vmalloc);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_should_alloc_pages_retry);

View File

@ -53,8 +53,10 @@
/* UIC command timeout, unit: ms */
#define UIC_CMD_TIMEOUT 500
enum {
UIC_CMD_TIMEOUT_DEFAULT = 500,
UIC_CMD_TIMEOUT_MAX = 2000,
};
/* NOP OUT retries waiting for NOP IN response */
#define NOP_OUT_RETRIES 10
/* Timeout after 50 msecs if NOP OUT hangs without response */
@ -112,6 +114,23 @@ static bool is_mcq_supported(struct ufs_hba *hba)
module_param(use_mcq_mode, bool, 0644);
MODULE_PARM_DESC(use_mcq_mode, "Control MCQ mode for controllers starting from UFSHCI 4.0. 1 - enable MCQ, 0 - disable MCQ. MCQ is enabled by default");
static unsigned int uic_cmd_timeout = UIC_CMD_TIMEOUT_DEFAULT;
static int uic_cmd_timeout_set(const char *val, const struct kernel_param *kp)
{
return param_set_uint_minmax(val, kp, UIC_CMD_TIMEOUT_DEFAULT,
UIC_CMD_TIMEOUT_MAX);
}
static const struct kernel_param_ops uic_cmd_timeout_ops = {
.set = uic_cmd_timeout_set,
.get = param_get_uint,
};
module_param_cb(uic_cmd_timeout, &uic_cmd_timeout_ops, &uic_cmd_timeout, 0644);
MODULE_PARM_DESC(uic_cmd_timeout,
"UFS UIC command timeout in milliseconds. Defaults to 500ms. Supported values range from 500ms to 2 seconds inclusively");
#define ufshcd_toggle_vreg(_dev, _vreg, _on) \
({ \
int _ret; \
@ -2312,7 +2331,7 @@ static inline bool ufshcd_ready_for_uic_cmd(struct ufs_hba *hba)
{
u32 val;
int ret = read_poll_timeout(ufshcd_readl, val, val & UIC_COMMAND_READY,
500, UIC_CMD_TIMEOUT * 1000, false, hba,
500, uic_cmd_timeout * 1000, false, hba,
REG_CONTROLLER_STATUS);
return ret == 0 ? true : false;
}
@ -2372,7 +2391,7 @@ ufshcd_wait_for_uic_cmd(struct ufs_hba *hba, struct uic_command *uic_cmd)
lockdep_assert_held(&hba->uic_cmd_mutex);
if (wait_for_completion_timeout(&uic_cmd->done,
msecs_to_jiffies(UIC_CMD_TIMEOUT))) {
msecs_to_jiffies(uic_cmd_timeout))) {
ret = uic_cmd->argument2 & MASK_UIC_COMMAND_RESULT;
} else {
ret = -ETIMEDOUT;
@ -4169,7 +4188,7 @@ static int ufshcd_uic_pwr_ctrl(struct ufs_hba *hba, struct uic_command *cmd)
}
if (!wait_for_completion_timeout(hba->uic_async_done,
msecs_to_jiffies(UIC_CMD_TIMEOUT))) {
msecs_to_jiffies(uic_cmd_timeout))) {
dev_err(hba->dev,
"pwr ctrl cmd 0x%x with mode 0x%x completion timeout\n",
cmd->command, cmd->argument3);

View File

@ -193,7 +193,6 @@ int gunyah_vm_provide_folio(struct gunyah_vm *ghvm, struct folio *folio,
goto memextent_reclaim;
}
folio_get(folio);
return 0;
memextent_reclaim:
gunyah_error = gunyah_hypercall_memextent_donate(

View File

@ -6,6 +6,7 @@
#include "compress.h"
#include <linux/module.h>
#include <linux/lz4.h>
#include <trace/hooks/lz4_decompress.h>
#ifndef LZ4_DISTANCE_MAX /* history window size */
#define LZ4_DISTANCE_MAX 65535 /* set to maximum value by default */
@ -213,6 +214,7 @@ static int z_erofs_lz4_decompress_mem(struct z_erofs_lz4_decompress_ctx *ctx,
unsigned int inputmargin;
u8 *out, *headpage, *src;
int ret, maptype;
bool lz4_decompression_bypass = false;
DBG_BUGON(*rq->in == NULL);
headpage = kmap_local_page(*rq->in);
@ -238,6 +240,13 @@ static int z_erofs_lz4_decompress_mem(struct z_erofs_lz4_decompress_ctx *ctx,
return PTR_ERR(src);
out = dst + rq->pageofs_out;
trace_android_vh_lz4_decompress_bypass(src + inputmargin, out, rq->inputsize,
rq->outputsize, rq->inplace_io, &ret, &lz4_decompression_bypass);
if (lz4_decompression_bypass)
goto bypass_decompression;
/* legacy format could compress extra data in a pcluster. */
if (rq->partial_decoding || !support_0padding)
ret = LZ4_decompress_safe_partial(src + inputmargin, out,
@ -246,6 +255,7 @@ static int z_erofs_lz4_decompress_mem(struct z_erofs_lz4_decompress_ctx *ctx,
ret = LZ4_decompress_safe(src + inputmargin, out,
rq->inputsize, rq->outputsize);
bypass_decompression:
if (ret != rq->outputsize) {
erofs_err(rq->sb, "failed to decompress %d in[%u, %u] out[%u]",
ret, rq->inputsize, inputmargin, rq->outputsize);

View File

@ -37,11 +37,13 @@ void *z_erofs_get_gbuf(unsigned int requiredpages)
{
struct z_erofs_gbuf *gbuf;
migrate_disable();
gbuf = &z_erofs_gbufpool[z_erofs_gbuf_id()];
spin_lock(&gbuf->lock);
/* check if the buffer is too small */
if (requiredpages > gbuf->nrpages) {
spin_unlock(&gbuf->lock);
migrate_enable();
/* (for sparse checker) pretend gbuf->lock is still taken */
__acquire(gbuf->lock);
return NULL;
@ -56,6 +58,7 @@ void z_erofs_put_gbuf(void *ptr) __releases(gbuf->lock)
gbuf = &z_erofs_gbufpool[z_erofs_gbuf_id()];
DBG_BUGON(gbuf->ptr != ptr);
spin_unlock(&gbuf->lock);
migrate_enable();
}
int z_erofs_gbuf_growsize(unsigned int nrpages)

View File

@ -209,6 +209,8 @@ ssize_t fuse_passthrough_splice_write(struct pipe_inode_info *pipe,
file_end_write(backing_file);
fuse_invalidate_attr_mask(inode, FUSE_STATX_MODSIZE);
revert_creds(old_cred);
if (ret > 0)
fuse_copyattr(out, backing_file);
inode_unlock(inode);
return ret;

View File

@ -0,0 +1,21 @@
/* SPDX-License-Identifier: GPL-2.0 */
#undef TRACE_SYSTEM
#define TRACE_SYSTEM lz4_decompress
#define TRACE_INCLUDE_PATH trace/hooks
#if !defined(_TRACE_HOOK_LZ4_DECOMPRESS_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOK_LZ4_DECOMPRESS_H
#include <trace/hooks/vendor_hooks.h>
DECLARE_HOOK(android_vh_lz4_decompress_bypass,
TP_PROTO(const char *in, char *out,
unsigned int inlen, unsigned int outlen,
bool dip, int *ret, bool *bypass),
TP_ARGS(in, out, inlen, outlen, dip, ret, bypass));
#endif /* _TRACE_HOOK_LZ4_DECOMPRESS_H */
/* This part must be outside protection */
#include <trace/define_trace.h>

View File

@ -10,13 +10,23 @@
* Following tracepoints are not exported in tracefs and provide a
* mechanism for vendor modules to hook and extend functionality
*/
DECLARE_RESTRICTED_HOOK(android_rvh_create_worker,
TP_PROTO(struct task_struct *p, struct workqueue_attrs *attrs),
TP_ARGS(p, attrs), 1);
DECLARE_HOOK(android_vh_wq_lockup_pool,
TP_PROTO(int cpu, unsigned long pool_ts),
TP_ARGS(cpu, pool_ts));
#ifndef __GENKSYMS__
DECLARE_RESTRICTED_HOOK(android_rvh_alloc_and_link_pwqs,
TP_PROTO(struct workqueue_struct *wq, int *ret, bool *skip),
TP_ARGS(wq, ret, skip), 1);
#else
DECLARE_HOOK(android_rvh_alloc_and_link_pwqs,
TP_PROTO(struct workqueue_struct *wq, int *ret, bool *skip),
TP_ARGS(wq, ret, skip));
#endif
#endif /* _TRACE_HOOK_WQLOCKUP_H */
/* This part must be outside protection */

View File

@ -2220,6 +2220,7 @@ static struct worker *create_worker(struct worker_pool *pool)
}
set_user_nice(worker->task, pool->attrs->nice);
trace_android_rvh_create_worker(worker->task, pool->attrs);
kthread_bind_mask(worker->task, pool_allowed_cpus(pool));
/* successful, attach the worker to the pool */

View File

@ -244,9 +244,14 @@ static void tcp_measure_rcv_mss(struct sock *sk, const struct sk_buff *skb)
*/
if (unlikely(len != icsk->icsk_ack.rcv_mss)) {
u64 val = (u64)skb->len << TCP_RMEM_TO_WIN_SCALE;
u8 old_ratio = tcp_sk(sk)->scaling_ratio;
do_div(val, skb->truesize);
tcp_sk(sk)->scaling_ratio = val ? val : 1;
if (old_ratio != tcp_sk(sk)->scaling_ratio)
WRITE_ONCE(tcp_sk(sk)->window_clamp,
tcp_win_from_space(sk, sk->sk_rcvbuf));
}
icsk->icsk_ack.rcv_mss = min_t(unsigned int, len,
tcp_sk(sk)->advmss);
@ -749,7 +754,8 @@ void tcp_rcv_space_adjust(struct sock *sk)
* <prev RTT . ><current RTT .. ><next RTT .... >
*/
if (READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_moderate_rcvbuf)) {
if (READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_moderate_rcvbuf) &&
!(sk->sk_userlocks & SOCK_RCVBUF_LOCK)) {
u64 rcvwin, grow;
int rcvbuf;
@ -765,22 +771,12 @@ void tcp_rcv_space_adjust(struct sock *sk)
rcvbuf = min_t(u64, tcp_space_from_win(sk, rcvwin),
READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_rmem[2]));
if (!(sk->sk_userlocks & SOCK_RCVBUF_LOCK)) {
if (rcvbuf > sk->sk_rcvbuf) {
WRITE_ONCE(sk->sk_rcvbuf, rcvbuf);
if (rcvbuf > sk->sk_rcvbuf) {
WRITE_ONCE(sk->sk_rcvbuf, rcvbuf);
/* Make the window clamp follow along. */
WRITE_ONCE(tp->window_clamp,
tcp_win_from_space(sk, rcvbuf));
}
} else {
/* Make the window clamp follow along while being bounded
* by SO_RCVBUF.
*/
int clamp = tcp_win_from_space(sk, min(rcvbuf, sk->sk_rcvbuf));
if (clamp > tp->window_clamp)
WRITE_ONCE(tp->window_clamp, clamp);
/* Make the window clamp follow along. */
WRITE_ONCE(tp->window_clamp,
tcp_win_from_space(sk, rcvbuf));
}
}
tp->rcvq_space.space = copied;