From: Ingo Molnar <mingo@kernel.org>
To: Joao Moreira <jmoreira@suse.de>
Cc: kernel-hardening@lists.openwall.com,
linux-kernel@vger.kernel.org, x86@kernel.org,
herbert@gondor.apana.org.au, davem@davemloft.net,
tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
gregkh@linuxfoundation.org, keescook@chromium.org
Subject: Re: [PATCH 1/4] x86/crypto: camellia: Fix function prototypes
Date: Mon, 16 Apr 2018 08:10:44 +0200 [thread overview]
Message-ID: <20180416061044.z6eb4psw2sbszemb@gmail.com> (raw)
In-Reply-To: <20180415041542.5364-2-jmoreira@suse.de>
* Joao Moreira <jmoreira@suse.de> wrote:
> Convert the use of 'struct camellia_ctx *' to 'void *' in prototypes of
> functions which are referenced through 'struct common_glue_func_entry',
> making their prototypes match those of this struct and, consequently,
> turning them compatible with CFI requirements.
>
> Whenever needed, cast 'void *' to 'struct camellia_ctx *'.
> +static inline void camellia_enc_blk(void *ctx, u8 *dst, const u8 *src)
> {
> - __camellia_enc_blk(ctx, dst, src, false);
> + __camellia_enc_blk((struct camellia_ctx *) ctx, dst, src, false);
> }
I don't see how this is an improvement: instead of having a proper type there's
now an opaque type and an ugly (and dangerous) type cast.
What does "compatible with CFI requirements" mean?
Thanks,
Ingo
next prev parent reply other threads:[~2018-04-16 6:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-15 4:15 [PATCH 0/4] x86/crypto: " Joao Moreira
2018-04-15 4:15 ` [PATCH 1/4] x86/crypto: camellia: " Joao Moreira
2018-04-16 6:10 ` Ingo Molnar [this message]
2018-04-16 14:35 ` João Moreira
2018-04-18 16:07 ` Kees Cook
2018-04-19 10:35 ` Thomas Gleixner
2018-04-15 4:15 ` [PATCH 2/4] x86/crypto: cast6: " Joao Moreira
2018-04-15 4:15 ` [PATCH 3/4] x86/crypto: serpent: " Joao Moreira
2018-04-15 4:15 ` [PATCH 4/4] x86/crypto: twofish: " Joao Moreira
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180416061044.z6eb4psw2sbszemb@gmail.com \
--to=mingo@kernel.org \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=hpa@zytor.com \
--cc=jmoreira@suse.de \
--cc=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome