Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758718Ab1D2Nog (ORCPT ); Fri, 29 Apr 2011 09:44:36 -0400 Received: from out5.smtp.messagingengine.com ([66.111.4.29]:56884 "EHLO out5.smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751886Ab1D2Nod (ORCPT ); Fri, 29 Apr 2011 09:44:33 -0400 X-Sasl-enc: +lz7MMSFr6NDtjb5H5T8YiMYEcOe9/4vMWc1V6M68mJx 1304084672 From: Roberto Sassu To: linux-security-module@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, dhowells@redhat.com, jmorris@namei.org, zohar@linux.vnet.ibm.com, safford@watson.ibm.com, tyhicks@linux.vnet.ibm.com, kirkland@canonical.com, ecryptfs-devel@lists.launchpad.net, casey@schaufler-ca.com, eparis@redhat.com, sds@tycho.nsa.gov, selinux@tycho.nsa.gov, viro@zeniv.linux.org.uk, john.johansen@canonical.com, apparmor@lists.ubuntu.com, Roberto Sassu Subject: [RFC][PATCH 1/4] fs: preserve S_IMA inode flag in fsstack_copy_attr_all() Date: Fri, 29 Apr 2011 15:41:49 +0200 Message-Id: <1304084515-22132-2-git-send-email-roberto.sassu@polito.it> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1304084515-22132-1-git-send-email-roberto.sassu@polito.it> References: <1304084515-22132-1-git-send-email-roberto.sassu@polito.it> MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="sha1"; boundary="----301883DED083AA402FE2AE700D27B7D7" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4106 Lines: 86 This is an S/MIME signed message ------301883DED083AA402FE2AE700D27B7D7 The S_IMA inode flag of the upper inode must be preserved to avoid IMA tries to free its own structure for inodes that were not measured before. Signed-off-by: Roberto Sassu --- fs/stack.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/stack.c b/fs/stack.c index 4a6f7f4..a6deb1c 100644 --- a/fs/stack.c +++ b/fs/stack.c @@ -73,7 +73,7 @@ void fsstack_copy_attr_all(struct inode *dest, const struct inode *src) dest->i_mtime = src->i_mtime; dest->i_ctime = src->i_ctime; dest->i_blkbits = src->i_blkbits; - dest->i_flags = src->i_flags; + dest->i_flags = (src->i_flags & ~S_IMA) + (dest->i_flags & S_IMA); dest->i_nlink = src->i_nlink; } EXPORT_SYMBOL_GPL(fsstack_copy_attr_all); -- 1.7.4.4 ------301883DED083AA402FE2AE700D27B7D7 Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" MIIICQYJKoZIhvcNAQcCoIIH+jCCB/YCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3 DQEHAaCCBWQwggVgMIIESKADAgECAgICuzANBgkqhkiG9w0BAQUFADBlMQswCQYD VQQGEwJJVDEeMBwGA1UEChMVUG9saXRlY25pY28gZGkgVG9yaW5vMTYwNAYDVQQD Ey1Qb2xpdGVjbmljbyBkaSBUb3Jpbm8gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkw HhcNMTAxMjIwMTExOTU0WhcNMTUxMjMxMjM1OTU5WjBfMQswCQYDVQQGEwJJVDEe MBwGA1UEChMVUG9saXRlY25pY28gZGkgVG9yaW5vMRcwFQYDVQQDEw5Sb2JlcnRv ICBTYXNzdTEXMBUGCgmSJomT8ixkAQETB2QwMjEzMDUwggEiMA0GCSqGSIb3DQEB AQUAA4IBDwAwggEKAoIBAQDS6p4SaJdmmJHJu9On9ZohhBFE2GgYiY7YtRnhhQJA NfOtHEhSbpUMaSOfq/Pna6ipR5nAFrlM8cOGcSHZdxrPcgzeJU7F2v1fl2ThvFOc TIkcC1aAJGQUuCaCXDlQt+KFecJWTrRZnalMHZueO+J6cgHcvR1CQz5e88dSzo3Q XZy0w/hxGL9Ht9velqsl48ohBk2rs/svAOCp6Gf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/XvBbK/oPC+Rew+Qql6M3DHnaS1q2SKUwwO/4VXA4 JsOdatFI68AMXH0Xx9UIcjRi+kvsyvwHlc0Z8AoAtfRMoIl4zFF4Qaowec2UunBK YlqPpFTtU9czuoEP12A86nqSVsoNok2mZOeYa9IdIjeE2rfdKx6k3YNRg08xggJt MIICaQIBATBrMGUxCzAJBgNVBAYTAklUMR4wHAYDVQQKExVQb2xpdGVjbmljbyBk aSBUb3Jpbm8xNjA0BgNVBAMTLVBvbGl0ZWNuaWNvIGRpIFRvcmlubyBDZXJ0aWZp Y2F0aW9uIEF1dGhvcml0eQICArswCQYFKw4DAhoFAKCB2DAYBgkqhkiG9w0BCQMx CwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xMTA0MjkxMzQyMTdaMCMGCSqG SIb3DQEJBDEWBBQwvgOQX8cv4NUUMF5okY56da8CeTB5BgkqhkiG9w0BCQ8xbDBq MAsGCWCGSAFlAwQBKjALBglghkgBZQMEARYwCwYJYIZIAWUDBAECMAoGCCqGSIb3 DQMHMA4GCCqGSIb3DQMCAgIAgDANBggqhkiG9w0DAgIBQDAHBgUrDgMCBzANBggq hkiG9w0DAgIBKDANBgkqhkiG9w0BAQEFAASCAQCuHDKjtR4A5t4JO1JbiKDeU04R nW0roybL8syPzdDqhc2fOSwP42Wcm2mQ+VMD7EZ+zBgr38dm3R9JEpgF/pEdrmj1 pN27wRdgv4fffDtiNX+4tUoyU/qey5hPhBvSwnuaOyMw7jbuzqXRi5YR+HNpmdrS 1EATew7OzgWETc6pQh6iGRrn8LzF3JK6ZTmMLi1HKGrQU882LB70WScA3vIj0yEg b6UJMJ4OaUZgozUVSvHd69C4F5DMyaBb4aNUbImy2aOqgzzXQGW3vg+9cO3DfMg8 zEPv+Hcgquun4QUgj6L62gRiVdbRdLVq8amCLnCsI3lcgpHelT02ZduU1P97 ------301883DED083AA402FE2AE700D27B7D7-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/