<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-next.git/tools/perf, branch master</title>
<subtitle>Linux kernel latest source</subtitle>
<id>http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/'/>
<updated>2026-09-04T17:15:12+00:00</updated>
<entry>
<title>Merge branch 'loongarch-next' of https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson.git</title>
<updated>2026-09-04T17:15:12+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-09-04T17:15:12+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=c5e4b04d58a4973c533edecaef2616e50e5c6510'/>
<id>urn:sha1:c5e4b04d58a4973c533edecaef2616e50e5c6510</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'perf-tools-next' of https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git</title>
<updated>2026-09-04T17:14:34+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-09-04T17:14:34+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=ba3bd66de8a1625c07344896bf48d09c280b6c00'/>
<id>urn:sha1:ba3bd66de8a1625c07344896bf48d09c280b6c00</id>
<content type='text'>
</content>
</entry>
<entry>
<title>perf build: Add clang and rust target flags for LoongArch</title>
<updated>2026-09-04T13:45:27+00:00</updated>
<author>
<name>Haiyong Sun</name>
<email>sunhaiyong@loongson.cn</email>
</author>
<published>2026-09-04T13:45:27+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=a2628ce4ddb6873e35380a42396d17a66e704a1a'/>
<id>urn:sha1:a2628ce4ddb6873e35380a42396d17a66e704a1a</id>
<content type='text'>
Add missing CLANG_TARGET_FLAGS_loongarch and RUST_TARGET_FLAGS_loongarch
so that perf can be built with clang and enable rust cross compilation.

Cc: stable@vger.kernel.org
Acked-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Acked-by: Dmitrii Dolgov &lt;9erthalion6@gmail.com&gt;
Signed-off-by: Haiyong Sun &lt;sunhaiyong@loongson.cn&gt;
Signed-off-by: WANG Rui &lt;wangrui@loongson.cn&gt;
Signed-off-by: Huacai Chen &lt;chenhuacai@loongson.cn&gt;
</content>
</entry>
<entry>
<title>perf jitdump: Validate unwinding sizes against record payload</title>
<updated>2026-08-31T12:06:05+00:00</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2026-06-17T17:00:22+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=92d50319b4f0c0bbee8a236a09063272cd22faab'/>
<id>urn:sha1:92d50319b4f0c0bbee8a236a09063272cd22faab</id>
<content type='text'>
jit_repipe_unwinding_info() copies unwinding_size and eh_frame_hdr_size
from the jitdump record into jd-&gt; fields without checking them against
the actual payload size.  Downstream, jit_add_eh_frame_info() in
genelf.c computes unwinding_table_size = unwinding_size -
eh_frame_hdr_size, which underflows when eh_frame_hdr_size &gt;
unwinding_size.  The result is passed as d-&gt;d_size to libelf, causing
an OOB heap read into the output ELF file.

Validate that unwinding_size fits within the record payload and that
eh_frame_hdr_size does not exceed unwinding_size before allocating or
storing the values, so a bogus record cannot force a large allocation
that is then discarded.

mapped_size is likewise taken from the record and was narrowed into an
int for the mmap2 len computation in jit_repipe_code_load() and
jit_repipe_code_move(); values above INT_MAX would turn negative,
producing a wrong mmap2 length.  Use uint64_t for usize so the value
cannot truncate.

Fixes: 0284fecd13b6db3e ("perf jit: Add unwinding support")
Reported-by: sashiko-bot &lt;sashiko-bot@kernel.org&gt;
Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Cc: Stefano Sanfilippo &lt;ssanfilippo@chromium.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf jitdump: Validate sym string NUL-termination in code load</title>
<updated>2026-08-31T12:05:59+00:00</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2026-06-17T16:59:06+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=98bfe1142ccbaa5ffdca5dcdddd26f238ad33585'/>
<id>urn:sha1:98bfe1142ccbaa5ffdca5dcdddd26f238ad33585</id>
<content type='text'>
jit_repipe_code_load() computes sym = (void *)jr + sizeof(jr-&gt;load) and
passes it to jit_emit_elf() which calls strlen(sym) via jit_write_elf().
If code_size equals total_size - sizeof(jr-&gt;load), the sym pointer
aliases the code blob with no NUL terminator, and strlen() scans past
the buffer into adjacent heap memory.

Add a memchr() check to verify the symbol name is NUL-terminated within
the region between the load header and the code blob before use.

