From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753759AbdJSP3P (ORCPT ); Thu, 19 Oct 2017 11:29:15 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:44385 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752852AbdJSP3N (ORCPT ); Thu, 19 Oct 2017 11:29:13 -0400 X-Google-Smtp-Source: ABhQp+QlBDrbZFHRv028eBckoqTqLi4ayY0Ccd6waXyyOw7z9Ogay6uKgzBnW8QWzyJgT1v1YDezuA1xnPHo/Oq4xEg= MIME-Version: 1.0 In-Reply-To: <20171019151737.GC17891@quack2.suse.cz> References: <20171019144811.2144678-1-arnd@arndb.de> <20171019151737.GC17891@quack2.suse.cz> From: Arnd Bergmann Date: Thu, 19 Oct 2017 17:29:12 +0200 X-Google-Sender-Auth: RtjPjq5KSPgwpIJNtpP8NHoa0zY Message-ID: Subject: Re: [PATCH v2 1/2] isofs: fix timestamps beyond 2027 To: Jan Kara Cc: y2038 Mailman List , Al Viro , Deepa Dinamani , Linux FS-devel Mailing List , Anders Larsen , "# 3.4.x" , David Howells , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 19, 2017 at 5:17 PM, Jan Kara wrote: > On Thu 19-10-17 16:47:48, Arnd Bergmann wrote: >> isofs uses a 'char' variable to load the number of years since >> 1900 for an inode timestamp. On architectures that use a signed >> char type by default, this results in an invalid date for >> anything beyond 2027. >> >> This changes the function argument to a 'u8' array, which >> is defined the same way on all architectures, and unambiguously >> lets us use years until 2155. >> >> This should be backported to all kernels that might still be >> in use by that date. >> >> Cc: stable@vger.kernel.org >> Signed-off-by: Arnd Bergmann > ... >> -int iso_date(char * p, int flag) >> +int iso_date(u8 *p, int flag) >> { >> int year, month, day, hour, minute, second, tz; >> int crtime; >> >> - year = p[0]; >> + year = (int)(u8)p[0]; > > The cast seems unnecessary now? > Sorry, I must have rebased the patch incorrectly, this was intended to be removed of course. Arnd