Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3326803pxf; Mon, 5 Apr 2021 09:06:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVWptLWAQpA7M7Ivj+yMbk3/Cj3VL7MO9GzqOI+xgUR7rgg+1nLIHmP+uQt+lttgO1A945 X-Received: by 2002:a17:906:3d62:: with SMTP id r2mr28744031ejf.488.1617638811316; Mon, 05 Apr 2021 09:06:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617638811; cv=none; d=google.com; s=arc-20160816; b=hRaN9pYMbgGWnLzQnX92GBe3P0Q/eEb2qpGB7RJ5t4BdtVIZtk5KF1uGoQwT42DnwC kXcnqKz0/Xydt7Yzt7wkslAZQeUPBYqCmWQ2A8XvTsFEkp6i4CbeJU9pokXAG4dZK1Om ccIK3szSXoFG7kdIi4mTGNnxsEQIcMNW26zuqom5O77jv0S4dYFp7rJeGvt5GpgjdxMP UQYYK2nWes9TKLxwF5pAz7vZDcJPJ0jtXJIJCbqENS6nt5yy531oxmTzagWa+gVvBivV nhnV5UwyVltdOMmPipmVyYyx8+Ufvq1U5JxjnDbMt1SeDvFDvmpxMtjL9iFulnkSprMU 1WMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5v9LVZFLzqGTp3AiDBUG1ScjHlQemkLpCN5GOoCHH/I=; b=uy9WCJwV+rtHvGpmSwZXG+Gal8A3iHpebCJ2pJKgAy2MSn5veGfIpySUUusOIkEcmO TeBY/zgtKeS9kOTM1OYvekuNzHDyRspzmyom/XVpHETbcaNdb1e671RQexlhQINg8Yfd ZnzW/n+DyJYX9UDyjTyjcljUhk16NYoohGRcjyTno5x6ISe2MzhhzGIQg9uCOWLnzj8s fjcEoB668+aRph79gmOAiRXg5bItq3mHwG97iUD3ULMWefBQDNob2FOkBhjah5UixKCi Np0zXqqKhOR+EJRpb7Ai1cSNR21ZLeqi8X6NWTPYg+SZ8Dhos8RqALpgya/fD4KNRQ7l IQ1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EdxyHVBi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kk22si13739153ejc.98.2021.04.05.09.06.27; Mon, 05 Apr 2021 09:06:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EdxyHVBi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239848AbhDEJOX (ORCPT + 99 others); Mon, 5 Apr 2021 05:14:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:54960 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238788AbhDEJJB (ORCPT ); Mon, 5 Apr 2021 05:09:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DA616613A1; Mon, 5 Apr 2021 09:08:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617613735; bh=OlbEFK3BpN3B46KeN0vztaAzXu3uxhzaVe32rMiOsJ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EdxyHVBijE8oOoxqmFtCbuG/X7gMAWX6jfQ96VEjlEcIue+4cQUfRjdD97tu0EFmc 4UYUdLYIbJQwzt26/9FIxSlFvCykWCAF2R8tBXVNmAy+KH7S1V5srLiD+QLyzFlSaq nNrHJf5YAQOxtmAYARxiaL1zXfxku24eyGy6vejY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Heiko Carstens Subject: [PATCH 5.10 071/126] s390/vdso: fix tod_steering_delta type Date: Mon, 5 Apr 2021 10:53:53 +0200 Message-Id: <20210405085033.406160113@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210405085031.040238881@linuxfoundation.org> References: <20210405085031.040238881@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Heiko Carstens commit b24bacd67ffddd9192c4745500fd6f73dbfe565e upstream. The s390 specific vdso function __arch_get_hw_counter() is supposed to consider tod clock steering. If a tod clock steering event happens and the tod clock is set to a new value __arch_get_hw_counter() will not return the real tod clock value but slowly drift it from the old delta until the returned value finally matches the real tod clock value again. Unfortunately the type of tod_steering_delta unsigned while it is supposed to be signed. It depends on if tod_steering_delta is negative or positive in which direction the vdso code drifts the clock value. Worst case is now that instead of drifting the clock slowly it will jump into the opposite direction by a factor of two. Fix this by simply making tod_steering_delta signed. Fixes: 4bff8cb54502 ("s390: convert to GENERIC_VDSO") Cc: # 5.10 Signed-off-by: Heiko Carstens Signed-off-by: Greg Kroah-Hartman --- arch/s390/include/asm/vdso/data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/s390/include/asm/vdso/data.h +++ b/arch/s390/include/asm/vdso/data.h @@ -6,7 +6,7 @@ #include struct arch_vdso_data { - __u64 tod_steering_delta; + __s64 tod_steering_delta; __u64 tod_steering_end; };