Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21781918ybl; Mon, 6 Jan 2020 11:08:23 -0800 (PST) X-Google-Smtp-Source: APXvYqx4Fqz5lyuYpOn5fQSW1J0EaRC0n4skGykNSW9LiS5amLSftc81VlFVWHyriC3MbdFeZDCK X-Received: by 2002:a05:6830:147:: with SMTP id j7mr119238196otp.44.1578337702965; Mon, 06 Jan 2020 11:08:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578337702; cv=none; d=google.com; s=arc-20160816; b=kkxH/DavDmfi0suweH2+QCVQnqvVu8wjmtQdyjqTJ5n/wSstuplpazDqIR5++mbcR3 C7m172l4TjT8VwLSaRtLAtw826Qqy1b+PtgQHfQODV83LVvbrZTKS8Z42MlIZ0kxkleU PwDsYhgc0Dm6DQktIWAH2Zz/igFAysVT/zJX8CZBCdVCnY0Je5qBpsloOlprfwoPLxoR BkodBvegGjyovtu38gSmIQGTZiOvvVDGyUW1uJBb3wSN7uNGGxaAdXbdmtWpwkppemMn scVipRmJcOyqdLrIRiVzKAM7rAFaV34356AhpbXuQSWSmTDRn8WVno7N4kypnFvbvIV2 b25A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=6QFRvuleA9WtpvsAtXWm6tkQLzlSUPGr6FWwLguS1UA=; b=oHcGXaNVLU7xJ1ZbGcjBa5c513kiJSrhSCW6LdGvTGPaVeVmPnSDHDOjIDQugW0PI1 R3Q4pzd2vryrHXi1oMkMcczniirxThjcxSI9uifUZ0hnM6mm9TFz7J2RAMuq6q46RfHU PfytcUmo7ULArerIR3Ig6ehIAQiYYQJMcWkQcOv8uNFOqWoh89/o1n9yeEna1IYhIr8F NqUguapuJFggxKnEKG+trG46JrJtTUByippcL+5KkULG7Rw+yJgCPuVKy/kRZzxE+tBi 8nhkiUaLDcFb6/Zk0nngu8RqpRq+khdTVUWN2aSjppEeK3oiBAZN2gXgwaJ25GxdW4qp P25A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=lEzKvhIX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g26si37114961otk.324.2020.01.06.11.08.09; Mon, 06 Jan 2020 11:08:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=lEzKvhIX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726725AbgAFTHW (ORCPT + 99 others); Mon, 6 Jan 2020 14:07:22 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:37955 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726657AbgAFTHV (ORCPT ); Mon, 6 Jan 2020 14:07:21 -0500 Received: by mail-ot1-f68.google.com with SMTP id d7so68492397otf.5 for ; Mon, 06 Jan 2020 11:07:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6QFRvuleA9WtpvsAtXWm6tkQLzlSUPGr6FWwLguS1UA=; b=lEzKvhIXr91MXTb56cIlkCFdxIGfn1wb+leI7kAlqh505eQx4XIbbW3iXFDoCWKoxX mOs1RmmfTFgYe4yHHfYD5LFqNTnqFql2Z9xfShofUFB100OyFvlTyOnBVi0isgY42np+ I3KRUr9CUlqMKEZfB4ML2hRvz09e1OWKb1IzXOYymrl1YuuK/orPoMuD8SspO5epfeNV jZiQOnOgEnzTDomie/0DSDsRM0aJGsNUjl+VGRcXFqGdOStmsEpbRjhkBlTbui3BZaX2 OECTnWMxW+b6CIJIjP4wlg1tmyxD8AEwVuUKTOl6RPucnbR2nAVWVQpY6PMrHcwpMUw0 Bpcw== 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=6QFRvuleA9WtpvsAtXWm6tkQLzlSUPGr6FWwLguS1UA=; b=RDcB1Wb8sYFPh+9pFgXCm1lOaJZfqfQcR3Q2+P+JleuPp3Jst57H5ycbQGFYp8v3jF Eg1wDWbrXoSheVCqUYyceR7cWrWcBzdT95TAQk91NIok935R2fZWB0WsR60oRlpxldjs 8i8sZrgIV/h1wV9xwsVqPmA8ErOsR87JiwTpen3GB/tQbncfFfyAwEBiAR0kqIQtbSuj taVFE/Nj/C/fELIXNlJO1KZyogLbGJxtKpzzIzntTjmvrxrWqW9cImnjSpwUxlc0JD3R gBSUBW4zhIgKlXkhlqP1qQ5Rh+Pw4kMFo1qiL8eiOU2L3GNwCUqCPEZjfRwuv5TmhJLU oOWQ== X-Gm-Message-State: APjAAAVvpL/g4mGxwRPNw+doshWuZ5OsOhDeF0JeW4rxYooJX/F9FEmF rWe6Uo+161IVnGvP/7RSVOHaiMd8mo0WCwz7ozddj87j X-Received: by 2002:a9d:3676:: with SMTP id w109mr100975180otb.35.1578337640469; Mon, 06 Jan 2020 11:07:20 -0800 (PST) MIME-Version: 1.0 References: <20200106181329.167322-1-hridya@google.com> In-Reply-To: From: Hridya Valsaraju Date: Mon, 6 Jan 2020 11:06:44 -0800 Message-ID: Subject: Re: [PATCH] security: selinux: allow per-file labelling for binderfs To: Stephen Smalley Cc: Paul Moore , Eric Paris , selinux@vger.kernel.org, LKML , Android Kernel Team , Jeff Vander Stoep , Mark Salyzyn Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 6, 2020 at 10:33 AM 'Stephen Smalley' via kernel-team wrote: > > On 1/6/20 1:13 PM, Hridya Valsaraju wrote: > > This patch allows genfscon per-file labeling for binderfs. > > This is required to have separate permissions to allow > > access to binder, hwbinder and vndbinder devices which are > > relocating to binderfs. > > > > Acked-by: Jeff Vander Stoep > > Acked-by: Mark Salyzyn > > Signed-off-by: Hridya Valsaraju > > Do you want binderfs to also support userspace labeling of files via > setxattr()? If so, you'll want to also add it to > selinux_is_genfs_special_handling() as well. Thank you for the quick response Stephen :) I cannot think of a use-case for the userspace labelling of files in binderfs via setxattr() as of now. I will make the change if one comes up! Thanks, Hridya > > > --- > > security/selinux/hooks.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c > > index 116b4d644f68..3f0669a708e9 100644 > > --- a/security/selinux/hooks.c > > +++ b/security/selinux/hooks.c > > @@ -752,6 +752,7 @@ static int selinux_set_mnt_opts(struct super_block *sb, > > > > if (!strcmp(sb->s_type->name, "debugfs") || > > !strcmp(sb->s_type->name, "tracefs") || > > + !strcmp(sb->s_type->name, "binderfs") || > > !strcmp(sb->s_type->name, "pstore")) > > sbsec->flags |= SE_SBGENFS; > > > > > > -- > To unsubscribe from this group and stop receiving emails from it, send an email to kernel-team+unsubscribe@android.com. >