All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mips-next] MIPS: UAPI: unexport unistd_nr_{n32,n64,o32}.h
@ 2021-01-04 15:41 Alexander Lobakin
  2021-01-07 16:25 ` Thomas Bogendoerfer
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Lobakin @ 2021-01-04 15:41 UTC (permalink / raw)
  To: Thomas Bogendoerfer
  Cc: Paolo Bonzini, Sean Christopherson, Alexander Lobakin,
	Jiaxun Yang, Andrew Morton, Masahiro Yamada, Michal Simek,
	Paul Burton, linux-mips, linux-kernel

unistd_nr_{n32,n64,o32}.h are needed only by include/asm/unistd.h,
which is a kernel-side header file, and their contents is generally
not for userland use.
Move their target destination from include/generated/uapi/asm/ to
include/generated/asm/ to disable exporting them as UAPI headers.

Signed-off-by: Alexander Lobakin <alobakin@pm.me>
---
 arch/mips/include/asm/Kbuild       |  4 ++++
 arch/mips/include/uapi/asm/Kbuild  |  3 ---
 arch/mips/kernel/syscalls/Makefile | 16 ++++++++--------
 3 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/arch/mips/include/asm/Kbuild b/arch/mips/include/asm/Kbuild
index 198b3bafdac9..9040ff0b3a14 100644
--- a/arch/mips/include/asm/Kbuild
+++ b/arch/mips/include/asm/Kbuild
@@ -4,6 +4,10 @@ generated-y += syscall_table_32_o32.h
 generated-y += syscall_table_64_n32.h
 generated-y += syscall_table_64_n64.h
 generated-y += syscall_table_64_o32.h
+generated-y += unistd_nr_n32.h
+generated-y += unistd_nr_n64.h
+generated-y += unistd_nr_o32.h
+
 generic-y += export.h
 generic-y += kvm_para.h
 generic-y += local64.h
diff --git a/arch/mips/include/uapi/asm/Kbuild b/arch/mips/include/uapi/asm/Kbuild
index 6db08385d3d8..fdb9c5412cd9 100644
--- a/arch/mips/include/uapi/asm/Kbuild
+++ b/arch/mips/include/uapi/asm/Kbuild
@@ -2,8 +2,5 @@
 generated-y += unistd_n32.h
 generated-y += unistd_n64.h
 generated-y += unistd_o32.h
-generated-y += unistd_nr_n32.h
-generated-y += unistd_nr_n64.h
-generated-y += unistd_nr_o32.h
 
 generic-y += kvm_para.h
diff --git a/arch/mips/kernel/syscalls/Makefile b/arch/mips/kernel/syscalls/Makefile
index 6efb2f6889a7..a1ce8b7dbcfa 100644
--- a/arch/mips/kernel/syscalls/Makefile
+++ b/arch/mips/kernel/syscalls/Makefile
@@ -44,17 +44,17 @@ $(uapi)/unistd_o32.h: $(syscallo32) $(syshdr)
 
 sysnr_pfx_unistd_nr_n32 := N32
 sysnr_offset_unistd_nr_n32 := 6000
-$(uapi)/unistd_nr_n32.h: $(syscalln32) $(sysnr)
+$(kapi)/unistd_nr_n32.h: $(syscalln32) $(sysnr)
 	$(call if_changed,sysnr)
 
 sysnr_pfx_unistd_nr_n64 := 64
 sysnr_offset_unistd_nr_n64 := 5000
-$(uapi)/unistd_nr_n64.h: $(syscalln64) $(sysnr)
+$(kapi)/unistd_nr_n64.h: $(syscalln64) $(sysnr)
 	$(call if_changed,sysnr)
 
 sysnr_pfx_unistd_nr_o32 := O32
 sysnr_offset_unistd_nr_o32 := 4000
-$(uapi)/unistd_nr_o32.h: $(syscallo32) $(sysnr)
+$(kapi)/unistd_nr_o32.h: $(syscallo32) $(sysnr)
 	$(call if_changed,sysnr)
 
 systbl_abi_syscall_table_32_o32 := 32_o32
@@ -79,14 +79,14 @@ $(kapi)/syscall_table_64_o32.h: $(syscallo32) $(systbl)
 
 uapisyshdr-y		+= unistd_n32.h			\
 			   unistd_n64.h			\
-			   unistd_o32.h			\
-			   unistd_nr_n32.h		\
-			   unistd_nr_n64.h		\
-			   unistd_nr_o32.h
+			   unistd_o32.h
 kapisyshdr-y		+= syscall_table_32_o32.h	\
 			   syscall_table_64_n32.h	\
 			   syscall_table_64_n64.h	\
-			   syscall_table_64_o32.h
+			   syscall_table_64_o32.h	\
+			   unistd_nr_n32.h		\
+			   unistd_nr_n64.h		\
+			   unistd_nr_o32.h
 
 targets	+= $(uapisyshdr-y) $(kapisyshdr-y)
 
-- 
2.30.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH mips-next] MIPS: UAPI: unexport unistd_nr_{n32,n64,o32}.h
  2021-01-04 15:41 [PATCH mips-next] MIPS: UAPI: unexport unistd_nr_{n32,n64,o32}.h Alexander Lobakin
@ 2021-01-07 16:25 ` Thomas Bogendoerfer
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2021-01-07 16:25 UTC (permalink / raw)
  To: Alexander Lobakin
  Cc: Paolo Bonzini, Sean Christopherson, Jiaxun Yang, Andrew Morton,
	Masahiro Yamada, Michal Simek, Paul Burton, linux-mips,
	linux-kernel

On Mon, Jan 04, 2021 at 03:41:48PM +0000, Alexander Lobakin wrote:
> unistd_nr_{n32,n64,o32}.h are needed only by include/asm/unistd.h,
> which is a kernel-side header file, and their contents is generally
> not for userland use.
> Move their target destination from include/generated/uapi/asm/ to
> include/generated/asm/ to disable exporting them as UAPI headers.
> 
> Signed-off-by: Alexander Lobakin <alobakin@pm.me>
> ---
>  arch/mips/include/asm/Kbuild       |  4 ++++
>  arch/mips/include/uapi/asm/Kbuild  |  3 ---
>  arch/mips/kernel/syscalls/Makefile | 16 ++++++++--------
>  3 files changed, 12 insertions(+), 11 deletions(-)

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-07 16:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-04 15:41 [PATCH mips-next] MIPS: UAPI: unexport unistd_nr_{n32,n64,o32}.h Alexander Lobakin
2021-01-07 16:25 ` Thomas Bogendoerfer

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.