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=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 671CDC3A5A9 for ; Wed, 4 Sep 2019 20:49:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3A98A208E4 for ; Wed, 4 Sep 2019 20:49:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567630146; bh=VjRAUyhPNYqPG6iYr3ZZTt5fRZBunJt5oojJZz4GH54=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=r3JDf4tKc5uY5dE3EB0pQ54ASJYvQAjstg8vATRQYAy2i9Ks580Yurw64qLqAqJDw 41HRX7n/zpaHrDojAV1giNeRcNVLyxhSgyfyi5Zk5TgLjiVQZvIIOpCjCpOLrUA0Pe afYu42AtoVZuZINNb6VqPu72BmELogKp5kpkRtn0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729806AbfIDUtG (ORCPT ); Wed, 4 Sep 2019 16:49:06 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:39999 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725965AbfIDUtF (ORCPT ); Wed, 4 Sep 2019 16:49:05 -0400 Received: by mail-lf1-f67.google.com with SMTP id u29so105586lfk.7 for ; Wed, 04 Sep 2019 13:49:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YRdCAVRAhTdLrO2mQDquZKKD1XyXDQFQecwZBQrW2l0=; b=Ze7jrxDdyMP3SGOIesp7e7J/31BijZsyDh1sIQ7zUiaQzSssRLwu0Ke8i7Ma6J1ANp +Y5ZM0aEii6+0RhihFBDvVJHDKpgy6odNUVXcrGCLgyyDaE911gL75i/CI9XscaVSNbQ F9aqFQyEV98rhO6Nc66q5tz/D9khPZIijk1p4= 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=YRdCAVRAhTdLrO2mQDquZKKD1XyXDQFQecwZBQrW2l0=; b=bqwabBzjeqKSctnODYslIZpogk4F7qL2WuUp8cDUfKhZTeeyz4xNnmVbvHYBN2Gkyr 0fx5tNxKt9zH4xj5AMX5uSWT8eRyIMwUkef82oVvuHz3VbfkGmyBXpH37AD5ePmC80ta wsZtl3wPKptOluzmgDj7aLj4L3NWm3wyPud5c8/ObA+IvjJgVl0BWbOVXSDz74df0K67 sGXNyvuJjivThRhO6FaFMO5VT1C/8DFV/xtvidZ5AjuJ9p6TCXldQ0MVHeUQDRsUidu8 05A1aHW8NMA72wbV11gjZTyFc8F8Hsl16oSfkiIYXT8+gKQ2lfXDLeayZwoZnbFLrVN4 B+PA== X-Gm-Message-State: APjAAAUj2mbO84R8Q4KMPMACrxgKGPcrj3TvqYoeibDv7Q9at6Xjvfh0 mGd5u5+F2gAsUUGbkjwTVLl6yPc2KAc= X-Google-Smtp-Source: APXvYqzR4PYWh6MMI8tCu5ZsOpSvByWEmhQkn21whFmI2JJ4gaorqg/TA0hiuBirsuc/DweYP9dWNw== X-Received: by 2002:a19:6517:: with SMTP id z23mr47641lfb.31.1567630143415; Wed, 04 Sep 2019 13:49:03 -0700 (PDT) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com. [209.85.167.41]) by smtp.gmail.com with ESMTPSA id b15sm2778832lfj.84.2019.09.04.13.49.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Sep 2019 13:49:02 -0700 (PDT) Received: by mail-lf1-f41.google.com with SMTP id d10so136175lfi.0 for ; Wed, 04 Sep 2019 13:49:00 -0700 (PDT) X-Received: by 2002:a19:f204:: with SMTP id q4mr52203lfh.29.1567630138756; Wed, 04 Sep 2019 13:48:58 -0700 (PDT) MIME-Version: 1.0 References: <20190904201933.10736-1-cyphar@cyphar.com> <20190904201933.10736-2-cyphar@cyphar.com> In-Reply-To: <20190904201933.10736-2-cyphar@cyphar.com> From: Linus Torvalds Date: Wed, 4 Sep 2019 13:48:43 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v12 01/12] lib: introduce copy_struct_{to,from}_user helpers To: Aleksa Sarai Cc: Al Viro , Jeff Layton , "J. Bruce Fields" , Arnd Bergmann , David Howells , Shuah Khan , Shuah Khan , Ingo Molnar , Peter Zijlstra , Christian Brauner , Rasmus Villemoes , Eric Biederman , Andy Lutomirski , Andrew Morton , Alexei Starovoitov , Kees Cook , Jann Horn , Tycho Andersen , David Drysdale , Chanho Min , Oleg Nesterov , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Aleksa Sarai , Linux Containers , alpha , Linux API , linux-arch , Linux ARM , linux-fsdevel , linux-ia64@vger.kernel.org, Linux List Kernel Mailing , "open list:KERNEL SELFTEST FRAMEWORK" , linux-m68k , linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390 , Linux-sh list , linux-xtensa@linux-xtensa.org, sparclinux@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org On Wed, Sep 4, 2019 at 1:20 PM Aleksa Sarai wrote: > > A common pattern for syscall extensions is increasing the size of a > struct passed from userspace, such that the zero-value of the new fields > result in the old kernel behaviour (allowing for a mix of userspace and > kernel vintages to operate on one another in most cases). Ack, this makes the whole series (and a few unrelated system calls) cleaner. Linus