Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp941089ybf; Fri, 28 Feb 2020 10:34:23 -0800 (PST) X-Google-Smtp-Source: APXvYqwQh55DCHzXaJORz8+YXp8nAQk87lJscjBn+FQy50CNDL4OCJ6m3D5FWvh47fkfJ4m8VQ5O X-Received: by 2002:aca:ec13:: with SMTP id k19mr4032163oih.22.1582914863366; Fri, 28 Feb 2020 10:34:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582914863; cv=none; d=google.com; s=arc-20160816; b=v/btqVXoYLrrXTnbJXSZoXrupazqD0dLeONBrBoU44mhgVGIn+ZucFc5XarC3CM0/6 hiEnRd++ca/G2+fdX2222nl0mgqfvPDPCLb+h7FyxkB1u9Gn7EIP5NSZVZILa40hW7ve maUtLlpc0P5UzTkK+tQKkMQsvhteDubNz4WDLyzVrjBl2FpMLoTudUtrhYABcPwITFZ8 bMeEv0n1P6gwDLlCoWztSoZ0ixZu3lGvw/rFoyVbWFHynIPId/eEBU7g1+nM1u6ODpTY fG6Vr6viyipVlYgXuswxzHBkvrE86oQE9mngKdN7JNTiaYNtK2t1CTrDkTd5g9nAz5yP zFRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=xg0sORrTKiEUSbt4mInJViS0eB3vBnHXVx9HkWmfKJo=; b=wvDwu1xu5iNqZZTBsHh3x7nP3oJWoOcdDITZTtj3x5kxCgbcFApe0CqHQvFvENCHZL wrDXENQjIKLRsf+R68rQIyp1bJBgBftnon35IV3oRrmEVuk4TYb48BuzsQaWeFPklcGj 57pIw7G9E6hY3QB1W4/bXtnJktLn7i4mFGD40V0awlQ9mNiA2FJP/NaUdTKAaa1PVhSD dAw9DA5E0GGKrwknHkuze84ccTlsSd8paROmQf43TryD5/etb+uk4zpo9lOspCuGZ5Cy YEVuBGxYj94lV1Z7g0CWn4V7JQRbrlCKNrPAzfehdrf3vGLdVssR+mQ0tMDVQtNmdLcC 0JQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oedgajeA; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z10si1519849oix.235.2020.02.28.10.34.11; Fri, 28 Feb 2020 10:34:23 -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=@kernel.org header.s=default header.b=oedgajeA; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726740AbgB1Sd6 (ORCPT + 99 others); Fri, 28 Feb 2020 13:33:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:37598 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725827AbgB1Sd6 (ORCPT ); Fri, 28 Feb 2020 13:33:58 -0500 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C3837246B4 for ; Fri, 28 Feb 2020 18:33:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582914837; bh=TSNQCA1Exsa7QfsZgI9mkBIAC6wC3EJrT4A5gDzeVzI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=oedgajeASovWNO/YwKEhpY+sk+u+CfRWjW4yvSbyuUuC4X82Kj78N3wrVMEgyVCgH YwAXWT5D2ZFekYaoC4akotCAffMqRYQPnBGN5yZ7CkBqGMR0iE2PRboPVDm9rPsE17 dirwgWAVfYWrdXlpD4iikr010aXnzWinASbeV7Ic= Received: by mail-wr1-f53.google.com with SMTP id z15so4147849wrl.1 for ; Fri, 28 Feb 2020 10:33:56 -0800 (PST) X-Gm-Message-State: APjAAAUVS4ol6e+CuJ23G4iBN6CSJL/OEe+DcAj8FSWeFOZXBGIt9xRO ZY3UePq9M9TbfEc+903aA0706KnSB1weV03oYQIovA== X-Received: by 2002:adf:df0c:: with SMTP id y12mr5910882wrl.257.1582914835223; Fri, 28 Feb 2020 10:33:55 -0800 (PST) MIME-Version: 1.0 References: <20200227132826.195669-1-brgerst@gmail.com> <20200227132826.195669-2-brgerst@gmail.com> In-Reply-To: <20200227132826.195669-2-brgerst@gmail.com> From: Andy Lutomirski Date: Fri, 28 Feb 2020 10:33:43 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 1/8] x86, syscalls: Refactor SYSCALL_DEFINEx macros To: Brian Gerst Cc: LKML , X86 ML , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Andy Lutomirski , Dominik Brodowski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 27, 2020 at 5:28 AM Brian Gerst wrote: > > Pull the common code out from the SYSCALL_DEFINEx macros into a new > __SYS_STUBx macro. Also conditionalize the X64 version in preparation for > enabling syscall wrappers on 32-bit native kernels. > > Signed-off-by: Brian Gerst > --- > -#define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ > - static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ > - static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ > - __IA32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ > - __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ > - static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ > - { \ > - return __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\ > - } \ > - static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) > +#define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ > + static long \ > + __se_compat_sys##name(__MAP(x, __SC_LONG, __VA_ARGS__)); \ > + static inline long \ > + __do_compat_sys##name(__MAP(x, __SC_DECL, __VA_ARGS__)); \ > + __IA32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ > + __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ > + static long \ > + __se_compat_sys##name(__MAP(x, __SC_LONG, __VA_ARGS__)) \ > + { \ > + return __do_compat_sys##name( \ > + __MAP(x, __SC_DELOUSE, __VA_ARGS__)); \ > + } \ > + static inline long \ > + __do_compat_sys##name(__MAP(x, __SC_DECL, __VA_ARGS__)) > This hunk looks like a pure anti-cleanup. I much prefer slightly long lines over messy excessively multi-line macros. Other than that: Reviewed-by: Andy Lutomirski --Andy