create bounty: in-kernel wireguard port
[ikiwiki.git] / docs / developer / Code_Bounties.mdwn
1 [[!toc levels=2]]
2
3 # Explanation 
4
5 A code bounty is a certain financial stimulant to encourage someone to put his or her effort into a project. A code bounty in the DragonFlyBSD project needs to adhere to a set of rules defined hereunder, though these are only preliminary and subject to change. One could for example imagine developers accepting sponsorship on a wholly different basis, or non-financial rewards for completing a bounty project, like free hardware (we love that!).
6
7 # Rules 
8
9 * Bounty Projects are open to anyone that has a reasonable capability of completing the project. Typically it's on first to ask basis, but the sponsor of the bounty may choose differently.
10
11 * If the developer can not complete the project by the given time period, the bounty agreement is void and no money will be issued for work done. DragonFly developers may extend the time period if it's reasonable and prudent to do so. Upon voiding the agreement, someone may reissue the project again to another developer.
12
13 * Payment for a project shall be issued in no less than 72 hours after the DragonFly developers has had ten business days to determine if the code is stable and usefulness, no major issues are left unresolved and able for being merged into the project. Payment shall be in either [[Paypal]] (preferred), some money sending company or  a bank account transfer.
14
15 * Upon receiving payment, the project developer shall issue (within 24 hours) a message in the WIKI and to DragonFly development ML that they have received payment.
16
17 * All code submitted shall be of the same license as DragonFly. Any questions on the licensing issues should be directed to the DragonFly Team.
18
19
20 <hr />
21
22 # Active bounties 
23
24 ## In-kernel WireGuard port
25
26 ### Description
27
28 [WireGuard](https://www.wireguard.com/) is an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography.
29 It aims to be faster, simpler, leaner, and more useful than IPsec, while avoiding the massive headache.
30 It intends to be considerably more performant than OpenVPN.
31 WireGuard is designed as a general purpose VPN for running on embedded interfaces and super computers alike, fit for many different circumstances.
32 Initially released for the Linux kernel, it is now cross-platform (Windows, macOS, BSD, iOS, Android) and widely deployable.
33 (copied from [WireGuard official website](https://www.wireguard.com/))
34
35 We already have the userland implementation in Golang in DPorts (i.e., [`wireguard-go`](https://github.com/DragonFlyBSD/DPorts/tree/master/net/wireguard-go)).
36 It would be better to also gain the in-kernel implementation, like OpenBSD and FreeBSD already did.
37
38 ### Technical details 
39
40 * Port WireGuard directly from the upstream or from OpenBSD/FreeBSD.
41 * The crypto framework might need an update (from OpenBSD/FreeBSD).
42
43 **NOTE**:
44 The initial port by FreeBSD/Netgate was buggy, so need to investigate before using that code.
45 See: [Buffer overruns, license violations, and bad code: FreeBSD 13's close call](https://arstechnica.com/gadgets/2021/03/buffer-overruns-license-violations-and-bad-code-freebsd-13s-close-call/)
46
47 ### Main goals
48
49 * WireGuard port in DragonFly kernel, as well as the userland tools.
50 * WireGuard works.
51 * The port should be ideally reviewed/audited by the WireGuard project.
52   I (aly@) believe the author (Jason A. Donenfeld) would like to help.
53
54 ### Actuality
55
56 Created at: 2021-08-12
57
58 ### Estimated time
59
60 Unknown.
61
62 ### Donators
63
64 <table>
65 <tr>
66 <th>Donor</th>
67 <th>Amount</th>
68 </tr>
69
70 <tr>
71 <td>aly</td>
72 <td>100 USD</td>
73 </tr>
74
75 <tr>
76 <td>TOTAL AMOUNT</td>
77 <td>100 USD</td>
78 </tr>
79 </table>
80
81
82 ## Bring in support for USB webcams
83
84 ### Description
85
86 Bring in `uvideo` from NetBSD or OpenBSD, and the dependent `video` driver. If you think that webcam support in FreeBSD is superior, feels free to bring in `cuse` etc.
87
88 Final result should be that USB webcams are usable from chrome or firefox for the purpose of video conferencing (e.g. via jitsi.org). Personally I only need support for low-quality webcams, no need for 4k :).
89
90 ### Actuality
91
92 Bounty created at: 2021-08-08
93
94 ### Estimated time
95
96 Unknown.
97
98 ### Donators
99
100 <table>
101 <tr>
102 <th>Donor</th>
103 <th>Amount</th>
104 </tr>
105
106 <tr>
107 <td>mneumann</td>
108 <td>150 USD</td>
109 </tr>
110
111 <tr>
112 <td>pikrzyszt</td>
113 <td>100 GBP</td>
114 </tr>
115
116 <tr>
117 <td>aly</td>
118 <td>50 USD</td>
119 </tr>
120
121 <tr>
122 <td>TOTAL AMOUNT</td>
123 <td>200 USD + 100 GBP</td>
124 </tr>
125
126 </table>
127
128
129 ## Port uhidd HID daemon from FreeBSD
130
131 ### Description
132
133 uhidd is a userland driver/daemon for USB HID devices like mouse, keyboard etc.
134 It is based on libusb20 and currently only works for FreeBSD 8.x and above.
135
136 The uhidd driver would allow USB gaming controllers and joysticks to be used on DragonFly BSD.
137 uhidd also provide support for multimedia keys found on USB keyboards.
138
139 (Derived from the [FreeBSD Wiki: uhidd](https://wiki.freebsd.org/uhidd))
140
141 ### Technical details 
142
143 * This mainly involves porting uhidd and related items from FreeBSD.
144
145 ### Main goals
146
147 * Being able to use USB game controllers and joysticks on DragonFly.
148
149 ### Actuality
150
151 Bounty created at: 2020-02-17
152
153 ### Estimated time
154
155 Unknown.
156
157 ### Donators
158
159 <table>
160 <tr>
161 <th>Donor</th>
162 <th>Amount</th>
163 </tr>
164
165 <tr>
166 <td>kerma</td>
167 <td>100 USD</td>
168 </tr>
169
170 <tr>
171 <td>TOTAL AMOUNT</td>
172 <td>100 USD</td>
173 </tr>
174
175 </table>
176
177
178 ## Extend vkernel(7) to run on any POSIX OS
179
180 ### Description
181
182 * vkernel(7) allows for running DragonFly kernels in userland. Still, it requires a DragonFly operating system.
183
184 * Similar to NetBSD's rumpkernel, allow the vkernel application to be independent of the operating system. Using a cross-compiler,
185   this would allow us to run a DragonFly kernel for instance on Linux or NetBSD (I know that running it within a virtual machine would be faster...).
186
187 ### Technical details 
188
189 * This mainly involves rewriting parts of the page-table handling code and interrupt-related code.
190
191 ### Main goals
192
193 * Being able to run a vkernel binary on any POSIX OS.
194
195 ### Actuality
196
197 Bounty created at: 2020-02-12
198
199 ### Estimated time
200
201 Unknown.
202
203 ### Donators
204
205 <table>
206 <tr>
207 <th>Donor</th>
208 <th>Amount</th>
209 </tr>
210
211 <tr>
212 <td>mneumann</td>
213 <td>100 USD</td>
214 </tr>
215
216 <tr>
217 <td>TOTAL AMOUNT</td>
218 <td>100 USD</td>
219 </tr>
220
221 </table>
222
223
224 ## Bluetooth-Support
225
226 ### Description
227
228 * Make Bluetooth work on DragonFly.
229
230 ### Technical details
231
232 We already have bluetooth support in the kernel which is based on netgraph6 (AFAIK). 
233 It is disabled by default and is probably out of date.
234
235 We also have a partial and old netbt port from NetBSD...
236
237 ### Main goals
238
239 * Research the current state of Bluetooth in DragonFly.
240 * Bluetooth is enabled by default when building the kernel/world.
241 * Bring in updates or re-port from FreeBSD/NetBSD.
242 * Bluetooth keyboard / mice is working.
243 * Bluetooth headphone is working.
244
245 ### Actuality
246
247 Bounty created at: 2020-02-12
248
249 ### Estimated time
250
251 Unknown.
252
253 ### Donators
254
255 <table>
256 <tr>
257 <th>Donor</th>
258 <th>Amount</th>
259 </tr>
260
261 <tr>
262 <td>mneumann</td>
263 <td>200 USD</td>
264 </tr>
265
266 <tr>
267 <td>tuxillo</td>
268 <td>50 USD</td>
269 </tr>
270
271 <tr>
272 <td>aly</td>
273 <td>50 USD</td>
274 </tr>
275
276 <tr>
277 <td>TOTAL AMOUNT</td>
278 <td>300 USD</td>
279 </tr>
280
281 </table>
282
283
284 ## Full Rust libc FFI binding support
285
286 ### Description
287
288 * Port Rust FFI libc bindings, in full to DragonFly.
289
290 ### Technical details
291
292 There has intermittently been some support on this and builds and tests have gone through periods of passing and failing, but a comprehensive buildout of full support of all features would make more advanced Rust development, especially as a viable web server backend more possible.
293
294 The Github URL is https://github.com/rust-lang/libc
295
296 ### Main goals
297
298 * Ensure that all features available in our libc have been ported to working in the Rust FFI lib
299 * Ensure that the code builds
300 * Ensure that all tests pass
301 * Ensure at least a semi automated way for the upstream team to be able to continue validation by some sort of CI/CD system so that we don't have a large support divergence
302
303 ### Estimated time
304
305 Unknown.
306
307 ### Donators
308
309 <table>
310 <tr>
311 <th>Donor</th>
312 <th>Amount</th>
313 </tr>
314
315 <tr>
316 <td>zach</td>
317 <td>400 USD</td>
318 </tr>
319
320 <tr>
321 <td>joris</td>
322 <td>150 USD</td>
323 </tr>
324
325 <tr>
326 <td>profmakx</td>
327 <td>200 USD</td>
328 </tr>
329
330 <tr>
331 <td>TOTAL AMOUNT</td>
332 <td>750 USD</td>
333 </tr>
334
335 </table>
336 <br>
337
338
339 ## More Modern Thunderbolt Support
340
341 ### Description
342
343 * Integrate Thunderbolt Devices
344
345 ### Technical Details
346
347 To be defined
348
349 ### Main Goals
350
351 Not Yet Written
352
353 ### Estimated Time
354
355 Unknown
356
357 ### Donators
358
359 <table>
360 <tr>
361 <th>Donor</th>
362 <th>Amount</th>
363 </tr>
364
365 <tr>
366 <td>Mike Carroll</td>
367 <td>150 USD</td>
368 </tr>
369
370 <tr>
371 <td>TOTAL AMOUNT</td>
372 <td> 150 USD</td>
373 </tr>
374
375 </table> 
376
377
378 ## OpenPower9 Support
379
380 ### Description
381
382 * Port DragonFly to OpenPower 9 CPUs
383
384 ### Technical Details
385
386 To be defined
387
388 ### Main Goals
389
390 Not Yet Written
391
392 ### Estimated Time
393
394 Unknown
395
396 ### Donators
397
398 <table>
399 <tr>
400 <th>Donor</th>
401 <th>Amount</th>
402 </tr>
403
404 <tr>
405 <td>Mike Carroll</td>
406 <td>150 USD</td>
407 </tr>
408
409 <tr>
410 <td>TOTAL AMOUNT</td>
411 <td> 150 USD</td>
412 </tr>
413
414 </table> 
415
416
417 ## AArch64 support
418
419 ### Description
420
421 * Port DragonFly to Aarch64
422
423 ### Technical details
424
425 To be defined
426
427 ### Main goals
428
429 Not yet written.
430
431 ### Estimated time
432
433 Unknown.
434
435 ### Donators
436
437 <table>
438 <tr>
439 <th>Donor</th>
440 <th>Amount</th>
441 </tr>
442
443 <tr>
444 <td>tuxillo</td>
445 <td>100 EUR</td>
446 </tr>
447
448 <tr>
449 <td>Mike Carroll</td>
450 <td>150 USD</td>
451 </tr>
452
453 <tr>
454 <td>TOTAL AMOUNT</td>
455 <td>100 EUR + 150 USD</td>
456 </tr>
457
458 </table>
459
460
461 ## UTF-8 support in Console 
462
463 ### Description 
464
465 Adding full UTF-8 support in console.
466
467 ### Technical details
468
469 Not yet written.
470
471 ### Main goals
472
473 Not yet written.
474
475 ### Estimated time
476
477 Still unknown.
478
479 ### Donators
480
481 <table>
482 <tr>
483 <th>Donor</th>
484 <th>Amount</th>
485 </tr>
486
487 <tr>
488 <td>timofonic</td>
489 <td>35 EUR</td>
490 </tr>
491
492 <tr>
493 <td>dillon</td>
494 <td>50 USD</td>
495 </tr>
496
497 <tr>
498 <td>kerma</td>
499 <td>100 USD</td>
500 </tr>
501
502 <tr>
503 <td>TOTAL AMOUNT</td>
504 <td>35 EUR + 150 USD</td>
505 </tr>
506
507 </table>
508
509
510 ## Port valgrind to DragonFlyBSD [TAKEN 2021-03-30]
511
512 ### Description
513
514 (shamelessly copied from gsoc2010 projects page)
515
516 Valgrind is a very useful tool on a system like DragonFly that's under heavy development. Ideally, we would want the port to be usable with vkernel processes, thus enabling complex checking of the core kernel code.
517
518 ### Technical details
519
520 Not yet written.
521
522 ### Main goals
523
524 (shamelessly copied from gsoc2010 projects page)
525
526 The goal of this project is to port valgrind (3.5.0+) to the DragonFlyBSD platform so that at least the memcheck tool runs sufficiently well to be useful. Also an update for the pkgsrc package (devel/valgrind) should be made.
527
528 ### Estimated time
529
530 Unknown.
531
532 ### Bounty status
533
534 Taken by dan_.
535
536 Repository: [[Github|https://github.com/1338-1/valgrind-dragonfly]]
537
538 ### Donators
539
540 <table>
541 <tr>
542 <th>Donor</th>
543 <th>Amount</th>
544 </tr>
545
546 <tr>
547 <td>rumko</td>
548 <td>100 EUR</td>
549 </tr>
550
551 <tr>
552 <td>tuxillo</td>
553 <td>50 EUR</td>
554 </tr>
555
556 <tr>
557 <td>dillon</td>
558 <td>100 USD</td>
559 </tr>
560
561 <tr>
562 <td>sjg</td>
563 <td>50 USD</td>
564 </tr>
565
566 <tr>
567 <td>TOTAL AMOUNT</td>
568 <td>150 EUR + 150 USD</td>
569 </tr>
570
571 </table>
572
573
574 ## HAMMER compression
575
576 ### Description
577
578 (shamelessly copied from gsoc2010 projects page)
579
580 * Compress blocks as they get written to disk.
581 * Only file data (rec_type == DATA) should be compressed, not meta-data.
582 * the CRC should be that of the uncompressed data.
583 * ideally you'd need to associate the uncompressed data with the buffer cache buffer somehow, so that decompression is only performed once.
584 * compression could be turned on a per-file or per-pfs basis.
585 * gzip compression would be just fine at first; lzo or lzjb might be preferable.
586
587 **NOTE**:
588 HAMMER2 has replaced HAMMER to be the default filesystem on DragonFly and is under active development and maintenance.  HAMMER2 also has compression support.
589
590 ### Technical details
591
592 (shamelessly copied from gsoc2010 projects page)
593
594 Doing compression would require flagging the data record as being compressed and also require double-buffering since the buffer cache buffer associated with the uncompressed data might have holes in it and otherwise referenced by user programs and cannot serve as a buffer for in-place compression or decompression.
595
596 The direct read / direct write mechanic would almost certainly have to be disabled for compressed buffers and the small-data zone would probably have to be used (the large-data zone is designed only for use with 16K or 64K buffers).
597
598 ### Main goals
599
600 Not yet written.
601
602 ### Estimated time
603
604 Unknown.
605
606 ### Donators
607
608 <table>
609 <tr>
610 <th>Donor</th>
611 <th>Amount</th>
612 </tr>
613
614 <tr>
615 <td>rumko</td>
616 <td>50 EUR</td>
617 </tr>
618
619 <tr>
620 <td>dillon</td>
621 <td>100 USD</td>
622 </tr>
623
624 <tr>
625 <td>vsrinivas</td>
626 <td>50 USD</td>
627 </tr>
628
629 <tr>
630 <td>TOTAL AMOUNT</td>
631 <td>50 EUR + 150 USD</td>
632 </tr>
633
634 </table>
635
636
637 ## Native NTFS support
638
639 ### Description
640
641 (shamelessly copied from gsoc2010 projects page)
642
643 * Port Apple's native NTFS driver
644
645 ### Technical details
646
647 (shamelessly copied from gsoc2010 projects page)
648
649 Apple's NTFS native driver could be ported to DragonFly BSD.
650
651 Latest code as of now is:
652 http://opensource.apple.com/source/ntfs/ntfs-84.40.1/kext/
653
654 ### Main goals
655
656 Not yet written.
657
658 ### Estimated time
659
660 Unknown.
661
662 ### Donators
663
664 <table>
665 <tr>
666 <th>Donor</th>
667 <th>Amount</th>
668 </tr>
669
670 <tr>
671 <td>tuxillo</td>
672 <td>75 EUR</td>
673 </tr>
674
675 <tr>
676 <td>TOTAL AMOUNT</td>
677 <td>75 EUR</td>
678 </tr>
679
680 </table>
681
682
683 ## Card reader driver
684
685 ### Description
686
687 As swildner wrote on 18th Septmber 2017: we need a new driver for a card reader.
688
689 RTS5209 PCI Express Card Reader
690
691 ### Estimated time
692
693 Unknown.
694
695 ### Donators
696
697 <table>
698 <tr>
699 <th>Donor</th>
700 <th>Amount</th>
701 </tr>
702
703 <tr>
704 <td>ferz</td>
705 <td>20 EUR</td>
706 </tr>
707
708 <tr>
709 <td>TOTAL AMOUNT</td>
710 <td>20 EUR</td>
711 </tr>
712
713 </table>
714
715 <hr />
716
717 # Completed Bounties
718
719 ## Hypervisor for DragonFly/x86_64
720
721 ### Description
722
723 * Port nvmm (NetBSD) or bhyve (FreeBSD) to DragonFly.
724
725 ### Technical details 
726
727 Employ Intel VT-x and AMD SVM to provide fast virtualization support for running various guest OSes.
728
729 ### Main goals
730
731 * Hardware-accelerated virtualization to run guest operating systems like Linux or Windows 10 on DragonFly.
732 * Support both Intel and AMD CPUs.
733
734 ### Actuality
735
736 Created at: 2020-02-12<br>
737 Completed at: 2021-08-08
738
739 ### Estimated time
740
741 Unknown.
742
743 ### Bounty status
744
745 Completed by: Aaron LI (aly@)<br>
746
747 Previous Party: Kamil Rytarowski (kamil at netbsd dot org)<br>
748 Previous Repository: https://github.com/Moritz-Systems/DragonFlyBSD
749
750 ### Results
751
752 * Ported NVMM from NetBSD-current (as of 2021-06-25), plus various improvements/fixes from maxv's repo.
753 * Support both Intel VMX and AMD SVM on x86_64 CPUs.
754 * Components:
755   - nvmm(4): kernel module, including both the MI frontend and MD backends
756   - libnvmm(3): hypervisor API interacting with nvmm(4), e.g., used by QEMU
757   - nvmmctl(8): utility to inspect NVMM status (still premilinary)
758   - testcases/libnvmm: libnvmm test cases
759   - test/nvmm: examples
760 * Merged into master (6.1) on 2021-07-20.
761 * QEMU (6.0.0) has been updated to employ NVMM on DragonFly and available in [DPorts: emulators/qemu60](https://github.com/DragonFlyBSD/DPorts/tree/master/emulators/qemu60).
762 * HowTo document: [Virtualization: NVMM Hypervisor](/docs/docs/howtos/nvmm)
763
764 ### Donators
765
766 <table>
767 <tr>
768 <th>Donor</th>
769 <th>Amount</th>
770 </tr>
771
772 <tr>
773 <td>mneumann</td>
774 <td>500 USD (paid)</td>
775 </tr>
776
777 <tr>
778 <td>tuxillo</td>
779 <td>175 USD (paid)</td>
780 </tr>
781
782 <tr>
783 <td>kerma</td>
784 <td>500 USD (paid)</td>
785 </tr>
786
787 <tr>
788 <td>aly</td>
789 <td>500 CNY (myself ;))</td>
790 </tr>
791
792 <tr>
793 <td>TOTAL AMOUNT</td>
794 <td>1175 USD + 500 CNY</td>
795 </tr>
796
797 </table>
798
799
800 ## Port autofs from FreeBSD
801
802 ### Description
803
804 Autofs allows dynamic filesystem mapping to render filesystems accessible, without keeping them mounted. It is designed as a modern, simpler, cleanroom reimplementation of amd.
805
806 ### Main goals
807
808 Not yet written.
809
810 ### Estimated time
811
812 Unknown.
813
814 ### Donators
815
816 <table>
817 <tr>
818 <th>Donor</th>
819 <th>Amount</th>
820 </tr>
821
822 <tr>
823 <td>kerma</td>
824 <td>50 USD (paid)</td>
825 </tr>
826
827 <tr>
828 <td>TOTAL AMOUNT</td>
829 <td>50 USD</td>
830 </tr>
831
832 </table>
833
834
835 ## Bring in usb4bsd
836
837 ### Description
838
839 * Completely rip out our USB stack and replace it with FreeBSD's new usb4bsd (or whatever the FreeBSD-current USB stack is called nowadays).
840 * Note that some work was done here already by polachok (http://gitweb.dragonflybsd.org/~polachok/dragonfly.git/shortlog/refs/heads/usb2) but the state is unknown.
841
842 ### Technical details 
843
844 Not yet written.
845
846 ### Main goals
847
848 Not yet written.
849
850 ### Estimated time
851
852 Unknown.
853
854 ### Donators
855
856 <table>
857 <tr>
858 <th>Donor</th>
859 <th>Amount</th>
860 </tr>
861
862 <tr>
863 <td>alexh</td>
864 <td>300 USD (paid)</td>
865 </tr>
866
867 <tr>
868 <td>sjg</td>
869 <td>100 USD (paid)</td>
870 </tr>
871
872 <tr>
873 <td>ferz</td>
874 <td>50 EUR (paid)</td>
875 </tr>
876
877 <tr>
878 <td>tuxillo</td>
879 <td>50 EUR (paid)</td>
880 </tr>
881
882 <tr>
883 <td>TOTAL AMOUNT</td>
884 <td>100 EUR + 400 USD</td>
885 </tr>
886
887 </table>