All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] asm-generic: unistd.h: make 'compat_sys_fadvise64_64' conditional
@ 2022-08-07 17:28 ` Randy Dunlap
  0 siblings, 0 replies; 8+ messages in thread
From: Randy Dunlap @ 2022-08-07 17:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-riscv, Arnd Bergmann, linux-arch, Andrew Morton, linux-mm

Don't require 'compat_sys_fadvise64_64' when
__ARCH_WANT_COMPAT_FADVISE64_64 is not set.

Fixes this build error when CONFIG_ADVISE_SYSCALLS is not set:

include/uapi/asm-generic/unistd.h:649:49: error: 'compat_sys_fadvise64_64' undeclared here (not in a function); did you mean 'ksys_fadvise64_64'?
  649 | __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
arch/riscv/kernel/compat_syscall_table.c:12:42: note: in definition of macro '__SYSCALL'
   12 | #define __SYSCALL(nr, call)      [nr] = (call),
include/uapi/asm-generic/unistd.h:649:1: note: in expansion of macro '__SC_COMP'
  649 | __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: linux-riscv@lists.infradead.org
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arch@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
---
 include/uapi/asm-generic/unistd.h |    2 ++
 1 file changed, 2 insertions(+)

--- a/include/uapi/asm-generic/unistd.h
+++ b/include/uapi/asm-generic/unistd.h
@@ -645,8 +645,10 @@ __SC_COMP(__NR_execve, sys_execve, compa
 #define __NR3264_mmap 222
 __SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap)
 /* mm/fadvise.c */
+#ifdef __ARCH_WANT_COMPAT_FADVISE64_64
 #define __NR3264_fadvise64 223
 __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
+#endif
 
 /* mm/, CONFIG_MMU only */
 #ifndef __ARCH_NOMMU

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

* [PATCH] asm-generic: unistd.h: make 'compat_sys_fadvise64_64' conditional
@ 2022-08-07 17:28 ` Randy Dunlap
  0 siblings, 0 replies; 8+ messages in thread
From: Randy Dunlap @ 2022-08-07 17:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-riscv, Arnd Bergmann, linux-arch, Andrew Morton, linux-mm

Don't require 'compat_sys_fadvise64_64' when
__ARCH_WANT_COMPAT_FADVISE64_64 is not set.

Fixes this build error when CONFIG_ADVISE_SYSCALLS is not set:

include/uapi/asm-generic/unistd.h:649:49: error: 'compat_sys_fadvise64_64' undeclared here (not in a function); did you mean 'ksys_fadvise64_64'?
  649 | __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
arch/riscv/kernel/compat_syscall_table.c:12:42: note: in definition of macro '__SYSCALL'
   12 | #define __SYSCALL(nr, call)      [nr] = (call),
include/uapi/asm-generic/unistd.h:649:1: note: in expansion of macro '__SC_COMP'
  649 | __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: linux-riscv@lists.infradead.org
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arch@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
---
 include/uapi/asm-generic/unistd.h |    2 ++
 1 file changed, 2 insertions(+)

--- a/include/uapi/asm-generic/unistd.h
+++ b/include/uapi/asm-generic/unistd.h
@@ -645,8 +645,10 @@ __SC_COMP(__NR_execve, sys_execve, compa
 #define __NR3264_mmap 222
 __SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap)
 /* mm/fadvise.c */
+#ifdef __ARCH_WANT_COMPAT_FADVISE64_64
 #define __NR3264_fadvise64 223
 __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
+#endif
 
 /* mm/, CONFIG_MMU only */
 #ifndef __ARCH_NOMMU

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH] asm-generic: unistd.h: make 'compat_sys_fadvise64_64' conditional
  2022-08-07 17:28 ` Randy Dunlap
@ 2022-08-07 19:44   ` Arnd Bergmann
  -1 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2022-08-07 19:44 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-riscv, Arnd Bergmann, linux-arch, Andrew Morton, linux-mm

On Sun, Aug 7, 2022 at 7:28 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Don't require 'compat_sys_fadvise64_64' when
> __ARCH_WANT_COMPAT_FADVISE64_64 is not set.
>
> Fixes this build error when CONFIG_ADVISE_SYSCALLS is not set:
>
> include/uapi/asm-generic/unistd.h:649:49: error: 'compat_sys_fadvise64_64' undeclared here (not in a function); did you mean 'ksys_fadvise64_64'?
>   649 | __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
> arch/riscv/kernel/compat_syscall_table.c:12:42: note: in definition of macro '__SYSCALL'
>    12 | #define __SYSCALL(nr, call)      [nr] = (call),
> include/uapi/asm-generic/unistd.h:649:1: note: in expansion of macro '__SC_COMP'
>   649 | __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Albert Ou <aou@eecs.berkeley.edu>
> Cc: linux-riscv@lists.infradead.org
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: linux-arch@vger.kernel.org
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: linux-mm@kvack.org
> ---
>  include/uapi/asm-generic/unistd.h |    2 ++
>  1 file changed, 2 insertions(+)
>
> --- a/include/uapi/asm-generic/unistd.h
> +++ b/include/uapi/asm-generic/unistd.h
> @@ -645,8 +645,10 @@ __SC_COMP(__NR_execve, sys_execve, compa
>  #define __NR3264_mmap 222
>  __SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap)
>  /* mm/fadvise.c */
> +#ifdef __ARCH_WANT_COMPAT_FADVISE64_64
>  #define __NR3264_fadvise64 223
>  __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
> +#endif
>

This does not work: __ARCH_WANT_COMPAT_FADVISE64_64 is defined in
arch/riscv/include/asm/unistd.h, which is not a UAPI header. By making the line
conditional on this, user space no longer sees the macro definition.

It looks like you also drop the native definition on all architectures other
than riscv here. What we probably want is to just make all the
declarations in include/linux/compat.h unconditional and not have them
depend on architecture specific macros. Some of these may have
incompatible prototypes depending on the architecture, but if we run
into those, I would suggest we just give them unique names.

       Arnd

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

* Re: [PATCH] asm-generic: unistd.h: make 'compat_sys_fadvise64_64' conditional
@ 2022-08-07 19:44   ` Arnd Bergmann
  0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2022-08-07 19:44 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-riscv, Arnd Bergmann, linux-arch, Andrew Morton, linux-mm

On Sun, Aug 7, 2022 at 7:28 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Don't require 'compat_sys_fadvise64_64' when
> __ARCH_WANT_COMPAT_FADVISE64_64 is not set.
>
> Fixes this build error when CONFIG_ADVISE_SYSCALLS is not set:
>
> include/uapi/asm-generic/unistd.h:649:49: error: 'compat_sys_fadvise64_64' undeclared here (not in a function); did you mean 'ksys_fadvise64_64'?
>   649 | __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
> arch/riscv/kernel/compat_syscall_table.c:12:42: note: in definition of macro '__SYSCALL'
>    12 | #define __SYSCALL(nr, call)      [nr] = (call),
> include/uapi/asm-generic/unistd.h:649:1: note: in expansion of macro '__SC_COMP'
>   649 | __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Albert Ou <aou@eecs.berkeley.edu>
> Cc: linux-riscv@lists.infradead.org
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: linux-arch@vger.kernel.org
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: linux-mm@kvack.org
> ---
>  include/uapi/asm-generic/unistd.h |    2 ++
>  1 file changed, 2 insertions(+)
>
> --- a/include/uapi/asm-generic/unistd.h
> +++ b/include/uapi/asm-generic/unistd.h
> @@ -645,8 +645,10 @@ __SC_COMP(__NR_execve, sys_execve, compa
>  #define __NR3264_mmap 222
>  __SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap)
>  /* mm/fadvise.c */
> +#ifdef __ARCH_WANT_COMPAT_FADVISE64_64
>  #define __NR3264_fadvise64 223
>  __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
> +#endif
>

This does not work: __ARCH_WANT_COMPAT_FADVISE64_64 is defined in
arch/riscv/include/asm/unistd.h, which is not a UAPI header. By making the line
conditional on this, user space no longer sees the macro definition.

It looks like you also drop the native definition on all architectures other
than riscv here. What we probably want is to just make all the
declarations in include/linux/compat.h unconditional and not have them
depend on architecture specific macros. Some of these may have
incompatible prototypes depending on the architecture, but if we run
into those, I would suggest we just give them unique names.

       Arnd

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH] asm-generic: unistd.h: make 'compat_sys_fadvise64_64' conditional
  2022-08-07 19:44   ` Arnd Bergmann
