mirror of
https://git.yoctoproject.org/poky
synced 2026-04-05 08:02:25 +02:00
linux/generate-cve-exclusions: add version check warning
Embed the version that this file was generated for in the include, and compare it to the version that is being checked. This should act as a reminder to update the file when the kernel is upgraded. (From OE-Core rev: 645066ecec0f52eac0225a144285f44882003856) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
d2d5b2ad3c
commit
2b0eac4dd6
@@ -42,9 +42,18 @@ def main(argp=None):
|
||||
with open(datadir / "data" / "stream_fixes.json", "r") as f:
|
||||
stream_data = json.load(f)
|
||||
|
||||
print("# Auto-generated CVE metadata, DO NOT EDIT BY HAND.")
|
||||
print(f"# Generated at {datetime.datetime.now()} for version {version}")
|
||||
print()
|
||||
print(f"""
|
||||
# Auto-generated CVE metadata, DO NOT EDIT BY HAND.
|
||||
# Generated at {datetime.datetime.now()} for version {version}
|
||||
|
||||
python check_kernel_cve_status_version() {{
|
||||
this_version = "{version}"
|
||||
kernel_version = d.getVar("LINUX_VERSION")
|
||||
if kernel_version != this_version:
|
||||
bb.warn("Kernel CVE status needs updating: generated for %s but kernel is %s" % (this_version, kernel_version))
|
||||
}}
|
||||
do_cve_check[prefuncs] += "check_kernel_cve_status_version"
|
||||
""")
|
||||
|
||||
for cve, data in cve_data.items():
|
||||
if "affected_versions" not in data:
|
||||
|
||||
Reference in New Issue
Block a user