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 43907C67871 for ; Thu, 27 Oct 2022 08:06:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DAE1A8E0002; Thu, 27 Oct 2022 04:06:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D5E718E0001; Thu, 27 Oct 2022 04:06:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C4E108E0002; Thu, 27 Oct 2022 04:06:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id B764E8E0001 for ; Thu, 27 Oct 2022 04:06:03 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 93ADE1C6BDB for ; Thu, 27 Oct 2022 08:06:03 +0000 (UTC) X-FDA: 80065996206.16.F957315 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf08.hostedemail.com (Postfix) with ESMTP id 5D6F7160013 for ; Thu, 27 Oct 2022 08:06:01 +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=+zECNnKHvQf1A6kHuAwhB50ffkPqGeMPvlWKtaCiAiE=; b=YPLisVZwst9EFxI0gcuUY+NUOK NRYAPfyNsuUDhRh2Vc9/2DiifXwycOGdA1g7mRfVdeglLv3Ck3LYNb45dW0S1PjHpT1kTmAwaFD8a dmTJcENucPuyQ4gwgGt6ALvgRQm21WR7yjhtH7REW4fASRpkZMaXAPciocqgVAnijJXl0o+eLNm6T 55UQYf15xXrcXSr6Edj2x+eutqAK3aMV8lEVqcCeZz2oQiFNJFbI6upWpMIV3+Gww+qlob+XR43j9 doFyX+Kevribl8RQt/zYE8vDgdyPbNikz7Sy7zX5ie6UFIgne6j1TtMvWhCeqB+eTPEcxQul4UC95 bOKk7gKw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1onxth-0002LC-Ff; Thu, 27 Oct 2022 08:05:53 +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 3473930029C; Thu, 27 Oct 2022 10:05:47 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1A6DD2012B90F; Thu, 27 Oct 2022 10:05:47 +0200 (CEST) Date: Thu, 27 Oct 2022 10:05:47 +0200 From: Peter Zijlstra To: Alexander Potapenko Cc: Marco Elver , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Dave Hansen , Kees Cook , x86@kernel.org Subject: Re: [PATCH] x86/uaccess: instrument copy_from_user_nmi() Message-ID: References: <20221025221755.3810809-1-glider@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=YPLisVZw; spf=none (imf08.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666857962; a=rsa-sha256; cv=none; b=evMz8hdMaOkW4Ckje9bWPZDyRKHb8uCTK4pIh0vhM9M+3sQJpRrb+3CSwXbPVKKgqVNtED YVwYQujwvSfwi3xD01pRXo3mNUUJV+t4WazS12JsHvefVsCBEx7r6idfbyQo5RWw7JN3yO qKjsr2ki9yB8NwM1/xUiMBHEEmQ9eao= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666857962; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=+zECNnKHvQf1A6kHuAwhB50ffkPqGeMPvlWKtaCiAiE=; b=cukLwKlEMbgS8/OWvEabbBYY96ETUgwgFuK6jIiuxMg3Dw1HEcLnO0HYdE5VIXbptVrbr9 a8c6wNg1LQP1iEKgDy5wUQJmdIM6qw1zdBVIY6YSUWdbAOwGFrrsHyVZTR8iqs8LLiug8/ NsM8a/RDzB8/+quAvHTUOzxefX87I4g= X-Rspamd-Queue-Id: 5D6F7160013 Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=YPLisVZw; spf=none (imf08.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-Rspamd-Server: rspam02 X-Rspam-User: X-Stat-Signature: 6teausk91n5x1ce5npsyy9yxy4w6sgpd X-HE-Tag: 1666857961-200636 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000009, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Oct 26, 2022 at 11:38:53AM -0700, Alexander Potapenko wrote: > A bigger issue from the NMI perspective is probably > having __msan_poison_alloca() inserted in every non-noinstr kernel > function, because that hook may acquire the stackdepot lock. *urgghhh* that's broken, that must not be. There is a *TON* of NMI functions that are non-noinstr. What's worse, it seems to do a memory allocation as well, and that's out the window with PREEMPT_RT where you can't do even GFP_ATOMIC from regular IRQ context. That function is wholly unacceptable to be added to every kernel function.