From: Mike Rapoport <rppt@linux.ibm.com>
To: kernel test robot <lkp@intel.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>,
kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-riscv@lists.infradead.org
Subject: Re: [linux-next:master 10963/10966] <stdin>:1539:2: warning: #warning syscall memfd_secret not implemented
Date: Sun, 6 Dec 2020 12:55:45 +0200 [thread overview]
Message-ID: <20201206105545.GA123287@linux.ibm.com> (raw)
In-Reply-To: <202012042347.CetZAZAg-lkp@intel.com>
(added RISC-V maintainers)
On Fri, Dec 04, 2020 at 11:41:55PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 2996bd3f6ca9ea529b40c369a94b247657abdb4d
> commit: f742050435413d2fe8deba095304788d26a8a144 [10963/10966] arch, mm: wire up memfd_secret system call were relevant
> config: riscv-nommu_k210_defconfig (attached as .config)
> compiler: riscv64-linux-gcc (GCC) 9.3.0
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f742050435413d2fe8deba095304788d26a8a144
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout f742050435413d2fe8deba095304788d26a8a144
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> >> <stdin>:1539:2: warning: #warning syscall memfd_secret not implemented [-Wcpp]
> --
> arch/riscv/kernel/asm-offsets.c:14:6: warning: no previous prototype for 'asm_offsets' [-Wmissing-prototypes]
> 14 | void asm_offsets(void)
> | ^~~~~~~~~~~
> >> <stdin>:1539:2: warning: #warning syscall memfd_secret not implemented [-Wcpp]
The availabilty of memfd_secret depends on ARCH_HAS_SET_DIRECT_MAP and
on riscv this option is selected for nommu.
The patch below makes ARCH_HAS_SET_DIRECT_MAP dependent on MMU, which
makes sense regardless of memfd_secret.
From 26cde530ac050bf8a7417230a32daa6fb7c39e9b Mon Sep 17 00:00:00 2001
From: Mike Rapoport <rppt@linux.ibm.com>
Date: Sun, 6 Dec 2020 12:42:10 +0200
Subject: [PATCH] riscv: make ARCH_HAS_SET_DIRECT_MAP dependent on MMU
The direct map manipulation methods are implemented in
arch/riscv/mm/pageattr.c and they are only built when CONFIG_MMU=y.
Besides, there is not much point in having these functions for nommu
variant.
Update Kconfig to select ARCH_HAS_SET_DIRECT_MAP if MMU is enabled and hide
declarations of the related functions inside '#ifdef CONFIG_MMU' so that
generic stubs would be used for nommu case.
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
---
arch/riscv/Kconfig | 2 +-
arch/riscv/include/asm/set_memory.h | 7 +++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index af5b858ed8a1..31ff944f092e 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -25,7 +25,7 @@ config RISCV
select ARCH_HAS_KCOV
select ARCH_HAS_MMIOWB
select ARCH_HAS_PTE_SPECIAL
- select ARCH_HAS_SET_DIRECT_MAP
+ select ARCH_HAS_SET_DIRECT_MAP if MMU
select ARCH_HAS_SET_MEMORY
select ARCH_HAS_STRICT_KERNEL_RWX if MMU
select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
diff --git a/arch/riscv/include/asm/set_memory.h b/arch/riscv/include/asm/set_memory.h
index 1aaf2720b8f6..fc37eb03833b 100644
--- a/arch/riscv/include/asm/set_memory.h
+++ b/arch/riscv/include/asm/set_memory.h
@@ -17,6 +17,9 @@ int set_memory_x(unsigned long addr, int numpages);
int set_memory_nx(unsigned long addr, int numpages);
int set_memory_rw_nx(unsigned long addr, int numpages);
void protect_kernel_text_data(void);
+int set_direct_map_invalid_noflush(struct page *page, int numpages);
+int set_direct_map_default_noflush(struct page *page, int numpages);
+bool kernel_page_present(struct page *page);
#else
static inline int set_memory_ro(unsigned long addr, int numpages) { return 0; }
static inline int set_memory_rw(unsigned long addr, int numpages) { return 0; }
@@ -26,10 +29,6 @@ static inline void protect_kernel_text_data(void) {};
static inline int set_memory_rw_nx(unsigned long addr, int numpages) { return 0; }
#endif
-int set_direct_map_invalid_noflush(struct page *page, int numpages);
-int set_direct_map_default_noflush(struct page *page, int numpages);
-bool kernel_page_present(struct page *page);
-
#endif /* __ASSEMBLY__ */
#ifdef CONFIG_ARCH_HAS_STRICT_KERNEL_RWX
--
2.28.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
From: Mike Rapoport <rppt@linux.ibm.com>
To: kbuild-all@lists.01.org
Subject: Re: [linux-next:master 10963/10966] <stdin>:1539:2: warning: #warning syscall memfd_secret not implemented
Date: Sun, 06 Dec 2020 12:55:45 +0200 [thread overview]
Message-ID: <20201206105545.GA123287@linux.ibm.com> (raw)
In-Reply-To: <202012042347.CetZAZAg-lkp@intel.com>
[-- Attachment #1: Type: text/plain, Size: 4466 bytes --]
(added RISC-V maintainers)
On Fri, Dec 04, 2020 at 11:41:55PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 2996bd3f6ca9ea529b40c369a94b247657abdb4d
> commit: f742050435413d2fe8deba095304788d26a8a144 [10963/10966] arch, mm: wire up memfd_secret system call were relevant
> config: riscv-nommu_k210_defconfig (attached as .config)
> compiler: riscv64-linux-gcc (GCC) 9.3.0
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f742050435413d2fe8deba095304788d26a8a144
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout f742050435413d2fe8deba095304788d26a8a144
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> >> <stdin>:1539:2: warning: #warning syscall memfd_secret not implemented [-Wcpp]
> --
> arch/riscv/kernel/asm-offsets.c:14:6: warning: no previous prototype for 'asm_offsets' [-Wmissing-prototypes]
> 14 | void asm_offsets(void)
> | ^~~~~~~~~~~
> >> <stdin>:1539:2: warning: #warning syscall memfd_secret not implemented [-Wcpp]
The availabilty of memfd_secret depends on ARCH_HAS_SET_DIRECT_MAP and
on riscv this option is selected for nommu.
The patch below makes ARCH_HAS_SET_DIRECT_MAP dependent on MMU, which
makes sense regardless of memfd_secret.
>From 26cde530ac050bf8a7417230a32daa6fb7c39e9b Mon Sep 17 00:00:00 2001
From: Mike Rapoport <rppt@linux.ibm.com>
Date: Sun, 6 Dec 2020 12:42:10 +0200
Subject: [PATCH] riscv: make ARCH_HAS_SET_DIRECT_MAP dependent on MMU
The direct map manipulation methods are implemented in
arch/riscv/mm/pageattr.c and they are only built when CONFIG_MMU=y.
Besides, there is not much point in having these functions for nommu
variant.
Update Kconfig to select ARCH_HAS_SET_DIRECT_MAP if MMU is enabled and hide
declarations of the related functions inside '#ifdef CONFIG_MMU' so that
generic stubs would be used for nommu case.
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
---
arch/riscv/Kconfig | 2 +-
arch/riscv/include/asm/set_memory.h | 7 +++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index af5b858ed8a1..31ff944f092e 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -25,7 +25,7 @@ config RISCV
select ARCH_HAS_KCOV
select ARCH_HAS_MMIOWB
select ARCH_HAS_PTE_SPECIAL
- select ARCH_HAS_SET_DIRECT_MAP
+ select ARCH_HAS_SET_DIRECT_MAP if MMU
select ARCH_HAS_SET_MEMORY
select ARCH_HAS_STRICT_KERNEL_RWX if MMU
select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
diff --git a/arch/riscv/include/asm/set_memory.h b/arch/riscv/include/asm/set_memory.h
index 1aaf2720b8f6..fc37eb03833b 100644
--- a/arch/riscv/include/asm/set_memory.h
+++ b/arch/riscv/include/asm/set_memory.h
@@ -17,6 +17,9 @@ int set_memory_x(unsigned long addr, int numpages);
int set_memory_nx(unsigned long addr, int numpages);
int set_memory_rw_nx(unsigned long addr, int numpages);
void protect_kernel_text_data(void);
+int set_direct_map_invalid_noflush(struct page *page, int numpages);
+int set_direct_map_default_noflush(struct page *page, int numpages);
+bool kernel_page_present(struct page *page);
#else
static inline int set_memory_ro(unsigned long addr, int numpages) { return 0; }
static inline int set_memory_rw(unsigned long addr, int numpages) { return 0; }
@@ -26,10 +29,6 @@ static inline void protect_kernel_text_data(void) {};
static inline int set_memory_rw_nx(unsigned long addr, int numpages) { return 0; }
#endif
-int set_direct_map_invalid_noflush(struct page *page, int numpages);
-int set_direct_map_default_noflush(struct page *page, int numpages);
-bool kernel_page_present(struct page *page);
-
#endif /* __ASSEMBLY__ */
#ifdef CONFIG_ARCH_HAS_STRICT_KERNEL_RWX
--
2.28.0
WARNING: multiple messages have this Message-ID (diff)
From: Mike Rapoport <rppt@linux.ibm.com>
To: kernel test robot <lkp@intel.com>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
linux-riscv@lists.infradead.org
Subject: Re: [linux-next:master 10963/10966] <stdin>:1539:2: warning: #warning syscall memfd_secret not implemented
Date: Sun, 6 Dec 2020 12:55:45 +0200 [thread overview]
Message-ID: <20201206105545.GA123287@linux.ibm.com> (raw)
In-Reply-To: <202012042347.CetZAZAg-lkp@intel.com>
(added RISC-V maintainers)
On Fri, Dec 04, 2020 at 11:41:55PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 2996bd3f6ca9ea529b40c369a94b247657abdb4d
> commit: f742050435413d2fe8deba095304788d26a8a144 [10963/10966] arch, mm: wire up memfd_secret system call were relevant
> config: riscv-nommu_k210_defconfig (attached as .config)
> compiler: riscv64-linux-gcc (GCC) 9.3.0
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f742050435413d2fe8deba095304788d26a8a144
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout f742050435413d2fe8deba095304788d26a8a144
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> >> <stdin>:1539:2: warning: #warning syscall memfd_secret not implemented [-Wcpp]
> --
> arch/riscv/kernel/asm-offsets.c:14:6: warning: no previous prototype for 'asm_offsets' [-Wmissing-prototypes]
> 14 | void asm_offsets(void)
> | ^~~~~~~~~~~
> >> <stdin>:1539:2: warning: #warning syscall memfd_secret not implemented [-Wcpp]
The availabilty of memfd_secret depends on ARCH_HAS_SET_DIRECT_MAP and
on riscv this option is selected for nommu.
The patch below makes ARCH_HAS_SET_DIRECT_MAP dependent on MMU, which
makes sense regardless of memfd_secret.
From 26cde530ac050bf8a7417230a32daa6fb7c39e9b Mon Sep 17 00:00:00 2001
From: Mike Rapoport <rppt@linux.ibm.com>
Date: Sun, 6 Dec 2020 12:42:10 +0200
Subject: [PATCH] riscv: make ARCH_HAS_SET_DIRECT_MAP dependent on MMU
The direct map manipulation methods are implemented in
arch/riscv/mm/pageattr.c and they are only built when CONFIG_MMU=y.
Besides, there is not much point in having these functions for nommu
variant.
Update Kconfig to select ARCH_HAS_SET_DIRECT_MAP if MMU is enabled and hide
declarations of the related functions inside '#ifdef CONFIG_MMU' so that
generic stubs would be used for nommu case.
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
---
arch/riscv/Kconfig | 2 +-
arch/riscv/include/asm/set_memory.h | 7 +++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index af5b858ed8a1..31ff944f092e 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -25,7 +25,7 @@ config RISCV
select ARCH_HAS_KCOV
select ARCH_HAS_MMIOWB
select ARCH_HAS_PTE_SPECIAL
- select ARCH_HAS_SET_DIRECT_MAP
+ select ARCH_HAS_SET_DIRECT_MAP if MMU
select ARCH_HAS_SET_MEMORY
select ARCH_HAS_STRICT_KERNEL_RWX if MMU
select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
diff --git a/arch/riscv/include/asm/set_memory.h b/arch/riscv/include/asm/set_memory.h
index 1aaf2720b8f6..fc37eb03833b 100644
--- a/arch/riscv/include/asm/set_memory.h
+++ b/arch/riscv/include/asm/set_memory.h
@@ -17,6 +17,9 @@ int set_memory_x(unsigned long addr, int numpages);
int set_memory_nx(unsigned long addr, int numpages);
int set_memory_rw_nx(unsigned long addr, int numpages);
void protect_kernel_text_data(void);
+int set_direct_map_invalid_noflush(struct page *page, int numpages);
+int set_direct_map_default_noflush(struct page *page, int numpages);
+bool kernel_page_present(struct page *page);
#else
static inline int set_memory_ro(unsigned long addr, int numpages) { return 0; }
static inline int set_memory_rw(unsigned long addr, int numpages) { return 0; }
@@ -26,10 +29,6 @@ static inline void protect_kernel_text_data(void) {};
static inline int set_memory_rw_nx(unsigned long addr, int numpages) { return 0; }
#endif
-int set_direct_map_invalid_noflush(struct page *page, int numpages);
-int set_direct_map_default_noflush(struct page *page, int numpages);
-bool kernel_page_present(struct page *page);
-
#endif /* __ASSEMBLY__ */
#ifdef CONFIG_ARCH_HAS_STRICT_KERNEL_RWX
--
2.28.0
next prev parent reply other threads:[~2020-12-06 10:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-04 15:41 [linux-next:master 10963/10966] <stdin>:1539:2: warning: #warning syscall memfd_secret not implemented kernel test robot
2020-12-04 15:41 ` kernel test robot
2020-12-06 10:55 ` Mike Rapoport [this message]
2020-12-06 10:55 ` Mike Rapoport
2020-12-06 10:55 ` Mike Rapoport
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=20201206105545.GA123287@linux.ibm.com \
--to=rppt@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=aou@eecs.berkeley.edu \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=linux-riscv@lists.infradead.org \
--cc=lkp@intel.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.