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=-0.8 required=3.0 tests=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 87F27C433E0 for ; Fri, 12 Jun 2020 18:42:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6CF9420836 for ; Fri, 12 Jun 2020 18:42:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726343AbgFLSm3 (ORCPT ); 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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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