> Now study the data structures used for netwrking - they are all
> carefully crafted that the natural aligment "just fits", i. e. there
> are no gaps between variables if they are aligned naturally.
Actually, a packed structure not only doesn't have gaps, but can live
at any address. So th
Dear Luigi Mantellini,
In message you
wrote:
>
> > We (i. e. all of us except you) do not have a problem.
>
> my question is: how can you be sure on this? I haven't used strange
Because I read the documentation?
> compilers or strange CFLAGS.. I just do "make" on a supported target
> (qemu_m
Dear Wolfgang,
2009/1/28 Wolfgang Denk :
> Dear Luigi Mantellini,
>
> In message you
> wrote:
>>
>> I think that an audit of the code is important to understand if we
>> have a problem (or not) and how large is the problem.
>
> We (i. e. all of us except you) do not have a problem.
my question
Dear Luigi Mantellini,
In message you
wrote:
>
> I think that an audit of the code is important to understand if we
> have a problem (or not) and how large is the problem.
We (i. e. all of us except you) do not have a problem.
> My compiler is not broken...
Well, YMMV...
> cassini linux # f
Dear Ben,
In message <4980d38f.4020...@gmail.com> you wrote:
>
> > Here is for example a copy of /usr/include/netinet/ip.h :
...
> > struct iphdr
...
> Yeah, I made the same observation, but am not fluent enough in the black
> magic of Linux header files to know if packing was being enforced
> s
Dear All,
2009/1/28 Wolfgang Denk :
> Dear Ben Warren,
>
> In message <4980cc59.1070...@gmail.com> you wrote:
>>
>> > My idea should be to declare a define like this
>> >
>> > #define PKT_HEADER __attribute__((__packed__))
>> >
>> > my 2EuroCents.
>> >
>> > best regards,
>> >
>> > luigi
>> >
>> >
Wolfgang Denk wrote:
> Dear Ben Warren,
>
> In message <4980cc59.1070...@gmail.com> you wrote:
>
>>> My idea should be to declare a define like this
>>>
>>> #define PKT_HEADER __attribute__((__packed__))
>>>
>>> my 2EuroCents.
>>>
>>> best regards,
>>>
>>> luigi
>>>
>>>
>>>
>> OK, soun
Dear Ben Warren,
In message <4980cc59.1070...@gmail.com> you wrote:
>
> > My idea should be to declare a define like this
> >
> > #define PKT_HEADER __attribute__((__packed__))
> >
> > my 2EuroCents.
> >
> > best regards,
> >
> > luigi
> >
> >
> OK, sounds good. Send a patch please.
Hm... and
Dear Luigi Mantellini,
In message you
wrote:
>
> > I'd focus on fixing your toolchain. Your problem will not be confined to
> > protocol headers.
>
> my toolchain works fine ;)
Except that it adds padding where it doesn't make sense. I think you
want to fix it.
Best regards,
Wolfgang Denk
Luigi Mantellini wrote:
> Dear All
>
> From my point of view, when packing is formally required (ie packets
> headers), the structs should be declared explicitly as __packed__. The
> correctness of the object code should be independent from the compiler
> optimizations and we should always remember
2009/1/28 Ben Warren :
..
> I'd focus on fixing your toolchain. Your problem will not be confined to
> protocol headers.
my toolchain works fine ;)
--
Luigi 'Comio' Mantellini
R&D - Software
Industrie Dial Face S.p.A.
Via Canzo, 4
20068 Peschiera Borromeo (MI), Italy
Tel.: +39 02 5167 2813
Dear All
>From my point of view, when packing is formally required (ie packets
headers), the structs should be declared explicitly as __packed__. The
correctness of the object code should be independent from the compiler
optimizations and we should always remember that the offset of a
struct field
Jerry Van Baren wrote:
> Ben Warren wrote:
>> Luigi 'Comio' Mantellini wrote:
>>> Hi ML,
>>>
>>> I'm working on a mips target and I used qemu_mips target to simulate
>>> my target (that I hope to have in the next week...)
>>>
>>> Following my activities I noticed that IP_t structure is no defined
Ben Warren wrote:
> Luigi 'Comio' Mantellini wrote:
>> Hi ML,
>>
>> I'm working on a mips target and I used qemu_mips target to simulate my
>> target
>> (that I hope to have in the next week...)
>>
>> Following my activities I noticed that IP_t structure is no defined with
>> attribute "packed".
Luigi 'Comio' Mantellini wrote:
> Hi ML,
>
> I'm working on a mips target and I used qemu_mips target to simulate my
> target
> (that I hope to have in the next week...)
>
> Following my activities I noticed that IP_t structure is no defined with
> attribute "packed". I noticed this issue becaus
Hi ML,
I noticed that also the others headers structs have the same potential
problem.
I attached the patch to fix the net.h header file.
best regards,
luigi
On Tuesday 27 January 2009 19:32:10 Luigi 'Comio' Mantellini wrote:
> Hi ML,
>
> I'm working on a mips target and I used qemu_mips targe
Hi ML,
I'm working on a mips target and I used qemu_mips target to simulate my target
(that I hope to have in the next week...)
Following my activities I noticed that IP_t structure is no defined with
attribute "packed". I noticed this issue because using a self-made toolchain
(gcc4.2.4+binuti
17 matches
Mail list logo