commit klp-build for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package klp-build for openSUSE:Factory checked in at 2024-08-01 22:05:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/klp-build (Old) and /work/SRC/openSUSE:Factory/.klp-build.new.7232 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "klp-build" Thu Aug 1 22:05:14 2024 rev:6 rq:1190859 version:0~20240731.edfe0bf Changes: -------- --- /work/SRC/openSUSE:Factory/klp-build/klp-build.changes 2024-07-29 21:53:46.852104301 +0200 +++ /work/SRC/openSUSE:Factory/.klp-build.new.7232/klp-build.changes 2024-08-01 22:05:51.460001070 +0200 @@ -1,0 +2,9 @@ +Thu Aug 01 05:39:12 UTC 2024 - mvetter@suse.com + +- Update to version 0~20240731.edfe0bf: + * Add new test for CVE-2021-47402 + * test.sh: Simplify call to setup_extract_count + * klpbuild: Copy the .config from the right place + * templ: Add spaces between KLP_RELOC_SYMBOL macro arguments + +------------------------------------------------------------------- Old: ---- klp-build-0~20240725.cc0513f.tar.xz New: ---- klp-build-0~20240731.edfe0bf.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ klp-build.spec ++++++ --- /var/tmp/diff_new_pack.U0ns4i/_old 2024-08-01 22:05:53.472084056 +0200 +++ /var/tmp/diff_new_pack.U0ns4i/_new 2024-08-01 22:05:53.476084221 +0200 @@ -18,7 +18,7 @@ %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} Name: klp-build -Version: 0~20240725.cc0513f +Version: 0~20240731.edfe0bf Release: 0 Summary: The kernel livepatching creation tool License: GPL-2.0-only ++++++ _service ++++++ --- /var/tmp/diff_new_pack.U0ns4i/_old 2024-08-01 22:05:53.500085211 +0200 +++ /var/tmp/diff_new_pack.U0ns4i/_new 2024-08-01 22:05:53.504085376 +0200 @@ -2,7 +2,7 @@ <service name="tar_scm" mode="manual"> <param name="scm">git</param> <param name="url">https://github.com/SUSE/klp-build</param> - <param name="revision">cc0513fdedb78113bad1f5afc60bc37ad1c5f301</param> + <param name="revision">edfe0bfa92a2a247816292a4059c206a2783bd50</param> <param name="versionformat">0~%cd.%h</param> <param name="changesgenerate">enable</param> <param name="changesauthor">mvetter@suse.com</param> ++++++ klp-build-0~20240725.cc0513f.tar.xz -> klp-build-0~20240731.edfe0bf.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/klp-build-0~20240725.cc0513f/klpbuild/config.py new/klp-build-0~20240731.edfe0bf/klpbuild/config.py --- old/klp-build-0~20240725.cc0513f/klpbuild/config.py 2024-07-25 18:01:15.000000000 +0200 +++ new/klp-build-0~20240731.edfe0bf/klpbuild/config.py 2024-07-31 22:46:43.000000000 +0200 @@ -248,6 +248,13 @@ def get_ktype(self, cs): return "rt" if self.cs_is_rt(cs) else "default" + # The config file is copied from boot/config-<version> to linux-obj when we + # extract the code, and after that we always check for the config on the + # -obj dir. Return the original path here so we can use this function on the + # extraction code. + def get_cs_kernel_config(self, cs, arch): + return Path(self.get_data_dir(arch), "boot", f"config-{self.get_cs_kernel(cs)}-{self.get_ktype(cs)}") + def get_cs_boot_file(self, cs, file, arch=""): if file == "vmlinux": if self.kdir: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/klp-build-0~20240725.cc0513f/klpbuild/ibs.py new/klp-build-0~20240731.edfe0bf/klpbuild/ibs.py --- old/klp-build-0~20240725.cc0513f/klpbuild/ibs.py 2024-07-25 18:01:15.000000000 +0200 +++ new/klp-build-0~20240731.edfe0bf/klpbuild/ibs.py 2024-07-31 22:46:43.000000000 +0200 @@ -201,7 +201,7 @@ subprocess.check_output(rf'find {vmlinux_path} -name "*gz" -exec gzip -d -f {{}} \;', shell=True) # Use the SLE .config - shutil.copy(self.get_cs_boot_file(cs, ".config"), Path(self.get_odir(cs), ".config")) + shutil.copy(self.get_cs_kernel_config(cs, ARCH), Path(self.get_odir(cs), ".config")) # Recreate the build link to enable us to test the generated LP mod_path = Path(self.get_mod_path(cs, ARCH), "build") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/klp-build-0~20240725.cc0513f/klpbuild/templ.py new/klp-build-0~20240731.edfe0bf/klpbuild/templ.py --- old/klp-build-0~20240725.cc0513f/klpbuild/templ.py 2024-07-25 18:01:15.000000000 +0200 +++ new/klp-build-0~20240731.edfe0bf/klpbuild/templ.py 2024-07-31 22:46:43.000000000 +0200 @@ -201,7 +201,7 @@ for sym in syms: start = f"extern typeof({sym})" lsym = f"{sym}" - end = f"KLP_RELOC_SYMBOL({ibt_mod},{obj},{sym});" + end = f"KLP_RELOC_SYMBOL({ibt_mod}, {obj}, {sym});" if len(start + lsym + end) < 80: ext_list.append(f"{start} {lsym} {end}") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/klp-build-0~20240725.cc0513f/tests/test.sh new/klp-build-0~20240731.edfe0bf/tests/test.sh --- old/klp-build-0~20240725.cc0513f/tests/test.sh 2024-07-25 18:01:15.000000000 +0200 +++ new/klp-build-0~20240731.edfe0bf/tests/test.sh 2024-07-31 22:46:43.000000000 +0200 @@ -14,9 +14,9 @@ setup_extract_count() { - local max_lines="$1" + local lp_name="$1" shift - local patch_="$1" + local max_lines="$1" shift local conf_="$1" shift @@ -28,37 +28,50 @@ echo echo - echo "Extracting $patch_" + echo "Extracting $lp_name" - rm -rf $KLP_WORK_DIR/$patch_ + rm -rf $KLP_WORK_DIR/$lp_name if [ -n "$mod_" ]; then - klp-build setup --name $patch_ --kdir --data-dir $KLP_GIT_SOURCE --conf $conf_ --module $mod_ --file-funcs $file_ $@ + klp-build setup --name $lp_name --kdir --data-dir $KLP_GIT_SOURCE --conf $conf_ --module $mod_ --file-funcs $file_ $@ else - klp-build setup --name $patch_ --kdir --data-dir $KLP_GIT_SOURCE --conf $conf_ --file-funcs $file_ $@ + klp-build setup --name $lp_name --kdir --data-dir $KLP_GIT_SOURCE --conf $conf_ --file-funcs $file_ $@ fi - klp-build extract --name $patch_ --type ce + klp-build extract --name $lp_name --type ce # Check if the extracted code compiles - make -C $KLP_WORK_DIR/$patch_/ce/linux/lp + make -C $KLP_WORK_DIR/$lp_name/ce/linux/lp - nlines=$(cat $KLP_WORK_DIR/$patch_/ce/linux/lp/livepatch_${patch_}.c | wc -l) + nlines=$(cat $KLP_WORK_DIR/$lp_name/ce/linux/lp/livepatch_${lp_name}.c | wc -l) if [ "$nlines" -gt "$max_lines" ]; then - echo "ERROR: Generated file for $patch_ contains $nlines LoC, but should contain < $max_lines LoC" + echo "ERROR: Generated file for $lp_name contains $nlines LoC, but should contain < $max_lines LoC" exit 1 fi } -setup_extract_count "105" lp_proc_cmdline_show CONFIG_PROC_FS "" fs/proc/cmdline.c cmdline_proc_show - -setup_extract_count "640" lp_cve_2021_22600 CONFIG_UNIX af_packet net/packet/af_packet.c packet_set_ring - -setup_extract_count "700" lp_ipv6_route_multipath_add CONFIG_IPV6 ipv6 net/ipv6/route.c ip6_route_multipath_add - -setup_extract_count "88" lp_cve_2024_27398 CONFIG_BT bluetooth net/bluetooth/sco.c sco_sock_timeout - -setup_extract_count "170" lp_cve_2024_26923 CONFIG_UNIX "" net/unix/garbage.c unix_gc - -# FIXME: we should take a look into it to reduce the number of lines generated. -setup_extract_count "830" lp_cve_2024_35950 CONFIG_DRM "" drivers/gpu/drm/drm_client_modeset.c drm_client_modeset_probe - -# FIXME: we should take a look into it to reduce the number of lines generated. -setup_extract_count "2832" lp_cve_2021_47378 CONFIG_NVME_RDMA nvme-rdma drivers/nvme/host/rdma.c nvme_rdma_free_queue nvme_rdma_cm_handler +# FIXME: we should take a look into it to reduce the number of lines generated +# for: +# lp_cve_2024_35950 +# lp_cve_2021_47378 +LPS=$(cat << EOF +lp_proc_cmdline_show 105 CONFIG_PROC_FS vmlinux fs/proc/cmdline.c \ + cmdline_proc_show +lp_cve_2021_22600 640 CONFIG_UNIX af_packet net/packet/af_packet.c \ + packet_set_ring +lp_ipv6_route_multipath_add 700 CONFIG_IPV6 ipv6 net/ipv6/route.c \ + ip6_route_multipath_add +lp_cve_2024_27398 88 CONFIG_BT bluetooth net/bluetooth/sco.c \ + sco_sock_timeout +lp_cve_2024_26923 170 CONFIG_UNIX vmlinux net/unix/garbage.c \ + unix_gc +lp_cve_2024_35950 830 CONFIG_DRM vmlinux drivers/gpu/drm/drm_client_modeset.c \ + drm_client_modeset_probe +lp_cve_2021_47378 2832 CONFIG_NVME_RDMA nvme-rdma drivers/nvme/host/rdma.c \ + nvme_rdma_free_queue \ + nvme_rdma_cm_handler +lp_cve_2021_47402 194 CONFIG_NET_CLS_FLOWER cls_flower net/sched/cls_flower.c \ + fl_walk +EOF +) + +while IFS=, read lp_name loc config mod file funcs; do + setup_extract_count $lp_name $loc $config $mod $file $funcs +done <<< "$LPS"
participants (1)
-
Source-Sync