Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp21492024rwd; Thu, 29 Jun 2023 17:24:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlHaNfmtfRtq6xuy6eUwXp+4FFzwAUpiiDA/3rlLfBibpqI8czef7Y3R0nFyj3zYbQQCSXTm X-Received: by 2002:a17:902:b404:b0:1b8:4607:c3d7 with SMTP id x4-20020a170902b40400b001b84607c3d7mr621848plr.41.1688084672613; Thu, 29 Jun 2023 17:24:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688084672; cv=none; d=google.com; s=arc-20160816; b=l7ubVf55OETtOglIKSGKb1H3ff8T0v5v3bazkqdu1W+sq8BxqkyIvwI6e+35QQNtlM HhsQXDkXPLXHDlNVk5B/JJFu2jRPK/Cg47oMT6Hjomw3Slt28wP4R2FJ8UUKcnA2wyXL 2BAmn6p1PzPye5eGvOFnggA7kNonIPECebg0HJJkzh4fCIQ+YywH/4HwcDfSNHup8ORr egv83AvTEqyp7PWk7woCohR1H8EmE9Pn0KPW/eLPFTJUY+Pv2rZjB+XKVkcoGwBfdinH 0P7174uW78k89pnDXs82JQLGeL/u/x3FteO0EwIcFffxOvr903pF5knL3lBofJ3BQRQk jKhQ== 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:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=5Xnc4kEY4EbaBnYfn4j7l+LmuswSwMsWgqgbgeywLsM=; fh=/LjJBqwDCI+CjB/GmW2IdnTfBsdKoHfwRpT4gTGTja0=; b=lbKK0qGuYoZvEqHZc7xiNpVdPAoumleN3aiX5rS2vTPQrqL9Kh3jfuKIbMTWf9/WEj DTfeWV8Dw0RgVcMyObHhO3q6wiUGPkMiSTeHuOE4/JiU+99K1pWolFu7lyGaLWDbpfPB 8cIARpeGfwgRbVQbojIMDUG8oFfcSWKQsGQmKQbP1ocoHuTA5rLgPez6t0bhik36RLkr lp++ilpWD1vNpGHJtzAu3wCVXcHRGShN7RtgAZDWMd0r7uxykca1ngyuNHP/LI9kCqeV wCUlcCcdbEJahn9nlFbGl9nuA1zRESmwMq6eTLilaExyz2yks1fu8MNh1rd51q2ueM3F pBaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=kp2ERfWq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d6-20020a170902728600b001b67388ee42si10942852pll.490.2023.06.29.17.24.20; Thu, 29 Jun 2023 17:24:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=kp2ERfWq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S232006AbjF2XnI (ORCPT + 99 others); Thu, 29 Jun 2023 19:43:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231886AbjF2Xm4 (ORCPT ); Thu, 29 Jun 2023 19:42:56 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE7602D55 for ; Thu, 29 Jun 2023 16:42:55 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-c118efd0c3cso1081688276.0 for ; Thu, 29 Jun 2023 16:42:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1688082175; x=1690674175; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=5Xnc4kEY4EbaBnYfn4j7l+LmuswSwMsWgqgbgeywLsM=; b=kp2ERfWqnMk1aYCcY3Lh5Z6gm14ZJ3i2mXlb/00TiljzMsnxeQFs5kbVGLwdlHdXWH 1Pr+W0hxAGlZuFtJ34Gw8FWCTQKcdth2yYQ4kpxbIRDw+N4gAfjsiMTV7jzpomXHcLTS 0kT2wDspmdW0ky6LKXOjJbvqFbwXOfI+Uqy9S8KBiTg+C/CpcRA4cNvS8TaL+WBXZhiJ gqG0bbHz3u6ZHweyCgmLfplLh+OdA+qcH5DUy3t0ecNfXfQIxRtzjJjc8ialYxW+YbE9 hNIbzRRmtDZvI0K4dsHoLvVVFESxxWxy+57P+dee5eOgXSh7DXoAPg7ADh/35TMj2lK4 3t9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688082175; x=1690674175; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5Xnc4kEY4EbaBnYfn4j7l+LmuswSwMsWgqgbgeywLsM=; b=mGQafSENtUyDg44/AfOBCLh5vfgyQTb4pFlSQRLdtxPnn93nwH543ox3gbdvPtKl8M sJvZusj/lKppeQYdtRRPHMoWfE6BQSPLoRdTRm2LpWC3ULcdKlXELcuum3mfWwSEt1y1 4wGVCUNt3zdbzF5iCGT6AgFlzYyeEEbNWOCp61DerfLnSVtOPYjiZRNuZixq2tZ2HoaL tChiycV8xcmMOD/3/I1iXAbmiBh/Lfx0vdFiJzYkDsrEboq8NGAJGq9OILGPwuy4d03y 8CPH8VVwWHfwN0/nOyEziHKY8BgyxyE/Pe6kGg1eLoJtRTDlohfwK8ujcwH8jPENLulB hEnA== X-Gm-Message-State: ABy/qLbsjqZC6lFPGzy8YIViVK0yon91QCewKYaPpHUvevZBxqzRNsPx mxQEhXo2t7sEthKHke0OnjC7koAa48UcO1eY4X8= X-Received: from samitolvanen.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:4f92]) (user=samitolvanen job=sendgmr) by 2002:a25:3f44:0:b0:c39:4e0b:2f05 with SMTP id m65-20020a253f44000000b00c394e0b2f05mr7310yba.6.1688082175113; Thu, 29 Jun 2023 16:42:55 -0700 (PDT) Date: Thu, 29 Jun 2023 23:42:48 +0000 In-Reply-To: <20230629234244.1752366-8-samitolvanen@google.com> Mime-Version: 1.0 References: <20230629234244.1752366-8-samitolvanen@google.com> X-Developer-Key: i=samitolvanen@google.com; a=openpgp; fpr=35CCFB63B283D6D3AEB783944CB5F6848BBC56EE X-Developer-Signature: v=1; a=openpgp-sha256; l=879; i=samitolvanen@google.com; h=from:subject; bh=jTMsDVHp3vLP+kp6kYa8Yt2xhzF3g8PflLJEr5zwipc=; b=owEB7QES/pANAwAKAUy19oSLvFbuAcsmYgBknhb19IaK8IPSrcbSiqkp1zwKDFD22eRwAN9KJ 9YK7ujl6kKJAbMEAAEKAB0WIQQ1zPtjsoPW0663g5RMtfaEi7xW7gUCZJ4W9QAKCRBMtfaEi7xW 7hKeC/9phxEf9/+dB3hfrEFRxhxmmCZAlHL7B2GBUkQCOpdHg2ck1MABWcoko419h0tlSz45RPv IyV9eudwY59txN8eLDO2Lh+KuGtj/I/xL9yy+6j71mkvxiRbmFzuLHv/QwdBqbMDOUZdK9LNjwC hjDZ12Mk+tdQ2pAfhWRG7oI2pvSd76+bgvv5glho5QYig7FnKmOdl6Lly7gAjjaP/bsB2ESWl/f 5wZ6tCp/E/iOu6m6yF4LBt0RObJUIyuvpYsPmObRxGFVZVAQkogHlMGdi0l0XVwpHY2xcKqzusS HhpVp8d4J/FreeR1zKHdC3oJqbkgtBa0poSZnm9iOzOtdaMNnRRYqf5ih9YbDcrim2hjDQGfTZc iaP32nHcDEaHWHNpHRw0gEionM52PXSz8IxY4GPajiUthGRen5n5T/2UzAho1Odw6xFE36Kvd3/ ayJR/eygigxaJNCGU8rkS9ho97aA+Ng4gci+jDMa+FPMitZDgr6U1fYKqpHrXzUK/jUjA= X-Mailer: git-send-email 2.41.0.255.g8b1d071c50-goog Message-ID: <20230629234244.1752366-11-samitolvanen@google.com> Subject: [PATCH 3/6] riscv: Add ftrace_stub_graph From: Sami Tolvanen To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Kees Cook Cc: Nathan Chancellor , Nick Desaulniers , linux-riscv@lists.infradead.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org, Sami Tolvanen Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 883bbbffa5a4 ("ftrace,kcfi: Separate ftrace_stub() and ftrace_stub_graph()") added a separate ftrace_stub_graph function for CFI_CLANG. Add the stub to fix FUNCTION_GRAPH_TRACER compatibility with CFI. Signed-off-by: Sami Tolvanen --- arch/riscv/kernel/mcount.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/riscv/kernel/mcount.S b/arch/riscv/kernel/mcount.S index 712c1d2c2723..c73d7514e45f 100644 --- a/arch/riscv/kernel/mcount.S +++ b/arch/riscv/kernel/mcount.S @@ -57,6 +57,10 @@ SYM_TYPED_FUNC_START(ftrace_stub) SYM_FUNC_END(ftrace_stub) #ifdef CONFIG_FUNCTION_GRAPH_TRACER +SYM_TYPED_FUNC_START(ftrace_stub_graph) + ret +SYM_FUNC_END(ftrace_stub_graph) + ENTRY(return_to_handler) /* * On implementing the frame point test, the ideal way is to compare the -- 2.41.0.255.g8b1d071c50-goog