Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1037386ybc; Tue, 12 Nov 2019 13:13:02 -0800 (PST) X-Google-Smtp-Source: APXvYqynlBBwyezqPCumTaJTwlKA0IyUxaovcZYBKZjLi1dYEQQd+bjHpz3ElkJXiboSg6OoPM7u X-Received: by 2002:a17:906:4c97:: with SMTP id q23mr29593105eju.78.1573593182171; Tue, 12 Nov 2019 13:13:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573593182; cv=none; d=google.com; s=arc-20160816; b=g1iTB2a+6m7IK28Dtq4y74WwavWt4baBoip7SWzamHzDlKVvwV0tcytQB6OfJ+g9fC DBMIv8X2cWIgG7Bpu9ZH6N8TmFvJSFxEo6Zlwq5TkWRw1qSF+rTNhkLHLuvo/tqmR+4L T6L9gsAT/9VSqoADoHmNONIhvbdia0Rkev1NP/do4acJNHmlArNz1fxf/2LyK3NKN71s eprBXm9z2zxOuzpG1YHWswoapdFei9twCB+oifdVVKfs94En8dP24UWttHKwL2dReSl/ Rlc1rnLNLKCPbgiNJh8WYB4XOnoeWs6WwtpzX6huClRoyn4GJ07u34BGjPd3nTmjeGb7 QGEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=JPZechq2eKF4wwi+8Qv9lfknYNyHmyO47xHG86HtDMs=; b=Hzhz2nS5Z3485dMW33ky2xP6LdBrog6uhhuO0n4tftiiypVIu8UwDdKa5/SW5YCeOo wyVa/qHNI7ud5Xlroy+7UmdmxBHHxiXd11X25MP9MyKEwxMUdbrNviYAri5LiWZiuEFY Aa7QQHW6FOWOhydQUZlSX8ru4w83VAL6+AeEzy9BiOnhlsV8qnOA3n305ldT5fjHeGKs bQQDWxao9FC+tl2xiFmFPraxfFN5DalHXTOuhbXM8N+tUNdcUoIPbmx07Ih9oipNqD/j fMGEa59FZ5fbr/Ql/J6SjBmXp1jmKHf1YmVQIiaJl1ZmRq7RX2D8piWkCfNMvRCQTMqn RzMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fU7vwVcr; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si14699865edd.140.2019.11.12.13.12.37; Tue, 12 Nov 2019 13:13:02 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fU7vwVcr; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726960AbfKLVJT (ORCPT + 99 others); Tue, 12 Nov 2019 16:09:19 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:35064 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726645AbfKLVJT (ORCPT ); Tue, 12 Nov 2019 16:09:19 -0500 Received: by mail-lj1-f195.google.com with SMTP id r7so52597ljg.2; Tue, 12 Nov 2019 13:09:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=JPZechq2eKF4wwi+8Qv9lfknYNyHmyO47xHG86HtDMs=; b=fU7vwVcrYm0D0uGcCtgj0ZXXNmSaBK8mJoOPiWQqqTejkcej/6TWQmT8eSkDCn4Jf/ Pr2gGz0366EnVZSFzSalSEisx2UYQv2iLejrLZdy1/PmVkbxERC3U08mvKGfl9VnXNhD eG8dWD0PWDMQeFRVeCN43IAJViixazSac7nKrm6Fz0aYjflN8BCjXd5ENVGOk77tH5uw s3NkaypO210iBobuYM8NgwwjOPZiL7rOKlV8y5tKqjIUGChDU8CHOoS8IjSCasdyn/Az 8r8Jf/O/RZu2evBDlSN/59MIt33XBDP+Hh1Kf9RP7DSKpnhoeCmsrxJjGsdlouvXvDlp rZxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=JPZechq2eKF4wwi+8Qv9lfknYNyHmyO47xHG86HtDMs=; b=WLUcuqz1o/05TlKnpeX9SqJp8IvhikGpgMrRpgTDSLOs6of3p4qa6Jm8wgeuvzl2zq ORjUuX0+hCOTYNiNs2IGGfn2jeSLezpXncBjULLT4or5FWTJ1d8oHolqG3erFvUNrpxn QPMx8NAsfOMuDmmZZEXoqsBdxchIPI1/jcK7UjYKY3tMKhtPcDISVjlPsX70SPxDqsqY QDdsunebGgO9tZaMAY2oAkv6vFqr6lW8BOqcEepsqMsvKM+KP9QfiqmikqNHmAKNpMdU w4TcksGZ1uLit0EiaJeZCO2WvNOhI7aaAeua0hZaWXuhW07NdmUfPvDIov2P23Fvi44E R7bg== X-Gm-Message-State: APjAAAUJfhXPwjaGOzJj5lqzDIPWgpO5OkJTTqbLpWDTjHXH+vzo0Z9L 5l37hEVFYrDnxb6qC5VIpPA= X-Received: by 2002:a2e:9802:: with SMTP id a2mr21941492ljj.254.1573592957014; Tue, 12 Nov 2019 13:09:17 -0800 (PST) Received: from uranus.localdomain ([5.18.102.224]) by smtp.gmail.com with ESMTPSA id u5sm9400286ljg.68.2019.11.12.13.09.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2019 13:09:15 -0800 (PST) Received: by uranus.localdomain (Postfix, from userid 1000) id 5B4884605D3; Wed, 13 Nov 2019 00:09:15 +0300 (MSK) Date: Wed, 13 Nov 2019 00:09:15 +0300 From: Cyrill Gorcunov To: Arnd Bergmann Cc: y2038@lists.linaro.org, Richard Henderson , Ivan Kokshaysky , Matt Turner , linux-kernel@vger.kernel.org, Deepa Dinamani , Thomas Gleixner , Will Deacon , Michal =?iso-8859-1?Q?Koutn=FD?= , Catalin Marinas , Dave Hansen , linux-alpha@vger.kernel.org Subject: Re: [PATCH 11/23] y2038: rusage: use __kernel_old_timeval Message-ID: <20191112210915.GD5130@uranus> References: <20191108210236.1296047-1-arnd@arndb.de> <20191108211323.1806194-2-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191108211323.1806194-2-arnd@arndb.de> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 08, 2019 at 10:12:10PM +0100, Arnd Bergmann wrote: > There are two 'struct timeval' fields in 'struct rusage'. > > Unfortunately the definition of timeval is now ambiguous when used in > user space with a libc that has a 64-bit time_t, and this also changes > the 'rusage' definition in user space in a way that is incompatible with > the system call interface. > > While there is no good solution to avoid all ambiguity here, change > the definition in the kernel headers to be compatible with the kernel > ABI, using __kernel_old_timeval as an unambiguous base type. > > In previous discussions, there was also a plan to add a replacement > for rusage based on 64-bit timestamps and nanosecond resolution, > i.e. 'struct __kernel_timespec'. I have patches for that as well, > if anyone thinks we should do that. > > Signed-off-by: Arnd Bergmann > --- > Question: should we also rename 'struct rusage' into 'struct __kernel_rusage' > here, to make them completely unambiguous? The patch looks ok to me. I must confess I looked into rusage long ago so __kernel_timespec type used in uapi made me nervious at first, but then i found that we've this type defined in time_types.h uapi so userspace should be safe. I also like the idea of __kernel_rusage but definitely on top of the series. Reviewed-by: Cyrill Gorcunov