Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp132621pxb; Wed, 3 Feb 2021 01:22:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJwRsieMRkQNIBG2KVtuEc30eUfEIVjY+1la/M9mGmn583SiTGq0j0KAnT5DNTKBj9x3xxcA X-Received: by 2002:aa7:d6c2:: with SMTP id x2mr1987657edr.225.1612344126306; Wed, 03 Feb 2021 01:22:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612344126; cv=none; d=google.com; s=arc-20160816; b=dloijwcTXpn2bvMz7gU3r0lV2kySzMqeit+PpKC09W5Qfsg5MY3v/jUbxA4PceYocv 96l+dqmn/SQ99+CQjFnz3RVlWt/eUoC5iu+aRMmMi2Y3So5SZo+RYDncHwLW77zCetoz ju8YhGFPmzg5TfUWklOfj8q8J2XhNR1g/3EEG9p8m5/rP8H9IjnKxVYeFSKGHiqicx55 lrEirAXJJeReXRkKje+B/JUNjFwmgK1Wxy9/0TgfeF4lRPNaOf8klvvQQ/pNq88lT5Bk lWeLqfwMdQkg5Ccj7CR4n9j6M7A1Mf/pcjtQiRxGf+sncanTdSfXG0oUyr+/tqEUvm3c apIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=HieUWQakppqVFKaj0BQObJQSQhAwBKtcNJ/Ujjq5bQs=; b=c5WIdwq+En9qHkDaIGSMqS3y8IzrVN8ObTx0iB3AyxY9wcyy/0FUqly7HbBnALl/Y5 SYMf7nbeaI5hQIgs2mtqkpYMgUhJU+c71Lzi+TK/9+sX7d9ULLIBQR9YTNrAs9qpPznv zhlLkx13uIqgmftOwIMOnLp0Azw7+5W1455SNfBD1ufx/AzmxLWmbEkIi87BIrqbpMMr x/7sNJU5BxrgXAD+SjSybowc38YLxlNoCw/O1OayWbh0MIK9EohDEV18sGKG4H3Tp73h 8DwuHNySDSD3B8mssTZsx6vQULh6i5+9OBh1A2kBqP7hBuzRh7wQiWcTWV8dmrSosDYK eRbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PH4qXvG6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m23si765943eds.593.2021.02.03.01.21.42; Wed, 03 Feb 2021 01:22:06 -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; dkim=pass header.i=@chromium.org header.s=google header.b=PH4qXvG6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233309AbhBCJTt (ORCPT + 99 others); Wed, 3 Feb 2021 04:19:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231355AbhBCJTR (ORCPT ); Wed, 3 Feb 2021 04:19:17 -0500 Received: from mail-ua1-x935.google.com (mail-ua1-x935.google.com [IPv6:2607:f8b0:4864:20::935]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5CA0C0613D6 for ; Wed, 3 Feb 2021 01:18:31 -0800 (PST) Received: by mail-ua1-x935.google.com with SMTP id i3so8093965uai.3 for ; Wed, 03 Feb 2021 01:18:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HieUWQakppqVFKaj0BQObJQSQhAwBKtcNJ/Ujjq5bQs=; b=PH4qXvG65vp3rypsDQNApyOSIPvPqL9rwKkUnCB77vhRu0lVsRWwgKQymXzaug2qck TQkWRkF2abwn2GNKJgnoJZMSbzjZMTHd5ik+/CU5NHHRXIzb+zt4DI2ntCI1cRkM++oH O/xa1EmmkoQQBSW1SVVdgNp3ya/hXOmSJl6yw= 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; bh=HieUWQakppqVFKaj0BQObJQSQhAwBKtcNJ/Ujjq5bQs=; b=H4Zqam++Y0Zwj2MaMppuGpAH2KY0Y7hK3WpThX9agRE5KTouKMgCYErM1XSZsGJQYX UvGWMYYeolZB3hbHAmM2KSfNrnTmB/WF3+geIyOczWLsQ+GPzrfvWu9ncv3z+b5HiIbD VGrKnk7kQ/Ls7VBoDigLnQ2e/LeYTv3+cXQ05P75IjT7NAaDacuYaYpbpn1jiMxmerVh tgoTx/V401h+b8DQQ5v5CBFHYfHG6C3foK+G4bE/eCmjC/HT9wKT1sJ9VKwXpEhMQw8w nGkppartvavwE1pU2SywUROHFE6j9x4ThBkvJqrX+hHsGDYHT3U/IabP7D4N/VQIb0Y0 iXbQ== X-Gm-Message-State: AOAM5306XBFVBn+ulCVFs04FFD3Fu6RpP3yE5+y2fZ+wI75oZXEu3mSS 785RopVOsSKFIdG7Jx+tLJEJ2DjlD/poXKSiM6W0mmW8CslS2Q== X-Received: by 2002:ab0:2bc3:: with SMTP id s3mr1098247uar.74.1612343910829; Wed, 03 Feb 2021 01:18:30 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Nicolas Boichat Date: Wed, 3 Feb 2021 17:18:19 +0800 Message-ID: Subject: Re: [BUG] copy_file_range with sysfs file as input To: Greg KH Cc: "Darrick J. Wong" , linux-fsdevel@vger.kernel.org, lkml , Amir Goldstein , Dave Chinner , Luis Lozano , Ian Lance Taylor Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 3, 2021 at 5:04 PM Greg KH wrote: > > On Mon, Jan 25, 2021 at 03:54:31PM +0800, Nicolas Boichat wrote: > > Hi copy_file_range experts, > > > > We hit this interesting issue when upgrading Go compiler from 1.13 to > > 1.15 [1]. Basically we use Go's `io.Copy` to copy the content of > > `/sys/kernel/debug/tracing/trace` to a temporary file. > > Nit, the above file is NOT a sysfs file. Odds are it is either a > debugfs, or a tracefs file, please check your mounts to determine which > it is, as that matters a lot on the kernel backend side for trying to > figure out what is going on here :) Yes yes it's tracefs ,-) But, from the other thread https://lkml.org/lkml/2021/1/26/2029 sysfs (and any other fs that generates files dynamically like procfs) would likely hit issues as well (but maybe in more rare circumstances). Thanks! > > thanks, > > greg k-h