From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C1F8C04FF3 for ; Fri, 21 May 2021 20:18:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0CA3561164 for ; Fri, 21 May 2021 20:18:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229581AbhEUUTu (ORCPT ); Fri, 21 May 2021 16:19:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230138AbhEUUTr (ORCPT ); Fri, 21 May 2021 16:19:47 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10A13C06138B for ; Fri, 21 May 2021 13:18:24 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id s22so32003694ejv.12 for ; Fri, 21 May 2021 13:18:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HRq3a79BTOfjNk8E8ggTZT/+wBIRKwD0NpYc594HzrI=; b=UH99zw+vtI7dopQApmvoMsy3tQTx8crrO5RdqATQKJeGjj9X9HW4DJr6L/KgJhmb52 EbOrdP18PpptzmqaEHEVLWqQhtg2ig/nDIcYozVDVoiohObZZKY2YB9gIDMb0e7q4k2h IyQ2rdNQeDvuIuqW3YsOBLk0SDrGifHMGI8nFYhawD6A9zoZrDJzuKUgo9StDPYvvOHn Wc3hBFqw6dMMK+mCL3rTZ8a91vq1n7VyeMMm3rb1q0C+d+WDIMRK4GgKT2KiSDlUh0oG yuLQrav2371H6hx0/zqlPYxLPg3J12q4NvDSVYEZDNY2gSA8spZfahSOykEClF02T37Y 5fZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HRq3a79BTOfjNk8E8ggTZT/+wBIRKwD0NpYc594HzrI=; b=HnzTZGRjvzW9P6ngdbnITbjontn37jX6yKfRMIN7xMPaQTUQC5cJqr21ZW+9y66Sgz psw3SEgAaUPKFoVhpL8gxSqYxGrZQ9x8SuKg2AVHytNFQvOoskzUiIW8+mSP56JXwHZ0 rP090XwAkeV/wBvtRih7X1KDeiBSmK/Hj7dGIGYILEbA/K4Mh1mnwf/qwTYGKXjvkjKA uagnbMX6cb2L0cqNyMsv6AtHodERUi/FtSVL+e650WBJmJxrUCAiNRGZvKP155W1Pius AtnAUSjD1x3D6dKR8yq1bhARtuzSMWetSslfZfdLgN2wfLn0acIY+1a1bttJQy31+qOi d1ww== X-Gm-Message-State: AOAM532G3JNV7w7zUpIbEleHmBXGJbAxj8X+xuDW//uxp0Ux9NwcRT2U ClAfzBARIIuCg100TBkdhh+DAL1fCKLti2tV54ZQ X-Google-Smtp-Source: ABdhPJxLHNN51avk7YeEqYnny9tixz6B4/nVEaokiaEMktyaFuLHwTU/FmzSQ8cmk+6m7bv1Outbe1fzb6k8sZfbRLA= X-Received: by 2002:a17:906:8389:: with SMTP id p9mr12291163ejx.106.1621628302546; Fri, 21 May 2021 13:18:22 -0700 (PDT) MIME-Version: 1.0 References: <20210513200807.15910-1-casey@schaufler-ca.com> <20210513200807.15910-8-casey@schaufler-ca.com> In-Reply-To: <20210513200807.15910-8-casey@schaufler-ca.com> From: Paul Moore Date: Fri, 21 May 2021 16:18:11 -0400 Message-ID: Subject: Re: [PATCH v26 07/25] LSM: Use lsmblob in security_secctx_to_secid To: Casey Schaufler Cc: casey.schaufler@intel.com, James Morris , linux-security-module@vger.kernel.org, selinux@vger.kernel.org, linux-audit@redhat.com, keescook@chromium.org, john.johansen@canonical.com, penguin-kernel@i-love.sakura.ne.jp, Stephen Smalley , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, netfilter-devel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 13, 2021 at 4:16 PM Casey Schaufler wrote: > > Change the security_secctx_to_secid interface to use a lsmblob > structure in place of the single u32 secid in support of > module stacking. Change its callers to do the same. > > The security module hook is unchanged, still passing back a secid. > The infrastructure passes the correct entry from the lsmblob. > > Signed-off-by: Casey Schaufler > Cc: netdev@vger.kernel.org > Cc: netfilter-devel@vger.kernel.org > To: Pablo Neira Ayuso > --- > include/linux/security.h | 26 ++++++++++++++++++-- > kernel/cred.c | 4 +--- > net/netfilter/nft_meta.c | 10 ++++---- > net/netfilter/xt_SECMARK.c | 7 +++++- > net/netlabel/netlabel_unlabeled.c | 23 +++++++++++------- > security/security.c | 40 ++++++++++++++++++++++++++----- > 6 files changed, 85 insertions(+), 25 deletions(-) Acked-by: Paul Moore -- paul moore www.paul-moore.com From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15A49C47081 for ; Fri, 21 May 2021 20:18:43 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A689F61164 for ; Fri, 21 May 2021 20:18:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A689F61164 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=paul-moore.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=linux-audit-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-601-b5zem41xMi2Wk4zIJHx7Gw-1; Fri, 21 May 2021 16:18:39 -0400 X-MC-Unique: b5zem41xMi2Wk4zIJHx7Gw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D88D2100945F; Fri, 21 May 2021 20:18:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B9C405D743; Fri, 21 May 2021 20:18:35 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id EF7C544A61; Fri, 21 May 2021 20:18:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 14LKIW8R011979 for ; Fri, 21 May 2021 16:18:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0D538167ED0; Fri, 21 May 2021 20:18:32 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0816116C2D7 for ; Fri, 21 May 2021 20:18:26 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 72F4480D0E0 for ; Fri, 21 May 2021 20:18:26 +0000 (UTC) Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-45-I34zPZQ9Nk6iLFNcguBcDw-1; Fri, 21 May 2021 16:18:23 -0400 X-MC-Unique: I34zPZQ9Nk6iLFNcguBcDw-1 Received: by mail-ej1-f41.google.com with SMTP id k14so28758891eji.2 for ; Fri, 21 May 2021 13:18:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HRq3a79BTOfjNk8E8ggTZT/+wBIRKwD0NpYc594HzrI=; b=TFQ8/8LlXmUKXD8Z3dV9NTpWDa4pag6HV0rfIsHPhUNBg5RLhp8b36DHyUJNGxX1ew 8SiNdq6NJ03tuQzBiPhoa6yXH/ZxWQxHOFJJjL5s79g9cKuTUyjwGvwsFoLUZfcOkGcG 3ACT0pJW+xW4pSIT8dnNExAOk/4dcY8H1UUqm4/JUxN9ltT6C8zH0RYne3o20FwkAlYx aOI3XvyQKbhUbyvJVfEWRTBXtEr/7TJF9Z5GczefA1OK0UgECPeWZi1TbHCv6tRWp7DP NF85qoJKfbc+Ozv7al9/LYuIYIBp6sXNw/4ZZuY90IynHM4W/pvcNo6qEA24ee677oBC 4FEw== X-Gm-Message-State: AOAM5312f/4d+K9rkbYOUDnvCCPn15txYrx8d+CVdnB+UEaNMHT5a3Sq kHvfn4O+lx2cvDIqsG1R1mDD3XTx0KWEPAwLneVb X-Google-Smtp-Source: ABdhPJxLHNN51avk7YeEqYnny9tixz6B4/nVEaokiaEMktyaFuLHwTU/FmzSQ8cmk+6m7bv1Outbe1fzb6k8sZfbRLA= X-Received: by 2002:a17:906:8389:: with SMTP id p9mr12291163ejx.106.1621628302546; Fri, 21 May 2021 13:18:22 -0700 (PDT) MIME-Version: 1.0 References: <20210513200807.15910-1-casey@schaufler-ca.com> <20210513200807.15910-8-casey@schaufler-ca.com> In-Reply-To: <20210513200807.15910-8-casey@schaufler-ca.com> From: Paul Moore Date: Fri, 21 May 2021 16:18:11 -0400 Message-ID: Subject: Re: [PATCH v26 07/25] LSM: Use lsmblob in security_secctx_to_secid To: Casey Schaufler X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: linux-audit@redhat.com Cc: john.johansen@canonical.com, selinux@vger.kernel.org, netdev@vger.kernel.org, James Morris , linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-audit@redhat.com, netfilter-devel@vger.kernel.org, casey.schaufler@intel.com, Stephen Smalley X-BeenThere: linux-audit@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Linux Audit Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=linux-audit-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Thu, May 13, 2021 at 4:16 PM Casey Schaufler wrote: > > Change the security_secctx_to_secid interface to use a lsmblob > structure in place of the single u32 secid in support of > module stacking. Change its callers to do the same. > > The security module hook is unchanged, still passing back a secid. > The infrastructure passes the correct entry from the lsmblob. > > Signed-off-by: Casey Schaufler > Cc: netdev@vger.kernel.org > Cc: netfilter-devel@vger.kernel.org > To: Pablo Neira Ayuso > --- > include/linux/security.h | 26 ++++++++++++++++++-- > kernel/cred.c | 4 +--- > net/netfilter/nft_meta.c | 10 ++++---- > net/netfilter/xt_SECMARK.c | 7 +++++- > net/netlabel/netlabel_unlabeled.c | 23 +++++++++++------- > security/security.c | 40 ++++++++++++++++++++++++++----- > 6 files changed, 85 insertions(+), 25 deletions(-) Acked-by: Paul Moore -- paul moore www.paul-moore.com -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit