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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D546C433F5 for ; Thu, 14 Apr 2022 15:38:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5EB1B6B0071; Thu, 14 Apr 2022 11:38:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 59AC66B0073; Thu, 14 Apr 2022 11:38:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 43BE36B0074; Thu, 14 Apr 2022 11:38:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id 35B256B0071 for ; Thu, 14 Apr 2022 11:38:33 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 0D055633B0 for ; Thu, 14 Apr 2022 15:38:33 +0000 (UTC) X-FDA: 79355891706.15.3EB64E9 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf28.hostedemail.com (Postfix) with ESMTP id 3986DC000C for ; Thu, 14 Apr 2022 15:38:32 +0000 (UTC) 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=kH6ujGoL9etk6d7SqVYOo2pyqaz/8ZlPBQf0CoqEg68=; b=Oh6jCARzLKsg4PYNtSSV5THm2O ldBW0UrCujjnxpsSKs0Y0+Gbtj6k3fyeYqaDCunqgh3pAF22qDYLd27vm03t7eIkC8oVwBUNq0cV4 Ald/PULQLxQGzviKQsVL3bPa9ufarOurPeYUj2vuTH6zRIMe352e2hycGGGmjj+MqTVSEb6otgYjt MekoMBu1AHHSrhdoMu4blI7h5csyF1pb2J0lmrQjs8/YDbWcoQBFKQx+WtVEY7VDz1mzAui2Ly3Ey bnt3LQkbTAwtYfR2A9Jc2VU+tkfHBw6yPbYMXxPU8YnauiiJTiVFqzgzEmejSx6QYdw3IPMbz1v7n 8TspuD2Q==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nf1Xp-00FFwW-A8; Thu, 14 Apr 2022 15:38:05 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 0DA0F30027B; Thu, 14 Apr 2022 17:38:02 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id DBEA631B90AC3; Thu, 14 Apr 2022 17:38:01 +0200 (CEST) Date: Thu, 14 Apr 2022 17:38:01 +0200 From: Peter Zijlstra To: Alexander Potapenko Cc: Alexander Viro , Andrew Morton , Andrey Konovalov , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Christoph Hellwig , Christoph Lameter , David Rientjes , Dmitry Vyukov , Eric Dumazet , Greg Kroah-Hartman , Herbert Xu , Ilya Leoshkevich , Ingo Molnar , Jens Axboe , Joonsoo Kim , Kees Cook , Marco Elver , Mark Rutland , Matthew Wilcox , "Michael S. Tsirkin" , Pekka Enberg , Petr Mladek , Steven Rostedt , Thomas Gleixner , Vasily Gorbik , Vegard Nossum , Vlastimil Babka , Linux Memory Management List , Linux-Arch , LKML Subject: Re: [PATCH v2 38/48] objtool: kmsan: list KMSAN API functions as uaccess-safe Message-ID: References: <20220329124017.737571-1-glider@google.com> <20220329124017.737571-39-glider@google.com> <20220330084615.GH8939@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Oh6jCARz; spf=none (imf28.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 3986DC000C X-Stat-Signature: ur4hqjfqjw6cujoft875kdcueweyadze X-HE-Tag: 1649950712-690459 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 Thu, Apr 14, 2022 at 05:30:34PM +0200, Alexander Potapenko wrote: > On Wed, Mar 30, 2022 at 10:46 AM Peter Zijlstra > wrote: > > > On Tue, Mar 29, 2022 at 02:40:07PM +0200, Alexander Potapenko wrote: > > > KMSAN inserts API function calls in a lot of places (function entries > > > and exits, local variables, memory accesses), so they may get called > > > from the uaccess regions as well. > > > > That's insufficient. Explain how you did the right thing and made these > > functions actually safe to be called in this context. > > > As a result, none of KMSAN API functions perform userspace accesses, but > since they might be called from UACCESS regions they > use user_access_save/restore(). ^ That.. very good. Thanks!