unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Stepan Golosunov <stepan@golosunov.pp.ru>
Cc: libc-alpha@sourceware.org
Subject: Re: Update kernel-features.h files for Linux 5.1
Date: Fri, 10 May 2019 13:40:19 -0300	[thread overview]
Message-ID: <132d0cbd-e9c5-186a-d011-87b61936a166@linaro.org> (raw)
In-Reply-To: <20190510161524.vlsox333fwqgwg35@sghpc.golosunov.pp.ru>



On 10/05/2019 13:15, Stepan Golosunov wrote:
> 10.05.2019 в 12:11:22 -0300 Adhemerval Zanella написал:
>> On 10/05/2019 12:07, Adhemerval Zanella wrote:
>>> On 10/05/2019 07:27, Stepan Golosunov wrote:
>>>> 09.05.2019 в 23:00:37 +0000 Joseph Myers написал:
>>>>> Linux 5.1 adds missing syscalls to the syscall table for many Linux
>>>>> kernel architectures.  This patch updates the kernel-features.h
>>>>> headers accordingly.  I believe the statfs64 structure used by alpha
>>>>> matches what the new kernel syscalls use, but that should be reviewed
>>>>> carefully.
>>>>>
>>>>> Tested with build-many-glibcs.py.
>>>>
>>>> The newly added direct ipc syscalls are different from the old ones:
>>>>
>>>> 1. They do not accept IPC_64.  This means that __IPC_64 should be set
>>>> to zero when new syscalls are used.  And new syscalls can not be used
>>>> for compat functions like __old_semctl.
>>>
>>> So it seems we will need to conditionally set __IPC_64 based on kernel
>>> version. It also seems that our default value on generic ipc_priv.h
>>> is not really expressing the kernel ABI.
>>>
>>>>
>>>> (Hmm.  Is __old_msgctl already buggy due to its use of __IPC_64 when
>>>> __ASSUME_DIRECT_SYSVIPC_SYSCALLS is defined?  Is there any
>>>> architecture with both __ASSUME_DIRECT_SYSVIPC_SYSCALLS and
>>>> __old_msgctl currently?)
>>>
>>> The architectures that exports msgctl@GLIBC_2.0 as compat symbol are
>>> alpha, i686, m68k, mips-o32, powerpc32, s390-32, and sparc32. And
>>> from these one alpha currently is the only architecture that defines
>>> __ASSUME_DIRECT_SYSVIPC_SYSCALLS. So it is buggy for alpha currently
>>> and it would be for the aforementioned architectures once they
>>> start to use wire-up syscall.
>>>
>>>
>>>>
>>>> 2. semtimedop does not exist on 32-bit ABIs.  They have
>>>> semtimedop_time64 instead.
>>>> (I also think that ipc with IPCOP_semtimedop was accidentally made to
>>>> behave like semtimedop_time64 in 32-bit builds of linux 5.1.  But that
>>>> would be a kernel bug.)
>>>
>>> So it seems we would need to either add an __ASSUME specific for semtimedop
>>> to just enable wire-up calls if time64 is defined or add another pre-processor
>>> check to see if __NR_semtimeop is defined as well.
>>>
>>>
>>> To summarize, I think we need too:
>>>
>>> 1. Fix Linux msgctl compat function to remove __IPC64.
>>>
>>> 2. Move __IPC64 to kernel-feature.h and define it based on kernel version
>>>    along with __ASSUME_DIRECT_SYSVIPC_SYSCALLS.
>>>
>>> 3. Only use wire-up semtimeop iff __NR_semtimedop is also defined.
>>>
>>
>> It seems semop would also need be handled this way.
> 
> 5. Ensure __old_msgctl, __old_semctl and __old_shmctl do not use
> direct syscalls when __IPC64 is zero.

Indeed, alpha cases prevents us to just use __NR_ipc in this case.

  reply	other threads:[~2019-05-10 16:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-09 23:00 Update kernel-features.h files for Linux 5.1 Joseph Myers
2019-05-10 10:27 ` Stepan Golosunov
2019-05-10 13:19   ` Stepan Golosunov
2019-05-16  7:59     ` Arnd Bergmann
2019-05-16 19:41       ` Stepan Golosunov
2019-05-16 20:56         ` Arnd Bergmann
2019-05-10 15:07   ` Adhemerval Zanella
2019-05-10 15:11     ` Adhemerval Zanella
2019-05-10 16:15       ` Stepan Golosunov
2019-05-10 16:40         ` Adhemerval Zanella [this message]
2019-05-16  8:08     ` Arnd Bergmann
2019-05-16 11:15       ` Adhemerval Zanella
2019-05-16 11:34         ` Arnd Bergmann
2019-05-16 12:28           ` Adhemerval Zanella
2019-05-16 12:42             ` Arnd Bergmann
2019-05-13 21:33   ` Joseph Myers
2019-05-16 15:06     ` Adhemerval Zanella

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

  List information: https://www.gnu.org/software/libc/involved.html

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

  git send-email \
    --in-reply-to=132d0cbd-e9c5-186a-d011-87b61936a166@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    --cc=stepan@golosunov.pp.ru \
    /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 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 read-only IMAP folder(s) and NNTP newsgroup(s).