tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Patches fixing unaligned access in the networking code



    Date:        Tue, 28 May 2019 05:31:54 -0000 (UTC)
    From:        mlelstv%serpens.de@localhost (Michael van Elst)
    Message-ID:  <qcih49$9tq$1%serpens.de@localhost>


  | >http://netbsd.org/~kamil/patch-00115-tcp_input.2.txt

  | Why would the first be obvious? The TCP header is already aligned
  | and so is the first option value. I am pretty sure that worse things
  | will happen if that assumption were broken.

Upon reflection, and really looking at the code, I agree.

  | The patch therefore exists to work around a false positive.

Yes.

No changes are needed for this one.  th is aligned (there is a KASSERT).
Therefore th + 40 is aligned (both to 32 bit boundaries).   I hadn't
noticed this was in the fast path "only timestamp option" handling code
(as that option exists, usually alone, in almost every packet).

kre



Home | Main Index | Thread Index | Old Index