From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7AF2C2D0C0 for ; Tue, 24 Dec 2019 01:58:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AA3002070E for ; Tue, 24 Dec 2019 01:58:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LN0M4IA/"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="oFYra1Gn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA3002070E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JpQ1+TGM3wtutUxFhICp4A8Tv/JayfCAc0gQmRrjcVQ=; b=LN0M4IA/AwxXNv yplUJjduEduxR9om/poSZ60TK6LLP6lsnPHKQ1IhoPydsboJJitPCmX9B4ELfe+vlOXITS0OCYw+z DnGT/A909JsJdZa0gq4Cb3iXdatJbDeipF1Efff9dC+LrDmCNyJ9I3okIlPYlfa5ng+w7rxZVm1Hv sdeADdABZ90/snW1OyGdPOnAzG5FHPUcmIFWaCPGGt/Pz/j0pJOcWySwz+n+Zs6DZtrQT/1b0O9A0 O9tTH+FrKfI6WMEp977qNkBJyVpwCu6Pb9aQtIjYozFyfsd4Q/5pQWPWswS0uQRZBN8muDEAqNIOE XyQywKDryOGALfL7U3Kg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ijZTA-0008Tg-Og; Tue, 24 Dec 2019 01:58:44 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ijZT8-0008Sv-Ea for linux-arm-kernel@lists.infradead.org; Tue, 24 Dec 2019 01:58:43 +0000 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7E5F22075B for ; Tue, 24 Dec 2019 01:58:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577152718; bh=wrDzBWpOKSiwcb+qBm67fhEmniMtsPe08K1CDqJG+aQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=oFYra1GnrPYPW0VIb0ihhkc/X1ko+xfQht7/2IKlWIyfO6uNchY0GOmxSOCGWBnY+ oQU08j1ThgwFiIxFVbPwHNZ4a4Bg8WDDE6yE6w4LCePbFzjER6HYQqZgnlhUqcpAns WZQxExfAhEzKuKRq9E0Du+n4NTas+PLc/RJdGJLU= Received: by mail-wm1-f44.google.com with SMTP id p9so1262800wmc.2 for ; Mon, 23 Dec 2019 17:58:38 -0800 (PST) X-Gm-Message-State: APjAAAWX3wV9RxhQ68dQRlEllK86kQMjDkp6k2Evqk8E9bi9B3N2CcNl 8TTAKZeHSxsTPwb308lqO6GQnK0Qy6oMnF+2EuYw3w== X-Google-Smtp-Source: APXvYqxwNlYNszeowAFN0oKu0h4yW9ADusJeScbE5XRItW37UFXluNES85cpW6MmdJIXJdPRzP47hHREp3dIH3wiI6I= X-Received: by 2002:a7b:cbc9:: with SMTP id n9mr1469926wmi.89.1577152716961; Mon, 23 Dec 2019 17:58:36 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Andy Lutomirski Date: Mon, 23 Dec 2019 17:58:24 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v2 07/10] lib: vdso: don't use READ_ONCE() in __c_kernel_time() To: Christophe Leroy X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191223_175842_512597_A1092587 X-CRM114-Status: UNSURE ( 9.89 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Benjamin Herrenschmidt , X86 ML , LKML , "open list:MIPS" , Paul Mackerras , Andrew Lutomirski , Michael Ellerman , Thomas Gleixner , Vincenzo Frascino , linuxppc-dev , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Dec 23, 2019 at 6:31 AM Christophe Leroy wrote: > > READ_ONCE() forces the read of the 64 bit value of > vd[CS_HRES_COARSE].basetime[CLOCK_REALTIME].sec allthough > only the lower part is needed. Seems reasonable and very unlikely to be harmful. That being said, this function really ought to be considered deprecated -- 32-bit time_t is insufficient. Do you get even better code if you move the read into the if statement? Reviewed-by: Andy Lutomirski --Andy _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel