Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1081890ybe; Thu, 5 Sep 2019 10:02:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8v2/oe+5g9Xge1jPh+rEQXfrIiXxZIE5XUEoOH6rMtbklS/fHKlhp9v746wwZJBaxQZ3y X-Received: by 2002:a17:90a:ba8a:: with SMTP id t10mr5067915pjr.142.1567702922614; Thu, 05 Sep 2019 10:02:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567702922; cv=none; d=google.com; s=arc-20160816; b=ksiJ2k3vGsBS3hwPzftMimvdTrSW6X1+fLmuJsn1A9O6h1G5hxeWAccALhHmuY80Rz gwZE/YUtbquOKhlBRaDbyx2jSFQJ6dARn18BkKJEQ+0gx55IeWJOWOYXslNk6pgsW1aU pS0otUfKmepCxggJxS4SJMgA6F5YQx59826XhNKmkJfpv5LOeYOvKTKVPut8QQLdnd3w RO87MznPSovvJYNH16kGdSldV9J0c1/fhRSjacCP0TkfXmeLwFP/muksJEMA836OvMLq LO8lHEzVhn7J2Zx7+blbXd7jk3SFPmNZs4yuq+ncQajlRwPV1r1M+v/qRCWG8xyU+2Al 2RyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=SuGhGUevPXOMe7octRnkBrne/StKVZ9jOFkOnWpxSog=; b=pcUlCB/JslwVNpgYiAtLGvR/xmctJfApm8T58zE0ED7iNPcyzkM2HMphC3qkuvdBES zxx5JVhCQSM9D7fJfHMFRWQX5oS7l9ThPspsgNk1nRzYo1qzBCFxnXPJFaLwOWuqV8Ml WFX8owNwN72UJCERiQuPj8+cPgkSoCarjht732LuXdUCbMeYHDM7UDQLDQh0htfHApYL xU4EbsloJIw4QV1eRQo1JqtA0RzllHQYL+x/lVmYiiiFzpGp4Z9RBFZHSEqcANrfzXSH 2agSb1jt6bMBoQpguzs6g6fAoK0gg/l8q7lkjIwhmbYHV5rqgInxReb34jDMBkHkLrLP 3Q0g== 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 h3si2519251plr.25.2019.09.05.10.01.43; Thu, 05 Sep 2019 10:02:02 -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 S2387908AbfIEMpS (ORCPT + 99 others); Thu, 5 Sep 2019 08:45:18 -0400 Received: from mx2.suse.de ([195.135.220.15]:40652 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731301AbfIEMpR (ORCPT ); Thu, 5 Sep 2019 08:45:17 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 75543B653; Thu, 5 Sep 2019 12:45:16 +0000 (UTC) From: Miroslav Benes To: jikos@kernel.org, jpoimboe@redhat.com, pmladek@suse.com Cc: joe.lawrence@redhat.com, nstange@suse.de, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Miroslav Benes Subject: [RFC PATCH v2 0/3] livepatch: Clear relocation targets on a module removal Date: Thu, 5 Sep 2019 14:45:11 +0200 Message-Id: <20190905124514.8944-1-mbenes@suse.cz> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Updated version with Petr's feedback. It looks a bit different and better now (I would say). Not that it should be considered before we decide what to do with late module patching, but I finished it before the discussion started and someone could be interested. v1: http://lore.kernel.org/r/20190719122840.15353-1-mbenes@suse.cz Tested on x86_64, ppc64le and s390x. Cross-compiled on arm64 to verify that nothing is broken. [1] 20180602161151.apuhs2dygsexmcg2@treble [2] 1561019068-132672-1-git-send-email-cj.chengjian@huawei.com [3] 20180607092949.1706-1-mbenes@suse.cz Miroslav Benes (3): livepatch: Clear relocation targets on a module removal livepatch: Unify functions for writing and clearing object relocations livepatch: Clean up klp_update_object_relocations() return paths arch/powerpc/kernel/module_64.c | 45 +++++++++++++++++++++++++ arch/s390/kernel/module.c | 8 +++++ arch/x86/kernel/module.c | 43 ++++++++++++++++++++++++ include/linux/moduleloader.h | 7 ++++ kernel/livepatch/core.c | 58 ++++++++++++++++++++++++--------- 5 files changed, 146 insertions(+), 15 deletions(-) -- 2.23.0