mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
Kernel: Remove some unnecessary leaking of kernel pointers into dmesg
There's a lot more of this and we need to stop printing kernel pointers anywhere but the debug console.
This commit is contained in:
parent
66d5ebafa6
commit
54d182f553
4 changed files with 11 additions and 8 deletions
|
@ -96,7 +96,7 @@ KResultOr<Region*> BXVGADevice::mmap(Process& process, FileDescription&, Virtual
|
|||
0,
|
||||
"BXVGA Framebuffer",
|
||||
prot);
|
||||
kprintf("BXVGA: %s(%u) created Region{%p} with size %u for framebuffer P%x with vaddr V%p\n",
|
||||
dbgprintf("BXVGA: %s(%u) created Region{%p} with size %u for framebuffer P%x with vaddr V%p\n",
|
||||
process.name().characters(), process.pid(),
|
||||
region, region->size(), m_framebuffer_address.as_ptr(), region->vaddr().get());
|
||||
ASSERT(region);
|
||||
|
|
|
@ -35,7 +35,7 @@ KResultOr<Region*> MBVGADevice::mmap(Process& process, FileDescription&, Virtual
|
|||
0,
|
||||
"MBVGA Framebuffer",
|
||||
prot);
|
||||
kprintf("MBVGA: %s(%u) created Region{%p} with size %u for framebuffer P%x with vaddr V%p\n",
|
||||
dbgprintf("MBVGA: %s(%u) created Region{%p} with size %u for framebuffer P%x with vaddr V%p\n",
|
||||
process.name().characters(), process.pid(),
|
||||
region, region->size(), m_framebuffer_address.as_ptr(), region->vaddr().get());
|
||||
ASSERT(region);
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include <AK/StringBuilder.h>
|
||||
#include <Kernel/Devices/CharacterDevice.h>
|
||||
#include <Kernel/FileSystem/Custody.h>
|
||||
#include <Kernel/FileSystem/DiskBackedFileSystem.h>
|
||||
#include <Kernel/FileSystem/FileDescription.h>
|
||||
#include <Kernel/FileSystem/FileSystem.h>
|
||||
#include <Kernel/FileSystem/VirtualFileSystem.h>
|
||||
|
@ -99,10 +100,14 @@ bool VFS::mount_root(NonnullRefPtr<FS>&& file_system)
|
|||
}
|
||||
|
||||
m_root_inode = move(root_inode);
|
||||
|
||||
kprintf("VFS: mounted root on %s{%p}\n",
|
||||
m_root_inode->fs().class_name(),
|
||||
&m_root_inode->fs());
|
||||
char device_name[32];
|
||||
if (m_root_inode->fs().is_disk_backed()) {
|
||||
auto& device = static_cast<DiskBackedFS&>(m_root_inode->fs()).device();
|
||||
sprintf(device_name, "%d,%d", device.major(), device.minor());
|
||||
} else {
|
||||
sprintf(device_name, "not-a-disk");
|
||||
}
|
||||
kprintf("VFS: mounted root on %s (%s)\n", m_root_inode->fs().class_name(), device_name);
|
||||
|
||||
m_mounts.append(move(mount));
|
||||
return true;
|
||||
|
|
|
@ -89,7 +89,6 @@ Thread::Thread(Process& process)
|
|||
m_kernel_stack_base = m_kernel_stack_region->vaddr().get();
|
||||
m_kernel_stack_top = m_kernel_stack_region->vaddr().offset(default_kernel_stack_size).get() & 0xfffffff8u;
|
||||
m_tss.esp = m_kernel_stack_top;
|
||||
kprintf("Allocated ring0 stack @ %p - %p\n", m_kernel_stack_base, m_kernel_stack_top);
|
||||
} else {
|
||||
// Ring3 processes need a separate stack for Ring0.
|
||||
m_kernel_stack_region = MM.allocate_kernel_region(default_kernel_stack_size, String::format("Kernel Stack (Thread %d)", m_tid), Region::Access::Read | Region::Access::Write, false, true);
|
||||
|
@ -98,7 +97,6 @@ Thread::Thread(Process& process)
|
|||
m_kernel_stack_top = m_kernel_stack_region->vaddr().offset(default_kernel_stack_size).get() & 0xfffffff8u;
|
||||
m_tss.ss0 = 0x10;
|
||||
m_tss.esp0 = m_kernel_stack_top;
|
||||
kprintf("Allocated ring0 stack @ %p - %p\n", m_kernel_stack_base, m_kernel_stack_top);
|
||||
}
|
||||
|
||||
// HACK: Ring2 SS in the TSS is the current PID.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue