Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp26908rdg; Tue, 10 Oct 2023 03:17:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF+tD7+CUwGBWvN47ATHYfspeJfAERQwl+3KnzRJujSf0JNSMvHPL752EULjXwDksjiIfqp X-Received: by 2002:a05:6808:1aae:b0:3ae:133d:1a99 with SMTP id bm46-20020a0568081aae00b003ae133d1a99mr15954676oib.42.1696933047535; Tue, 10 Oct 2023 03:17:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696933047; cv=none; d=google.com; s=arc-20160816; b=YwUY6r5BAdFZUtoC+Wu9XuM7wpXsBcmvgSqOvXseWxmV196U65jup7czwxOJ+eCfRl x4zlh+rb9bMiXtdmv76+XFJS8CKcS9AaPJPBmJief0PJ8yzm2vv31K6vqDsnbnRch3Ti Z1vXtjSghgBT0FfY4Lz6hpXWt/YjlzYuyKI5H8GCzkXiyoys4V7vDjE61O1xaPVjOZE2 X0I+XXtXr4xuNQp7yOs23JCKWAfKScQPZIr3zyVQcUuGHzXPjOEWUvq8z4wV7ltK4Jzv HtGAmJOTwSL8fLvUXAPzRy0sjyNwA3lLla+Tx1J9Y/Hwu8aUPeGZhxmhGsQID2gA50uj F4sg== 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=Zb6A2kfpJa7lPS8yNIr1mX5OvpeUAPwA3IcDR1IaKKc=; fh=mUf2ndWDL5c84ldV6DszTy3j42/aMLRyYOLwUcEDGhM=; b=qi4zs9uIt1121QRThmlaizNWYrakrCUihDDhewekBPOOkK1jBRY+orbNTAXoHZ+HCB r/6MNdo89RPAjaPBGmJAEOR9tfNvFmxd9C2T29QnIe6uNDa533Bhf0R4lpahlPz8uMdI JSqI1i3KsDp/+C4O9YdSCkcUuOokwVHIrbBJJoFbWw/qY191WzrYRnBNxM2RONSoRmSP UUvNhUNXy5JQUwhkf3j4kc1Y1b2zGwFIoUWug6BIfXFd+nRSZ7qxhCNPXCMEpC+FX5Dd DAWPNXn5tIqTc7AfYzyTgt9mXeVRJbM6AU1WSy2CpbUJkzbZO4PJweg6f6BzOKO6e4XO 38gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ueKzQLcn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id g12-20020a6544cc000000b00578e71164dcsi2216327pgs.274.2023.10.10.03.17.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 03:17:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ueKzQLcn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 3035480E70B6; Tue, 10 Oct 2023 03:17:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231243AbjJJKQ5 (ORCPT + 99 others); Tue, 10 Oct 2023 06:16:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231160AbjJJKQq (ORCPT ); Tue, 10 Oct 2023 06:16:46 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 423F1116; Tue, 10 Oct 2023 03:16:40 -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=Zb6A2kfpJa7lPS8yNIr1mX5OvpeUAPwA3IcDR1IaKKc=; b=ueKzQLcnmzerXnYo62eevFkVL0 KreQh9Q1gUxYYHjpqpbTjp3oivGIICOfNTpJsJUVb7fbPeXYvxGghlyUqpUMTKfmKJoPJwwNEoquJ 8h03g2rYT14em69rgkufYtaf8BTgHY/b7IOchJm9iMQ0Lez6CKSrDRc9HBM/AG7UJe6tAzW/yqppG Isa6IYCM58qFZnGUyiApip5VbPWJztRzWrgrqCEj8uSHvCihYTUQv/SXWoijuZ01bliAhmGHfU/Pr mCcr+KCQEm3VK1Hdq7/chubA0yWFKc9MsuJjfYSmgYBHZf3S/slGtqLoWQjQMB62KnJ737HCbwLkB SdpMivgg==; 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 1qq9mn-00417M-OM; Tue, 10 Oct 2023 10:16:21 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 68AF6300392; Tue, 10 Oct 2023 12:16:21 +0200 (CEST) Date: Tue, 10 Oct 2023 12:16:21 +0200 From: Peter Zijlstra To: Borislav Petkov Cc: "Kirill A. Shutemov" , Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, Fei Yang , stable@vger.kernel.org Subject: Re: [PATCH] x86/alternatives: Disable KASAN on text_poke_early() in apply_alternatives() Message-ID: <20231010101621.GG377@noisy.programming.kicks-ass.net> References: <20231010053716.2481-1-kirill.shutemov@linux.intel.com> <20231010081938.GBZSUJGlSvEkFIDnES@fat_crate.local> <20231010101056.GF377@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231010101056.GF377@noisy.programming.kicks-ass.net> X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 10 Oct 2023 03:17:25 -0700 (PDT) X-Spam-Level: ** On Tue, Oct 10, 2023 at 12:10:56PM +0200, Peter Zijlstra wrote: > That said, I don't particularly like the patch, I think it should, at > the veyr least, cover all of apply_alternatives, not just > text_poke_early(). kasan_arch_is_ready() is another option, x86 doesn't currently define that, but that would allow us to shut kasan down harder around patching. Not sure if it's worth the trouble though.