Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4575376ybb; Tue, 14 Apr 2020 09:55:50 -0700 (PDT) X-Google-Smtp-Source: APiQypKkO6OWbnCqBb1j45/I5ibNa957YbGogOe9A8HF1E9tqgJEMKBVTgZWR8Hd9RQCr/atKcKz X-Received: by 2002:a17:906:a441:: with SMTP id cb1mr1107861ejb.242.1586883349894; Tue, 14 Apr 2020 09:55:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586883349; cv=none; d=google.com; s=arc-20160816; b=vgKacS/12uoUsBnWQ/+5g3uv0PSqe2PbSQ5HTk0rKCSkJmSH/c3jdpGgvHmJ3pdYHw 5QjPM75eMM9r5SAnHnppd6HRckmqUczCKGnOmM05bXDlQ6WfhSJQ8U2zIlqT8NZqGXH3 fYjntX5BlXfFiUXzaXsufESG3NHUwY2plbz7ie5sGJgvIUgCzzbN4ObmBqFc+FoPdo0L SsjZJIqfnk1j7+22kCC3vfMW/eNmOajobEvgx/UPWu+t5gN8umEI7hl/ZrpyFR9ys3Fp yGfb/wdfotNg1xBlom1k0BwON0poo3a8NB1au9Oow9rM+FqWTCJmgZkP+6Vd780AO2MD 1Axw== 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:dkim-signature; bh=UlM+FhdsavTHBo0maWQwyNgbnLg/LDaCZCHGF6K5dDM=; b=hL0rj6kmLpis/MDjU4vR/XhhUIurUJfkbeR+rgiox9C5ZioZ2Vok5cUp6ZjmOWQ7OH bKJ3xieaSVEfrkbuO35Zvt9Z9ENk+0e4GAPxQ/BTIiu28x6zba40rdAtKfKEKEU199Eo uBbS3czOb5a6sr+r8DfiaHgyTcv4kM+zJqZQgB7Re8CiRNLD4zZVDU7Ue5qcBs9nKWgA RR/TK2UaI6iOoEdSML23/Mav1RIjHKN5uQ6yWfmtXbPvytHAHDFEnsCg/lFabRl1W9b3 n59N7hCdlRWnwdikqwo+7zu3Qn219gbuKALBrgmtTQc1UHDiLfRAZIgWi0cPLqEVn55F Wf9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EzJ6ByU4; spf=pass (google.com: best guess record for 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 x21si2406095ejs.38.2020.04.14.09.55.26; Tue, 14 Apr 2020 09:55:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for 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=EzJ6ByU4; spf=pass (google.com: best guess record for 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 S2391664AbgDNQaM (ORCPT + 99 others); Tue, 14 Apr 2020 12:30:12 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:47901 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2391605AbgDNQ3K (ORCPT ); Tue, 14 Apr 2020 12:29:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586881743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=UlM+FhdsavTHBo0maWQwyNgbnLg/LDaCZCHGF6K5dDM=; b=EzJ6ByU4szLmVfY647tZRkDQqnhsEUKzoYBbe0Oq/xfzAz4CdGviQXwhZeLPekYfMg7pFX WVFB8j5t/oy4OafGnPq+N576ODkckZal1p63J6HANkPRw6n3HtSmNBjTx9TYMVMre6hPlA sSAUjWu3Y2kzW/6NylIXobHZ5ooRaoA= 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-321-bHDB6GF6NuWQCj5vuygEtQ-1; Tue, 14 Apr 2020 12:28:57 -0400 X-MC-Unique: bHDB6GF6NuWQCj5vuygEtQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 83FA2800D53; Tue, 14 Apr 2020 16:28:56 +0000 (UTC) Received: from treble.redhat.com (ovpn-116-146.rdu2.redhat.com [10.10.116.146]) by smtp.corp.redhat.com (Postfix) with ESMTP id D9C1A5DA7C; Tue, 14 Apr 2020 16:28:55 +0000 (UTC) From: Josh Poimboeuf To: live-patching@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Jessica Yu Subject: [PATCH 0/7] livepatch,module: Remove .klp.arch and module_disable_ro() Date: Tue, 14 Apr 2020 11:28:36 -0500 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Better late than never, these patches add simplifications and improvements for some issues Peter found six months ago, as part of his non-writable text code (W^X) cleanups. Highlights: - Remove the livepatch arch-specific .klp.arch sections, which were used to do paravirt patching and alternatives patching for livepatch replacement code. - Add support for jump labels in patched code. - Remove the last module_disable_ro() usage. For more background, see this thread: https://lkml.kernel.org/r/20191021135312.jbbxsuipxldocdjk@treble I've tested this with a modified kpatch-build: https://github.com/jpoimboe/kpatch/tree/no-klp-arch (I'm planning to submit a github PR for kpatch-build, once I get the updated unit/integration tests sorted out. Josh Poimboeuf (4): livepatch: Apply vmlinux-specific KLP relocations early livepatch: Prevent module-specific KLP rela sections from referencing vmlinux symbols livepatch: Remove module_disable_ro() usage module: Remove module_disable_ro() Peter Zijlstra (3): livepatch: Remove .klp.arch s390/module: Use s390_kernel_write() for relocations x86/module: Use text_poke() for relocations Documentation/livepatch/module-elf-format.rst | 12 +- arch/s390/kernel/module.c | 106 +++++++++------ arch/um/kernel/um_arch.c | 16 +++ arch/x86/kernel/Makefile | 1 - arch/x86/kernel/livepatch.c | 53 -------- arch/x86/kernel/module.c | 34 ++++- include/linux/livepatch.h | 19 ++- include/linux/module.h | 2 - kernel/livepatch/core.c | 128 +++++++++++------- kernel/module.c | 22 +-- 10 files changed, 205 insertions(+), 188 deletions(-) delete mode 100644 arch/x86/kernel/livepatch.c --=20 2.21.1