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=-15.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1,USER_IN_DEF_DKIM_WL autolearn=no 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 2EBEAC433E2 for ; Mon, 31 Aug 2020 16:39:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0B0582083E for ; Mon, 31 Aug 2020 16:39:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="r/gWRXXe" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728732AbgHaQjL (ORCPT ); Mon, 31 Aug 2020 12:39:11 -0400 Received: from linux.microsoft.com ([13.77.154.182]:33892 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726939AbgHaQjK (ORCPT ); Mon, 31 Aug 2020 12:39:10 -0400 Received: from [192.168.0.104] (c-73-42-176-67.hsd1.wa.comcast.net [73.42.176.67]) by linux.microsoft.com (Postfix) with ESMTPSA id 671FC20B7178; Mon, 31 Aug 2020 09:39:09 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 671FC20B7178 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1598891949; bh=GgBq+5VlMaXRLhKt8NiZM6TEsQUV1hrj4rr8ds/qjsk=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=r/gWRXXenYRrhPaikEQ9yCrJ/nfN5QdjLAq4e7Vlr6bLrSySkj/Lm9YqXHNBpyDgp MNimwrHUQ0d2NJGiLDhTkI0ejcmFlzzB8ZVlugXuXHg3v0klBGWf7COBfDNrdcNo/2 p6Z2C20qjxsha2QQuhDfDh+V4zZ5cTP3gzbU7DPU= Subject: Re: [PATCH] SELinux: Measure state and hash of policy using IMA To: Stephen Smalley Cc: Paul Moore , Ondrej Mosnacek , Mimi Zohar , Casey Schaufler , Tyler Hicks , tusharsu@linux.microsoft.com, Sasha Levin , James Morris , linux-integrity@vger.kernel.org, SElinux list , LSM List , linux-kernel References: <20200822010018.19453-1-nramas@linux.microsoft.com> <418618c4-a0c6-6b28-6718-2726a29b83c5@linux.microsoft.com> <07854807-c495-b7e5-fc44-26d78ff14f1b@linux.microsoft.com> From: Lakshmi Ramasubramanian Message-ID: <612ec12d-0048-2a5f-83a5-518a11eb546d@linux.microsoft.com> Date: Mon, 31 Aug 2020 09:39:08 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: On 8/31/20 7:47 AM, Stephen Smalley wrote: >>>> >>> >>> Could you please let me know when the current set of changes in SELinux >>> next branch would be completed and be ready to take new changes? >>> >>> I mean, roughly - would it be a month from now or you expect that to >>> take longer? >> >> I can't speak for Paul but I would expect it to be sooner rather than >> later. Ondrej has some follow ups on top of my policy rcu conversion >> but then it should be good to go. > > I think the major changes are now merged although there are still a > couple of changes coming from Ondrej that could affect your code. For > your purposes, the important things to note are: > > 1) The mutex has moved from selinux_fs_info to selinux_state and is > now named policy_mutex. You will need to take it around your call to > security_read_policy_kernel(). > > 2) security_policydb_len() was removed and security_read_policy() just > directly reads the policydb len. You can do the same from your > security_read_policy_kernel() variant. > > 3) Ondrej has a pending change to move the policycap[] array from > selinux_state to selinux_policy so that it can be atomically updated > with the policy. > > 4) Ondrej has a pending change to eliminate the separate initialized > boolean from selinux_state and just test whether selinux_state.policy > is non-NULL but as long as you are using selinux_initialized() to > test, your code should be unaffected. > Thanks a lot for the update Stephen. I will start updating the IMA measurement changes in selinux next branch. Will post the patches this week. -lakshmi