Re: [Mono-dev] JIT on iOS

2012-12-19 Thread Miguel de Icaza
> I however think that with some clever hacks the current JIT could be used
> with this W^X policy of iOS:
>

That mode is only available on devices with development mode turned on.

Miguel
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] JIT on iOS

2012-12-19 Thread Kornél Pál


Hi,

I was thinking about the feasibility of having an interpreter on iOS but 
making JIT functional would have a higher impact without significantly 
increasing future maintenance requirements.


First I found https://gist.github.com/855607 that has two relatively 
recent comments at the bottom that basically state that iOS 6 enables 
changing writable non-executable memory to read-only executable.


I also found 
http://www.stuartcarnie.com/2011/03/executable-pages-in-ios-43.html that 
summarizes that read-only executable pages are of little use for a JIT 
producing multi-threaded code.


I haven't verified any of the claims because I don't usually develop on 
iOS and mprotect with PROT_EXEC may not be accepted to the App Store for 
iOS.


I however think that with some clever hacks the current JIT could be 
used with this W^X policy of iOS:


1. Using per-thread code pools could be used that avoids collisions for 
code used only on a single tread.


2. Temporarily make non-executable but writable the last page of code 
pool when adding a new method to avoid consuming too much memory pages. 
Time spent in non-executable state can be lessened by generating code in 
a separate buffer and only copying it to the code pool after is finished.


3. Resolve race conditions in the SIGSEGV handler by retrying code 
execution. To avoid infinite loops IP address must be checked to point 
to a code pool and code lock should probably be taken to ensure that the 
page is marked as executable again before retrying. This way code is 
ultimately able to be executed even when it takes multiple tries.


As long as the signal handler is not calling mprotect, only verifies 
under the code pool that the page is executable, security is not affected.


Under low JIT load race conditions occur rarely, while under high JIT 
load new code pages are allocated frequently, so race conditions quickly 
stop occurring for any specific function.


As a conclusion I think that this could work fine with very little 
modifications to JIT if PROT_EXEC is indeed supported.


I wonder if you have considered this solution or if you have any 
information regarding the feasibility of using mprotect with PROT_EXEC.


Thank you.

Kornel
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] (no subject)

2012-12-19 Thread Torello Querci
It's superfluos to say but if normal soft-float debian "wheezy" (
http://www.raspberrypi.org/downloads ) is used,
mono works fine for me.

Using raspian version the application seems to start but there are a lots
of problem with DateTime class , Thread.Sleep and so on.


Thanks


2012/12/18 Rodrigo Kumpera 

> It's surprising that mono works at all on linux-ARM. Mono doesn't support
> the hardfp ABI that most modern ARM distros follow which means that it
> can't even start.
>
>
> On Tue, Dec 18, 2012 at 2:31 PM, Greg Young wrote:
>
>> Using mono on a raspberry pi. Not sure if it has been reported before.
>>
>> The date part of DateTime is off and TimeSpan is a bit quirky eg
>>
>> var span = TimeSpan.FromMilliseconds(1);
>> Console.WriteLine(span.TotalSeconds);
>>
>> Prints 0
>>
>> --
>> Le doute n'est pas une condition agréable, mais la certitude est absurde.
>>
>> ___
>> Mono-devel-list mailing list
>> Mono-devel-list@lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>
>>
>
> ___
> Mono-devel-list mailing list
> Mono-devel-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Xcode project

2012-12-19 Thread Stack Pointer
Hi,

Has anyone successfully created a Xcode project for mono? Not a plugin for 
monotouch, I'm talking about the core internals that we get from 
(https://github.com/mono/mono.git)

Specially since mono/mono directory is all C/C++ based code, it should be 
possible to do this. Anyone else interested in this if I create one?

Thanks!
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list