Re: [PATCH 1/2] RISC-V: Request stat64 on RV32

2018-11-12 Thread Palmer Dabbelt

On Sun, 11 Nov 2018 22:19:02 PST (-0800), david.abdurachma...@gmail.com wrote:

On Mon, Nov 12, 2018 at 5:10 AM Zong Li  wrote:


The stat64 family that is used on 32-bit architectures to replace
newstat.

Since commit 67314ec7b0250290cc85eaa7a2f88a8ddb9e8547 ("RISC-V: Request
newstat syscalls"), the RV32 build fail with undeclared 'sys_fstatat64'

Signed-off-by: Zong Li 
---
 arch/riscv/include/asm/unistd.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/include/asm/unistd.h b/arch/riscv/include/asm/unistd.h
index eff7aa9..a4aade9 100644
--- a/arch/riscv/include/asm/unistd.h
+++ b/arch/riscv/include/asm/unistd.h
@@ -18,5 +18,6 @@

 #define __ARCH_WANT_NEW_STAT
 #define __ARCH_WANT_SYS_CLONE
+#define __ARCH_WANT_STAT64
 #include 
 #include 
--


See: http://lists.infradead.org/pipermail/linux-riscv/2018-November/002087.html

The plan is not to have old stat syscalls and support statx on
riscv32, which is y2038 safe.

The issue you see is a bug in include/uapi/asm-generic/unistd.h.
Marcin (CC) already sent a patch to Arnd (CC) IIRC. Basically without
__ARCH_WANT_NEW_STAT or __ARCH_WANT_STAT64 two macros are not defined:
__NR3264_fstatat and __NR3264_fstat. Which is later used (without any
guards):

763 #define __NR_newfstatat __NR3264_fstatat
764 #define __NR_fstat __NR3264_fstat


I agree.  Thanks!


Re: [PATCH 1/2] RISC-V: Request stat64 on RV32

2018-11-12 Thread Palmer Dabbelt

On Sun, 11 Nov 2018 22:19:02 PST (-0800), david.abdurachma...@gmail.com wrote:

On Mon, Nov 12, 2018 at 5:10 AM Zong Li  wrote:


The stat64 family that is used on 32-bit architectures to replace
newstat.

Since commit 67314ec7b0250290cc85eaa7a2f88a8ddb9e8547 ("RISC-V: Request
newstat syscalls"), the RV32 build fail with undeclared 'sys_fstatat64'

Signed-off-by: Zong Li 
---
 arch/riscv/include/asm/unistd.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/include/asm/unistd.h b/arch/riscv/include/asm/unistd.h
index eff7aa9..a4aade9 100644
--- a/arch/riscv/include/asm/unistd.h
+++ b/arch/riscv/include/asm/unistd.h
@@ -18,5 +18,6 @@

 #define __ARCH_WANT_NEW_STAT
 #define __ARCH_WANT_SYS_CLONE
+#define __ARCH_WANT_STAT64
 #include 
 #include 
--


See: http://lists.infradead.org/pipermail/linux-riscv/2018-November/002087.html

The plan is not to have old stat syscalls and support statx on
riscv32, which is y2038 safe.

The issue you see is a bug in include/uapi/asm-generic/unistd.h.
Marcin (CC) already sent a patch to Arnd (CC) IIRC. Basically without
__ARCH_WANT_NEW_STAT or __ARCH_WANT_STAT64 two macros are not defined:
__NR3264_fstatat and __NR3264_fstat. Which is later used (without any
guards):

763 #define __NR_newfstatat __NR3264_fstatat
764 #define __NR_fstat __NR3264_fstat


I agree.  Thanks!


Re: [PATCH 1/2] RISC-V: Request stat64 on RV32

2018-11-12 Thread Zong Li
David Abdurachmanov  於 2018年11月12日 週一 下午2:19寫道:
>
> On Mon, Nov 12, 2018 at 5:10 AM Zong Li  wrote:
> >
> > The stat64 family that is used on 32-bit architectures to replace
> > newstat.
> >
> > Since commit 67314ec7b0250290cc85eaa7a2f88a8ddb9e8547 ("RISC-V: Request
> > newstat syscalls"), the RV32 build fail with undeclared 'sys_fstatat64'
> >
> > Signed-off-by: Zong Li 
> > ---
> >  arch/riscv/include/asm/unistd.h | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/riscv/include/asm/unistd.h 
> > b/arch/riscv/include/asm/unistd.h
> > index eff7aa9..a4aade9 100644
> > --- a/arch/riscv/include/asm/unistd.h
> > +++ b/arch/riscv/include/asm/unistd.h
> > @@ -18,5 +18,6 @@
> >
> >  #define __ARCH_WANT_NEW_STAT
> >  #define __ARCH_WANT_SYS_CLONE
> > +#define __ARCH_WANT_STAT64
> >  #include 
> >  #include 
> > --
>
> See: 
> http://lists.infradead.org/pipermail/linux-riscv/2018-November/002087.html
>
> The plan is not to have old stat syscalls and support statx on
> riscv32, which is y2038 safe.
>
> The issue you see is a bug in include/uapi/asm-generic/unistd.h.
> Marcin (CC) already sent a patch to Arnd (CC) IIRC. Basically without
> __ARCH_WANT_NEW_STAT or __ARCH_WANT_STAT64 two macros are not defined:
> __NR3264_fstatat and __NR3264_fstat. Which is later used (without any
> guards):
>
> 763 #define __NR_newfstatat __NR3264_fstatat
> 764 #define __NR_fstat __NR3264_fstat

Nice. Thank you.


Re: [PATCH 1/2] RISC-V: Request stat64 on RV32

2018-11-12 Thread Zong Li
David Abdurachmanov  於 2018年11月12日 週一 下午2:19寫道:
>
> On Mon, Nov 12, 2018 at 5:10 AM Zong Li  wrote:
> >
> > The stat64 family that is used on 32-bit architectures to replace
> > newstat.
> >
> > Since commit 67314ec7b0250290cc85eaa7a2f88a8ddb9e8547 ("RISC-V: Request
> > newstat syscalls"), the RV32 build fail with undeclared 'sys_fstatat64'
> >
> > Signed-off-by: Zong Li 
> > ---
> >  arch/riscv/include/asm/unistd.h | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/riscv/include/asm/unistd.h 
> > b/arch/riscv/include/asm/unistd.h
> > index eff7aa9..a4aade9 100644
> > --- a/arch/riscv/include/asm/unistd.h
> > +++ b/arch/riscv/include/asm/unistd.h
> > @@ -18,5 +18,6 @@
> >
> >  #define __ARCH_WANT_NEW_STAT
> >  #define __ARCH_WANT_SYS_CLONE
> > +#define __ARCH_WANT_STAT64
> >  #include 
> >  #include 
> > --
>
> See: 
> http://lists.infradead.org/pipermail/linux-riscv/2018-November/002087.html
>
> The plan is not to have old stat syscalls and support statx on
> riscv32, which is y2038 safe.
>
> The issue you see is a bug in include/uapi/asm-generic/unistd.h.
> Marcin (CC) already sent a patch to Arnd (CC) IIRC. Basically without
> __ARCH_WANT_NEW_STAT or __ARCH_WANT_STAT64 two macros are not defined:
> __NR3264_fstatat and __NR3264_fstat. Which is later used (without any
> guards):
>
> 763 #define __NR_newfstatat __NR3264_fstatat
> 764 #define __NR_fstat __NR3264_fstat

Nice. Thank you.


Re: [PATCH 1/2] RISC-V: Request stat64 on RV32

2018-11-11 Thread David Abdurachmanov
On Mon, Nov 12, 2018 at 5:10 AM Zong Li  wrote:
>
> The stat64 family that is used on 32-bit architectures to replace
> newstat.
>
> Since commit 67314ec7b0250290cc85eaa7a2f88a8ddb9e8547 ("RISC-V: Request
> newstat syscalls"), the RV32 build fail with undeclared 'sys_fstatat64'
>
> Signed-off-by: Zong Li 
> ---
>  arch/riscv/include/asm/unistd.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/riscv/include/asm/unistd.h b/arch/riscv/include/asm/unistd.h
> index eff7aa9..a4aade9 100644
> --- a/arch/riscv/include/asm/unistd.h
> +++ b/arch/riscv/include/asm/unistd.h
> @@ -18,5 +18,6 @@
>
>  #define __ARCH_WANT_NEW_STAT
>  #define __ARCH_WANT_SYS_CLONE
> +#define __ARCH_WANT_STAT64
>  #include 
>  #include 
> --

See: http://lists.infradead.org/pipermail/linux-riscv/2018-November/002087.html

The plan is not to have old stat syscalls and support statx on
riscv32, which is y2038 safe.

The issue you see is a bug in include/uapi/asm-generic/unistd.h.
Marcin (CC) already sent a patch to Arnd (CC) IIRC. Basically without
__ARCH_WANT_NEW_STAT or __ARCH_WANT_STAT64 two macros are not defined:
__NR3264_fstatat and __NR3264_fstat. Which is later used (without any
guards):

763 #define __NR_newfstatat __NR3264_fstatat
764 #define __NR_fstat __NR3264_fstat


Re: [PATCH 1/2] RISC-V: Request stat64 on RV32

2018-11-11 Thread David Abdurachmanov
On Mon, Nov 12, 2018 at 5:10 AM Zong Li  wrote:
>
> The stat64 family that is used on 32-bit architectures to replace
> newstat.
>
> Since commit 67314ec7b0250290cc85eaa7a2f88a8ddb9e8547 ("RISC-V: Request
> newstat syscalls"), the RV32 build fail with undeclared 'sys_fstatat64'
>
> Signed-off-by: Zong Li 
> ---
>  arch/riscv/include/asm/unistd.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/riscv/include/asm/unistd.h b/arch/riscv/include/asm/unistd.h
> index eff7aa9..a4aade9 100644
> --- a/arch/riscv/include/asm/unistd.h
> +++ b/arch/riscv/include/asm/unistd.h
> @@ -18,5 +18,6 @@
>
>  #define __ARCH_WANT_NEW_STAT
>  #define __ARCH_WANT_SYS_CLONE
> +#define __ARCH_WANT_STAT64
>  #include 
>  #include 
> --

See: http://lists.infradead.org/pipermail/linux-riscv/2018-November/002087.html

The plan is not to have old stat syscalls and support statx on
riscv32, which is y2038 safe.

The issue you see is a bug in include/uapi/asm-generic/unistd.h.
Marcin (CC) already sent a patch to Arnd (CC) IIRC. Basically without
__ARCH_WANT_NEW_STAT or __ARCH_WANT_STAT64 two macros are not defined:
__NR3264_fstatat and __NR3264_fstat. Which is later used (without any
guards):

763 #define __NR_newfstatat __NR3264_fstatat
764 #define __NR_fstat __NR3264_fstat


[PATCH 1/2] RISC-V: Request stat64 on RV32

2018-11-11 Thread Zong Li
The stat64 family that is used on 32-bit architectures to replace
newstat.

Since commit 67314ec7b0250290cc85eaa7a2f88a8ddb9e8547 ("RISC-V: Request
newstat syscalls"), the RV32 build fail with undeclared 'sys_fstatat64'

Signed-off-by: Zong Li 
---
 arch/riscv/include/asm/unistd.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/include/asm/unistd.h b/arch/riscv/include/asm/unistd.h
index eff7aa9..a4aade9 100644
--- a/arch/riscv/include/asm/unistd.h
+++ b/arch/riscv/include/asm/unistd.h
@@ -18,5 +18,6 @@
 
 #define __ARCH_WANT_NEW_STAT
 #define __ARCH_WANT_SYS_CLONE
+#define __ARCH_WANT_STAT64
 #include 
 #include 
-- 
2.7.4



[PATCH 1/2] RISC-V: Request stat64 on RV32

2018-11-11 Thread Zong Li
The stat64 family that is used on 32-bit architectures to replace
newstat.

Since commit 67314ec7b0250290cc85eaa7a2f88a8ddb9e8547 ("RISC-V: Request
newstat syscalls"), the RV32 build fail with undeclared 'sys_fstatat64'

Signed-off-by: Zong Li 
---
 arch/riscv/include/asm/unistd.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/include/asm/unistd.h b/arch/riscv/include/asm/unistd.h
index eff7aa9..a4aade9 100644
--- a/arch/riscv/include/asm/unistd.h
+++ b/arch/riscv/include/asm/unistd.h
@@ -18,5 +18,6 @@
 
 #define __ARCH_WANT_NEW_STAT
 #define __ARCH_WANT_SYS_CLONE
+#define __ARCH_WANT_STAT64
 #include 
 #include 
-- 
2.7.4