Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp304329pxj; Thu, 20 May 2021 09:41:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxldydLUSNijHSlFxFpJvMwsR9tBzT0jZOdDyAz4p9F4SNdN/y6cmYpWfQjY7LHO6+nYXxG X-Received: by 2002:aa7:db90:: with SMTP id u16mr5890921edt.106.1621528910677; Thu, 20 May 2021 09:41:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621528910; cv=none; d=google.com; s=arc-20160816; b=uOp4upPZnPt+54E+F5YG7pZhrD6X32ohVv7lRAqO5hK+aqnXzcSiiZFbiW664NxVOk 5wnVRn1v/7Tkf3Bd+vnYxhMWIL+gI6uwBz5VLiRjnRhx7lGyAD/GYQC5vQPhyie8Skld 4vng8glF8Z45ZfPH+KORy1HFFTqPhfOCH722oxzvz9C6DdaAhZB3HxHIoskfaLtPl3bB nfR6zvkpmrTMwIvcrGF1NHoIWyeRhf9NcaBXr+Kdz8dKMZXbjrnkDo5RpWhNDiCKfUjM 1Lv5tuQb2PzIWrqjkffGp5oT58Fgio45L0WniAu0ksegq9QCv6eB+xc+a61KTV3IRkM7 B3+g== 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=+0H2+pYgQJ80Se/L1RyhgXgU0iUgDlrgSU2wFhZ6DbE=; b=kZ9Q90UlRQ0TZNctEw0I1hI59ZAQneyFT53Omm62MWB8U76hmapSA0tTcTzXwj4NXK 1jbWrtRsiUUJ1EayX+kn4dLP8UuNTEpr1Ni1/5z2l6qGCzIp9/fwlWEbMQVsVclW/4JN Ok6rBxE7oi0da/hBlLjHmfpaYKEniH6WuPP4H4kwx/leRb3UHyytNLgnMWTPVePPQUFk kPlWxBIxzbth12x+vSyQe/0YkeNFzDu+py+yRR/lWq26sCVNnJhnctsacknwRrtvk+Nd 2H073qjCW7kMwL4LXo66hLsxXfj3nerdtt2YrHgZM3Yx+gXXcFTN0Pux4Yku6yvMc7HG TQoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GBwy773u; 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 r21si2602789eda.500.2021.05.20.09.41.27; Thu, 20 May 2021 09:41:50 -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=GBwy773u; 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 S232517AbhETJq4 (ORCPT + 99 others); Thu, 20 May 2021 05:46:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:47072 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231582AbhETJnp (ORCPT ); Thu, 20 May 2021 05:43:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EA2DE61448; Thu, 20 May 2021 09:32:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621503177; bh=gU/ZrlSGQCpZ8unKozdd6U/i+PtXxU+4cDcxs0AgTyc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GBwy773uyWF/DvOc0qLvYkPw4qAqGyNbPwvdjUicT6HBtux5XXIePLh6JXA2/O/ys 3SCerWn8HXDxSJXQjqmaHOipwd1KTN4ZUb9g3ZrYOCDPAa50k3rrf/rJpo9T2JH+cM LceRvi6m/5cpdJjgMacXq3b6EPFIyv/c/GqQ/MJs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , Jian Cai Subject: [PATCH 4.19 102/425] arm64: vdso: remove commas between macro name and arguments Date: Thu, 20 May 2021 11:17:51 +0200 Message-Id: <20210520092134.808939277@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092131.308959589@linuxfoundation.org> References: <20210520092131.308959589@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: Jian Cai LLVM's integrated assembler appears to assume an argument with default value is passed whenever it sees a comma right after the macro name. It will be fine if the number of following arguments is one less than the number of parameters specified in the macro definition. Otherwise, it fails. For example, the following code works: $ cat foo.s .macro foo arg1=2, arg2=4 ldr r0, [r1, #\arg1] ldr r0, [r1, #\arg2] .endm foo, arg2=8 $ llvm-mc -triple=armv7a -filetype=obj foo.s -o ias.o arm-linux-gnueabihf-objdump -dr ias.o ias.o: file format elf32-littlearm Disassembly of section .text: 00000000 <.text>: 0: e5910001 ldr r0, [r1, #2] 4: e5910003 ldr r0, [r1, #8] While the the following code would fail: $ cat foo.s .macro foo arg1=2, arg2=4 ldr r0, [r1, #\arg1] ldr r0, [r1, #\arg2] .endm foo, arg1=2, arg2=8 $ llvm-mc -triple=armv7a -filetype=obj foo.s -o ias.o foo.s:6:14: error: too many positional arguments foo, arg1=2, arg2=8 This causes build failures as follows: arch/arm64/kernel/vdso/gettimeofday.S:230:24: error: too many positional arguments clock_gettime_return, shift=1 ^ arch/arm64/kernel/vdso/gettimeofday.S:253:24: error: too many positional arguments clock_gettime_return, shift=1 ^ arch/arm64/kernel/vdso/gettimeofday.S:274:24: error: too many positional arguments clock_gettime_return, shift=1 This error is not in mainline because commit 28b1a824a4f4 ("arm64: vdso: Substitute gettimeofday() with C implementation") rewrote this assembler file in C as part of a 25 patch series that is unsuitable for stable. Just remove the comma in the clock_gettime_return invocations in 4.19 so that GNU as and LLVM's integrated assembler work the same. Link: https://github.com/ClangBuiltLinux/linux/issues/1349 Suggested-by: Nathan Chancellor Reviewed-by: Nathan Chancellor Signed-off-by: Jian Cai Signed-off-by: Greg Kroah-Hartman --- Changes v1 -> v2: Keep the comma in the macro definition to be consistent with other definitions. Changes v2 -> v3: Edit tags. Changes v3 -> v4: Update the commit message based on Nathan's comments. arch/arm64/kernel/vdso/gettimeofday.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/arch/arm64/kernel/vdso/gettimeofday.S +++ b/arch/arm64/kernel/vdso/gettimeofday.S @@ -227,7 +227,7 @@ realtime: seqcnt_check fail=realtime get_ts_realtime res_sec=x10, res_nsec=x11, \ clock_nsec=x15, xtime_sec=x13, xtime_nsec=x14, nsec_to_sec=x9 - clock_gettime_return, shift=1 + clock_gettime_return shift=1 ALIGN monotonic: @@ -250,7 +250,7 @@ monotonic: clock_nsec=x15, xtime_sec=x13, xtime_nsec=x14, nsec_to_sec=x9 add_ts sec=x10, nsec=x11, ts_sec=x3, ts_nsec=x4, nsec_to_sec=x9 - clock_gettime_return, shift=1 + clock_gettime_return shift=1 ALIGN monotonic_raw: @@ -271,7 +271,7 @@ monotonic_raw: clock_nsec=x15, nsec_to_sec=x9 add_ts sec=x10, nsec=x11, ts_sec=x13, ts_nsec=x14, nsec_to_sec=x9 - clock_gettime_return, shift=1 + clock_gettime_return shift=1 ALIGN realtime_coarse: