From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752102AbdLJMww (ORCPT ); Sun, 10 Dec 2017 07:52:52 -0500 Received: from mail-qt0-f194.google.com ([209.85.216.194]:43421 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751720AbdLJMwu (ORCPT ); Sun, 10 Dec 2017 07:52:50 -0500 X-Google-Smtp-Source: AGs4zMYWsZ8KMiyoFPsk265WsKuVL+vpmx53ihWE/BxcN+GxO4H/1KSd5k4aTAkVxKkrDuLFLl/xE3uoY+QF/mPXvFU= MIME-Version: 1.0 In-Reply-To: <20171204161100.GT7829@linux.vnet.ibm.com> References: <20171201200819.GA25519@linux.vnet.ibm.com> <1512158945-27269-2-git-send-email-paulmck@linux.vnet.ibm.com> <20171204134203.GR7829@linux.vnet.ibm.com> <20171204161100.GT7829@linux.vnet.ibm.com> From: Andy Shevchenko Date: Sun, 10 Dec 2017 14:52:49 +0200 Message-ID: Subject: Re: [PATCH tip/core/rcu 02/20] torture: Prepare scripting for shift from %p to %pK To: "Paul E. McKenney" , Kees Cook , Linus Torvalds Cc: David Laight , "linux-kernel@vger.kernel.org" , "mingo@kernel.org" , "jiangshanlai@gmail.com" , "dipankar@in.ibm.com" , "akpm@linux-foundation.org" , "mathieu.desnoyers@efficios.com" , "josh@joshtriplett.org" , "tglx@linutronix.de" , "peterz@infradead.org" , "rostedt@goodmis.org" , "dhowells@redhat.com" , "edumazet@google.com" , "fweisbec@gmail.com" , "oleg@redhat.com" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 4, 2017 at 6:11 PM, Paul E. McKenney wrote: > On Mon, Dec 04, 2017 at 02:13:38PM +0000, David Laight wrote: >> From: Paul E. McKenney >> > Sent: 04 December 2017 13:42 >> > On Mon, Dec 04, 2017 at 12:32:30PM +0000, David Laight wrote: >> > > From: Paul E. McKenney >> > > > Sent: 01 December 2017 20:09 >> > > > >> > > > Because %p prints "(null)" and %pK prints "0000000000000000" or (on >> > > > 32-bit systems) "00000000", this commit adjusts torture-test scripting >> > > > accordingly. >> > > >> > > Surely NULL v not-NULL is one bit of info that the message needs to contain? >> > >> > Indeed. So the script needs to check for the strings "00000000", >> > "0000000000000000", and "(null) in the console output". The "(null)" >> > is what "%p" prints for a NULL pointer, and the other two strings are >> > what "%pK" prints for a NULL pointer. >> > >> > Or am I missing your point? >> >> I was thinking that even %pK should print "(null)". > > That was my expectation, as in the need for this patch came as a > surprise to me. > >> Perhaps it should have printed a fixed, non-zero value for non-zero >> pointers. > > I must leave this to the people who have a dog in that contest. ;-) Since there is an ongoing discussion with security people near to %pK and alike, I added Kees and Linus to Cc list. The proposed change can be done easily, though I have no knowledge about possible implications. -- With Best Regards, Andy Shevchenko