From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935134AbbLRJP0 (ORCPT ); Fri, 18 Dec 2015 04:15:26 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:50940 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934822AbbLRJL7 (ORCPT ); Fri, 18 Dec 2015 04:11:59 -0500 From: Arnd Bergmann To: David Howells Cc: keyrings@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-security-module@vger.kernel.org, John Stultz Subject: Re: [PATCH 4/5] Handle both ISO 8601 encodings of midnight in mktime64() Date: Fri, 18 Dec 2015 10:11:47 +0100 Message-ID: <12108512.yf1y2YfOQx@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20151218000217.29483.43671.stgit@warthog.procyon.org.uk> References: <20151218000148.29483.67155.stgit@warthog.procyon.org.uk> <20151218000217.29483.43671.stgit@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:MIAecwcu7/cZeR1DfzH+zmqgXGwYm/iUSt9nYpntP6wZT0xNykS wOPjXuCUYRGB2XvntbMNxhk6soWkQgDrbvmCvxbrGntz8JDP9BXzOkuUVtTAce83BEGtYx+ ixPcg+Rrzj4/UZ7fdSqyCFytwFhrloTOU71rFpIIMG9BBHSpqB0yeRqvkwmhhns8OLhUGKn z1/5mCJ+ngpnnmkqps4nQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:ehTlvni1hQw=:/BtNiv1c4NUFM8yI5IfZpU RR8cgzJfnvSs4XJVjKszNvWiaaJL9K8T8oyIY4btzvKrI/xCiRUZcwuPrI+tzX4LThYm12+Rb zgGBRbzsYNPEja9DQNNkZkJKgAd40FtFPvlmdYA28Y/e2EvBTMvJay9pJWaWE5JUskmK1bwoA 2oFhcjPy56tGW/451NSurgviobTwGuZbhcduAc91WxZKWE9+hypzi1XL+Gj7acJiOnycnsqEi AcE1dihKCNucN3h7SKcnKobeM2HT+pZd8ljPeZ41QEMhmpb93FcdgFAVkWt4HKN3RPD5VMj+T Kpjzwxo7HNVTK4Jlw2BO4EVqlFHzDNQWgR5PuZsCQcmTgyxo4PxTyyEoPg1k/EF141MiJ4hdx F8n4gGesETCtk0leotuTpUilpSzHz/70xKDgjVAhax1olZUGvMSZR6udPoqFm1I3Ou4V/H9ol UtDpdBu3HYpJM+qXztFTMnjiJWFo68zusfvtS66TvNAGzkzOkoucnzwoVkk5mXm3UKpHHNV8Y WE4mF9rLL+ZMmFiaM3kbLFk9ZcrhECVR+JGLSykj+bt0cRTcogNnr/0CZ1Cd6EgvlfsuZb9zb E8lhIQqYv2LMRMTxIOjUhRjEWGb1nKvxylNJihYYjI6hTjPCKjlQnn3KdSC/TVPC1C2WdmVe+ ibOJ79UqceNNJzTGz7d4EOyNoj6RWKUK49eSs7+zPRAK8jCGkDYa+FgBYcqstzneKb5b9z1wx Yy4B9TcgZwuAj2ij Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 18 December 2015 00:02:17 David Howells wrote: > ISO 8601 format dates permit two different encodings of midnight - 00:00:00 > and 24:00:00 - the first is midnight today and the second is midnight > tomorrow and is exactly equivalent to the first with tomorrow's date. > > Note that the implementation of mktime64() doesn't actually need to be > changed to handle this - the multiplication by 3600 of the hour will take > care of it automatically. However, we should document that this handling > is done in mktime64() and is thus in a common place in the kernel. > > This handling is required for X.509 certificate parsing which can be given > ISO 8601 dates. > > Signed-off-by: David Howells > cc: John Stultz > cc: Arnd Bergmann > cc: stable@vger.kernel.org > Acked-by: Arnd Bergmann