linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [Ask for HELP] Should it support ustat syscall for arm64
@ 2014-12-29  2:58 Wang Weidong
  2014-12-29  8:15 ` Wei Xu
  0 siblings, 1 reply; 4+ messages in thread
From: Wang Weidong @ 2014-12-29  2:58 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

As I ran LTP testcase ustat01 and ustat02 on Arm64, and got the result:

ustat01     1  TFAIL  :  ustat(2) failed and setthe errno to 38 : Function not implemented

ustat02     1  TFAIL  :  ustat(2) failed to produce expected error; 22, errno: EINVAL:
                         TEST_ERRNO=ENOSYS(38): Function not implemented
ustat02     2  TFAIL  :  ustat(2) failed to produce expected error; 14, errno: EFAULT:
                         TEST_ERRNO=ENOSYS(38): Function not implemented

-----------------------

I found the glibc and kernel's implementation:
The glibc version is 2.19, kernel is 3.16.

The glibc will use the sysdeps/unix/sysv/linux/generic/ustat.c
But it only return ENOSYS.

The kernel doesn't support the NR_ustat syscall.

So I did that:
1. In glibc:
I changed the sysdeps/unix/sysv/linux/generic/ustat.c:

-#include <errno.h>
-#include <sys/ustat.h>
+#define __ARCH_WANT_SYSCALL_DEPRECATED
+#include <sysdeps/unix/sysv/linux/ustat.c>
 
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-/* This deprecated syscall is no longer used (replaced with fstat).  */
-int
-ustat (dev_t dev, struct ustat *ubuf)
-{
-  __set_errno (ENOSYS);
-  return -1;
-}
-stub_warning (ustat)

2. In Kernel:
I changed the arch/arm64/include/uapi/asm/unistd.h:

+#define __ARCH_WANT_SYSCALL_DEPRECATED
+#define __ARCH_WANT_SYS_FORK
+#define __ARCH_WANT_SYS_VFORK

After the changing, These cases will Pass.

So, Does it need to support ustat syscall for arm64?

Regards,
Wang

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

end of thread, other threads:[~2015-01-07  7:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-29  2:58 [Ask for HELP] Should it support ustat syscall for arm64 Wang Weidong
2014-12-29  8:15 ` Wei Xu
2015-01-05 10:53   ` Frediano Ziglio
2015-01-07  7:09     ` Wang Weidong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).