All of lore.kernel.org
 help / color / mirror / Atom feed
From: wangweidong1@huawei.com (Wang Weidong)
To: linux-arm-kernel@lists.infradead.org
Subject: [Ask for HELP] Should it support ustat syscall for arm64
Date: Wed, 7 Jan 2015 15:09:25 +0800	[thread overview]
Message-ID: <54ACDBA5.8080801@huawei.com> (raw)
In-Reply-To: <B944B469BF5302468AC6EB05E56CC70DB3AD6D@lhreml503-mbs.china.huawei.com>

On 2015/1/5 18:53, Frediano Ziglio wrote:
>> On 2014/12/29 10:58, Wang Weidong wrote:
>>> 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.
>>
>> Hi Weidong,
>>
>>> So, Does it need to support ustat syscall for arm64?
>>
>> No, on arm64 the ustat syscall is obsolete.
>> You could find syscalls from "include/uapi/asm-generic/unistd.h".
>> And on arm64, there is no define for "__ARCH_WANT_SYSCALL_DEPRECATED".
>> So there is no support for the syscalls covered by the macro above.
>>
>> Best Regards,
>> Wei
>>
>>> Regards,
>>> Wang
>>>
> 
> Hi,
>   Opened an issue at https://github.com/linux-test-project/ltp/issues/25
> 
> Frediano
> 

OK, Got it.

Thanks,
Wang

> 
> .
> 

      reply	other threads:[~2015-01-07  7:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54ACDBA5.8080801@huawei.com \
    --to=wangweidong1@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.