Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp655246imp; Thu, 21 Feb 2019 08:33:51 -0800 (PST) X-Google-Smtp-Source: AHgI3IaNlaCc6cQt3D+2OKXbgeUtGjf6SdZOn43NtYOGTfcZsuDCJlLZ3ZfRu3Wd+U73t+8FMxLp X-Received: by 2002:a17:902:8f8a:: with SMTP id z10mr6732674plo.23.1550766831389; Thu, 21 Feb 2019 08:33:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550766831; cv=none; d=google.com; s=arc-20160816; b=KFiMhSCKsW9AKtc3H/+JCsHuglj9rgVSO+cMYy+L54aqdTQIx5zAAvNEL0Spoxcu35 nGjEI5Yzs9enxll9XH3F7jXqr00YF8vDZzg5BWaVhz8pBL135ovjDh1OMH/gOVAvYMJc SLOW/jgFECv91oaYjRBtECSY30eHRqBPhJJCcOSiR0+WQp32Y5D0+omE03qEYFLgh7hQ V7MI9nDosOwNnc80hkqF2J4tbt3BSK9fRz961s8Xh+kbhEPdkBHi6vjdCLT0xXgP7oi0 qymZucZQvx8oZLPsMpHDU2o4nACglZU7ER98p7Tvh/fGwgYh8nvX9+Luz5cs1wp5j4O8 AiYw== 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=xH1G4WeI8HkuGFWl+tMCQxJNmB5IRzTkGbclNgtRhn8=; b=rZd5O0F1FpvmxYXXoInNR668FcW18lINExQ1/xdi8c9t27YwXeKmHzO4g5r4s7d0xY +fiBnQNhBp22ce6L7zTIwycygA3rbEVdxzarAfyflQ3lXOOBeaPp18HKo863Q55eqY/+ 4ZAE0CZTdABKjSSGAf2W2y7iE5KPE8CDSraBX+uaQhDdOd0JC03THcPGZJxrqpMcqVxQ xt/7V/xR7IM4ei3FwjFgpmTjGRo8wd60Cj0rjnFw5AAKbD9PUnC+ykExygWeWUUZ/Q+m iGYWCFo5udIXmmLuwVvzr21nWSnFfmPlBmpRNH4P8vPWFzXHr9pQA+wCzTt2dtK/PQYw BoQw== 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 c13si15417512pgg.446.2019.02.21.08.33.35; Thu, 21 Feb 2019 08:33:51 -0800 (PST) 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 S1727562AbfBUQcz (ORCPT + 99 others); Thu, 21 Feb 2019 11:32:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:47062 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726400AbfBUQcy (ORCPT ); Thu, 21 Feb 2019 11:32:54 -0500 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 A127E20818; Thu, 21 Feb 2019 16:32:53 +0000 (UTC) Date: Thu, 21 Feb 2019 11:32:51 -0500 From: Steven Rostedt To: Masami Hiramatsu Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Ingo Molnar , Andrew Morton , stable@vger.kernel.org, Changbin Du Subject: Re: [PATCH 1/2 v2] kprobe: Do not use uaccess functions to access kernel memory that can fault Message-ID: <20190221113251.60ca29be@gandalf.local.home> In-Reply-To: <20190222011643.3e19ade84a3db3e83518648f@kernel.org> References: <20190215174712.372898450@goodmis.org> <20190215174945.557218316@goodmis.org> <20190221165252.4a9033b3348f30f9d973dbc4@kernel.org> <20190221093625.56afccd2@gandalf.local.home> <20190222005812.04c5940c693b14cfdbe6ede7@kernel.org> <20190222011643.3e19ade84a3db3e83518648f@kernel.org> X-Mailer: Claws Mail 3.16.0 (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 [ Linus, you may want to read this ] On Fri, 22 Feb 2019 01:16:43 +0900 Masami Hiramatsu wrote: Yep, I'll take this patch. Hmm, my for-next isn't based on my urgent branch, and this would go on top of urgent. I can do one of three things to push this to Linus for the merge window: 1) Create a separate branch to add updates for on my urgent branch. This would have me do two pull requests to Linus. 2) Cherry pick the urgent commit that this updates. But that has a stable tag, which could confuse things as it would create the same commit twice, both with stable tags (I could take the stable tag off of the cherry pick though). 3) Merge the urgent branch into my for-next branch at that commit, with a message to why I'm doing this. The urgent branch is based off of a older tag in Linus's tree, so that would only pull in tracing changes (my stuff), and wont pull in anyone else's work. I may go with option 3, because I believe this may be one of the cases that is allowed to have merges in pull requests. a) Only my stuff got merged b) Have a dependency on something that already went into Linus's tree (prevent me from having to rebase already tested work). c) Have it documented in the merge commit to why its being merged Unless Linus feels otherwise (use one of the other options?), I may go ahead and do that. -- Steve > --------- > tracing/kprobes: Use probe_kernel_read instead of probe_mem_read > > From: Masami Hiramatsu > > Use probe_kernel_read() instead of probe_mem_read() because > probe_mem_read() is a kind of wrapper for switching memory > read function between uprobes and kprobes. > > Signed-off-by: Masami Hiramatsu > --- > kernel/trace/trace_kprobe.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c > index 9eaf07f99212..99592c27465e 100644 > --- a/kernel/trace/trace_kprobe.c > +++ b/kernel/trace/trace_kprobe.c > @@ -865,7 +865,7 @@ fetch_store_strlen(unsigned long addr) > u8 c; > > do { > - ret = probe_mem_read(&c, (u8 *)addr + len, 1); > + ret = probe_kernel_read(&c, (u8 *)addr + len, 1); > len++; > } while (c && ret == 0 && len < MAX_STRING_SIZE); > >