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] [day] [month] [year] [list]
Date:   Fri, 26 Feb 2021 13:50:42 +0000
From:   Matthew Wilcox <willy@...radead.org>
To:     Chris Down <chris@...isdown.name>
Cc:     Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        Tony Luck <tony.luck@...el.com>,
        Fenghua Yu <fenghua.yu@...el.com>, linux-ia64@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel-team@...com
Subject: Re: [PATCH] ia64: Depend on non-static printk for cmpxchg debug

On Fri, Feb 26, 2021 at 01:47:20PM +0000, Chris Down wrote:
> Chris Down writes:
> > I must confess I have no idea of the history of why it was `extern int`
> > in the first place -- my fear was somehow we use cmpxchg.h from a
> > different context.  Do you have any idea? :-)
> 
> Ok, found where it's introduced in the pre-git archives: "New file
> asm-ia64/intrinsics.h." from David Mosberger <davidm@...er.hpl.hp.com>, Dec
> 9 2002. No indication why it's extern, but it's been there since the dawn of
> ia64.

It's just a quirk of C.  'extern' is only meaningful when applied to
variables.  In the context of functions,

extern int printk(char *fmt);
int printk(char *fmt);

are completely equivalent.  Unless (as you've seen) there's then a
static definition following the extern declaration.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