Re: [PATCH v2 15/16] packed: no out-of-bound access of packed bitfields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> Hmm, I didn't know the IR could represent this! ;-)

It was already used but I would prefer to avoid it.
For example, when copying a structure:
	struct s {
		char name[5];
	} s, d;

	...
	d = s;
will linearize into a single 40-bit load + store.
In this case, it's quite OK because it directly translate to
a memcpy().

> Is the 'lowering' code already present? Maybe next patch.

I had several versions, all more ugly than the others. It's why
I ended with this 'OK, keep things simple for now'.
Also, there is several ways of doing this and I'm not convinced
of which one  should be used. Worse, the case:
	struct {
		a:10;
		f:14;
	};
should probably not be handled like the case:
	struct {
		a:5;
		f:30;
		z:5;
	};
since the problems are different (the first one is just a question
of not doing an out-of-bound access, while for the second case we
have a field not wider than 4-bytes but which can't be accessed 
in less than 5 bytes).
 
-- Luc



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux