* [PATCH v2] kernel/sys_ni: add compat entry for fadvise64_64
@ 2022-08-07 22:09 ` Randy Dunlap
0 siblings, 0 replies; 8+ messages in thread
From: Randy Dunlap @ 2022-08-07 22:09 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Arnd Bergmann, Josh Triplett, Paul Walmsley,
Palmer Dabbelt, Albert Ou, linux-riscv, linux-api, Andrew Morton,
linux-mm
When CONFIG_ADVISE_SYSCALLS is not set/enabled and CONFIG_COMPAT is
set/enabled, the riscv compat_syscall_table references
'compat_sys_fadvise64_64', which is not defined:
riscv64-linux-ld: arch/riscv/kernel/compat_syscall_table.o:(.rodata+0x6f8):
undefined reference to `compat_sys_fadvise64_64'
Add 'fadvise64_64' to kernel/sys_ni.c as a conditional COMPAT function
so that when CONFIG_ADVISE_SYSCALLS is not set, there is a fallback
function available.
Fixes: d3ac21cacc24 ("mm: Support compiling out madvise and fadvise")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Cc: Josh Triplett <josh@joshtriplett.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-api@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
---
v2: patch kernel/sys_ni.c (for any arch) instead of arch/riscv's
unistd.h (Arnd)
kernel/sys_ni.c | 1 +
1 file changed, 1 insertion(+)
--- a/kernel/sys_ni.c
+++ b/kernel/sys_ni.c
@@ -277,6 +277,7 @@ COND_SYSCALL(landlock_restrict_self);
/* mm/fadvise.c */
COND_SYSCALL(fadvise64_64);
+COND_SYSCALL_COMPAT(fadvise64_64);
/* mm/, CONFIG_MMU only */
COND_SYSCALL(swapon);
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2] kernel/sys_ni: add compat entry for fadvise64_64
@ 2022-08-07 22:09 ` Randy Dunlap
0 siblings, 0 replies; 8+ messages in thread
From: Randy Dunlap @ 2022-08-07 22:09 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Arnd Bergmann, Josh Triplett, Paul Walmsley,
Palmer Dabbelt, Albert Ou, linux-riscv, linux-api, Andrew Morton,
linux-mm
When CONFIG_ADVISE_SYSCALLS is not set/enabled and CONFIG_COMPAT is
set/enabled, the riscv compat_syscall_table references
'compat_sys_fadvise64_64', which is not defined:
riscv64-linux-ld: arch/riscv/kernel/compat_syscall_table.o:(.rodata+0x6f8):
undefined reference to `compat_sys_fadvise64_64'
Add 'fadvise64_64' to kernel/sys_ni.c as a conditional COMPAT function
so that when CONFIG_ADVISE_SYSCALLS is not set, there is a fallback
function available.
Fixes: d3ac21cacc24 ("mm: Support compiling out madvise and fadvise")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Cc: Josh Triplett <josh@joshtriplett.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-api@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
---
v2: patch kernel/sys_ni.c (for any arch) instead of arch/riscv's
unistd.h (Arnd)
kernel/sys_ni.c | 1 +
1 file changed, 1 insertion(+)
--- a/kernel/sys_ni.c
+++ b/kernel/sys_ni.c
@@ -277,6 +277,7 @@ COND_SYSCALL(landlock_restrict_self);
/* mm/fadvise.c */
COND_SYSCALL(fadvise64_64);
+COND_SYSCALL_COMPAT(fadvise64_64);
/* mm/, CONFIG_MMU only */
COND_SYSCALL(swapon);
_______________________________________________
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 v2] kernel/sys_ni: add compat entry for fadvise64_64
2022-08-07 22:09 ` Randy Dunlap
@ 2022-08-08 6:57 ` Arnd Bergmann
-1 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2022-08-08 6:57 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, Arnd Bergmann, Josh Triplett, Paul Walmsley,
Palmer Dabbelt, Albert Ou, linux-riscv, linux-api, Andrew Morton,
linux-mm
On Mon, Aug 8, 2022 at 12:09 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> When CONFIG_ADVISE_SYSCALLS is not set/enabled and CONFIG_COMPAT is
> set/enabled, the riscv compat_syscall_table references
> 'compat_sys_fadvise64_64', which is not defined:
>
> riscv64-linux-ld: arch/riscv/kernel/compat_syscall_table.o:(.rodata+0x6f8):
> undefined reference to `compat_sys_fadvise64_64'
>
> Add 'fadvise64_64' to kernel/sys_ni.c as a conditional COMPAT function
> so that when CONFIG_ADVISE_SYSCALLS is not set, there is a fallback
> function available.
>
> Fixes: d3ac21cacc24 ("mm: Support compiling out madvise and fadvise")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Suggested-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] kernel/sys_ni: add compat entry for fadvise64_64
@ 2022-08-08 6:57 ` Arnd Bergmann
0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2022-08-08 6:57 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, Arnd Bergmann, Josh Triplett, Paul Walmsley,
Palmer Dabbelt, Albert Ou, linux-riscv, linux-api, Andrew Morton,
linux-mm
On Mon, Aug 8, 2022 at 12:09 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> When CONFIG_ADVISE_SYSCALLS is not set/enabled and CONFIG_COMPAT is
> set/enabled, the riscv compat_syscall_table references
> 'compat_sys_fadvise64_64', which is not defined:
>
> riscv64-linux-ld: arch/riscv/kernel/compat_syscall_table.o:(.rodata+0x6f8):
> undefined reference to `compat_sys_fadvise64_64'
>
> Add 'fadvise64_64' to kernel/sys_ni.c as a conditional COMPAT function
> so that when CONFIG_ADVISE_SYSCALLS is not set, there is a fallback
> function available.
>
> Fixes: d3ac21cacc24 ("mm: Support compiling out madvise and fadvise")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Suggested-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
_______________________________________________
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 v2] kernel/sys_ni: add compat entry for fadvise64_64
2022-08-07 22:09 ` Randy Dunlap
@ 2022-08-13 17:03 ` Conor.Dooley
-1 siblings, 0 replies; 8+ messages in thread
From: Conor.Dooley @ 2022-08-13 17:03 UTC (permalink / raw)
To: rdunlap, linux-kernel
Cc: arnd, josh, paul.walmsley, palmer, aou, linux-riscv, linux-api,
akpm, linux-mm
On 07/08/2022 23:09, Randy Dunlap wrote:
> When CONFIG_ADVISE_SYSCALLS is not set/enabled and CONFIG_COMPAT is
> set/enabled, the riscv compat_syscall_table references
> 'compat_sys_fadvise64_64', which is not defined:
>
> riscv64-linux-ld: arch/riscv/kernel/compat_syscall_table.o:(.rodata+0x6f8):
> undefined reference to `compat_sys_fadvise64_64'
>
> Add 'fadvise64_64' to kernel/sys_ni.c as a conditional COMPAT function
> so that when CONFIG_ADVISE_SYSCALLS is not set, there is a fallback
> function available.
Is this in a 6.0 destined tree somewhere that I've missed?
Bumped into it while looking at an unrelated LKP randconfig error.
FWIW:
Tested-by: Conor Dooley <conor.dooley@microchip.com>
Thanks,
Conor.
>
> Fixes: d3ac21cacc24 ("mm: Support compiling out madvise and fadvise")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Suggested-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Josh Triplett <josh@joshtriplett.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-api@vger.kernel.org
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: linux-mm@kvack.org
> ---
> v2: patch kernel/sys_ni.c (for any arch) instead of arch/riscv's
> unistd.h (Arnd)
>
> kernel/sys_ni.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --- a/kernel/sys_ni.c
> +++ b/kernel/sys_ni.c
> @@ -277,6 +277,7 @@ COND_SYSCALL(landlock_restrict_self);
>
> /* mm/fadvise.c */
> COND_SYSCALL(fadvise64_64);
> +COND_SYSCALL_COMPAT(fadvise64_64);
>
> /* mm/, CONFIG_MMU only */
> COND_SYSCALL(swapon);
>
> _______________________________________________
> 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 v2] kernel/sys_ni: add compat entry for fadvise64_64
@ 2022-08-13 17:03 ` Conor.Dooley
0 siblings, 0 replies; 8+ messages in thread
From: Conor.Dooley @ 2022-08-13 17:03 UTC (permalink / raw)
To: rdunlap, linux-kernel
Cc: arnd, josh, paul.walmsley, palmer, aou, linux-riscv, linux-api,
akpm, linux-mm
On 07/08/2022 23:09, Randy Dunlap wrote:
> When CONFIG_ADVISE_SYSCALLS is not set/enabled and CONFIG_COMPAT is
> set/enabled, the riscv compat_syscall_table references
> 'compat_sys_fadvise64_64', which is not defined:
>
> riscv64-linux-ld: arch/riscv/kernel/compat_syscall_table.o:(.rodata+0x6f8):
> undefined reference to `compat_sys_fadvise64_64'
>
> Add 'fadvise64_64' to kernel/sys_ni.c as a conditional COMPAT function
> so that when CONFIG_ADVISE_SYSCALLS is not set, there is a fallback
> function available.
Is this in a 6.0 destined tree somewhere that I've missed?
Bumped into it while looking at an unrelated LKP randconfig error.
FWIW:
Tested-by: Conor Dooley <conor.dooley@microchip.com>
Thanks,
Conor.
>
> Fixes: d3ac21cacc24 ("mm: Support compiling out madvise and fadvise")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Suggested-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Josh Triplett <josh@joshtriplett.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-api@vger.kernel.org
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: linux-mm@kvack.org
> ---
> v2: patch kernel/sys_ni.c (for any arch) instead of arch/riscv's
> unistd.h (Arnd)
>
> kernel/sys_ni.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --- a/kernel/sys_ni.c
> +++ b/kernel/sys_ni.c
> @@ -277,6 +277,7 @@ COND_SYSCALL(landlock_restrict_self);
>
> /* mm/fadvise.c */
> COND_SYSCALL(fadvise64_64);
> +COND_SYSCALL_COMPAT(fadvise64_64);
>
> /* mm/, CONFIG_MMU only */
> COND_SYSCALL(swapon);
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
_______________________________________________
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 v2] kernel/sys_ni: add compat entry for fadvise64_64
2022-08-13 17:03 ` Conor.Dooley
@ 2022-08-13 17:44 ` Randy Dunlap
-1 siblings, 0 replies; 8+ messages in thread
From: Randy Dunlap @ 2022-08-13 17:44 UTC (permalink / raw)
To: Conor.Dooley, linux-kernel
Cc: arnd, josh, paul.walmsley, palmer, aou, linux-riscv, linux-api,
akpm, linux-mm
On 8/13/22 10:03, Conor.Dooley@microchip.com wrote:
> On 07/08/2022 23:09, Randy Dunlap wrote:
>> When CONFIG_ADVISE_SYSCALLS is not set/enabled and CONFIG_COMPAT is
>> set/enabled, the riscv compat_syscall_table references
>> 'compat_sys_fadvise64_64', which is not defined:
>>
>> riscv64-linux-ld: arch/riscv/kernel/compat_syscall_table.o:(.rodata+0x6f8):
>> undefined reference to `compat_sys_fadvise64_64'
>>
>> Add 'fadvise64_64' to kernel/sys_ni.c as a conditional COMPAT function
>> so that when CONFIG_ADVISE_SYSCALLS is not set, there is a fallback
>> function available.
>
> Is this in a 6.0 destined tree somewhere that I've missed?
> Bumped into it while looking at an unrelated LKP randconfig error.
> FWIW:
> Tested-by: Conor Dooley <conor.dooley@microchip.com>
> Thanks,
> Conor.
It's in Andrew's mm-hotfixes-unstable branch AFAIK.
Thanks.
>>
>> Fixes: d3ac21cacc24 ("mm: Support compiling out madvise and fadvise")
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Suggested-by: Arnd Bergmann <arnd@arndb.de>
>> Cc: Josh Triplett <josh@joshtriplett.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-api@vger.kernel.org
>> Cc: Andrew Morton <akpm@linux-foundation.org>
>> Cc: linux-mm@kvack.org
>> ---
>> v2: patch kernel/sys_ni.c (for any arch) instead of arch/riscv's
>> unistd.h (Arnd)
>>
>> kernel/sys_ni.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> --- a/kernel/sys_ni.c
>> +++ b/kernel/sys_ni.c
>> @@ -277,6 +277,7 @@ COND_SYSCALL(landlock_restrict_self);
>>
>> /* mm/fadvise.c */
>> COND_SYSCALL(fadvise64_64);
>> +COND_SYSCALL_COMPAT(fadvise64_64);
>>
>> /* mm/, CONFIG_MMU only */
>> COND_SYSCALL(swapon);
>>
>> _______________________________________________
>> linux-riscv mailing list
>> linux-riscv@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-riscv
--
~Randy
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] kernel/sys_ni: add compat entry for fadvise64_64
@ 2022-08-13 17:44 ` Randy Dunlap
0 siblings, 0 replies; 8+ messages in thread
From: Randy Dunlap @ 2022-08-13 17:44 UTC (permalink / raw)
To: Conor.Dooley, linux-kernel
Cc: arnd, josh, paul.walmsley, palmer, aou, linux-riscv, linux-api,
akpm, linux-mm
On 8/13/22 10:03, Conor.Dooley@microchip.com wrote:
> On 07/08/2022 23:09, Randy Dunlap wrote:
>> When CONFIG_ADVISE_SYSCALLS is not set/enabled and CONFIG_COMPAT is
>> set/enabled, the riscv compat_syscall_table references
>> 'compat_sys_fadvise64_64', which is not defined:
>>
>> riscv64-linux-ld: arch/riscv/kernel/compat_syscall_table.o:(.rodata+0x6f8):
>> undefined reference to `compat_sys_fadvise64_64'
>>
>> Add 'fadvise64_64' to kernel/sys_ni.c as a conditional COMPAT function
>> so that when CONFIG_ADVISE_SYSCALLS is not set, there is a fallback
>> function available.
>
> Is this in a 6.0 destined tree somewhere that I've missed?
> Bumped into it while looking at an unrelated LKP randconfig error.
> FWIW:
> Tested-by: Conor Dooley <conor.dooley@microchip.com>
> Thanks,
> Conor.
It's in Andrew's mm-hotfixes-unstable branch AFAIK.
Thanks.
>>
>> Fixes: d3ac21cacc24 ("mm: Support compiling out madvise and fadvise")
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Suggested-by: Arnd Bergmann <arnd@arndb.de>
>> Cc: Josh Triplett <josh@joshtriplett.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-api@vger.kernel.org
>> Cc: Andrew Morton <akpm@linux-foundation.org>
>> Cc: linux-mm@kvack.org
>> ---
>> v2: patch kernel/sys_ni.c (for any arch) instead of arch/riscv's
>> unistd.h (Arnd)
>>
>> kernel/sys_ni.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> --- a/kernel/sys_ni.c
>> +++ b/kernel/sys_ni.c
>> @@ -277,6 +277,7 @@ COND_SYSCALL(landlock_restrict_self);
>>
>> /* mm/fadvise.c */
>> COND_SYSCALL(fadvise64_64);
>> +COND_SYSCALL_COMPAT(fadvise64_64);
>>
>> /* mm/, CONFIG_MMU only */
>> COND_SYSCALL(swapon);
>>
>> _______________________________________________
>> linux-riscv mailing list
>> linux-riscv@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-riscv
--
~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
end of thread, other threads:[~2022-08-13 17:45 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-07 22:09 [PATCH v2] kernel/sys_ni: add compat entry for fadvise64_64 Randy Dunlap
2022-08-07 22:09 ` Randy Dunlap
2022-08-08 6:57 ` Arnd Bergmann
2022-08-08 6:57 ` Arnd Bergmann
2022-08-13 17:03 ` Conor.Dooley
2022-08-13 17:03 ` Conor.Dooley
2022-08-13 17:44 ` Randy Dunlap
2022-08-13 17:44 ` Randy Dunlap
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.