Fixes: 598b7c6919c7bbcc ("perf jit: add source line info support")
Reported-by: sashiko-bot &lt;sashiko-bot@kernel.org&gt;
Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf jitdump: Validate debug entries on native (non-swap) path</title>
<updated>2026-08-31T12:05:52+00:00</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2026-06-17T16:52:15+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=51e14e495f0cea061bbad33e7635f7fd857113ad'/>
<id>urn:sha1:51e14e495f0cea061bbad33e7635f7fd857113ad</id>
<content type='text'>
The bounds-checking and nr_entry clamping added for the byte-swap path
only runs when jd-&gt;needs_bswap is true.  On native-endian files, nr_entry
passes through unvalidated to jit_repipe_debug_info(), which stores it
as jd-&gt;nr_debug_entries.  Downstream, jit_process_debug_info() in
genelf_debug.c iterates nr_debug_entries times via debug_entry_next(),
which calls strlen() on each entry's name field — a crafted nr_entry
causes OOB reads and writes.

Add bounds-checked iteration in jit_repipe_debug_info() that validates
each debug_entry fits in the payload and its name is NUL-terminated
before calling debug_entry_next().  Clamp nr_debug_entries to the count
of valid entries.

Fixes: 598b7c6919c7bbcc ("perf jit: add source line info support")
Reported-by: sashiko-bot &lt;sashiko-bot@kernel.org&gt;
Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf jitdump: Use dirname() return value in jit_open()</title>
<updated>2026-08-31T12:05:43+00:00</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2026-06-15T23:41:33+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=4eddf7d9e341eb8c41704b8aa27b4a91f4e2c7c9'/>
<id>urn:sha1:4eddf7d9e341eb8c41704b8aa27b4a91f4e2c7c9</id>
<content type='text'>
jit_open() calls dirname(jd-&gt;dir) but ignores the return value.  POSIX
says dirname() may return a pointer to internal static storage — glibc
does this when the path has no '/', returning "." from a static buffer
and leaving jd-&gt;dir unchanged with the original filename.

Capture the return value and copy it back to jd-&gt;dir when dirname()
returns a different pointer.

Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support")
Reported-by: sashiko-bot &lt;sashiko-bot@kernel.org&gt;
Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf jitdump: Free event in jit_repipe_code_move()</title>
<updated>2026-08-31T12:05:36+00:00</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2026-06-15T23:39:32+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=7fc5851aac606b9e4143f6857710cc5f346770c5'/>
<id>urn:sha1:7fc5851aac606b9e4143f6857710cc5f346770c5</id>
<content type='text'>
jit_repipe_code_move() allocates a perf_event with calloc but never
frees it — the 'out' label exits with only perf_sample__exit().

The sibling function jit_repipe_code_load() correctly calls
free(event) at its out label.  Add the same free(event) to
jit_repipe_code_move().

Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support")
Reported-by: sashiko-bot &lt;sashiko-bot@kernel.org&gt;
Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf jitdump: Fix funlockfile on unlocked stream in jit_open() error path</title>
<updated>2026-08-31T12:05:26+00:00</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2026-06-15T23:35:55+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=bfde6848c1e24fd979d0138c57c1cc28c35093c3'/>
<id>urn:sha1:bfde6848c1e24fd979d0138c57c1cc28c35093c3</id>
<content type='text'>
If the malloc() for the initial read buffer fails, jit_open() jumps to
the error label which calls funlockfile(jd-&gt;in).  However, flockfile()
is called later in the function, so at this point the stream was never
locked.  Calling funlockfile() on an unlocked stream is undefined
behavior per POSIX.

Split the error path into two labels: 'error' (after flockfile) calls
funlockfile before cleanup, 'error_noflock' (before flockfile) skips
the unlock.

Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support")
Reported-by: sashiko-bot &lt;sashiko-bot@kernel.org&gt;
Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf jitdump: Check snprintf return before computing header size</title>
<updated>2026-08-31T12:05:19+00:00</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2026-06-15T23:27:43+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=0155f05ea6e133c18a04b8b5945cac59870da156'/>
<id>urn:sha1:0155f05ea6e133c18a04b8b5945cac59870da156</id>
<content type='text'>
snprintf() returns the would-have-been length on truncation.  When the
jitted filename exceeds PATH_MAX, the unclamped 'size' value inflates
sizeof(event-&gt;mmap2.filename) - size into a massive underflow, causing
the header.size computation to write an oversized header.  The
subsequent write to 'id = event + header.size - idr_size' then corrupts
the heap.

Clamp size to PATH_MAX - 1 after snprintf in both jit_repipe_code_load()
and jit_repipe_code_move().

Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support")
Reported-by: sashiko-bot &lt;sashiko-bot@kernel.org&gt;
Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Assisted-by: LLM
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
