Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp47461pxu; Tue, 24 Nov 2020 18:11:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJxhZ0TC2X5wKwlfO6i89YiPEX/kz6D+f8WkYfMlooPIPsTqlAP7vsW20LH5RIePl0IxNpsn X-Received: by 2002:a50:e00f:: with SMTP id e15mr1448554edl.210.1606270288654; Tue, 24 Nov 2020 18:11:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606270288; cv=none; d=google.com; s=arc-20160816; b=t7oU4MxvaTqXJfgsgD+wR5Zt6lxVIzOs+dbsOIyeoL6WvM3lZsL6KJBtw4br4VmJdQ 7wTMBFv0e7kukMHYcSXurOdTi6rQP1/mi5Fv4HazNGgjvAhQAgrskpga2DQzizsR5EVk 08IC3nWo1/7VJ1CW5UOm5Sm5WmzQ6XA5lMyVaKTHHs30yAr+fKBjQXBfn5X4qmrkdb8u IbEAarxdCYVizuoWf9nfod4EITR5oMmwTfVIjF64JSlE4j/4HTzysAPmotlmEXzBp9jJ RRpSQiyPmQIwX0uhGIZL6FEjBKTVixDo/4j8VassbRpaS2+hneYPAF37Olw6JWoPbqjb OGHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=WrgS6CV4x3UltwJI2DnW1OzuHdog2ZsVn68ZxLeKHHU=; b=IIBkSIuyQbB2AHUdiJaMNVfN9kaUra6l6TPs5ndUfSou5RCEeP5sV8VlcRTcimront jAGq/SidJZ1R5H5jdoec0DMHB92WqEU4cUQ4mIX55Vw1O8rQF4kfE6RQ5DQatEQfwIZQ DbRHt63hAbtt/CezwzjWlFyZJg43QuXMBA19KEOq6SBazdSBpgcPZB/v8FpFzTQYRhZ9 IXBdYLf6GWbImQl3PPV8EiVUQ/KfchNOwyqlEF5VA0iUzdFj0VQkwXb0p2OIes+5/3vZ q62sAX6HEaWpadJc0B7Dzz6HuilIu8HeeAKxzzlLBp5ZOmiZkV7soQbNK7j9J2j/fMjc mQFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=S4w78aWh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a18si503659ejr.333.2020.11.24.18.11.05; Tue, 24 Nov 2020 18:11:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=S4w78aWh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726591AbgKYBwb (ORCPT + 99 others); Tue, 24 Nov 2020 20:52:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726524AbgKYBw3 (ORCPT ); Tue, 24 Nov 2020 20:52:29 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C8FFC061A4D for ; Tue, 24 Nov 2020 17:52:29 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id k9so714294ejc.11 for ; Tue, 24 Nov 2020 17:52:29 -0800 (PST) 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=WrgS6CV4x3UltwJI2DnW1OzuHdog2ZsVn68ZxLeKHHU=; b=S4w78aWhQBYjTBwAY7d5gbt+PtP/y46iHMJppknBZWw58tkWSFAI6xaAPgM/6eBm9O N4Xgn+YMtJYIAiCQkH6TQhZnGm5nON8Q+WvOEzqQKP+/YTQMqy1oKULToO0pgY03LNg6 n7HtEFeHwJ0+va8ynSQsHpx9s1PHD17ALbIMF5KnA1ikcX4wAG6LMrfW2jZEL93DAy3e f44ViUPd8G7cGzVwQVZ9YI6Shv6UwBJpOBoJkGle9al4+Llkc0vcwf4irsoCEgzeV6Gb /WtWVQk4b97Ne3qcoZB2s7tOyS8fvcV4vlEqJSwk4LusdWDygADzSnIVkAEGjpy68tvA kbtw== 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=WrgS6CV4x3UltwJI2DnW1OzuHdog2ZsVn68ZxLeKHHU=; b=desDP6xDFG0TCX9d2yN2XTGhYKqin0fSAyx9D1muVLt7FZwr1g/jdmj3jUW/Ae37cD Jgdc3CnJ3fRfplXwgugPlNljTn40Zqd1ZoqhXlb3NXx8fPsKfN3AE8ieLVMjiDU7xaX4 D8to1+zgpP10XRf92/d2ZPJAw3nxUfotOudoVe5/2zfW6goFc7DfVU2bv1vHfqQuCpUw mf2VW5EG21k7P9lTmw+SYoWC2lYx6PCttycYLM1rJ+WEX7cjU/dD/iDu+TtVyr7BQqUf 7KS2XPD0V4jSMGIZ0rlhhXTqZaBbTb5z6HlWiRIit1AjGWX4JImOkt3scnqhVfxNa+J0 bhwg== X-Gm-Message-State: AOAM532aZ12Iz8N+1uBWgeDg2unvIpIhvppApEfG951j+6qHN9lxrwD1 cVgIBvhClSKDWPgNxQ0cJcRQ4TSSIcDCzGzdmfn1 X-Received: by 2002:a17:906:c096:: with SMTP id f22mr1130856ejz.488.1606269147585; Tue, 24 Nov 2020 17:52:27 -0800 (PST) MIME-Version: 1.0 References: <20201106155626.3395468-1-lokeshgidra@google.com> <20201106155626.3395468-4-lokeshgidra@google.com> In-Reply-To: From: Paul Moore Date: Tue, 24 Nov 2020 20:52:15 -0500 Message-ID: Subject: Re: [PATCH v12 3/4] selinux: teach SELinux about anonymous inodes To: Lokesh Gidra Cc: Andrea Arcangeli , Alexander Viro , James Morris , Stephen Smalley , Casey Schaufler , Eric Biggers , "Serge E. Hallyn" , Eric Paris , Daniel Colascione , Kees Cook , "Eric W. Biederman" , KP Singh , David Howells , Thomas Cedeno , Anders Roxell , Sami Tolvanen , Matthew Garrett , Randy Dunlap , "Joel Fernandes (Google)" , YueHaibing , Christian Brauner , Alexei Starovoitov , Alexey Budankov , Adrian Reber , Aleksa Sarai , Linux FS Devel , linux-kernel , LSM List , SElinux list , Kalesh Singh , Calin Juravle , Suren Baghdasaryan , Jeffrey Vander Stoep , "Cc: Android Kernel" , "open list:MEMORY MANAGEMENT" , Andrew Morton , hch@infradead.org, Ondrej Mosnacek Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 24, 2020 at 3:44 PM Lokesh Gidra wrote: > On Mon, Nov 23, 2020 at 2:43 PM Paul Moore wrote: > > On Mon, Nov 23, 2020 at 2:21 PM Lokesh Gidra wrote: > > > On Sun, Nov 22, 2020 at 3:14 PM Paul Moore wrote: > > > > On Wed, Nov 18, 2020 at 5:39 PM Lokesh Gidra wrote: > > > > > I have created a cuttlefish build and have tested with the attached > > > > > userfaultfd program: > > > > > > > > Thanks, that's a good place to start, a few comments: > > > > > > > > - While we support Android as a distribution, it isn't a platform that > > > > we common use for development and testing. At the moment, Fedora is > > > > probably your best choice for that. > > > > > > > I tried setting up a debian/ubuntu system for testing using the > > > instructions on the selinux-testsuite page, but the system kept > > > freezing after 'setenforce 1'. I'll try with fedora now. > > > > I would expect you to have much better luck with Fedora. > > Yes. It worked! Excellent :) > > > > - Your test program should be written in vanilla C for the > > > > selinux-testsuite. Looking at the userfaultfdSimple.cc code that > > > > should be a trivial conversion. > > > > > > > > - I think you have a good start on a test for the selinux-testsuite, > > > > please take a look at the test suite and submit a patch against that > > > > repo. Ondrej (CC'd) currently maintains the test suite and he may > > > > have some additional thoughts. > > > > > > > > * https://github.com/SELinuxProject/selinux-testsuite > > > > > > Thanks a lot for the inputs. I'll start working on this. > > > > Great, let us know if you hit any problems. I think we would all like > > to see this upstream :) > > I have the patch ready. I couldn't find any instructions on the > testsuite site about patch submission. Can you please tell me how to > proceed. You can post it to the SELinux mailing list, much like you would do a SELinux kernel patch. I'll take a look and I'll make sure Ondrej looks at it too. Thanks! -- paul moore www.paul-moore.com