Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2460283imd; Fri, 2 Nov 2018 11:47:30 -0700 (PDT) X-Google-Smtp-Source: AJdET5eAdxPWYtVNEYEKL2CPAk76nUzvf7Fb/vjLRlP5Gyr9cFFQBNJQtQrYoiu2fnQbGYkppg0m X-Received: by 2002:a17:902:b718:: with SMTP id d24-v6mr11296503pls.338.1541184450485; Fri, 02 Nov 2018 11:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541184450; cv=none; d=google.com; s=arc-20160816; b=UXYuklDTg7G2gJy63GbW/bwaWaFT0B/JZ869jeVxHJ+IoQ5i1JxPvKOSEMbu8Zjo+N nWyE0wvNyDGJXh67s0JXu/693GOlGeTsi0NjnR+mQ3irSFkr8f55p+mB7mWaPmjiSmnT btwnIqIoXqqttegN70paxLxVdexfn+pwc67ccp4pRNBFxXLgzAPqgYmkS3kLdPMooJ/N CU9BAaRAI+JoTZwFDDj9bHRiLuX7dv8OgFeHN0XUcCANIQckAbLyZLYGsXT+BLRIXKGD Zu7Jd0rxIk29D9SLdQJ+fcgd0hoQZ1g5E9oZvuoZO/NbTRbv6JWXfYktT/Z7qZracjiU W9tw== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=G7F00+S6HYwzmQ0WD2f29itx05mR13xBuJGUFhaf+Q8=; b=jnw9KCqU+AH6LM1HWhBMsH70d9//UTogsAohtgakJ+bOU00aK5WIC5hmhdU4I4HjKP YsGQ/RhM+2bSCSZeUvcFUjUww2R7PvuEM6+Kxf7Ft046fIsqB+bkgbxHE/5qY6DaQQnu PbeGuHsd6gbcC4pi/kH/ii1m4EqIUjs5oOLaiDDtH/6CSYSUH5g5bIgTGOLbH0FDaFNb oyvyeWHFrhrx7TguLjMqf+aZZabXLgzriNlNO4Rym4ANBvEzHi9Gs8Is28vWhQs4oFJU ZI1kQYykIsiat3DAlR8t6B+ZRdyI5eZptuXmXY0xxe3NdRCpmX3jEmLXr1wUr/TReUdX Mp8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="2OX/aNFG"; 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 w19-v6si34601392pgl.278.2018.11.02.11.47.15; Fri, 02 Nov 2018 11:47:30 -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; dkim=pass header.i=@kernel.org header.s=default header.b="2OX/aNFG"; 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 S1730351AbeKCDya (ORCPT + 99 others); Fri, 2 Nov 2018 23:54:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:50402 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729136AbeKCDy3 (ORCPT ); Fri, 2 Nov 2018 23:54:29 -0400 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6A4D020837; Fri, 2 Nov 2018 18:46:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541184376; bh=3gQUE4GedYVbMOH4HqQ4ExhtCew3xFxG4zF9Zkf9DE8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2OX/aNFGVMIZ2p3EmXpWwT5s0Jjw7xuugcJHmgartG1oCYr78N9KlfMZ+huSokqWV csByFT0mqiJKFL7f1y732INeGZjVun8Uk3QSoRv5GluqR91vlRiJBmtrVBZkAyVInG SHowEeTMSSriCAyh9jIreKjXEHwmW9MYHSHBCQMI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "David S. Miller" Subject: [PATCH 4.18 148/150] sparc: Fix syscall fallback bugs in VDSO. Date: Fri, 2 Nov 2018 19:35:10 +0100 Message-Id: <20181102182912.678968396@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181102182902.250560510@linuxfoundation.org> References: <20181102182902.250560510@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: "David S. Miller" [ Upstream commit 776ca1543b5fe673aaf1beb244fcc2429d378083 ] First, the trap number for 32-bit syscalls is 0x10. Also, only negate the return value when syscall error is indicated by the carry bit being set. Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- arch/sparc/vdso/vclock_gettime.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) --- a/arch/sparc/vdso/vclock_gettime.c +++ b/arch/sparc/vdso/vclock_gettime.c @@ -33,9 +33,19 @@ #define TICK_PRIV_BIT (1ULL << 63) #endif +#ifdef CONFIG_SPARC64 #define SYSCALL_STRING \ "ta 0x6d;" \ - "sub %%g0, %%o0, %%o0;" \ + "bcs,a 1f;" \ + " sub %%g0, %%o0, %%o0;" \ + "1:" +#else +#define SYSCALL_STRING \ + "ta 0x10;" \ + "bcs,a 1f;" \ + " sub %%g0, %%o0, %%o0;" \ + "1:" +#endif #define SYSCALL_CLOBBERS \ "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \