Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1719589ybg; Sat, 19 Oct 2019 01:02:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqx1/wM9dLQdTIkLHk46LtoNpk64Fg6d/6jdnvPMQQmFb4S5xXi08XddAmNRm3ZOikfugB9K X-Received: by 2002:a05:6402:336:: with SMTP id q22mr14240366edw.193.1571472162209; Sat, 19 Oct 2019 01:02:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571472162; cv=none; d=google.com; s=arc-20160816; b=dwbVkZOd9IGhuFB/R7qV556V0fXfgKyUOOvP7Uh2mkrd6XJW+vTvTh9M8L5s6Y2j7g G/7dU8NWXJxSmDQTw3Uh0mSdyvBo2Yuep/054Drv3BqezhxZpmprfUQCpGnJ/X9hNoaZ GOpvSn7lPZDrjy/ehxZOQtVnCSbnmOZ6X5AzxcBB333lmt0RAM3apnnjfSEtH+o3k0Dl UXnX8tDdI2SpOLdrF2B4hB+6uS4BRQGVNTwDojXsfAOoCqHqu/aGuU3jEALymr6vhicu vg+qn3FhgPAloIQkrAx0dYu2SklVfGZS6iSegMjqmdGtQwG/LDO2clxkfz+bP2tTmJlp uDpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=X4oLS+zgk595STSrVIrnJJ/xNbpmELfaqYvH3dyzB6Y=; b=H3Iyxjkg4Oi+T9+aUA2d1sfG+/skX1Pgud/75o6ouZgo2YS+mvRDZSDGMsYnleb7pN Mv12haA0ywhje416M3zkEGv4f3pd+PglT5nTTHmQfNGs8oc+/GvPIMzyLL5hjO/BamyU I5LtbKTkjKSHN8lY1OeZXranHCYAQAnJjnd1g8HWM30wqcseVXxqEBdpMgEmEJ7LaRey BdcsNNrA0mUVgWFPvwloAJf0ZmTiRW8yM0hRPPdRMaZzotKmc7Mk8X6P/Lg+UW+M9XEY km4iXLkqd7j6A71N5tMuSBhe6T+L4ouGbsLwt/Gn2T9TbOgHcyaeWkkJluF6LDDo2PtU /TMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p3si5075081ejj.347.2019.10.19.01.02.19; Sat, 19 Oct 2019 01:02:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2632838AbfJRIar (ORCPT + 99 others); Fri, 18 Oct 2019 04:30:47 -0400 Received: from [217.140.110.172] ([217.140.110.172]:58292 "EHLO foss.arm.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1727573AbfJRIar (ORCPT ); Fri, 18 Oct 2019 04:30:47 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4F9EF32B; Fri, 18 Oct 2019 01:30:16 -0700 (PDT) Received: from [192.168.1.103] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C62413F718; Fri, 18 Oct 2019 01:30:13 -0700 (PDT) Subject: Re: [PATCH] lib/vdso: Use __arch_use_vsyscall() to indicate fallback To: Andy Lutomirski , Huacai Chen , Maxime Bizon Cc: Thomas Gleixner , chenhuacai@gmail.com, LKML , stable , Arnd Bergmann , Paul Burton , linux-mips@vger.kernel.org, linux-arm-kernel References: <1571367619-13573-1-git-send-email-chenhc@lemote.com> From: Vincenzo Frascino Message-ID: <6581a6e8-45c9-a80c-d2a4-33466f5712fd@arm.com> Date: Fri, 18 Oct 2019 09:32:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy and Hucan, On 10/18/19 4:15 AM, Andy Lutomirski wrote: > On Thu, Oct 17, 2019 at 7:57 PM Huacai Chen wrote: >> >> In do_hres(), we currently use whether the return value of __arch_get_ >> hw_counter() is negtive to indicate fallback, but this is not a good >> idea. Because: >> >> 1, ARM64 returns ULL_MAX but MIPS returns 0 when clock_mode is invalid; >> 2, For a 64bit counter, a "negtive" value of counter is actually valid. > > s/negtive/negative > > What's the actual bug? Is it that MIPS is returning 0 but the check > is < 0? Sounds like MIPS should get fixed. > I submitted a patch for this yesterday to the MIPS maintainers [1]. The MIPS32 r1 implementation had a bug when VDSO_CLOCK_NONE was set. The issue has been reported by Maxime Bizon who tested the fix as well. [1] https://patchwork.kernel.org/patch/11193391/ -- Regards, Vincenzo