Skip to content

Refactor f kernel#14

Closed
KitsuneSemCalda wants to merge 83 commits intofeature/initfrom
refactor-FKernel
Closed

Refactor f kernel#14
KitsuneSemCalda wants to merge 83 commits intofeature/initfrom
refactor-FKernel

Conversation

@KitsuneSemCalda
Copy link
Contributor

No description provided.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

12 similar comments
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flawfinder (reported by Codacy)-0-19216266616 found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.


- [ ] Create a Adapter class to `BlockDevice`

- [x] Create a base class **Hardware Interrupt** to be inherited by ([8259Pic](https://en.wikipedia.org/wiki/Intel_8259) / [APIC](https://en.wikipedia.org/wiki/Advanced_Programmable_Interrupt_Controller) ...)

Check warning

Code scanning / Markdownlint (reported by Codacy)-1-19216319227

Expected: 80; Actual: 208 Warning

Expected: 80; Actual: 208
- [ ] Create a Adapter class to `BlockDevice`

- [x] Create a base class **Hardware Interrupt** to be inherited by ([8259Pic](https://en.wikipedia.org/wiki/Intel_8259) / [APIC](https://en.wikipedia.org/wiki/Advanced_Programmable_Interrupt_Controller) ...)
- [x] Create a base class **Timer** to be inherited by ([PIT](https://en.wikipedia.org/wiki/Programmable_interval_timer), [APIC Timer](https://en.wikipedia.org/wiki/Advanced_Programmable_Interrupt_Controller#APIC_timer) ...)

Check warning

Code scanning / Markdownlint (reported by Codacy)-1-19216319227

Expected: 80; Actual: 224 Warning

Expected: 80; Actual: 224
- [ ] Enforce memory protection between user processes and kernel.

- [ ] **Advanced Memory Management:**
- [ ] Implement kernel heap for dynamic allocations (already has TLSFHeap, but ensure it's robust).

Check warning

Code scanning / Markdownlint (reported by Codacy)-1-19216319227

Expected: 80; Actual: 101 Warning

Expected: 80; Actual: 101

- [ ] **File System Enhancements:**
- [ ] Implement a real disk filesystem (e.g., FAT32, ext2/3/4).
- [ ] Extend VFS with full POSIX file operations (e.g., `stat`, `link`, `unlink`, `mkdir`, `rmdir`).

Check warning

Code scanning / Markdownlint (reported by Codacy)-1-19216319227

Expected: 80; Actual: 102 Warning

Expected: 80; Actual: 102
- [ ] Implement a basic network driver (e.g., for a virtual NIC in QEMU).
- [ ] Implement a basic USB driver.

### Toolchain

Check notice

Code scanning / Markdownlint (reported by Codacy)-1-19216319227

Multiple headings with the same content Note

Multiple headings with the same content
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remark-lint (reported by Codacy)-18-19216266616 found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

uintptr_t lapic_base = 0; ///< Mapped LAPIC base
uint64_t apic_ticks_per_ms = 0; ///< Timer ticks per ms

uint32_t read(uint32_t reg);

Check failure

Code scanning / Flawfinder (reported by Codacy)-9-19216319227

Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Error

Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20).

String m_name = "IOAPIC";

uint32_t read(uint32_t reg);

Check failure

Code scanning / Flawfinder (reported by Codacy)-9-19216319227

Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Error

Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20).
///< (heap-allocated)
uint32_t lba_first; ///< LBA of the first sector of the partition
uint32_t sectors_count; ///< Total number of sectors in the partition
uint8_t type; ///< Partition type identifier (e.g., MBR partition type)

Check failure

Code scanning / Flawfinder (reported by Codacy)-9-19216319227

Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). Error

Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362).
* @param offset Offset in the partition to start reading from
* @return Number of bytes read on success, negative error code on failure
*/
static int read(VNode *vnode, FileDescriptor *fd, void *buffer, size_t size,

Check failure

Code scanning / Flawfinder (reported by Codacy)-9-19216319227

Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Error

Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20).
static int write(VNode *vnode, FileDescriptor *fd, const void *buffer, size_t size, size_t offset);
/**
* @brief Block device interface for ATA devices
*

Check failure

Code scanning / Flawfinder (reported by Codacy)-9-19216319227

Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). Error

Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362).
* @param flags Open flags.
* @return 0 on success or negative on error.
*/
inline int open(FileDescriptor *fd, int flags) {

Check failure

Code scanning / Flawfinder (reported by Codacy)-9-19216319227

Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). Error

Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362).
* @return 0 on success or negative on error.
*/
inline int open(FileDescriptor *fd, int flags) {
int ret = ops && ops->open ? ops->open(this, fd, flags) : 0;

Check failure

Code scanning / Flawfinder (reported by Codacy)-9-19216319227

Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). Error

Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362).
inline String operator+(const String& lhs, const char* rhs) {
if (!rhs) return lhs;
String result;
result.reserve(lhs.length() + strlen(rhs) + 1);

Check failure

Code scanning / Flawfinder (reported by Codacy)-9-19216319227

Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Error

Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126).
inline String operator+(const char* lhs, const String& rhs) {
if (!lhs) return rhs;
String result;
result.reserve(strlen(lhs) + rhs.length() + 1);

Check failure

Code scanning / Flawfinder (reported by Codacy)-9-19216319227

Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Error

Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126).
* @param s Null-terminated C-style string.
*/
constexpr StringView(const char* s) noexcept
: m_data(s), m_size(s ? strlen(s) : 0) {}

Check failure

Code scanning / Flawfinder (reported by Codacy)-9-19216319227

Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Error

Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126).
@KitsuneSemCalda KitsuneSemCalda deleted the refactor-FKernel branch November 9, 2025 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant