Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4164065ybz; Tue, 28 Apr 2020 06:51:01 -0700 (PDT) X-Google-Smtp-Source: APiQypLzJx4vh4ErTSSWs0Q8cQirD11G+Ii0+72+6PEeZSZDBUnyAnJ4I+himkwQL44ck1Rh/pUZ X-Received: by 2002:a17:906:bfc9:: with SMTP id us9mr23251604ejb.84.1588081861709; Tue, 28 Apr 2020 06:51:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588081861; cv=none; d=google.com; s=arc-20160816; b=oIu70ESXu0ClBQXNV9IziI1Ug9rH7XXTyCx1G5m6OKmJD8eSnd+1lgAzXG/vtfhBdQ pWEUdEnhxJ3KHlG09sgJu7NAqCPructrFStTbiimT6etgVnYBxiKGqHOpXcOh+Wmc+iC 9SJ1gY2ONA5SEGxhogPPHcRGlPIGEvkgODnsKCFN+BjdMkjyDFHitmiU4vUQe/W68MCc FVDYtRN+im6LMN4ooYjOMtBVDIWnRCNcyOsKrLT+rg/P1q+x9hULVkUlijUIMnYugvDG UVOn/X2uolMGLj2XS92kabKCltEdk6wEEAzu4EriT9i2RpelWQdZs2qXad94l6NWsjz3 qI2Q== 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; bh=GpTiffMEssnrRRwfjv4HCvPgPN2H6MVknTLQeXVIwOI=; b=qLrtl3jfAjDNOrvdkwlRX5f9lZAkrQHtieMRjvOEA/vVo85cwYE+St4PhHYPSQ3Hwe 8q0WI0/G4zk0ee36k1U3OlBq/XDF5+fL9BhNYnLIk/XsUFnr0mI79KpgBVaTC9ywcF42 4C+4V+fV+JTYRW0dYLX0BjrNyTCIysijjE++0orQ72grm7/kcb7RMb1/4S+iHAsXBCDG vGXo/d720tQEKkGhfzyrTj8fB6U9wJVHkJNHP9g3wskPXppkvWd4t39hDAoRFABzEuj/ fslWczutNW27dxxrS1mdZRWn8SyUY4dwwxI7aE3N0cv44PGYdjGcdwkISWX6HEjPURYS SyTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b1si1767483edh.318.2020.04.28.06.50.38; Tue, 28 Apr 2020 06:51:01 -0700 (PDT) Received-SPF: pass (google.com: 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; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727853AbgD1NtB (ORCPT + 99 others); Tue, 28 Apr 2020 09:49:01 -0400 Received: from mx2.suse.de ([195.135.220.15]:58844 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726798AbgD1NtA (ORCPT ); Tue, 28 Apr 2020 09:49:00 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id CF97AAD4B; Tue, 28 Apr 2020 13:48:57 +0000 (UTC) Date: Tue, 28 Apr 2020 15:48:58 +0200 (CEST) From: Miroslav Benes To: Josh Poimboeuf cc: live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Jessica Yu , Joe Lawrence Subject: Re: [PATCH v3 00/10] livepatch,module: Remove .klp.arch and module_disable_ro() In-Reply-To: Message-ID: References: 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 On Sat, 25 Apr 2020, Josh Poimboeuf wrote: > v3: > - klp: split klp_write_relocations() into object/section specific > functions [joe] > - s390: fix plt/got writes [joe] > - s390: remove text_mutex usage [mbenes] > - x86: do text_poke_sync() before releasing text_mutex [peterz] > - split x86 text_mutex changes into separate patch [mbenes] > > v2: > - add vmlinux.ko check [peterz] > - remove 'klp_object' forward declaration [mbenes] > - use text_mutex [jeyu] > - fix documentation TOC [jeyu] > - fix s390 issues [mbenes] > - upstream kpatch-build now supports this > (though it's only enabled for Linux >= 5.8) > > 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 > > This has been tested with kpatch-build integration tests and klp-convert > selftests. > > Josh Poimboeuf (7): > livepatch: Disallow vmlinux.ko > livepatch: Apply vmlinux-specific KLP relocations early > livepatch: Prevent module-specific KLP rela sections from referencing > vmlinux symbols > s390: Change s390_kernel_write() return type to match memcpy() > livepatch: Remove module_disable_ro() usage > module: Remove module_disable_ro() > x86/module: Use text_mutex in apply_relocate_add() > > Peter Zijlstra (3): > livepatch: Remove .klp.arch > s390/module: Use s390_kernel_write() for late relocations > x86/module: Use text_poke() for late relocations > > Documentation/livepatch/module-elf-format.rst | 15 +- > arch/s390/include/asm/uaccess.h | 2 +- > arch/s390/kernel/module.c | 147 +++++++++------ > arch/s390/mm/maccess.c | 9 +- > arch/um/kernel/um_arch.c | 16 ++ > arch/x86/kernel/Makefile | 1 - > arch/x86/kernel/livepatch.c | 53 ------ > arch/x86/kernel/module.c | 43 ++++- > include/linux/livepatch.h | 17 +- > include/linux/module.h | 2 - > kernel/livepatch/core.c | 177 +++++++++++------- > kernel/module.c | 23 +-- > 12 files changed, 277 insertions(+), 228 deletions(-) > delete mode 100644 arch/x86/kernel/livepatch.c With the small issue in patch 2 fixed Acked-by: Miroslav Benes Great stuff. I am happy we will get rid of the arch-specific code. M