Thread (13 messages) flat view 13 messages, 3 authors, 2016-02-24

Re: Invalid sk_policy[] access

From: Sowmini Varadhan <hidden>
Date: 2016-02-23 23:59:46
Also in: sparclinux

quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help