Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp735742ybz; Wed, 29 Apr 2020 08:28:44 -0700 (PDT) X-Google-Smtp-Source: APiQypIv+degqo0n30EhRZ2X+XU1wJYGXg6mX0bmmQrppTLy8XTc5cCFshTmUBjnw00zDmty7iR2 X-Received: by 2002:a05:6402:14c8:: with SMTP id f8mr2958323edx.272.1588174124331; Wed, 29 Apr 2020 08:28:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588174124; cv=none; d=google.com; s=arc-20160816; b=e/LFG4u0L4Rm1s3bMXD2+ODZXmuX10ekslUusn4kJ7P0vjz6WGLwEmKg33aWTcyIpR aRmudRw4Xp/XDTegb6srbH5MyYW2EyEKVggHRmdbwcC2ah9cucJSKAYZu+daqNB9Kocv x9ZGxGK7TrrLy5X1FOv/9HzQdVQtDaalT2c0ymx0cRDS59LHwA0/x+VZ1N78/fAp2epD LC3PjNCboCO5lOOOm8OP2jepXAAfkgo7A0QNXrjeUPjYg/sr8YlFey615jNAU8NSSejI 8Yti7tom4nYc0I2bwdHDRA5YXDETUDPHHF+au2rRyd+VdwG4jxCV3etb/RbL+dyVFLLE 1LMg== 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=EBRv2/+FDr/lrTbtQJ9do2irFBLZgBPX8/+zXznQJVc=; b=UGBg2BA8rZ7Eli0+7Cwy/tObdC8p5buoW5gKzvGohh7UlL/+MIx2WmBdBH0c34AujO i9maQ3rM5T+AK/hQKu0M1pZmaLR+/hwZO9ehx4o0vpA/tpxjjfTqG3UjoT4H5fWK4ulr WUOqwieEz9CKkjMQf3EqMabWiZQT3+k+vPC58WpjNYAaVClx4EC3qNDH9licplvGz3pt t6Ry7bL+0xlZK4CEguuBwFoN6PBVlcwQcI71GQfbBX8k5K7Dxmu8rKhZvw9tW26dC+Tv QO4elq8R+tzXmBIOMHQv4FqKsLiDjdo678TMmAy5x5b38RDOXpPHqlpOnTjLegX8RXAS r9Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GqJjVjDg; 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 h21si4102546ejc.152.2020.04.29.08.28.18; Wed, 29 Apr 2020 08:28:44 -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=GqJjVjDg; 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 S1727949AbgD2PZm (ORCPT + 99 others); Wed, 29 Apr 2020 11:25:42 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:28660 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727855AbgD2PZ0 (ORCPT ); Wed, 29 Apr 2020 11:25:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588173925; 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=EBRv2/+FDr/lrTbtQJ9do2irFBLZgBPX8/+zXznQJVc=; b=GqJjVjDgOoS/5Z3CDDy3zwyclH4k5c6JmWv5AmjgREDCnmEEyMh8sH2pw0jil2l6oPd8E2 z8TzE2dAvcFZnsjXSY/WIlS66RDLFTupDwmeypFW1Qs9Uw7B5n/5ZGQXLKhT3g8n7xDDeX HfYZ+eoUGvuvP8C89vAh80bPLkXeGKk= 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-484-nQ9Y17OhP_SCQKoP7uXdJw-1; Wed, 29 Apr 2020 11:25:20 -0400 X-MC-Unique: nQ9Y17OhP_SCQKoP7uXdJw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 60C468054AE; Wed, 29 Apr 2020 15:25:11 +0000 (UTC) Received: from treble.redhat.com (ovpn-113-19.rdu2.redhat.com [10.10.113.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id A00E763F65; Wed, 29 Apr 2020 15:25:10 +0000 (UTC) From: Josh Poimboeuf To: live-patching@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Jessica Yu , Joe Lawrence , Miroslav Benes Subject: [PATCH v4 08/11] livepatch: Remove module_disable_ro() usage Date: Wed, 29 Apr 2020 10:24:50 -0500 Message-Id: <100e5d6720353ee26acf0dd01511884d509f8cc5.1588173720.git.jpoimboe@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With arch_klp_init_object_loaded() gone, and apply_relocate_add() now using text_poke(), livepatch no longer needs to use module_disable_ro(). Signed-off-by: Josh Poimboeuf Acked-by: Peter Zijlstra (Intel) Acked-by: Joe Lawrence Acked-by: Miroslav Benes --- kernel/livepatch/core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c index f9ebb54affab..6b8b3c067be0 100644 --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c @@ -777,7 +777,6 @@ static int klp_init_object_loaded(struct klp_patch *p= atch, if (klp_is_module(obj)) { =20 mutex_lock(&text_mutex); - module_disable_ro(patch->mod); =20 /* * Only write module-specific relocations here @@ -787,7 +786,6 @@ static int klp_init_object_loaded(struct klp_patch *p= atch, */ ret =3D klp_apply_object_relocs(patch, obj); =20 - module_enable_ro(patch->mod, true); mutex_unlock(&text_mutex); =20 if (ret) --=20 2.21.1