From patchwork Wed Oct 19 08:24:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5281 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp280656wrs; Wed, 19 Oct 2022 05:01:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7vBS0hI09xzuvBtQCe70K0YPjYSTpHfBfYzkPjvxmqUVTT63xeLPzHL0BJoXysOn7CNZ2P X-Received: by 2002:a05:6402:3988:b0:44e:6f08:ddfb with SMTP id fk8-20020a056402398800b0044e6f08ddfbmr7031370edb.89.1666180864282; Wed, 19 Oct 2022 05:01:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666180864; cv=none; d=google.com; s=arc-20160816; b=t78WG3gbsn4Wr+4IaPz5yWduW9bw4Zs2/SUyYLpZlJHgAp7MkLDh3aizdXz95eyoY+ ii9COtDsc+byq8jyv38SBoDlzOlNPiZKzxaxnmwoKiIi8zLuhlvPS2fWja/sHadLSWQ2 1b5jN0nQeSj6TLnxw3aRNEQb0f76c/LuH5SGfZ6NBGLhlv6ktm1AVKQvBQM4h7rXEa9U Y96qMHSTOBG2zKtYlqcpQl2Q5A9tlhrgi+nVmVYH1HDbobc3zgpr/GD+4GVm3gckK3kC 7EweRcQgVLFAfswPXD++yZw8vNszlp+gC7+o2cwECvsh983vEuNjNt/fOTBUwZYDKYfB cyGw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xVE8kQqQtuO28KXUog8xwzeHNINe1Pj7pNVJqOjmbpQ=; b=Ii69Sge7+x4A/XWWYnS8gYre3gM+ObRydj13T+1Rs/o5dKi21uKuW1QFPV23XA2RR2 ti6CSnknkHmI8fz69+Ysl81LiCQ4r56XXzVKYeC11qzcy60d+tRJBDb2SS8BIPhu1NZ2 aDdnofKwAYdQ7VZCB+nIcNVkTO624fUXzlSs0ug+cAivtrR/3AuGwVRmtUNfQyG7mJjm l1rT2GZbyDlIMgCXKsKFDh1d28n+ZbhMpD6ERnHzmNOZHnC5UR0d+4IkDIURw3Sp1RKT 488K3NEgNGzX+72yqKaEYwX85dlDGIRfAShV2hPpthO1BTwV9hB08BdNoraQLAZ7SWk4 5aGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AK+C1YqZ; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m15-20020a056402050f00b00457fc1bcf12si12534626edv.183.2022.10.19.05.00.38; Wed, 19 Oct 2022 05:01:04 -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=@linuxfoundation.org header.s=korg header.b=AK+C1YqZ; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231657AbiJSLyZ (ORCPT + 99 others); Wed, 19 Oct 2022 07:54:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231867AbiJSLxu (ORCPT ); Wed, 19 Oct 2022 07:53:50 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6474624BD3; Wed, 19 Oct 2022 04:32:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8EC79B822F0; Wed, 19 Oct 2022 08:46:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F33E0C433B5; Wed, 19 Oct 2022 08:46:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169207; bh=w7qwQBLy+nCzJ16X8E1IqSPvcC1H6D9kimjmDJhC2Hc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AK+C1YqZgnMT2/+V84zyk+A3OSVEYfzdCwoaP3CJewYRrODcVSdKmOPZG4xlvsivd 49xbPxIGMkdzBIvCdhIiJkB5bi7mmro/DqsKAaigsVP6M4WoesT8W4lRbY13Q4HpQG N6gh13cotZO4NrCy34b25Nj8NsLQ07GPea9EONCg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ingo Molnar , Tom Zanussi , Linyu Yuan , "Masami Hiramatsu (Google)" , Tao Chen , "Steven Rostedt (Google)" Subject: [PATCH 6.0 157/862] tracing/eprobe: Fix alloc event dir failed when event name no set Date: Wed, 19 Oct 2022 10:24:04 +0200 Message-Id: <20221019083256.907955488@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747117265710888019?= X-GMAIL-MSGID: =?utf-8?q?1747117265710888019?= From: Tao Chen commit dc399adecd4e2826868e5d116a58e33071b18346 upstream. The event dir will alloc failed when event name no set, using the command: "echo "e:esys/ syscalls/sys_enter_openat file=\$filename:string" >> dynamic_events" It seems that dir name="syscalls/sys_enter_openat" is not allowed in debugfs. So just use the "sys_enter_openat" as the event name. Link: https://lkml.kernel.org/r/1664028814-45923-1-git-send-email-chentao.kernel@linux.alibaba.com Cc: Ingo Molnar Cc: Tom Zanussi Cc: Linyu Yuan Cc: Tao Chen Signed-off-by: Tao Chen Signed-off-by: Steven Rostedt (Google) Signed-off-by: Greg Kroah-Hartman --- kernel/trace/trace_eprobe.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/kernel/trace/trace_eprobe.c +++ b/kernel/trace/trace_eprobe.c @@ -968,8 +968,7 @@ static int __trace_eprobe_create(int arg } if (!event) { - strscpy(buf1, argv[1], MAX_EVENT_NAME_LEN); - sanitize_event_name(buf1); + strscpy(buf1, sys_event, MAX_EVENT_NAME_LEN); event = buf1; }