Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1960815lql; Wed, 13 Mar 2024 13:07:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWGc6rhYnfRagiL9NLkPDQWzW3UZQimxhEOej5IwcNDsGE/aA75ASkuxnuaO8AULb+4YBea4hbMa+B9wp8b3wc8M4Klk6Djb5ASnv2MAQ== X-Google-Smtp-Source: AGHT+IF/2NI0goUhgTSDb+gQ8yqVhDs/QOZpOSKfDSX5wJcIpw0+XbqWTj5qQKVCwdgqAjbtFOMK X-Received: by 2002:ac2:46d2:0:b0:513:32e2:141b with SMTP id p18-20020ac246d2000000b0051332e2141bmr9248019lfo.67.1710360473480; Wed, 13 Mar 2024 13:07:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710360473; cv=pass; d=google.com; s=arc-20160816; b=Sok8iJmYi8WM6LVmfrh+IfPWu4nmHy3UfHbqa9w+ELOyHCdiPUiikLkWg7OEQwO7TL 6Ev757DMOnmv2jppZtYGjPjpNxr9AQsr/8cDijCkDaO4WoXRMEhJCR5tXHUMpkkGiaOu hI0Dd/K+qng28W8hstnJNvqUOrdeQxYvXJ/veWc03ORpBgGHJpJCXavAEVqvzxprSuPT x/MWmAt/QS7mZjZgEIE04Kk1RO3DBnrhjMOZZd8JvzxnLEzT0jrtm7qUW0ELAEcyMsV0 8C62BC7Ty6bbyuPG5J/cmZQfiS1o4ta5KvrIg7ZkKtKl81YiU0veczKYn1g8X4AYvLF0 RxGQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:subject:cc:to:from:content-transfer-encoding :content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:date:dkim-signature; bh=TaOWCQYhiM9DJgHYIEv5GJLKXhKlFmkTvf/eVZF5clo=; fh=lMeIeX+MlhuPIP7wIgK93nhjK8kBFaRGEfHbW8cqL+0=; b=m91B7CtU9B74Qm4SYvyIowaSDNo7Z9uT+rPYlmoWf3TesPyvCNftbCCLsqXN017nZS gRmTJJx0wvyO+XH4IyE+NrgwnpKLhgJUQGjfdXqnLIS0p8cEsltbIAKC0+DaQaArm9XH GtDh5ZNr6eE+X2yT17RHA7sj3682bUMyObYZS+Nk4xTKcxfReIbfbx5vTQSzKFyvB1Tz riWfZBQLFO6MplCUeUv/xeqBIvxNCjifelCjKM3l1KN4ZolG6B1Tyr68RVzVttQqcqv5 AoFBvSrDLNAKd2brrViLeU8TLU261G801NC+DTj/X8xlJSKR8o3W3NYrQmd/EQisS2TD 6vNw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=aJGTGZ23; arc=pass (i=1 spf=pass spfdomain=paul-moore.com dkim=pass dkdomain=paul-moore.com dmarc=pass fromdomain=paul-moore.com); spf=pass (google.com: domain of linux-kernel+bounces-102472-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102472-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=paul-moore.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t25-20020a170906a11900b00a45af7b9702si4838859ejy.38.2024.03.13.13.07.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 13:07:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102472-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=aJGTGZ23; arc=pass (i=1 spf=pass spfdomain=paul-moore.com dkim=pass dkdomain=paul-moore.com dmarc=pass fromdomain=paul-moore.com); spf=pass (google.com: domain of linux-kernel+bounces-102472-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102472-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=paul-moore.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 219B41F27650 for ; Wed, 13 Mar 2024 20:07:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ADD164D135; Wed, 13 Mar 2024 20:07:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b="aJGTGZ23" Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (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 B0CC74CB35 for ; Wed, 13 Mar 2024 20:07:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710360425; cv=none; b=u+tm+VHq9LyXM03l5YAK3nY9vGx8IULEYsBHDoel+VBeybHX99X+gI0KaXgSw6dvjfnIRZBlE5mCHOqdtdIuHZsP5wzbmw0uhmywT2dLbzdx/grL/Xesq39Fd8fMlVeelVe+Ol8v10m3STvxIh/3G5e9ptoat6xgXR8b4rB77do= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710360425; c=relaxed/simple; bh=WdJn/2bJPlVRWf/dOWnZCyI2Kvpf9aHz47q/erB5dCg=; h=Date:Message-ID:MIME-Version:Content-Type:Content-Disposition: From:To:Cc:Subject:References:In-Reply-To; b=EUB+rOg4M8d0OLeK4pu5h1w5ibCdhUJO8RGsyRi2796InoIBXVfcaD8LEn8mvGDNE1JfIiMbCR9GFAMcRlSpYxNgRE7gCaemVs42TkAT+kti8Y3zXioRQdwiO8nM7o7IpxWcQdqPmRFezgYbrbIm9sfWENszzKcKOXsQjOFTOFU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com; spf=pass smtp.mailfrom=paul-moore.com; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b=aJGTGZ23; arc=none smtp.client-ip=209.85.160.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=paul-moore.com Received: by mail-qt1-f171.google.com with SMTP id d75a77b69052e-42f37657e91so895421cf.2 for ; Wed, 13 Mar 2024 13:07:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1710360421; x=1710965221; darn=vger.kernel.org; h=in-reply-to:references:subject:cc:to:from:content-transfer-encoding :content-disposition:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=TaOWCQYhiM9DJgHYIEv5GJLKXhKlFmkTvf/eVZF5clo=; b=aJGTGZ23b/wsfN4YvfvuCU86YOU83NuTbqW8r9WQtbDC13lB80JvrxrGtuYpJE6/oW DalDuUnJDX8IcMQtis9h/25kCj9YlhfZlY8KU+Wml63rYp1JbsO8qwD2JYzvuPpW2HF9 qw0xdXSmjh7RZynQfmfQiyrdWwARnFgalOenb3qYz8siDo07+vStincu0DjxrYaJ57IX s+UKaPEV6VtzWgl+RwnPI9tqlD6mw9g90NzGMhwsbNXqTzLSuAiz1/keSKrF3GllvY6b fdNmV2Ahpw80GeCN9MfLXwxBJJsc6eWb+jP7JY1EM/1El9KMtq+iYBwReC86PwYc/N86 4FEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710360421; x=1710965221; h=in-reply-to:references:subject:cc:to:from:content-transfer-encoding :content-disposition:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=TaOWCQYhiM9DJgHYIEv5GJLKXhKlFmkTvf/eVZF5clo=; b=ZWI8R8GiNhiexM/w36dHVpyn78xUfSTAPizrkhZRuiH18RE3iaj0CZCtqr2ly6UyGc mOqPW3AVFFCooyhI408Bq5z3ipRjwhYneaIRJS7+NcQWD0lX9dv4rDyZbeHSmZAEWs+9 2+MABaORBQn7dBYSXCiWPgKCgA0SJW9tQeWeYqtMN8rpydP2plOSHdD6gzULU1IqY1eT zwDEgtf1NvM5uhkQvxdvpbzh9lazrRj+X34vyIhRqhJkOoIP1d/0W8eWhk5mpn/ypwg6 CKZR2JPhF7QuzD6Bqw0gnxr3+3ikjnxYwZcScRgaTDt3lcJOoZfxBfmB4tCkJcl+f16+ Rqug== X-Gm-Message-State: AOJu0YyOjhUdrp8a/svvJ8L/yKa4EimlbjCTRcVAIkDBXbfp+6To6I38 64jIy37i6eHQWMEWYTaISTNp5/5dfgUNku4zVBg690apdyU7cyeCGQsvTthQ5Q== X-Received: by 2002:ac8:7d82:0:b0:42e:f47e:43d8 with SMTP id c2-20020ac87d82000000b0042ef47e43d8mr17793281qtd.43.1710360421643; Wed, 13 Mar 2024 13:07:01 -0700 (PDT) Received: from localhost ([70.22.175.108]) by smtp.gmail.com with ESMTPSA id e17-20020ac85991000000b0042f53f9f8b0sm2357995qte.26.2024.03.13.13.07.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 13:07:01 -0700 (PDT) Date: Wed, 13 Mar 2024 16:07:00 -0400 Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit From: Paul Moore To: Casey Schaufler , "Dmitry V. Levin" , LSM List Cc: Linux kernel mailing list , linux-api@vger.kernel.org, =?UTF-8?Q?Micka=C3=ABl_Sala=C3=BCn?= , James Morris , Serge Hallyn , John Johansen , Tetsuo Handa , Stephen Smalley , Casey Schaufler Subject: Re: [PATCH v3] LSM: use 32 bit compatible data types in LSM syscalls. References: In-Reply-To: On Mar 13, 2024 Casey Schaufler wrote: > > LSM: use 32 bit compatible data types in LSM syscalls. > > Change the size parameters in lsm_list_modules(), lsm_set_self_attr() > and lsm_get_self_attr() from size_t to u32. This avoids the need to > have different interfaces for 32 and 64 bit systems. > > Cc: stable@vger.kernel.org > Fixes: a04a1198088a: ("LSM: syscalls for current process attributes") > Fixes: ad4aff9ec25f: ("LSM: Create lsm_list_modules system call") > Signed-off-by: Casey Schaufler > Reported-and-reviewed-by: Dmitry V. Levin > --- > include/linux/lsm_hook_defs.h | 4 ++-- > include/linux/security.h | 8 ++++---- > security/apparmor/lsm.c | 4 ++-- > security/lsm_syscalls.c | 10 +++++----- > security/security.c | 12 ++++++------ > security/selinux/hooks.c | 4 ++-- > security/smack/smack_lsm.c | 4 ++-- > tools/testing/selftests/lsm/common.h | 6 +++--- > tools/testing/selftests/lsm/lsm_get_self_attr_test.c | 10 +++++----- > tools/testing/selftests/lsm/lsm_list_modules_test.c | 8 ++++---- > tools/testing/selftests/lsm/lsm_set_self_attr_test.c | 6 +++--- > 11 files changed, 38 insertions(+), 38 deletions(-) Okay, this looks better, I'm going to merge this into lsm/stable-6.9 and put it through the usual automated testing as well as a kselftest run to make sure everything there is still okay. Assuming all goes well and no one raises any objections, I'll likely send this up to Linus tomorrow. Thanks everyone! -- paul-moore.com