Re: [PATCH 3/4] asmlinkage, x86: Add explicit __visible to arch/x86/crypto/*

From: Linus Torvalds
Date: Tue Apr 01 2014 - 14:53:56 EST


On Tue, Apr 1, 2014 at 10:32 AM, Andi Kleen <andi@xxxxxxxxxxxxxx> wrote:
>
> -asmlinkage void aes_enc_blk(struct crypto_aes_ctx *ctx, u8 *out, const u8 *in);
> -asmlinkage void aes_dec_blk(struct crypto_aes_ctx *ctx, u8 *out, const u8 *in);
> +asmlinkage __visible void aes_enc_blk(struct crypto_aes_ctx *ctx, u8 *out, const u8 *in);
> +asmlinkage __visible void aes_dec_blk(struct crypto_aes_ctx *ctx, u8 *out, const u8 *in);

This seems to be more of the same "__visible in declaration" badness.

Don't do it.

As far as I can tell, the only point of "__visible" is on C symbols
called from assembly language.

You're adding them to assembly routines called from C, which is
exactly the wrong way around, and pointless. And it's worse than
pointless churn, it just confuses people, and shows that you are
confused about the meaning of it.

Again, it seems to be because you've mentally tied "asmlinkage"
together with "__visible", but they are totally disjoint. One is about
calling conventions, the other is about the C compiler not hiding the
function when using -fwhole-program.

STOP CONFUSING THE TWO. They are independent and have absolutely
*NOTHING* to do with each other.

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