From patchwork Fri Jun 10 23:34:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sami Tolvanen X-Patchwork-Id: 12878195 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E385ACCA47D for ; Fri, 10 Jun 2022 23:36:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:References: Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=SkpIQPEP9KGsF1XhSAHo+MzpoBmq4RinoMFgwgSz4Pg=; b=fP/e+srkoIwO9DUssDELwBnAW2 1z4uZuVtbJL/9i0xZ0WHhqHqSO512333BDSI/XMyxkYELwVsenfdb05PGwHIe/39pFpJOB3CqaVIT KUom24GjmeHQM6F2xFjYxoewlbO1OdbUSHofarjCFQFPUsj/UO6xRbDk5G4sKDRnQz/KXmesOxUA3 pObNTnDLL1WCDUueG5yi1R4QAyyEDLnIMHv3pBF1h9GEjRLG2a0l6sNS6GtK2Zuw3cpndXZTTTAlm +hhylUo/m8xZtwvf+qIhgWqiq8Vdy9r2PueBbxNMzYs+BeMiOr7TsqyFNZpgaoaad1CSQbWDN77cm o0hS2Y0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzoAL-00AQzU-Il; Fri, 10 Jun 2022 23:35:45 +0000 Received: from mail-yw1-x114a.google.com ([2607:f8b0:4864:20::114a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzo9z-00AQmw-F3 for linux-arm-kernel@lists.infradead.org; Fri, 10 Jun 2022 23:35:24 +0000 Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-2fed274f3fbso5734037b3.17 for ; Fri, 10 Jun 2022 16:35:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=f2ez5GlPiz7LVHLEwJNPKLpo0vJP8RdxLafLiRUk5QE=; b=iKH4lvrLXdfTkbOBM3216qeAmFXUVCNZOl9l8BspQJ4rpqELSsOx/dvp5FBCJ61+MK Qe7z/u7qUuuWGvcZaS1+jt1dc9SzMwm80qJ0J1VDr3aegKpLxX1ggYXz7fKnk0418CTL Hg11Fttm16oJnUgS/diZT5zIRg78gDBu8cEmHV/k6ysToIhnQh8/a5fo2iNXz+i0UOED ZrFaKU0CtyasnLmWkqq51A0dCu18cBIr8KaX5AuBMPnp9I2mz6nPDlUFM5Qc9z6ADbKf ogKMQTsKq7Acbzw+8xLAP7paiSLqLT2pEIB3orxvzuNNtAd0JIyfUj2YyV+yP6FDGaWt j0wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=f2ez5GlPiz7LVHLEwJNPKLpo0vJP8RdxLafLiRUk5QE=; b=CnnjzEuBNKbLStP3nt4ZSHQozfYolyypfKQHz30ANsunMM1MqOqddfBCOGD3foWFi2 POuLQsF5PMhb23sH7Td3msxClbh9r/MTVHlzk7SFb9G9E8XMPAfPGT6ZX6xjlRqWUNZ6 UI1k7zV9dlyQ3QtdSoUon8JKrRWWQp8Lk1LwxBcK41oTLDGequTgOUsvMIR9tsOWnJV8 blvBKPaF3SioC44m3TMMiOwcMxC9M6JhKSJnDj4gPdobHrzZHROaaOCeoi/V5gEhCqsp 3mYwAZ/znACQ5i2t+O1JIDapYH0pWEIKhtjFiPpRyX0Ttr1C/Eb6vvM5WYwqSQPb2yHb 5+2Q== X-Gm-Message-State: AOAM533CoRc4e7es35rPVpZM3o6U2KdXk22A8oBkqtGBNwXXjRI9l0aD RRcpywYqc5k5VXFlNOB6ujQsh07d/ScWt57iAnk= X-Google-Smtp-Source: ABdhPJxz2IY87/Xw53sI2vfsQaG1YS1q3LumYXmYWqaHfb2HDYl+aHwo+eKjFDgc7azDGZJL0i2ozWPbeM/MCDDKFTg= X-Received: from samitolvanen1.mtv.corp.google.com ([2620:15c:201:2:f464:6db6:3d47:ed14]) (user=samitolvanen job=sendgmr) by 2002:a5b:48a:0:b0:663:7ee1:999c with SMTP id n10-20020a5b048a000000b006637ee1999cmr28580272ybp.544.1654904120569; Fri, 10 Jun 2022 16:35:20 -0700 (PDT) Date: Fri, 10 Jun 2022 16:34:55 -0700 In-Reply-To: <20220610233513.1798771-1-samitolvanen@google.com> Message-Id: <20220610233513.1798771-3-samitolvanen@google.com> Mime-Version: 1.0 References: <20220610233513.1798771-1-samitolvanen@google.com> X-Developer-Key: i=samitolvanen@google.com; a=openpgp; fpr=35CCFB63B283D6D3AEB783944CB5F6848BBC56EE X-Developer-Signature: v=1; a=openpgp-sha256; l=815; h=from:subject; bh=RS8kezem6HKmvIC2xkWx+Vimg14ewNmCZ/1rOo726vQ=; b=owEB7QES/pANAwAKAUy19oSLvFbuAcsmYgBio9Us0Qlk8N5JpvifNY7fxEcru1Y6AbEzteuzzSUX A+M8G4CJAbMEAAEKAB0WIQQ1zPtjsoPW0663g5RMtfaEi7xW7gUCYqPVLAAKCRBMtfaEi7xW7mNoC/ 9Hbp8Ou+VWLCKh26fDW3X/l+zpog1gX2cHWcbQLZjUDuBdoBOsMeJFZbAJr7gp6cyArykGxpWXjcmW QZbCeNOnrTVHXzY5St0+Ifo/59T9fIcUBwHKC/flaN5RQ7izb8+ogGYfeI0mrYTZepJuoaKaWTyBdf AUhLi/p2zg/xr8NCHPVxMqNF9nIItJ6JduJw5Sd+xAtbcd2Mbop0+QpzlZbA3nWRZ9xAFB0r7XV+hR mvFqbPwY7b1hFE1FacbEFByAEslu//mJzsZsmdZzd6Q+5sQGaHrELVyHMCjTnIXuj/UInbiKvwg2S2 km6wMZAsd4FFEv2beTZaMXkrEessphESu0M7O9miUDxCjaG/tqzp3LbULs8sVrgKSm/xM6g8z6Igt8 WQM7NtLXMg5SQneP0oKyLpzfCIXMiHsKuP37sWAozocaYzsdNSvKjqRAvThxlQoF8NQK+tJXYdKFPZ yV5EBSBWBhAlN8S0DBn0q2ESKwRkuy6Hjtig2SpJDvcPE= X-Mailer: git-send-email 2.36.1.476.g0c4daa206d-goog Subject: [RFC PATCH v3 02/20] scripts/kallsyms: Ignore __kcfi_typeid_ From: Sami Tolvanen To: linux-kernel@vger.kernel.org Cc: Kees Cook , Josh Poimboeuf , Peter Zijlstra , x86@kernel.org, Catalin Marinas , Will Deacon , Mark Rutland , Nathan Chancellor , Nick Desaulniers , Joao Moreira , Sedat Dilek , Steven Rostedt , linux-hardening@vger.kernel.org, linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev, Sami Tolvanen X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220610_163523_559299_E1633210 X-CRM114-Status: GOOD ( 10.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The compiler generates __kcfi_typeid_ symbols for annotating assembly functions with type information. These are constants that can be referenced in assembly code and are resolved by the linker. Ignore them in kallsyms. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook --- scripts/kallsyms.c | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index f18e6dfc68c5..ccdf0c897f31 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -119,6 +119,7 @@ static bool is_ignored_symbol(const char *name, char type) "__ThumbV7PILongThunk_", "__LA25Thunk_", /* mips lld */ "__microLA25Thunk_", + "__kcfi_typeid_", /* CFI type identifiers */ NULL };