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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 B6925C433E0 for ; Tue, 30 Jun 2020 07:04:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A0AE4206CB for ; Tue, 30 Jun 2020 07:04:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730595AbgF3HEi (ORCPT ); Tue, 30 Jun 2020 03:04:38 -0400 Received: from verein.lst.de ([213.95.11.211]:34880 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730570AbgF3HEi (ORCPT ); Tue, 30 Jun 2020 03:04:38 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 5597F68AFE; Tue, 30 Jun 2020 09:04:34 +0200 (CEST) Date: Tue, 30 Jun 2020 09:04:34 +0200 From: Christoph Hellwig To: Linus Torvalds Cc: Christoph Hellwig , David Laight , Al Viro , Luis Chamberlain , Kees Cook , Iurii Zaikin , Linux Kernel Mailing List , linux-fsdevel Subject: Re: [PATCH 03/11] fs: add new read_uptr and write_uptr file operations Message-ID: <20200630070434.GA28654@lst.de> References: <20200624175548.GA25939@lst.de> <20200629152912.GA26172@lst.de> <20200629180730.GA4600@lst.de> <20200629183636.GA6539@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Next fund one, in net/ipv6/ip6_flowlabel.c:ipv6_flowlabel_opt() we have this gem toward the end: if (!freq->flr_label) { if (copy_to_user(&((struct in6_flowlabel_req __user *)optval)->flr_label, &fl->label, sizeof(fl->label))) { /* Intentionally ignore fault. */ so it writes back to what was supposed to be the input parameter, and only does it for a partial region. Not sure how we could handle that with any kind of copy to kernel in the caller scheme?