Beautiful. I am happy. Alex, from what i have seen, i agree with the &quot;black sheep&quot; statement. I haven't seen a better msg on the list since this. Now that makes me feel that my work is done.<br>I will continue to watch the project, but i feel to useless not working on it, and realy am not comfortable with the code (I am a *n*x clone kernel programer myself ). I plan to write an OS of my own soon ( &quot;AHGG, Not another enama!!!&quot; ) and may look for help. I will keep a link on my site up to 
<a href="http://reactos.org">reactos.org</a>, but for now, until a day i am needed again...<br><br><br>brian<br>friend of reactos<br>my site: <a href="http://www.metawire.org/%7Epsudobuddha">&lt;psudobuddha's site&gt;</a>
<br><br><div><span class="gmail_quote">On 1/19/06, <b class="gmail_sendername">Alex Ionescu</b> &lt;<a href="mailto:ionucu@videotron.ca">ionucu@videotron.ca</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>I'm going to answer generically, not point-by-point, since I don't have<br>much time, but I hope I can cover everything:<br><br>1) Those magic sizes were calculated in my head and I didn't have time<br>to make them into constants as I did many of them.
<br>0x29C is the pre-defined value of NPX_FRAME_LENGTH + KTRAP_FRAME_LENGTH.<br>0x48 is the differerence in the KTRAP_FRAME between the registers that<br>we will skip. I could've done (KTRAP_FRAME_XXX - KTRAP_FRAME_YYY).<br>
<br>2) This is not a matter of driver compatibility. The fast system call<br>stub is a mostly hardware-defined entrypoint, handled by low-level<br>software logic. In implementing it, there are only 3 available sources<br>
of information: Whatever minimal info the Intel manual gives, the Linux<br>sources, the Windows kernel binary. It is almost simply impossible to<br>&quot;guess&quot; how the stub should work. Filip tried to make it work more then
<br>a year ago, and even he gave up (the AMD version), beacuse it is simply<br>too hard and confusing unless you have some available code to look at.<br>As such, my first and foremost source was the Linux source code. It<br>
helped me understand how to setup the LSTAR MSR register, as well as the<br>other register values. Then, through several mailing list posts, I was<br>able to understand some bugs in the way ReactOS had its segments set up,
<br>which caused problems in the code. Then, to understand the way Windows<br>chose between INT2E and SYSENTER, I found a document online written by a<br>person called Elicz, which described the stub and what it should do,
<br>much in the same way people argued &quot;clean-room reverse engineering&quot; is<br>done. With this information, I was able to write more then 85% of the<br>stub. My next, and final remaining possible step, was to use IDA to look
<br>at the Windows code. I used it as a learning tool, not as a copying<br>tool. It is hard to argue that what I did was &quot;Reverse-engineering&quot;,<br>which, to my knowledge, implies taking something apart to re-create it,
<br>since this usually implies converting the assembly code to functional C<br>code or otherwise. But I don't view as looking at assembly in order to<br>understand a low-level hardware interface as &quot;reverse engineering&quot;. And
<br>yes, as described above, it -was- my last choice. Additionally, the<br>parts which were supposedly &quot;copied&quot; are NOT part of the functional part<br>of the code. They are debug helpers, offering nothing else but
<br>assertions in case of problems.<br><br>3) I find the idea of removing code that &quot;Violates policy&quot; ludicrous. No<br>one has the right to dermine if some piece of code violates policy or<br>not, especially if the author writing it denies it. Only a judge or
<br>lawyer should be able to make that decision. Additionally, in this<br>specific case, what could be done? The code is in SVN and even if<br>rewritten it will 1) look the same, excpt &quot;edx&quot; would become &quot;esi&quot; and
<br>vice-versa 2) a judge would still argue that &quot;hey, you had the previous<br>code in SVN for over a year, you've all been tainted and could've just<br>as easily looked at it&quot;. Furthermore, such attitude might start
<br>devolving into a dangerous witchhunt. Don't like someone's code? Report<br>them and have it removed! This communist-era and fascist-era behaviour<br>deeply scares me and reminds me of a country and regime which I fled. I
<br>do not want to see it happen, because it would slowly kill and rip apart<br>this project.<br><br>These monthly Alex-bashings are starting to tire me very much and maybe<br>it's time I took an offensive position instead of a defensive one. I do
<br>not want to start naming names, but many of our developers have already<br>violated our policy in different ways. If you actively start enforcing<br>it, then it will be my duty as an active developer to enforce it as<br>
well, meaning that hiding any information I have concerning other<br>developers' violations would be considered as complicity, so I would be<br>legally bound to report them. In other words, this would mean that the<br>project would lose half of its developers.
<br><br>I am sick of being treated as the black sheep and the &quot;example&quot;. This<br>stops here. I have always been put in the spotlight for almost any<br>action I took, and I've always taken steps to repair it. But these
<br>public trials of guilt have passed a limit. Either start questionning<br>everyone and treating every developer the same, or stop using me as a tool.<br><br>Best regards,<br>Alex Ionescu<br><br>Steven Edwards wrote:<br>
<br>&gt;On 1/19/06, WaxDragon &lt;<a href="mailto:waxdragon@gmail.com">waxdragon@gmail.com</a>&gt; wrote:<br>&gt;<br>&gt;<br>&gt;&gt;You are not a judge with years of experience in law. Whether or not<br>&gt;&gt;you have any kernel internal knowledge is also irrelevant to this
<br>&gt;&gt;thought experiment.<br>&gt;&gt;<br>&gt;&gt;<br>&gt;<br>&gt;No but I am someone trying to be objective that has spent a good part<br>&gt;of the past few years reviewing case history for reverse engineering<br>&gt;cases. Its more than we are going tot get from some judges.
<br>&gt;<br>&gt;<br>&gt;<br>&gt;&gt;&gt;Why did you have to do this? Is it not possible to write a driver that<br>&gt;&gt;&gt;abuses fastcall to make a mostly working implementation without having<br>&gt;&gt;&gt;to 1. look at and 2. copy the existing object code of Windows?
<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;Alex clearly stated that there is only one way to perform that stack<br>&gt;&gt;check, let's quote him properly:<br>&gt;&gt;<br>&gt;&gt;&quot;Note however, that there is only one way to check the stack: cmp ebp,
<br>&gt;&gt;esp. Unless you want to consider cmp esp, ebp as an alternate method.&quot;<br>&gt;&gt;<br>&gt;&gt;As Casper said, it is legal to use that information, but not legal to<br>&gt;&gt;*copy/paste* it into ReactOS.&nbsp;&nbsp;Alex clearly comprehends what that bit
<br>&gt;&gt;of assembly does.<br>&gt;&gt;<br>&gt;&gt;<br>&gt;<br>&gt;Once again he may have stated this but he also states he disassembled<br>&gt;Windows. The issue is the methods used to gather the information.<br>&gt;Reverse engineering is legal if there is no other method to gather the
<br>&gt;information which is why I clearly asked &quot;Was there no other way to<br>&gt;get this information&quot; or let me put it another way....<br>&gt;<br>&gt;Alex: did you even bother doing some sort of clean room examination of
<br>&gt;Windows behavior based on third party drivers or some sort of testing<br>&gt;or was IDA your first step? Checked Microsoft driver assertions and<br>&gt;debug symbols don't count.<br>&gt;<br>&gt;<br>&gt;<br>&gt;&gt;&gt;OK so someone else sneaked something in that violates the rules and it
<br>&gt;&gt;&gt;was not caught. Lets just check your argument for a moment and say you<br>&gt;&gt;&gt;could be wrong about your development methods. Being ...&quot;clearly<br>&gt;&gt;&gt;commented, organized and structured...&quot; does not amount to a hill of
<br>&gt;&gt;&gt;beans if I am violating the law and or project rules. I can make bank<br>&gt;&gt;&gt;robbing plans that are &quot;...clearly commented, organized and<br>&gt;&gt;&gt;structured...&quot; I don't think that will gain me much ground in court.
<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;This analogy is invalid.&nbsp;&nbsp;The legality of this issue stems directly<br>&gt;&gt;from whether or not he wrote the code.&nbsp;&nbsp;Robbing a bank is _always_<br>&gt;&gt;illegal, writing code is only illegal if you copy/paste it from a
<br>&gt;&gt;legitimate author, or implement a patented method.<br>&gt;&gt;<br>&gt;&gt;<br>&gt;<br>&gt;No its perfectly a valid question. In law there is this concept called<br>&gt;Mens Rea which means intent. Was his intent to create a independent
<br>&gt;unique work he himself created and he just needed the information for<br>&gt;compatibly reasons or did he intend to just make it work without<br>&gt;caring of the consequences to everyone else. Hence the question above.
<br>&gt;Was IDA the first step or the last?<br>&gt;<br>&gt;<br>&gt;<br>&gt;&gt;Alex's structured and commented code demonstrates comprehension.&nbsp;&nbsp;In<br>&gt;&gt;this case, where the code's function is clear, and constrained by
<br>&gt;&gt;implementation details, the code will be similar by anyone who<br>&gt;&gt;implements it.&nbsp;&nbsp;Alex's comments and code structure shows that he<br>&gt;&gt;understands what is going on in the assembly, and most likely shows
<br>&gt;&gt;that he wrote the code, as opposed to just copy/pasting existing code.<br>&gt;&gt;<br>&gt;&gt;<br>&gt;<br>&gt;Just because he understands the code now is irrelevant. Its the method<br>&gt;of which that understanding came. Because our work is going to be
<br>&gt;similar to windows the arguments about a derived work hangs upon the<br>&gt;notion that we are independently creating our own implementation<br>&gt;rather than looking at the original. We can read documentation about
<br>&gt;the original all day long, we can examine applications and drivers<br>&gt;that use the original all day long but when we start to crack open the<br>&gt;book of the original implementation we run the legal risk of being
<br>&gt;declared a derived work.<br>&gt;<br>&gt;<br>&gt;<br>&gt;&gt;It only looks suspicious since you are not a kernel developer.&nbsp;&nbsp;Again,<br>&gt;&gt;not something a judge would concern himself with.&nbsp;&nbsp;Now the<br>&gt;&gt;prosecutor.....
<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;/* Skip the other registers */<br>&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;sub esp, 0x48<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;<br>&gt;&lt;snip&gt;<br>&gt;<br>&gt;<br>&gt;<br>
&gt;&gt;&gt;ie.&nbsp;&nbsp;why 0x29C, why 0x48?<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;Since he is making room on the stack for another frame, this is a<br>&gt;&gt;predefined size.<br>&gt;&gt;<br>&gt;&gt;<br>&gt;<br>&gt;Hmm ok. So another size won't work? Where is it predefined? I ask not
<br>&gt;to accuse but to try to understand to be fair to all parties involved.<br>&gt;But according to Hartmut this is a clear case of copy and paste. This<br>&gt;is why we cannot allow this to continue. If dirty-room reverse
<br>&gt;engineering was the last resort then it would be a original<br>&gt;implementation<br>&gt;<br>&gt;<br>&gt;<br>&gt;&gt;further.&nbsp;&nbsp; Now, I do agree he could have used the safer &quot;clean-room&quot;<br>&gt;&gt;method, but I'm not convinced that it would have yielded a
<br>&gt;&gt;significantly different implementation, and we might still be in the<br>&gt;&gt;same position.<br>&gt;&gt;<br>&gt;&gt;<br>&gt;<br>&gt;You admit that his implementation was not based on &quot;clean-room&quot;. My
<br>&gt;question once again was why did it have to be dirty room? If there is<br>&gt;no other option for making a compatible implementation then this<br>&gt;discussion holds no water but if by your own words he could have used
<br>&gt;a safer method then there is a problem.<br>&gt;<br>&gt;So we are back to the first question. What development methods were<br>&gt;used. IDA first or last?<br>&gt;<br>&gt;--<br>&gt;Steven Edwards - ReactOS and Wine developer
<br>&gt;<br>&gt;&quot;There is one thing stronger than all the armies in the world, and<br>&gt;that is an idea whose time has come.&quot; - Victor Hugo<br>&gt;<br>&gt;_______________________________________________<br>&gt;Ros-dev mailing list
<br>&gt;<a href="mailto:Ros-dev@reactos.org">Ros-dev@reactos.org</a><br>&gt;<a href="http://www.reactos.org/mailman/listinfo/ros-dev">http://www.reactos.org/mailman/listinfo/ros-dev</a><br>&gt;<br>&gt;<br>&gt;<br><br>_______________________________________________
<br>Ros-dev mailing list<br><a href="mailto:Ros-dev@reactos.org">Ros-dev@reactos.org</a><br><a href="http://www.reactos.org/mailman/listinfo/ros-dev">http://www.reactos.org/mailman/listinfo/ros-dev</a><br></blockquote></div>
<br>