Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751204AbdFAUFZ (ORCPT ); Thu, 1 Jun 2017 16:05:25 -0400 Received: from mx2.suse.de ([195.135.220.15]:39464 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751029AbdFAUFY (ORCPT ); Thu, 1 Jun 2017 16:05:24 -0400 Date: Thu, 1 Jun 2017 22:05:21 +0200 (CEST) From: Jiri Kosina X-X-Sender: jkosina@pobox.suse.cz To: Joe Lawrence cc: live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Poimboeuf , Jessica Yu , Miroslav Benes , Petr Mladek Subject: Re: [PATCH 0/3] livepatch: add shadow variable API In-Reply-To: <1496341526-19061-1-git-send-email-joe.lawrence@redhat.com> Message-ID: References: <1496341526-19061-1-git-send-email-joe.lawrence@redhat.com> User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1035 Lines: 28 On Thu, 1 Jun 2017, Joe Lawrence wrote: > This patchset is a simplified livepatch port of kpatch's "shadow" > variable API [1]. The kpatch project has successfully employed such > shadow variables to implement patches that have extended data structure > elements. This API provides livepatch a means of associating new, > shadow data fields with existing data structures. > > See the first patch for the implementation, the second for further > documentation (API, conccurency notes, use-case code snippets) and the > third patch for an update to the sample livepatch module using shadow > variables. Thanks a lot for initiating this. The only issue I've spotted so far -- is there any reason, why the API completely ignores task_struct->patch_state, and always returns the 'new' value? This basically offloads the responsibility for deciding between old/new to each and every caller, and that feels much more error prone compared to having this automatically done by klp_shadow_get(). Thanks, -- Jiri Kosina SUSE Labs