Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp289078rdb; Mon, 14 Aug 2023 17:41:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IERa7NvODspxUAfy1ffxZ+vZZYsAjBriUA81fZZImFi1QwY3MEVKI4OLXX0LLHQvTwvaF9t X-Received: by 2002:a05:6a00:2d2a:b0:67f:830f:b809 with SMTP id fa42-20020a056a002d2a00b0067f830fb809mr663700pfb.3.1692060089396; Mon, 14 Aug 2023 17:41:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692060089; cv=none; d=google.com; s=arc-20160816; b=vzPwW2ijusw35AuwpNZlGk8JToz0L8VZyr8W7LZNbtDKC4WOyr9hamLUQmMBl5AW8I b7DxIIhWtNztelGKRcNOrVCC7wKx2tI+1batLIi28+fwO0oimaqrbQZIu7r6N4tSsMrQ VhH6O4sFD1IuLg55wRspFegM7A9eVuROxM6WUSuOU+EZAu6hHCmBAn1WF4QTMEniyUJQ c8Rb0rovkbOC/1bF202ymw4PFKNS/CcyBLtqYtFRDn2+xqA3TzNwN7tpr3JegwrQzZob LO6lcPDTVq5jQqogNzF4KQv0UsTMyRisJOe8i7t3yKQigVmfElitLes60UompEbtK8mQ YMvg== 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=GriZSFRpJw+aL7LOpfEwHmDW6u4NWKcsSoGx3YPot5g=; fh=TKmPtkqwiqGhKcZVg/E3nAmB6cFOf53juGvJuFbBXhM=; b=XHXzFCbz8VQt+BvWqDfNq+/wC9qWpdBsxoFs3mlXHwRC+kEwBN9b7lCWDaEPuD7NyY G2vsOh6JfMO2+dYuOPvf1QOzcZC+893nCAd+21R1nLbeoGVxFn9Qj75yD9cgMxN84Z1w F4h4yogFwdRacLN5DqIc3rNBc45lMwX0/BL7Zn95KY9WeOrOGXA4OyQhKrzqP9Ygx088 HLP9vARbaXTm6KlzfDzmTn3cydA4vgUAApzLYo0I+gOIx8cY08EtbDFkCbKscU0hzFdi BdOfq1JppJcQqY32oRcE6pKFlOTOEA333ffip/gA3Ebyv6DAtJCaGNaH/o8YItYGfGi5 Bg/w== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z4-20020aa78884000000b006871fa2ee53si9053851pfe.65.2023.08.14.17.41.01; Mon, 14 Aug 2023 17:41:29 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232290AbjHNUQd (ORCPT + 99 others); Mon, 14 Aug 2023 16:16:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232405AbjHNUQ3 (ORCPT ); Mon, 14 Aug 2023 16:16:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAD1013E; Mon, 14 Aug 2023 13:16:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4620F6135C; Mon, 14 Aug 2023 20:16:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD79FC433C7; Mon, 14 Aug 2023 20:16:26 +0000 (UTC) Date: Mon, 14 Aug 2023 16:16:25 -0400 From: Steven Rostedt To: Linus Torvalds Cc: Zheng Yejian , mhiramat@kernel.org, laijs@cn.fujitsu.com, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, "Jason A. Donenfeld" , Jens Axboe , Al Viro Subject: Re: [PATCH] tracing: Fix race when concurrently splice_read trace_pipe Message-ID: <20230814161625.4a0ad49a@gandalf.local.home> In-Reply-To: References: <20230810123905.1531061-1-zhengyejian1@huawei.com> <20230811152525.2511f8f0@gandalf.local.home> <20230812211317.6d015e1d@rorschach.local.home> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS autolearn=no 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 On Sun, 13 Aug 2023 09:41:33 -0700 Linus Torvalds wrote: > So if somebody really *really* want sendfile to work for this case, then you > > (a) do need to fix the race in tracing_splice_read_pipe (which you > should do anyway, since you can obviously always use splice() itself, > not sendfile()). > > AND > > (b) figure out when 'splice_write()' will always succeed fully and > convince people that we can do that "extended version" of sendfile(). > No big deal. I really don't care about splicing trace_pipe anyway. That was added by others, but the trace_pipe_raw is what really should be used. Zheng's race needs to be fixed regardless, but I just wanted to make sure this wasn't some kind of hidden regression, as there were patches to trace_pipe to make sendfile get fixed in the past. a29054d9478d0 ("tracing: Fix crash from reading trace_pipe with sendfile") But that too was triggered by cat. If cat no longer uses sendfile for trace_pipe, I'm fine with it. -- Steve