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=-5.8 required=3.0 tests=BAYES_00,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 8C8A9C4743D for ; Tue, 8 Jun 2021 05:26:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 71C7C6124C for ; Tue, 8 Jun 2021 05:26:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230353AbhFHF15 (ORCPT ); Tue, 8 Jun 2021 01:27:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbhFHF14 (ORCPT ); Tue, 8 Jun 2021 01:27:56 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D27AC061574; Mon, 7 Jun 2021 22:26:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=qYIZGAIz3HgfqAZWN050/r4nlncXneSeHvNxj3vdJTQ=; b=Lct2bmMY1MUo8xT53kwRmcMl5S zvTOsNipToRMW9uhAXEtD2lBpUUSrntGZMigN9/ic0m/GBk/KVJYZpYwVOb+haJfXDXFGP/zvOcWR oesx/tsgYmHrAnitLCESh0OpZZr7ME1O2Gc63oQCVtxZs1YxuSpVlJ/AwrHU9O/haD84U0E18BBUd alRq5A/NeVqy2udBPifo++5LtpzIu2aCE0TYSX0HmKSq3jsCTpKKvMeKvOUkdd+3Na23zGO3PTsdD c55AexPIiZ+lTAWSTjUyifdlCtmQczUSTP7uJX/UbbowmXV2A+OGf457J8AN4r1bfAXdmqEQAiE08 Q5TYu6lA==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lqUEs-00Gann-2j; Tue, 08 Jun 2021 05:25:26 +0000 Date: Tue, 8 Jun 2021 06:25:22 +0100 From: Christoph Hellwig To: Linus Torvalds Cc: Al Viro , Christoph Hellwig , linux-fsdevel , Linux Kernel Mailing List , David Sterba , Miklos Szeredi , Anton Altaparmakov , David Howells , Matthew Wilcox , Pavel Begunkov Subject: Re: [RFC][PATCHSET] iov_iter work Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 07, 2021 at 04:35:46PM -0700, Linus Torvalds wrote: > Thinking more about this thing, I think it means that what we *should* > do is simply just > > void iov_iter_init(struct iov_iter *i, unsigned int direction, > const struct iovec *iov, unsigned long nr_segs, > size_t count) > { > WARN_ON_ONCE(direction & ~(READ | WRITE)); > iWARN_ON_ONCE(uaccess_kernel()); Yes, exactly! (except for the spurious i above, of course).