Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5812598yba; Thu, 11 Apr 2019 06:20:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxEkbRGaM8cmGgaPXFRZudqavmj7x1/+YRoM20eCBO1IOudwU4bVS8XCAAIor9mWLACEWGQ X-Received: by 2002:a63:1003:: with SMTP id f3mr45556015pgl.227.1554988853180; Thu, 11 Apr 2019 06:20:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554988853; cv=none; d=google.com; s=arc-20160816; b=beHbSt9TDiHxIXJav38RATnYku0xh8cA5P4p+t1fkD48ZMYcB0ivcyyuR8rhbJfzjo 6jon78bS7S7Ygaokq6ejvC8SBM+y/l0qTHevW1YL1bl3t4duJBdSQBlMPnsNnavaEXWk ubMJJPDkoowBLBKHmd8LMQNiMwmgjNWAbc+fyDTJWLTj+VAOgd0zQ3nTHt8qUZGwJHKy gRnQOjpXX3xIloQIyQOcZ7mfg24xUCv4Kf28WvSw8gmyV02ohBlERjCZdkz7zpeDEzwU naCFSCW0YseBvlSllEqvH2omQ41Gu1eJHUn6M21LDmoJu6g5ch+j/OPUI3AGQUFodFnL DI2g== 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:subject:cc:to:from:date; bh=pE/reHRCJADRuiAnp9+NKMjZ7Q2LxTUxLSko6IaXcOY=; b=o8doNxjn5Xk/X+thogyC7Xv5hI+M/fy2ZeXb/87FO0xxEV7ZXgbB6Zof5CnA/TILMU eCTsNIDILVSygLGiZo/zBcOZJNyfLtfwI+/kT2C80axYG0/nrxH0UQHXRAvlz/K6RHvl Ua9vODsb54Ro13Fx6QBAuZ7Q/EqTaFJGx1WteCH/c1/2FWQqFgZNJLBfL8BgxtNmDG6t ajHNN2y2GjGN8vUaOiaOSUhzS9qwIPGphSfT8/cSWTopB8CJcFLWl8jIl+R/GJX8IzkE lCXT7EJ/0NHXTK89MDOeoh0q0X2lfwTq84KWQc/YHHl4+nD3Or7BGzMJzNa1Z41z59EV fXaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d13si34692549pgg.1.2019.04.11.06.20.36; Thu, 11 Apr 2019 06:20:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726656AbfDKNT7 (ORCPT + 99 others); Thu, 11 Apr 2019 09:19:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:33522 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726264AbfDKNT7 (ORCPT ); Thu, 11 Apr 2019 09:19:59 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E3782206B7; Thu, 11 Apr 2019 13:19:57 +0000 (UTC) Date: Thu, 11 Apr 2019 09:19:55 -0400 From: Steven Rostedt To: Joel Fernandes Cc: linux-kernel@vger.kernel.org, paulmck@linux.vnet.ibm.com, keescook@chromium.org, mathieu.desnoyers@efficios.com, Jessica Yu , kernel-hardening@lists.openwall.com, kernel-team@android.com, rcu@vger.kernel.org Subject: Re: [PATCH v3 3/3] module: Make __tracepoints_ptrs as read-only Message-ID: <20190411091955.67cdd9fd@gandalf.local.home> In-Reply-To: <20190411082106.GB167446@google.com> References: <20190410195708.162185-1-joel@joelfernandes.org> <20190410195708.162185-3-joel@joelfernandes.org> <20190410161112.540017d9@gandalf.local.home> <20190410202902.GA167446@google.com> <20190410204401.62f928ca@gandalf.local.home> <20190411082106.GB167446@google.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 11 Apr 2019 04:21:06 -0400 Joel Fernandes wrote: > Patch 2/3 and 3/3 would not be nececessary if this works out. 1/3 may be a > nice clean up but is not something urgent and we could do that in the future > if needed. Well, jump_labels is "special" because it requires sorting the RO data and is done via module notify. The only other user that had to modify RO data on module load is ftrace. It had to do the nop conversions in the text area. It use to do it via module notify, but because of the hardening of the kernel, doing it there was no longer possible because everything was RO then. The solution was to call into ftrace directly from the module code instead of a notifier. This was done before sections were made RO. One option is to do the same with jump_labels and just have a call to the sorting before the notifiers and before the section gets turned into RO. Or I would say just leave it as is. As I stated, jump_labels are "special" and adding a loop of one section where I don't envision any other sections needing to do the same thing for a long time to come. I would save that patch for if there is another section that comes along that needs to be modify at module notify. -- Steve