From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3997C2D0CE for ; Tue, 21 Jan 2020 10:31:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3AFF72253D for ; Tue, 21 Jan 2020 10:31:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579602668; bh=N1HxnG/W4GZnfj2DenmFwgX2DtvNPyZxVMKAKfJlmz8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=RRZsZ1dovBoR1zTFksM997NmwA4sbRomy9w0ybV4rTisTi/QPEU94ahPTspEna26Z vSCjIOFw/cKz/2Ll70GxtUB4Jm+yL3YqqZG2J1JjGdxJ4++FsP8W/sKigb2J54+0FI dBY+o6W6Q+UfKaTB4dJmpJFvNSFbuE9JaOIl5YxY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729610AbgAUKbH (ORCPT ); Tue, 21 Jan 2020 05:31:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:48506 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727220AbgAUKbH (ORCPT ); Tue, 21 Jan 2020 05:31:07 -0500 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (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 DF3F820700; Tue, 21 Jan 2020 10:31:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579602666; bh=N1HxnG/W4GZnfj2DenmFwgX2DtvNPyZxVMKAKfJlmz8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IDgmkdso1XFVu4goBxxQPBXW2ZDKmgJeRPD37rrmhkiuwL+jP5taHeOygiaL5RagY u4gX0dwoARX09mIC0pXLD+lUkvD8jOqx30nZiAj/lUYcTasJce7cNOaxq6nlnYkiNT UPFELFZzjmZGQoiBurD+VQdYfyhqaXO4M7NEhLpU= Date: Tue, 21 Jan 2020 10:31:01 +0000 From: Will Deacon To: Julien Thierry Cc: Nathan Chancellor , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, jpoimboe@redhat.com, peterz@infradead.org, raphael.gault@arm.com, catalin.marinas@arm.com, clang-built-linux@googlegroups.com Subject: Re: [RFC v5 00/57] objtool: Add support for arm64 Message-ID: <20200121103101.GE11154@willie-the-truck> References: <20200109160300.26150-1-jthierry@redhat.com> <20200112084258.GA44004@ubuntu-x2-xlarge-x86> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 13, 2020 at 07:57:48AM +0000, Julien Thierry wrote: > On 1/12/20 8:42 AM, Nathan Chancellor wrote: > > The 0day bot reported a couple of issues with clang with this series; > > the full report is available here (clang reports are only sent to our > > mailing lists for manual triage for the time being): > > > > https://groups.google.com/d/msg/clang-built-linux/MJbl_xPxawg/mWjgDgZgBwAJ > > > > Thanks, I'll have a look at those. > > > The first obvious issue is that this series appears to depend on a GCC > > plugin? I'll be quite honest, objtool and everything it does is rather > > over my head but I see this warning during configuration (allyesconfig): > > > > WARNING: unmet direct dependencies detected for GCC_PLUGIN_SWITCH_TABLES > > Depends on [n]: GCC_PLUGINS [=n] && ARM64 [=y] > > Selected by [y]: > > - ARM64 [=y] && STACK_VALIDATION [=y] > > > > Followed by the actual error: > > > > error: unable to load plugin > > './scripts/gcc-plugins/arm64_switch_table_detection_plugin.so': > > './scripts/gcc-plugins/arm64_switch_table_detection_plugin.so: cannot > > open shared object file: No such file or directory' > > > > If this plugin is absolutely necessary and can't be implemented in > > another way so that clang can be used, seems like STACK_VALIDATION > > should only be selected on ARM64 when CONFIG_CC_IS_GCC is not zero. > > > > So currently the plugin is necessary for proper validation. One option can > be to just let objtool output false positives on files containing jump > tables when the plugin cannot be used. But overall I guess it makes more > sense to disable stack validation for non-gcc builds, for now. Alternatively, could we add '-fno-jump-tables' to the KBUILD_CFLAGS if STACK_VALIDATION is selected but we're not using GCC? Is that sufficient to prevent generation of these things? Will From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CD85C2D0CE for ; Tue, 21 Jan 2020 10:31:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 5F4CD207E0 for ; Tue, 21 Jan 2020 10:31:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="pTBLjK6n"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="IDgmkdso" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5F4CD207E0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cYfPkFOwdvMKO/U2JRMS+9hlnCqtipRT/Xr6HCIc864=; b=pTBLjK6ny2fW2v Grw47o+Zm0bhwjetMqeWWkn9EvuUJxSJ4DSnFIBzgvPUFKyNnOfbBJVBh8u65TulqbTGHKHlRxD14 YeoCSTYBWVodSTUk75k+7ugvr1odtzio4YEkPbQq4PE1LAWpruLQSP1CC3+W1+a9NM7pIAWChHVeG k8MWxtXWybwPJsCEDqDxJdYJqMrtcmlAGB/n7t7N9mknM12Ha+J/tfvqGgCZVy6CtIVIUsd7RXHa5 gUYspp/ThZGP6ETZGFOG/DLEFzWHTFX/cDglKpV1Xbp1zwFsDwSDG7onaKZANvDj+BD2ziSrqx1Kw NagQETpC9LZXTiipBHmg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1itqoo-00088f-QR; Tue, 21 Jan 2020 10:31:34 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1itqoM-0007me-Sw for linux-arm-kernel@lists.infradead.org; Tue, 21 Jan 2020 10:31:11 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (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 DF3F820700; Tue, 21 Jan 2020 10:31:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579602666; bh=N1HxnG/W4GZnfj2DenmFwgX2DtvNPyZxVMKAKfJlmz8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IDgmkdso1XFVu4goBxxQPBXW2ZDKmgJeRPD37rrmhkiuwL+jP5taHeOygiaL5RagY u4gX0dwoARX09mIC0pXLD+lUkvD8jOqx30nZiAj/lUYcTasJce7cNOaxq6nlnYkiNT UPFELFZzjmZGQoiBurD+VQdYfyhqaXO4M7NEhLpU= Date: Tue, 21 Jan 2020 10:31:01 +0000 From: Will Deacon To: Julien Thierry Subject: Re: [RFC v5 00/57] objtool: Add support for arm64 Message-ID: <20200121103101.GE11154@willie-the-truck> References: <20200109160300.26150-1-jthierry@redhat.com> <20200112084258.GA44004@ubuntu-x2-xlarge-x86> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200121_023106_966327_78AAC7C0 X-CRM114-Status: GOOD ( 18.93 ) 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: peterz@infradead.org, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, raphael.gault@arm.com, jpoimboe@redhat.com, Nathan Chancellor , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jan 13, 2020 at 07:57:48AM +0000, Julien Thierry wrote: > On 1/12/20 8:42 AM, Nathan Chancellor wrote: > > The 0day bot reported a couple of issues with clang with this series; > > the full report is available here (clang reports are only sent to our > > mailing lists for manual triage for the time being): > > > > https://groups.google.com/d/msg/clang-built-linux/MJbl_xPxawg/mWjgDgZgBwAJ > > > > Thanks, I'll have a look at those. > > > The first obvious issue is that this series appears to depend on a GCC > > plugin? I'll be quite honest, objtool and everything it does is rather > > over my head but I see this warning during configuration (allyesconfig): > > > > WARNING: unmet direct dependencies detected for GCC_PLUGIN_SWITCH_TABLES > > Depends on [n]: GCC_PLUGINS [=n] && ARM64 [=y] > > Selected by [y]: > > - ARM64 [=y] && STACK_VALIDATION [=y] > > > > Followed by the actual error: > > > > error: unable to load plugin > > './scripts/gcc-plugins/arm64_switch_table_detection_plugin.so': > > './scripts/gcc-plugins/arm64_switch_table_detection_plugin.so: cannot > > open shared object file: No such file or directory' > > > > If this plugin is absolutely necessary and can't be implemented in > > another way so that clang can be used, seems like STACK_VALIDATION > > should only be selected on ARM64 when CONFIG_CC_IS_GCC is not zero. > > > > So currently the plugin is necessary for proper validation. One option can > be to just let objtool output false positives on files containing jump > tables when the plugin cannot be used. But overall I guess it makes more > sense to disable stack validation for non-gcc builds, for now. Alternatively, could we add '-fno-jump-tables' to the KBUILD_CFLAGS if STACK_VALIDATION is selected but we're not using GCC? Is that sufficient to prevent generation of these things? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel