From: David Miller <davem@davemloft.net>
To: nhorman@tuxdriver.com
Cc: netdev@vger.kernel.org, vyasevich@gmail.com, linux-sctp@vger.kernel.org
Subject: Re: [PATCH v3] sctp: Clean up type-punning in sctp_cmd_t union
Date: Sat, 03 Nov 2012 18:55:17 +0000 [thread overview]
Message-ID: <20121103.145517.1686027994101913314.davem@davemloft.net> (raw)
In-Reply-To: <1351535533-23402-1-git-send-email-nhorman@tuxdriver.com>
From: Neil Horman <nhorman@tuxdriver.com>
Date: Mon, 29 Oct 2012 14:32:13 -0400
> Lots of points in the sctp_cmd_interpreter function treat the sctp_cmd_t arg as
> a void pointer, even though they are written as various other types. Theres no
> need for this as doing so just leads to possible type-punning issues that could
> cause crashes, and if we remain type-consistent we can actually just remove the
> void * member of the union entirely.
>
> Change Notes:
>
> v2)
> * Dropped chunk that modified SCTP_NULL to create a marker pattern
> should anyone try to use a SCTP_NULL() assigned sctp_arg_t, Assigning
> to .zero provides the same effect and should be faster, per Vlad Y.
>
> v3)
> * Reverted part of V2, opting to use memset instead of .zero, so that
> the entire union is initalized thus avoiding the i164 speculative load
> problems previously encountered, per Dave M.. Also rewrote
> SCTP_[NO]FORCE so as to use common infrastructure a little more
>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com
Applied, thanks.
prev parent reply other threads:[~2012-11-03 18:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-29 18:32 [PATCH v3] sctp: Clean up type-punning in sctp_cmd_t union Neil Horman
2012-10-29 20:14 ` Vlad Yasevich
2012-11-03 18:55 ` David Miller [this message]
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=20121103.145517.1686027994101913314.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-sctp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=vyasevich@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).