Thread (3 messages) flat view 3 messages, 2 authors, 2014-03-21

Re: [PATCH v3] mac80211: LLVMLinux: Remove VLAIS usage from mac80211

From: Behan Webster <hidden>
Date: 2014-03-19 14:26:21
Also in: lkml, netdev

Possibly related (same subject, not in this thread)

On 03/19/14 06:51, Johannes Berg wrote:
I'm confused.

On Tue, 2014-03-18 at 20:32 -0700, behanw@converseincode.com wrote:

quoted
  	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.
Will fix.
quoted
  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?
Because I neglected to update it in both places. Sorry. Will fix.

Behan

-- 
Behan Webster
behanw@converseincode.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help