From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:33876 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725926AbgKDHCK (ORCPT ); Wed, 4 Nov 2020 02:02:10 -0500 From: Sven Schnelle Subject: Re: [PATCH v3 1/1] selinux: fix error initialization in inode_doinit_with_dentry() References: <20201009013630.6777-1-rentianyue@tj.kylinos.cn> <20201009013630.6777-2-rentianyue@tj.kylinos.cn> Date: Wed, 04 Nov 2020 08:01:46 +0100 In-Reply-To: (Paul Moore's message of "Tue, 3 Nov 2020 21:42:35 -0500") Message-ID: MIME-Version: 1.0 Content-Type: text/plain List-ID: To: Paul Moore Cc: rentianyue@tj.kylinos.cn, Stephen Smalley , Eric Paris , Andreas Gruenbacher , yangzhao@kylinos.cn, selinux@vger.kernel.org, Tianyue Ren , linux-s390@vger.kernel.org, hca@linux.ibm.com, borntraeger@de.ibm.com Hi Paul, Paul Moore writes: > On Tue, Nov 3, 2020 at 2:02 PM Sven Schnelle wrote: >> Thanks for the patch. Unfortunately it doesn't seem to change anything >> for me. I can take a look into this tomorrow, but i don't know much >> about the internals of selinux, so i'm not sure whether i'm of much help. > > I'm sorry that patch didn't work out. I just spent some more time > looking at the code+patch and the only other thing that I can see is > that if we mark the isec invalid, we don't bother setting the > isec->sid value to whatever default we may have already found. In a > perfect world this shouldn't matter, but if for whatever reason the > kernel can't revalidate the inode's label when it tries later it will > fallback to that default isec->sid. > > I'm sorry to ask this again, but would you be able to test the attached patch? This patch fixes the issue. So it looks like your assumption is right. Thanks Sven