Commit Graph

6993 Commits

Author SHA1 Message Date
Andreas Kling
9aa234cc47 Kernel: Reset FPU state on exec() 2020-02-18 13:44:27 +01:00
Andreas Kling
315538245f realpath: Use pledge() 2020-02-18 13:29:54 +01:00
Andreas Kling
f67f70302b uname: Use pledge() 2020-02-18 13:29:54 +01:00
Andreas Kling
feb4c683eb touch: Use pledge() 2020-02-18 13:29:54 +01:00
Andreas Kling
b58728ed99 rm: Use pledge() 2020-02-18 13:29:54 +01:00
Andreas Kling
a5f0b2aef0 ln: Use pledge() 2020-02-18 13:29:54 +01:00
Andreas Kling
03aea11589 date: Use pledge() 2020-02-18 13:29:54 +01:00
Andreas Kling
4b0e0bd9b8 env: Use pledge() 2020-02-18 13:29:54 +01:00
Andreas Kling
b2f9a60bdb uptime: Use pledge() 2020-02-18 13:29:54 +01:00
Andreas Kling
3b3b4b0e04 hostname: Use pledge() 2020-02-18 13:29:54 +01:00
Andreas Kling
60c8d2379a kill: Use pledge() 2020-02-18 13:29:54 +01:00
Andreas Kling
0bef6c9d78 basename: Use pledge() 2020-02-18 13:29:54 +01:00
Jesse Buhagiar
35ba4bf005 TTY: Reset VGA start row when setting graphical TTY
This was causing the screen (on a real machine) to be split in half.
2020-02-18 12:55:31 +01:00
howar6hill
94ed183774 Man: Use ArgsParser to parse arguments 2020-02-18 12:23:15 +01:00
Andreas Kling
7ce3f218af wc: Use pledge() 2020-02-18 11:35:47 +01:00
Andreas Kling
257e7f022a sort: Use pledge() 2020-02-18 11:35:47 +01:00
Andreas Kling
4f7081289c whoami: Use pledge() and unveil() 2020-02-18 11:35:47 +01:00
Andreas Kling
0b44f9d600 which: Use pledge() 2020-02-18 11:35:47 +01:00
Andreas Kling
7266cee590 clear: Use pledge() 2020-02-18 11:35:47 +01:00
Andreas Kling
1612a1d489 echo: Use pledge() 2020-02-18 11:35:47 +01:00
Andreas Kling
d6a1237cfe yes: Use pledge() 2020-02-18 11:35:47 +01:00
Andreas Kling
00fa2aa0ec rmdir: Use pledge() 2020-02-18 11:35:47 +01:00
Andreas Kling
7281214af2 mkdir: Use pledge() 2020-02-18 11:35:47 +01:00
Andreas Kling
53e7490b81 stat: Use pledge() 2020-02-18 11:35:47 +01:00
Andreas Kling
ffb6056675 ps: Use pledge() and unveil() 2020-02-18 11:35:47 +01:00
Andreas Kling
16d5b1d4ca top: Use pledge() and unveil() 2020-02-18 11:35:47 +01:00
Andreas Kling
a7dbb3cf96 Kernel: Use a FixedArray for a process's extra GIDs
There's not really enough of these to justify using a HashTable.
2020-02-18 11:35:47 +01:00
Sergey Bugaev
e0ecfc0c92 LibC: Statically allocate allocators
These allocators take up 660 bytes, combined. Let's not waste
two physical pages for them in each process :^)
2020-02-18 11:23:27 +01:00
Sergey Bugaev
bf8dacf0c1 Kernel: Add placement new[] operator 2020-02-18 11:23:27 +01:00
Andreas Kling
4b16ac0034 Kernel: Purging a page should point it back to the shared zero page
Anonymous VM objects should never have null entries in their physical
page list. Instead, "empty" or untouched pages should refer to the
shared zero page.

