[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1395237113.4142.5.camel@jlt4.sipsolutions.net>
Date: Wed, 19 Mar 2014 14:51:53 +0100
From: Johannes Berg <johannes@...solutions.net>
To: behanw@...verseincode.com
Cc: linville@...driver.com, davem@...emloft.net,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
dwmw2@...radead.org, pageexec@...email.hu,
Jan-Simon Möller <dl9pf@....de>,
Vinícius Tinti <viniciustinti@...il.com>,
Mark Charlebois <charlebm@...il.com>
Subject: Re: [PATCH v3] mac80211: LLVMLinux: Remove VLAIS usage from mac80211
I'm confused.
On Tue, 2014-03-18 at 20:32 -0700, behanw@...verseincode.com wrote:
> struct scatterlist assoc, pt, ct[2];
> - struct {
> - struct aead_request req;
> - u8 priv[crypto_aead_reqsize(tfm)];
> - } aead_req;
>
> - memset(&aead_req, 0, sizeof(aead_req));
> + char aead_req_data[sizeof(struct aead_request) +
> + crypto_aead_reqsize(tfm)]
> + __aligned(__alignof__(struct aead_request));
This looks fine, though I'd argue the blank lines before/after it
shouldn't be there, and the indentation should be a bit different, but I
was willing to clean that up.
> int ieee80211_aes_ccm_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad,
> u8 *data, size_t data_len, u8 *mic)
> {
> struct scatterlist assoc, pt, ct[2];
> - struct {
> - struct aead_request req;
> - u8 priv[crypto_aead_reqsize(tfm)];
> - } aead_req;
>
> - memset(&aead_req, 0, sizeof(aead_req));
> + char aead_req_data[sizeof(struct aead_request) +
> + crypto_aead_reqsize(tfm) +
> + CRYPTO_MINALIGN] CRYPTO_MINALIGN_ATTR;
But why does the second instance use a completely different size/align?
johannes
--
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