linux-stable/kernel
Pan Taixi 3c735c4470 tracing: Fix compilation warning on arm32
commit 2fbdb6d8e0 upstream.

On arm32, size_t is defined to be unsigned int, while PAGE_SIZE is
unsigned long. This hence triggers a compilation warning as min()
asserts the type of two operands to be equal. Casting PAGE_SIZE to size_t
solves this issue and works on other target architectures as well.

Compilation warning details:

kernel/trace/trace.c: In function 'tracing_splice_read_pipe':
./include/linux/minmax.h:20:28: warning: comparison of distinct pointer types lacks a cast
  (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
                            ^
./include/linux/minmax.h:26:4: note: in expansion of macro '__typecheck'
   (__typecheck(x, y) && __no_side_effects(x, y))
    ^~~~~~~~~~~

...

kernel/trace/trace.c:6771:8: note: in expansion of macro 'min'
        min((size_t)trace_seq_used(&iter->seq),
        ^~~

Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/20250526013731.1198030-1-pantaixi@huaweicloud.com
Fixes: f5178c41bb ("tracing: Fix oob write in trace_seq_to_buffer()")
Reviewed-by: Jeongjun Park <aha310510@gmail.com>
Signed-off-by: Pan Taixi <pantaixi@huaweicloud.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-06-27 11:03:59 +01:00
..
bpf bpf: Check rcu_read_lock_trace_held() before calling bpf map helpers 2025-05-02 07:41:07 +02:00
cgroup cgroup: Fix compilation issue due to cgroup_mutex not being exported 2025-06-04 14:36:58 +02:00
configs
debug kdb: Do not assume write() callback available 2025-03-13 12:47:22 +01:00
dma dma/contiguous: avoid warning about unused size_bytes 2025-05-02 07:41:14 +02:00
entry
events perf/ring_buffer: Allow the EPOLLRDNORM flag for poll 2025-04-10 14:30:56 +02:00
futex futex: Don't include process MM in futex key on no-MMU 2023-11-20 11:06:44 +01:00
gcov gcov: add support for GCC 14 2024-07-05 09:12:41 +02:00
irq genirq: Make handle_enforce_irqctx() unconditionally available 2025-03-13 12:46:45 +01:00
kcsan kcsan: Turn report_filterlist_lock into a raw_spinlock 2024-12-14 19:48:25 +01:00
livepatch kallsyms: refactor {,module_}kallsyms_on_each_symbol 2024-06-21 14:52:58 +02:00
locking locking/lockdep: Decrease nr_unused_locks if lock unused in zap_class() 2025-05-02 07:40:55 +02:00
power PM: hibernate: Add error handling for syscore_suspend() 2025-03-13 12:46:57 +01:00
printk printk: Fix signed integer overflow when defining LOG_BUF_LEN_MAX 2025-03-13 12:47:01 +01:00
rcu rcu: handle quiescent states for PREEMPT_RCU=n, PREEMPT_COUNT=y 2025-06-04 14:37:05 +02:00
sched cpufreq/sched: Fix the usage of CPUFREQ_NEED_UPDATE_LIMITS 2025-05-02 07:41:00 +02:00
time posix-timers: Add cond_resched() to posix_timer_add() search loop 2025-06-04 14:37:00 +02:00
trace tracing: Fix compilation warning on arm32 2025-06-27 11:03:59 +01:00
.gitignore
acct.c acct: perform last write from workqueue 2025-03-13 12:47:35 +01:00
async.c async: Introduce async_schedule_dev_nocall() 2024-02-23 08:41:53 +01:00
audit_fsnotify.c fsnotify: make allow_dups a property of the group 2024-06-21 14:53:39 +02:00
audit_tree.c fsnotify: pass flags argument to fsnotify_alloc_group() 2024-06-21 14:53:39 +02:00
audit_watch.c fsnotify: pass flags argument to fsnotify_alloc_group() 2024-06-21 14:53:39 +02:00
audit.c audit: Send netlink ACK before setting connection in auditd_set 2024-02-23 08:42:03 +01:00
audit.h
auditfilter.c ima: Avoid blocking in RCU read-side critical section 2024-07-18 13:05:44 +02:00
auditsc.c audit: fix possible soft lockup in __audit_inode_child() 2023-09-19 12:20:13 +02:00
backtracetest.c
bounds.c bounds: Use the right number of bits for power-of-two CONFIG_NR_CPUS 2024-05-02 16:23:46 +02:00
capability.c
compat.c
configs.c
context_tracking.c
cpu_pm.c
cpu.c hrtimers: Handle CPU state correctly on hotplug 2025-02-01 18:22:29 +01:00
crash_core.c
crash_dump.c
cred.c cred: switch to using atomic_long_t 2023-12-20 15:44:30 +01:00
delayacct.c
dma.c
exec_domain.c
exit.c mm: optimize the redundant loop of mm_update_owner_next() 2024-07-18 13:05:42 +02:00
extable.c
fail_function.c
fork.c fork: use pidfd_prepare() 2025-06-04 14:37:08 +02:00
freezer.c
gen_kheaders.sh kheaders: Ignore silly-rename files 2025-02-01 18:22:28 +01:00
groups.c
hung_task.c
iomem.c
irq_work.c
jump_label.c
kallsyms.c kallsyms: Make kallsyms_on_each_symbol generally available 2024-10-17 15:08:29 +02:00
kcmp.c kcmp: In get_file_raw_ptr use task_lookup_fd_rcu 2024-06-21 14:52:48 +02:00
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt
kcov.c kcov: don't lose track of remote references during softirqs 2024-07-05 09:12:41 +02:00
kexec_core.c kexec: fix a memory leak in crash_shrink_memory() 2023-07-27 08:43:40 +02:00
kexec_elf.c kexec: initialize ELF lowest address to ULONG_MAX 2025-04-10 14:30:58 +02:00
kexec_file.c
kexec_internal.h
kexec.c
kheaders.c
kmod.c
kprobes.c x86/ibt,ftrace: Search for __fentry__ location 2024-10-17 15:07:37 +02:00
ksysfs.c
kthread.c kthread: fix task state in kthread worker if being frozen 2024-10-17 15:07:50 +02:00
latencytop.c
Makefile
module_signature.c
module_signing.c
module-internal.h
module.c kallsyms: Make module_kallsyms_on_each_symbol generally available 2024-10-17 15:08:29 +02:00
notifier.c
nsproxy.c
padata.c padata: do not leak refcount in reorder_work 2025-06-04 14:37:07 +02:00
panic.c panic: Flush kernel log buffer at the end 2024-04-13 12:59:40 +02:00
params.c module: ensure that kobject_put() is safe for module type kobjects 2025-06-04 14:36:55 +02:00
pid_namespace.c zap_pid_ns_processes: clear TIF_NOTIFY_SIGNAL along with TIF_SIGPENDING 2024-07-05 09:12:33 +02:00
pid.c kernel/pid.c: implement additional checks upon pidfd_create() parameters 2024-06-21 14:53:17 +02:00
profile.c kernel: Initialize cpumask before parsing 2025-01-09 13:25:04 +01:00
ptrace.c
range.c
reboot.c kernel/reboot: emergency_restart: Set correct system_state 2023-11-28 16:54:58 +00:00
regset.c
relay.c
resource.c kernel/resource: fix kfree() of bootmem memory again 2025-05-02 07:41:09 +02:00
rseq.c
scftorture.c scftorture: Forgive memory-allocation failure if KASAN 2023-09-23 11:01:05 +02:00
scs.c
seccomp.c seccomp: Invalidate seccomp mode to catch death failures 2024-03-01 13:16:46 +01:00
signal.c signal: Replace BUG_ON()s 2024-10-17 15:08:12 +02:00
smp.c smp: Add missing destroy_work_on_stack() call in smp_call_on_cpu() 2024-09-12 11:06:48 +02:00
smpboot.c
smpboot.h
softirq.c
stackleak.c
stacktrace.c
static_call.c x86/static-call: provide a way to do very early static-call updates 2024-12-19 18:06:13 +01:00
stop_machine.c
sys_ni.c syscalls: fix compat_sys_io_pgetevents_time64 usage 2024-07-05 09:12:55 +02:00
sys.c fs: add file and path permissions helpers 2024-06-21 14:52:58 +02:00
sysctl-test.c
sysctl.c sysctl: introduce new proc handler proc_dobool 2024-06-21 14:53:18 +02:00
task_work.c task_work: Introduce task_work_cancel() again 2024-08-19 05:40:57 +02:00
taskstats.c
test_kprobes.c
torture.c torture: Fix hang during kthread shutdown phase 2023-08-30 16:23:17 +02:00
tracepoint.c
tsacct.c
ucount.c fanotify: configurable limits via sysfs 2024-06-21 14:53:06 +02:00
uid16.c
uid16.h
umh.c
up.c
user_namespace.c
user-return-notifier.c
user.c
usermode_driver.c
utsname_sysctl.c
utsname.c
watch_queue.c watch_queue: fix pipe accounting mismatch 2025-04-10 14:30:55 +02:00
watchdog_hld.c watchdog/perf: properly initialize the turbo mode timestamp and rearm counter 2024-08-19 05:41:01 +02:00
watchdog.c watchdog: move softlockup_panic back to early_param 2023-11-28 16:54:56 +00:00
workqueue_internal.h
workqueue.c Revert "workqueue: remove unused cancel_work()" 2023-12-08 08:46:13 +01:00