From patchwork Thu Oct 10 15:26:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= X-Patchwork-Id: 13830420 Received: from smtp-42af.mail.infomaniak.ch (smtp-42af.mail.infomaniak.ch [84.16.66.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A17641CCB54 for ; Thu, 10 Oct 2024 15:27:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=84.16.66.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728574031; cv=none; b=iFMPxUuOiCdsxC3rSb7c8cY6LT26C4I0Ixa8KyQtpjGCxqThhGp63zUn0tf06VWlauhnFmrBVjeXt9GAOGIXE4cCg6BNapBeiNgxPGdFqdg+xDEzRmAjkco6QbEoczgXaUUy37WEuRuJMGziuia4tscRhcwY4c8U3Rys1jTRpho= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728574031; c=relaxed/simple; bh=8mYX1qnXDm7Tyw5nzXRttaxTYfM94c2OY6x8h1WhS4g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=oLKwBInIqCzMjUy62WYH7DhfpFc/KYv4YkIXkEDEz14tURbiArEoQ8EFFfp8ckwcmDj4So/Ipsj/XKikCdQrd/3ZLaJwUpj2ag67LOEoOMWxYrqrcLxHsQh+T8m9xHEvr5bAFBvrfXMusPbpkYI69o1eiv3aEfdhrdMVP4hDK9Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=digikod.net; spf=pass smtp.mailfrom=digikod.net; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b=DQuSc0S/; arc=none smtp.client-ip=84.16.66.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=digikod.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=digikod.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=digikod.net header.i=@digikod.net header.b="DQuSc0S/" Received: from smtp-4-0001.mail.infomaniak.ch (smtp-4-0001.mail.infomaniak.ch [10.7.10.108]) by smtp-4-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4XPYX54qCNz66M; Thu, 10 Oct 2024 17:27:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digikod.net; s=20191114; t=1728574021; bh=6EsIR1F1yBU2hfVkY0ZIPc1OPufElDnPGIffuAFYdkA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DQuSc0S/Ny+YDvPYnjRuf8f+8NM9BqlzaFNeWIUkIjw5ZeSdD98cqeYyJ8Zn2NGsz BwDPqVU8ThHfRRRWUZ5nr7oyBYflHdNeLTiU8NGXveUCHvcmYZUC51B6f/WwErS+cU Ca8xPxbcxAtqWEPyogCK0JN988I2zgIKcSSgSKjk= Received: from unknown by smtp-4-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4XPYX51gnRzS2C; Thu, 10 Oct 2024 17:27:01 +0200 (CEST) From: =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= To: Christian Brauner , Paul Moore Cc: =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= , linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-security-module@vger.kernel.org, audit@vger.kernel.org, Fan Wu Subject: [RFC PATCH v1 5/7] ipe: Fix inode numbers in audit records Date: Thu, 10 Oct 2024 17:26:45 +0200 Message-ID: <20241010152649.849254-5-mic@digikod.net> In-Reply-To: <20241010152649.849254-1-mic@digikod.net> References: <20241010152649.849254-1-mic@digikod.net> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Infomaniak-Routing: alpha Use the new inode_get_ino() helper to log the user space's view of inode's numbers instead of the private kernel values. Cc: Fan Wu Signed-off-by: Mickaël Salaün Acked-by: Fan Wu --- security/ipe/audit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/ipe/audit.c b/security/ipe/audit.c index f05f0caa4850..72d3e02c2b5f 100644 --- a/security/ipe/audit.c +++ b/security/ipe/audit.c @@ -150,7 +150,7 @@ void ipe_audit_match(const struct ipe_eval_ctx *const ctx, if (inode) { audit_log_format(ab, " dev="); audit_log_untrustedstring(ab, inode->i_sb->s_id); - audit_log_format(ab, " ino=%lu", inode->i_ino); + audit_log_format(ab, " ino=%llu", inode_get_ino(inode)); } else { audit_log_format(ab, " dev=? ino=?"); }