mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:37:35 +00:00
UserspaceEmulator: Don't audit accesses in calloc() and libsystem.so
These generate a lot of false positives and nothing of value.
This commit is contained in:
parent
a457b90733
commit
38fc522f5d
3 changed files with 20 additions and 1 deletions
|
@ -64,6 +64,7 @@ public:
|
|||
|
||||
bool is_in_malloc_or_free() const;
|
||||
bool is_in_loader_code() const;
|
||||
bool is_in_libsystem() const;
|
||||
|
||||
void did_receive_signal(int signum) { m_pending_signals |= (1 << signum); }
|
||||
|
||||
|
@ -189,11 +190,16 @@ private:
|
|||
FlatPtr m_malloc_symbol_end { 0 };
|
||||
FlatPtr m_realloc_symbol_start { 0 };
|
||||
FlatPtr m_realloc_symbol_end { 0 };
|
||||
FlatPtr m_calloc_symbol_start { 0 };
|
||||
FlatPtr m_calloc_symbol_end { 0 };
|
||||
FlatPtr m_free_symbol_start { 0 };
|
||||
FlatPtr m_free_symbol_end { 0 };
|
||||
FlatPtr m_malloc_size_symbol_start { 0 };
|
||||
FlatPtr m_malloc_size_symbol_end { 0 };
|
||||
|
||||
FlatPtr m_libsystem_start { 0 };
|
||||
FlatPtr m_libsystem_end { 0 };
|
||||
|
||||
sigset_t m_pending_signals { 0 };
|
||||
sigset_t m_signal_mask { 0 };
|
||||
|
||||
|
@ -218,11 +224,17 @@ private:
|
|||
RangeAllocator m_range_allocator;
|
||||
};
|
||||
|
||||
ALWAYS_INLINE bool Emulator::is_in_libsystem() const
|
||||
{
|
||||
return m_cpu.base_eip() >= m_libsystem_start && m_cpu.base_eip() < m_libsystem_end;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE bool Emulator::is_in_malloc_or_free() const
|
||||
{
|
||||
return (m_cpu.base_eip() >= m_malloc_symbol_start && m_cpu.base_eip() < m_malloc_symbol_end)
|
||||
|| (m_cpu.base_eip() >= m_free_symbol_start && m_cpu.base_eip() < m_free_symbol_end)
|
||||
|| (m_cpu.base_eip() >= m_realloc_symbol_start && m_cpu.base_eip() < m_realloc_symbol_end)
|
||||
|| (m_cpu.base_eip() >= m_calloc_symbol_start && m_cpu.base_eip() < m_calloc_symbol_end)
|
||||
|| (m_cpu.base_eip() >= m_malloc_size_symbol_start && m_cpu.base_eip() < m_malloc_size_symbol_end);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue