From patchwork Sat Apr 8 00:57:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 9670811 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4A0626037F for ; Sat, 8 Apr 2017 01:02:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CB0C28636 for ; Sat, 8 Apr 2017 01:02:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3171D28619; Sat, 8 Apr 2017 01:02:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E76A32863D for ; Sat, 8 Apr 2017 01:02:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934587AbdDHBB1 (ORCPT ); Fri, 7 Apr 2017 21:01:27 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:35778 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934004AbdDHA6u (ORCPT ); Fri, 7 Apr 2017 20:58:50 -0400 Received: by mail-pg0-f65.google.com with SMTP id g2so18621952pge.2; Fri, 07 Apr 2017 17:58:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HY/yMb5kvx3Bk/2ypM5zgAsiNMyhrgm5/mqtB8JcAW8=; b=ESVRW5OER4x+BFF/E0ecCmwVGO3AvQOgDfQfiJef+ba1JC+vSJBTk9q6gEsZXPitOy /ZOSgKw7aM/c4bDhar8Al7LWy/Y9v+oHlZ27mM5xlwZvETnO4rGBrnsuz+TxWbJ6e83V WrJiMnI6hQC9YrcuilOCR29ug32eZCTdweTv2CpdS1OjkGBYc+T/Jx6eY+BT/aPyS+ZU VOmXng6/W9uROBiups+fS/pQkH32hfw2Tu4lj+9XM8k0+jzcY1rBfNlmIoc5sDk1XfO7 upznS4wJayt/x8eI1KemrgO+qQFRy7s/Bp6jAsKteJ/O55m6ykCplVRfJnuaEt5WXgC4 yjxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HY/yMb5kvx3Bk/2ypM5zgAsiNMyhrgm5/mqtB8JcAW8=; b=hoZC7tnVTA7Zpw+SYR90ve7LT6of0JVpDr5GFq7AljIO+NVjxaVx3FMVKWRoerofIg CWRLlFpo/CbSHwSbDl0lf7kWcCe6t0+N88rdIhy4Xa/PVT0B5N812g/oD6bNmfbpA/Sf D1U19+LvCivMeudfx6d2veUwrqgoGoC9MRm+HiAcDg2aGhUoYHdjcGqjLjtXKQVqXAjR WdUoABKAyzR6UbpC2YcG/r2soen/2ghAuOdtUQDXYms+Dr2hmsqtMD4Q95u2hNxw2Rce 5TM2H+IRYDjO1b9wmYqLXyTxW4E+ZDyqM1uLQ3ckUQYVAdSegmhpjxtIQ14r+p5OcGN4 Rjrw== X-Gm-Message-State: AFeK/H1MzQNehlthd1c4BViZ7+ZmpP18w4nefcajTtmXK81nYl0XCXOFLX4o9+r41HHttA== X-Received: by 10.84.236.67 with SMTP id h3mr53705914pln.157.1491613129472; Fri, 07 Apr 2017 17:58:49 -0700 (PDT) Received: from deepa-ubuntu.hsd1.ca.comcast.net ([2601:647:5000:6620:95ed:e0d8:7705:f3cc]) by smtp.gmail.com with ESMTPSA id b8sm11638130pfk.39.2017.04.07.17.58.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Apr 2017 17:58:48 -0700 (PDT) From: Deepa Dinamani To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org Cc: tglx@linutronix.de, viro@zeniv.linux.org.uk, gregkh@linuxfoundation.org, andreas.dilger@intel.com, arnd@arndb.de, bfields@fieldses.org, clm@fb.com, davem@davemloft.net, dsterba@suse.com, dushistov@mail.ru, eparis@redhat.com, jaegeuk@kernel.org, jbacik@fb.com, jlayton@poochiereds.net, john.stultz@linaro.org, jsimmons@infradead.org, mingo@redhat.com, oleg.drokin@intel.com, paul@paul-moore.com, rostedt@goodmis.org, yuchao0@huawei.com, ceph-devel@vger.kernel.org, devel@driverdev.osuosl.org, linux-audit@redhat.com, linux-btrfs@vger.kernel.org, linux-cifs@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-security-module@vger.kernel.org, lustre-devel@lists.lustre.org, netdev@vger.kernel.org, samba-technical@lists.samba.org, y2038@lists.linaro.org Subject: [PATCH 10/12] apparmorfs: Replace CURRENT_TIME with current_time() Date: Fri, 7 Apr 2017 17:57:08 -0700 Message-Id: <1491613030-11599-11-git-send-email-deepa.kernel@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491613030-11599-1-git-send-email-deepa.kernel@gmail.com> References: <1491613030-11599-1-git-send-email-deepa.kernel@gmail.com> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP CURRENT_TIME macro is not y2038 safe on 32 bit systems. The patch replaces all the uses of CURRENT_TIME by current_time(). This is also in preparation for the patch that transitions vfs timestamps to use 64 bit time and hence make them y2038 safe. current_time() is also planned to be transitioned to y2038 safe behavior along with this change. CURRENT_TIME macro will be deleted before merging the aforementioned change. Signed-off-by: Deepa Dinamani Acked-by: John Johansen --- security/apparmor/apparmorfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c index be0b498..4f6ac9d 100644 --- a/security/apparmor/apparmorfs.c +++ b/security/apparmor/apparmorfs.c @@ -1357,7 +1357,7 @@ static int aa_mk_null_file(struct dentry *parent) inode->i_ino = get_next_ino(); inode->i_mode = S_IFCHR | S_IRUGO | S_IWUGO; - inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; + inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode); init_special_inode(inode, S_IFCHR | S_IRUGO | S_IWUGO, MKDEV(MEM_MAJOR, 3)); d_instantiate(dentry, inode);