Re: StringItem length

"Moritz Kroll" <[email protected]> Sun, 8 Mar 2009 11:11:17 +0100
Newsgroups gmane.comp.micro-kernel.l4.l4ka.general
Message-ID <739E2700E47B43F0B54EC6BF901514A6@MComp>
*bump*
Any comments are appreciated.

----- Original Message ----- 
From: "Moritz Kroll" <[email protected]>
To: <[email protected]>
Sent: Monday, February 23, 2009 4:12 PM
Subject: StringItem length


> 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