From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Jake Freeland <jfree@FreeBSD.org>,
Bruce Richardson <bruce.richardson@intel.com>
Cc: <dev@dpdk.org>
Subject: Re: [PATCH v2 3/3] eal/linux: Check hugepage access permissions
Date: Mon, 13 Oct 2025 14:43:32 +0200 [thread overview]
Message-ID: <c528f957-3419-457e-8fbd-57e584b9d6a0@intel.com> (raw)
In-Reply-To: <20250814213246.4141803-4-jfree@FreeBSD.org>
On 8/14/2025 11:32 PM, Jake Freeland wrote:
> Currently, hugepage mountpoints will be used irrespective of permissions,
> leading to potential EACCES errors during memory allocation. Fix this by
> not using a mountpoint if we do not have read/write permissions on it.
>
> Signed-off-by: Jake Freeland <jfree@FreeBSD.org>
> ---
> lib/eal/linux/eal_hugepage_info.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/lib/eal/linux/eal_hugepage_info.c b/lib/eal/linux/eal_hugepage_info.c
> index d47a19c56a..e2ddd6218b 100644
> --- a/lib/eal/linux/eal_hugepage_info.c
> +++ b/lib/eal/linux/eal_hugepage_info.c
> @@ -260,6 +260,13 @@ get_hugepage_dir(uint64_t hugepage_sz, char *hugedir, int len)
> continue;
> }
>
> + if (access(splitstr[MOUNTPT], R_OK | W_OK) < 0) {
> + EAL_LOG(NOTICE,
> + "Skipping hugepage dir '%s': missing r/w perms",
Perhaps should be reworded as:
Skipping hugepage directory '%s': missing R/W permissions"
Otherwise,
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
> + splitstr[MOUNTPT]);
> + continue;
> + }
> +
> /*
> * If no --huge-dir option has been given, we're done.
> */
--
Thanks,
Anatoly
prev parent reply other threads:[~2025-10-13 12:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-14 21:32 [PATCH v2 0/3] EAL memory fixes Jake Freeland
2025-08-14 21:32 ` [PATCH v2 1/3] eal/freebsd: Do not use prev_ms_idx for hole detection Jake Freeland
2025-10-13 12:23 ` Burakov, Anatoly
2025-10-14 9:06 ` Burakov, Anatoly
2025-08-14 21:32 ` [PATCH v2 2/3] eal/freebsd: Avoid claiming memseg holes Jake Freeland
2025-10-13 12:36 ` Burakov, Anatoly
2025-10-13 13:12 ` Burakov, Anatoly
2025-08-14 21:32 ` [PATCH v2 3/3] eal/linux: Check hugepage access permissions Jake Freeland
2025-10-13 12:43 ` Burakov, Anatoly [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c528f957-3419-457e-8fbd-57e584b9d6a0@intel.com \
--to=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=jfree@FreeBSD.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).