Commit Graph

242 Commits

Author SHA1 Message Date
Andreas Kling
a7f63eab84 Website: Bounty: Add links to writeups for unclaimed bounties
I've reached out to all of these authors asking if they would like to
claim the bounty and no one did. Let's list them on the website anyway
since it's fun to read about them. :^)
2021-01-16 16:58:04 +01:00
bcoles
c90b7881a7
Website: Bounty: Add rule for user interaction/social engineering (#4974) 2021-01-16 13:09:01 +01:00
Andreas Kling
14f360154b Website: Remove Wikipedia link from home page
The page about SerenityOS has been deleted from Wikipedia for lack of
notoriety so let's not link to it.
2021-01-14 09:50:14 +01:00
Luke
0ba42260e8 Meta: Update CLion CMakeLists for moved directories 2021-01-14 08:13:54 +01:00
Andreas Kling
affcdafc8d Lagom: Add Userland/ to include paths
This should make FuzzShell build.
2021-01-12 13:28:00 +01:00
Andreas Kling
c7ac7e6eaf Services: Move to Userland/Services/ 2021-01-12 12:23:01 +01:00
Andreas Kling
13d7c09125 Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Andreas Kling
ececac65c2 Userland: Move command-line utilities to Userland/Utilities/ 2021-01-12 12:04:09 +01:00
Andreas Kling
c4e2fd8123 Shell: Move to Userland/Shell/ 2021-01-12 12:04:07 +01:00
Andreas Kling
f7435dd95f Kernel: Remove MM_DEBUG debug spam code
This was too spammy to ever actually be used anyway.
2021-01-11 22:09:40 +01:00
Andrew Kaster
9e5aa6f794 Meta: Only complain about linter tools if relevant files have changed 2021-01-10 16:39:21 +01:00
Andreas Kling
e855aac1f5 LibELF: Convert many dbgprintf() to dbgln() and tweak debug macro name 2021-01-10 09:40:47 +01:00
asynts
938e5c7719 Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.Everything:

The modifications in this commit were automatically made using the
following command:

    find . -name '*.cpp' -exec sed -i -E 's/dbg\(\) << ("[^"{]*");/dbgln\(\1\);/' {} \;
2021-01-09 21:11:09 +01:00
Andreas Kling
9a688af4b1 LibCore+passwd+su+Base: Add /etc/shadow to hide hashes from users :^)
This patch moves the user account password hashes from /etc/passwd,
where they were world-readable, to /etc/shadow, where only root can
access them.

The Core::Account class is extended to support both authentication
against, and modification of /etc/shadow.

The default password for "anon" as of this commit is "foo" :^)
2021-01-09 19:41:12 +01:00
Andrew Kaster
f79215b062 Meta: Use /usr/bin/env for python3 in newline checker script 2021-01-09 19:22:23 +01:00
Andrew Kaster
b5078530d5 Meta: Add flake8 to lint python files 2021-01-09 19:22:23 +01:00
Jesse Buhagiar
6df15aca7e Kernel/USB: Implement test transfer
We can now test a _very_ basic transaction via `do_debug_transfer()`.
This function merely attaches some TDs to the LSCTRL queue head
and points some input and output buffers. We then sense an interrupt
with USBSTS value of 1, meaning Interrupt On Completion
(of the transaction). At this point, the input buffer is filled with
some data.
2021-01-09 13:48:15 +01:00
Emanuele Torre
6abba493b2 Meta: Rewrite the check-newlines-at-eof script in python
The bash version takes around 15 seconds to run; that is way too slow.
This python3 version should take less than one second to run. :^)

Also, the script will now also check .py files and .txt CMake files.
2021-01-03 23:58:54 +01:00
Tom
f98ca35b83 Kernel: Improve ProcFS behavior in low memory conditions
When ProcFS could no longer allocate KBuffer objects to serve calls to
read, it would just return 0, indicating EOF. This then triggered
parsing errors because code assumed it read the file.

Because read isn't supposed to return ENOMEM, change ProcFS to populate
the file data upon file open or seek to the beginning. This also means
that calls to open can now return ENOMEM if needed. This allows the
caller to either be able to successfully open the file and read it, or
fail to open it in the first place.
2021-01-03 22:12:19 +01:00
Linus Groh
b36f57e570 Lagom: Build gml-format 2021-01-03 22:12:08 +01:00
William Marlow
3e815ad5b1 Loader.so+LibELF: Move most of Loader.so's logic into ELF::DynamicLinker
Loader.so now just performs the initial self relocations and static
LibC initialisation before handing over to ELF::DynamicLinker::linker_main
to handle the rest of the process.

As a trade-off, ELF::DynamicLinker needs to be explicitly excluded from
Lagom unless we really want to try writing a cross platform dynamic loader
2021-01-03 17:15:55 +01:00
Emanuele Torre
ef782c805f TextEditor+Meta+Ports+Shell: Remove blank lines at the end of some files 2021-01-03 17:12:50 +01:00
Emanuele Torre
f9f571aa7f Meta: Add a script that makes sure files end in a newline.
This script checks .html, .css, .js, .cpp, .h, .gml and .sh files.

It also makes sure that there are no black lines at the end of the
files checked.
2021-01-03 17:12:50 +01:00
Luke
c49899b0b6 FuzzJs: If the program successfully parsed, try running it
This should help us get a lot more coverage in LibJS.
2021-01-03 17:12:43 +01:00
Luke
5dfcecd244 Lagom/Fuzzers: Add TTF fuzzer 2021-01-02 01:39:34 +01:00
Brian Gianforcaro
8161c99da2 CMake: Warn when a serenity app is missing small or medium icons 2021-01-02 01:37:40 +01:00
Tom
54c66b8f7b Meta: Bump default RAM size to 512MB
Now that we commit memory, we need a lot more physical memory. Physical
memory requirements can be reduced again once we have memory swapping,
which allows the swap area/file to be counted against memory that can
be committed.
2021-01-01 23:43:44 +01:00
Tom
476f17b3f1 Kernel: Merge PurgeableVMObject into AnonymousVMObject
This implements memory commitments and lazy-allocation of committed
memory.
2021-01-01 23:43:44 +01:00
Tom
bc5d6992a4 Kernel: Memory purging improvements
This adds the ability for a Region to define volatile/nonvolatile
areas within mapped memory using madvise(). This also means that
memory purging takes into account all views of the PurgeableVMObject
and only purges memory that is not needed by all of them. When calling
madvise() to change an area to nonvolatile memory, return whether
memory from that area was purged. At that time also try to remap
all memory that is requested to be nonvolatile, and if insufficient
pages are available notify the caller of that fact.
2021-01-01 23:43:44 +01:00
Andreas Kling
3eca77bd86 Lagom: Build test-compress 2021-01-01 22:42:13 +01:00
Brian Gianforcaro
6d67c4cafc CMake: Consolidate all options to the root of the project 2021-01-01 14:37:04 +01:00
Andreas Kling
950a736127 Base: Add a desktop shortcut to the root directory 2021-01-01 01:48:20 +01:00
Andreas Kling
87ad68c75b Meta: Use a raw string delimiter in text-to-cpp-string.sh
Otherwise we can't have the sequence ')"' in GML :^)
2020-12-31 23:31:22 +01:00
Linus Groh
fb220d5678 Meta+Docs+CI: Require clang-format >= 11 2020-12-31 21:51:00 +01:00
William Marlow
91b65ec328 Build: Expose symbols SECTION_start and SECTION_size for embedded resources.
Resources embedded by the embed_resource() function will now also expose
a SECTION_start and SECTION_size symbol so the embedded resource can be found
by an application without having to parse its own ELF image which is not
something applications can currently do from userspace.
2020-12-29 23:38:48 +01:00
meme
23b23cee5a Build: Support non-i686 toolchains
* Add SERENITY_ARCH option to CMake for selecting the target toolchain
* Port all build scripts but continue to use i686
* Update GitHub Actions cache to include BuildIt.sh
2020-12-29 17:42:04 +01:00
Andreas Kling
4e99e013f0 Meta: Import the serenityos.org website
It doesn't seem right to not have the website in version control.
Also this way people can make changes to it. :^)
2020-12-28 00:12:12 +01:00
Liav A
72b1998f0d Kernel: Introduce a new partitioning subsystem
The partitioning code was very outdated, and required a full refactor.
The new subsystem removes duplicated code and uses more AK containers.

The most important change is that all implementations of the
PartitionTable class conform to one interface, which made it possible
to remove unnecessary code in the EBRPartitionTable class.

Finding partitions is now done in the StorageManagement singleton,
instead of doing so in init.cpp.

Also, now we don't try to find partitions on demand - the kernel will
try to detect if a StorageDevice is partitioned, and if so, will check
what is the partition table, which could be MBR, GUID or EBR.
Then, it will create DiskPartitionMetadata object for each partition
that is available in the partition table. This object will be used
by the partition enumeration code to create a DiskPartition with the
correct minor number.
2020-12-27 23:07:44 +01:00
Liav A
bc18712adf Build: Fix build of grub image when choosing EBR scheme 2020-12-27 23:07:44 +01:00
Liav A
0f208669af Build: Fix build of grub image when choosing GPT scheme 2020-12-27 23:07:44 +01:00
Liav A
247517cd4a Kernel: Introduce the DevFS
The DevFS along with DevPtsFS give a complete solution for populating
device nodes in /dev. The main purpose of DevFS is to eliminate the
need of device nodes generation when building the system.

Later on, DevFS will assist with exposing disk partition nodes.
2020-12-27 23:07:44 +01:00
Linus Groh
fec7501d1a Meta: Run lint-prettier.sh on CI 2020-12-27 21:25:27 +01:00
Linus Groh
ee719c23d4 Meta: Add lint-prettier.sh
This is a script similar to the clang-format one to ensure prettier
formatting of most JavaScript files.
2020-12-27 21:25:27 +01:00
Linus Groh
51bcfb5a44 Meta: Update lint-{clang-format,shell-scripts}.sh to take a list of files
This should speed up pre-commit a bit as only files that are staged will
be processed, and clang-format and shellcheck are only invoked once, not
for every file. When no arguments are given (e.g. on CI), it still uses
'git ls-files'.
2020-12-27 21:25:27 +01:00
Linus Groh
a56b3cbf7c Meta: Set 'pipefail' option correctly in shell scripts
This needs '-o' to work correctly. Also update the shebang to bash in
some scripts as shellcheck was complaining about pipefail not being a
POSIX shell thing otherwise.
2020-12-27 21:25:27 +01:00
Andreas Kling
00cfc25688 Base: Add some default desktop icons
I just picked three apps at random: Browser, TextEditor and Help.
This should make it a bit more visible that we have a working desktop.
2020-12-27 14:51:08 +01:00
AnotherTest
3dcdee75be Meta: Make lint-shell-scripts.sh happy
`${FAILURES}` -> `"${FAILURES}"`
2020-12-26 11:54:54 +01:00
Andreas Kling
1e4c010643 LibELF: Remove ELF::Loader and move everyone to ELF::Image
This commit gets rid of ELF::Loader entirely since its very ambiguous
purpose was actually to load executables for the kernel, and that is
now handled by the kernel itself.

This patch includes some drive-by cleanup in LibDebug and CrashDaemon
enabled by the fact that we no longer need to keep the ref-counted
ELF::Loader around.
2020-12-25 02:14:56 +01:00
Itamar
bbedd320b5 Toolchain+LibC: Fix usage of crt files
We now configure the gcc spec files to use a different crt files for
static & PIE binaries.

This relieves us from the need to explicitly specify the desired crt0
file in cmake scripts.
2020-12-24 21:46:35 +01:00
Lenny Maiorani
1db5276c05 Meta: Run all lint checks and report failures together
Problem:
- The first lint check that fails results in all subsequent checks not
  being run.

Solution:
- Run all the lint checks aggregating the number of failures.
- Return a non-0 exit code if any have failed.
2020-12-24 21:00:35 +01:00