Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9819440imu; Wed, 5 Dec 2018 10:47:14 -0800 (PST) X-Google-Smtp-Source: AFSGD/UzSS/TgWLm2bnJg8Q6LDZbL3JaSDvv5kVIt4xCSfDl63m37CzbVdkM4Q2vQbHmpzh7eyA2 X-Received: by 2002:a17:902:a5ca:: with SMTP id t10mr25205348plq.139.1544035634233; Wed, 05 Dec 2018 10:47:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544035634; cv=none; d=google.com; s=arc-20160816; b=q/Nbjy6tKPd48cqRtQNPKy08WpKm9z+bsmwpd4k6KfuTt0VRy6uJlzX1uqWn0V2f57 wccLD2g4xl9VWVZ3yOgkZLBZcozb53KcTGUQrXZn4Tjp39HwQgBr0RIYIxtnTda+7k4d jGLGTu9ITLVm+GarGjLWt7CbZPgKS/F11UGhHXVMvTYA7SsLfCJ0DalX53ZHfqNRqGcd yGX5UhvNM9RGx98J59L2DGHW7ZTi7060oc5qtZn7YJ7DJswSxI5i7+rdPKySOeoUBVjA dwhEKdAOG2Mo/ECmfUkTspoD51B4Nq0Wd5SJNpxGhzOm1y31Tgi3bNCRHZhd6riNYyIk GKWg== 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=FH9sV8hXwYhl+2lmnnYKxyUB1kwTauLf7SThmpcDohc=; b=kuktLthD/PzdMmOSJZl6SRacki+hXbiVVMNxiTbk4EjvwddFA2KDOif9ZoU/p+/a/K OKe0dvKXmhjCPJSDkyr/PxUL3bBJ9bW3+PBHoAJMk02raAjWLRVF+gw/+pB79pc4kQiU xY7Sz3sM99c7VoiobsptKXWUOzA8HVGgcMVCxk6353LZQ3i42mQefFnroYfd3MorNF8f ZUrAN1UnUbzNrzkpbaHKMy8LJNqUftc1T87IUHojHQ5U2gxVg4p1c7tvF8Q3BjgCp9Xk XB38W5HqTdXc7JjdMRABHW1rUkecjb4xvT/XBNVIHCTUXsIHzWyFbV1QpHniQOdPiOzX ytcw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h19si21759665plr.67.2018.12.05.10.46.59; Wed, 05 Dec 2018 10:47:14 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727889AbeLESpK (ORCPT + 99 others); Wed, 5 Dec 2018 13:45:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56316 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727297AbeLESpK (ORCPT ); Wed, 5 Dec 2018 13:45:10 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9B9E230C57E8; Wed, 5 Dec 2018 18:45:09 +0000 (UTC) Received: from redhat.com (dhcp-17-208.bos.redhat.com [10.18.17.208]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1173E5D756; Wed, 5 Dec 2018 18:45:07 +0000 (UTC) Date: Wed, 5 Dec 2018 13:45:07 -0500 From: Joe Lawrence To: Petr Mladek Cc: Jiri Kosina , Josh Poimboeuf , Miroslav Benes , Jason Baron , Evgenii Shatokhin , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v14 01/11] livepatch: Change unsigned long old_addr -> void *old_func in struct klp_func Message-ID: <20181205184507.teyjmy4bp7tlrtge@redhat.com> References: <20181129094431.7801-1-pmladek@suse.com> <20181129094431.7801-2-pmladek@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181129094431.7801-2-pmladek@suse.com> User-Agent: Mutt/1.6.2-neo (2016-08-08) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Wed, 05 Dec 2018 18:45:09 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 29, 2018 at 10:44:21AM +0100, Petr Mladek wrote: > The address of the to be patched function and new function is stored > in struct klp_func as: > > void *new_func; > unsigned long old_addr; > > The different naming scheme and type is derived from the way how ^^^^^^^^^^^ s/the way how/the way > the addresses are set. @old_addr is assigned at runtime using > kallsyms-based search. @new_func is statically initialized, > for example: > > static struct klp_func funcs[] = { > { > .old_name = "cmdline_proc_show", > .new_func = livepatch_cmdline_proc_show, > }, { } > }; > > This patch changes unsigned log old_addr -> void *old_func. It removes ^^^^^^^^^^^^ s/unsigned log/unsigned long > some confusion when these address are later used in the code. It is > motivated by a followup patch that adds special NOP struct klp_func > where we want to assign func->new_func = func->old_addr respectively > func->new_func = func->old_func. > > This patch does not modify the existing behavior. > > Suggested-by: Josh Poimboeuf > Signed-off-by: Petr Mladek > --- Acked-by: Joe Lawrence -- Joe