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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A6E5C433FE for ; Wed, 16 Feb 2022 20:01:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229513AbiBPUBn (ORCPT ); Wed, 16 Feb 2022 15:01:43 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:57094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbiBPUBm (ORCPT ); Wed, 16 Feb 2022 15:01:42 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 76395DF9A for ; Wed, 16 Feb 2022 12:01:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645041688; h=from:from: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2VxECJm9oCcTZNF1nwOOvaIbVoK8MPKCQvBO1i/w1TA=; b=Yez2ZwI0zqRcJ0zllVPyFDBFn9/xuYLuexz6ErBY8X8/+agxUXY2aTCoRvnlcYahp8KDMb Nb5JsNGUQHENipJPuU+wltj7Fms65LG6A/wISWeTs+N9Lkjl1sbKM9olEs9fQACgbrq6Qj qOCRhmNUIbZNUmQjsn7QqleLvy73paQ= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-513-lT8JzSyVO7mugXa7n-wm4w-1; Wed, 16 Feb 2022 15:01:27 -0500 X-MC-Unique: lT8JzSyVO7mugXa7n-wm4w-1 Received: by mail-qk1-f200.google.com with SMTP id de36-20020a05620a372400b00508b2c3063eso2141235qkb.12 for ; Wed, 16 Feb 2022 12:01:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=2VxECJm9oCcTZNF1nwOOvaIbVoK8MPKCQvBO1i/w1TA=; b=O4VArnJD2XWCT//tfqbmX46dJmjyeTwpQKqCsArzV8/X0ZD+oPip2/MO4w5+NDArXG ReYqz3XqMD2MALhMYMVIMFly5p+sgV8g3ELQ5gH7eLrIWOo2mhcJ3R8yJP7pejS/hfsB imHUPHJ88rmHVMoEPj35qUQ8nq6zDia2p7osXxmZgtKSpAKZ/RGJsDdQDuo4T/CvGzUe vaGo0YXLbeQR1ZolHxLWFqQfl9k0EAPwIeJDwLvxYIAZGO1J4cowrRnPTZw0xNA+x9g9 g4cnuU52fqGG95Wy5MfYP0Z0lLxyzevs+haXm24fXY13w+JXkZGKI60XG0q68sE+v5Q/ fEhA== X-Gm-Message-State: AOAM530WHfYot0TLttRaFGqDUbaTJs6LY2uMDXulz1q7/O5K2TXTLlWu RzOpfryAVIp22hSeYfs/x8QGidXTnu6x2EUfyCmNTq4Yl56SxmQdW+bqHgQgfRN6MKf1Uh1K8tU KMpy1YGBSs3gI1LusIMSHROGvZA== X-Received: by 2002:ae9:eb12:0:b0:608:4151:c70f with SMTP id b18-20020ae9eb12000000b006084151c70fmr1842265qkg.281.1645041686718; Wed, 16 Feb 2022 12:01:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJzcmcVnXIz7khB34mtSJ5XeCHKuXXwpaasMWVF3vmW0irrcQH4GnwIH7nMDtcIH2X2ytZ5b9A== X-Received: by 2002:ae9:eb12:0:b0:608:4151:c70f with SMTP id b18-20020ae9eb12000000b006084151c70fmr1842215qkg.281.1645041686423; Wed, 16 Feb 2022 12:01:26 -0800 (PST) Received: from treble ([2600:1700:6e32:6c00::15]) by smtp.gmail.com with ESMTPSA id p6sm8916153qkg.33.2022.02.16.12.01.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 12:01:25 -0800 (PST) Date: Wed, 16 Feb 2022 12:01:20 -0800 From: Josh Poimboeuf To: Miroslav Benes Cc: =?utf-8?B?RsSBbmctcnXDrCBTw7JuZw==?= , Alexander Lobakin , linux-hardening@vger.kernel.org, x86@kernel.org, Borislav Petkov , Jesse Brandeburg , Kristen Carlson Accardi , Kees Cook , Miklos Szeredi , Ard Biesheuvel , Tony Luck , Bruce Schlobohm , Jessica Yu , kernel test robot , Evgenii Shatokhin , Jonathan Corbet , Masahiro Yamada , Michal Marek , Nick Desaulniers , Herbert Xu , "David S. Miller" , Thomas Gleixner , Will Deacon , Ingo Molnar , Christoph Hellwig , Dave Hansen , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Arnd Bergmann , Nathan Chancellor , Masami Hiramatsu , Marios Pomonis , Sami Tolvanen , "H.J. Lu" , Nicolas Pitre , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-arch@vger.kernel.org, live-patching@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH v10 02/15] livepatch: avoid position-based search if `-z unique-symbol` is available Message-ID: <20220216200120.djt6ijjenmcxmko6@treble> References: <20220209185752.1226407-1-alexandr.lobakin@intel.com> <20220209185752.1226407-3-alexandr.lobakin@intel.com> <20220211174130.xxgjoqr2vidotvyw@treble> <20220211183529.q7qi2qmlyuscxyto@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: live-patching@vger.kernel.org On Wed, Feb 16, 2022 at 04:15:20PM +0100, Miroslav Benes wrote: > > > I subscribe to llvm@lists.linux.dev and happen to notice this message > > > (can't keep up with the changes...) > > > I am a bit concerned with this option and replied last time on > > > https://lore.kernel.org/r/20220105032456.hs3od326sdl4zjv4@google.com > > > > > > My full reasoning is on > > > https://maskray.me/blog/2020-11-15-explain-gnu-linker-options#z-unique-symbol > > > > Ah, right. Also discussed here: > > > > https://lore.kernel.org/all/20210123225928.z5hkmaw6qjs2gu5g@google.com/T/#u > > https://lore.kernel.org/all/20210125172124.awabevkpvq4poqxf@treble/ > > > > I'm not qualified to comment on LTO/PGO stability issues, but it doesn't > > sound good. And we want to support livepatch for LTO kernels. > > Hm, bear with me, because I am very likely missing something which is > clear to everyone else... > > Is the stability really a problem for the live patching (and I am talking > about the live patching only here. It may be a problem elsewhere, but I am > just trying to understand.)? I understand that two different kernel builds > could have a different name mapping between the original symbols and their > unique renames. Not nice. But we can prepare two different live patches > for these two different kernels. Something one would like to avoid if > possible, but it is not impossible. Am I missing something? Maybe Fāng-ruì can clarify, but my understanding was that the stability issue affects the kernel in general (particularly if LTO or PGO is enabled) and isn't necessarily specific to livepatch itself. -- Josh