A toy HTTP server in development Goals: secure, scalable (vertically and horizontally), not excessively slow, separation of privilege (and knowledge: HTTP code doesn't have to know TLS key) ...

Ariadne Devos aaebf61946 Implement x86_64-specific sHT_index_nospec 5 years ago
collateral a45cf91312 Mitigate Spectre for bounded loops 5 years ago
doc f6d9f5a4ca Implement sHT_objcache batch API 5 years ago
fd 294398bdc9 Add trivial missing information barriers 5 years ago
generic 8429eaa455 Fix the fallout of the <sHT/intrisics.h> split 5 years ago
http d835f7c3c1 Eliminate allocation of queues 5 years ago
sHT aaebf61946 Implement x86_64-specific sHT_index_nospec 5 years ago
stuff 77ca503453 State goals 5 years ago
task d835f7c3c1 Eliminate allocation of queues 5 years ago
tools 6ef785a1f4 Autogenerate SIMD variant code 5 years ago
worker d835f7c3c1 Eliminate allocation of queues 5 years ago
.gitignore ba52ab987f Ignore build artifacts 5 years ago
COPYING 5248a3d7de Declare some functions and structures for workers 5 years ago
Makefile.am d835f7c3c1 Eliminate allocation of queues 5 years ago
README 77ca503453 State goals 5 years ago
configure.ac f9622b3d93 Split Autotools scripts in build-aux 5 years ago
control.h 9d76c58504 Start a worker 5 years ago
fd.h 1f8ef702cc Bind passive sockets 5 years ago
worker.h d835f7c3c1 Eliminate allocation of queues 5 years ago

README

# s^2 Web Stuff

s^2 is -- so far -- a personal project to write secure and sandboxed software
for doing things on the web. E.g. a web server and mail server and client.
In contrast to seemingly wide-held opinion, except perhaps by Intel,
it doesn't view speculative execution as an evil (*).

(*)
Except Meltdown and perhaps some others ... The model of Spectre I
address is: all branches may temporarily be ignored or falsily taken and all
indirect branch must be retpolined. Checking the page bits may be speculated.

s^2 should be safe against Speculative Store Bypass, Bounds Check Bypass,
Branch Target Injection. Foreshadow is not relevant. Lazy FP State Restore
is a bug of the kernel.

As an extension to what nginx supports, s^2 will allow migration to
different versions and machines. The source code is intended to be readable.

There is some architecture-specific code for Spectre mitigation.
Linux is supported, and the BSDs will be. W32 might be possible.

Do `autoreconf` && `./configure` && `make` to compile.

## Stuff

- [ ] apps/website.md: for static web sites, may be extended
- [ ] apps/torrent.md (TODO: bittorrent, webtorrent, Dat, IPFS, gnunet?)
- [ ] apps/mail.md: e-mail client and server, encrypted, signed, image support)
- [ ] apps/blog.md (TODO)
- [ ] apps/git.md (TODO)
- [ ] apps/ci.md (TODO)

## Some design details

OO is used, except that inheritance isn't really used. Nothing is overridden.
Generics may be used sparely. SMP may be used for efficiency (power-efficiency
according to Intel?), but is not mandatory. Tasks of the same type are batched
to reduce cache pressure and branch misprediction.

## Contact

Send a mail to Ariadne Devos or open a bug at
. Patches, ideas and general discussion
are welcome.

## Legal stuff

Copyright (C) 2018 Ariadne Devos

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see . */