Received: by 10.192.165.156 with SMTP id m28csp626048imm; Fri, 13 Apr 2018 05:15:01 -0700 (PDT) X-Google-Smtp-Source: AIpwx49M5Ax3AC5JM/QT+huTsInyeH2C9wK+d4pHKwvunTjPHbeeBPwzrhkazYgE2MJfpx0aNxRP X-Received: by 10.101.78.145 with SMTP id b17mr3955830pgs.350.1523621701727; Fri, 13 Apr 2018 05:15:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523621701; cv=none; d=google.com; s=arc-20160816; b=foYsyiMBwOBcJ52F0srbfSzVYBrfQkIIjb+a/CufbrY2fLZxdRIwwFDqXmtoWQkKFC k3VZ4nxDX055DdswM3EFfAMMw+Y5vs25ECspHBRRi67fo/9pj2N0kkV6e/FSvZh8FeHn M7LXgQS4aLADPmTotyiNb2VSCQuRyUHAaJCZY63o2Q42E3Mh7uBgDixbkRlFyEIXYsAn fA9exNs7QH4zUn0mvieWHQntJ7WGCIGsJd/V7RC/MLvPyDrsgr+t5TNI9YDJ95fV2fjj wmbOLRYwK2uHt2yNz1SC/U3DVY+QVq4ItNBmDw32KL7ewTMqaejdNMWLovY4VYq1bX2E e1nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=6roRa8u5BWM8pRq6INOuyuYgYKgmamyZRcOj2i9Wlvs=; b=Sk/Dqq1fXgjpvI3O7+3w+tS8ugd2xOG0IgwmRE6JQkj3rLjNvGerzKVT1W6rjr1MS8 qdhnfeerSQgYtojwtl6RX7lxVVp2g07ahxpFfKW5/kfeCZpYUOZ6mJcdkdRh11u5mjg0 SrNmpIyO8ja3Fp42J3t7gv3nDtfiVCGS/6aw+851ZN8DQz4ddGm2Gv/XK/W8E2N3jHGw VLAl3v2TChi5C4X4PlKzWHeQIy63smJqP/fhOfzHDnkInVsjKsjlVbvsqxnVFDBssLHe T1V2CSx5dUyewG3+kCyIEhk8Bp/t/axhNTWTpoZ5DwxBmUmoDBAcDMQOeoJX7MA9NEO0 j/tw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i61-v6si5266324plb.560.2018.04.13.05.14.33; Fri, 13 Apr 2018 05:15:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754264AbeDMLUp (ORCPT + 99 others); Fri, 13 Apr 2018 07:20:45 -0400 Received: from mx2.suse.de ([195.135.220.15]:38647 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750960AbeDMLUm (ORCPT ); Fri, 13 Apr 2018 07:20:42 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 02D82AC3B; Fri, 13 Apr 2018 11:20:41 +0000 (UTC) Date: Fri, 13 Apr 2018 13:20:40 +0200 (CEST) From: Miroslav Benes To: Joe Lawrence cc: live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Kosina , Josh Poimboeuf , Petr Mladek , =?ISO-8859-2?Q?Libor_Pech=E1=E8ek?= , Nicolai Stange , Artem Savkov Subject: Re: [PATCH v3] selftests/livepatch: introduce tests In-Reply-To: <1523544871-29444-2-git-send-email-joe.lawrence@redhat.com> Message-ID: References: <1523544871-29444-1-git-send-email-joe.lawrence@redhat.com> <1523544871-29444-2-git-send-email-joe.lawrence@redhat.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, 12 Apr 2018, Joe Lawrence wrote: > Add a few livepatch modules and simple target modules that the included > regression suite can run tests against. Could you include a brief description which features are tested? > Signed-off-by: Joe Lawrence > --- > diff --git a/lib/livepatch/test_klp_shadow_vars.c b/lib/livepatch/test_klp_shadow_vars.c > new file mode 100644 > index 000000000000..18c75b21cb9e > --- /dev/null > +++ b/lib/livepatch/test_klp_shadow_vars.c > > +/* > + * Shadow variable wrapper functions that echo the function and arguments > + * to the kernel log for testing verification. Don't display raw pointers, > + * but use the ptr_id() value instead. > + */ > +void *shadow_get(void *obj, unsigned long id) > +{ > + void *ret = klp_shadow_get(obj, id); > + > + pr_info("klp_%s(obj=PTR%d, id=0x%lx) = PTR%d\n", > + __func__, ptr_id(obj), id, ptr_id(ret)); > + > + return ret; > +} > +void shadow_free(void *obj, unsigned long id, klp_shadow_dtor_t dtor) > +{ > + klp_shadow_free(obj, id, dtor); > + pr_info("klp_%s(obj=PTR%d, id=0x%lx, dtor=PTR%d)\n", > + __func__, ptr_id(obj), id, ptr_id(dtor)); > +} Sparse (make C=1) would be happier with those two being static. Otherwise it works as expected. Good job! Miroslav