Fixes #1237.
2020-02-18 09:56:11 +01:00
Shannon Booth
52c76aa9bf WindowServer: Remove unsued MenuManager::menu_selection_color() 2020-02-18 09:42:02 +01:00
Andreas Kling
0bb4111735 HackStudio: Unbreak the form editor's widget icons
This is breakage from the GFoo => GUI::Foo rename.
2020-02-17 21:49:17 +01:00
Andreas Kling
25b987ce4c SystemMenu: Use pledge() and unveil() 2020-02-17 20:20:46 +01:00
Andreas Kling
2060da829c WindowServer: Remove unveils of /bin and /etc/passwd
This is no longer needed now that we have SystemMenu. :^)
2020-02-17 20:20:46 +01:00
Andreas Kling
a008e2f63a WindowServer: Drop the "exec" pledge promise entirely
Now that the system menu is out-of-process, we no longer need to exec()
from WindowServer, allowing us to drop this promise. Very cool!
2020-02-17 20:20:46 +01:00
Andreas Kling
b711f1eab5 SystemMenu: Finish the implementation and start this at boot :^)
Fixes #1231.
2020-02-17 20:20:32 +01:00
Andreas Kling
84520d8b59 WindowServer: Make way for the out-of-process system menu
This patch removes the internal system menu from WindowServer and
replaces it with two IPC API's:

    SetSystemMenu(menu_id)
    SetSystemTheme(theme_path, theme_name)

These API's will allow us to complete the SystemMenu program and
move it entirely out of process.
2020-02-17 20:08:00 +01:00
Andreas Kling
189fa68c0b LibGUI: Expose GUI::Menu::menu_id() and also allow forced realization
Menu realization is when we instruct WindowServer to create the
server-side menu objects on our behalf.
2020-02-17 20:04:05 +01:00
Andreas Kling
7afd9039d1 Base: Add a Minesweeper app icon that's actually 16x16
The one we were using was actually 15x15 which tripped up an assertion
when loading it into a menu using the GUI::Action code path.
2020-02-17 19:58:33 +01:00
Andreas Kling
737e455cbc SystemMenu: Add a separate program to host the system menu
This will allow us to run the system menu as any user. It will also
enable further lockdown of the WindowServer process since it should no
longer need to pledge proc and exec. :^)

Note that this program is not finished yet.

Work towards #1231.
2020-02-17 16:50:48 +01:00
Andreas Kling
a0ad372b08 AudioServer: Remove ASEventLoop class and do all the setup in main()
This class was too small and unnecessary.
2020-02-17 16:50:48 +01:00
thatlittlegit
6eccd166ed SystemDialog: Use Yes/No dialog instead of OK/Cancel
This also removes some unecessary debug lines. (The debug lines are
unnecessary because LibGUI already outputs the debug information, so
SystemDialog just doubled it up.)
2020-02-17 16:28:21 +01:00
thatlittlegit
14aaf75e3a TextEditor: Use Yes/No/Cancel for some dialogs when buffer is dirty 2020-02-17 16:28:21 +01:00
thatlittlegit
4755f355c6 LibGUI: Add Yes/No and Yes/No/Cancel MessageBoxes 2020-02-17 16:28:21 +01:00
Andreas Kling
48f7c28a5c Kernel: Replace "current" with Thread::current and Process::current
Suggested by Sergey. The currently running Thread and Process are now
Thread::current and Process::current respectively. :^)
2020-02-17 15:04:27 +01:00
Andreas Kling
4f4af24b9d Kernel: Tear down process address space during finalization
Process teardown is divided into two main stages: finalize and reap.

Finalization happens in the "Finalizer" kernel and runs with interrupts
enabled, allowing destructors to take locks, etc.

Reaping happens either in sys$waitid() or in the scheduler for orphans.

The more work we can do in finalization, the better, since it's fully
pre-emptible and reduces the amount of time the system runs without
interrupts enabled.
2020-02-17 14:33:06 +01:00
Andreas Kling
0e33f53cf8 Kernel: Allow multiple inspectors of a process (in /proc)
Replace Process::m_being_inspected with an inspector reference count.
This prevents an assertion from firing when inspecting the same process
in /proc from multiple processes at the same time.

It was trivially reproducible by opening multiple FileManagers.
2020-02-17 13:29:49 +01:00
Andreas Kling
a78bc5e6fc LibGUI: Generate NotificationServer IPC messages during build
I hacked this to skip using flock since NotificationServer and LibGUI
depend on each other. There's probably a better solution.
2020-02-16 22:37:04 +01:00
Andreas Kling
30549502ca LibGUI: Generate NotificationServerEndpoint.h if needed 2020-02-16 22:28:48 +01:00
Andreas Kling
7efb497837 NotificationServer: Add new notification windows below the lowest one
Don't stack notifications on top of each other, instead put them below
one another on the y axis.

This will obviously break if the screen fills with notifications, but
that's a FIXME for now. :^)
2020-02-16 21:58:17 +01:00