-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Introduction
This issue serves as an RFC regarding the enhancement of the kern_bin_db tool to accommodate the storage of kernel source code files. The purpose of this RFC is to solicit input and suggestions from the development community on the proposed approach and to gather consensus on the best course of action.
Background
The kern_bin_db tool plays a critical role in extracting data from the vmlinux image and populating the database. This enhancement is driven by the need to seamlessly present kernel source code alongside associated diagrams within the frontend, ultimately enhancing the user experience.
Considered approaches
A preliminary analysis has led us to consider two competing approaches to implement this enhancement:
Approach 1: Storing Source Code as Gzipped-Base64 Strings in Database
This approach involves introducing a separate table to store the gzipped-base64 representation of kernel source code files. While this ensures centralized data management and query flexibility, we acknowledge potential concerns related to query or database performance.
Approach 2: Storing Source Code Files in the File System
An alternative approach suggests storing source code files directly within the file system. This option offers better read performance, scalability, and reduced storage overhead. However, it requires addressing challenges related to file management and synchronization between the file system and the database.
Further Considerations
In addition to the competing alternatives, we seek guidance on the possibility of storing source code files in their original form versus preprocessing them with the kernel configuration. By storing only the source code that is effectively used by the image under analysis, we could potentially optimize storage and presentation.
Your valuable input will contribute to making an informed decision that aligns with the objectives of this enhancement and benefits the broader user base. Please share your thoughts and suggestions within the discussion section of this RFC.