Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753757AbdLDMu7 (ORCPT ); Mon, 4 Dec 2017 07:50:59 -0500 Received: from smtp-out6.electric.net ([192.162.217.182]:57590 "EHLO smtp-out6.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753423AbdLDMuz (ORCPT ); Mon, 4 Dec 2017 07:50:55 -0500 From: David Laight To: "'Ard Biesheuvel'" , Greg Kroah-Hartman CC: Dave Young , Matt Fleming , Linus Torvalds , "Tobin C. Harding" , LKML , "linux-efi@vger.kernel.org" Subject: RE: [GIT PULL] hash addresses printed with %p Thread-Topic: [GIT PULL] hash addresses printed with %p Thread-Index: AQHTbOUiw1bAKsWUeU6p2FHhmWLDDqMy82QAgAABCoCAAC5FsA== Date: Mon, 4 Dec 2017 12:51:13 +0000 Message-ID: References: <20171130171036.GB31817@kroah.com> <20171201094846.GE9353@kroah.com> <20171202222244.GA3799@codeblueprint.co.uk> <20171204020216.GA2436@dhcp-128-65.nay.redhat.com> <20171204073642.GC19596@kroah.com> <20171204092928.GA4421@dhcp-128-65.nay.redhat.com> <20171204093430.GA6463@kroah.com> <20171204095936.GA10547@kroah.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.33] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-Outbound-IP: 156.67.243.126 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuMS.aculab.com X-TLS: TLSv1.2:ECDHE-RSA-AES256-SHA384:256 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id vB4Cp3f8023979 Content-Length: 578 Lines: 20 From: Ard Biesheuvel > Sent: 04 December 2017 10:03 ... > and uses __ATTR_RO() to emit initializers for it. __ATTR() initializes > the .store member as well, which does not exists, and so it cannot be > used directly. > > So we should either add a .store member that is always NULL, or we > should add our own > > #define __ATTR_0400(_name) { \ > .attr = { .name = __stringify(_name), .mode = 0400 }, \ > .show = _name##_show, \ > } What about an __ATTR_RO_MODE(name, mode) that doesn't set the .store member. Even if the mode allowed write, writes wouldn't happen. David