Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1223011rdd; Wed, 10 Jan 2024 12:30:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IH3KxUdp3x4s+nPZwUaj/HbJTBpuQVUTevdf0PEOAQuJDXwEb3ufx6vexJ3WgaTUGNSFpZg X-Received: by 2002:a17:902:82ca:b0:1d4:c98d:40de with SMTP id u10-20020a17090282ca00b001d4c98d40demr100211plz.71.1704918609858; Wed, 10 Jan 2024 12:30:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704918609; cv=none; d=google.com; s=arc-20160816; b=FfS8+O+afF5mFqrF+Lh0liEWiYnzpAxxBZnQUQQTt9Qx7JJO3lerMy28pjp6jwK4rM bW1O25bZTxPGZ60LpIyfrvLXZVc86cLuFhemDHq0Puv64fH4YrA8CH0pO0oLT9wu5IzW YCbftymjEYu8Gd3gZTQF1l00XcnytxJh8C/Wcyd0N09UX4hZBjwjg2ijXqAKK8Yi1ug6 6Qy8rGmd+FDBcGPzBcwwwTauNbGNUC5IvtX/IY4j6KglzM/hi4h7oxj541FCZU0rv2oM RnTlLf1kPJwTIUhk/dkbIKl2qXjzNyWTdNt7B+M4x/V9bC0qZmISaeEaMgiX4kO+jKl0 GD4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=bes0cWsXMkLGrxq87eLM1Od+X4PFPpWEGIfhViy0gH8=; fh=uCH3XAH6vVDc6qI7JF4v3HIJfo64tayXn0O56mHkVDA=; b=yjuVIHo4YEri1dqIIO8O/DxrqX/FLixyFFhQ1s4mcWzsNEpsJfVXUrGjPjSL9DFxcY HZyhzhrXA2y1nJxkCLlRMlcwoFQGV/LsecWdQyGN+PK4rDTdy0T6OZBqZQtOcSA+lGKq MDKhhk0wI4Rtq0SZGyR14W3dK9oXxRKujqJSTdPyVkeC10gwMPVBMns1Vl22sqKiUT9f dQG5laTw4vJGU428WXjJBDwkKBO1eFuqsGxt60SHpv/KGeF+OByXb3zElX3FJTw5tCua GvGRwQZhIUTKzrGyONOMBdAqTcS8+bDwMz2wkaWhKO8CndVUaqz+1SmUVzvHWuQMkTip 7MRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=RL6wQiBB; spf=pass (google.com: domain of linux-kernel+bounces-22727-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22727-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id c11-20020a170902d48b00b001d0a3ab370asi4378205plg.326.2024.01.10.12.30.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 12:30:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22727-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=RL6wQiBB; spf=pass (google.com: domain of linux-kernel+bounces-22727-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22727-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 5B86128E4FD for ; Wed, 10 Jan 2024 20:22:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7937F4EB42; Wed, 10 Jan 2024 20:22:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="RL6wQiBB" Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (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 660364E1C3 for ; Wed, 10 Jan 2024 20:22:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-50e835800adso4632330e87.0 for ; Wed, 10 Jan 2024 12:22:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1704918148; x=1705522948; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=bes0cWsXMkLGrxq87eLM1Od+X4PFPpWEGIfhViy0gH8=; b=RL6wQiBBjOoSKlQJRQYMVprP1HIzz9NuXeyd0kxjuIxtvADKW5gsdtNLfH04ddTQQK wFiK/xGpwpjQT8bP5xb6mPIWFu6IMDW+hKysZCYHAdD7vyAz5dvVK2C3zdowBdnXZ+9/ U3AX5fDm5Ck3FbeQCl4TE/iTkTGSZNKZxImKQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704918148; x=1705522948; h=cc:to: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=bes0cWsXMkLGrxq87eLM1Od+X4PFPpWEGIfhViy0gH8=; b=pKPyHPEgHcqIGuvdVnw068aj/ngLb5PVmwBH0KZ1tbL8zL6NuK99En8sileqVCdMAn e2zGhLgshvzSzdpnuyfn07jYbtpth4HvxWoGYQq6rRrbCO+QxV2FdBRxO1Q8D5AkZ9gw jfbZsk3B40Cclv+BDk2OPYQ2+gcGHoRxuXOyj5GFPD/SyzWuYOtuCGUW4cJ+NWAN0ST6 xdYEbMyDXXKtfDXWlGn8vRiQYCjvAa31CMcaqTrajziMRba784wqBb27ikujQb72wjuQ QadXdXjJjRLWfOLdIbC+u+iQ98kcayKPfw2Rs4eYs9V2BU2Wvoyw1abi84mD3pkZXCr8 CxJQ== X-Gm-Message-State: AOJu0Yy76XcVxvfIre3iGBbc+IVkhRyVLIIZXKEU+JPUXOV1qvvc/LHA abxIDRE/LgsL0loVg5d4oZZ1u4pdr6jVKhlHzxF42f0fbcN9e0g6 X-Received: by 2002:ac2:46e9:0:b0:50e:a93a:fb7a with SMTP id q9-20020ac246e9000000b0050ea93afb7amr415025lfo.184.1704918148134; Wed, 10 Jan 2024 12:22:28 -0800 (PST) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com. [209.85.167.49]) by smtp.gmail.com with ESMTPSA id j14-20020a056512398e00b0050ed63b5afasm324633lfu.100.2024.01.10.12.22.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 Jan 2024 12:22:27 -0800 (PST) Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-50e72e3d435so4502900e87.2 for ; Wed, 10 Jan 2024 12:22:27 -0800 (PST) X-Received: by 2002:a05:6512:3713:b0:50e:67f6:18d7 with SMTP id z19-20020a056512371300b0050e67f618d7mr402078lfr.156.1704918147014; Wed, 10 Jan 2024 12:22:27 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <3f5a7bc467d221543444a268dd1a1fe0@paul-moore.com> In-Reply-To: From: Linus Torvalds Date: Wed, 10 Jan 2024 12:22:10 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] lsm/lsm-pr-20240105 To: Paul Moore Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Wed, 10 Jan 2024 at 11:54, Paul Moore wrote: > > Thanks for pulling the changes, I'm sorry the syscall table entries > for the LSM syscalls were not how you want to see them, but I'm more > than a little confused as to what exactly we did wrong here. Look at commit 5f42375904b0 ("LSM: wireup Linux Security Module syscalls") and notice for example this: --- a/arch/x86/entry/syscalls/syscall_64.tbl +++ b/arch/x86/entry/syscalls/syscall_64.tbl @@ -378,6 +378,9 @@ 454 common futex_wake sys_futex_wake 455 common futex_wait sys_futex_wait 456 common futex_requeue sys_futex_requeue +457 common lsm_get_self_attr sys_lsm_get_self_attr +458 common lsm_set_self_attr sys_lsm_set_self_attr +459 common lsm_list_modules sys_lsm_list_modules Ok, fine - you added your new system calls to the end of the table. Sure, I ended up having to fix them up because the "end of the table" was different by the time I merged your tree, but that wasn't the problem. The problem is here - in the same commit: --- a/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl +++ b/tools/perf/arch/x86/entry/syscalls/syscall_64.tbl @@ -375,6 +375,9 @@ 451 common cachestat sys_cachestat 452 common fchmodat2 sys_fchmodat2 453 64 map_shadow_stack sys_map_shadow_stack +454 common lsm_get_self_attr sys_lsm_get_self_attr +455 common lsm_set_self_attr sys_lsm_set_self_attr +456 common lsm_list_modules sys_lsm_list_modules note how you updated the tools copy WITH THE WRONG NUMBERS! You just added them at the end of the table again, and just incremented the numbers, but that was complete nonsense, because the numbers didn't actually match the real system call numbers, because that tools table hadn't been updated for new system calls - because it hadn't needed them. Yeah, our tooling header duplication is annoying, but the old situation where the tooling just used various kernel headers directly and would randomly break when kernel changes were made was even worse. End result: avoid touching the tooling headers - and if you have to, you need to *think* about it. Linus