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.2 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 6F9ED1F461 for ; Thu, 16 May 2019 11:15:34 +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:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=nUMbF5Jo9lPhhevo kSG8+X/t2hKRyW8PAuuXZMkY0dZmLT6x/IkM5sX4yH7Wn0CFrDmB3qmmJfCadNoy p6MhM6VV+pD+LMLvViKMV1sAlGUjPpfCjvS7h1pmvzpfFlGDOp5u6dQ1PA2jgY9e MtsG2WmkJ4FljN409p6M7Svadt4= 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:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=6hzUvaOwLPig3emj66L4rM KXZYM=; b=XdSauSjLhRvK0FH1YgfMCapJTdqwpuao8HnltF/a12u32C9TJaneYR Eo3XUW+qVyyfASap9ZsgO9YvEsbeAX1hKUZOPF6Kv2I7uDlGgwzM7xWotRux3h0+ pXDzXFyw+CL+3QAH95c5d60yI8EVdBOnsdPrlRr3HohoPivknLWMo= Received: (qmail 43034 invoked by alias); 16 May 2019 11:15:31 -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 42939 invoked by uid 89); 16 May 2019 11:15:22 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-vk1-f194.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=JZl0PIvvrjC3Qu72Sp77mAVDW8SKanYfjAsdP06c5YA=; b=HKUg41VYRdsUVQjPFJimjBfuOjPNeEDS/RwilS51IPcyXNtfjU9d9te7YzzmUUIddL RfVXDIVIS1hmPMahPPmvhH7W3AlIskFahbuiW7elOWinrPvdFV0THk/u/VDseGA9TaBQ 473n819CAuORI+nBTgX9MRYD9L55wrVbPKPs94Z1pNfFJ6GdUYAMfCYwiut9joLlelc4 FeZWDK0mEvQWuI8dIxw7/SIjLz1Uf9Yd0q3wr9ZW3AmnqGeRYMC9Umilq/Bc1UccC7sS f320HzDC56FYo35GB4Isv76gUxxDWPkD6n647Kd4lQAcbIZc5Grbyu0xPCPEPfn8Y5lR /mIw== Subject: Re: Update kernel-features.h files for Linux 5.1 To: Arnd Bergmann Cc: GNU C Library References: <20190510102713.udgjb6ilygibgd5x@sghpc.golosunov.pp.ru> <77b2e1fd-7f91-5de3-6e33-e72f00f93544@linaro.org> From: Adhemerval Zanella Openpgp: preference=signencrypt Message-ID: <4d6d5aa8-e60b-b27d-f69f-17ae26b35bbc@linaro.org> Date: Thu, 16 May 2019 08:15:01 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit On 16/05/2019 05:08, Arnd Bergmann wrote: > On Fri, May 10, 2019 at 5:07 PM 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. > > How so? I did not expect to see any libc change here at all, unless > you mean after you stop using sys_ipc(). The idea is if user configure a minimum kernel version of v5.1, sysvipc would use wire-up syscalls. So for sys_ipc the affected architectures calls with required IPC_64, and for wire-up syscalls IPC_64 is redefined accordingly. > >> 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 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. > > 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. I am not taking in consideration 64-bit time_t adjustments here.