From: Valdis.Kletnieks@vt.edu Subject: Re: [PATCH 1/4] Cache xattr security drop check for write Date: Sun, 29 May 2011 13:48:26 -0400 Message-ID: <105043.1306691306@turing-police.cc.vt.edu> References: <1306536845-24162-1-git-send-email-andi@firstfloor.org> <95980.1306677144@turing-police.cc.vt.edu> <20110529142432.GA7103@alboin.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1306691306_27223P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Cc: Andi Kleen , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, chris.mason@oracle.com, josef@redhat.com, agruen@linbit.com, "Serge E. Hallyn" To: Andi Kleen Return-path: Received: from lennier.cc.vt.edu ([198.82.162.213]:48125 "EHLO lennier.cc.vt.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752761Ab1E2Rsm (ORCPT ); Sun, 29 May 2011 13:48:42 -0400 In-Reply-To: Your message of "Sun, 29 May 2011 07:24:32 PDT." <20110529142432.GA7103@alboin.amr.corp.intel.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: --==_Exmh_1306691306_27223P Content-Type: text/plain; charset="us-ascii" Content-Id: <105036.1306691306.1@turing-police.cc.vt.edu> On Sun, 29 May 2011 07:24:32 PDT, Andi Kleen said: > These are not for selinux xattrs, but capability xattrs. +#define S_NOSEC 4096 /* no suid or xattr security attributes */ Sorry for reading that wrong, since selinux stores stuff under security.* xattr as well. + int issec = !strncmp(name, XATTR_SECURITY_PREFIX, + XATTR_SECURITY_PREFIX_LEN); is going to match *any* security.* attribute, including SELinux ones stored under security.selinux. If you wanted to be capability-specific, maybe youw anted these two: #define XATTR_CAPS_SUFFIX "capability" #define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX --==_Exmh_1306691306_27223P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Exmh version 2.5 07/13/2001 iD8DBQFN4obqcC3lWbTT17ARAvrXAKD6HBLfY7GIsOgf9IrPG4uM6zxwuQCffwWT H7DsAPdAwEEPbC220ISEtY4= =2KHl -----END PGP SIGNATURE----- --==_Exmh_1306691306_27223P--