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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 94827C433ED for ; Fri, 14 May 2021 19:04:08 +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 1699161453 for ; Fri, 14 May 2021 19:04:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1699161453 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org 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-517-KrGZtSrkOaSmRxWGXQWbFw-1; Fri, 14 May 2021 15:04:05 -0400 X-MC-Unique: KrGZtSrkOaSmRxWGXQWbFw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DC0971020C3A; Fri, 14 May 2021 19:04:01 +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 4603C503F0; Fri, 14 May 2021 19:04:01 +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 131CE55344; Fri, 14 May 2021 19:04:01 +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 14EJ3wdY005831 for ; Fri, 14 May 2021 15:03:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id 12BCA17042D; Fri, 14 May 2021 19:03:58 +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 0D33B167EE8 for ; Fri, 14 May 2021 19:03:55 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (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 826B780D0E0 for ; Fri, 14 May 2021 19:03:55 +0000 (UTC) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-470-qJLFq5jnMJy3J6k_5MMAWg-1; Fri, 14 May 2021 15:03:53 -0400 X-MC-Unique: qJLFq5jnMJy3J6k_5MMAWg-1 Received: by mail-pf1-f177.google.com with SMTP id 10so423069pfl.1 for ; Fri, 14 May 2021 12:03:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=VWunAqK+FZyoTV2vjU3HeNB9kZQfJxaL+p7FRXpB3v8=; b=ci1nrQ/Sm52sH0uAMo1S/4fzr3ib7+qWHD3gVQcr7fRwo/hH0KSaxK7ssGvW2W0BD1 wwlgYFMg7ynh0z8vkwyl9b7WCgikI0idejN8OLbZlx+YpLSClM8/dXFc44Xo8dP/L6Pw /XfgThu8ccp1RpT+Jb5+WPXBGKM5orIrBMyW9GfMv1ZQfibc7ODdY/51GpyD3FXvvzng UQprp7cc52zvnBm/bR9Fh3RFOvPh21iwgQUa3fjwdzBfHXpRe7siF3/odLJB5Mrliqn/ G1qkiqpcNpd4ODKyEqk3J+5Bo8kXSRuzCCqMAwDiYaiES6eNZJGAOMTxHYTGvEKWFj14 h0Rg== X-Gm-Message-State: AOAM5318EEjDgHfP4hwck/E1Y6wW2b1ZUS1AYexLncU4jp8RkMAGmoGD ph5hkaaOpuzsvmbdhKJhdt6+AvCOLvjITw== X-Google-Smtp-Source: ABdhPJy/2ssb8xICyRpzUdXDJOa7C5xielVPk0SjlrBIAD2a+w+docVTMCOrVjaCXs6HLij/mumypA== X-Received: by 2002:a65:6549:: with SMTP id a9mr24482406pgw.213.1621019032283; Fri, 14 May 2021 12:03:52 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id c201sm4624403pfc.38.2021.05.14.12.03.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 May 2021 12:03:51 -0700 (PDT) Date: Fri, 14 May 2021 12:03:50 -0700 From: Kees Cook To: Casey Schaufler Subject: Re: [PATCH v26 07/25] LSM: Use lsmblob in security_secctx_to_secid Message-ID: <202105141203.60B0435@keescook> References: <20210513200807.15910-1-casey@schaufler-ca.com> <20210513200807.15910-8-casey@schaufler-ca.com> MIME-Version: 1.0 In-Reply-To: <20210513200807.15910-8-casey@schaufler-ca.com> 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, jmorris@namei.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-audit@redhat.com, netfilter-devel@vger.kernel.org, casey.schaufler@intel.com, sds@tycho.nsa.gov 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.12 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-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Thu, May 13, 2021 at 01:07:49PM -0700, 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 This looks like sane refactoring into the new blob type. Reviewed-by: Kees Cook -- Kees Cook -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit