All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlad Yasevich <vyasevich@gmail.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-sctp@vger.kernel.org
Subject: Re: [PATCH] sctp: Clean up type-punning in sctp_cmd_t union
Date: Sat, 27 Oct 2012 02:16:39 +0000	[thread overview]
Message-ID: <508B4407.7070300@gmail.com> (raw)
In-Reply-To: <20121027014249.GA4008@neilslaptop.think-freely.org>

On 10/26/2012 09:42 PM, Neil Horman wrote:
> On Fri, Oct 26, 2012 at 05:10:19PM -0400, David Miller wrote:
>> From: Neil Horman <nhorman@tuxdriver.com>
>> Date: Fri, 26 Oct 2012 16:35:04 -0400
>>
>>> On Fri, Oct 26, 2012 at 03:12:11PM -0400, Vlad Yasevich wrote:
>>>> Look at commit 19c7e9ee that introduced this.  I don't remember all
>>>> the details any more, but the problem only occurred on ia64
>>>> (probably due its speculative load handling).
>>>>
>>>> -vlad
>>>>
>>> Thanks Vlad, I'll have a look see.
>>
>> Ok, so this IA64 issue is all about accesses to uninitialized memory.
>>
>> I think Neil's change is thus the most desirable thing to do.  Simple
>> memset the object to zero.
>>
>> Let the compiler optimize or not optimize things as it sees fit, to
>> make sure the object is completely initialized.
>>
>> memset() expands to __builtin_memset(), and therefore the compiler
>> can and will eliminate initializations to overlapping areas if such
>> eliminations are possible.
>>
> If thats the case, then I'll need to duplicate the memset in all three call
> sites.  I've got a busy weekend comming up, but I'll respin this monday barring
> no objections or counter-arguments
>
> Best
> Neil
>

Yes, it should be done in all 3 call sights.  If you are going with 
memset, you can remove .zero element as well.

-vlad

  reply	other threads:[~2012-10-27  2:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-25 20:47 [PATCH] sctp: Clean up type-punning in sctp_cmd_t union Neil Horman
2012-10-25 21:42 ` Vlad Yasevich
2012-10-25 23:58   ` Neil Horman
2012-10-26  3:48     ` Vlad Yasevich
2012-10-26 13:24       ` Neil Horman
2012-10-26 19:12         ` Vlad Yasevich
2012-10-26 20:35           ` Neil Horman
2012-10-26 21:10             ` David Miller
2012-10-27  1:42               ` Neil Horman
2012-10-27  2:16                 ` Vlad Yasevich [this message]
2012-10-29 15:07               ` David Laight
2012-10-29 18:59                 ` Neil Horman
2012-10-29 19:04                   ` David Miller
2012-10-26  9:00 ` David Laight
2012-10-26 13:28   ` Neil Horman
2012-10-26 13:41 ` [PATCH v2] " Neil Horman
2012-10-26 19:12   ` Vlad Yasevich
2012-10-29 16:35     ` Neil Horman

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=508B4407.7070300@gmail.com \
    --to=vyasevich@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-sctp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.