From patchwork Thu Jul 16 15:07:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 11667763 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C77C31392 for ; Thu, 16 Jul 2020 15:08:58 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 9F3E5207CB for ; Thu, 16 Jul 2020 15:08:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HYX7V7Ph"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tH9ktcN1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9F3E5207CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=pvMnvD5YNrvDkkN5xhXpSXFEfjO3esae7Ft2OgS/aLQ=; b=HYX7V7PhyrrecDJrpBm/C1gPlD wJAOrl4yZG2Ha5JmTify6Yt1BFGell2fjGufu3VyqafpC8/yDqirZvJHmfmenq3KBjS5244TFw34I h+ejFp8/+jgUzKOS7rlGeRGrQdKZ0NhVj6YpJrWO5tdxlzXGa81L9ncDwao8kxbx/T1sGxvUG/KJJ SCswQvnfii4SIlqo5q4FYTeC/PuuK/gwTzm21zKmbXS3r2jCen4QWhNMyLZyjQKVd1Apfz+u9PEev k/RlsVhx8+xuAVLqAOColNXQsoysYORNJgEvqg97Ho0AXPFP4Jk5UKY5+m4IZWZic8xSjqN33e630 LI5I2RVQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jw5Ty-0004k5-TC; Thu, 16 Jul 2020 15:07:35 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jw5Tw-0004iN-8O for linux-arm-kernel@lists.infradead.org; Thu, 16 Jul 2020 15:07:33 +0000 Received: by mail-wr1-x441.google.com with SMTP id a6so7440057wrm.4 for ; Thu, 16 Jul 2020 08:07:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=k5K4JVLgAWN8MXhgEOCvgA0UlIhXTRBJEiv3tL9R3rg=; b=tH9ktcN12P46E6ApuPGUoyvnzH2E2th2kh40XGNX4k8iM8no7a+s0FV7F+FCDpfTHr Wr5FS6ieqFbOPl8MzqMWYXPUm+PpEeOc2ndZGy4d8i7H43/i0wB0wSclSrebRIPIzR2W DbGSllnO3UA0b0ulfYo24MJN6Z8eqKcDx+6X2OttiaWZB1WpL+FXKLtIIPlfyhdf+Bni a5T06Sobj5n5MR7BpjtmWaV64Y9rRzTkiAyt3jOICkL+B+Za5VQU+vBM+90acYba4CMS KFf5uNn1iwtG/u7+TH0qv7F/eibowIcJ6Aku1oc5q0HS4762yQ2WQRp8v+4z1ASQ16EZ X9Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=k5K4JVLgAWN8MXhgEOCvgA0UlIhXTRBJEiv3tL9R3rg=; b=P+EvOxeM15coFMHhlQIuQm7fUbvzhmallCIGPFAfgdddpa/0uXeSLcXxQzPj7I60Nq 4JLq042ag7kZSEbiE8uPscMEcfTjJ2gqj1ce1Y5VaYpKyRprfE6bnkaqqhNO39WgGg9k g6zY35UJ4YOGFS/wiqs4luXtr31n/oe2I7vP6hCeHkPnY1VvUUUxXB5zmJ8ts2V9n9Vc wldA7jSn+VdjAXn/sW4tPlrHvaqTBOWhv69RxybHnNOZWPKaYfNv9kfWw2QTUDVRG33g PeTiztW2pcteRLnyh9gOOpsGkLE8ic4qi/e4yr8H9ptdhvQPPmgOAAeCcZVHOurYEOWB TFZA== X-Gm-Message-State: AOAM532x9BClK2zkwO3mAsQIvJJoHcdBqyZBaCMaYtkHHSe1ooFZsQ8K oHNNDKhWrWCJa67TIhk5nA== X-Google-Smtp-Source: ABdhPJzfH0gJAdUum+zexeKADRJslWPQ0rn3StclWShURwDj7HhipMxMfF2t+Vie9f+1p2bxxWHyxg== X-Received: by 2002:a5d:40cb:: with SMTP id b11mr5573136wrq.263.1594912049806; Thu, 16 Jul 2020 08:07:29 -0700 (PDT) Received: from localhost.localdomain ([2a02:810b:f40:e00:922b:34ff:fe38:6455]) by smtp.googlemail.com with ESMTPSA id c25sm8505784wml.18.2020.07.16.08.07.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jul 2020 08:07:28 -0700 (PDT) From: Alex Bee To: linux-arch@vger.kernel.org Subject: [PATCH] linux: arm: vdso: nullpatch vdso_clock_gettime64 for non-virtual timers Date: Thu, 16 Jul 2020 17:07:23 +0200 Message-Id: <20200716150723.9389-1-knaerzche@gmail.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200716_110732_315517_B9B8C493 X-CRM114-Status: GOOD ( 13.80 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:441 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [knaerzche[at]gmail.com] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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: Florian Fainelli , Alex Bee , Daniel Jordan , linux-arm-kernel@lists.infradead.org, Russell King , Vincenzo Frascino , Vlastimil Babka MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Along with commit commit 74d06efb9c2f ("ARM: 8932/1: Add clock_gettime64 entry point") clock_gettime64 was added for ARM platform to solve the y2k38 problem on 32-bit platforms. glibc from version 2.31 onwards started using this vdso-call on ARM platforms. However it was (probably) forgotten to "nullpatch" this call, when no reliable timer source is available, for example when "arm,cpu-registers-not-fw-configured" is defined in devicetree for "arm,armv7-timer". This results in erratic time jumps whenever "gettimeofday" gets called, since the (non-working) vdso-call will be used instead of a syscall. This patch adds clock_gettime64 to get nullpatched as well. It has been verified to work and solve this issue on Rockchip RK322x, RK3288 and RPi4 (32-bit kernel build) platforms. Signed-off-by: Alex Bee --- arch/arm/kernel/vdso.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/kernel/vdso.c b/arch/arm/kernel/vdso.c index 6bfdca4769a7..fddd08a6e063 100644 --- a/arch/arm/kernel/vdso.c +++ b/arch/arm/kernel/vdso.c @@ -184,6 +184,7 @@ static void __init patch_vdso(void *ehdr) if (!cntvct_ok) { vdso_nullpatch_one(&einfo, "__vdso_gettimeofday"); vdso_nullpatch_one(&einfo, "__vdso_clock_gettime"); + vdso_nullpatch_one(&einfo, "__vdso_clock_gettime64"); } }