Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1396169pxa; Thu, 6 Aug 2020 06:53:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGJHsDdo00fw71iKWSQv8jGPb9AnFMKnaexHeb/EsBKKPXeojiQ6kG9euofhw8N1k9wqNC X-Received: by 2002:a05:6402:403:: with SMTP id q3mr4055587edv.12.1596722016456; Thu, 06 Aug 2020 06:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596722016; cv=none; d=google.com; s=arc-20160816; b=vwygcIGMzxARs0nBzakIuD7UUghFWszgPdqG2/EUXQFA7IvVQwiVFwBO+vXUsuKEG2 cD+2IvqACIbrH/b+9TL6JMJclPzUiA6ztSHBdyq9AVAkYuYCin0LaxUdp0aakASrve15 p8nIswWYFvciV5Bf4BMS5fbwbCFUf+pISa5ZUuFgXXUc8MXkXGo+eMlylwSt1jRKW5Wd ZfljmmlxP+loGwIRBhzPRgaGaw7160qsU1eAT7jSI3yYTKaeVEkDHcwSVLVta8E259y5 nxj0SRBig/L0BqT9z0jNVNb/URLjAdj7mANY01oIw49qqR9mmStML1b5uFQ0O1k4M4M8 tpOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=XdTsVJdntfwmrb/7axHR6nOHCi5R019HvwQBKeYI2xY=; b=D7mxV4pSiWSP8GDWqiP00ZLgmObX8HysyFiYaGvRpNwSyuUaGgrw3KGLB6WR3E876w TpxHUT4Y0C4LNAyhHCOt/zcGeNDlq9yNeRzinhVRAFqs6W6L5dAliMabKmDPmjyzzHM4 w4tlBNIG8fJDAHL9Yjwh8pLhyKsNcQpsnSzU2Q2sHgdVNa9bUHHXW/YrH78r5TYs1QZL UxxdL6e7UVlvHDl9UyZbXo7/g5oi1e6XG7uWgI6TepV/tCtv2305+ATXoCUmrgKxYimn c1cnkYNw2/1f3U5oI6w62XWHLzuraD+NckZc6YjscvYn43aI3WAN6IMTHK3t3QJBFzvP w7EA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lz17si3178260ejb.521.2020.08.06.06.52.39; Thu, 06 Aug 2020 06:53:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726927AbgHFNOi (ORCPT + 99 others); Thu, 6 Aug 2020 09:14:38 -0400 Received: from mx2.suse.de ([195.135.220.15]:58966 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728189AbgHFNJG (ORCPT ); Thu, 6 Aug 2020 09:09:06 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 427C4AB55; Thu, 6 Aug 2020 12:03:54 +0000 (UTC) Date: Thu, 6 Aug 2020 14:03:36 +0200 From: Petr Mladek To: Josh Poimboeuf Cc: Joe Lawrence , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] docs/livepatch: Add new compiler considerations doc Message-ID: <20200806120336.GP24529@alley> References: <20200721161407.26806-1-joe.lawrence@redhat.com> <20200721161407.26806-2-joe.lawrence@redhat.com> <20200721230442.5v6ah7bpjx4puqva@treble> <20200722205139.hwbej2atk2ejq27n@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200722205139.hwbej2atk2ejq27n@treble> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 2020-07-22 15:51:39, Josh Poimboeuf wrote: > On Wed, Jul 22, 2020 at 01:03:03PM -0400, Joe Lawrence wrote: > > On 7/21/20 7:04 PM, Josh Poimboeuf wrote: > > > On Tue, Jul 21, 2020 at 12:14:06PM -0400, Joe Lawrence wrote: > > > > Compiler optimizations can have serious implications on livepatching. > > > > Create a document that outlines common optimization patterns and safe > > > > ways to livepatch them. > > > > > > > > Signed-off-by: Joe Lawrence > > > > > > There's a lot of good info here, but I wonder if it should be > > > reorganized a bit and instead called "how to create a livepatch module", > > > because that's really the point of it all. > > > > > > > That would be nice. Would you consider a stand-alone compiler-optimizations > > doc an incremental step towards that end? Note that the other files > > (callbacks, shadow-vars, system-state) in their current form might be as > > confusing to the newbie. > > It's an incremental step towards _something_. Whether that's a cohesive > patch creation guide, or just a growing hodgepodge of random documents, > it may be too early to say :-) Yes, it would be nice to have a cohesive documentation. But scattered pieces are better than nothing. > > > I'm thinking a newcomer reading this might be lost. It's not > > > necessarily clear that there are currently two completely different > > > approaches to creating a livepatch module, each with their own quirks > > > and benefits/drawbacks. There is one mention of a "source-based > > > livepatch author" but no explanation of what that means. > > > > > > > Yes, the initial draft was light on source-based patching since I only > > really tinker with it for samples/kselftests. The doc was the result of an > > experienced livepatch developer and Sunday afternoon w/the compiler. I'm > > sure it reads as such. :) > > Are experienced livepatch developers the intended audience? If so I > question what value this document has in its current form. Presumably > experienced livepatch developers would already know this stuff. IMHO, this document is useful even for newbies. They might at least get a clue about these catches. It is better than nothing. I do not want to discourage Joe from creating even better documentation. But if he does not have interest or time to work on it, I am happy even for this piece. Acked-by: Petr Mladek Best Regards, Petr