From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FEE329B799; Sat, 12 Sep 2026 07:49:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789199349; cv=none; b=my4SROumx6M6J/99gsGskAM69BWndpSEhFd4eQdpJEccvbK8R697daDrkK87hareKxktMnfELgmoNA3DWjh1EFlSPtwhsGAzcWrgOO/j9urh/H6zndF8Gx/riaa2wSExppKFOV3pYHNXxxWCkxLKqY951HgSMOT5pcFbYttSZUM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789199349; c=relaxed/simple; bh=dXxKfpVi+o0wpBM2SLQM58AlWJ2bANbNjKxP+bMxNfE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=bztcFFLJHzYeI+6bOKuLfZba0nn3dK/WVhEU4VbYWfvvBVb6YvgdOm/+eGCl0cO4ekGP3+VxAAPYNgbK0j4Y6WeKl62f6B220W0e+hWlnfmgCHukZopYqE9HKusZZZJjGj4cwFxS6Q4yTj8FFB8opNWhM1sTqYx+niAbYy/UH1Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1EfZyUdQ; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="1EfZyUdQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1311F1F000FF; Sat, 12 Sep 2026 07:49:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789199347; bh=qbttJbq9OYNeaENGr4gSm06vaLhvzQe1X2sHgg0ZYLg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=1EfZyUdQdVNxaUPvIqfKfvxCPA14uyyp0RHTTvGSoIQUl3VKYKn+/D0R6Gd/asDNT c0i41UEA0UaOW1mXcZ9qhnbjCimR200pPSAWtMjBiELIeUf427446y7zJxguoWMP5l d2GZnS6r6DEmZKyHBKZFfi2/J6TtUG1MuwuAz9P4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "=?UTF-8?q?Ricardo=20B . =20Marli=C3=A8re?=" , Ihor Solodrai , Kumar Kartikeya Dwivedi , Sasha Levin Subject: [PATCH 7.2 0566/1815] libbpf: Search /lib64 and /lib in resolve_full_path() Date: Sat, 12 Sep 2026 08:38:36 +0200 Message-ID: <20260912065702.169315922@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065648.999753832@linuxfoundation.org> References: <20260912065648.999753832@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ricardo B. Marlière [ Upstream commit 7b5ae0481efdac040cea72b4fabd1398109f975b ] attach_probe/uprobe-lib and uprobe_autoattach selftests fail with "failed to resolve full path for libc.so.6" on older non-usrmerged distros, where libc.so.6 lives under a top-level /lib64 or /lib rather than /usr/lib64 or /usr/lib. Add /lib64:/lib to the search paths, alongside the existing /usr/lib64:/usr/lib and Debian multiarch entries. Fixes: 1ce3a60e3c28 ("libbpf: auto-resolve programs/libraries when necessary for uprobes") Signed-off-by: Ricardo B. Marlière Acked-by: Ihor Solodrai Link: https://lore.kernel.org/bpf/20260720-selftests-bpf_fixes-v2-3-b450eda93dfe@suse.com Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Sasha Levin --- tools/lib/bpf/libbpf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 1368752aa13c3..1ab939dfb7f08 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -12973,13 +12973,14 @@ static const char *arch_specific_lib_paths(void) /* Get full path to program/shared library. */ static int resolve_full_path(const char *file, char *result, size_t result_sz) { - const char *search_paths[3] = {}; + const char *search_paths[4] = {}; int i, perm; if (str_has_sfx(file, ".so") || strstr(file, ".so.")) { search_paths[0] = getenv("LD_LIBRARY_PATH"); search_paths[1] = "/usr/lib64:/usr/lib"; search_paths[2] = arch_specific_lib_paths(); + search_paths[3] = "/lib64:/lib"; perm = R_OK; } else { search_paths[0] = getenv("PATH"); -- 2.53.0