Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp980619pxb; Fri, 15 Apr 2022 17:17:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxm3EjVecVXOdvllrxBtplnBJKesjAu3bKLi5ujOPM7rb8quJx+xvkautpniRFNXmGEIokK X-Received: by 2002:a05:6a00:148a:b0:50a:40f7:5a80 with SMTP id v10-20020a056a00148a00b0050a40f75a80mr1519627pfu.58.1650068263378; Fri, 15 Apr 2022 17:17:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650068263; cv=none; d=google.com; s=arc-20160816; b=mOGZA+90cK/GmtozxbLbumu9DttSvv6euHx/EOV6OBh7i+vH2p1Ihsrcl78kiDcl3s 8RTbXeYdu1uceYaH03+dO0zU02n+B8zihr6WOlc0gC9oLrRH3LGPdrCBcdj53m2jU0Qy oZqdXZ8eT1UOThSN8e1jdLaQCCCeCjDbs7fi09nE8OrROEtj5p0d4AIOcgRHr7AbGHoW 0qOUo9H1/ipAVWfE7mTx9ar8T0PlR0ovzkokbZ8A5Qlk0oHLIHqqPXK7lPOxtCuZgukZ yqHI4uBIp68dkYj3WqIS3Eu1NRuHF6zCFbZrXj8kA7dp0zib52TEZd3aQ1rtsxVCODMm nYtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kH6ujGoL9etk6d7SqVYOo2pyqaz/8ZlPBQf0CoqEg68=; b=Qi+9pBZaR++dR7iD2piqYrxluNd2iSvUtsutBujvNGLdiqlXiSAxwiSOOrZWTiVzvO Z3jjvsgGBnXQQgBxICkhtYpICY/Wi2760EOxryIuvqqnlP793ImrlBiIXsDV4kBYInUq LylXGknFfOLLmP7cZT/BqGiC42lHqxnB67L/W0TzDHd3mwp/AUxwhtQdHap2VVEkC2r6 efjK5JR2rX7mzmMwggdu2BVSrOHiefAvPjR/iXuTfmirVrYUiEZWd67WrJ7J8G7koaTW D1gDwwRftpWh2k+dVHOBQ45SIDisgmHRuRlYScRvNmXVL74pQEPGViP++StQ41vLtJtF C7vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Oh6jCARz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id m9-20020a170902f64900b00153b2d164bcsi2384753plg.196.2022.04.15.17.17.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 17:17:43 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Oh6jCARz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4C805CFBAE; Fri, 15 Apr 2022 17:17:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239904AbiDNQGk (ORCPT + 99 others); Thu, 14 Apr 2022 12:06:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349701AbiDNP5A (ORCPT ); Thu, 14 Apr 2022 11:57:00 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3AA12197; Thu, 14 Apr 2022 08:38:52 -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=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: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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!