Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1463056rwd; Wed, 31 May 2023 14:28:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4CNkJclUoFtKj9bTzQrm27m9FUNzDzAB+zBv8+TWizoIDdy6Mrm4S9W6/SG/GDye+XRQBu X-Received: by 2002:a05:6a00:2da6:b0:64d:223e:b38 with SMTP id fb38-20020a056a002da600b0064d223e0b38mr8372848pfb.0.1685568513267; Wed, 31 May 2023 14:28:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685568513; cv=none; d=google.com; s=arc-20160816; b=T2lVgdtw4uONTan9JgjJWdp6aoi7rC50Sg5eOfEU9jakJLBoV7PGXOyxqb3bVo8Qo0 EygaqHNzjd/6D8ugpO1uRKywcLgZZFGjq+X5XVfg1qIKSpvtoGHpo4LUOZAJuhSfi6yR XN6clE0MDkdnZ/Cxp3Z9Pas1MXf5qur407ObxKI8aCP825ohtpq4bZUziOJ84ojifZ/y DGndjJAglauNiS62Cccxb7r3AOIYtEWLhnsmWtuSekQ3f77ZfCxdeJvbn3rxQH/lesy1 8GWZtzf7wI+YOD+7pOyVSNicZ/VTiEx+kINk8PMIWT7XHYHjnY14m0poDuQ+uYgy//Wg /jiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=tBVvWrCiTxtzHEDX16BAY1j+7bSgZNwLuSAk5FN/PvE=; b=mfDFazm0gqrt1ddKbSUrykUmpu6FkZQiET+YpwgT6pC0d1+2W4lyVe8+kYN3yL9zYq AAZyG88jqwfyJqkJp3xTFSTsV0r5qafmf1koQ/0SxJhVMUdYOMAXi8RSTzEOx5UTqTM6 XBV5XIXQPKwgqKid2txUwWRnidfA3bSRDjOGf1kHH9rk6ooMQ8B+7yGhpRlD6Vuls6a4 9dDXy/6hTR+hN7fP4WW1G6idaxg/DClhm0KM0d/NBJ5UHgh2pwuXx2/MsUJwnzdTDyHy spNltiH1974nqG2/oZX+Adg6rf07+2BMclNf1lZZK8ZVM9vxAdr+uuI6L3gLe/bc8bLo 6/4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=TwLEaj52; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=paul-moore.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w28-20020a63935c000000b005346d16e6d3si1710313pgm.618.2023.05.31.14.27.46; Wed, 31 May 2023 14:28:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=TwLEaj52; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=paul-moore.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229982AbjEaVLJ (ORCPT + 99 others); Wed, 31 May 2023 17:11:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229567AbjEaVLH (ORCPT ); Wed, 31 May 2023 17:11:07 -0400 Received: from mail-yw1-x1135.google.com (mail-yw1-x1135.google.com [IPv6:2607:f8b0:4864:20::1135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CADBD129 for ; Wed, 31 May 2023 14:11:02 -0700 (PDT) Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-568928af8f5so3257197b3.1 for ; Wed, 31 May 2023 14:11:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1685567462; x=1688159462; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=tBVvWrCiTxtzHEDX16BAY1j+7bSgZNwLuSAk5FN/PvE=; b=TwLEaj52ZRYp1qrngqFFdT+akHp+jZIAWRAdGud0wjJdUD4VkESfBuc6KLIlfu8B5T DgNKWh06VarQ4XX9e9KMMm5PtqzyNgpUqCbt+Y8S1Q1C/8aNlhBqc13ZylPQKggZDYKX pnyoa4nRSnRPzUQ+qcNq1rQIeUKcZajMCXWourOAY8fqZmfv6B6JDsArMK4fTRZ6xPAY OCIo4rSLKXNOBSDrnnzZgrwxLFPxBYv8VHimlaWGUv5g6K4vtJEQXv/gS7lHmDOBbTat e9iWQpf/s0j6qomZp10nGeexnSsquf5XQShkTy8HKjgy6fmopr2RE0RKe/jGwqehsCzS Qbgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685567462; x=1688159462; h=content-transfer-encoding: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=tBVvWrCiTxtzHEDX16BAY1j+7bSgZNwLuSAk5FN/PvE=; b=REoS3c13nJmd6i0pzWlyO9TFGLjbZ8odCrqz7EBNEQm+9nDrtB+Tw9N7odYPryY32P 95pR7cLMPKdxu+Xl0nyzeVumM5WnMgMoAF0EEWoKbEC+tcIsHDgOVHFkPTNhcXfpcd0K 6UzA6mGeP/3LtbLmKjhi3kCjtho0NKQkI7wOGJ76Tq8hsYZvdXkMmgv9CAaOWRcCFlSK Y0rfDTNc5GBg5pyK1hcM0uRtUKf+gCeaajJrA00gWbUlHqHDt553lJHZHZFUtERn/1CV FHkbl2azYAJ88hbfdw5ORU2jGunsaeOGHLtDV9ELzfbZylENVxaw6i2+MmmuAGAxMXaZ U1lA== X-Gm-Message-State: AC+VfDyHdRppN+f6kece+kjohbBLgaoV1w4MbeO1E4HKL++oqu1J6Ubi Lx4wlBsIr8WzBUKoTSxLimPmxksRoztkY2oRB1gB X-Received: by 2002:a05:690c:ed5:b0:565:34bb:9009 with SMTP id cs21-20020a05690c0ed500b0056534bb9009mr24254648ywb.16.1685567462010; Wed, 31 May 2023 14:11:02 -0700 (PDT) MIME-Version: 1.0 References: <20230531110506.142951-1-gongruiqi@huaweicloud.com> In-Reply-To: From: Paul Moore Date: Wed, 31 May 2023 17:10:51 -0400 Message-ID: Subject: Re: [PATCH] LSM: Infrastructure management of the sock To: Casey Schaufler Cc: "GONG, Ruiqi" , John Johansen , James Morris , "Serge E . Hallyn" , Stephen Smalley , Eric Paris , linux-kernel@vger.kernel.org, apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org, selinux@vger.kernel.org, Kees Cook , Wang Weiyang , Xiu Jianfeng , gongruiqi1@huawei.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 31, 2023 at 10:00=E2=80=AFAM Casey Schaufler wrote: > On 5/31/2023 4:05 AM, GONG, Ruiqi wrote: > > As the security infrastructure has taken over the management of multipl= e > > *_security blobs that are accessed by multiple security modules, and > > sk->sk_security shares the same situation, move its management out of > > individual security modules and into the security infrastructure as > > well. The infrastructure does the memory allocation, and each relavant > > module uses its own share. > > Do you have a reason to make this change? The LSM infrastructure > manages other security blobs to enable multiple concurrently active > LSMs to use the blob. If only one LSM on a system can use the > socket blob there's no reason to move the management. I think an argument could be made for consistent handling of security blobs, but with the LSM stacking work in development the argument for merging this patch needs to be a lot stronger than just "consistency". --=20 paul-moore.com