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:	Wed, 18 Jan 2012 16:57:09 +0000
From:	"Jan Beulich" <JBeulich@...e.com>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	<mingo@...e.hu>, "eric.dumazet@...il.com" <eric.dumazet@...il.com>,
	<tglx@...utronix.de>, <luca@...a-barbieri.com>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] ix86: adjust asm constraints in atomic64
 wrappers

>>> On 18.01.12 at 17:45, "H. Peter Anvin" <hpa@...or.com> wrote:
> On 01/18/2012 06:22 AM, Jan Beulich wrote:
>>  
>> +#ifndef __ATOMIC64_EXPORT
>> +/*
>> + * Don't declare these as functions, even though they are - due to their
>> + * non-standard calling conventions they can't be called by C code anyway.
>> + */
>> +#define __ATOMIC64_EXPORT(sym) extern const atomic64_t atomic64_##sym[]
>> +#endif
>> +
> 
> This is obviously bogus.  They are still functions even if they are not
> callable by C.  In particular, they are NOT in any shape, way, or form
> arrays of type const atomic64_t; if you want to assign them to a
> "generic memory type" they would be const char, but there is no reason

I wanted to make sure that the symbol CRC at least tracks the
atomic64_t type.

> to declare them as anything other than executable code.  Yes, it would
> be wrong to call them, but so would calling any other function that is
> inappropriate.
> 
> For functions with nonstandard calling conventions it is normal to
> declare them as void foo(void);

For the above, I'd like to keep atomic64_t in the signature. Would
void foo(atomic64_t, ...) be acceptable?

> It may be a good idea to prefix these symbols with __ though.

But not in this patch. (Can't resist to add that if you think it should
be this way, why did you not make it a condition for accepting the 
original patch, which you committed?)

Jan

--
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