Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp684570ybg; Fri, 12 Jun 2020 11:47:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7VyXDG1TK6oBIPPgEwfdgnxv7YkunrDuw/p4A8rPI5ijwIw/fpBhfn/zMjEPcVDMEmJZc X-Received: by 2002:a05:6402:1d89:: with SMTP id dk9mr12558448edb.275.1591987657009; Fri, 12 Jun 2020 11:47:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591987657; cv=none; d=google.com; s=arc-20160816; b=KNisTjiEJ8n5tkTVrwnwKnuciIBvFF6XR0z9MZFhaYRXvNSP83Yccnf+2rOwaMofwp 2pSc7Ydn+GXP0GeJQ8q8ttwxiH84KJJ+OySwXFb2gAokJvPUvECBYw6Obvvn06AOHO// +16WdesCW77xAWq609wKy71kAf6Yfz4J9Doie05Na8JIhGWaVb4Pc63z9P9y4O77Vyvq PI4KwlFpW9FnujTBSzK6fujCpEtUUdXgIBmJiPWBSjLjnm6UNXj6p5ftYXXBZrh/BmJU R7Rjkk0d/FKFRMUo8q40X8flqr+8iZ4MRDIXc5iW+hYO0mXI33E/qMHbFK4b3TKhog2a F9uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=UbtFw3f0Uz/fM/bfmvLFFQvDnk21bQL8xj3CNZGpUS4=; b=uP5OtXRtJpdQ2JghsYzUhJxMaEl9/REcOOBVwfj7wbC4ZbGPe5vEikIpn6wwC1SJ8v 1rluzhpYwdh2W6NWQBNKCxfKadn6FKenxwiItWxD/nT6pzBnpCO8xOKYE+oy6BbQMvZT 9D8DN3jElxK97xm64smPVSie6F3OoqbBVYDq23o3fSGQ+6E0sIhFhkFwP9kcMC1CSlOZ SBxvAx/oBQ7Lo7HOEwOhuEYtjuAIK+981mYqnezQw2xlp++poxPzCaRT3ULazmEswZby 3FjbnHMgj6DZ7fG+G3AHPaC8g6aN8/sNgmuaxoSGQruVqqn1kMg8fPBpXAbIuv6rf8wj DjRw== 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 w18si4602483ejn.727.2020.06.12.11.47.13; Fri, 12 Jun 2020 11:47:36 -0700 (PDT) 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 S1726365AbgFLSm3 (ORCPT + 99 others); Fri, 12 Jun 2020 14:42:29 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:45718 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726307AbgFLSm3 (ORCPT ); Fri, 12 Jun 2020 14:42:29 -0400 Received: from ip5f5af183.dynamic.kabel-deutschland.de ([95.90.241.131] helo=wittgenstein) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jjodC-0007Zp-RA; Fri, 12 Jun 2020 18:42:22 +0000 Date: Fri, 12 Jun 2020 20:42:21 +0200 From: Christian Brauner To: Kees Cook Cc: Giuseppe Scrivano , Robert Sesek , Chris Palmer , Jann Horn , Greg Kroah-Hartman , "containers@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , Tejun Heo , David Laight , Matt Denton , "cgroups@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "David S . Miller" , Al Viro Subject: Re: [PATCH v3 1/4] fs, net: Standardize on file_receive helper to move fds across processes Message-ID: <20200612184221.rszwhnhvhnigyazq@wittgenstein> References: <202006101953.899EFB53@keescook> <20200611100114.awdjswsd7fdm2uzr@wittgenstein> <20200611110630.GB30103@ircssh-2.c.rugged-nimbus-611.internal> <067f494d55c14753a31657f958cb0a6e@AcuMS.aculab.com> <202006111634.8237E6A5C6@keescook> <94407449bedd4ba58d85446401ff0a42@AcuMS.aculab.com> <20200612104629.GA15814@ircssh-2.c.rugged-nimbus-611.internal> <202006120806.E770867EF@keescook> <20200612182816.okwylihs6u6wkgxd@wittgenstein> <202006121135.F04D66DFA@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <202006121135.F04D66DFA@keescook> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 12, 2020 at 11:38:33AM -0700, Kees Cook wrote: > On Fri, Jun 12, 2020 at 08:28:16PM +0200, Christian Brauner wrote: > > Al didn't want the PAGE_SIZE limit in there because there's nothing > > inherently wrong with copying insane amounts of memory. > > Right, ok. > > > (Another tangent. I've asked this on Twitter not too long ago: do we > > have stats how long copy_from_user()/copy_struct_from_user() takes with > > growing struct/memory size? I'd be really interested in this. I have a > > feeling that clone3()'s and - having had a chat with David Howells - > > openat2()'s structs will continue to grow for a while... and I'd really > > like to have some numbers on when copy_struct_from_user() becomes > > costly or how costly it becomes.) > > How long it takes? It should be basically the same, the costs should be > mostly in switching memory protections, etc. I wouldn't imagine how many > bytes being copied would matter much here, given the sub-page sizes. This makes me _very_ happy. Christian