Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp59961rdg; Tue, 10 Oct 2023 04:25:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEk6VxTXy3tCa5fM7AWqu75PHRuOHwbc8Qce7Q6PEQ4buNdCOpQ6z+mfvxjS57pS2nTJ8ys X-Received: by 2002:a05:6870:c14f:b0:1c0:c42f:6db2 with SMTP id g15-20020a056870c14f00b001c0c42f6db2mr21576822oad.37.1696937102195; Tue, 10 Oct 2023 04:25:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696937102; cv=none; d=google.com; s=arc-20160816; b=IDFnGk0CeBZICVhNLyF05CGL6Pup5vUIuwK4kiVLj5kDJbjtecwgRZVOx2+PdWJNtH cnWaN2ycQGwHe2kwcU0EL9MuE9kwKFw7CP4dDXIqCebWyxrAn5SgS1qgZP0DZx+JhCtk d8BBtJGwA2YLE7Mhbd6RL39qPK40OpMB9xG77xV52HtI3FMy9y4/V3xsk9CoaCOHjKlk MoXNP/SJbMsvw7XlVCARXD7I7GcfUqEDR4nwXNQ7+y/AOIti2Hs8uWsOtBh9dryAHxHu yhUWyu0TDdcMRkElDTKKGKX1X9D1RQWz1BCLX9Px1lZRIZfFtJ17Dz79CEOGoZwcgY6F gEbQ== 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=RHIty1r8jlpg4mbxrTX99MguDdmyNDYNfk7Z509OtEw=; fh=4tWpMuXgM6Grt6tK+V46P+l9WjE2Wblwd5EdpNnwGtU=; b=AdqA/gNgYZQ1EvPFCknvafti+1rfJOiQeOOHoBUYLI8K1uxeSaqJN+kCQuLm+Faket 0m8nu4/wJlhnie7Fe5SIQKKKcRaM3cc1qkW8B3pG2Hfxnf7eS/3fwugnKXnTa8Fr177t weW7MAbYVf0ROY3p8siAf12OAwJPLmsThob4wncHtk5lPkfE2Zc/Q3t2AVDXQ4tXLVqQ cc1YuDwGdf9/UpxJfGEk+9GaJhr1NCk2SYrgkYZdsrxYbigROVWHGc1bDaaCF87XGgE4 tSu0sYh6yfEeO2zsbDBSCqX2pPJOVUgAEAcVNiVutyWGnip2eq4ZIB60U3JNyy6shqPR 1jNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="AK/yhtwq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id e124-20020a636982000000b00565e5916ab6si11248473pgc.598.2023.10.10.04.25.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 04:25:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="AK/yhtwq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id D3960801D831; Tue, 10 Oct 2023 04:24:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231347AbjJJLYy (ORCPT + 99 others); Tue, 10 Oct 2023 07:24:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231228AbjJJLYx (ORCPT ); Tue, 10 Oct 2023 07:24:53 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADD4E94; Tue, 10 Oct 2023 04:24:51 -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=RHIty1r8jlpg4mbxrTX99MguDdmyNDYNfk7Z509OtEw=; b=AK/yhtwqX3jRAdiHHdyk4fqwYm 4LtzZ1cDNS8zXq+n2DDkrXyrY1swTguaEC1XcnfP3Xo7lqcvYvpsYay9lVCPGct8rJfX2bIt9QxS3 9eyjtchnrilqJ2j1VmM/XYgVJ04vaNaRaOLUpz6EWadnqkeEz1alsuYxGnioBz+i65//wBOp1Jukf /JOyO36Tgak878AK8KiYQOQmP1FyyYaP7sM8z9ixJaRuS/a9rqnuoaM6uwpPGrI1U3Caz4llcugJc UlyVh8gop7AUFH3aCD64gvwZcMN5j/cENwAPLfUnoAK7BZOApLF9XJgkTraYp5l0bEfoItnprootj sFDJ0krA==; 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 1qqAqf-004JVi-Mh; Tue, 10 Oct 2023 11:24:25 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 5F185300392; Tue, 10 Oct 2023 13:24:25 +0200 (CEST) Date: Tue, 10 Oct 2023 13:24:25 +0200 From: Peter Zijlstra To: "Kirill A. Shutemov" Cc: Borislav Petkov , 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: <20231010112425.GJ377@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> <20231010102537.qkrfcna2fwfkzgir@box.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231010102537.qkrfcna2fwfkzgir@box.shutemov.name> 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,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Tue, 10 Oct 2023 04:25:00 -0700 (PDT) X-Spam-Level: ** On Tue, Oct 10, 2023 at 01:25:37PM +0300, Kirill A. Shutemov 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(). > > I can do this, if it is the only stopper. > > Do you want it disabled on caller side or inside apply_alternatives()? Inside probably, covering the whole for()-loop thingy. Ideally with a comment explaining how KASAN doesn't like partial LA57 patching.