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.3 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 B3640CA9EA0 for ; Fri, 18 Oct 2019 15:27:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 87C6420700 for ; Fri, 18 Oct 2019 15:27:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 87C6420700 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 04DA48E0005; Fri, 18 Oct 2019 11:27:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F19558E0003; Fri, 18 Oct 2019 11:27:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E07748E0005; Fri, 18 Oct 2019 11:27:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0006.hostedemail.com [216.40.44.6]) by kanga.kvack.org (Postfix) with ESMTP id BA3AF8E0003 for ; Fri, 18 Oct 2019 11:27:14 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 29F6D6D8B for ; Fri, 18 Oct 2019 15:27:14 +0000 (UTC) X-FDA: 76057283988.10.act53_3f1eadbb9d433 X-HE-Tag: act53_3f1eadbb9d433 X-Filterd-Recvd-Size: 1842 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Fri, 18 Oct 2019 15:27:13 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 1D1AF68AFE; Fri, 18 Oct 2019 17:27:10 +0200 (CEST) Date: Fri, 18 Oct 2019 17:27:09 +0200 From: Christoph Hellwig To: glider@google.com Cc: Andrew Morton , Jens Axboe , Theodore Ts'o , Dmitry Torokhov , "Martin K . Petersen" , "Michael S. Tsirkin" , Christoph Hellwig , Eric Dumazet , Eric Van Hensbergen , Takashi Iwai , Vegard Nossum , Dmitry Vyukov , linux-mm@kvack.org Subject: Re: [PATCH RFC v1 23/26] kmsan: unpoisoning buffers from devices etc. Message-ID: <20191018152709.GB32281@lst.de> References: <20191018094304.37056-1-glider@google.com> <20191018094304.37056-24-glider@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191018094304.37056-24-glider@google.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Oct 18, 2019 at 11:43:01AM +0200, glider@google.com wrote: > When data is copied to memory from a device KMSAN should treat it as > initialized. In most cases it's enough to just unpoison the buffer that > is known to come from a device. > In the case with __do_page_cache_readahead() and bio_copy_user_iov() we > have to mark the whole pages as ignored by KMSAN, as it's not obvious > where these pages are read again. I'm not sure how your annotations work because you only Cced me on this one patch. Don't do that.