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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CCF0DC433FE for ; Fri, 12 Nov 2021 09:34:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AF0E160EE2 for ; Fri, 12 Nov 2021 09:34:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234761AbhKLJgx (ORCPT ); Fri, 12 Nov 2021 04:36:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230510AbhKLJgv (ORCPT ); Fri, 12 Nov 2021 04:36:51 -0500 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F6C2C061766; Fri, 12 Nov 2021 01:34:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=REVGkF6eRn7+YtrHq8BUhmi5Kq0utPzdhrc+6SzJFmk=; b=DpB9UYET5QhlpaVmJgZCs2Yiv0 s9Mm5Z4cog+M2JmVa0m51tMwz9b+1XutM7gMfcBxnlHSmusR02rK4phHZpqfM2ZqxcbT4qqOSfVdv o2FpU/rnEh8eFJu8d5maB0RBQ4Kf314oNaZvn1cfQw88sl6Xgqn07oaebzi4XSJLg7MHlUVkBLLmn fwQUFLW6au+ESNDo3hNsAE4OYC1KBWAPLgzuhCN52fsTDvtbd5QmIh76c+7sB7THxFi2QHca1wSBP ib3ozkopKRH9NveRJXscWxOdkgQo4fIKWoaPvE6kNDbuJ38ovq3t83y52ssRBR2TiSUXz7eAf6PEO UuJAbJrg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mlSwE-00FbY0-1k; Fri, 12 Nov 2021 09:33:38 +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 (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id C232330001C; Fri, 12 Nov 2021 10:33:36 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 9E08E20DC06DC; Fri, 12 Nov 2021 10:33:36 +0100 (CET) Date: Fri, 12 Nov 2021 10:33:36 +0100 From: Peter Zijlstra To: Josh Poimboeuf Cc: David Laight , Nick Desaulniers , Bill Wendling , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "mark.rutland@arm.com" , "dvyukov@google.com" , "seanjc@google.com" , "pbonzini@redhat.com" , "mbenes@suse.cz" , "llvm@lists.linux.dev" , "linux-toolchains@vger.kernel.org" , live-patching@vger.kernel.org Subject: Re: [PATCH 20/22] x86,word-at-a-time: Remove .fixup usage Message-ID: References: <20211108164711.mr2cqdcvedin2lvx@treble> <20211109210736.GV174703@worktop.programming.kicks-ass.net> <2734a37ebed2432291345aaa8d9fd47e@AcuMS.aculab.com> <20211112015003.pefl656m3zmir6ov@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211112015003.pefl656m3zmir6ov@treble> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 11, 2021 at 05:50:03PM -0800, Josh Poimboeuf wrote: > Hm, I think there is actually a livepatch problem here. I suspected as much, because I couldn't find any code dealing with it when I looked in a hurry.. :/ > Some ideas to fix: > c) Update the reliable stacktrace code to mark the stack unreliable if > it has a function with ".cold" in the name? Why not simply match func.cold as func in the transition thing? Then func won't get patched as long as it (or it's .cold part) is in use. This seems like the natural thing to do. If there are enough .cold functions, always reporting stacktrace as unreliable will make progress hard, even though it might be perfectly safe. > e) Disable .cold optimization? Yeah, lets not do that. That'll have me lobbying to kill KLP again because it generates crap code.