From patchwork Tue Nov 8 01:51:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shang XiaoJing X-Patchwork-Id: 1304 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2429335wru; Mon, 7 Nov 2022 18:12:41 -0800 (PST) X-Google-Smtp-Source: AMsMyM7WAcDr/NXIGWH2OK1XhL8+b4yKwyTOvLN4ITalrugSagMvcYeEapiDGAwrN91JWyqjW25W X-Received: by 2002:a17:907:3e02:b0:782:1267:f2c8 with SMTP id hp2-20020a1709073e0200b007821267f2c8mr49786143ejc.585.1667873561198; Mon, 07 Nov 2022 18:12:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667873561; cv=none; d=google.com; s=arc-20160816; b=C+Yj0OXwnZ3+ARJsdp6Q1O7unxsvlmE3hjH8yW+NHYgvCWIc5ava1WYW7lvMm2aaxG dRm7joL5fy5iD0/WP0+VBZ3KOfTdcYjkCwSaAK4bXF9kofQQQP8N/8twQQpV3+vRe/Vr 8JxJsknoeh/IRZ0z+94egICTNZ50M8YemVwSpMZXWhVRhugpZZnYbaIZKGnzmiWEDxXI ywE820MsGqDfEyBhgkq3k+AYTzCJSKjpScaJjz4tXZwhV7NeGavdx/jx/tV50AyzE0+4 fB3eXB6U6uB0ykI8AcatHd3TH6RSa3mNgfgYGO34+E3YyFQss3DtH/O66RZfjZa9JYAD jBtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=xI3WsoPUQaVr2RThy8goS0sKr6BDp2h6TMOo9XZ828Y=; b=OtqSbUPrfjx82TSc+GBVTzQvT0h69sR4uco7ougT7z5SVtcU+evfkHgFtF92/2EvKX 57PRhCqhQbZ7DQxrA6/syrjBO0sj4O/6KOD3xw68dQYUD3GSNH/E8c4xunUzgFoYsFxj gW6rxTXpwfGCLLvrn3eXt0SDpIPoqDDgmZmbPJl+/jmIaCzk495VsTNuehXmDW4BqZ9l myTTuW1BEhfFTWi9s/xUR/kKCB68TEwCJ3sDRgnTvMilPq/LQjuh1UpA45bTBlZXhbwH a7d8hr0uMEamvDyAHSUGeRzHmfhoQtZyAPCpZWlAUtEiXVfNs0F51kLxvQfWHJL2LnHg ol5w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p13-20020a05640210cd00b00460c36e09b6si9673974edu.431.2022.11.07.18.12.17; Mon, 07 Nov 2022 18:12:41 -0800 (PST) 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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233480AbiKHBwx (ORCPT + 99 others); Mon, 7 Nov 2022 20:52:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229485AbiKHBwv (ORCPT ); Mon, 7 Nov 2022 20:52:51 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B6981DF18 for ; Mon, 7 Nov 2022 17:52:51 -0800 (PST) Received: from kwepemi500016.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4N5rhP6l4DzmVkS; Tue, 8 Nov 2022 09:52:37 +0800 (CST) Received: from huawei.com (10.175.100.227) by kwepemi500016.china.huawei.com (7.221.188.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 8 Nov 2022 09:52:48 +0800 From: Shang XiaoJing To: , , , CC: Subject: [PATCH v2 0/2] tracing: kprobe: Fix some bug in kprobe_event_gen_test.c Date: Tue, 8 Nov 2022 09:51:28 +0800 Message-ID: <20221108015130.28326-1-shangxiaojing@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.175.100.227] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemi500016.china.huawei.com (7.221.188.220) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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?1748892187339159572?= X-GMAIL-MSGID: =?utf-8?q?1748892187339159572?= Due to lack of the checking and setting-NULL on pointer, there are some null pointer dereference or page fault bugs were found when insert module, and fixed by this patch set. --- changes in v2: - add cc tag. - improvement on patch 2. Shang XiaoJing (2): tracing: kprobe: Fix potential null-ptr-deref on trace_event_file in kprobe_event_gen_test_exit() tracing: kprobe: Fix potential null-ptr-deref on trace_array in kprobe_event_gen_test_exit() kernel/trace/kprobe_event_gen_test.c | 48 ++++++++++++++++++---------- 1 file changed, 32 insertions(+), 16 deletions(-)