Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2400363rdb; Tue, 3 Oct 2023 22:56:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFiX38QoB/mNRxcCTMACHeLOeUALvppIrpr2es1XCp+FsyDu7JFGUPz2RbI3L7AacCa3eP/ X-Received: by 2002:a05:6808:f07:b0:3ab:8431:8037 with SMTP id m7-20020a0568080f0700b003ab84318037mr2049266oiw.32.1696398988415; Tue, 03 Oct 2023 22:56:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696398988; cv=none; d=google.com; s=arc-20160816; b=I2gqghG54ZMoM/rGMyUPonWo91OLEUi+UqqauxPcPopOvsTLUSeTA59G/OJf6KPHSM 4oOLzF9INZ4AgEsvc7VNy9GQDw4Jomg6svW2IgCI4d4CMGpOTafnG7c5V1zang11b622 aUcz+OsGDLGRdBWuc2jA3E+CIXBvqAHYZbhdvFtO+qDCXD38cKSq0JjZjSP6KE3T6Qxd vD3KxN6Er3zSsFagxA5Pd9/xKn24DebtPG0PLKt4NOPvRfCkbSXiiX4h2xAjFODIzAee HBbamz0WrKYMbjOkRYFvUia0iklrQRhIeEClk1KMGh4JNywVvigk2f2qvPLmCX331ii2 sZOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=ssPARn68NgZDptbx2mvFf6HZm3RGCbrKiLLObwEzL6k=; fh=XkWYc3OW15CIjqYZQwSgk5dekSKLiDhDsoYeimKkJbs=; b=lJikeR0I4c3Ac6wuxs4nTLOgCCtFy5mSQVrnpHfOYuAfEdlX2xg5vlFdCLlyF3g7hp rtbgrw1WfCA6ZccnbunwlalXcCrAScF9POFc9OcZcZdu9N2h/Hj8D8IMJGAM4/byYd16 nYkKry5af8LO9YGPW2S4YMl6dU8P1aZ6QpvoW/1xsAgCJbF2CxGKKZkmkY0Uvud354Ep qRb/0TdORiRKwOw7t6a+VkTatEEMTtDaXanm/u5QYdneWRjHWXg24ZiBvmfC1gk12ppD gM8PpD8Ui9E/QBrnG5d6DDvknn+ACsw2qFFnvAmSh6QP/mZ51EUw5M6iZxoPW99l9vE5 lq0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cfb7ppcD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id m22-20020a637116000000b00578d78f2a70si3220586pgc.388.2023.10.03.22.56.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 22:56:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cfb7ppcD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 80D8980C4D6B; Tue, 3 Oct 2023 22:56:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232719AbjJDF4B (ORCPT + 99 others); Wed, 4 Oct 2023 01:56:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbjJDFz7 (ORCPT ); Wed, 4 Oct 2023 01:55:59 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96A8BAD for ; Tue, 3 Oct 2023 22:55:53 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2F41C433C7; Wed, 4 Oct 2023 05:55:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696398953; bh=ssPARn68NgZDptbx2mvFf6HZm3RGCbrKiLLObwEzL6k=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=cfb7ppcDmUlLaFFSKE4IQKv/be6tMpKFfECXmye5RC4kDTwlvkn4oIqiX6iAVNIxn yEfyicZRlqC3jadXNqUBaTa4HiaqekF2w/VI6dWbCCmaB3/Z/ymmAY7PwDb+8FGr3P V0xNYXYja95n/PyMqGZrkwiGJ0EJ1aGes4ewYNYR3SESSpnsPmR74609h2uwIwYq6h 9GmlBsUOtLVAwVGBnGMskAvIUuPw1ixj6mDkFmHDlpfcarITey7MZXJale6rKGYvjt EZs8Uz2gjGlI+UjcK1Pz4Z9o7xTzSSG7EyAHnKwk1Z0USVLpmQGDwLTbDyvqzSoN+C 3NVQ1KnszEb+w== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: Alexandre Ghiti , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Sami Tolvanen , Kees Cook , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Cc: Alexandre Ghiti Subject: Re: [PATCH -fixes] riscv: Fix ftrace syscall handling which are now prefixed with __riscv_ In-Reply-To: <20231003182407.32198-1-alexghiti@rivosinc.com> References: <20231003182407.32198-1-alexghiti@rivosinc.com> Date: Wed, 04 Oct 2023 07:55:50 +0200 Message-ID: <87r0mb3p95.fsf@all.your.base.are.belong.to.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 03 Oct 2023 22:56:27 -0700 (PDT) Alexandre Ghiti writes: > ftrace creates entries for each syscall in the tracefs but has failed > since commit 08d0ce30e0e4 ("riscv: Implement syscall wrappers") which > prefixes all riscv syscalls with __riscv_. > > So fix this by implementing arch_syscall_match_sym_name() which allows us > to ignore this prefix. > > And also ignore compat syscalls like x86/arm64 by implementing > arch_trace_is_compat_syscall(). > > Fixes: 08d0ce30e0e4 ("riscv: Implement syscall wrappers") > Signed-off-by: Alexandre Ghiti This fix does the BPF test suite happier! Tested-by: Bj=C3=B6rn T=C3=B6pel