Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp805871ybh; Wed, 22 Jul 2020 13:54:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyb6r6b78RA2FedAzL6YNIs7otLf80HKK20nESQd3zlG/4pkBrsM3oj5d/RdCGaLMNoEAY X-Received: by 2002:a17:906:2e50:: with SMTP id r16mr1354585eji.371.1595451274314; Wed, 22 Jul 2020 13:54:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595451274; cv=none; d=google.com; s=arc-20160816; b=kmH2NJLS7RFID5DMelbuO6qZrlduepfPi/5bFi5n6Kg+J8Px3QmLZ+D6e5/rOKrggc TOzAhPwhak6NXEIRlJelick3j0AY6MPt926gy90pLCAzpAxSSVfIZGPnIxlkYCpEqW/j 907LWJOgg0n1381iDIp24TlHYD1mkur5fW/SNU8jjBzjw5vd9sLAsCF9BndT8MmlqVYI lUKEL4SrJY6INXgYvptI4Al+KCWLuHPN/XWxzCw1h1zgxhSrINV5o/eHt2DqmJWOc4kK g0p2sKHq8ERWyO2RLv2ucSrATOqdkDblBx0D4oo5AtljmesLaxiBSDROR+gX7OiPPRo6 T3/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=gREK6qCLK9pb41d3z9gQfGNfBTwDTOZTLCxEbymSjNM=; b=RJTiSTgFVLZlLaGFwux4pLpxh+l+TsdKBZ230AUPUthMPkawqNEYj0MmOJ+h4aP72o E+eeV9+HoAYx7B6HueO6dXgZbuqvGImWAbhpAMjrlwevEHrCqL9a7cOLrjYVkk6Lrl8G qeERGQc4WOAx3lNhDg4+QM6Pzzyv8lJ2pG/bnvOyGu35W06cwTvSYXB/sd1DH84kI0JS oZWqu+jlYJvk451ptl8zfd/poVtZuBnMVNqd7FudCnATlAnMl1H5MgAkxzOn8wMrI4cQ JJ7Pi8ZSZKcGXXCv/ZHimzoEur98OiLXdMh/ui7vLmPF7vLPPQGxTBZ1arzixEjvjXnh 6oLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iebOv938; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r12si681037ejs.370.2020.07.22.13.54.12; Wed, 22 Jul 2020 13:54:34 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iebOv938; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732976AbgGVUvt (ORCPT + 99 others); Wed, 22 Jul 2020 16:51:49 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:34576 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726452AbgGVUvt (ORCPT ); Wed, 22 Jul 2020 16:51:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595451107; 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: in-reply-to:in-reply-to:references:references; bh=gREK6qCLK9pb41d3z9gQfGNfBTwDTOZTLCxEbymSjNM=; b=iebOv9384Yn+sjvJ0EZrhe1VNmhZU6fzaK1gqSoR91WO5/0AX0r9QpIKhOm+6sAA4Gx/T8 qP298sDUwtMjiCV19dyacjUFCl1bW1CgfcB9jE5rJrFzGySXxqMPz1yeM0219RoD+Cb8MA /SoEVIvW5iCBgfrwOONW2ktT+awrFBA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-29-Oa6C2FLtPZe93I8etDCh2Q-1; Wed, 22 Jul 2020 16:51:45 -0400 X-MC-Unique: Oa6C2FLtPZe93I8etDCh2Q-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C29CC1030C2A; Wed, 22 Jul 2020 20:51:44 +0000 (UTC) Received: from treble (ovpn-116-168.rdu2.redhat.com [10.10.116.168]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 46FBC8BECC; Wed, 22 Jul 2020 20:51:41 +0000 (UTC) Date: Wed, 22 Jul 2020 15:51:39 -0500 From: Josh Poimboeuf To: Joe Lawrence Cc: live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] docs/livepatch: Add new compiler considerations doc Message-ID: <20200722205139.hwbej2atk2ejq27n@treble> References: <20200721161407.26806-1-joe.lawrence@redhat.com> <20200721161407.26806-2-joe.lawrence@redhat.com> <20200721230442.5v6ah7bpjx4puqva@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 :-) > > 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. > > Maybe it could begin with an overview of the two approaches, and then > > delve more into the details of each approach, and then delve even more > > into the gory details about compiler optimizations. > > > > Up until now, the livepatch documentation has danced around the particular > creation method and only described the API in abstract. If a compiler > considerations doc needs to have that complete context then I'd suggest we > reorganize the entire lot as a prerequisite. I wouldn't say it *needs* to have that context. But it would be a lot more useful with it. As you pointed out, the existing documents do need to be reorganized into a more cohesive whole. -- Josh