From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC204C43381 for ; Thu, 28 Feb 2019 09:30:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B8D9A218AE for ; Thu, 28 Feb 2019 09:30:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JkGjOub4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B8D9A218AE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mbG6zLVtloYb1lEEgCFwGlfSOlyTGPTNvvsOT885GyM=; b=JkGjOub40W7MQ1 oDHeyCv2KfiQs+4Zf6LeqBXsA5FlyCsD5NKQ6ObX6ovA/enAfmM0MwSb4ziKFqvYaB8DTM7yzysLF yDfooLuOnPEHEWkDBzAV6711pl544PqkCE91eUYRy1RVSaun1i+J6RVppUqgtDg7HqSVWBH3wBCkh n+/nAb47Z9wlc+m5ilkFFwacyvV7bSdXpH7/0XG5+k5tODcgfIgqqkJHtQLi9q+ucma93ipkCdMzm nLhOt5IbZ1f9J4yChCGdyh754eeOp9PWu+/OL/MAtl+zoEUxIbHZf0OuypmUgHNEUDoZFKm4QQJ+c zQpfH4OA/zf0bw5rzN4Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzI19-0001vA-CA; Thu, 28 Feb 2019 09:30:15 +0000 Received: from mail-qt1-f193.google.com ([209.85.160.193]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzI12-0001lL-Ml for linux-arm-kernel@lists.infradead.org; Thu, 28 Feb 2019 09:30:14 +0000 Received: by mail-qt1-f193.google.com with SMTP id p48so22722592qtk.2 for ; Thu, 28 Feb 2019 01:30:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=l4Satq8zQ8I/7AH4vMTZUNMLWM2wlPywlDeIS5lhej4=; b=SF8noNbtYPEvmIJop7zfK3Lx4arEdoYVicmBesfJhZW/fQ61C+2dny0cx7abRBODYP t0pr7jKF59QW1MJncZ1bkXd5a7JhEI0i6xBgCzcOdERiBv5hFCIGdt8bxTBrSGySAQ0E FfyZD0wC/sYUASI1xooe0VLO7TQAZI8/UuQVXlxw6sKpb75wFajkeoa/kSG+9NQ6Td6t gVv4rehNLF0nzatGl6r4vU2GBYH855HDo8dzaxO1OWoFbgEsYC1cJ8oh8+m+pijFflzj mS09MrUAOm8L/ro6yf9IaQewWlp28Qnu3fmzpQo5thmWVIEF9rBKGnKTsQxPWUlCN5i4 tVUQ== X-Gm-Message-State: AHQUAuYsS4O5brySH8dMagzaYzqvtW9PM9tR8owF3ENnam47Ffc8pZFw ChtSegJJdiYNJ/aYo9qpddL7xBOGb98Ax4rEdHA= X-Google-Smtp-Source: AHgI3IaVmNcKq2wKRwonNAq067vhWXzUp9Y94CyIve4g+tXGQYuYiAtSqSTuah/8XxTnYay5ED3ndOK7gUNYZ1fog/0= X-Received: by 2002:ac8:2bcf:: with SMTP id n15mr4754442qtn.96.1551346207037; Thu, 28 Feb 2019 01:30:07 -0800 (PST) MIME-Version: 1.0 References: <20190222122430.21180-1-vincenzo.frascino@arm.com> <20190222122430.21180-3-vincenzo.frascino@arm.com> <1f9b21cd-81f5-dfa9-70fb-af8228195cb4@arm.com> In-Reply-To: <1f9b21cd-81f5-dfa9-70fb-af8228195cb4@arm.com> From: Arnd Bergmann Date: Thu, 28 Feb 2019 10:29:50 +0100 Message-ID: Subject: Re: [PATCH v5 02/23] kernel: Define gettimeofday vdso common code To: Vincenzo Frascino X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190228_013008_742556_522E7142 X-CRM114-Status: GOOD ( 18.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch , Shuah Khan , Rasmus Villemoes , Catalin Marinas , Daniel Lezcano , Will Deacon , Russell King , Ralf Baechle , Mark Salyzyn , Paul Burton , Dmitry Safonov <0x7f454c46@gmail.com>, Thomas Gleixner , Peter Collingbourne , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Feb 27, 2019 at 3:52 PM Vincenzo Frascino wrote: > On 22/02/2019 13:49, Arnd Bergmann wrote: > > On Fri, Feb 22, 2019 at 1:25 PM Vincenzo Frascino > > wrote: > > > >> +/* > >> + * The definitions below are required to overcome the limitations > >> + * of time_t on 32 bit architectures, which overflows in 2038. > >> + * The new code should use the replacements based on time64_t and > >> + * timespec64. > >> + * > >> + * The abstraction below will be updated once the migration to > >> + * time64_t is complete. > >> + */ > >> +#ifdef CONFIG_GENERIC_VDSO_32 > >> +#define __vdso_timespec old_timespec32 > >> +#define __vdso_timeval old_timeval32 > >> +#else > >> +#ifdef ENABLE_COMPAT_VDSO > >> +#define __vdso_timespec old_timespec32 > >> +#define __vdso_timeval old_timeval32 > >> +#else > >> +#define __vdso_timespec __kernel_timespec > >> +#define __vdso_timeval __kernel_old_timeval > >> +#endif /* CONFIG_COMPAT_VDSO */ > >> +#endif /* CONFIG_GENERIC_VDSO_32 */ > > For __vdso_timespec, I see how you ended up with this > > redefinition, and it makes the current version of your patches > > easier, but I fear it will in turn make it harder to add the > > __kernel_old_timeval based variant. > > > > What is __kernel_old_timespec (based on you next email)? Why do you think it > will make harder to add the new variants? I mean you should ideally use the types that you have listed above directly, without the abstraction. In the long run I want one set of functions using __kernel_timespec that implements the 64-bit time interfaces on both 32-bit and 64-bit kernels, including the compat vdso, and another set using old_timespec32 for just the native 32-bit and compat version. This would match what we do in the normal system calls (in linux-5.1+), where we always have the regular implementation use 64-bit types only, and have an optional _time32 version that is used for existing 32-bit user space, on both native 32 bit kernels and compat syscalls on 64-bit. Arnd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel