From patchwork Tue Aug 21 20:33:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 144778 Delivered-To: patch@linaro.org Received: by 2002:a50:a5f8:0:0:0:0:0 with SMTP id b53-v6csp19179edc; Tue, 21 Aug 2018 13:34:02 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwZrjuQXtlhHYYS4m+05/6g8du4sISb0+58VeinzZ2Vu4q3PvnXwuFNGTJ2sWhdOnGEZ1MY X-Received: by 2002:a63:68c1:: with SMTP id d184-v6mr48716616pgc.239.1534883641868; Tue, 21 Aug 2018 13:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534883641; cv=none; d=google.com; s=arc-20160816; b=VosYrvEiP7Q7jhQlP8c7ZfsYU92nPPnvCjW4uAQ1sjJ5kj0/YGvtkRobbuwBcXpZpc 5j3XYLycsBZDBemsPW54kvYPRisAQ0QAeGfrqv6TqVGM+dshCJWfgEKU2BzLdk3ArS34 davcTCzuGqBwkjVzeIAFj7ZcCnpQgNrxxlduz0rPDghQgkrByqkUW74oIuiwdA5VsyvS dI8aNRroNR38Wmy5ymPIJxXJ5X6PpB/sJ2EGYUEJFF/cxC82xedWY3MyqEqpi/U04Stb vOWD2olegfd/XLRqXnFdZcdRpDRczKJjdGDLDIzy8ylIYuGjmG91lulO1PCxqJ+OP13h rnOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=xj212o6QLQp52j8fz7oQlFiP2cnF5At3NT4CtTT8Lbs=; b=P/yXedOCiSf5pTf6fhd09GH6N8aui7lqZA03+CRc1Ybe8h1kgbPiGVrvOAaOH2Xay+ OZVF1jCVHp9RxO3TO6EfgxvirxUUqlW8miv/5zg8uws9gDl3jJ11AmP/eBfCJ1Bb68qd 2S0bQ3+3yu+t7/+Yx/A9K+Qs6EK2rBt2BPyYddGqz58Bk7j0aZbGq3x3fsSq1JlvW+DT WXdtWwFrAbqJrbUEyn5ldi/mqp6EmYH5xdYUu+y+bdXT30iX/FgzwGRdDpCLU74PG2WP evSQK1BjrrdcjcGJ2AhXlcJbI4/f99H0Xs42ovIDopBdNL87OePn/ci3FLwaiI/oehii n+Dg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y141-v6si14789157pfb.331.2018.08.21.13.34.01; Tue, 21 Aug 2018 13:34:01 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727757AbeHUXzi (ORCPT + 32 others); Tue, 21 Aug 2018 19:55:38 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:36527 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726723AbeHUXzi (ORCPT ); Tue, 21 Aug 2018 19:55:38 -0400 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0Lm8JB-1gRp9C1BI1-00Zhqz; Tue, 21 Aug 2018 22:33:51 +0200 From: Arnd Bergmann To: y2038@lists.linaro.org Cc: linux-kernel@vger.kernel.org, hch@lst.de, Thomas Gleixner , Arnd Bergmann , John Stultz , Deepa Dinamani Subject: [PATCH] y2038: provide aliases for compat helpers Date: Tue, 21 Aug 2018 22:33:00 +0200 Message-Id: <20180821203329.2089473-1-arnd@arndb.de> X-Mailer: git-send-email 2.18.0 X-Provags-ID: V03:K1:Tz4rR78D6D5YDjwxi2ltvZGIPabdLWnHbdesETs4CKgteO0gnVx 4Uq5ah36AgwOmUsS6GI0YrwZ8Pc80VR7IiJNly6C3aB9KWImyP6cZNaCUdq01cFGsdOJZpF 9fbXIK4PLTKF5isytvhDPNnmhiQKqgQeAtmhRpdrNzvDUn4pM8h+ugeKV74/MTcAC0LM7Mx 3HSA6EWkUIaWi/31RUGjQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:MAg3g7v3ovI=:4wKqJaGy8zxXO3cwqLaGLY lu7AFywzr1x+E3hIrne6EoEhHv23mvnPImXt4BiPoDQeH4Oo54yYJqpSunVdVS/Pshhe0FMEa 0CY8Ku8CSRM+mSNzpxYeM/3dnxCX0vKpYiPQDnz/TRdUv8oQNUB5/AcFrnq/8mJ3DqSEqmdi9 xOn/FO4cxipx7yOeMrwv9CET7aHNBPsO+lUz/bG5NSgc57lY5KMIokejkuGOZsH3QVvu6oYHr SFrVGouXF8f0e3PMj70HoGrz9UWVEoE5ceF/yT+23YWuO+XwPc/RzyoI/BPzt+IJURNWEane7 2lxuThFnkDT3IMVWdmiBWpijtvxcsiMay7Y+T8O9MDWToX6JyYN/U7h9BwQaL6n7ixy62vd6P K/vMfSHwecQQYyHe7pJCIal7GcTSeLWUWUIHFqpDUgGhzn/V7A4F5PMQftEbdRjgjQDkuK9gQ 2z+c8+XScaM+TD1+tYPucaUME5l8poImkjudS1YV/MGm3mPYkICH2lIWp15KDQ+XeskhN2fWt VMpBREsJAoBijiafBrloGFJ1nCx/WHSODxyb8+v866VWz/z63oxv/DY3G+292dZA9HVjF+MC+ bJs8PfHuG7wpNia05HwbP1SqtlY/7FAP5KeNf5i1rdQPwhb6la6fGCR2/OnFEhex2mP3tRRM9 d5Yeh96wqIW/h3PiHUYHQGDefNTsZmAFPUV0x+5jfSTiWQTd269kTrqGYhGk9xbqGUbw= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As part of the system call rework for 64-bit time_t, we are restructuring the way that compat syscalls deal with 32-bit time_t, reusing the implementation for 32-bit architectures. Christoph Hellwig suggested a rename of the associated types and interfaces to avoid the confusing usage of the 'compat' prefix for 32-bit architectures. To prepare for doing that in linux-4.20, this adds a set of macros that lets us convert subsystems separately to the new names and avoid some of the nastier merge conflicts. Link: https://lore.kernel.org/lkml/20180713133204.3123939-1-arnd@arndb.de/ Cc: Christoph Hellwig Signed-off-by: Arnd Bergmann --- The patch I posted originally was ready but didn't see proper linux-next testing as I did not get to finalize it before my summer vacation, so this is the minimal replacement I'd still like to get into 4.19-rc1, in order to base patches for system calls, sound, networking, media and file systems on top of. I have put it into linux-next now after realizing that it would be a problem to do all my other planned changes for the 4.20 merge window. Please let me know if you have concerns about the approach, or provide an Ack if this is ok with you. --- include/linux/time32.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) -- 2.18.0 Acked-by: Christoph Hellwig diff --git a/include/linux/time32.h b/include/linux/time32.h index 0b14f936100a..d1ae43c13e25 100644 --- a/include/linux/time32.h +++ b/include/linux/time32.h @@ -207,4 +207,19 @@ static inline s64 timeval_to_ns(const struct timeval *tv) extern struct timeval ns_to_timeval(const s64 nsec); extern struct __kernel_old_timeval ns_to_kernel_old_timeval(s64 nsec); +/* + * New aliases for compat time functions. These will be used to replace + * the compat code so it can be shared between 32-bit and 64-bit builds + * both of which provide compatibility with old 32-bit tasks. + */ +#define old_time32_t compat_time_t +#define old_timeval32 compat_timeval +#define old_timespec32 compat_timespec +#define old_itimerspec32 compat_itimerspec +#define ns_to_old_timeval32 ns_to_compat_timeval +#define get_old_itimerspec32 get_compat_itimerspec64 +#define put_old_itimerspec32 put_compat_itimerspec64 +#define get_old_timespec32 compat_get_timespec64 +#define put_old_timespec32 compat_put_timespec64 + #endif