Re: StringItem length

View: New views
1 Messages — Rating Filter:   Alert me  

Re: StringItem length

by Moritz Kroll :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

*bump*
Any comments are appreciated.

----- Original Message -----
From: "Moritz Kroll" <Moritz.Kroll@...>
To: <l4ka@...>
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