Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Prasanth R <ragaprasanth@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Daniel Turull <daniel.turull@ericsson.com>,
	Prasanth R <ragaprasanth@gmail.com>
Subject: [PATCH 1/2] improve_kernel_cve_report: stop when debug sources list no files
Date: Thu,  3 Dec 2026 14:33:47 +0900	[thread overview]
Message-ID: <20261203053348.4024389-1-ragaprasanth@gmail.com> (raw)

A kernel built without debug info (CONFIG_DEBUG_INFO_NONE) has only empty
entries in its debugsources file, and the script fails with an IndexError.
Skipping them is not enough: with no compiled files left, every CVE would
be ignored as not applicable. Skip entries without a path and stop with a
clear message if nothing is left.

Found with linux-fslc for imx6qdlsabresd.

AI-Generated: Uses Claude
Signed-off-by: Prasanth R <prasanth.r@lineo.co.jp>
---
 scripts/contrib/improve_kernel_cve_report.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/contrib/improve_kernel_cve_report.py b/scripts/contrib/improve_kernel_cve_report.py
index 41cbc1e222..76ba54d835 100755
--- a/scripts/contrib/improve_kernel_cve_report.py
+++ b/scripts/contrib/improve_kernel_cve_report.py
@@ -252,8 +252,14 @@ def read_debugsources(file_path):
             # We need to remove one level from the debug sources
             for source_list in json_data.values():
                 for source in source_list:
+                    # entries are empty if the kernel has no debug info
+                    if "/" not in source:
+                        continue
                     src = source.split("/",1)[1]
                     cfiles.add(src)
+    if not cfiles:
+        sys.exit(f"{file_path} lists no compiled sources: "
+                 "is the kernel built without debug info (CONFIG_DEBUG_INFO)?")
     return cfiles
 
 def check_kernel_compiled_files(compiled_files, cve_info):
-- 
2.34.1


             reply	other threads:[~2026-12-03  5:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03  5:33 Prasanth R [this message]
2026-12-03  5:33 ` [PATCH 2/2] improve_kernel_cve_report: use the zstd tool if zstandard is missing Prasanth R
2026-12-04 13:26   ` Paul Barker
2026-12-04 13:42     ` Prasanth R

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261203053348.4024389-1-ragaprasanth@gmail.com \
    --to=ragaprasanth@gmail.com \
    --cc=daniel.turull@ericsson.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox