From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: [PATCH 0/5] fs: Fixes for removing xid bits and security labels Date: Thu, 4 Dec 2014 14:27:34 +0100 Message-ID: <1417699659-14284-1-git-send-email-jack@suse.cz> Cc: linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com, linux-security-module@vger.kernel.org, Jan Kara To: Al Viro Return-path: Received: from cantor2.suse.de ([195.135.220.15]:52837 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753543AbaLDN1x (ORCPT ); Thu, 4 Dec 2014 08:27:53 -0500 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hello, warning in XFS made me look into detail into how clearing of suid / sgid bits and security labels is done. And I've spotted a few issues: 1) file_remove_suid() is a misnomer since it also handles removing of security labels. It is even more confusing because should_remove_suid() doesn't return whether file_remove_suid() is needed or not. 2) on truncate we do clear suid bits but not security labels. I think that's a bug but please correct me if I'm wrong. 3) ocfs2 doesn't clear security labels - hard to fix, I left it alone for now. 4) XFS didn't provide proper exclusion for clearing mode bits. This series aims at fixing above issues. The second patch in the series is unrelated fix to inode_set_mask() which I spotted when playing with the code. Honza