add some more notes to the wireguard project
[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 The re-port of WireGuard to FreeBSD: [[ANNOUNCE] WireGuard for FreeBSD in development for 13.y – and a note of how we got here](https://lists.zx2c4.com/pipermail/wireguard/2021-March/006499.html).
48
49 The Author (Jason A. Donenfeld) also said "the crypto needed to be re-accelerated", as detailed in [if_wg simd chapoly needs some love](https://lists.freebsd.org/pipermail/freebsd-hackers/2021-March/057076.html).
50
51 **NOTE**:
52 NetBSD has a separate from-sratch implementation [wg(4)](https://man.netbsd.org/wg.4).
53 The [code](https://github.com/NetBSD/src/blob/trunk/sys/net/if_wg.c) looks quite clean and nice.
54 So it maybe a good idea to port the NetBSD version.
55
56 See also the dispute between WireGuard's author and NetBSD developers:
57 ["wireguard" implementation improperly merged and needs revert](https://mail-index.netbsd.org/tech-net/2020/08/22/msg007842.html)
58
59 ### Main goals
60
61 * WireGuard port in DragonFly kernel, as well as the userland tools.
62 * WireGuard works.
63 * The port should be ideally reviewed/audited by the WireGuard project.
64   I (aly@) believe the author (Jason A. Donenfeld) would like to help.
65
66 ### Actuality
67
68 Created at: 2021-08-12
69
70 ### Estimated time
71
72 Unknown.
73
74 ### Donators
75
76 <table>
77 <tr>
78 <th>Donor</th>
79 <th>Amount</th>
80 </tr>
81
82 <tr>
83 <td>aly (Aaron LI)</td>
84 <td>100 USD</td>
85 </tr>
86 <tr>
87 <td>bycn82 (Bill Yuan)</td>
88 <td>100 USD</td>
89 </tr>
90
91 <tr>
92 <td>TOTAL AMOUNT</td>
93 <td>200 USD</td>
94 </tr>
95 </table>
96
97
98 ## Bring in support for USB webcams
99
100 ### Description
101
102 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.
103
104 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 :).
105
106 ### Actuality
107
108 Bounty created at: 2021-08-08
109
110 ### Estimated time
111
112 Unknown.
113
114 ### Donators
115
116 <table>
117 <tr>
118 <th>Donor</th>
119 <th>Amount</th>
120 </tr>
121
122 <tr>
123 <td>mneumann</td>
124 <td>150 USD</td>
125 </tr>
126
127 <tr>
128 <td>pikrzyszt</td>
129 <td>100 GBP</td>
130 </tr>
131
132 <tr>
133 <td>aly</td>
134 <td>50 USD</td>
135 </tr>
136
137 <tr>
138 <td>TOTAL AMOUNT</td>
139 <td>200 USD + 100 GBP</td>
140 </tr>
141
142 </table>
143
144
145 ## Port uhidd HID daemon from FreeBSD
146
147 ### Description
148
149 uhidd is a userland driver/daemon for USB HID devices like mouse, keyboard etc.
150 It is based on libusb20 and currently only works for FreeBSD 8.x and above.
151
152 The uhidd driver would allow USB gaming controllers and joysticks to be used on DragonFly BSD.
153 uhidd also provide support for multimedia keys found on USB keyboards.
154
155 (Derived from the [FreeBSD Wiki: uhidd](https://wiki.freebsd.org/uhidd))
156
157 ### Technical details 
158
159 * This mainly involves porting uhidd and related items from FreeBSD.
160
161 ### Main goals
162
163 * Being able to use USB game controllers and joysticks on DragonFly.
164
165 ### Actuality
166
167 Bounty created at: 2020-02-17
168
169 ### Estimated time
170
171 Unknown.
172
173 ### Donators
174
175 <table>
176 <tr>
177 <th>Donor</th>
178 <th>Amount</th>
179 </tr>
180
181 <tr>
182 <td>kerma</td>
183 <td>100 USD</td>
184 </tr>
185
186 <tr>
187 <td>TOTAL AMOUNT</td>
188 <td>100 USD</td>
189 </tr>
190
191 </table>
192
193
194 ## Extend vkernel(7) to run on any POSIX OS
195
196 ### Description
197
198 * vkernel(7) allows for running DragonFly kernels in userland. Still, it requires a DragonFly operating system.
199
200 * Similar to NetBSD's rumpkernel, allow the vkernel application to be independent of the operating system. Using a cross-compiler,
201   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...).
202
203 ### Technical details 
204
205 * This mainly involves rewriting parts of the page-table handling code and interrupt-related code.
206
207 ### Main goals
208
209 * Being able to run a vkernel binary on any POSIX OS.
210
211 ### Actuality
212
213 Bounty created at: 2020-02-12
214
215 ### Estimated time
216
217 Unknown.
218
219 ### Donators
220
221 <table>
222 <tr>
223 <th>Donor</th>
224 <th>Amount</th>
225 </tr>
226
227 <tr>
228 <td>mneumann</td>
229 <td>100 USD</td>
230 </tr>
231
232 <tr>
233 <td>TOTAL AMOUNT</td>
234 <td>100 USD</td>
235 </tr>
236
237 </table>
238
239
240 ## Bluetooth-Support
241
242 ### Description
243
244 * Make Bluetooth work on DragonFly.
245
246 ### Technical details
247
248 We already have bluetooth support in the kernel which is based on netgraph6 (AFAIK). 
249 It is disabled by default and is probably out of date.
250
251 We also have a partial and old netbt port from NetBSD...
252
253 ### Main goals
254
255 * Research the current state of Bluetooth in DragonFly.
256 * Bluetooth is enabled by default when building the kernel/world.
257 * Bring in updates or re-port from FreeBSD/NetBSD.
258 * Bluetooth keyboard / mice is working.
259 * Bluetooth headphone is working.
260
261 ### Actuality
262
263 Bounty created at: 2020-02-12
264
265 ### Estimated time
266
267 Unknown.
268
269 ### Donators
270
271 <table>
272 <tr>
273 <th>Donor</th>
274 <th>Amount</th>
275 </tr>
276
277 <tr>
278 <td>mneumann</td>
279 <td>200 USD</td>
280 </tr>
281
282 <tr>
283 <td>tuxillo</td>
284 <td>50 USD</td>
285 </tr>
286
287 <tr>
288 <td>aly</td>
289 <td>50 USD</td>
290 </tr>
291
292 <tr>
293 <td>TOTAL AMOUNT</td>
294 <td>300 USD</td>
295 </tr>
296
297 </table>
298
299
300 ## Full Rust libc FFI binding support
301
302 ### Description
303
304 * Port Rust FFI libc bindings, in full to DragonFly.
305
306 ### Technical details
307
308 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.
309
310 The Github URL is https://github.com/rust-lang/libc
311
312 ### Main goals
313
314 * Ensure that all features available in our libc have been ported to working in the Rust FFI lib
315 * Ensure that the code builds
316 * Ensure that all tests pass
317 * 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
318
319 ### Estimated time
320
321 Unknown.
322
323 ### Donators
324
325 <table>
326 <tr>
327 <th>Donor</th>
328 <th>Amount</th>
329 </tr>
330
331 <tr>
332 <td>zach</td>
333 <td>400 USD</td>
334 </tr>
335
336 <tr>
337 <td>joris</td>
338 <td>150 USD</td>
339 </tr>
340
341 <tr>
342 <td>profmakx</td>
343 <td>200 USD</td>
344 </tr>
345
346 <tr>
347 <td>TOTAL AMOUNT</td>
348 <td>750 USD</td>
349 </tr>
350
351 </table>
352 <br>
353
354
355 ## More Modern Thunderbolt Support
356
357 ### Description
358
359 * Integrate Thunderbolt Devices
360
361 ### Technical Details
362
363 To be defined
364
365 ### Main Goals
366
367 Not Yet Written
368
369 ### Estimated Time
370
371 Unknown
372
373 ### Donators
374
375 <table>
376 <tr>
377 <th>Donor</th>
378 <th>Amount</th>
379 </tr>
380
381 <tr>
382 <td>Mike Carroll</td>
383 <td>150 USD</td>
384 </tr>
385
386 <tr>
387 <td>TOTAL AMOUNT</td>
388 <td> 150 USD</td>
389 </tr>
390
391 </table> 
392
393
394 ## OpenPower9 Support
395
396 ### Description
397
398 * Port DragonFly to OpenPower 9 CPUs
399
400 ### Technical Details
401
402 To be defined
403
404 ### Main Goals
405
406 Not Yet Written
407
408 ### Estimated Time
409
410 Unknown
411
412 ### Donators
413
414 <table>
415 <tr>
416 <th>Donor</th>
417 <th>Amount</th>
418 </tr>
419
420 <tr>
421 <td>Mike Carroll</td>
422 <td>150 USD</td>
423 </tr>
424
425 <tr>
426 <td>TOTAL AMOUNT</td>
427 <td> 150 USD</td>
428 </tr>
429
430 </table> 
431
432
433 ## AArch64 support
434
435 ### Description
436
437 * Port DragonFly to Aarch64
438
439 ### Technical details
440
441 To be defined
442
443 ### Main goals
444
445 Not yet written.
446
447 ### Estimated time
448
449 Unknown.
450
451 ### Donators
452
453 <table>
454 <tr>
455 <th>Donor</th>
456 <th>Amount</th>
457 </tr>
458
459 <tr>
460 <td>tuxillo</td>
461 <td>100 EUR</td>
462 </tr>
463
464 <tr>
465 <td>Mike Carroll</td>
466 <td>150 USD</td>
467 </tr>
468
469 <tr>
470 <td>TOTAL AMOUNT</td>
471 <td>100 EUR + 150 USD</td>
472 </tr>
473
474 </table>
475
476
477 ## UTF-8 support in Console 
478
479 ### Description 
480
481 Adding full UTF-8 support in console.
482
483 ### Technical details
484
485 Not yet written.
486
487 ### Main goals
488
489 Not yet written.
490
491 ### Estimated time
492
493 Still unknown.
494
495 ### Donators
496
497 <table>
498 <tr>
499 <th>Donor</th>
500 <th>Amount</th>
501 </tr>
502
503 <tr>
504 <td>timofonic</td>
505 <td>35 EUR</td>
506 </tr>
507
508 <tr>
509 <td>dillon</td>
510 <td>50 USD</td>
511 </tr>
512
513 <tr>
514 <td>kerma</td>
515 <td>100 USD</td>
516 </tr>
517
518 <tr>
519 <td>TOTAL AMOUNT</td>
520 <td>35 EUR + 150 USD</td>
521 </tr>
522
523 </table>
524
525 ## HAMMER compression
526
527 ### Description
528
529 (shamelessly copied from gsoc2010 projects page)
530
531 * Compress blocks as they get written to disk.
532 * Only file data (rec_type == DATA) should be compressed, not meta-data.
533 * the CRC should be that of the uncompressed data.
534 * ideally you'd need to associate the uncompressed data with the buffer cache buffer somehow, so that decompression is only performed once.
535 * compression could be turned on a per-file or per-pfs basis.
536 * gzip compression would be just fine at first; lzo or lzjb might be preferable.
537
538 **NOTE**:
539 HAMMER2 has replaced HAMMER to be the default filesystem on DragonFly and is under active development and maintenance.  HAMMER2 also has compression support.
540
541 ### Technical details
542
543 (shamelessly copied from gsoc2010 projects page)
544
545 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.
546
547 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).
548
549 ### Main goals
550
551 Not yet written.
552
553 ### Estimated time
554
555 Unknown.
556
557 ### Donators
558
559 <table>
560 <tr>
561 <th>Donor</th>
562 <th>Amount</th>
563 </tr>
564
565 <tr>
566 <td>rumko</td>
567 <td>50 EUR</td>
568 </tr>
569
570 <tr>
571 <td>dillon</td>
572 <td>100 USD</td>
573 </tr>
574
575 <tr>
576 <td>vsrinivas</td>
577 <td>50 USD</td>
578 </tr>
579
580 <tr>
581 <td>TOTAL AMOUNT</td>
582 <td>50 EUR + 150 USD</td>
583 </tr>
584
585 </table>
586
587
588 ## Native NTFS support
589
590 ### Description
591
592 (shamelessly copied from gsoc2010 projects page)
593
594 * Port Apple's native NTFS driver
595
596 ### Technical details
597
598 (shamelessly copied from gsoc2010 projects page)
599
600 Apple's NTFS native driver could be ported to DragonFly BSD.
601
602 Latest code as of now is:
603 http://opensource.apple.com/source/ntfs/ntfs-84.40.1/kext/
604
605 ### Main goals
606
607 Not yet written.
608
609 ### Estimated time
610
611 Unknown.
612
613 ### Donators
614
615 <table>
616 <tr>
617 <th>Donor</th>
618 <th>Amount</th>
619 </tr>
620
621 <tr>
622 <td>tuxillo</td>
623 <td>75 EUR</td>
624 </tr>
625
626 <tr>
627 <td>TOTAL AMOUNT</td>
628 <td>75 EUR</td>
629 </tr>
630
631 </table>
632
633
634 ## Card reader driver
635
636 ### Description
637
638 As swildner wrote on 18th Septmber 2017: we need a new driver for a card reader.
639
640 RTS5209 PCI Express Card Reader
641
642 ### Estimated time
643
644 Unknown.
645
646 ### Donators
647
648 <table>
649 <tr>
650 <th>Donor</th>
651 <th>Amount</th>
652 </tr>
653
654 <tr>
655 <td>ferz</td>
656 <td>20 EUR</td>
657 </tr>
658
659 <tr>
660 <td>TOTAL AMOUNT</td>
661 <td>20 EUR</td>
662 </tr>
663
664 </table>
665
666 <hr />
667
668 # Completed Bounties
669
670 ## Port valgrind to DragonFlyBSD [TAKEN 2021-03-30]
671
672 ### Description
673
674 (shamelessly copied from gsoc2010 projects page)
675
676 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.
677
678 ### Technical details
679
680 Not yet written.
681
682 ### Main goals
683
684 (shamelessly copied from gsoc2010 projects page)
685
686 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.
687
688 ### Estimated time
689
690 Unknown.
691
692 ### Bounty status
693
694 Taken by dan_.
695
696 Repository: [[Github|https://github.com/1338-1/valgrind-dragonfly]]
697
698 ### Donators
699
700 <table>
701 <tr>
702 <th>Donor</th>
703 <th>Amount</th>
704 </tr>
705
706 <tr>
707 <td>rumko</td>
708 <td>100 EUR</td>
709 </tr>
710
711 <tr>
712 <td>tuxillo</td>
713 <td>50 EUR</td>
714 </tr>
715
716 <tr>
717 <td>dillon</td>
718 <td>100 USD</td>
719 </tr>
720
721 <tr>
722 <td>sjg</td>
723 <td>50 USD</td>
724 </tr>
725
726 <tr>
727 <td>TOTAL AMOUNT</td>
728 <td>150 EUR + 150 USD (paid)</td>
729 </tr>
730
731 </table>
732
733 ## Hypervisor for DragonFly/x86_64
734
735 ### Description
736
737 * Port nvmm (NetBSD) or bhyve (FreeBSD) to DragonFly.
738
739 ### Technical details 
740
741 Employ Intel VT-x and AMD SVM to provide fast virtualization support for running various guest OSes.
742
743 ### Main goals
744
745 * Hardware-accelerated virtualization to run guest operating systems like Linux or Windows 10 on DragonFly.
746 * Support both Intel and AMD CPUs.
747
748 ### Actuality
749
750 Created at: 2020-02-12<br>
751 Completed at: 2021-08-08
752
753 ### Estimated time
754
755 Unknown.
756
757 ### Bounty status
758
759 Completed by: Aaron LI (aly@)<br>
760
761 Previous Party: Kamil Rytarowski (kamil at netbsd dot org)<br>
762 Previous Repository: https://github.com/Moritz-Systems/DragonFlyBSD
763
764 ### Results
765
766 * Ported NVMM from NetBSD-current (as of 2021-06-25), plus various improvements/fixes from maxv's repo.
767 * Support both Intel VMX and AMD SVM on x86_64 CPUs.
768 * Components:
769   - nvmm(4): kernel module, including both the MI frontend and MD backends
770   - libnvmm(3): hypervisor API interacting with nvmm(4), e.g., used by QEMU
771   - nvmmctl(8): utility to inspect NVMM status (still premilinary)
772   - testcases/libnvmm: libnvmm test cases
773   - test/nvmm: examples
774 * Merged into master (6.1) on 2021-07-20.
775 * 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).
776 * HowTo document: [Virtualization: NVMM Hypervisor](/docs/docs/howtos/nvmm)
777
778 ### Donators
779
780 <table>
781 <tr>
782 <th>Donor</th>
783 <th>Amount</th>
784 </tr>
785
786 <tr>
787 <td>mneumann</td>
788 <td>500 USD (paid)</td>
789 </tr>
790
791 <tr>
792 <td>tuxillo</td>
793 <td>175 USD (paid)</td>
794 </tr>
795
796 <tr>
797 <td>kerma</td>
798 <td>500 USD (paid)</td>
799 </tr>
800
801 <tr>
802 <td>aly</td>
803 <td>500 CNY (myself ;))</td>
804 </tr>
805
806 <tr>
807 <td>TOTAL AMOUNT</td>
808 <td>1175 USD + 500 CNY</td>
809 </tr>
810
811 </table>
812
813
814 ## Port autofs from FreeBSD
815
816 ### Description
817
818 Autofs allows dynamic filesystem mapping to render filesystems accessible, without keeping them mounted. It is designed as a modern, simpler, cleanroom reimplementation of amd.
819
820 ### Main goals
821
822 Not yet written.
823
824 ### Estimated time
825
826 Unknown.
827
828 ### Donators
829
830 <table>
831 <tr>
832 <th>Donor</th>
833 <th>Amount</th>
834 </tr>
835
836 <tr>
837 <td>kerma</td>
838 <td>50 USD (paid)</td>
839 </tr>
840
841 <tr>
842 <td>TOTAL AMOUNT</td>
843 <td>50 USD</td>
844 </tr>
845
846 </table>
847
848
849 ## Bring in usb4bsd
850
851 ### Description
852
853 * Completely rip out our USB stack and replace it with FreeBSD's new usb4bsd (or whatever the FreeBSD-current USB stack is called nowadays).
854 * 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.
855
856 ### Technical details 
857
858 Not yet written.
859
860 ### Main goals
861
862 Not yet written.
863
864 ### Estimated time
865
866 Unknown.
867
868 ### Donators
869
870 <table>
871 <tr>
872 <th>Donor</th>
873 <th>Amount</th>
874 </tr>
875
876 <tr>
877 <td>alexh</td>
878 <td>300 USD (paid)</td>
879 </tr>
880
881 <tr>
882 <td>sjg</td>
883 <td>100 USD (paid)</td>
884 </tr>
885
886 <tr>
887 <td>ferz</td>
888 <td>50 EUR (paid)</td>
889 </tr>
890
891 <tr>
892 <td>tuxillo</td>
893 <td>50 EUR (paid)</td>
894 </tr>
895
896 <tr>
897 <td>TOTAL AMOUNT</td>
898 <td>100 EUR + 400 USD</td>
899 </tr>
900
901 </table>