Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1217502ybz; Thu, 16 Apr 2020 05:15:17 -0700 (PDT) X-Google-Smtp-Source: APiQypKPHU0EGXcJf438OELJYFYG9aN3pMNTi02MgSw+mCO2a2SKnCnrF851rv4AzNqgEGFysZcR X-Received: by 2002:aa7:db41:: with SMTP id n1mr28971152edt.260.1587039317038; Thu, 16 Apr 2020 05:15:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587039317; cv=none; d=google.com; s=arc-20160816; b=LFFg993rJVjAmN8ecUCHWs5PDhtBp63DXA4YMR4Lv+WC8puMFbj+7nfElMjbhygWIz unF/uW9QRTfrknZ2xMS85WlVPSGpjWZ6m5wMqIdAIGFiy3a7UkEajFy/L665TKacttTf kDVDe0FySVBZLT/cXSzrSjqkSOff7MFWIlRIQph1LGA2rsfAoj4vJ7kJAZKwpxBO5BxV IAjpVhqZNnFzcj7WtQjPUv61rOg8iYZ5JVwOJ7O4eavCkxMrmM9oZhNY/DIhV4pWbFGA mW2gpLaUd/lB4Kb8sW/ijGFjVyt768Gykr7GGpjKWj+Kb1fnANGIE4lf4ofJJ8z3iVts QGUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=UkBX4tWUeuF6phNnH/IEoeZJtqdkC3zMlBoaKCG3/EY=; b=UsYRGHfwQG1IKFxuXrdkt02y1Kys+ZN+JSgiyXv6UAE40hGO4p3NF/yI7qafwi4U0N h53jok5LHkYI4hfg9I6ADIUNtoO/KvGuCi5iTHq02uyKNg8cJ0JUaIBCp4SWR2zzUDt4 Am777j9MPL3E0spm26LOB69TAnVOVoiBSUq1BIVTpj+pOFY8UXnEOmPPEIf9mRQSLiI6 BqtRQCfOFM9SU15NtsaKz7hqxooFE/3p5Yz+DAABBvn+d/niAxihksv2iCUPneJi0Vb8 o6sIFWiM3+f7pKirQQMoS+2+hRXXEDSGvedNild5wp6v1XIdZVg8y7bp1rl8Hjfm/gT/ 3FYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="RWZZ7/Sk"; 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 i14si5486729edx.256.2020.04.16.05.14.53; Thu, 16 Apr 2020 05:15:17 -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="RWZZ7/Sk"; 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 S2635001AbgDPMKY (ORCPT + 99 others); Thu, 16 Apr 2020 08:10:24 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:20446 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2634901AbgDPMKV (ORCPT ); Thu, 16 Apr 2020 08:10:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587039020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UkBX4tWUeuF6phNnH/IEoeZJtqdkC3zMlBoaKCG3/EY=; b=RWZZ7/SkN7dXoC+OLbC0pEnOuvDyswTHAPeb444UDXQ8AHvRh5k22N0N0OF1NJ0sEEnrf7 6FGieVFyxMROFCi4P1DLwkBa4yPIafFJvs9wqCOG2rexlguev4khLVfOO8rJrHoXVV62Nf 97fsVMNTr5/qj11X8hSCaXW+4ge5quE= 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-434-yO9ig_6DNtKAekjRYWwj2g-1; Thu, 16 Apr 2020 08:10:13 -0400 X-MC-Unique: yO9ig_6DNtKAekjRYWwj2g-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 CAB601005513; Thu, 16 Apr 2020 12:10:11 +0000 (UTC) Received: from treble (ovpn-116-146.rdu2.redhat.com [10.10.116.146]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 228DE7E7C9; Thu, 16 Apr 2020 12:10:10 +0000 (UTC) Date: Thu, 16 Apr 2020 07:10:08 -0500 From: Josh Poimboeuf To: Miroslav Benes Cc: Jessica Yu , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra Subject: Re: [PATCH 6/7] livepatch: Remove module_disable_ro() usage Message-ID: <20200416121008.i5vmafqcv4ab7van@treble> References: <9f0d8229bbe79d8c13c091ed70c41d49caf598f2.1586881704.git.jpoimboe@redhat.com> <20200415150216.GA6164@linux-8ccs.fritz.box> <20200415163303.ubdnza6okg4h3e5a@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 16, 2020 at 11:28:25AM +0200, Miroslav Benes wrote: > If I remember correctly, text_mutex must be held whenever text is modified > to prevent race due to the modification. It is not only about permission > changes even though it was how it manifested itself in our case. Yeah, that's what confused me. We went years without using text_mutex and then only started using it because of a race with the permissions changes. -- Josh