From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34019C433DB for ; Wed, 3 Feb 2021 09:06:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D973764E34 for ; Wed, 3 Feb 2021 09:06:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233208AbhBCJGF (ORCPT ); Wed, 3 Feb 2021 04:06:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:46412 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233160AbhBCJEw (ORCPT ); Wed, 3 Feb 2021 04:04:52 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6566D64F6C; Wed, 3 Feb 2021 09:04:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612343049; bh=dose+0ib77aWrtl0UBLIjf+G+tsVPcA/kSlPAgriyoE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZllJEt1adPsuVtJA583pG/4Bf/bITj56J2fFSbdEeh89KWnvv3zcRutVZiLZYoCVY 1PWtaEcS9zjatbxvtoMgHrYZ6yRgcWDcLxh6Zzrn/C45HG2hTvLCckYUe5hUNqv3hV TQ9YN8ZcW7N8dg2aCVtVyVKMpPhoUcRR9gF6vXFo= Date: Wed, 3 Feb 2021 10:04:05 +0100 From: Greg KH To: Nicolas Boichat Cc: "Darrick J. Wong" , linux-fsdevel@vger.kernel.org, lkml , Amir Goldstein , Dave Chinner , Luis Lozano , iant@google.com Subject: Re: [BUG] copy_file_range with sysfs file as input Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 :) thanks, greg k-h