Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp588237pxb; Wed, 27 Jan 2021 16:00:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJyREo0DPWsX61uY+KFOyHOnVW+AdILgG7MZMxZADSGwcUpXq3x3uTYH8Eb9l9K0ckN4PJlG X-Received: by 2002:aa7:cf90:: with SMTP id z16mr11359918edx.218.1611792025722; Wed, 27 Jan 2021 16:00:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611792025; cv=none; d=google.com; s=arc-20160816; b=ou/1946OZb62W2FeDg8ptk/F14UPJaAz7seA0ihyQuz1s+3S0sBGlu4qsTh2dC0LcG 0kDuJ81Szzc+s/dnkId9dicY1aXZVIsh7cUgIl7lNHqvCzG4GANKNhR+I2vBpAfQ0sAl nWRw2vBj2Ya3nJc48IT/dJdqIRxAycb7YEXWv4b8NsVXa94rScQ9HuKvljp8bG/nEpl8 b3Q2MhOpOkQVjkbZdSu7KnnpKMBx1ucX7WJ21Tmro9ujoMhP87kjEhaQxeKsxvF4wOsg rhC0PMLoerSs0omy9yLxJf0Ut6A7lHkM3ELywbsDh01Ka7YiXs+6rAcwPm+sfOM1itsr AE/g== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=Lgo7pQ0auPjToU06zx/MpYdwKooDzVgpSxm2F6XCdyI=; b=kH79Oe08r7Fbuobv+Nl6pO4x7C2tWzsSlvVYsoIgm+acrGGFqRmDNn9g7bT2hd3bfy ZMFTxkrE1apA2vscaynrJxvnjNExc80N4lugbtZo5FkusQC/OS/qUwGzvGrhg+QgXCFC hAVKYzQAaaEThIkxGCFTUGz6aMvRSClg/2BionvtwxvMmPuYEZQPe2Yb36pOTifO4tRI JgtfNZ3sUAzO9GYE48mnxj/yWlltBSz976+PTBSGgIR+EUOjYzMpjcinOeRdz6A3x9VH 8Oj8fVtlZQEj2U3ptQuglJ1V8vTYf/LXnhtPCmMXlSI3RJ3oqVB6xdn/F96vs4qdYEHK El2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lm1si1533273ejb.28.2021.01.27.16.00.01; Wed, 27 Jan 2021 16:00:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234186AbhA0Ocd (ORCPT + 99 others); Wed, 27 Jan 2021 09:32:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:44286 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231733AbhA0Obc (ORCPT ); Wed, 27 Jan 2021 09:31:32 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F0B8B207C8; Wed, 27 Jan 2021 14:30:49 +0000 (UTC) Date: Wed, 27 Jan 2021 09:30:48 -0500 From: Steven Rostedt To: Alexey Kardashevskiy Cc: Alexei Starovoitov , LKML , Mathieu Desnoyers , Matt Mullins , paulmck , Ingo Molnar , Alexei Starovoitov , Daniel Borkmann , Dmitry Vyukov , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , John Fastabend , KP Singh , netdev , bpf , Kees Cook , Peter Zijlstra , Josh Poimboeuf Subject: Re: [PATCH v2] tracepoint: Do not fail unregistering a probe due to memory allocation Message-ID: <20210127093048.46a6c4eb@gandalf.local.home> In-Reply-To: <5ca3fcc1-b8fb-546e-5e75-3684efb19a6f@ozlabs.ru> References: <20201117211836.54acaef2@oasis.local.home> <20201118074609.20fdf9c4@gandalf.local.home> <5ca3fcc1-b8fb-546e-5e75-3684efb19a6f@ozlabs.ru> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 27 Jan 2021 18:08:34 +1100 Alexey Kardashevskiy wrote: > > I am running syzkaller and the kernel keeps crashing in > __traceiter_##_name. This patch makes these crashes happen lot less I have another solution to the above issue. But I'm now concerned with what you write below. > often (and so did the v1) but the kernel still crashes (examples below > but the common thing is that they crash in tracepoints). Disasm points > to __DO_TRACE_CALL(name) and this fixes it: > > ======================== > --- a/include/linux/tracepoint.h > +++ b/include/linux/tracepoint.h > @@ -313,6 +313,7 @@ static inline struct tracepoint > *tracepoint_ptr_deref(tracepoint_ptr_t *p) > \ > it_func_ptr = \ > > rcu_dereference_raw((&__tracepoint_##_name)->funcs); \ > + if (it_func_ptr) \ Looking at v2 of the patch, I found a bug that could make this happen. I'm looking at doing something else that doesn't affect the fast path nor does it bloat the kernel more than necessary. I'll see if I can get that patch out today. Thanks for the report. -- Steve