All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
To: David Miller <davem@davemloft.net>
Cc: mroos@linux.ee, sparclinux@vger.kernel.org, edumazet@google.com,
	netdev@vger.kernel.org
Subject: Re: Invalid sk_policy[] access
Date: Tue, 23 Feb 2016 23:59:46 +0000	[thread overview]
Message-ID: <20160223235946.GE4941@oracle.com> (raw)
In-Reply-To: <20160223.175901.15624631458340642.davem@davemloft.net>

> > Since there are no config-dependent difference in the struct, maybe it's 
> > a compiler version difference for padding/optimization instead?
> 
> Changing the layout of a structure would break ABI, so unlikely.
> 
> I've never used crash, so I have no idea where it gets it's
> information from nor how it interprets it.

fwiw, I applied the exact same printk to the T5, namely,

                printk(KERN_INFO "sizeof sock %ld \n"
                        "sizeof request_sock %ld\n"
                        "sizeof inet_request_sock %ld\n"
                        "offsetof sk_policy 1 %ld\n",
                        sizeof (struct sock), sizeof (struct request_sock),
                        sizeof (struct inet_request_sock),
                        offsetof(struct sock, sk_policy[1]));

and got this:

   sizeof sock 1216 
   sizeof request_sock 312
   sizeof inet_request_sock 328
   offsetof sk_policy 1 520

So it's good to know that crash does not lie.

But then it's odd that the struct sizes (esp of things like 
request_sock, which are not config dependant) are not the same.

--Sowmini


WARNING: multiple messages have this Message-ID (diff)
From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
To: David Miller <davem@davemloft.net>
Cc: mroos@linux.ee, sparclinux@vger.kernel.org, edumazet@google.com,
	netdev@vger.kernel.org
Subject: Re: Invalid sk_policy[] access
Date: Tue, 23 Feb 2016 18:59:46 -0500	[thread overview]
Message-ID: <20160223235946.GE4941@oracle.com> (raw)
In-Reply-To: <20160223.175901.15624631458340642.davem@davemloft.net>

> > Since there are no config-dependent difference in the struct, maybe it's 
> > a compiler version difference for padding/optimization instead?
> 
> Changing the layout of a structure would break ABI, so unlikely.
> 
> I've never used crash, so I have no idea where it gets it's
> information from nor how it interprets it.

fwiw, I applied the exact same printk to the T5, namely,

                printk(KERN_INFO "sizeof sock %ld \n"
                        "sizeof request_sock %ld\n"
                        "sizeof inet_request_sock %ld\n"
                        "offsetof sk_policy 1 %ld\n",
                        sizeof (struct sock), sizeof (struct request_sock),
                        sizeof (struct inet_request_sock),
                        offsetof(struct sock, sk_policy[1]));

and got this:

   sizeof sock 1216 
   sizeof request_sock 312
   sizeof inet_request_sock 328
   offsetof sk_policy 1 520

So it's good to know that crash does not lie.

But then it's odd that the struct sizes (esp of things like 
request_sock, which are not config dependant) are not the same.

--Sowmini


  reply	other threads:[~2016-02-23 23:59 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-06 15:21 Recent spontaneous reboots on multiple machines Meelis Roos
2016-01-06 15:22 ` Meelis Roos
2016-01-07 17:41 ` Sowmini Varadhan
2016-01-07 19:46 ` Meelis Roos
2016-01-07 20:14 ` Sowmini Varadhan
2016-01-08 17:20 ` Sowmini Varadhan
2016-01-08 19:02 ` David Miller
2016-01-08 20:18 ` mroos
2016-01-08 21:15 ` Sowmini Varadhan
2016-01-08 21:29 ` Meelis Roos
2016-01-10 10:03 ` Meelis Roos
2016-02-05  9:06 ` Meelis Roos
2016-02-14 10:51 ` Sowmini Varadhan
2016-02-15  5:54 ` Meelis Roos
2016-02-18  2:30 ` Sowmini Varadhan
2016-02-22  1:02 ` Sowmini Varadhan
2016-02-23 12:12   ` Invalid sk_policy[] access (was Re: Recent spontaneous reboots on multiple machines) Sowmini Varadhan
2016-02-23 12:12     ` Sowmini Varadhan
2016-02-23 19:36     ` Meelis Roos
2016-02-23 19:36       ` Meelis Roos
2016-02-23 19:39       ` Sowmini Varadhan
2016-02-23 19:39         ` Sowmini Varadhan
2016-02-23 20:45         ` Meelis Roos
2016-02-23 20:45           ` Meelis Roos
2016-02-23 20:20       ` Invalid sk_policy[] access David Miller
2016-02-23 20:20         ` David Miller
2016-02-23 20:29         ` Sowmini Varadhan
2016-02-23 20:29           ` Sowmini Varadhan
2016-02-23 20:37           ` mroos
2016-02-23 20:37             ` mroos
2016-02-23 20:51           ` mroos
2016-02-23 20:51             ` mroos
2016-02-23 20:53             ` Sowmini Varadhan
2016-02-23 20:53               ` Sowmini Varadhan
2016-02-23 23:05               ` David Miller
2016-02-23 23:05                 ` David Miller
2016-02-23 22:59             ` David Miller
2016-02-23 22:59               ` David Miller
2016-02-23 23:59               ` Sowmini Varadhan [this message]
2016-02-23 23:59                 ` Sowmini Varadhan
2016-02-24  0:23                 ` David Miller
2016-02-24  0:23                   ` David Miller

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=20160223235946.GE4941@oracle.com \
    --to=sowmini.varadhan@oracle.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=mroos@linux.ee \
    --cc=netdev@vger.kernel.org \
    --cc=sparclinux@vger.kernel.org \
    /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.