Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libpulp for openSUSE:Factory checked in at 2025-10-03 15:44:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libpulp (Old) and /work/SRC/openSUSE:Factory/.libpulp.new.11973 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libpulp" Fri Oct 3 15:44:16 2025 rev:15 rq:1308718 version:0.3.17 Changes: -------- --- /work/SRC/openSUSE:Factory/libpulp/libpulp.changes 2025-09-22 19:29:17.797890217 +0200 +++ /work/SRC/openSUSE:Factory/.libpulp.new.11973/libpulp.changes 2025-10-03 15:45:30.745713959 +0200 @@ -1,0 +2,6 @@ +Thu Oct 2 14:45:48 UTC 2025 - Giuliano Belinassi <[email protected]> + +- Update package with libpulp-0.3.17: + - Fix dlopen and dlmopen search paths (bsc#1250436). + +------------------------------------------------------------------- Old: ---- libpulp-0.3.16.tar.gz New: ---- libpulp-0.3.17.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libpulp.spec ++++++ --- /var/tmp/diff_new_pack.YtqCQv/_old 2025-10-03 15:45:32.597791550 +0200 +++ /var/tmp/diff_new_pack.YtqCQv/_new 2025-10-03 15:45:32.621792556 +0200 @@ -17,7 +17,7 @@ Name: libpulp -Version: 0.3.16 +Version: 0.3.17 Release: 0 Summary: Userspace live patching library and tools License: LGPL-2.1-or-later ++++++ libpulp-0.3.16.tar.gz -> libpulp-0.3.17.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpulp-0.3.16/configure new/libpulp-0.3.17/configure --- old/libpulp-0.3.16/configure 2025-09-04 23:11:01.000000000 +0200 +++ new/libpulp-0.3.17/configure 2025-10-03 00:03:13.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.72 for libpulp 0.3.16. +# Generated by GNU Autoconf 2.72 for libpulp 0.3.17. # # Report bugs to <[email protected]>. # @@ -614,8 +614,8 @@ # Identity of this package. PACKAGE_NAME='libpulp' PACKAGE_TARNAME='libpulp' -PACKAGE_VERSION='0.3.16' -PACKAGE_STRING='libpulp 0.3.16' +PACKAGE_VERSION='0.3.17' +PACKAGE_STRING='libpulp 0.3.17' PACKAGE_BUGREPORT='[email protected]' PACKAGE_URL='' @@ -1423,7 +1423,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -'configure' configures libpulp 0.3.16 to adapt to many kinds of systems. +'configure' configures libpulp 0.3.17 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1495,7 +1495,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libpulp 0.3.16:";; + short | recursive ) echo "Configuration of libpulp 0.3.17:";; esac cat <<\_ACEOF @@ -1631,7 +1631,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libpulp configure 0.3.16 +libpulp configure 0.3.17 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. @@ -1982,7 +1982,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libpulp $as_me 0.3.16, which was +It was created by libpulp $as_me 0.3.17, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -3830,7 +3830,7 @@ # Define the identity of the package. PACKAGE='libpulp' - VERSION='0.3.16' + VERSION='0.3.17' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -21745,7 +21745,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libpulp $as_me 0.3.16, which was +This file was extended by libpulp $as_me 0.3.17, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21813,7 +21813,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -libpulp config.status 0.3.16 +libpulp config.status 0.3.17 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpulp-0.3.16/configure.ac new/libpulp-0.3.17/configure.ac --- old/libpulp-0.3.16/configure.ac 2025-09-04 23:09:26.000000000 +0200 +++ new/libpulp-0.3.17/configure.ac 2025-10-03 00:00:39.000000000 +0200 @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with libpulp. If not, see <http://www.gnu.org/licenses/>. -AC_INIT([libpulp],[0.3.16],[[email protected]]) +AC_INIT([libpulp],[0.3.17],[[email protected]]) # Keep most generated files under the config directory. AC_CONFIG_AUX_DIR([config]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpulp-0.3.16/lib/interpose.c new/libpulp-0.3.17/lib/interpose.c --- old/libpulp-0.3.16/lib/interpose.c 2025-09-04 23:09:12.000000000 +0200 +++ new/libpulp-0.3.17/lib/interpose.c 2025-10-02 16:41:59.000000000 +0200 @@ -76,8 +76,6 @@ static int (*real_posix_memalign)(void **, size_t, size_t) = NULL; /* Dynamic loader functions. */ -static void *(*real_dlopen)(const char *, int) = NULL; -static void *(*real_dlmopen)(Lmid_t, const char *, int) = NULL; static int (*real_dlclose)(void *) = NULL; static int (*real_dladdr)(const void *, Dl_info *) = NULL; static int (*real_dladdr1)(const void *, Dl_info *, void **, int) = NULL; @@ -268,24 +266,12 @@ bool ok = true; - real_dlopen = dlsym(RTLD_NEXT, "dlopen"); - real_dlmopen = dlsym(RTLD_NEXT, "dlmopen"); real_dlclose = dlsym(RTLD_NEXT, "dlclose"); real_dladdr = dlsym(RTLD_NEXT, "dladdr"); real_dladdr1 = dlsym(RTLD_NEXT, "dladdr1"); real_dlinfo = dlsym(RTLD_NEXT, "dlinfo"); /* Check if we got the symbols we need from libdl. */ - if (!real_dlopen) { - set_libpulp_error_state_with_reason(ENOLIBDL, "unable to find function `dlopen`."); - ok = false; - } - - if (!real_dlmopen) { - set_libpulp_error_state_with_reason(ENOLIBDL, "unable to find function `dlmopen`."); - ok = false; - } - if (!real_dlclose) { set_libpulp_error_state_with_reason(ENOLIBDL, "unable to find function `dlclose`."); ok = false; @@ -565,38 +551,6 @@ __sync_fetch_and_sub(&flag, 1); return result; -} - -void * -dlopen(const char *filename, int flags) -{ - void *result; - - if (real_dlopen == NULL) { - __ulp_asunsafe_begin(); - } - - __sync_fetch_and_add(&flag, 1); - result = real_dlopen(filename, flags); - __sync_fetch_and_sub(&flag, 1); - - return result; -} - -void * -dlmopen(Lmid_t nsid, const char *file, int mode) -{ - void *result; - - if (real_dlmopen == NULL) { - __ulp_asunsafe_begin(); - } - - __sync_fetch_and_add(&flag, 1); - result = real_dlmopen(nsid, file, mode); - __sync_fetch_and_sub(&flag, 1); - - return result; } int diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpulp-0.3.16/scripts/setup_package.sh new/libpulp-0.3.17/scripts/setup_package.sh --- old/libpulp-0.3.16/scripts/setup_package.sh 2024-08-06 20:59:14.000000000 +0200 +++ new/libpulp-0.3.17/scripts/setup_package.sh 2025-10-02 15:28:09.000000000 +0200 @@ -21,10 +21,11 @@ PROGNAME=`basename "$0"` -SLE_VERSION_REGEX="[0-9]{6}" -VERSION_REGEX="([0-9\.a-zA-Z]+-$SLE_VERSION_REGEX\.[0-9\.]+[0-9])" +SLE_VERSION_REGEX="[0-9]{6}|slfo[\.0-9]+" +VERSION_REGEX="([0-9\.a-zA-Z]+-([0-9]{6}\.|slfo[\.0-9]+_)?[0-9\.]+[0-9]+)" PLATFORM= PRODUCT= +ARCH= URL= PACKAGE= NO_CLEANUP=0 @@ -38,6 +39,12 @@ # If this flag is enabled, then download of debuginfo packages will be blocked. NO_DEBUGINFO_DOWNLOAD=0 +# If this flag is enabled, then extracted files are not cleaned. +NO_CLEANUP_EXTRACTED_FILES=0 + +# If this flag is enabled, then the script will setup older, unsupported libraries. +SETUP_UNSUPPORTED_LIBRARIES=0 + # Pushd and popd are not silent. Silence them. pushd () { @@ -48,18 +55,59 @@ command popd "$@" > /dev/null } +is_sle15() +{ + if [[ $PLATFORM == SLE-15* ]]; then + return 0 + fi + + return 1 +} + +is_slfo() +{ + if [[ $PLATFORM == SLFO* ]]; then + return 0 + fi + + return 1 +} + +is_alp() +{ + if [ $PLATFORM == "ALP" ]; then + return 0 + fi + + return 1 +} + set_url_platform() { PLATFORM=$1 PRODUCT=$2 - local element=$3 + ARCH=$3 + local element=$4 - URL="https://download.suse.de/download/ibs/SUSE:/SLE-$PLATFORM:/$PRODUCT/standard" + if is_slfo; then + # SLFO uses other links. + local ver=$(echo $PLATFORM | grep -Eo "([0-9]+\.|[0-9]+)+") + # SLFO-1.1 for some weird reason has ':' appended to it in url. Hack it. + if [ $ver == "1.1" ]; then + URL="https://download.suse.de/download/ibs/SUSE:/SLFO:/$ver:/Build/standard" + elif [ $ver == "1.2" ]; then + URL="https://download.suse.de/download/ibs/SUSE:/SLFO:/$ver/standard" + fi + elif is_alp; then + URL="https://download.suse.de/download/ibs/SUSE:/ALP:/Source:/Standard:/Core:/1.0:/Build/standard" + else + URL="https://download.suse.de/download/ibs/SUSE:/$PLATFORM:/$PRODUCT/standard" + fi if [ "$element" == "src" ]; then URL="$URL/src" elif [ "$element" != "ipa-clones" ]; then - URL="$URL/x86_64" + URL="$URL/$ARCH" fi } @@ -81,7 +129,7 @@ get_version_from_package_name() { local package=$1 - local version=$(echo "$1" | grep -Eo $VERSION_REGEX) + local version=$(echo "$1" | grep -Po "\-\K$VERSION_REGEX") echo $version } @@ -100,21 +148,23 @@ # Declare a hash table mapping version number to a label used in # download.suse.de - declare -A sle_hash=( ["150000"]="15" - ["150100"]="15-SP1" - ["150200"]="15-SP2" - ["150300"]="15-SP3" - ["150400"]="15-SP4" - ["150500"]="15-SP5" - ["150600"]="15-SP6") - + declare -A sle_hash=( ["150000"]="SLE-15" + ["150100"]="SLE-15-SP1" + ["150200"]="SLE-15-SP2" + ["150300"]="SLE-15-SP3" + ["150400"]="SLE-15-SP4" + ["150500"]="SLE-15-SP5" + ["150600"]="SLE-15-SP6" + ["150700"]="SLE-15-SP7" + ["slfo.1.1"]="SLFO:1.1" + ["slfo.1.2"]="SLFO:1.2" + ) local version=$(echo "$1" | grep -Eo "($SLE_VERSION_REGEX)") - local sle_version=${sle_hash[$version]} if [ "x$sle_version" = "x" ]; then - "Unsupported SLE package version $version" + echo "Unsupported SLE package version $version" >> /dev/stderr exit 1 fi @@ -126,7 +176,7 @@ local file=$1 local lib_name=$2 - local interesting_lines=$(grep -Eo "$lib_name-$VERSION_REGEX\.x86_64.rpm\"" $1) + local interesting_lines=$(grep -Eo "$lib_name-$VERSION_REGEX\.$ARCH.rpm\"" $1) local final="" for lib in ${interesting_lines}; do @@ -201,7 +251,7 @@ package_name="openssl-3" fi - ipa_clones_list="$ipa_clones_list $package_name-livepatch-$version.x86_64.tar.xz" + ipa_clones_list="$ipa_clones_list $package_name-livepatch-$version.$ARCH.tar.xz" done echo $ipa_clones_list @@ -244,7 +294,7 @@ local package_name=$(get_name_from_package_name $package) local version=$(get_version_from_package_name $package) - src_package_list="$src_package_list $package_name-debuginfo-$version.x86_64.rpm" + src_package_list="$src_package_list $package_name-debuginfo-$version.$ARCH.rpm" done echo $src_package_list @@ -257,7 +307,7 @@ echo $packages - set_url_platform $PLATFORM $PRODUCT "debuginfo" + set_url_platform $PLATFORM $PRODUCT $ARCH "debuginfo" parallel_download_packages "$packages" } @@ -266,7 +316,7 @@ local packages=$(get_list_of_src_packages "$*") local old_url=$URL - set_url_platform $PLATFORM $PRODUCT "src" + set_url_platform $PLATFORM $PRODUCT $ARCH "src" parallel_download_packages "$packages" } @@ -278,7 +328,7 @@ local sle_ver=$(get_sle_version_from_package_name $1) - set_url_platform $PLATFORM $PRODUCT "ipa-clones" + set_url_platform $PLATFORM $PRODUCT $ARCH "ipa-clones" parallel_download_packages "$ipa_clones_list" } @@ -291,16 +341,16 @@ local src_package=$(get_list_of_src_packages $package) local debuginfo_package=$(get_list_of_debuginfo_packages $package) - mkdir -p $PLATFORM/$name/$version + mkdir -p $ARCH/$PLATFORM/$name/$version - cp $package $PLATFORM/$name/$version/$package + cp $package $ARCH/$PLATFORM/$name/$version/$package if [ $? -ne 0 ]; then echo "error: $package not downloaded." exit 1 fi if [ $NO_SRC_DOWNLOAD -eq 0 ]; then - cp $src_package $PLATFORM/$name/$version/$src_package + cp $src_package $ARCH/$PLATFORM/$name/$version/$src_package if [ $? -ne 0 ]; then echo "error: $src_package not downloaded." exit 1 @@ -308,7 +358,7 @@ fi if [ $NO_IPA_CLONES_DOWNLOAD -eq 0 ]; then - cp $ipa_clones $PLATFORM/$name/$version/$ipa_clones + cp $ipa_clones $ARCH/$PLATFORM/$name/$version/$ipa_clones if [ $? -ne 0 ]; then echo "error: $ipa_clones not downloaded." read -r -p "Continue without it? [y/N] " response @@ -319,14 +369,14 @@ fi if [ $NO_DEBUGINFO_DOWNLOAD -eq 0 ]; then - cp $debuginfo_package $PLATFORM/$name/$version/$debuginfo_package + cp $debuginfo_package $ARCH/$PLATFORM/$name/$version/$debuginfo_package if [ $? -ne 0 ]; then echo "error: $debuginfo not downloaded." exit 1 fi fi - cd $PLATFORM/$name/$version + cd $ARCH/$PLATFORM/$name/$version mkdir -p binaries cd binaries if [ -f ../$package ]; then @@ -361,7 +411,7 @@ # delete anything we don't need. rm -f *.rpm *.tar.xz - cd ../../../ + cd ../../../../ } # List of .debug files in folder. Stored here for cache reasons. @@ -401,6 +451,13 @@ # Iterate on every so in the folder. for so in $list_of_sos; do + # Check if .so is livepatchable. We may have non-livepatchable + # libraries here. + ulp livepatchable $so 2> /dev/null + if [ $? -ne 0 ]; then + continue # Library is not livepatchable, skip it. + fi + if [ $NO_DEBUGINFO_DOWNLOAD -eq 0 ]; then # Get the debuginfo that matches this library. local debug=$(match_so_to_debuginfo $so) @@ -419,15 +476,23 @@ fi done - # Delete all .so we don't need. - for so in $list_of_sos; do - rm -f $so - done + if [ $NO_CLEANUP_EXTRACTED_FILES -eq 0 ]; then + # Delete all .so we don't need. + for so in $list_of_sos; do + rm -f $so + done - # Delete all .debug we we don't need. - for debug in $_LIST_OF_DEBUG; do - rm -f $debug - done + # Delete all .debug we we don't need. + for debug in $_LIST_OF_DEBUG; do + rm -f $debug + done + + # Delete .txt files (licenses, etc) + find . -type f -name "*.txt" -delete + + # Delete any broken symlinks that may have been left after we deleted stuff. + find . -xtype l -exec rm {} \; + fi # Delete empty directories left. find . -type d -empty -delete @@ -455,7 +520,7 @@ sanitize_platform() { - local platforms="15-SP3 15-SP4 15-SP5 15-SP6" + local platforms="SLE-15-SP3 SLE-15-SP4 SLE-15-SP5 SLE-15-SP6 SLE-15-SP7 ALP SLFO:1.1 SLFO:1.2" for platform in ${platforms}; do if [ "$PLATFORM" = "$platform" ]; then @@ -465,6 +530,7 @@ done echo "Unsupported platform $PLATFORM" + echo "Supported platforms: $platforms" exit 1 } @@ -484,6 +550,28 @@ done echo "Unsupported package $PACKAGE" + echo "Supported packages: $packages" + exit 1 +} + +sanitize_arch() +{ + local archs="x86_64 ppc64le" + + if [ "x$ARCH" == "x" ]; then + echo "You must pass a --arch=<ARCH> parameter!" + exit 1 + fi + + for arch in ${archs}; do + if [ "$ARCH" == "$arch" ]; then + # Supported arch found + return 0 + fi + done + + echo "Unsupported architecture $ARCH." + echo "Supported architectures: $archs" exit 1 } @@ -494,11 +582,14 @@ echo "" echo "Usage: $PROGNAME <switches>" echo "where <switches>" - echo " --platform=PLATFORM SLE version (ex 15-SP4)." + echo " --platform=PLATFORM SLE version (ex SLE-15-SP4)." echo " --package=PACKAGE Package name to download (ex glibc)." + echo " --arch=ARCH System architecture (ex x86_64)" echo " --no-src-download Do not download the src package." echo " --no-ipa-clones-download Do not download the ipa-clones tarballs." echo " --no-cleanup Do not cleanup downloaded .rpm files." + echo " --no-cleanup-extracted Do not cleanup extracted files." + echo " --setup-unsupported-libraries Setup libraries past the 13-months support range." echo "" echo "supported <library> so far are 'glibc' and 'libopenssl1_1'" } @@ -523,6 +614,10 @@ PACKAGE="${i#*=}" shift ;; + --arch=*) + ARCH="${i#*=}" + shift + ;; --no-cleanup) NO_CLEANUP=1 shift @@ -539,6 +634,14 @@ NO_DEBUGINFO_DOWNLOAD=1 shift ;; + --no-cleanup-extracted) + NO_CLEANUP_EXTRACTED_FILES=1 + shift + ;; + --setup-unuspported-libraries) + SETUP_UNSUPPORTED_LIBRARIES=1 + shift + ;; --help) print_help_message exit 0 @@ -559,9 +662,7 @@ # Do some sanity checking sanitize_platform sanitize_package - - # Set platform globally - set_url_platform "$PLATFORM" "GA" + sanitize_arch } main() @@ -572,15 +673,28 @@ rm -rf $PLATFORM local all_names="" - local products="GA Update" - for product in GA Update; do + # In case the platform is plain SLE-15, there are multiple 'products' we + # must look to. + local products="_" + if is_sle15; then + products="GA Update" + fi + + for product in $products; do # Set platform globally - set_url_platform "$PLATFORM" $product + set_url_platform "$PLATFORM" $product $ARCH download_package_list "/tmp/suse_package_list.html" local names=$(extract_lib_package_names "/tmp/suse_package_list.html" $PACKAGE) + # Check if "names" string is empty. If so, that means the package in + # question is not in this repository. + if [ "x$names" == "x" ]; then + echo "Package not found in $PLATFORM:$product. Are you sure it exists?" + exit 1 + fi + # Clean the directory rm -rf $PLATFORM @@ -600,10 +714,19 @@ done for package in $all_names; do + local target=$(LANG=C date --date="today - 13 months") + + # Check if package time is in the supported range. + if [[ $SETUP_UNSUPPORTED_LIBRARIES -eq 0 && \ + "$(LANG=C date -r $package)" < "$target" ]]; then + echo "Dropping $package because it is older than 13 months." + continue; + fi + extract_libs_from_package "$package" done - dump_interesting_info_from_elfs_in_lib $PLATFORM/$PACKAGE + dump_interesting_info_from_elfs_in_lib $ARCH/$PLATFORM/$PACKAGE # Delete all packages to cleanup. if [ $NO_CLEANUP -ne 1 ]; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpulp-0.3.16/tests/Makefile.am new/libpulp-0.3.17/tests/Makefile.am --- old/libpulp-0.3.16/tests/Makefile.am 2025-09-04 23:09:12.000000000 +0200 +++ new/libpulp-0.3.17/tests/Makefile.am 2025-10-03 00:00:03.000000000 +0200 @@ -478,7 +478,8 @@ insn_queue \ chroot \ visibility \ - notes + notes \ + dlopen numserv_SOURCES = numserv.c numserv_LDADD = libdozens.la libhundreds.la @@ -648,6 +649,11 @@ EXTRA_DIST += notes.ld +dlopen_SOURCES = dlopen.c +dlopen_CFLAGS = $(AM_CFLAGS) +dlopen_LDADD = -lpthread -ldl -lrt +dlopen_DEPENDENCIES = libhundreds.la + TESTS = \ numserv.py \ numserv_bsymbolic.py \ @@ -707,7 +713,8 @@ textrel.py \ seccomp_disable.py \ run_libc.py \ - glibc_private.py + glibc_private.py \ + dlopen.py XFAIL_TESTS = \ blocked.py \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpulp-0.3.16/tests/Makefile.in new/libpulp-0.3.17/tests/Makefile.in --- old/libpulp-0.3.16/tests/Makefile.in 2025-09-04 23:11:01.000000000 +0200 +++ new/libpulp-0.3.17/tests/Makefile.in 2025-10-03 00:03:13.000000000 +0200 @@ -141,7 +141,8 @@ endbr64$(EXEEXT) prefix$(EXEEXT) manyprocesses$(EXEEXT) \ dlsym$(EXEEXT) stress$(EXEEXT) pcqueue$(EXEEXT) \ comments$(EXEEXT) block_mprotect$(EXEEXT) insn_queue$(EXEEXT) \ - chroot$(EXEEXT) visibility$(EXEEXT) notes$(EXEEXT) + chroot$(EXEEXT) visibility$(EXEEXT) notes$(EXEEXT) \ + dlopen$(EXEEXT) # Workaround a bug in Autoconf 2.69 @CPU_X86_64_TRUE@am__append_1 = \ @@ -613,6 +614,11 @@ deadlock_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(deadlock_CFLAGS) \ $(CFLAGS) $(deadlock_LDFLAGS) $(LDFLAGS) -o $@ +am_dlopen_OBJECTS = dlopen-dlopen.$(OBJEXT) +dlopen_OBJECTS = $(am_dlopen_OBJECTS) +dlopen_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(dlopen_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_dlsym_OBJECTS = dlsym-dlsym.$(OBJEXT) dlsym_OBJECTS = $(am_dlsym_OBJECTS) am__DEPENDENCIES_1 = @@ -719,8 +725,8 @@ ./$(DEPDIR)/cancel-cancel.Po ./$(DEPDIR)/chroot-chroot.Po \ ./$(DEPDIR)/comments-comments.Po ./$(DEPDIR)/constructor.Po \ ./$(DEPDIR)/contract.Po ./$(DEPDIR)/deadlock-deadlock.Po \ - ./$(DEPDIR)/dlsym-dlsym.Po ./$(DEPDIR)/endbr64.Po \ - ./$(DEPDIR)/exception_handling.Po \ + ./$(DEPDIR)/dlopen-dlopen.Po ./$(DEPDIR)/dlsym-dlsym.Po \ + ./$(DEPDIR)/endbr64.Po ./$(DEPDIR)/exception_handling.Po \ ./$(DEPDIR)/insn_queue-insn_queue.Po \ ./$(DEPDIR)/libaccess_la-libaccess.Plo \ ./$(DEPDIR)/libaccess_livepatch1.Plo \ @@ -869,9 +875,10 @@ $(asunsafe_conversion_SOURCES) $(block_mprotect_SOURCES) \ $(blocked_SOURCES) $(buildid_SOURCES) $(cancel_SOURCES) \ $(chroot_SOURCES) $(comments_SOURCES) $(constructor_SOURCES) \ - $(contract_SOURCES) $(deadlock_SOURCES) $(dlsym_SOURCES) \ - $(endbr64_SOURCES) $(exception_handling_SOURCES) \ - $(insn_queue_SOURCES) $(loop_SOURCES) $(manyprocesses_SOURCES) \ + $(contract_SOURCES) $(deadlock_SOURCES) $(dlopen_SOURCES) \ + $(dlsym_SOURCES) $(endbr64_SOURCES) \ + $(exception_handling_SOURCES) $(insn_queue_SOURCES) \ + $(loop_SOURCES) $(manyprocesses_SOURCES) \ $(memory_protection_SOURCES) $(notes_SOURCES) \ $(numserv_SOURCES) $(numserv_bsymbolic_SOURCES) \ $(pagecross_SOURCES) $(parameters_SOURCES) $(pcqueue_SOURCES) \ @@ -920,9 +927,10 @@ $(asunsafe_conversion_SOURCES) $(block_mprotect_SOURCES) \ $(blocked_SOURCES) $(buildid_SOURCES) $(cancel_SOURCES) \ $(chroot_SOURCES) $(comments_SOURCES) $(constructor_SOURCES) \ - $(contract_SOURCES) $(deadlock_SOURCES) $(dlsym_SOURCES) \ - $(endbr64_SOURCES) $(exception_handling_SOURCES) \ - $(insn_queue_SOURCES) $(loop_SOURCES) $(manyprocesses_SOURCES) \ + $(contract_SOURCES) $(deadlock_SOURCES) $(dlopen_SOURCES) \ + $(dlsym_SOURCES) $(endbr64_SOURCES) \ + $(exception_handling_SOURCES) $(insn_queue_SOURCES) \ + $(loop_SOURCES) $(manyprocesses_SOURCES) \ $(memory_protection_SOURCES) $(notes_SOURCES) \ $(numserv_SOURCES) $(numserv_bsymbolic_SOURCES) \ $(pagecross_SOURCES) $(parameters_SOURCES) $(pcqueue_SOURCES) \ @@ -1756,6 +1764,10 @@ notes_CFLAGS = -fpatchable-function-entry=$(ULP_NOPS_LEN),$(PRE_NOPS_LEN) $(AM_CFLAGS) notes_LDFLAGS = -Wl,--hash-style=gnu -Wl,-T$(srcdir)/notes.ld $(AM_LDFLAGS) notes_DEPENDENCIES = notes.ld $(POST_PROCESS) $(METADATA) +dlopen_SOURCES = dlopen.c +dlopen_CFLAGS = $(AM_CFLAGS) +dlopen_LDADD = -lpthread -ldl -lrt +dlopen_DEPENDENCIES = libhundreds.la TESTS = \ numserv.py \ numserv_bsymbolic.py \ @@ -1815,7 +1827,8 @@ textrel.py \ seccomp_disable.py \ run_libc.py \ - glibc_private.py + glibc_private.py \ + dlopen.py XFAIL_TESTS = \ blocked.py \ @@ -2094,6 +2107,10 @@ @rm -f deadlock$(EXEEXT) $(AM_V_CCLD)$(deadlock_LINK) $(deadlock_OBJECTS) $(deadlock_LDADD) $(LIBS) +dlopen$(EXEEXT): $(dlopen_OBJECTS) $(dlopen_DEPENDENCIES) $(EXTRA_dlopen_DEPENDENCIES) + @rm -f dlopen$(EXEEXT) + $(AM_V_CCLD)$(dlopen_LINK) $(dlopen_OBJECTS) $(dlopen_LDADD) $(LIBS) + dlsym$(EXEEXT): $(dlsym_OBJECTS) $(dlsym_DEPENDENCIES) $(EXTRA_dlsym_DEPENDENCIES) @rm -f dlsym$(EXEEXT) $(AM_V_CCLD)$(dlsym_LINK) $(dlsym_OBJECTS) $(dlsym_LDADD) $(LIBS) @@ -2207,6 +2224,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/constructor.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/contract.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/deadlock-deadlock.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlopen-dlopen.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlsym-dlsym.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/endbr64.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exception_handling.Po@am__quote@ # am--include-marker @@ -2579,6 +2597,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(deadlock_CFLAGS) $(CFLAGS) -c -o deadlock-deadlock.obj `if test -f 'deadlock.c'; then $(CYGPATH_W) 'deadlock.c'; else $(CYGPATH_W) '$(srcdir)/deadlock.c'; fi` +dlopen-dlopen.o: dlopen.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dlopen_CFLAGS) $(CFLAGS) -MT dlopen-dlopen.o -MD -MP -MF $(DEPDIR)/dlopen-dlopen.Tpo -c -o dlopen-dlopen.o `test -f 'dlopen.c' || echo '$(srcdir)/'`dlopen.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dlopen-dlopen.Tpo $(DEPDIR)/dlopen-dlopen.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dlopen.c' object='dlopen-dlopen.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dlopen_CFLAGS) $(CFLAGS) -c -o dlopen-dlopen.o `test -f 'dlopen.c' || echo '$(srcdir)/'`dlopen.c + +dlopen-dlopen.obj: dlopen.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dlopen_CFLAGS) $(CFLAGS) -MT dlopen-dlopen.obj -MD -MP -MF $(DEPDIR)/dlopen-dlopen.Tpo -c -o dlopen-dlopen.obj `if test -f 'dlopen.c'; then $(CYGPATH_W) 'dlopen.c'; else $(CYGPATH_W) '$(srcdir)/dlopen.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dlopen-dlopen.Tpo $(DEPDIR)/dlopen-dlopen.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dlopen.c' object='dlopen-dlopen.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dlopen_CFLAGS) $(CFLAGS) -c -o dlopen-dlopen.obj `if test -f 'dlopen.c'; then $(CYGPATH_W) 'dlopen.c'; else $(CYGPATH_W) '$(srcdir)/dlopen.c'; fi` + dlsym-dlsym.o: dlsym.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dlsym_CFLAGS) $(CFLAGS) -MT dlsym-dlsym.o -MD -MP -MF $(DEPDIR)/dlsym-dlsym.Tpo -c -o dlsym-dlsym.o `test -f 'dlsym.c' || echo '$(srcdir)/'`dlsym.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dlsym-dlsym.Tpo $(DEPDIR)/dlsym-dlsym.Po @@ -3050,6 +3082,7 @@ -rm -f ./$(DEPDIR)/constructor.Po -rm -f ./$(DEPDIR)/contract.Po -rm -f ./$(DEPDIR)/deadlock-deadlock.Po + -rm -f ./$(DEPDIR)/dlopen-dlopen.Po -rm -f ./$(DEPDIR)/dlsym-dlsym.Po -rm -f ./$(DEPDIR)/endbr64.Po -rm -f ./$(DEPDIR)/exception_handling.Po @@ -3178,6 +3211,7 @@ -rm -f ./$(DEPDIR)/constructor.Po -rm -f ./$(DEPDIR)/contract.Po -rm -f ./$(DEPDIR)/deadlock-deadlock.Po + -rm -f ./$(DEPDIR)/dlopen-dlopen.Po -rm -f ./$(DEPDIR)/dlsym-dlsym.Po -rm -f ./$(DEPDIR)/endbr64.Po -rm -f ./$(DEPDIR)/exception_handling.Po diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpulp-0.3.16/tests/dlopen.c new/libpulp-0.3.17/tests/dlopen.c --- old/libpulp-0.3.16/tests/dlopen.c 1970-01-01 01:00:00.000000000 +0100 +++ new/libpulp-0.3.17/tests/dlopen.c 2025-10-02 16:41:59.000000000 +0200 @@ -0,0 +1,40 @@ +/* + * libpulp - User-space Livepatching Library + * + * Copyright (C) 2025 SUSE Software Solutions GmbH + * + * This file is part of libpulp. + * + * libpulp is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * libpulp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with libpulp. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <stdio.h> +#include <dlfcn.h> +#include <unistd.h> + +int main() +{ + void *handle = dlopen(".libs/libhundreds.so", RTLD_NOW | RTLD_GLOBAL); + if (!handle) { + printf("Failed to load libhundreds.so: %s\n", dlerror()); + return 1; + } + int (*hundred)(void) = dlsym(handle, "hundred"); + do { + printf("hundred: %d\n", hundred()); + sleep(1); + } while (1); + + return 0; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpulp-0.3.16/tests/dlopen.py new/libpulp-0.3.17/tests/dlopen.py --- old/libpulp-0.3.16/tests/dlopen.py 1970-01-01 01:00:00.000000000 +0100 +++ new/libpulp-0.3.17/tests/dlopen.py 2025-10-02 16:41:59.000000000 +0200 @@ -0,0 +1,29 @@ +#!/usr/bin/env python3 + +# libpulp - User-space Livepatching Library +# +# Copyright (C) 2025 SUSE Software Solutions GmbH +# +# This file is part of libpulp. +# +# libpulp is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# libpulp is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with libpulp. If not, see <http://www.gnu.org/licenses/>. + +import testsuite + +child = testsuite.spawn(testsuite.testname) + +child.expect('100', reject='Failed to load libhundreds.so') + +child.close(force=True) +exit(0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpulp-0.3.16/tools/introspection.c new/libpulp-0.3.17/tools/introspection.c --- old/libpulp-0.3.16/tools/introspection.c 2025-04-25 00:02:23.000000000 +0200 +++ new/libpulp-0.3.17/tools/introspection.c 2025-09-22 20:50:56.000000000 +0200 @@ -1494,6 +1494,12 @@ snprintf(taskname, PATH_MAX, "/proc/%d/task", pid); taskdir = opendir(taskname); if (taskdir == NULL) { + /* In the case the error is ENOENT, that means the process ended between + the process discovery and here, the process hijacking. */ + if (errno == ENOENT) { + return ESRCH; + } + WARN("error opening %s: %s.", taskname, strerror(errno)); return errno; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpulp-0.3.16/tools/trigger.c new/libpulp-0.3.17/tools/trigger.c --- old/libpulp-0.3.16/tools/trigger.c 2025-09-04 23:00:24.000000000 +0200 +++ new/libpulp-0.3.17/tools/trigger.c 2025-09-22 20:52:34.000000000 +0200 @@ -54,7 +54,8 @@ skippable_error(ulp_error_t err) { return err == EBUILDID || err == ENOTARGETLIB || err == EUSRBLOCKED || - err == EWILDNOMATCH || err == EAPPLIED || err == ENOPATCH; + err == EWILDNOMATCH || err == EAPPLIED || err == ENOPATCH || + err == ESRCH; } enum
