lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1711072117000.4871@nanos>
Date:   Tue, 7 Nov 2017 21:17:12 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Arnd Bergmann <arnd@...db.de>
cc:     "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Len Brown <lenb@...nel.org>, Kees Cook <keescook@...omium.org>,
        Anton Vorontsov <anton@...msg.org>,
        Colin Cross <ccross@...roid.com>,
        Tony Luck <tony.luck@...el.com>,
        Borislav Petkov <bp@...en8.de>, Michal Hocko <mhocko@...e.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Leon Romanovsky <leonro@...lanox.com>,
        Dan Williams <dan.j.williams@...el.com>,
        linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] APEI/ERST: use 64-bit timestamps

On Thu, 2 Nov 2017, Arnd Bergmann wrote:

> 32-bit timestamps are deprecated in the kernel, so we should not use
> get_seconds(). In this case, the 'struct cper_record_header' structure
> already contains a 64-bit field, so the only required change is to use
> the safe ktime_get_real_seconds() interface as a replacement.
> 
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Reviewed-by: Thomas Gleixner <tglx@...utronix.de>

> ---
>  drivers/acpi/apei/erst.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c
> index 2c462beee551..6742f6c68034 100644
> --- a/drivers/acpi/apei/erst.c
> +++ b/drivers/acpi/apei/erst.c
> @@ -1061,7 +1061,7 @@ static int erst_writer(struct pstore_record *record)
>  	rcd->hdr.error_severity = CPER_SEV_FATAL;
>  	/* timestamp valid. platform_id, partition_id are invalid */
>  	rcd->hdr.validation_bits = CPER_VALID_TIMESTAMP;
> -	rcd->hdr.timestamp = get_seconds();
> +	rcd->hdr.timestamp = ktime_get_real_seconds();
>  	rcd->hdr.record_length = sizeof(*rcd) + record->size;
>  	rcd->hdr.creator_id = CPER_CREATOR_PSTORE;
>  	rcd->hdr.notification_type = CPER_NOTIFY_MCE;
> -- 
> 2.9.0
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