lkml.org 
[lkml]   [2021]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 39/64] mac80211: Use memset_after() to clear tx status
From
Date
On Sat, 2021-07-31 at 08:55 -0700, Kees Cook wrote:
>
> > @@ -278,9 +278,7 @@ static void carl9170_tx_release(struct kref *ref)
> >   BUILD_BUG_ON(
> >   offsetof(struct ieee80211_tx_info, status.ack_signal) != 20);
> >  
> >
> > - memset(&txinfo->status.ack_signal, 0,
> > - sizeof(struct ieee80211_tx_info) -
> > - offsetof(struct ieee80211_tx_info, status.ack_signal));
> > + memset_after(&txinfo->status, 0, rates);

FWIW, I think we should also remove the BUILD_BUG_ON() now in all the
places - that was meant to give people a hint to update if some field
ordering etc. changed, but now that it's "after rates" this is no longer
necessary.

johannes

\
 
 \ /
  Last update: 2021-08-13 09:42    [W:0.139 / U:1.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site