Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp610542pxb; Wed, 27 Jan 2021 16:41:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJx51lhDP6eaEJL3DD5xmgMULb240uBi7SIkOHW90JAsspmTUXMRHm3I4S/XzzU8oBimf282 X-Received: by 2002:a17:907:9495:: with SMTP id dm21mr8952685ejc.462.1611794512583; Wed, 27 Jan 2021 16:41:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611794512; cv=none; d=google.com; s=arc-20160816; b=lZ+CUDO52+JvTMIbLi25agUR1xcijtbYj3X5xGKC2FjrdCTTGGC//9A7br2Z9KOp7x p9CXE2YLVw02p7zC9sCG8J//pdS8v+8QQGwawIhsPDIf+cUh3lDWinVUIpBJcgh4YCA3 VdQrEsQ5yK6zWHQMps/IqeVCq9s/Kww/hz2ec3u7nzGpU2Up2qB8fVsRMKqhPm9H2AQ8 IJYcC5JIjW86YfDxShxq1gitHGgS/Bm3BZV0hQraxgD/gnCAD9it+jrHjVeYAjHy+kZ5 cHqll0wSbtz0lCuSJFgtHJnAsN67q5BpCcIkxbgM4jMuYdltrJbGykR05K4+iYt8K6QJ OJtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:sender:dkim-signature; bh=nMvW9sCogvCQk3Z+FvTaolhNqJWAlRopE1dL8mD/EfM=; b=ZIIvc1XGXNFxFQZ/K1tKM78O0ige3fuWmuZkD/qZ73PvUVaL4DzuCsZvaJ+pjo2tE6 YwyBPDr4kbbu3ev1hoAlTvKgdt6T4hVu47SENJ944Kei8JVbIqxjCZ1jn7l+Ak/dU30K FdgOzX+DjTgD4tr2RJ9UjZEqM433sYxQMebPeS6PX0RygGApQnel1EZTRFqTpCZNjBC+ oo0rs6SkpaOOL4EXs5cDlcQseJki8uOkwtn3iYLeINhxZq4TXpZ1fRNaevHm5rdTMz45 XVQe0z7TGuFyFm/VGyvPz6zg6Sv/rJjsUZOjD8uJr9XuUr3NOZxnX7MqnaubMMQVNksK X4gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=XabaZr51; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gu20si1602950ejb.562.2021.01.27.16.41.28; Wed, 27 Jan 2021 16:41:52 -0800 (PST) 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=@google.com header.s=20161025 header.b=XabaZr51; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236997AbhA0WQr (ORCPT + 99 others); Wed, 27 Jan 2021 17:16:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236964AbhA0WQk (ORCPT ); Wed, 27 Jan 2021 17:16:40 -0500 Received: from mail-qk1-x74a.google.com (mail-qk1-x74a.google.com [IPv6:2607:f8b0:4864:20::74a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7734CC06174A for ; Wed, 27 Jan 2021 14:16:00 -0800 (PST) Received: by mail-qk1-x74a.google.com with SMTP id v190so2667968qkc.15 for ; Wed, 27 Jan 2021 14:16:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=nMvW9sCogvCQk3Z+FvTaolhNqJWAlRopE1dL8mD/EfM=; b=XabaZr51cxeVUNojdcIqjRe6bUepIDvJQtPM0wT7pGFP6YgPydkBjs45hRKKl6wAx2 f+R5m/9IWnpxCMiLjlprYlhVQFrC+5CKHwcjdip7Vkt/KLjJKkrkGbxg61UieoIiUILx gmM3zOCAsPd+PQT5AzJHRnwSu4+GByKO4ea1z7p+wb0qhgrhCkIVp+0b0YjKYhyEsb6c rFt6j2h6OqzGbC1f5rCGLaZOUom6GerytFMyK7S8VH2Arad07pUUgx8vWq2M+gOQdQt9 EJdwH76rsjIvforkattkvFzUHWRNXC15PDQDmrNzW8KVDodG6IGo5LGXLIFyvoKTijgS JBuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=nMvW9sCogvCQk3Z+FvTaolhNqJWAlRopE1dL8mD/EfM=; b=JiY5Ki8KciWlq/UuSnlYVjVau18a6XnTHdQs3LufJynVhr957F4xCW92h5MPyj/Sd4 FFOC0qZl9oDr5K7/nnMxXqOzwYBBED5unyiofOXzfxsPVF3CieG77DLs4POgE2tSoPoR 3EVYyx76NJmAjRwPNyHOI7icLCyAZLWhuE+2SCw+Eh4fFzedNc4mW67ttTEcTfJ0OEDV Ft+N2FcpeojwwrAOpnb0gHX6nEjyoZWjGO0yS/SMfhOUOXm+HvOARO6it7cOEG7xoPhH MhhquNdA8n5HGRQOvmKeQj+mg03UT3oOAMtnPNGPBa49zn6ZmFDSOw/AQyFSk6b+GXwv f+SQ== X-Gm-Message-State: AOAM5328sWhomg6cH/S8qJLj4D2Sypwcr6qF34OSlTzijAK3eYKCJkHl yPSlAz2UQwmAee9YugETv2wMS0wLAf0xpsN65cw= Sender: "ndesaulniers via sendgmr" X-Received: from ndesaulniers1.mtv.corp.google.com ([2620:15c:211:202:f693:9fff:fef4:4d25]) (user=ndesaulniers job=sendgmr) by 2002:a0c:fe0b:: with SMTP id x11mr12660475qvr.18.1611785759532; Wed, 27 Jan 2021 14:15:59 -0800 (PST) Date: Wed, 27 Jan 2021 14:15:57 -0800 In-Reply-To: <20210120173800.1660730-13-jthierry@redhat.com> Message-Id: <20210127221557.1119744-1-ndesaulniers@google.com> Mime-Version: 1.0 References: <20210120173800.1660730-13-jthierry@redhat.com> X-Mailer: git-send-email 2.30.0.365.g02bc693789-goog Subject: Re: [RFC PATCH 12/17] gcc-plugins: objtool: Add plugin to detect switch table on arm64 From: Nick Desaulniers To: jthierry@redhat.com Cc: ardb@kernel.org, broonie@kernel.org, catalin.marinas@arm.com, jpoimboe@redhat.com, keescook@chromium.org, linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org, linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, mark.rutland@arm.com, masahiroy@kernel.org, michal.lkml@markovi.net, peterz@infradead.org, raphael.gault@arm.com, will@kernel.org, clang-built-linux@googlegroups.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Raphael Gault > > This plugins comes into play before the final 2 RTL passes of GCC and > detects switch-tables that are to be outputed in the ELF and writes > information in an ".discard.switch_table_info" section which will be > used by objtool. > > Signed-off-by: Raphael Gault > [J.T.: Change section name to store switch table information, > Make plugin Kconfig be selected rather than opt-in by user, > Add a relocation in the switch_table_info that points to > the jump operation itself] > Signed-off-by: Julien Thierry Rather than tightly couple this feature to a particular toolchain via plugin, it might be nice to consider what features could be spec'ed out for toolchains to implement (perhaps via a -f flag). Distributions (like Android, CrOS) wont be able to use such a feature as is.