No description
  • C 98.2%
  • Assembly 1%
  • Makefile 0.3%
  • Shell 0.2%
  • Python 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Kuan-Wei Chiu 7cd71d7574 perf bench: Fix undefined behavior in cmpworker()
commit 62892e77b8a64b9dc0e1da75980aa145347b6820 upstream.

The comparison function cmpworker() violates the C standard's
requirements for qsort() comparison functions, which mandate symmetry
and transitivity:

Symmetry: If x < y, then y > x.
Transitivity: If x < y and y < z, then x < z.

In its current implementation, cmpworker() incorrectly returns 0 when
w1->tid < w2->tid, which breaks both symmetry and transitivity. This
violation causes undefined behavior, potentially leading to issues such
as memory corruption in glibc [1].

Fix the issue by returning -1 when w1->tid < w2->tid, ensuring
compliance with the C standard and preventing undefined behavior.

Link: https://www.qualys.com/2024/01/30/qsort.txt [1]
Fixes: 121dd9ea01 ("perf bench: Add epoll parallel epoll_wait benchmark")
Cc: stable@vger.kernel.org
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Link: https://lore.kernel.org/r/20250116110842.4087530-1-visitorckw@gmail.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-03-13 12:43:08 +01:00
arch KVM: s390: vsie: fix some corner-cases when grabbing vsie pages 2025-03-13 12:43:07 +01:00
block partitions: ldm: remove the initial kernel-doc notation 2025-03-13 12:42:52 +01:00
certs
crypto crypto: pcrypt - Call crypto layer directly when padata_do_parallel() return -EBUSY 2024-12-14 19:44:23 +01:00
Documentation dt-bindings: mmc: controller: clarify the address-cells description 2025-03-13 12:42:53 +01:00
drivers clk: qcom: clk-rpmh: prevent integer overflow in recalc_rate 2025-03-13 12:43:07 +01:00
fs binfmt_flat: Fix integer overflow bug on 32 bit systems 2025-03-13 12:43:07 +01:00
include KVM: Explicitly verify target vCPU is online in kvm_get_vcpu() 2025-03-13 12:43:07 +01:00
init initramfs: avoid filename buffer overrun 2024-12-14 19:44:21 +01:00
ipc
kernel tasklet: Introduce new initialization API 2025-03-13 12:43:04 +01:00
lib lib: string_helpers: silence snprintf() output truncation warning 2024-12-14 19:44:39 +01:00
LICENSES
mm mm: vmscan: account for free pages to prevent infinite Loop in throttle_direct_reclaim() 2025-01-09 13:23:37 +01:00
net Bluetooth: L2CAP: handle NULL sock pointer in l2cap_sock_alloc 2025-03-13 12:43:07 +01:00
samples samples/bpf: Fix a resource leak 2024-12-14 19:44:50 +01:00
scripts genksyms: fix memory leak when the same symbol is read from *.symref file 2025-03-13 12:43:00 +01:00
security tomoyo: don't emit warning in tomoyo_write_control() 2025-03-13 12:43:03 +01:00
sound ASoC: sun4i-spdif: Add clock multiplier settings 2025-03-13 12:42:55 +01:00
tools perf bench: Fix undefined behavior in cmpworker() 2025-03-13 12:43:08 +01:00
usr
virt KVM: arm64: Ignore PMCNTENSET_EL0 while checking for overflow status 2024-12-19 18:05:04 +01:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore Remove *.orig pattern from .gitignore 2024-11-08 16:20:33 +01:00
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile kbuild: userprogs: use correct lld when linking through clang 2025-03-13 12:43:04 +01:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.