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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 1DF39C2D0CE for ; Tue, 21 Jan 2020 17:08:56 +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 E2127206A2 for ; Tue, 21 Jan 2020 17:08:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QqY3kFcv"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="gQvDqxcx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E2127206A2 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com 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:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6BYSRA7KnAwPC0iKCv4ZXUv4WbvbE4mz4nFuYuCnilw=; b=QqY3kFcvLWFjmy OdEtcRyAYC804D3/ax3/PgtS0DRrilqgEHOzZF3WiBK5ACzvi69ZD+b6mNnDmI7zGUq6MMPORbxYC 2OuGiyaSvqlNtpUNuckVOgfLE98O7MEK6DPzjqdTxnZO0MFZRH6TfKUcsWaj3OtABT3wJuBD76iXv 0K0Z1rqgDDJn99aNBKBPngkixb68Let/mioGyoz6bkil4U3Nzmi7iF57BATY7vuY1LKl+jV32XVXW fM+RsJ5wQLfGgXDxy+PEl61r7VVnymioHeSDzPb2ydifMFEmjMC++yLT6lxdG6Ny7E1/yn9bOcvEj y98R6yYDZYI7i0ighpSg==; 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 1itx1G-0004nR-As; Tue, 21 Jan 2020 17:08:50 +0000 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1itx19-0004lU-Nb for linux-arm-kernel@lists.infradead.org; Tue, 21 Jan 2020 17:08:49 +0000 Received: by mail-pj1-x1042.google.com with SMTP id s94so1127490pjc.1 for ; Tue, 21 Jan 2020 09:08:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dIrTm/RxgY9EJkd3a5Dr38zt2odYwh4TDnr6W5Q+qys=; b=gQvDqxcxdamKDQrZx2OQCok3qtKY3gXBWh4kYRqnRnBq3Tkh1aaFaeGIKHiz/q0XGi Mlwt/HO/kGUaNKD5Mq7nh8fgYlnqqMEZVQZYcFySKshuCXjiXSSSH2AqSvlbQII4hoVi jnBeZQwvk4YTimzyM89BqTwleDidtDJ8+z8Go8jo4lypBMOvp6w1pU3I3AhSv93GugZC JT4ipzNaOPItexENB24NeBr8e2BiLREU4dQXqYAeMUhGMeK+33xmXGQ4/2mh0wFF/nBn +dwa7kTQlvhCWcSjNa/jW4qQyw3tGQyvcBm2A1Bm04SrnpuucgRNkH3Pv61+hPkCG8Fv xBwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dIrTm/RxgY9EJkd3a5Dr38zt2odYwh4TDnr6W5Q+qys=; b=PkB3j06U66CzAOqvzWJTuLi20fvVgz1BZUKtI4is6Jr4/OjtWIXV1fbqrzkPYSfhPK 6/vVcVUgTkFHG1AtdWinc6aXPmiBOE9qrrlSmzwRQExxxT1Wlc8xeIT9HXYX8sUUKY2+ N1jPl0wiBI0LLjaXdkLyXuWRpf/HM85qHBVHO7/236RK5Dg0qEWSOdrWJjkFShh65Z3W gYIpqK564G6lWChKTuO9ubrxjO/8A0LKwqVD9U3gbUAILZ1ypO5wJ/OivSo6j22qMVyC VhQ3CyNSNIV+xALRdejJHteM5YRCZDULKaIKQAtXx7Xl8TOjSs1CV62W0VqQ1wKKvEFY 7luA== X-Gm-Message-State: APjAAAW9XLir6jQaMj6PvTI2j+G7Yx+9zsI6fqQMWEhOaY118GdPikE4 9pNbVjRS4nJGFqE9/U+RbRFJF1KFeVJmELemSG7JMQ== X-Google-Smtp-Source: APXvYqyo9e64PgawBWyRyPp9bGng3lznayTKxwdX64VZLwZ6nVF+OLAlVfVCrYhXiMNMWoiqJcRPm8Aq9CNAsyYaKCA= X-Received: by 2002:a17:90a:7784:: with SMTP id v4mr6604608pjk.134.1579626520305; Tue, 21 Jan 2020 09:08:40 -0800 (PST) MIME-Version: 1.0 References: <20200109160300.26150-1-jthierry@redhat.com> <20200112084258.GA44004@ubuntu-x2-xlarge-x86> <20200121103101.GE11154@willie-the-truck> In-Reply-To: <20200121103101.GE11154@willie-the-truck> From: Nick Desaulniers Date: Tue, 21 Jan 2020 09:08:29 -0800 Message-ID: Subject: Re: [RFC v5 00/57] objtool: Add support for arm64 To: Will Deacon X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200121_090843_766073_B9530C4E X-CRM114-Status: GOOD ( 21.66 ) 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: Julien Thierry , Peter Zijlstra , Catalin Marinas , LKML , clang-built-linux , raphael.gault@arm.com, Josh Poimboeuf , Nathan Chancellor , Linux ARM 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 Tue, Jan 21, 2020 at 2:31 AM Will Deacon wrote: > > 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? Surely we wouldn't want to replace jump tables with long chains of comparisons just because objtool couldn't validate jump tables without a GCC plugin for aarch64 for some reason, right? objtool validation is valuable, but tying runtime performance to a GCC plugin used for validation seems bad. -- Thanks, ~Nick Desaulniers _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel