Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8561673ybn; Tue, 1 Oct 2019 09:50:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqyD907sv8k0p5Uespe5FpNkLq8Q/3lSxvtZUdrj4qLHkBW/GneBhAvrFpptDMt2f4Br6YKu X-Received: by 2002:a17:906:3d62:: with SMTP id r2mr20016867ejf.108.1569948631482; Tue, 01 Oct 2019 09:50:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569948631; cv=none; d=google.com; s=arc-20160816; b=Ix7mzvrZr/EvsoWrPPtSBRQpQ6W8kw8minE6xKrS7JSY697QbNstilmiaCS80hx9DD hBniGDXcGeKt4IZBJRsmxXBGCDmsS8wcVoYceu/dNvFsN58ik8Fjma+s0ptprD5+bqy1 RX4y+isSpH2sryFDCT6djLZxjJvYeWgrgoTe0ehia1782MclqdKSXQnP4U69ZC/nS53b g9TD2r6f38icObhTemLuHbxifOvPnTa42gMdF1sQFrTpQJKfdK+ZcNtM1/GAEB/i6Icp ARUIsIGDfUeD3V0gDjr9vk2dahgfMWSNb/hkRs78xbSpJ4afPgHSv/j4GMIsyGgZxC2E aVIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=rtRPKdnsv+JszEyAIDua9OtDhZeNxaCqsFP1K0RzKyg=; b=Nb7Ly2jcfnS+zEEcCbNMQ881Po4Bg+z8RbWz0KSMjw8dIe+l0kXvCTbi1LFP4OMtfC ERxne5O5JCrE0oDrz51chTGDrNdRXm8lEN34paayBdKkOAryO26R6A4DBPmI8HnzFkrn rVAULF/LmX9h8tdsF7k6nm+fFWZuJ6hY2CB7DJ0iKG54F6w0VqEplFF6F+KMoma5TAjN iJCczaPHIQq5JbSoxvw84ioMDzYD9ZhasfXYMQQCHAL1J20TPiVyeluzoxuq38S9qe78 6BFN0T80zQgPIAUO8TaVt5ex6WzHapv+y3lfxSNqQkHhak6sN6GVBdpV3i1xKuKq6OFC n0Qg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gz26si9370587ejb.65.2019.10.01.09.50.07; Tue, 01 Oct 2019 09:50:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729945AbfJAQHg (ORCPT + 99 others); Tue, 1 Oct 2019 12:07:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38068 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725765AbfJAQHg (ORCPT ); Tue, 1 Oct 2019 12:07:36 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A766A306039A; Tue, 1 Oct 2019 16:07:35 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-116-165.ams2.redhat.com [10.36.116.165]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AB34D6062B; Tue, 1 Oct 2019 16:07:29 +0000 (UTC) From: Florian Weimer To: Arnd Bergmann Cc: Jens Axboe , y2038 Mailman List , Linux API , Alexander Viro , Stefan =?utf-8?Q?B=C3=BChler?= , Hannes Reinecke , Jackie Liu , Andrew Morton , Hristo Venev , linux-block , Linux FS-devel Mailing List , "linux-kernel\@vger.kernel.org" Subject: Re: [PATCH] io_uring: use __kernel_timespec in timeout ABI References: <20190930202055.1748710-1-arnd@arndb.de> <8d5d34da-e1f0-1ab5-461e-f3145e52c48a@kernel.dk> <623e1d27-d3b1-3241-bfd4-eb94ce70da14@kernel.dk> Date: Tue, 01 Oct 2019 18:07:27 +0200 In-Reply-To: (Arnd Bergmann's message of "Tue, 1 Oct 2019 17:49:43 +0200") Message-ID: <874l0stpog.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 01 Oct 2019 16:07:36 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Arnd Bergmann: > On Tue, Oct 1, 2019 at 5:38 PM Jens Axboe wrote: >> >> On 10/1/19 8:09 AM, Jens Axboe wrote: >> > On 9/30/19 2:20 PM, Arnd Bergmann wrote: >> >> All system calls use struct __kernel_timespec instead of the old struct >> >> timespec, but this one was just added with the old-style ABI. Change it >> >> now to enforce the use of __kernel_timespec, avoiding ABI confusion and >> >> the need for compat handlers on 32-bit architectures. >> >> >> >> Any user space caller will have to use __kernel_timespec now, but this >> >> is unambiguous and works for any C library regardless of the time_t >> >> definition. A nicer way to specify the timeout would have been a less >> >> ambiguous 64-bit nanosecond value, but I suppose it's too late now to >> >> change that as this would impact both 32-bit and 64-bit users. >> > >> > Thanks for catching that, Arnd. Applied. >> >> On second thought - since there appears to be no good 64-bit timespec >> available to userspace, the alternative here is including on in liburing. > > What's wrong with using __kernel_timespec? Just the name? > I suppose liburing could add a macro to give it a different name > for its users. Yes, mostly the name. __ names are reserved for the C/C++ implementation (which does not include the kernel). __kernel_timespec looks like an internal kernel type to the uninitiated, not a UAPI type. Once we have struct timespec64 in userspace, you also end up with copying stuff around or introducing aliasing violations. I'm not saying those concerns are valid, but you asked what's wrong with it. 8-) Thanks, Florian