@ 2022-08-07 22:39     ` Randy Dunlap
  -1 siblings, 0 replies; 8+ messages in thread
From: Randy Dunlap @ 2022-08-07 22:39 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-kernel, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-riscv, linux-arch, Andrew Morton, linux-mm

Hi Arnd,

On 8/7/22 12:44, Arnd Bergmann wrote:
> On Sun, Aug 7, 2022 at 7:28 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>>
>> Don't require 'compat_sys_fadvise64_64' when
>> __ARCH_WANT_COMPAT_FADVISE64_64 is not set.
>>
>> Fixes this build error when CONFIG_ADVISE_SYSCALLS is not set:
>>
>> include/uapi/asm-generic/unistd.h:649:49: error: 'compat_sys_fadvise64_64' undeclared here (not in a function); did you mean 'ksys_fadvise64_64'?
>>   649 | __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
>> arch/riscv/kernel/compat_syscall_table.c:12:42: note: in definition of macro '__SYSCALL'
>>    12 | #define __SYSCALL(nr, call)      [nr] = (call),
>> include/uapi/asm-generic/unistd.h:649:1: note: in expansion of macro '__SC_COMP'
>>   649 | __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
>>
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Cc: Paul Walmsley <paul.walmsley@sifive.com>
>> Cc: Palmer Dabbelt <palmer@dabbelt.com>
>> Cc: Albert Ou <aou@eecs.berkeley.edu>
>> Cc: linux-riscv@lists.infradead.org
>> Cc: Arnd Bergmann <arnd@arndb.de>
>> Cc: linux-arch@vger.kernel.org
>> Cc: Andrew Morton <akpm@linux-foundation.org>
>> Cc: linux-mm@kvack.org
>> ---
>>  include/uapi/asm-generic/unistd.h |    2 ++
>>  1 file changed, 2 insertions(+)
>>
>> --- a/include/uapi/asm-generic/unistd.h
>> +++ b/include/uapi/asm-generic/unistd.h
>> @@ -645,8 +645,10 @@ __SC_COMP(__NR_execve, sys_execve, compa
>>  #define __NR3264_mmap 222
>>  __SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap)
>>  /* mm/fadvise.c */
>> +#ifdef __ARCH_WANT_COMPAT_FADVISE64_64
>>  #define __NR3264_fadvise64 223
>>  __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
>> +#endif
>>
> 
> This does not work: __ARCH_WANT_COMPAT_FADVISE64_64 is defined in
> arch/riscv/include/asm/unistd.h, which is not a UAPI header. By making the line
> conditional on this, user space no longer sees the macro definition.
> 
> It looks like you also drop the native definition on all architectures other
> than riscv here. What we probably want is to just make all the
> declarations in include/linux/compat.h unconditional and not have them
> depend on architecture specific macros. Some of these may have
> incompatible prototypes depending on the architecture, but if we run
> into those, I would suggest we just give them unique names.

Thanks for the comments.

With the other patch to kernel/sys_ni.c, this one is no longer needed,
although I can look into making more entries in <linux/compat.h>
unconditional. That would also mean adding them to kernel/sys_ni.c, right?
(if not already there)

-- 
~Randy

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH] asm-generic: unistd.h: make 'compat_sys_fadvise64_64' conditional
@ 2022-08-07 22:39     ` Randy Dunlap
  0 siblings, 0 replies; 8+ messages in thread
