Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp780198ybz; Sat, 25 Apr 2020 04:12:57 -0700 (PDT) X-Google-Smtp-Source: APiQypJLPgi2UwswFCSHGojTsaP+8I1bhAjW2x1BOo+M6emnTiUDA/JyQVuE+o2J4T/5uGVF7Q2V X-Received: by 2002:a05:6402:3046:: with SMTP id bu6mr11149808edb.106.1587813177829; Sat, 25 Apr 2020 04:12:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587813177; cv=none; d=google.com; s=arc-20160816; b=GLtT7s5kxU0utVDFh+HEntnCQxltWr7fYN5HkRdOKoPGg+miUWELXFHfCxfPPl74+8 HpMjR9porkwFqwEWuVTNuvuqAbM4DGhqNk4pM5qGV+8MCERQVyfhcAyR1ZPhn9DxxxEV XCv40C/d6GdQn1G2K8+lI44V/rBDCe2mNpS6zxFAp20D2TbK4ZsVJvXi62uTSm5vI6tH fNai52/m7ySeAzGNlf7r4E8iX7AJyFH/+zN84AIZpL7RrVTb6djkMzJW318te7hzkHwu RLJksB3OpAU2YnrwSlqKr3LPYTULjWGScXyquCJn4KhuplPQji803yUK8vDCcaQ8hA/w dNMQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HVnDGeFkqHxYb6JYfvKvmBLlLrCl0RNnUymEdkvh3L4=; b=urG0/xC9Sy7L1P0B3AT3+Kj2j0aXvMYwmldQtXU57Q5qnj+Z1H6o7XB24H/5NzC64p 7jMzdZBwFr8acHmKD6cWJ0CU8jZlz0ObQitVYl4EKeFKwLJQTRNUMGQmgG6c56huUqGF GGW7T+KeXtdJaxajSdzXip4KJ5EUVXnpcJ9OBE+26hdIUPfs3W6GUjAbuFAhaQJza1CA i/eG7jZyVGJmuAvffeTcER485zripaHOZyriB4kLlUAFkju3rNJ/SCAxTl1mgxP5IigW cycKL8kA7DQyYcrwtyXXkBtZIrcmJoRGBY9b7Gx8cUvZeMr1m+iP6FiP1gLDTaX4jBn0 nIyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Dhd1vVNx; 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; 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 c22si4981853eja.230.2020.04.25.04.12.34; Sat, 25 Apr 2020 04:12:57 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Dhd1vVNx; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726346AbgDYLJF (ORCPT + 99 others); Sat, 25 Apr 2020 07:09:05 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:29968 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726306AbgDYLJA (ORCPT ); Sat, 25 Apr 2020 07:09:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587812939; 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: in-reply-to:in-reply-to:references:references; bh=HVnDGeFkqHxYb6JYfvKvmBLlLrCl0RNnUymEdkvh3L4=; b=Dhd1vVNxVOK8oRWubgWV3GZFPakVd8vcxxcwFgExS7Js5RlQFINYIzvnd5k9WNun2sTotG kHs6eB5mo/PXnHPzSgmWzaZ2KNAlEda+sxStMpNZypXiYV7+2RHXJ5IqKkYjzlPgR+5mM4 IsI9Kk3ad2p1VEEK9UjsC5Z986FO+3A= 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-251-UdyXikkFMSWe8aotxXWkXQ-1; Sat, 25 Apr 2020 07:08:55 -0400 X-MC-Unique: UdyXikkFMSWe8aotxXWkXQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7A7D9462; Sat, 25 Apr 2020 11:08:54 +0000 (UTC) Received: from treble.redhat.com (ovpn-114-29.rdu2.redhat.com [10.10.114.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id 950ED5C1D4; Sat, 25 Apr 2020 11:08:51 +0000 (UTC) From: Josh Poimboeuf To: live-patching@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Jessica Yu , Joe Lawrence Subject: [PATCH v3 09/10] module: Remove module_disable_ro() Date: Sat, 25 Apr 2020 06:07:29 -0500 Message-Id: <33089a8ffb2e724cecfa51d72887ae9bf70354f9.1587812518.git.jpoimboe@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org module_disable_ro() has no more users. Remove it. Signed-off-by: Josh Poimboeuf Acked-by: Peter Zijlstra (Intel) --- include/linux/module.h | 2 -- kernel/module.c | 13 ------------- 2 files changed, 15 deletions(-) diff --git a/include/linux/module.h b/include/linux/module.h index 1ad393e62bef..e4ef7b36feda 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -860,10 +860,8 @@ extern int module_sysfs_initialized; =20 #ifdef CONFIG_STRICT_MODULE_RWX extern void module_enable_ro(const struct module *mod, bool after_init); -extern void module_disable_ro(const struct module *mod); #else static inline void module_enable_ro(const struct module *mod, bool after= _init) { } -static inline void module_disable_ro(const struct module *mod) { } #endif =20 #ifdef CONFIG_GENERIC_BUG diff --git a/kernel/module.c b/kernel/module.c index 96b2575329f4..f0e414a01d91 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -2016,19 +2016,6 @@ static void frob_writable_data(const struct module= _layout *layout, (layout->size - layout->ro_after_init_size) >> PAGE_SHIFT); } =20 -/* livepatching wants to disable read-only so it can frob module. */ -void module_disable_ro(const struct module *mod) -{ - if (!rodata_enabled) - return; - - frob_text(&mod->core_layout, set_memory_rw); - frob_rodata(&mod->core_layout, set_memory_rw); - frob_ro_after_init(&mod->core_layout, set_memory_rw); - frob_text(&mod->init_layout, set_memory_rw); - frob_rodata(&mod->init_layout, set_memory_rw); -} - void module_enable_ro(const struct module *mod, bool after_init) { if (!rodata_enabled) --=20 2.21.1