Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp300903rdb; Fri, 5 Jan 2024 10:11:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IE6J7YDlEFEz2Ptfkcu53gky92w3Lb7JxqvXLR0/kW+aaN9siIA4F6bg64RLiFb02ia7wmJ X-Received: by 2002:a05:6a20:e589:b0:199:5074:6946 with SMTP id ng9-20020a056a20e58900b0019950746946mr730539pzb.55.1704478315693; Fri, 05 Jan 2024 10:11:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704478315; cv=none; d=google.com; s=arc-20160816; b=rxwWcfThWDnC+KSUkrhIVUzC0tbuqgohAfn616JhDkoF/Q4yrSVCd82b2nhF/yb3pm GKZJ6YaVpv3POJ9adx0cIjIUA06dWYv/FTSFx7uabir97eERr0e9QkkMk0q8luFtj6sA Oj1cdtbX2IU2EdlqWHeDjBjgX8vxAFTddaOZjQp6zvsol3rk658KXuH5lUXO2u5ZEVMX tRgjpRPdxSDOgi2l5sgL7uOp90RHNgRnrO5lHr9ECaKFqptccEXvSUxOnve7eQDXoV+W wLrb03mqDmYLN/JcUxcrVazdzQerNAwVflgjkEjjC/d3c4qGmtACcbcZ+ApmQW/VWlhy dK+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=t2ckZzl5nI71sMgrcg5hmYGh32os7XULQPyA9x2GFAA=; fh=de8P9X/jqbn1B6Umy7Xb7LEsCt7vjreUT+OCUbcJO/o=; b=z6Kkvy5vVDEr3u8L9pueS2ad7icymsJuoRQvizyLwZIooEsOLkDQHFDd4sfxwXbYJi lH0ZwESUf3ZnjOI9II9rynGRsJUlq7N2ABO/Shl3COv8rpEuHUwrPXFxBdrm3SnnoJCZ EqGVFRSFbdX2HoDfxbg3GurqFOXYYRZzom61Y8V44gM/H5da5EaK1GjcV6Xb7/ZVaGDD nNfSbtgomD9Sh957seAfobxv1iXktrOwCXJvjRoPPWav/Gmw/Ud/W5qjya367x8rimRJ nnEStzwcing9EGzwLUryzFJzykveNIZXBkmoKf7GKTzpNyrobavRa9ELe7OXvhmERTgq 91Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=T3mZXhIj; spf=pass (google.com: domain of linux-kernel+bounces-18183-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18183-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id v8-20020a63f848000000b005cd82a478fasi1596607pgj.590.2024.01.05.10.11.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 10:11:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18183-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=T3mZXhIj; spf=pass (google.com: domain of linux-kernel+bounces-18183-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18183-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2A75DB210DD for ; Fri, 5 Jan 2024 18:11:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9581834CD5; Fri, 5 Jan 2024 18:11:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="T3mZXhIj" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43EDD34CEA for ; Fri, 5 Jan 2024 18:11:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-336f2c88361so1645590f8f.3 for ; Fri, 05 Jan 2024 10:11:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1704478277; x=1705083077; darn=vger.kernel.org; h=content-transfer-encoding:cc:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=t2ckZzl5nI71sMgrcg5hmYGh32os7XULQPyA9x2GFAA=; b=T3mZXhIj+xKA/1nqNYDS82q6ZwgiKFt7Tmrs2r5Xjf0fi1/4683w1IWK+FxBLLx4Lw 6zCLkZfvqWfLICcGKbCvj70MZs/BQnaWc7crPijw1tJ1NCUY7wl/KnvJyXqmBvl7faNQ 9mH/gASrGns/nlzHAtcx+3H3ZwwwMU7ReVhgaDp2Fel9MQonjKL+d67yxmpXazrtUvz9 s+TIyIIDEsOLhL++B7VmXhPn6kXgGw4PzWntcLfSejCU/RMKldzyDgnZlS2aRRE9zRtW 91ULVWAFed0vnK/3G+ULXuZi0wDmm6fmTH88y7s1CwtSAkU6D9ok2PJD9ymPuNLWgaxi XwOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704478277; x=1705083077; h=content-transfer-encoding:cc:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t2ckZzl5nI71sMgrcg5hmYGh32os7XULQPyA9x2GFAA=; b=pLwY619OrcfraVyplnZMWy4u4qJlX/ApRuB/8ELGTuayNsgkOiyAUwhd9uZgMGR7LU y5O7f5DvlDjHYlHtti2Sjy97JoLXC3D1c+fgVVTCJXoOYIm7RoFBGG8qUN5b5v6ToJdp CgR77kwiD6JrisiADmpzSzFRJKuj2OdZ6rB581J7FE8yCN0VKBu2ssZbhnUIwI92rYNQ fvNOSksIltuOUcw2SwwAm5mYKskcFfmuSsuel3xUTnLUE9xMs2mRoc97Hv/2FFSLQzTb X7VxX8iaM3+pM2WIgcSuQ/GjFNRO73utIL7pazCPRJg/TQTuW0MAfiNKGLJdKwY2WbmI Ub7g== X-Gm-Message-State: AOJu0YxOVne457CzLV71yrmtoInCDgIWsDKA6Ql7HeJCUe2ItiWgus5m IMul9lEA4+ESO11x78tjiC9TD4yK1vd3zaxhxBIggeXm83qREaPaxyr6Af1Tj/dQ X-Received: by 2002:adf:ea0a:0:b0:337:58ba:d16a with SMTP id q10-20020adfea0a000000b0033758bad16amt818751wrm.54.1704478277360; Fri, 05 Jan 2024 10:11:17 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240104-syscall_64-v1-1-57fe392ef565@google.com> In-Reply-To: <20240104-syscall_64-v1-1-57fe392ef565@google.com> From: Nick Desaulniers Date: Fri, 5 Jan 2024 10:11:02 -0800 Message-ID: Subject: Re: [PATCH] x86/syscalls: shrink entry/syscall_64.i via IWYU Cc: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, Al Viro Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 3, 2024 at 4:13=E2=80=AFPM Tanzir Hasan wr= ote: > > This diff uses an open source tool include-what-you-use (IWYU) to modify > the include list, changing indirect includes to direct includes. IWYU is > implemented using the IWYUScripts github repository which is a tool that > is currently undergoing development. These changes seek to improve build > times. > > This change to entry/syscall_64.c resulted in a preprocessed size of > entry/syscall_64.i from 64003 lines to 24509 lines (-62%) for the x86 > defconfig. > > Suggested-by: Al Viro > Signed-off-by: Tanzir Hasan > --- > arch/x86/entry/syscall_64.c | 18 ++++++++++++++---- Generally question to the CC list. Does anyone know //why// sys_call_table is defined as asmlinkage? I don't see why `extern "C"` or __attribute__((regparm(0))) would be necessary here, but maybe I'm missing something? I don't think that's necessary to refer to //data// defined in C from inline asm. Nothing in Documentation mentions this. And honestly those two seem conflated IMO. UAPI headers make sense to use extern C. assembler defined functions called from C should have regparm set so C callers know about the i386 calling convention change. Those seem orthogonal to me; do we ever have cases where BOTH make sense? --=20 Thanks, ~Nick Desaulniers