From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.3 required=3.0 tests=AWL,BAYES_00,BODY_8BITS, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 483791F461 for ; Thu, 16 May 2019 08:09:09 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type :content-transfer-encoding; q=dns; s=default; b=fQwaz9e8MwUoF/ba T6GT39FyHZo+UkbjixIRsBT4V/H7rdN3l77RnoFQOt7MOTZA5d0/31RpBAKhm/Q2 V2rkbqtXrZKZi+LYOv2Jw/R+LA8V0jvHT0Cs3Ov/Yzib2ILELRj0Samu/5XRsizA tg+VyeQtmh4xMFt8DjjmZuk3+7Y= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type :content-transfer-encoding; s=default; bh=a5b0lrI0tUOBKwXvppK3wG WjBuI=; b=hbhdcRnLmzeqdqiCdxxRf2tl0fjUxwlmzyJYaIzLnm/76z5baSvMKx NQiFfMv9tLJSlDfoe1iHlW3YVUzzwLAwmUOllMqK8wibCYg94HYtzRXp9MHO+nA6 r0Rb284rFjabpYtlRcPL418dXKSWpEG3u/rJxoxTMOQ5Und7mII/Y= Received: (qmail 65413 invoked by alias); 16 May 2019 08:09:07 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 65405 invoked by uid 89); 16 May 2019 08:09:06 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-qt1-f193.google.com MIME-Version: 1.0 References: <20190510102713.udgjb6ilygibgd5x@sghpc.golosunov.pp.ru> <77b2e1fd-7f91-5de3-6e33-e72f00f93544@linaro.org> In-Reply-To: <77b2e1fd-7f91-5de3-6e33-e72f00f93544@linaro.org> From: Arnd Bergmann Date: Thu, 16 May 2019 10:08:47 +0200 Message-ID: Subject: Re: Update kernel-features.h files for Linux 5.1 To: Adhemerval Zanella Cc: GNU C Library Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, May 10, 2019 at 5:07 PM Adhemerval Zanella wrote: > On 10/05/2019 07:27, Stepan Golosunov wrote: > > 09.05.2019 =D0=B2 23:00:37 +0000 Joseph Myers =D0=BD=D0=B0=D0=BF=D0=B8= =D1=81=D0=B0=D0=BB: > >> 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. How so? I did not expect to see any libc change here at all, unless you mean after you stop using sys_ipc(). > It also seems that our default value on generic ipc_priv.h > is not really expressing the kernel ABI. Right, it should only be set for historic ABIs. > > 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 semtimed= op > to just enable wire-up calls if time64 is defined or add another pre-proc= essor > check to see if __NR_semtimeop is defined as well. The implementation I expected to see here is to have the 64-bit time_t version of semtimedop() to call the direct semtimedop_time64(= ) system call, and fall back to the existing implementation if that returns -ENOSYS and the libc is built to support old kernels. Arnd