From: Randy Dunlap @ 2022-08-07 22:39 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-kernel, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-riscv, linux-arch, Andrew Morton, linux-mm

Hi Arnd,

On 8/7/22 12:44, Arnd Bergmann wrote:
> On Sun, Aug 7, 2022 at 7:28 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>>
>> Don't require 'compat_sys_fadvise64_64' when
>> __ARCH_WANT_COMPAT_FADVISE64_64 is not set.
>>
>> Fixes this build error when CONFIG_ADVISE_SYSCALLS is not set:
>>
>> include/uapi/asm-generic/unistd.h:649:49: error: 'compat_sys_fadvise64_64' undeclared here (not in a function); did you mean 'ksys_fadvise64_64'?
>>   649 | __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
>> arch/riscv/kernel/compat_syscall_table.c:12:42: note: in definition of macro '__SYSCALL'
>>    12 | #define __SYSCALL(nr, call)      [nr] = (call),
>> include/uapi/asm-generic/unistd.h:649:1: note: in expansion of macro '__SC_COMP'
>>   649 | __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
>>
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Cc: Paul Walmsley <paul.walmsley@sifive.com>
>> Cc: Palmer Dabbelt <palmer@dabbelt.com>
>> Cc: Albert Ou <aou@eecs.berkeley.edu>
>> Cc: linux-riscv@lists.infradead.org
>> Cc: Arnd Bergmann <arnd@arndb.de>
>> Cc: linux-arch@vger.kernel.org
>> Cc: Andrew Morton <akpm@linux-foundation.org>
>> Cc: linux-mm@kvack.org
>> ---
>>  include/uapi/asm-generic/unistd.h |    2 ++
>>  1 file changed, 2 insertions(+)
>>
>> --- a/include/uapi/asm-generic/unistd.h
>> +++ b/include/uapi/asm-generic/unistd.h
>> @@ -645,8 +645,10 @@ __SC_COMP(__NR_execve, sys_execve, compa
>>  #define __NR3264_mmap 222
>>  __SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap)
>>  /* mm/fadvise.c */
>> +#ifdef __ARCH_WANT_COMPAT_FADVISE64_64
>>  #define __NR3264_fadvise64 223
>>  __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
>> +#endif
>>
> 
> This does not work: __ARCH_WANT_COMPAT_FADVISE64_64 is defined in
> arch/riscv/include/asm/unistd.h, which is not a UAPI header. By making the line
> conditional on this, user space no longer sees the macro definition.
> 
> It looks like you also drop the native definition on all architectures other
> than riscv here. What we probably want is to just make all the
> declarations in include/linux/compat.h unconditional and not have them
> depend on architecture specific macros. Some of these may have
> incompatible prototypes depending on the architecture, but if we run
> into those, I would suggest we just give them unique names.

Thanks for the comments.

With the other patch to kernel/sys_ni.c, this one is no longer needed,
although I can look into making more entries in <linux/compat.h>
unconditional. That would also mean adding them to kernel/sys_ni.c, right?
(if not already there)

-- 
~Randy

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

* Re: [PATCH] asm-generic: unistd.h: make 'compat_sys_fadvise64_64' conditional
  2022-08-07 22:39     ` Randy Dunlap
@ 2022-08-08  8:06       ` Arnd Bergmann
  -1 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2022-08-08  8:06 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Arnd Bergmann, linux-kernel, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, linux-riscv, linux-arch, Andrew Morton, linux-mm

