2020-02-16 00:50:16 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 08:24:48 +00:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-02-16 00:50:16 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2021-08-14 17:47:37 +00:00
|
|
|
#include <AK/DistinctNumeric.h>
|
2021-08-28 20:11:16 +00:00
|
|
|
#include <Kernel/API/POSIX/sys/types.h>
|
2021-08-14 17:47:37 +00:00
|
|
|
|
2020-02-16 00:50:16 +00:00
|
|
|
namespace Kernel {
|
|
|
|
|
2022-11-09 10:39:58 +00:00
|
|
|
enum class LockRank;
|
|
|
|
|
2020-02-16 00:50:16 +00:00
|
|
|
class BlockDevice;
|
|
|
|
class CharacterDevice;
|
2021-08-22 12:51:04 +00:00
|
|
|
class Coredump;
|
2022-08-20 16:25:54 +00:00
|
|
|
class Credentials;
|
2020-02-16 00:50:16 +00:00
|
|
|
class Custody;
|
2021-07-11 09:49:16 +00:00
|
|
|
class Device;
|
2020-02-16 00:50:16 +00:00
|
|
|
class DiskCache;
|
|
|
|
class DoubleBuffer;
|
|
|
|
class File;
|
2022-10-24 05:25:16 +00:00
|
|
|
class FATInode;
|
2021-09-07 11:39:11 +00:00
|
|
|
class OpenFileDescription;
|
2022-05-13 00:22:23 +00:00
|
|
|
class DisplayConnector;
|
2021-07-11 09:49:16 +00:00
|
|
|
class FileSystem;
|
2020-12-22 06:21:58 +00:00
|
|
|
class FutexQueue;
|
2020-02-16 00:50:16 +00:00
|
|
|
class IPv4Socket;
|
|
|
|
class Inode;
|
|
|
|
class InodeIdentifier;
|
|
|
|
class InodeWatcher;
|
2022-12-15 09:42:40 +00:00
|
|
|
class MountFile;
|
2022-11-02 20:26:02 +00:00
|
|
|
class Jail;
|
2020-02-16 00:50:16 +00:00
|
|
|
class KBuffer;
|
2022-10-25 16:53:04 +00:00
|
|
|
class KString;
|
2020-02-16 00:50:16 +00:00
|
|
|
class LocalSocket;
|
2021-07-17 19:09:51 +00:00
|
|
|
class Mutex;
|
2020-08-01 17:39:45 +00:00
|
|
|
class MasterPTY;
|
2021-07-11 09:49:16 +00:00
|
|
|
class Mount;
|
2020-02-16 01:01:42 +00:00
|
|
|
class PerformanceEventBuffer;
|
2021-07-11 09:49:16 +00:00
|
|
|
class ProcFS;
|
|
|
|
class ProcFSInode;
|
2020-02-16 00:50:16 +00:00
|
|
|
class Process;
|
2020-11-29 23:05:27 +00:00
|
|
|
class ProcessGroup;
|
Kernel+SystemServer+Base: Introduce the RAMFS filesystem
This filesystem is based on the code of the long-lived TmpFS. It differs
from that filesystem in one keypoint - its root inode doesn't have a
sticky bit on it.
Therefore, we mount it on /dev, to ensure only root can modify files on
that directory. In addition to that, /tmp is mounted directly in the
SystemServer main (start) code, so it's no longer specified in the fstab
file. We ensure that /tmp has a sticky bit and has the value 0777 for
root directory permissions, which is certainly a special case when using
RAM-backed (and in general other) filesystems.
Because of these 2 changes, it's no longer needed to maintain the TmpFS
filesystem, hence it's removed (renamed to RAMFS), because the RAMFS
represents the purpose of this filesystem in a much better way - it
relies on being backed by RAM "storage", and therefore it's easy to
conclude it's temporary and volatile, so its content is gone on either
system shutdown or unmounting of the filesystem.
2023-01-28 17:00:54 +00:00
|
|
|
class RAMFS;
|
2022-11-09 10:39:58 +00:00
|
|
|
template<LockRank Rank>
|
2021-08-21 23:37:17 +00:00
|
|
|
class RecursiveSpinlock;
|
2020-02-16 00:50:16 +00:00
|
|
|
class Scheduler;
|
|
|
|
class Socket;
|
2021-07-11 09:49:16 +00:00
|
|
|
class SysFS;
|
2021-07-17 22:49:53 +00:00
|
|
|
class SysFSDirectory;
|
2022-04-22 09:46:19 +00:00
|
|
|
class SysFSRootDirectory;
|
2021-07-17 22:49:53 +00:00
|
|
|
class SysFSBusDirectory;
|
2022-04-23 08:48:40 +00:00
|
|
|
class SysFSDevicesDirectory;
|
2021-07-11 09:49:16 +00:00
|
|
|
class SysFSDirectoryInode;
|
|
|
|
class SysFSInode;
|
2020-02-16 00:50:16 +00:00
|
|
|
class TCPSocket;
|
2020-02-16 01:01:42 +00:00
|
|
|
class TTY;
|
2020-02-16 00:50:16 +00:00
|
|
|
class Thread;
|
2021-07-11 09:49:16 +00:00
|
|
|
class ThreadTracer;
|
Kernel+SystemServer+Base: Introduce the RAMFS filesystem
This filesystem is based on the code of the long-lived TmpFS. It differs
from that filesystem in one keypoint - its root inode doesn't have a
sticky bit on it.
Therefore, we mount it on /dev, to ensure only root can modify files on
that directory. In addition to that, /tmp is mounted directly in the
SystemServer main (start) code, so it's no longer specified in the fstab
file. We ensure that /tmp has a sticky bit and has the value 0777 for
root directory permissions, which is certainly a special case when using
RAM-backed (and in general other) filesystems.
Because of these 2 changes, it's no longer needed to maintain the TmpFS
filesystem, hence it's removed (renamed to RAMFS), because the RAMFS
represents the purpose of this filesystem in a much better way - it
relies on being backed by RAM "storage", and therefore it's easy to
conclude it's temporary and volatile, so its content is gone on either
system shutdown or unmounting of the filesystem.
2023-01-28 17:00:54 +00:00
|
|
|
class RAMFSInode;
|
2020-02-16 00:50:16 +00:00
|
|
|
class UDPSocket;
|
2020-09-12 03:11:07 +00:00
|
|
|
class UserOrKernelBuffer;
|
2021-07-11 09:49:16 +00:00
|
|
|
class VirtualFileSystem;
|
2020-02-16 00:50:16 +00:00
|
|
|
class WaitQueue;
|
2021-02-06 06:36:38 +00:00
|
|
|
class WorkQueue;
|
2020-02-16 00:50:16 +00:00
|
|
|
|
2021-08-06 11:49:36 +00:00
|
|
|
namespace Memory {
|
2021-08-06 11:57:39 +00:00
|
|
|
class AddressSpace;
|
2021-08-06 11:49:36 +00:00
|
|
|
class AnonymousVMObject;
|
|
|
|
class InodeVMObject;
|
|
|
|
class MappedROM;
|
|
|
|
class MemoryManager;
|
|
|
|
class PageDirectory;
|
|
|
|
class PhysicalPage;
|
|
|
|
class PhysicalRegion;
|
|
|
|
class PrivateInodeVMObject;
|
|
|
|
class Region;
|
|
|
|
class SharedInodeVMObject;
|
|
|
|
class VMObject;
|
2021-08-06 11:57:39 +00:00
|
|
|
class VirtualRange;
|
2021-08-06 11:49:36 +00:00
|
|
|
}
|
|
|
|
|
2022-11-09 10:39:58 +00:00
|
|
|
template<LockRank Rank>
|
2021-08-21 23:37:17 +00:00
|
|
|
class Spinlock;
|
2021-07-11 09:49:16 +00:00
|
|
|
template<typename LockType>
|
2021-08-21 23:49:22 +00:00
|
|
|
class SpinlockLocker;
|
2020-02-16 00:50:16 +00:00
|
|
|
|
2021-07-11 09:49:16 +00:00
|
|
|
struct InodeMetadata;
|
|
|
|
struct TrapFrame;
|
|
|
|
|
2022-07-22 18:43:50 +00:00
|
|
|
AK_TYPEDEF_DISTINCT_ORDERED_ID(pid_t, ProcessID);
|
|
|
|
AK_TYPEDEF_DISTINCT_ORDERED_ID(pid_t, ThreadID);
|
|
|
|
AK_TYPEDEF_DISTINCT_ORDERED_ID(pid_t, SessionID);
|
|
|
|
AK_TYPEDEF_DISTINCT_ORDERED_ID(pid_t, ProcessGroupID);
|
2021-08-14 17:47:37 +00:00
|
|
|
|
2022-07-22 18:43:50 +00:00
|
|
|
AK_TYPEDEF_DISTINCT_ORDERED_ID(uid_t, UserID);
|
|
|
|
AK_TYPEDEF_DISTINCT_ORDERED_ID(gid_t, GroupID);
|
2021-08-28 20:11:16 +00:00
|
|
|
|
2020-02-16 00:50:16 +00:00
|
|
|
}
|