Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30534946rwd; Thu, 6 Jul 2023 07:17:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlGgRQl8whMcvaoPc2XU4ViABy/9e9pyjCfvLyHAbJjyKrcDJLbBwSy9vPADU3IhXTMV6zEp X-Received: by 2002:a05:6870:5491:b0:1b0:7078:5898 with SMTP id f17-20020a056870549100b001b070785898mr2594577oan.13.1688653024112; Thu, 06 Jul 2023 07:17:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688653024; cv=none; d=google.com; s=arc-20160816; b=Q3NU9QRap7a2Q7jZiH8CIU9t/jlRxJ+gnprSGrmUd8BjvW1XM5LWkHuRBAlEl6KjMO pToV9I+DFD2jynkBHD9Kbtlsjh2wzVr9vO0rkrTxQYXLtUSTD106NsMWXwv3xKWPApCJ vVHn8y/Z8sMpgrgoNlCL9KzLPU1ZrXA5yeVlgZTuLGHrvrYphNPu2KYWhgN6WKVS74BE 0DMuEmguqP4uxuvbVCt42UwrFK4Gz8+j0+nsDnVcypPNIX/ejurjnL/xe15o8Reg7cod mJp+HsKoel8IjnBt2sESHaJgjcUprHEhrZGiC4IOajWB5Xk3zr5Ox+qEZxp+Q8hlS8r9 yvSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=BSxUZqWAC97BDuH24amqSJRte8kZK1MAwi56dgvAK3A=; fh=5BvJu+L2QZ++34lW4xu41OyaR6jUxhnb7wzsGUDl1Fo=; b=QfT1Qi6P55N5Fz+bu8Kfphvn+yq3Y8AbFXLU0hHUZf96QwBYDa+VvWl6epneHkNWgg s79v7bI9J4MtD3xs/ArC4h7yTvptqbElcp9URBwuXy6asnmx8MYHTZ389V7UZXVsQPXr f+HtyyYxcVxFQjXW5S6mVx+BXT87uRnQE+Ez9XEtmdxgtSTV2MMUX14JkjtsIJyMk+cY Kt7XWA0Jl7tWUnOFfnkiI7hvMs6KRZG2RM4+lbSEPrezxrjXdPgWYHJvnECnpLmZMATZ 1uaYu2wZct0MuUJF7TypcRW0eNpDTyCi4F9CgjMlo0Yb+LJfHSm4de+Fp46pm8j/XV8S Kp2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=CkKgGyY5; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id on13-20020a17090b1d0d00b00262ca5c4c12si1642940pjb.178.2023.07.06.07.16.49; Thu, 06 Jul 2023 07:17:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=CkKgGyY5; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232734AbjGFOAZ (ORCPT + 99 others); Thu, 6 Jul 2023 10:00:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230443AbjGFOAX (ORCPT ); Thu, 6 Jul 2023 10:00:23 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E44D01727; Thu, 6 Jul 2023 07:00:22 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 8C69D1F747; Thu, 6 Jul 2023 14:00:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1688652021; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BSxUZqWAC97BDuH24amqSJRte8kZK1MAwi56dgvAK3A=; b=CkKgGyY5s9NLWYfUmhHVHLQWUTIcTmfKzHvQ1MAsLKANYwqN1ulYOmxWe1PiK4tEhQ09ow h1wWmAi+HX864MhRWP04uCbMLcRTGni7Any7iLi9lPhAK3dg+z7rtVUA1yiI5Cj3svTKAh xcWvAx+sf5InB5lFtfPxUv6fBZB4QV0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1688652021; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BSxUZqWAC97BDuH24amqSJRte8kZK1MAwi56dgvAK3A=; b=w2fAfmS+0h9mEjYhv6hRxYRsoyYqPeQeKa8hOtLPzDCPMuEiDCSmq+8vBrO2ARJBDAuC60 N1n0S63QYtiueyCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 7C62D138EE; Thu, 6 Jul 2023 14:00:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id gfZbHvXIpmSIZwAAMHmgww (envelope-from ); Thu, 06 Jul 2023 14:00:21 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id E484EA0707; Thu, 6 Jul 2023 16:00:20 +0200 (CEST) Date: Thu, 6 Jul 2023 16:00:20 +0200 From: Jan Kara To: Jeff Layton Cc: Christian Brauner , Kees Cook , Tony Luck , "Guilherme G. Piccoli" , Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH v2 68/92] pstore: convert to ctime accessor functions Message-ID: <20230706140020.232uhwgyiapv6zly@quack3> References: <20230705185755.579053-1-jlayton@kernel.org> <20230705190309.579783-1-jlayton@kernel.org> <20230705190309.579783-66-jlayton@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230705190309.579783-66-jlayton@kernel.org> X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 05-07-23 15:01:33, Jeff Layton wrote: > In later patches, we're going to change how the inode's ctime field is > used. Switch to using accessor functions instead of raw accesses of > inode->i_ctime. > > Acked-by: Kees Cook > Signed-off-by: Jeff Layton Looks good to me. Feel free to add: Reviewed-by: Jan Kara Honza > --- > fs/pstore/inode.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c > index ffbadb8b3032..a756af980d0c 100644 > --- a/fs/pstore/inode.c > +++ b/fs/pstore/inode.c > @@ -223,7 +223,7 @@ static struct inode *pstore_get_inode(struct super_block *sb) > struct inode *inode = new_inode(sb); > if (inode) { > inode->i_ino = get_next_ino(); > - inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode); > + inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode); > } > return inode; > } > @@ -390,7 +390,7 @@ int pstore_mkfile(struct dentry *root, struct pstore_record *record) > inode->i_private = private; > > if (record->time.tv_sec) > - inode->i_mtime = inode->i_ctime = record->time; > + inode->i_mtime = inode_set_ctime_to_ts(inode, record->time); > > d_add(dentry, inode); > > -- > 2.41.0 > -- Jan Kara SUSE Labs, CR