On Mon, Aug 8, 2022 at 12:39 AM Randy Dunlap <rdunlap@infradead.org> wrote:
> On 8/7/22 12:44, Arnd Bergmann wrote:
> > On Sun, Aug 7, 2022 at 7:28 PM Randy Dunlap <rdunlap@infradead.org> wrote:
> >>
> >
> > This does not work: __ARCH_WANT_COMPAT_FADVISE64_64 is defined in
> > arch/riscv/include/asm/unistd.h, which is not a UAPI header. By making the line
> > conditional on this, user space no longer sees the macro definition.
> >
> > It looks like you also drop the native definition on all architectures other
> > than riscv here. What we probably want is to just make all the
> > declarations in include/linux/compat.h unconditional and not have them
> > depend on architecture specific macros. Some of these may have
> > incompatible prototypes depending on the architecture, but if we run
> > into those, I would suggest we just give them unique names.
>
> Thanks for the comments.
>
> With the other patch to kernel/sys_ni.c, this one is no longer needed,

Ok.

> although I can look into making more entries in <linux/compat.h>
> unconditional.

This would be a nice cleanup, but it does involve making sure that
all prototypes are compatible with the implementation on each
architecture. I think we should definitely do this, it's just not as
simple as removing each #ifdef in linux/compat.h and linux/syscall.h

> That would also mean adding them to kernel/sys_ni.c, right?
> (if not already there)

That part should be completely independent. If the entry in
kernel/sys_ni.c is missing, that causes a link failure, while an
incorrect #ifdef would cause a compile-time error for the missing
prototype.

         Arnd

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

* Re: [PATCH] asm-generic: unistd.h: make 'compat_sys_fadvise64_64' conditional
@ 2022-08-08  8:06       ` Arnd Bergmann
  0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2022-08-08  8:06 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Arnd Bergmann, linux-kernel, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, linux-riscv, linux-arch, Andrew Morton, linux-mm

On Mon, Aug 8, 2022 at 12:39 AM Randy Dunlap <rdunlap@infradead.org> wrote:
> On 8/7/22 12:44, Arnd Bergmann wrote:
> > On Sun, Aug 7, 2022 at 7:28 PM Randy Dunlap <rdunlap@infradead.org> wrote:
> >>
> >
> > This does not work: __ARCH_WANT_COMPAT_FADVISE64_64 is defined in
> > arch/riscv/include/asm/unistd.h, which is not a UAPI header. By making the line
> > conditional on this, user space no longer sees the macro definition.
> >
> > It looks like you also drop the native definition on all architectures other
> > than riscv here. What we probably want is to just make all the
> > declarations in include/linux/compat.h unconditional and not have them
> > depend on architecture specific macros. Some of these may have
> > incompatible prototypes depending on the architecture, but if we run
> > into those, I would suggest we just give them unique names.
>
> Thanks for the comments.
>
> With the other patch to kernel/sys_ni.c, this one is no longer needed,

Ok.

> although I can look into making more entries in <linux/compat.h>
> unconditional.

This would be a nice cleanup, but it does involve making sure that
all prototypes are compatible with the implementation on each
architecture. I think we should definitely do this, it's just not as
simple as removing each #ifdef in linux/compat.h and linux/syscall.h

> That would also mean adding them to kernel/sys_ni.c, right?
> (if not already there)

That part should be completely independent. If the entry in
kernel/sys_ni.c is missing, that causes a link failure, while an
incorrect #ifdef would cause a compile-time error for the missing
prototype.

         Arnd

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

end of thread, other threads:[~2022-08-08  8:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-07 17:28 [PATCH] asm-generic: unistd.h: make 'compat_sys_fadvise64_64' conditional Randy Dunlap
2022-08-07 17:28 ` Randy Dunlap
2022-08-07 19:44 ` Arnd Bergmann
2022-08-07 19:44   ` Arnd Bergmann
2022-08-07 22:39   ` Randy Dunlap
2022-08-07 22:39     ` Randy Dunlap
2022-08-08  8:06     ` Arnd Bergmann
2022-08-08  8:06       ` Arnd Bergmann

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.