Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp881185lqt; Fri, 7 Jun 2024 01:06:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW/jwCC/58nv2gI4fhzXBSHshRM+olOaOV5x9+giBbC4Rkc4ItpN42DiFoZmudTC520wNH5az/cFbzE+eJppjSi17jK8/ePsRHADqymTA== X-Google-Smtp-Source: AGHT+IEVrrsbwUX8oo9apJ+rw6v33/bjdNuSPzKsAKeLnqVlCmtkB9Fu3sjjD/GJw27Upq+xWDm/ X-Received: by 2002:a05:6a20:3211:b0:1af:e624:b9b2 with SMTP id adf61e73a8af0-1b2f98090d3mr1601829637.19.1717747578507; Fri, 07 Jun 2024 01:06:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717747578; cv=pass; d=google.com; s=arc-20160816; b=Khl1Q2UDzyEL2TFjOvUVQoJkvmrajZhM2HQY/R3977Buuzp6GaCq6PKoDGUxv69ZE4 i40p6epT6C1R+DVhJpdSTns0HBwHmh/RbNxOzf/wFDPe+vFBe5mGU0J4tWNW3ykKh/bf Fe1Pm90BXnBfudMrOQ2Wewgxghq+/HDggv8JoyEmbA5w47Lf2jHw5+SqS91gl6e99DM4 PaeWO0RWv4IJIRABWAsStUlaQbSBF1FoqenXmuPu+N8aZJ/svjZA7VwCCjIaKkNK4Z7w b6qljkHFfpBAjbM2NXaKqNeHkIovvJCwclujLnljnXnSuTwGsx4PsgFvKlRSa/UCH7m6 /RwQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:message-id:in-reply-to:subject:cc:to:from :date:dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=QrS1YTupYUqFB+6ocpJF2ZlaZZl5/f78K8n0nIv17hg=; fh=Ri1cpu5eurBOC5pEZkCFLTCZaj2Li3WdMU6hvLBpGh8=; b=Iwppm9QI9L8xMARwmXvZ6ld0gM6ZxAR/uo7jmYLVZ6HzDjwneQAL8PCmtWM2vBmkrR vJAHJvVMu3MknLpnbZm4P/sC7MWwsSdo4mjKiBS9lnAsd04VCfAiMjROIDafrFgB+L93 oC/uNutmLDNxUFr+gu0yJTxAcJ8evhr4FjnjkyXl/pfjTfD87Zyxnkl8DBGh4DYJ+YTE DAb9MbepuPTNznWpPeSvNumQTtnksI1HLJ95JrYAo0g8Pf0bp8hYQXtbgJzKY8rfHLc2 lkHex1DiC532z6+jH2C7Me+bf9R8ohivrcW4xRvPhTL8j0lSI01ZJXvavAQHV8HSgX3R LFhA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=fVVQYJv8; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=fVVQYJv8; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-205580-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205580-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f6bd7f4063si26046175ad.502.2024.06.07.01.06.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 01:06:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-205580-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=fVVQYJv8; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=fVVQYJv8; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-205580-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205580-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 69F11B2467C for ; Fri, 7 Jun 2024 08:01:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A84415AAC1; Fri, 7 Jun 2024 08:01:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="fVVQYJv8"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="ML1xiPMp"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="fVVQYJv8"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="ML1xiPMp" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CCDBA15AAC8; Fri, 7 Jun 2024 08:01:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717747271; cv=none; b=ndjiLwsVPk4yXU7UxkdEi6xuIi6VsoxuFwttiRzJ4wSIJyq9MIKoPg5mmBJdMiYtGHwcTUnm3noKJN/c3c6P0888IB1AoMA1W/1A50L7I9b65X5qNlruy0f4mCegPzJtOiQiKlTE4UFbeCs/Z7tLwH/isfL1+lZU5hByqcXgO4E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717747271; c=relaxed/simple; bh=5Mi/7plwqdDd5Oei9118sD4entkbXks9AUfifHbB7g8=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=Khmpn3FhdIXpHqmH5/dZ4TY1VbN4tZDOoBHnVTXHEWsdobFDFMMi0GaHEAaizwviFku0HPAXxM167qIPHZMdNd3LXKjGbYkNGRYksEPtyimRa80kNz0s8mSugg3dvLSgWpSJZO8AKGtuZ6uzNYifS9kOCF6N7wkQSq/g7wv/9SY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=fVVQYJv8; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=ML1xiPMp; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=fVVQYJv8; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=ML1xiPMp; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Received: from pobox.suse.cz (unknown [10.100.2.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 0FF3A21B4D; Fri, 7 Jun 2024 08:01:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1717747268; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QrS1YTupYUqFB+6ocpJF2ZlaZZl5/f78K8n0nIv17hg=; b=fVVQYJv8RpG5Qbw8R1JdsJtqImclCSJeg4XyRWUPX6iI8xDuJ7S2QGQbCYm3jmXbPken08 XL3padugHEdgqnVClxCYeeROVGJ8FDaUQT7/FVy3Uxo9u2+GFyVfSnyj6gk5ruuXzSWZi7 h2wlXc6lyS1i67q7ElHp/MiFodsY1Lc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1717747268; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QrS1YTupYUqFB+6ocpJF2ZlaZZl5/f78K8n0nIv17hg=; b=ML1xiPMp9+6pFJg90cDJs0gk7jlcPR1kxr8b54KAaJhvlucbe6mj4hBApux5JSAKk/+rQ2 6tcfN/C1/iWWlhCA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1717747268; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QrS1YTupYUqFB+6ocpJF2ZlaZZl5/f78K8n0nIv17hg=; b=fVVQYJv8RpG5Qbw8R1JdsJtqImclCSJeg4XyRWUPX6iI8xDuJ7S2QGQbCYm3jmXbPken08 XL3padugHEdgqnVClxCYeeROVGJ8FDaUQT7/FVy3Uxo9u2+GFyVfSnyj6gk5ruuXzSWZi7 h2wlXc6lyS1i67q7ElHp/MiFodsY1Lc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1717747268; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QrS1YTupYUqFB+6ocpJF2ZlaZZl5/f78K8n0nIv17hg=; b=ML1xiPMp9+6pFJg90cDJs0gk7jlcPR1kxr8b54KAaJhvlucbe6mj4hBApux5JSAKk/+rQ2 6tcfN/C1/iWWlhCA== Date: Fri, 7 Jun 2024 10:01:07 +0200 (CEST) From: Miroslav Benes To: Joe Lawrence cc: live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] livepatch: Add compiler optimization disclaimer/docs In-Reply-To: Message-ID: References: <20200721161407.26806-1-joe.lawrence@redhat.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Level: X-Spamd-Result: default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-0.991]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_ZERO(0.00)[0]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; FROM_HAS_DN(0.00)[]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCPT_COUNT_THREE(0.00)[3] X-Spam-Score: -4.30 X-Spam-Flag: NO Hi, On Fri, 31 May 2024, Joe Lawrence wrote: > On 5/31/24 07:23, Miroslav Benes wrote: > > Hi, > > > > On Tue, 21 Jul 2020, Joe Lawrence wrote: > > > >> In light of [PATCH] Revert "kbuild: use -flive-patching when > >> CONFIG_LIVEPATCH is enabled" [1], we should add some loud disclaimers > >> and explanation of the impact compiler optimizations have on > >> livepatching. > >> > >> The first commit provides detailed explanations and examples. The list > >> was taken mostly from Miroslav's LPC talk a few years back. This is a > >> bit rough, so corrections and additional suggestions welcome. Expanding > >> upon the source-based patching approach would be helpful, too. > >> > >> The second commit adds a small README.rst file in the livepatch samples > >> directory pointing the reader to the doc introduced in the first commit. > >> > >> I didn't touch the livepatch kselftests yet as I'm still unsure about > >> how to best account for IPA here. We could add the same README.rst > >> disclaimer here, too, but perhaps we have a chance to do something more. > >> Possibilities range from checking for renamed functions as part of their > >> build, or the selftest scripts, or even adding something to the kernel > >> API. I think we'll have a better idea after reviewing the compiler > >> considerations doc. > > > > thanks to Marcos for resurrecting this. > > > > Joe, do you have an updated version by any chance? Some things have > > changed since July 2020 so it calls for a new review. If there was an > > improved version, it would be easier. If not, no problem at all. > > > > Yea, it's been a little while :) I don't have any newer version than > this one. I can rebase, apply all of the v1 suggestions, and see where > it stands. LMK if you can think of any specifics that could be added. I will walk through the patches first to see if there is something which can/should be changed given the development since then. > For example, CONFIG_KERNEL_IBT will be driving some changes soon, > whether it be klp-convert for source-based patches or vmlinux.o binary > comparison for kpatch-build. True. > I can push a v2 with a few changes, but IIRC, last time we reviewed > this, it kinda begged the question of how someone is creating the > livepatch in the first place. As long as we're fine holding that > thought for a while longer, this doc may still be useful by itself. If I remember correctly, the conclusion was that this doc was beneficial on its own. Miroslav