[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160223235946.GE4941@oracle.com>
Date: Tue, 23 Feb 2016 18:59:46 -0500
From: Sowmini Varadhan <sowmini.varadhan@...cle.com>
To: David Miller <davem@...emloft.net>
Cc: mroos@...ux.ee, sparclinux@...r.kernel.org, edumazet@...gle.com,
netdev@...r.kernel.org
Subject: Re: Invalid sk_policy[] access
> > 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
Powered by blists - more mailing lists