From patchwork Fri Apr 24 15:02:06 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= X-Patchwork-Id: 86845 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD842FED3E0 for ; Fri, 24 Apr 2026 15:11:19 +0000 (UTC) Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.24927.1777042937565006703 for ; Fri, 24 Apr 2026 08:02:18 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bootlin.com header.s=dkim header.b=WnEr4CnD; spf=pass (domain: bootlin.com, ip: 185.246.85.4, mailfrom: joaomarcos.costa@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 186254E42AF5; Fri, 24 Apr 2026 15:02:15 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id DD5F2604EB; Fri, 24 Apr 2026 15:02:14 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id E79A9107208E8; Fri, 24 Apr 2026 17:02:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1777042931; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding; bh=aj8paKJmeVQd8J6RdD2WII9HPNTNa4INwCiHrdWqJuQ=; b=WnEr4CnDBYbCFBvVWXsywBAP3B8nXOf12EUwUGkPr6+RSZIO5lXHdcA5uhYnhTe6hs52wc INB2wC9aVqu99Pq18pCbiTZfrMHkWtAu7jQmLq9EjTz/jDDxsbnyAd5Qsuho1zDHuEHLNL bcrxcVt7B0HwhZDeKuWhCHN9LTxkTz8Yfad0FVkny4xxNAVW4N6fwSbVJXBv8DfyBsen+B j4bbfjMJUB+9q3dh4uw+MuKzDxuP543LgJUXNGmM8tlEzgqKriDoj867ACAZxAapqk5F5e aSTqBUo2lEqabcb1s2A5ZCzh224xzS0zBkZIf/yE9Hu3ay6RKW3PUAqRNgYXFA== From: "Joao Marcos Costa" To: openembedded-devel@lists.openembedded.org Cc: thomas.petazzoni@bootlin.com, raj.khem@gmail.com, =?utf-8?q?Jo=C3=A3o_Ma?= =?utf-8?q?rcos_Costa?= Subject: [meta-networking][PATCH] memcached: drop libhugetlbfs Date: Fri, 24 Apr 2026 17:02:06 +0200 Message-ID: <20260424150206.10679-1-joaomarcos.costa@bootlin.com> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 24 Apr 2026 15:11:19 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/126608 In Linux, memcached relies on transparent huge pages, and even if libhugetlbfs is enabled by the PACKAGECONFIG (and detected during do_configure, of course), it is simply not used: root@qemuriscv64:~# ldd $(which memcached) linux-vdso.so.1 (0x0000003fa4358000) libevent-2.1.so.7 => /lib/libevent-2.1.so.7 (0x0000003fa42b0000) libc.so.6 => /lib/libc.so.6 (0x0000003fa4157000) /usr/lib/ld-linux-riscv64-lp64d.so.1 (0x0000003fa435a000) The main reason is the fact that the only call to a function coming from libhugetlbfs is here: https://github.com/memcached/memcached/blob/master/memcached.c#L4274 and getpagesizes() is only called if the #if block evaluates to true: int ret = -1; size_t sizes[32]; int avail = getpagesizes(sizes, 32); (...) /* check if transparent hugepages is compiled into the kernel */ /* RH based systems possibly uses a different path */ static const char *mm_thp_paths[] = { "/sys/kernel/mm/transparent_hugepage/enabled", "/sys/kernel/mm/redhat_transparent_hugepage/enabled", NULL }; (...) This block relies on HAVE_MEMCNTL, which is a Solaris-specific feature. Therefore, the dependency link between memcached and libhugetlbfs doesn't exist in Linux. Drop libhugetlbfs from memcached's recipe. Signed-off-by: João Marcos Costa --- .../memcached-add-hugetlbfs-check.patch | 32 ------------------- .../memcached/memcached_1.6.41.bb | 10 ++---- 2 files changed, 2 insertions(+), 40 deletions(-) delete mode 100644 meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch diff --git a/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch b/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch deleted file mode 100644 index 26281e73ef..0000000000 --- a/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch +++ /dev/null @@ -1,32 +0,0 @@ -From dfa90817a08f206f7e2dbba44d913968ae7f7d94 Mon Sep 17 00:00:00 2001 -From: Chong Lu -Date: Tue, 19 Aug 2014 17:38:32 +0800 -Subject: [PATCH] memcached: add knob to detect whether hugetlbfs are checked - -Add knob to detect whether hugetlbfs are checked or not. - -Upstream-Status: Pending - -Signed-off-by: Chong Lu ---- - configure.ac | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 6f2ef97..bd7dd96 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -559,8 +559,12 @@ if test "x$enable_static" = "xyes"; then - fi - - dnl ---------------------------------------------------------------------------- -+AC_ARG_ENABLE(hugetlbfs, -+ [AS_HELP_STRING([--enable-hugetlbfs],[Enable hugetlbfs])]) - --AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs) -+if test "x$enable_hugetlbfs" = "xyes"; then -+ AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs) -+fi - - AC_HEADER_STDBOOL - AH_BOTTOM([#if HAVE_STDBOOL_H diff --git a/meta-networking/recipes-support/memcached/memcached_1.6.41.bb b/meta-networking/recipes-support/memcached/memcached_1.6.41.bb index 9d759069ba..e41ebdb171 100644 --- a/meta-networking/recipes-support/memcached/memcached_1.6.41.bb +++ b/meta-networking/recipes-support/memcached/memcached_1.6.41.bb @@ -19,17 +19,14 @@ RDEPENDS:${PN} += "perl perl-module-posix perl-module-autoloader \ perl-module-tie-hash bash \ " -SRC_URI = "http://www.memcached.org/files/${BP}.tar.gz \ - file://memcached-add-hugetlbfs-check.patch \ - " +SRC_URI = "http://www.memcached.org/files/${BP}.tar.gz" SRC_URI[sha256sum] = "e097073c156eeff9e12655b054f446d57374cfba5c132dcdbe7fac64e728286a" CVE_STATUS[CVE-2022-26635] = "disputed: this is a problem of applications using php-memcached inproperly" UPSTREAM_CHECK_URI = "${HOMEPAGE}" -# set the same COMPATIBLE_HOST as libhugetlbfs -COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*" +COMPATIBLE_HOST = "(i.86|x86_64|powerpc|powerpc64|riscv64|aarch64|arm).*-linux*" # assoc.c:83:9: error: variable 'depth' set but not used [-Werror,-Wunused-but-set-variable] CFLAGS:append:toolchain-clang = " -Wno-error=unused-but-set-variable" @@ -42,9 +39,6 @@ python __anonymous () { d.appendVar('EXTRA_OECONF', " ac_cv_c_endian=big") } -PACKAGECONFIG ??= "" -PACKAGECONFIG[hugetlbfs] = "--enable-hugetlbfs, --disable-hugetlbfs, libhugetlbfs" - inherit update-rc.d INITSCRIPT_NAME = "memcached"