Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6132583ybv; Tue, 18 Feb 2020 10:32:08 -0800 (PST) X-Google-Smtp-Source: APXvYqxrif9MI3udc93On31khZB6/heq631QMHynLlagR3Onc/yD3VzeYCtNDCU5RozqmFJwYTKI X-Received: by 2002:a9d:20c1:: with SMTP id x59mr17411333ota.286.1582050728728; Tue, 18 Feb 2020 10:32:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582050728; cv=none; d=google.com; s=arc-20160816; b=n38XHmBGojnJU5ngbuoKMbogOwQGZqaho0TMaa4Kw+vcNjxeOpJWZ9OB8MAoxwHj4D YwW1Lfyz19OKveNvVMPttOg8iA7BHQUq71n66T+u3pr1tCZzFnAStdBr0KbK1TqRDB6Q pvXaejYrC27TFk1QlL/0XPl5TWcRz2W2/w9o7kxeg+Js48dzrJ2CdKhtQ+ia9hoxAq+l zoC9ibXgR/X+bbp2jTFcVio+fJWRLZXZkJ8QQuoXgXrVMPnO/NabTSmnCp1qzKxcqjo9 HW+FAaDKZV/lTqWO6nN3jLFumziZebn9PsVuZbDI9MjTDIr5B7g/TgMnFmMy7vRE/vJ1 QGBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=+wiw5lrCSQij+T7Z3oal8MXvOgfhByiSsTRsFyzWrro=; b=efTbWakQCc9sArM6gYecCCDQMsmQ3tP+1L7ihaucvNYYW5NzKvCbau0BexhAMCHx0v KoGPwvRECK994xK+UWA2O3QZugFPXJa+i4d12FBPChOTbCID8xNLGiqGzFbQej81xm5N bSa+39i3OXSLpFJe8E2viCjwK+g7dJrt1KXHMnHnCEyxzlhF8PCEAg1Yqv6VkXYS1/LW SbUm4GO0zrOjsiQpjJcBFj7vrfBRn/odtw1TtSossAG29R+dtZs8bzDHmywchKsSz3bO CjO/f5iTsJK+O39IPT3X8JYOHZLoUh8XOXzZ010A7ZcRJmAZkb/WEAq1cgoQZX57QZE0 2Vvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AL2OqpCv; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l22si394199oie.32.2020.02.18.10.31.56; Tue, 18 Feb 2020 10:32:08 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=AL2OqpCv; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726225AbgBRSaR (ORCPT + 99 others); Tue, 18 Feb 2020 13:30:17 -0500 Received: from mail-oi1-f195.google.com ([209.85.167.195]:41417 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726318AbgBRSaN (ORCPT ); Tue, 18 Feb 2020 13:30:13 -0500 Received: by mail-oi1-f195.google.com with SMTP id i1so21073275oie.8; Tue, 18 Feb 2020 10:30:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+wiw5lrCSQij+T7Z3oal8MXvOgfhByiSsTRsFyzWrro=; b=AL2OqpCvhL88spvXodEIYCX2UE5sle8Xf4g0XdrZ/ldsokqbmwcoZn3eBX7anyuWy8 vlrlN/A6J+XJwXYFZmV/DAHEnW7d7FK01iuCj9nf+YS5pEBD68wWtTWzRVHfWKw4ipEo LmYli6LkiVJtD2pJTpZzGqJKB/ylu0Z6JisMgEqUXYyDW2F4hdPQJpI6x9+jctd3UJ3p WIabauyIg1yCjPr1JYhXdNpbJPZX4claJRgDQJ3YYfdywrUxJMKOY1UaS+G66RmsBSLs m4jqANpQ0fr86C9+hjGJyYnWLdT8I1YDs0uRlg/iHgH/wW2NLVyUgJXTWuycmZjWbJtI 0Quw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+wiw5lrCSQij+T7Z3oal8MXvOgfhByiSsTRsFyzWrro=; b=GuIVI3kwndmszIcolPpNgk0RKxbmQdZe40yuTGhHqNku2amEn2/1TZw8MO07XG/UeJ 7YcOuAocyULFJ0cWWZ+nzuDzVGyl6DCgK4ln/ubwesqQ7cnFAU4URtNyETdreI0RUCCr RjgJgAZjgRFbzdDTWHNxem00w/XtpocbNPZ8W6fDwhghSI8/JaUVkkvbUDlp0pmLWZm8 RE/Mi7G6g3htJ4QzMe+xRwNpQb2fDMFGW6sxrbdVGqomws3YbfFKauAe7Bkcwty0GYUM bqF6AzKrpE2S1USeVR9RaNMO/QuSFp/BFwDHxLaxoOOEfcTEMb4MEk7asOtROBffH6Rd 106Q== X-Gm-Message-State: APjAAAW6d31ObTKIVt0ktnvOLMnHtMxsIXL8HQxJxiX/vAbNBluMzZSd Z8AlqLF30JeIyGj+zHaoEOQ= X-Received: by 2002:aca:2b04:: with SMTP id i4mr2129858oik.21.1582050612821; Tue, 18 Feb 2020 10:30:12 -0800 (PST) Received: from ubuntu-m2-xlarge-x86 ([2604:1380:4111:8b00::1]) by smtp.gmail.com with ESMTPSA id l207sm1435015oih.25.2020.02.18.10.30.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Feb 2020 10:30:12 -0800 (PST) Date: Tue, 18 Feb 2020 11:30:11 -0700 From: Nathan Chancellor To: Nick Desaulniers Cc: Ralf Baechle , Paul Burton , linux-mips@vger.kernel.org, LKML , clang-built-linux Subject: Re: [PATCH] MIPS: vdso: Wrap -mexplicit-relocs in cc-option Message-ID: <20200218183011.GA7516@ubuntu-m2-xlarge-x86> References: <20200217211149.44132-1-natechancellor@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 18, 2020 at 10:28:15AM -0800, Nick Desaulniers wrote: > On Mon, Feb 17, 2020 at 1:11 PM Nathan Chancellor > wrote: > > > > Clang does not support this option and errors out: > > > > clang-11: error: unknown argument: '-mexplicit-relocs' > > > > Clang does not appear to need this flag like GCC does because the jalr > > check that was added in commit 976c23af3ee5 ("mips: vdso: add build > > time check that no 'jalr t9' calls left") passes just fine with > > > > $ make ARCH=mips CC=clang CROSS_COMPILE=mipsel-linux-gnu- malta_defconfig arch/mips/vdso/ > > > > even before commit d3f703c4359f ("mips: vdso: fix 'jalr t9' crash in > > vdso code"). > > > > -mrelax-pic-calls has been supported since clang 9, which is the > > earliest version that could build a working MIPS kernel, and it is the > > default for clang so just leave it be. > > > > Fixes: d3f703c4359f ("mips: vdso: fix 'jalr t9' crash in vdso code") > > Link: https://github.com/ClangBuiltLinux/linux/issues/890 > > Signed-off-by: Nathan Chancellor > > Thanks for the patch, and detailed context. > Reviewed-by: Nick Desaulniers > > With this patch applied: > $ make ARCH=mips CC=clang CROSS_COMPILE=mipsel-linux-gnu- > malta_defconfig arch/mips/vdso/ > $ lvm-objdump --disassemble arch/mips/vdso/vdso.so.dbg.raw | egrep -h "jarl.*t9" > $ llvm-objdump --disassemble arch/mips/vdso/vdso.so.dbg.raw | grep jarl > So jarl instructions aren't emitted. > > Tested-by: Nick Desaulniers Thank you for double checking and the review! Cheers, Nathan