StringItem length
"Moritz Kroll" <[email protected]> Mon, 23 Feb 2009 16:12:53 +0100
| Newsgroups | gmane.comp.micro-kernel.l4.l4ka.general |
|---|---|
| Message-ID | <3227B7C4CBE64035B8E119939F8003A3@MComp> |
The "current" L4 X.2 reference manual (2006-11-17) states on page 56 (section 5.4 StringItem) that the "maximum string length is 4 M bytes, even if the according field is 54 bits wide on 64-bit processors". Two questions: 1. How do you encode a string size of 4 MB on 32-bit? As far as I see it's not possible (only 22 length bits) and there is no implicit +1 used in the kernel source code. If this is intended (probably to allow zero-length strings (why?)), the manual should be more clear on the maximum size ((4 M - 1) bytes). 2. Who enforces the maximum size on 64-bit (x64)? For intra-space string copies I didn't find any reason why e.g. a 10 GB copy shouldn't work. For an inter-space string copy still even any 1 GB copy should work, as the copy area has a size of 2 GB. I have no idea, what will happen to larger copies, though. I guess an unhandled kernel pagefault when the memcpy reaches the end of the copy area? Best regards Moritz