It's been a long but ultimately rewarding journey to the completion of Google Summer of Code 2016 for the ReactOS Project. As a project that seeks to implement an open source operating system based off of the NT architecture and compatible with both NT device drivers and Win32 applications, ReactOS faces some rather distinct challenges compared to other open source OS projects. With an emphasis on compatibility and familiarity, interest in the project has increased substantially after the major revamps the other family of NT operating systems has underwent over the past few years.
My Google Summer of Code project proposal stated that I would add TCP support to the network branch of ReactOS, which sought to integrate lwIP 1.4.1 as the protocol level network driver for the operating system, to ultimately be tested by replacing the network driver in an installation of Windows Server 2003 with my driver. The full proposal can be found here. At the time of my proposal, I underestimated the amount of effort a fully working network driver would take.
This is a detailed summary of the work I've performed during GSoC. Highlights Wrote numerous functions which allow for NTFS write-support. Expanded ReactOS' NTFS driver with the ability to overwrite files and change a file's size. Identified and repaired several bugs related to reading files from NTFS. Fixed ReactOS' LargeMCB implementation, facilitating support for four file systems, NTFS included (See CORE-11002). Diagnosed and fixed a regression using log files (See CORE-11707).
In this final week, I tried to do as much as possible to get my driver to some sort of usable state for simple network C programs. My first task this week was to fix a problem with port freeing. When a TCP connection dies, its lwIP PCB would sometimes remain, preventing new sockets from binding to the ports they are taking up. After a lot of tracing, I discovered that an lwIP internal semantic was at play.
Here is my final blog post in terms of GSoC, but definitely not the last one in terms of contribution to ReactOS. I’ll try to share conclusion of my work done during this summer. First of all links Here are the links to GIT and SVN repositories containing my commits. These repos are identical, so for review or fork you can choose the one that is more eligible for you.
I said in my last update that I was aware GSoC was coming to an end, but in truth I don't think I realized just how close the end was coming. I need to be completely finished in much less than a week from now! Near the middle of the week, I was mostly finished with the code to create a new file record in memory. This progressed quickly, thanks to the time I put into diagnostic output and researching the file records that Windows creates.
In week 10, I had completed a major rewrite of my driver. In week 11, I dove into the problem of lwIP not being thread-safe once again. While I was able to deal with most of the individual bugs that kept popping up, each one was taking me more time to solve due to the haphazard nature of my previous fixes. At the beginning of last week, it was quickly becoming more apparent that I would need to rework most of my code once again if I wanted to have any hope of circumventing the multithreeading issue once and for all.
I spent last week moving from 2k3 to ROS. After doing final validation of my usbhub changes on 2k3, me and my mentor decided to move to some real world issues. I have setup my development and testing environment work with ROS instead of 2k3. VS-2015 as IDE for ROS First of all, I decided to use VS as IDE, to be able to use windbg as debugger. In that case I’ll have minimal changes on workflow I was using on 2k3 before.
This past week, I have primarily focused on thread-safety. Three weeks ago, I discovered that lwIP's core code is not thread-safe. When left unmodified, each lwIP thread will access several unprotected global linked lists as well as use a set of global variables to process any and all incoming packets. One option to solve this problem was to modify the core code so the global data was protected from concurrent access.
Wow, these weeks keep blazing by! Apologies for the missed updates; I've been faced with a family emergency for the past couple of weeks. My girlfriend's dad was in the hospital for 13 days after having a heart attack, getting a triple-bypass, then suffering from Ogilvie syndrome after surgery. He got out Saturday and is recovering. It's been a very long, scary time for my girlfriend and her family and she needed my support full-time.