[ / / / / / / / / / / / / / ] [ dir / 1piece / agatha2 / animu / arepa / fast / tacos / vg / vichan ][Options][ watchlist ]

/tech/ - Technology

You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Email
Comment *
File
Select/drop/paste files here
Password (Randomized for file and post deletion; you may also set your own.)
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

[–]

 No.955539>>955541 >>955831 [Watch Thread][Show All Posts]

Post examples of useful software with excellent code quality. Bonus points for necessarily large software such as operating systems and modern browsers since not many examples exist for these.

Provide justification (eg. minimal bugs/attack surface, detailed and comprehensive documentation, easily maintainable/adjustable).

 No.955540

/dev/null


 No.955541


 No.955544

Reading the Plan9 sources was an extremely enlightening experience. I highly recommend it to everyone.

The OpenBSD codebase is also very good.


 No.955619

The Multics VTOC manager

https://multicians.org/vtoc_man.html

https://multicians.org/andre.html

>The late André Bensoussan worked with me on the Multics operating system at Honeywell in Cambridge. We were working on a major change to the file system, which required a subsystem, the VTOC manager, to manage file description information. It had to transport the file information between disk and memory, manage a shared memory buffer pool, and manage space on disk for the information. In other words, it was a small virtual memory manager.

>André took on the job of design, implementation, and test of the VTOC manager. He started by sitting at his desk and drawing a lot of diagrams. I was the project coordinator, so I used to drop in on him and ask how things were going. "Still designing," he'd say. He wanted the diagrams to look beautiful and symmetrical as well as capturing all the state information. I was getting nervous about the schedule, so I was glad when he finally began writing code. He wrote in pencil, at his desk, instead of using a terminal. He declined offers of typing help, and just kept writing away in pencil. He rewrote parts, copied things over, erased and rewrote.

>Finally André took his neat final pencil copy to a terminal and typed the whole program in. His first compilation attempt failed; he corrected three typos, tried again, and the code compiled. We bound it into the system and tried it out, and it worked the first time.

>In fact, the VTOC manager worked perfectly from then on. Only one bug was ever found in it, and that was my fault: André had asked me the calling sequence for an error procedure, and I'd guessed instead of looking it up, so it crashed the first time it hit an error. Beyond that the program was perfect.

>How did André do this, with no tool but a pencil?


 No.955630>>955819


 No.955819>>955821 >>956505

>>955630


#ifdef COMPAT_FREEBSD11
case DIOCSKERNELDUMP_FREEBSD11:
#endif
case DIOCSKERNELDUMP:
error = clear_dumper(td);
break;

... wait, they bolted on part of the API for the management of crash dumps to the /dev/null driver which should be doing literally nothing other than discarding writes rather than make a new syscall? Are you suggesting this ironically or seriously? It's even 'versioned' in the shittiest way with an #ifdef. If you look at mem.c in Linux you'll notice null doesn't even need an ioctl handler as that'd just be stupid.

This is probably a mild security issue too as if you chroot/jail a program with nothing but /dev/null you're still inadvertently giving it the ability to use the null device to disable crash logs via the underlying mechanism used by dumpon(). What a fucking meme.


 No.955821>>955956 >>956505

>>955819

Apparently it's already been noticed and brought to the attention of the FreeBSD devs.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223138

Their response to it being a security issue with jails:

"Jail isolation leaves a lot to be desired and this is just one aspect of that."

Closed: not a bug.

Fucking priceless.


 No.955831

>>955539 (OP)

The CPython source code is excellent, very readable the one time I looked at it. They actively trade performance for readability iirc.


 No.955956

>>955821

They admitted it was a bug but closed it as not a bug because jails are already full of bugs? How does that even make sense?


 No.956505>>956587

>>955819

>>955821

If you want a secure OS, stay far away from FreeBSD.

https://vez.mrsk.me/freebsd-defaults.txt


 No.956587>>956600

>>956505

Doesn't Apple use this mess?


 No.956600

>>956587

Apple is originally based on BSD, but they're highly divergent from {free,net,open}BSD.




[Return][Go to top][Catalog][Screencap][Nerve Center][Cancer][Update] ( Scroll to new posts) ( Auto) 5
12 replies | 0 images | Page ???
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / 1piece / agatha2 / animu / arepa / fast / tacos / vg / vichan ][ watchlist ]