lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 19 Sep 2013 18:07:06 -0700
From:	Joe Perches <joe@...ches.com>
To:	Daniel Santos <daniel.santos@...ox.com>
Cc:	David Howells <dhowells@...hat.com>,
	linux-kbuild <linux-kbuild@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Michal Marek <mmarek@...e.cz>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Michael Kerrisk <mtk.manpages@...il.com>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	George Spelvin <linux@...izon.com>
Subject: Re: [PATCH 5/5] lib: Add error string support to printks

On Wed, 2013-09-18 at 20:27 -0500, Daniel Santos wrote:
> if I use ERR_PTR() on a signed int on a x86_64 where pointer 
> is 64 bits and int is 32, wouldn't that mean a signed conversion 
> instruction where the sign bit has to be moved from bit 31 to 63?

No.  It's cast to long

static inline void * __must_check ERR_PTR(long error)
{
	return (void *) error;
}

> Either way, %pE does seem to make a lot of sense for conditions where we 
> already have a pointer that we would otherwise use PTR_ERR() to convert, 
> but it just seems klunky to use it on an int, to have it treated like a 
> pointer and then re-interpreted as an int.  Maybe we can add %pE as well 
> as %dE and leave [ioxXu] out of it?

I think having just one way to format is better.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