System call flow in lx brand
Recently for the FOSS.in presentation, I started looking through the source code for BrandZ. There are some interesting things that I found out in the design document that is present on the BrandZ community page in OpenSolaris.org webpage.
If you follow the flow in the system call emulation diagram you finally end up calling the linux system call again, as the second time when the solaris systemcall is invoked by lx library function it checks the brand data of the proc_t structure and finds it as a linux brand and again goes to the int80_handler of the brand's kernel module. I don't mean that the diagram is wrong, the developers purposfully made it like this as they are finally going to implement that in future releases. So after consulting Nils Nieuwejaar and Edward Pilatowicz I came up with the following system call flow diagram for lx brand.

The numbered arrows shows the exact systemcall flow, arrow heads represent the call direction.