Commit graph

11606 commits

Author SHA1 Message Date
Ben Wiederhake
c6c9679cfc Travis: Show cache sizes before upload
Uploading the cache takes several minutes. This gives us a handy way to tell
which parts the worst culprits are.

The Toolchain cache seems to be the worst offender by far, because the binary
size nearly doubled when we upgraded from gcc9 to gcc10.
2020-07-29 01:24:24 +02:00
Andreas Kling
a2ad0ae5fc Net: Fix IPv4 fragmentation not working for larger payloads
We were masking the fragment offset bits incorrectly in the IPv4 header
sent out with fragments. This worked up to ~32KB but after that, things
would get very confused. :^)
2020-07-28 20:33:24 +02:00
Andreas Kling
f5ac4da993 Kernel: Use AK::Span a bunch in the network adapter code 2020-07-28 20:19:22 +02:00
Andreas Kling
fffc5896d8 LibWeb: Make layout tree have non-const pointers to the DOM
Const pointers into the DOM was a nice idea, but in practice, there are
too many situations where the layout tree wants to some non-const thing
to the DOM.
2020-07-28 19:48:57 +02:00
Andreas Kling
a4eadeb80d LibWeb: Oops, provide the correct WrapperType for UIEvent 2020-07-28 19:40:11 +02:00
Andreas Kling
c95a1fe3a3 LibWeb: Add UIEvent class (base of MouseEvent, and others) 2020-07-28 19:39:17 +02:00
Andreas Kling
ef711f501e LibWeb: Move the Page/Frame/EventHandler classes into Page/ 2020-07-28 19:28:29 +02:00
Andreas Kling
481e838054 LibWeb: Fix bad #include in CSSParser.cpp 2020-07-28 19:28:29 +02:00
Andreas Kling
7daeddb9e9 LibWeb: Move the CSS parser into CSS/Parser/ 2020-07-28 19:23:18 +02:00
Andreas Kling
cc4109c03b LibWeb: Move the HTML parser into HTML/Parser/ 2020-07-28 19:23:18 +02:00
Ben Wiederhake
a296020e03 LibCrypto: Implement and test CTR decryption 2020-07-28 19:10:10 +02:00
Ben Wiederhake
a51cbc2978 LibCrypto: Fix broken CTR mode, implement RFC 3686 Test Vectors 2020-07-28 19:10:10 +02:00
Ben Wiederhake
ef4ce54b02 LibCrypto: Document CTR weirdness in depth 2020-07-28 19:10:10 +02:00
Ben Wiederhake
708164b0b9 LibCrypto: Already using strong crypto
ModularFunctions::random_number calls into AK::fill_with_random calls (on
Serenity) into arc4random_buf calls into Process::sys calls into
get_good_random_bytes, which is cryptographically secure.
2020-07-28 19:10:10 +02:00
Ben Wiederhake
801058e514 LibJS: Soothe gcc about printf-%s on (non-)nullptr 2020-07-28 19:10:10 +02:00
Peter Elliott
fc425a218d Meta: Fix style of image building scripts
Oops. I didn't know there was a style guide for the scripts.
2020-07-28 19:09:44 +02:00
Andreas Kling
b5633c69d3 Base: Mount /etc as read/write
Let's be reasonable and have a writable /etc by default.
2020-07-28 19:07:01 +02:00
Andreas Kling
c46439f240 LibWeb: Move HTML classes into the Web::HTML namespace 2020-07-28 18:55:48 +02:00
Andreas Kling
ebd2e7d9f5 AK: Tweak String::is_one_of() and FlyString::is_one_of()
Switch the comparisons from "other == *this" to "*this == other".
2020-07-28 18:55:47 +02:00
Andreas Kling
8b55d3d86e LibWeb: Move MouseEvent into the UIEvents namespace
Named after the UIEvents specification that houses MouseEvent.
2020-07-28 18:55:47 +02:00
Nico Weber
c99a3efc5b LibX86: Disassemble most FPU instructions starting with D9
Some of these don't just use the REG bits of the mod/rm byte
as slashes, but also the R/M bits to have up to 9 different
instructions per opcode/slash combination (1 opcode requires
that MOD is != 11, the other 8 have MODE == 11).

This is done by making the slashes table two levels deep for
these cases.

Some of this is cosmetic (e.g "FST st0" has no effect already,
but its bit pattern gets disassembled as "FNOP"), but for
most uses it isn't.

FSTENV and FSTCW have an extraordinary 0x9b prefix. This is
not yet handled in this patch.
2020-07-28 18:55:29 +02:00
Peter Elliott
6f12ab3ced Meta: Calculate image size based on size of Build/Root and Base
This reduces the size of the default build, while allowing people to
install as many ports as they want, without having to manually specify
disk size.
2020-07-28 18:32:05 +02:00
Peter Elliott
99ddbb83e8 Userland: Make su require passwords 2020-07-28 17:07:22 +02:00
Peter Elliott
207fb054e5 Userland: Add passwd utility 2020-07-28 17:07:22 +02:00
Peter Elliott
1211a036ba LibCore: add get_password().
A serenity-style getpass that is thread-safe
2020-07-28 17:07:22 +02:00
Peter Elliott
3c1c5cc541 LibC: Add passwords to putpwent 2020-07-28 17:07:22 +02:00
Peter Elliott
e57a432118 AK: Make String::substring() return non-null for 0-length strings
This also makes String::split() give non-null strings when keep_empty is
true.
2020-07-28 17:07:22 +02:00
Peter Elliott
9dcbb263f1 LibCrypt: Add LibCrypt, crypt, and crypt_r 2020-07-28 17:07:22 +02:00
Ben Wiederhake
58dd9f2d2a SystemMenu: Add 'Themes' icon 2020-07-28 16:29:44 +02:00
Ben Wiederhake
a9d30a59d9 SystemMenu: Add icons for categories 2020-07-28 16:29:44 +02:00
Ben Wiederhake
404981a892 SystemMenu: Untangle app/category discovery and GUI building
I was a bit confused by the fact that a method named `build_system_menu()`
first enumerates a directory. Moving the app/category discovery to a dedicated
function that returns the GUI-relevant information makes this process a bit
less surprising.

As an added bonus, `g_app_category_menus` was actually only a temporary mapping,
and didn't need to be global. In theory, SystemMenu should use a handful fewer
of bytes now.
2020-07-28 16:29:44 +02:00
Ben Wiederhake
e8ed7f829e SystemMenu: Add icon to 'Exit' menu item 2020-07-28 16:29:44 +02:00
Ben Wiederhake
70fe126d01 LibGUI: Enable icons for SubMenus
It doesn't make sense for a top-level menu to have an icon, however
we do not have dedicated classes to distinguish these.

Furthermore, the only other place to store an icon is MenuItem.
Storing it there would be highly confusing, as MenuItem-with-Action
then would have two icons: one in Action and one in MenuItem.
And because we need to be able to replace the icon during realization,
this would need to write-through to Action somehow.

That's why I went with Menu, not MenuItem.
2020-07-28 16:29:44 +02:00
Ben Wiederhake
048f149f51 LibGUI: Refactor icon realization in Menu
This factors out icon realization into its own function, making it possible to
use the same code with other classes that have icon() and set_icon() methods.
2020-07-28 16:29:44 +02:00
Ben Wiederhake
082b7d6b0c LibGUI: Set correct default value during menu destruction 2020-07-28 16:29:44 +02:00
thankyouverycool
8248c74d88 DevTools: Let Inspector use ProcessChooser and new icons.
Inspector now opens ProcessChooser when no PID is supplied.
2020-07-28 16:29:36 +02:00
thankyouverycool
6448f94372 DevTools+LibGUI: Make ProcessChooser a general Dialog in LibGUI
Moves ProcessChooser and RunningProcessesModel to LibGUI and
generalizes their construction for use by other apps. Updates
Profiler to reflect the change and use its new icons.
2020-07-28 16:29:36 +02:00
thankyouverycool
5cfbf88b4d Base: Add icons and af files for Profiler and Inspector 2020-07-28 16:29:36 +02:00
Linus Groh
090c031c1a Userland: Fix nc by not memset()'ing the input address char*
We were accidentally calling memset() on "addr" (the input char*), not
"dst_addr" (the target struct sockaddr_in), which was causing a simple
"nc localhost 8000" to crash.

Fixes #2908.
2020-07-28 13:19:22 +02:00
Andreas Kling
08c05fbbd1 LibC: Fix strtol() not setting endptr correctly for "0"
"0" was interpreted as a base-8 prefix, and the parse pointer was then
unconditionally advanced, causing us to consume zero characters.

This unbreaks the git port. :^)

(We should really have tests for LibC..)
2020-07-28 02:26:49 +02:00
Andreas Kling
b8d3dbcf2d UserspaceEmulator: Add syscalls: stat(), realpath(), gethostname()
This is enough to run /bin/ls :^)
2020-07-28 00:03:25 +02:00
Andreas Kling
9def88e08d UserspaceEmulator: Don't just return "EMULATED" in get_process_name()
Now that emulated processes have their real name (with a "(UE)" prefix)
we can actually let them know their name.
2020-07-28 00:03:25 +02:00
Andreas Kling
308d3b764f LibC: Move getpagesize() out-of-line
This being inline somehow broke the binutils autoconf scripts. It used
to work, so I suspect that some other change to LibC has caused those
autoconf scripts to go down a new path.

Regardless, this seems perfectly sensible.
2020-07-28 00:03:25 +02:00
Andreas Kling
2ac5c2278d UserspaceEmulator: Support ioctl(TIOCGWINSZ)
This is very commonly used by terminal programs, and easy to support.
2020-07-28 00:03:25 +02:00
Andreas Kling
33d2ecdd79 WebServer: Show icons in directory listings :^)
Just adding some basic folder/file icon makes a big difference here.
2020-07-27 22:39:01 +02:00
Andreas Kling
96dce6893f Lagom: Build with -std=c++2a -Wno-deprecated-copy 2020-07-27 21:54:22 +02:00
Nico Weber
815a660aed .gitignore: Add .swo
Makes `git status` less noisy for vim users.
2020-07-27 21:53:46 +02:00
asynts
ed327e7feb LibCrypto: Change the signatures of RSA::import_[XXX]_key to use Span. 2020-07-27 19:58:09 +02:00
asynts
3de4e08b46 LibCrypto: Change the signature of decode_pem to use Span. 2020-07-27 19:58:09 +02:00
asynts
0d782e1dfb LibCrypto: Change the signature of RSA::parse_rsa_key to use Span. 2020-07-27 19:58:09 +02:00