From: Jeff Xu <jeffxu@google.com>
To: SeongJae Park <sj@kernel.org>
Cc: akpm@linux-foundation.org, dverkamp@chromium.org,
keescook@chromium.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH mm-unstable] kernel/pid_sysctl.h: Add missing definitions for specific config
Date: Fri, 16 Dec 2022 10:41:00 -0800 [thread overview]
Message-ID: <CALmYWFvTrr+417E89tywHRqHP-TZnAuKgDa0SaV-7n7Ee2idwg@mail.gmail.com> (raw)
In-Reply-To: <20221216183314.169707-1-sj@kernel.org>
Hi SeongJae
Thank you for fixing this.
Do I need to send v9 of the original patch ?
On Fri, Dec 16, 2022 at 10:33 AM SeongJae Park <sj@kernel.org> wrote:
>
> Commit bdb6231e88a3 ("mm/memfd: add MFD_NOEXEC_SEAL and MFD_EXEC") on
> mm-unstable when CONFIG_SYSCTL or CONFIG_MEMFD_CRETE not defined, as
> below, because initialize_memfd_noexec_scope() and
> register_pid_ns_sysctl_table_vm(), which defined by the commit, is not
> defined for the config case.
>
> ERROR:root:/kernel/pid_namespace.c: In function ‘create_pid_namespace’:
> /kernel/pid_namespace.c:114:2: error: implicit declaration of function ‘initialize_memfd_noexec_scope’; did you mean ‘set_memfd_noexec_scope’? [-Werror=implicit-function-declaration]
> 114 | initialize_memfd_noexec_scope(ns);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | set_memfd_noexec_scope
> /kernel/pid_namespace.c: In function ‘pid_namespaces_init’:
> /kernel/pid_namespace.c:462:2: error: implicit declaration of function ‘register_pid_ns_sysctl_table_vm’; did you mean ‘register_pid_ns_ctl_table_vm’? [-Werror=implicit-function-declaration]
> 462 | register_pid_ns_sysctl_table_vm();
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | register_pid_ns_ctl_table_vm
> cc1: some warnings being treated as errors
> make[3]: *** [/scripts/Makefile.build:250: kernel/pid_namespace.o] Error 1
>
> Fix the commit by defining the functions for the configuration.
>
> Fixes: bdb6231e88a3 ("mm/memfd: add MFD_NOEXEC_SEAL and MFD_EXEC") on mm-unstable
> Signed-off-by: SeongJae Park <sj@kernel.org>
> ---
> kernel/pid_sysctl.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/kernel/pid_sysctl.h b/kernel/pid_sysctl.h
> index 90a93161a122..770c060a0d33 100644
> --- a/kernel/pid_sysctl.h
> +++ b/kernel/pid_sysctl.h
> @@ -52,8 +52,10 @@ static inline void register_pid_ns_sysctl_table_vm(void)
> register_sysctl_paths(vm_path, pid_ns_ctl_table_vm);
> }
> #else
> +static inline void initialize_memfd_noexec_scope(struct pid_namespace *ns) {}
> static inline void set_memfd_noexec_scope(struct pid_namespace *ns) {}
> static inline void register_pid_ns_ctl_table_vm(void) {}
register_pid_ns_ctl_table_vm can be removed.
Thanks
Jeff
+static inline void register_pid_ns_sysctl_table_vm(void) {}
> #endif
>
> #endif /* LINUX_PID_SYSCTL_H */
> --
> 2.25.1
>
prev parent reply other threads:[~2022-12-16 18:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-16 18:33 SeongJae Park
2022-12-16 18:41 ` Jeff Xu [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=CALmYWFvTrr+417E89tywHRqHP-TZnAuKgDa0SaV-7n7Ee2idwg@mail.gmail.com \
--to=jeffxu@google.com \
--cc=akpm@linux-foundation.org \
--cc=dverkamp@chromium.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sj@kernel.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