Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp608893imu; Tue, 27 Nov 2018 18:21:31 -0800 (PST) X-Google-Smtp-Source: AFSGD/WZPJiS5wLMGZVT/fzIpdDP3nxZl8qyYPSlvrOrWFSQGHzhWpFCmkS1rcVqwPMS0osUbL1P X-Received: by 2002:a63:9d05:: with SMTP id i5mr21269714pgd.98.1543371691385; Tue, 27 Nov 2018 18:21:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543371691; cv=none; d=google.com; s=arc-20160816; b=nTWmOMjWZyp/9JJCbZbDMZLJGlH/JEZkoIIXvvIKyYpnkE2zsdHrkGQJNf59mtlzgf XVnR99hKxr75VfHFHsV0VYl3+9VBLZMU610XS3JCzG3IBVXxM9Yd+BNiSb7lcUPI/cG6 Z2by7X4nF+eYJMsmZ73gslKRz3SiVOk/EHFKjjKxhNamB+o9+VQvzxH+jbpS9rhZfCPC pxb8oNzRGqlXkfU5ZA5+Zpfuc6CtNnDO7Hloxlua9FxL4UVTqgdD8jqbcKquelxJiW0l oTJQYUEDKYqcRZ+lRMLeb1Qfh+z5TGaOUUD28DJpwuGj+37vrWk+61opGecA9TLnVIeX H4xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ygFlCY1EQpTTfCFFv8LTZ5QyMxMd89kHU6qEZaPqi1A=; b=BVwYUjnmLS7sMoam7Ov9iGPHhapISbCOjfxS4DjI4a1JExpWoAqX0I1gmwxbiAhNGp f0ITomHyZX6K3TKVDP3Zo/X3eDW3oO7iZH27v8+gBbGZDSOifFuvbb9IuHodgT5FKzmw kqQJVAz9iGWF5RfYjfjrBfA3b1rm4u9EpAVy3RlEifUpMrL1TKUAr6T6ZrhY27BV79/G WKzhHjCo2AklG78RdyeF4za6JRSuc4720tJWEnEkVUoBKCbjwNPNnnkG4qlLjTvaKBVL CPaH8kRw1V/VMd4Cb+5Qsq/nrpr12qTJAzk/724Y+losRKKZiYoiZLxRv5bmRNoXqtw6 gP0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="WpI/rw0F"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h6si5693150plk.231.2018.11.27.18.21.16; Tue, 27 Nov 2018 18:21:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="WpI/rw0F"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727071AbeK1NTW (ORCPT + 99 others); Wed, 28 Nov 2018 08:19:22 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:33496 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726911AbeK1NTV (ORCPT ); Wed, 28 Nov 2018 08:19:21 -0500 Received: by mail-lj1-f193.google.com with SMTP id v1-v6so21992812ljd.0 for ; Tue, 27 Nov 2018 18:19:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ygFlCY1EQpTTfCFFv8LTZ5QyMxMd89kHU6qEZaPqi1A=; b=WpI/rw0Fyip2/q73U7FELXA7tHr7FPLNI03UKWn9KOx7yYFbEk/NL5+w1lqWQua8D/ kGcyMDWOsLERMy0YMZc6Yj1W2Hk3HzDlsQWf+en8AlAq8Bb+15XhVuMmCkfnwXBIh0/P zjDx4yu9PHoc9z0+0gydgaX7ctDhvAAJvh52M= 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:content-transfer-encoding; bh=ygFlCY1EQpTTfCFFv8LTZ5QyMxMd89kHU6qEZaPqi1A=; b=RHxBssaliI7/0AxQK2BDfV7BVITzEW5Rf3n2+Jy8SgsZkZbvlyOyndx5pV9AukB1cr oFNK/D9iJwx+G4TVhsk8S5v/HJ5higrojj/pzb7qlZwC6FisDpsqdA+KFlIUAqLaEQ5N oxInZLHimb0cXefECcnxf7/SbitPG1LUlKEFyLNMIGwknNZtrvp8UPO+WkUyBw0E6ewi zRpJQhDyXhJqsBxjU3B5vf/mR5zFjp9X1qFNh8A7Ce0RAuPO8JsEGPrJTU5hDn8rEKgv 6Ph4fuT2N9UCCyGf6QanEeNLTHkbplbaD68BcTM7TStmel4KXjoihhZKtBljXV4PlIDq q7rw== X-Gm-Message-State: AA+aEWY4PqDcOgGx1rT8Juk2lccUy8vbgIVHMC8kPquzWFPspqwpJg1K tQBghfK2IaMj4Dm8hr/aU6SanLwMr4hzzL5TYu5SUA== X-Received: by 2002:a2e:6594:: with SMTP id e20-v6mr23264247ljf.123.1543371565318; Tue, 27 Nov 2018 18:19:25 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Naresh Kamboju Date: Wed, 28 Nov 2018 07:49:13 +0530 Message-ID: Subject: Re: File not found: /sys/kernel/debug/tracing/events/syscalls To: Masami Hiramatsu Cc: open list , rostedt@goodmis.org, mingo@redhat.com, mhiramat@kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Masami San, Thanks for the patch it solved the problem. On Tue, 27 Nov 2018 at 21:41, Masami Hiramatsu wrote: > > Hi, > > I found that the commit 4378a7d4be30 ("arm64: implement syscall > wrappers") changed > the syscall wrapper function names by adding __arm64_ prefix. So arm64 > kernel should > have its own arch_syscall_match_sym_name(). arm64: ftrace: Fix to enable syscall events on arm64 From: Masami Hiramatsu Since commit 4378a7d4be30 ("arm64: implement syscall wrappers") introduced "__arm64_" prefix to all syscall wrapper symbols in sys_call_table, syscall tracer can not find corresponding metadata from syscall name. In the result, we have no syscall ftrace events on arm64 kernel, and some bpf testcases are failed on arm64. To fix this issue, this introduces custom arch_syscall_match_sym_name() which skips first 8 bytes when comparing the syscall and symbol names. Fixes: 4378a7d4be30 ("arm64: implement syscall wrappers") Signed-off-by: Masami Hiramatsu Reported-by: Naresh Kamboju Tested-by: Naresh Kamboju --- arch/arm64/include/asm/ftrace.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm64/include/asm/ftrace.h b/arch/arm64/include/asm/ftrac= e.h index caa955f10e19..a710f79db442 100644 --- a/arch/arm64/include/asm/ftrace.h +++ b/arch/arm64/include/asm/ftrace.h @@ -56,6 +56,15 @@ static inline bool arch_trace_is_compat_syscall(struct pt_regs *regs) { return is_compat_task(); } + +#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME + +static inline bool arch_syscall_match_sym_name(const char *sym, + const char *name) +{ + /* Since all syscall functions have __arm64_ prefix, we must skip it */ + return !strcmp(sym + 8, name); +} #endif /* ifndef __ASSEMBLY__ */ #endif /* __ASM_FTRACE_H */ > > Thank you, > > 2018=E5=B9=B411=E6=9C=8828=E6=97=A5(=E6=B0=B4) 0:22 Naresh Kamboju : > > > > While debugging the selftests/bpf: get_cgroup_id_user test failure on a= rm64 > > where the test is expecting trace file > > /sys/kernel/debug/tracing/events/syscalls/sys_enter_nanosleep/id > > but this path not enabled after enabling required kernel configuration = also. > > CONFIG_FTRACE_SYSCALLS=3Dy > > > > strace output: > > open(\"/sys/kernel/debug/tracing/events/syscalls/sys_enter_nanosleep/id= \", > > O_RDONLY) =3D -1 ENOENT (No such file or directory) > > > > This problem noticed on Linux mainline kernel version 4.20.0-rc3. > > > > Best regards > > Naresh Kamboju > > > > -- > Masami Hiramatsu