요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
공통 메모리 정보
vmcoreinfo.rst:47-197노드·주소 변환 심벌, 핵심 구조체 크기와 멤버 오프셋을 정리합니다.
로그와 페이지 필터
vmcoreinfo.rst:198-340printk 링 버퍼 구성요소와 덤프에서 페이지를 제외하는 플래그를 설명합니다.
x86과 ARM
vmcoreinfo.rst:341-477x86_64·x86_32·ARM64·arm의 주소 변환, KASLR, SME와 PAC 관련 항목을 정리합니다.
s390, powerpc, sh, RISCV64
vmcoreinfo.rst:478-596나머지 아키텍처의 CPU·NUMA·vmemmap·page size·가상 주소 범위 항목을 설명합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
==========
VMCOREINFO
==========
What is it?
===========
VMCOREINFO is a special ELF note section. It contains various
information from the kernel like structure size, page size, symbol
values, field offsets, etc. These data are packed into an ELF note
section and used by user-space tools like crash and makedumpfile to
analyze a kernel's memory layout.
Common variables
================
init_uts_ns.name.release
------------------------
The version of the Linux kernel. Used to find the corresponding source
code from which the kernel has been built. For example, crash uses it to
find the corresponding vmlinux in order to process vmcore.
PAGE_SIZE
---------
The size of a page. It is the smallest unit of data used by the memory
management facilities. It is usually 4096 bytes of size and a page is
aligned on 4096 bytes. Used for computing page addresses.
init_uts_ns
-----------
The UTS namespace which is used to isolate two specific elements of the
system that relate to the uname(2) system call. It is named after the
data structure used to store information returned by the uname(2) system
call.
User-space tools can get the kernel name, host name, kernel release
number, kernel version, architecture name and OS type from it.
(uts_namespace, name)
---------------------
Offset of the name's member. Crash Utility and Makedumpfile get
the start address of the init_uts_ns.name from this.
node_online_map
---------------
An array node_states[N_ONLINE] which represents the set of online nodes
in a system, one bit position per node number. Used to keep track of
which nodes are in the system and online.
swapper_pg_dir
--------------
The global page directory pointer of the kernel. Used to translate
virtual to physical addresses.
_stext
------
Defines the beginning of the text section. In general, _stext indicates
the kernel start address. Used to convert a virtual address from the
direct kernel map to a physical address.
VMALLOC_START
-------------
Stores the base address of vmalloc area. makedumpfile gets this value
since is necessary for vmalloc translation.
mem_map
-------
Physical addresses are translated to struct pages by treating them as
an index into the mem_map array. Right-shifting a physical address
PAGE_SHIFT bits converts it into a page frame number which is an index
into that mem_map array.
Used to map an address to the corresponding struct page.
contig_page_data
----------------
Makedumpfile gets the pglist_data structure from this symbol, which is
used to describe the memory layout.
User-space tools use this to exclude free pages when dumping memory.
mem_section|(mem_section, NR_SECTION_ROOTS)|(mem_section, section_mem_map)
--------------------------------------------------------------------------
The address of the mem_section array, its length, structure size, and
the section_mem_map offset.
It exists in the sparse memory mapping model, and it is also somewhat
similar to the mem_map variable, both of them are used to translate an
address.
MAX_PHYSMEM_BITS
----------------
Defines the maximum supported physical address space memory.
page
----
The size of a page structure. struct page is an important data structure
and it is widely used to compute contiguous memory.
pglist_data
-----------
The size of a pglist_data structure. This value is used to check if the
pglist_data structure is valid. It is also used for checking the memory
type.
zone
----
The size of a zone structure. This value is used to check if the zone
structure has been found. It is also used for excluding free pages.
free_area
---------
The size of a free_area structure. It indicates whether the free_area
structure is valid or not. Useful when excluding free pages.
list_head
---------
The size of a list_head structure. Used when iterating lists in a
post-mortem analysis session.
nodemask_t
----------
The size of a nodemask_t type. Used to compute the number of online
nodes.
(page, flags|_refcount|mapping|lru|_mapcount|private|compound_order|compound_head)
----------------------------------------------------------------------------------
User-space tools compute their values based on the offset of these
variables. The variables are used when excluding unnecessary pages.
(pglist_data, node_zones|nr_zones|node_mem_map|node_start_pfn|node_spanned_pages|node_id)
-----------------------------------------------------------------------------------------
On NUMA machines, each NUMA node has a pg_data_t to describe its memory
layout. On UMA machines there is a single pglist_data which describes the
whole memory.
These values are used to check the memory type and to compute the
virtual address for memory map.
(zone, free_area|vm_stat|spanned_pages)
---------------------------------------
Each node is divided into a number of blocks called zones which
represent ranges within memory. A zone is described by a structure zone.
User-space tools compute required values based on the offset of these
variables.
(free_area, free_list)
----------------------
Offset of the free_list's member. This value is used to compute the number
of free pages.
Each zone has a free_area structure array called free_area[NR_PAGE_ORDERS].
The free_list represents a linked list of free page blocks.
(list_head, next|prev)
----------------------
Offsets of the list_head's members. list_head is used to define a
circular linked list. User-space tools need these in order to traverse
lists.
(vmap_area, va_start|list)
--------------------------
Offsets of the vmap_area's members. They carry vmalloc-specific
information. Makedumpfile gets the start address of the vmalloc region
from this.
(zone.free_area, NR_PAGE_ORDERS)
--------------------------------
Free areas descriptor. User-space tools use this value to iterate the
free_area ranges. NR_PAGE_ORDERS is used by the zone buddy allocator.
prb
---
A pointer to the printk ringbuffer (struct printk_ringbuffer). This
may be pointing to the static boot ringbuffer or the dynamically
allocated ringbuffer, depending on when the core dump occurred.
Used by user-space tools to read the active kernel log buffer.
printk_rb_static
----------------
A pointer to the static boot printk ringbuffer. If @prb has a
different value, this is useful for viewing the initial boot messages,
which may have been overwritten in the dynamically allocated
ringbuffer.
clear_seq
---------
The sequence number of the printk() record after the last clear
command. It indicates the first record after the last
SYSLOG_ACTION_CLEAR, like issued by 'dmesg -c'. Used by user-space
tools to dump a subset of the dmesg log.
printk_ringbuffer
-----------------
The size of a printk_ringbuffer structure. This structure contains all
information required for accessing the various components of the
kernel log buffer.
(printk_ringbuffer, desc_ring|text_data_ring|dict_data_ring|fail)
-----------------------------------------------------------------
Offsets for the various components of the printk ringbuffer. Used by
user-space tools to view the kernel log buffer without requiring the
declaration of the structure.
prb_desc_ring
-------------
The size of the prb_desc_ring structure. This structure contains
information about the set of record descriptors.
(prb_desc_ring, count_bits|descs|head_id|tail_id)
-------------------------------------------------
Offsets for the fields describing the set of record descriptors. Used
by user-space tools to be able to traverse the descriptors without
requiring the declaration of the structure.
prb_desc
--------
The size of the prb_desc structure. This structure contains
information about a single record descriptor.
(prb_desc, info|state_var|text_blk_lpos|dict_blk_lpos)
------------------------------------------------------
Offsets for the fields describing a record descriptors. Used by
user-space tools to be able to read descriptors without requiring
the declaration of the structure.
prb_data_blk_lpos
-----------------
The size of the prb_data_blk_lpos structure. This structure contains
information about where the text or dictionary data (data block) is
located within the respective data ring.
(prb_data_blk_lpos, begin|next)
-------------------------------
Offsets for the fields describing the location of a data block. Used
by user-space tools to be able to locate data blocks without
requiring the declaration of the structure.
printk_info
-----------
The size of the printk_info structure. This structure contains all
the meta-data for a record.
(printk_info, seq|ts_nsec|text_len|dict_len|caller_id)
------------------------------------------------------
Offsets for the fields providing the meta-data for a record. Used by
user-space tools to be able to read the information without requiring
the declaration of the structure.
prb_data_ring
-------------
The size of the prb_data_ring structure. This structure contains
information about a set of data blocks.
(prb_data_ring, size_bits|data|head_lpos|tail_lpos)
---------------------------------------------------
Offsets for the fields describing a set of data blocks. Used by
user-space tools to be able to access the data blocks without
requiring the declaration of the structure.
atomic_long_t
-------------
The size of the atomic_long_t structure. Used by user-space tools to
be able to copy the full structure, regardless of its
architecture-specific implementation.
(atomic_long_t, counter)
------------------------
Offset for the long value of an atomic_long_t variable. Used by
user-space tools to access the long value without requiring the
architecture-specific declaration.
(free_area.free_list, MIGRATE_TYPES)
------------------------------------
The number of migrate types for pages. The free_list is described by the
array. Used by tools to compute the number of free pages.
NR_FREE_PAGES
-------------
On linux-2.6.21 or later, the number of free pages is in
vm_stat[NR_FREE_PAGES]. Used to get the number of free pages.
PG_lru|PG_private|PG_swapcache|PG_swapbacked|PG_hwpoison|PG_head_mask
--------------------------------------------------------------------------
Page attributes. These flags are used to filter various unnecessary for
dumping pages.
PAGE_SLAB_MAPCOUNT_VALUE|PAGE_BUDDY_MAPCOUNT_VALUE|PAGE_OFFLINE_MAPCOUNT_VALUE|PAGE_HUGETLB_MAPCOUNT_VALUE|PAGE_UNACCEPTED_MAPCOUNT_VALUE
------------------------------------------------------------------------------------------------------------------------------------------
More page attributes. These flags are used to filter various unnecessary for
dumping pages.
x86_64
======
phys_base
---------
Used to convert the virtual address of an exported kernel symbol to its
corresponding physical address.
init_top_pgt
------------
Used to walk through the whole page table and convert virtual addresses
to physical addresses. The init_top_pgt is somewhat similar to
swapper_pg_dir, but it is only used in x86_64.
pgtable_l5_enabled
------------------
User-space tools need to know whether the crash kernel was in 5-level
paging mode.
node_data
---------
This is a struct pglist_data array and stores all NUMA nodes
information. Makedumpfile gets the pglist_data structure from it.
(node_data, MAX_NUMNODES)
-------------------------
The maximum number of nodes in system.
KERNELOFFSET
------------
The kernel randomization offset. Used to compute the page offset. If
KASLR is disabled, this value is zero.
KERNEL_IMAGE_SIZE
-----------------
Currently unused by Makedumpfile. Used to compute the module virtual
address by Crash.
sme_mask
--------
AMD-specific with SME support: it indicates the secure memory encryption
mask. Makedumpfile tools need to know whether the crash kernel was
encrypted. If SME is enabled in the first kernel, the crash kernel's
page table entries (pgd/pud/pmd/pte) contain the memory encryption
mask. This is used to remove the SME mask and obtain the true physical
address.
Currently, sme_mask stores the value of the C-bit position. If needed,
additional SME-relevant info can be placed in that variable.
For example::
[ misc ][ enc bit ][ other misc SME info ]
0000_0000_0000_0000_1000_0000_0000_0000_0000_0000_..._0000
63 59 55 51 47 43 39 35 31 27 ... 3
x86_32
======
X86_PAE
-------
Denotes whether physical address extensions are enabled. It has the cost
of a higher page table lookup overhead, and also consumes more page
table space per process. Used to check whether PAE was enabled in the
crash kernel when converting virtual addresses to physical addresses.
ARM64
=====
VA_BITS
-------
The maximum number of bits for virtual addresses. Used to compute the
virtual memory ranges.
kimage_voffset
--------------
The offset between the kernel virtual and physical mappings. Used to
translate virtual to physical addresses.
PHYS_OFFSET
-----------
Indicates the physical address of the start of memory. Similar to
kimage_voffset, which is used to translate virtual to physical
addresses.
KERNELOFFSET
------------
The kernel randomization offset. Used to compute the page offset. If
KASLR is disabled, this value is zero.
KERNELPACMASK
-------------
The mask to extract the Pointer Authentication Code from a kernel virtual
address.
TCR_EL1.T1SZ
------------
Indicates the size offset of the memory region addressed by TTBR1_EL1.
The region size is 2^(64-T1SZ) bytes.
TTBR1_EL1 is the table base address register specified by ARMv8-A
architecture which is used to lookup the page-tables for the Virtual
addresses in the higher VA range (refer to ARMv8 ARM document for
more details).
MODULES_VADDR|MODULES_END|VMALLOC_START|VMALLOC_END|VMEMMAP_START|VMEMMAP_END
-----------------------------------------------------------------------------
Used to get the correct ranges:
MODULES_VADDR ~ MODULES_END-1 : Kernel module space.
VMALLOC_START ~ VMALLOC_END-1 : vmalloc() / ioremap() space.
VMEMMAP_START ~ VMEMMAP_END-1 : vmemmap region, used for struct page array.
arm
===
ARM_LPAE
--------
It indicates whether the crash kernel supports large physical address
extensions. Used to translate virtual to physical addresses.
s390
====
lowcore_ptr
-----------
An array with a pointer to the lowcore of every CPU. Used to print the
psw and all registers information.
high_memory
-----------
Used to get the vmalloc_start address from the high_memory symbol.
(lowcore_ptr, NR_CPUS)
----------------------
The maximum number of CPUs.
powerpc
=======
node_data|(node_data, MAX_NUMNODES)
-----------------------------------
See above.
contig_page_data
----------------
See above.
vmemmap_list
------------
The vmemmap_list maintains the entire vmemmap physical mapping. Used
to get vmemmap list count and populated vmemmap regions info. If the
vmemmap address translation information is stored in the crash kernel,
it is used to translate vmemmap kernel virtual addresses.
mmu_vmemmap_psize
-----------------
The size of a page. Used to translate virtual to physical addresses.
mmu_psize_defs
--------------
Page size definitions, i.e. 4k, 64k, or 16M.
Used to make vtop translations.
vmemmap_backing|(vmemmap_backing, list)|(vmemmap_backing, phys)|(vmemmap_backing, virt_addr)
--------------------------------------------------------------------------------------------
The vmemmap virtual address space management does not have a traditional
page table to track which virtual struct pages are backed by a physical
mapping. The virtual to physical mappings are tracked in a simple linked
list format.
User-space tools need to know the offset of list, phys and virt_addr
when computing the count of vmemmap regions.
mmu_psize_def|(mmu_psize_def, shift)
------------------------------------
The size of a struct mmu_psize_def and the offset of mmu_psize_def's
member.
Used in vtop translations.
sh
==
node_data|(node_data, MAX_NUMNODES)
-----------------------------------
See above.
X2TLB
-----
Indicates whether the crashed kernel enabled SH extended mode.
RISCV64
=======
VA_BITS
-------
The maximum number of bits for virtual addresses. Used to compute the
virtual memory ranges.
PAGE_OFFSET
-----------
Indicates the virtual kernel start address of the direct-mapped RAM region.
phys_ram_base
-------------
Indicates the start physical RAM address.
MODULES_VADDR|MODULES_END|VMALLOC_START|VMALLOC_END|VMEMMAP_START|VMEMMAP_END|KERNEL_LINK_ADDR
----------------------------------------------------------------------------------------------
Used to get the correct ranges:
* MODULES_VADDR ~ MODULES_END : Kernel module space.
* VMALLOC_START ~ VMALLOC_END : vmalloc() / ioremap() space.
* VMEMMAP_START ~ VMEMMAP_END : vmemmap space, used for struct page array.
* KERNEL_LINK_ADDR : start address of Kernel link and BPF
va_kernel_pa_offset
-------------------
Indicates the offset between the kernel virtual and physical mappings.
Used to translate virtual to physical addresses.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
VMCOREINFO와 기본 식별 정보
1-46VMCOREINFO는 특별한 ELF note 섹션입니다. 커널의 구조체 크기, 페이지 크기, 심벌 값과 필드 오프셋 등을 ELF note에 묶어 넣습니다. `crash`와 `makedumpfile` 같은 사용자 공간 도구가 이 데이터를 이용해 커널 메모리 배치를 분석합니다.
| 항목 | 의미와 용도 |
|---|---|
| init_uts_ns.name.release | Linux 커널 버전입니다. 커널을 빌드한 대응 소스 코드를 찾는 데 사용합니다. 예를 들어 Crash는 vmcore를 처리할 대응 `vmlinux`를 이 값으로 찾습니다. |
| PAGE_SIZE | 메모리 관리가 사용하는 최소 데이터 단위인 페이지의 크기입니다. 보통 4096바이트이며 페이지도 4096바이트 경계에 맞춰집니다. 페이지 주소 계산에 사용합니다. |
| init_uts_ns | `uname(2)` 시스템 호출과 관련된 두 시스템 요소를 격리하는 UTS namespace입니다. 사용자 공간 도구는 여기서 커널 이름, 호스트 이름, 커널 release 번호와 version, 아키텍처 이름, OS 유형을 얻습니다. |
| (uts_namespace, name) | `name` 멤버의 오프셋입니다. Crash와 Makedumpfile은 이 값으로 `init_uts_ns.name`의 시작 주소를 구합니다. |
노드와 메모리 주소 변환
47-106| 항목 | 의미와 용도 |
|---|---|
| node_online_map | 시스템의 온라인 노드 집합을 노드 번호당 한 비트로 나타내는 `node_states[N_ONLINE]` 배열입니다. |
| swapper_pg_dir | 커널의 전역 페이지 디렉터리 포인터입니다. 가상 주소를 물리 주소로 변환할 때 사용합니다. |
| _stext | text 섹션의 시작이며 일반적으로 커널 시작 주소를 뜻합니다. direct kernel map의 가상 주소를 물리 주소로 바꿀 때 사용합니다. |
| VMALLOC_START | vmalloc 영역의 기본 주소입니다. Makedumpfile이 vmalloc 주소를 변환하는 데 필요합니다. |
| mem_map | 물리 주소를 `PAGE_SHIFT`만큼 오른쪽으로 이동해 page frame number를 얻고, 이를 `mem_map` 배열의 인덱스로 사용하여 대응 `struct page`를 찾습니다. |
| contig_page_data | Makedumpfile이 메모리 배치를 설명하는 `pglist_data` 구조체를 얻는 심벌입니다. 사용자 공간 도구는 이를 이용해 덤프에서 free page를 제외합니다. |
| mem_section|(mem_section, NR_SECTION_ROOTS)|(mem_section, section_mem_map) | `mem_section` 배열 주소, 배열 길이, 구조체 크기와 `section_mem_map` 오프셋입니다. sparse memory mapping 모델에서 주소를 변환하며 `mem_map`과 비슷한 역할을 합니다. |
| MAX_PHYSMEM_BITS | 지원 가능한 물리 주소 공간 메모리의 최대 비트 수를 정의합니다. |
핵심 메모리 구조체 크기
107-143| 항목 | 의미와 용도 |
|---|---|
| page | `struct page`의 크기입니다. 연속 메모리를 계산하는 데 널리 사용하는 핵심 구조체입니다. |
| pglist_data | `pglist_data` 구조체 크기입니다. 구조체 유효성과 메모리 유형을 확인할 때 사용합니다. |
| zone | `zone` 구조체 크기입니다. zone을 찾았는지 확인하고 free page를 제외하는 데 사용합니다. |
| free_area | `free_area` 구조체 크기입니다. 구조체 유효성을 판별하고 free page를 제외할 때 유용합니다. |
| list_head | `list_head` 구조체 크기입니다. 사후 분석에서 목록을 순회할 때 사용합니다. |
| nodemask_t | `nodemask_t` 유형 크기입니다. 온라인 노드 수를 계산할 때 사용합니다. |
메모리 구조체 필드 오프셋
144-197| 항목 | 의미와 용도 |
|---|---|
| (page, flags|_refcount|mapping|lru|_mapcount|private|compound_order|compound_head) | 사용자 공간 도구가 각 변수의 오프셋으로 값을 계산하며 불필요한 페이지를 제외할 때 사용합니다. |
| (pglist_data, node_zones|nr_zones|node_mem_map|node_start_pfn|node_spanned_pages|node_id) | NUMA의 각 노드는 메모리 배치를 설명하는 `pg_data_t`를 가지며 UMA에는 전체 메모리를 설명하는 `pglist_data` 하나가 있습니다. 메모리 유형 확인과 memory map 가상 주소 계산에 사용합니다. |
| (zone, free_area|vm_stat|spanned_pages) | 각 노드는 메모리 범위를 나타내는 여러 zone으로 나뉩니다. 사용자 공간 도구가 이 변수들의 오프셋으로 필요한 값을 계산합니다. |
| (free_area, free_list) | `free_list` 멤버 오프셋입니다. 각 zone의 `free_area[NR_PAGE_ORDERS]` 배열 안에서 free page block 연결 목록을 따라 free page 수를 계산합니다. |
| (list_head, next|prev) | 원형 연결 목록을 정의하는 `list_head`의 `next`와 `prev` 오프셋입니다. 사용자 공간 도구의 목록 순회에 필요합니다. |
| (vmap_area, va_start|list) | vmalloc 전용 정보를 담는 `vmap_area` 멤버 오프셋입니다. Makedumpfile이 vmalloc 영역 시작 주소를 얻습니다. |
| (zone.free_area, NR_PAGE_ORDERS) | free area descriptor입니다. 사용자 공간 도구가 `free_area` 범위를 순회하며, `NR_PAGE_ORDERS`는 zone buddy allocator가 사용합니다. |
printk 링 버퍼와 페이지 필터
198-340| 항목 | 의미와 용도 |
|---|---|
| prb | 활성 printk ringbuffer(`struct printk_ringbuffer`)를 가리키는 포인터입니다. 크래시 시점에 따라 정적 부팅 링 버퍼나 동적 할당 링 버퍼를 가리키며 커널 로그를 읽는 데 사용합니다. |
| printk_rb_static | 정적 부팅 printk 링 버퍼 포인터입니다. `@prb`가 다른 값을 가리키면 동적 링 버퍼에서 덮어쓴 초기 부팅 메시지를 보는 데 유용합니다. |
| clear_seq | 마지막 clear 명령 뒤의 `printk()` 레코드 sequence number입니다. `dmesg -c` 같은 `SYSLOG_ACTION_CLEAR` 이후 첫 레코드를 나타내며 dmesg 로그 일부만 덤프할 때 사용합니다. |
| printk_ringbuffer | 커널 로그 버퍼의 여러 구성요소에 접근하는 모든 정보를 담는 `printk_ringbuffer` 구조체 크기입니다. |
| (printk_ringbuffer, desc_ring|text_data_ring|dict_data_ring|fail) | 구조체 선언 없이 커널 로그 버퍼를 읽도록 printk 링 버퍼 구성요소의 오프셋을 제공합니다. |
| prb_desc_ring | 레코드 descriptor 집합 정보를 담는 `prb_desc_ring` 구조체 크기입니다. |
| (prb_desc_ring, count_bits|descs|head_id|tail_id) | 구조체 선언 없이 descriptor 집합을 순회하도록 관련 필드 오프셋을 제공합니다. |
| prb_desc | 레코드 descriptor 하나의 정보를 담는 `prb_desc` 구조체 크기입니다. |
| (prb_desc, info|state_var|text_blk_lpos|dict_blk_lpos) | 구조체 선언 없이 descriptor를 읽도록 단일 레코드 descriptor 필드의 오프셋을 제공합니다. |
| prb_data_blk_lpos | text 또는 dictionary data block이 해당 data ring의 어디에 있는지 담는 `prb_data_blk_lpos` 구조체 크기입니다. |
| (prb_data_blk_lpos, begin|next) | 구조체 선언 없이 data block 위치를 찾도록 `begin`과 `next` 필드 오프셋을 제공합니다. |
| printk_info | 레코드의 모든 metadata를 담는 `printk_info` 구조체 크기입니다. |
| (printk_info, seq|ts_nsec|text_len|dict_len|caller_id) | 구조체 선언 없이 레코드 metadata를 읽도록 관련 필드 오프셋을 제공합니다. |
| prb_data_ring | data block 집합 정보를 담는 `prb_data_ring` 구조체 크기입니다. |
| (prb_data_ring, size_bits|data|head_lpos|tail_lpos) | 구조체 선언 없이 data block 집합에 접근하도록 관련 필드 오프셋을 제공합니다. |
| atomic_long_t | 아키텍처별 구현과 관계없이 전체 구조체를 복사할 수 있도록 제공하는 `atomic_long_t` 구조체 크기입니다. |
| (atomic_long_t, counter) | 아키텍처별 선언 없이 `atomic_long_t` 변수의 long 값에 접근하는 `counter` 오프셋입니다. |
| (free_area.free_list, MIGRATE_TYPES) | 페이지 migrate type의 수입니다. `free_list` 배열을 해석해 free page 수를 계산할 때 사용합니다. |
| NR_FREE_PAGES | Linux 2.6.21 이상에서 `vm_stat[NR_FREE_PAGES]`에 저장되는 free page 수를 얻습니다. |
| PG_lru|PG_private|PG_swapcache|PG_swapbacked|PG_hwpoison|PG_head_mask | 덤프에 불필요한 여러 페이지를 필터링하는 page attribute 플래그입니다. |
| PAGE_SLAB_MAPCOUNT_VALUE|PAGE_BUDDY_MAPCOUNT_VALUE|PAGE_OFFLINE_MAPCOUNT_VALUE|PAGE_HUGETLB_MAPCOUNT_VALUE|PAGE_UNACCEPTED_MAPCOUNT_VALUE | 덤프에 불필요한 페이지를 더 세밀하게 필터링하는 추가 page attribute 값입니다. |
x86_64 항목
341-404| 항목 | 의미와 용도 |
|---|---|
| phys_base | 내보낸 커널 심벌의 가상 주소를 대응 물리 주소로 변환합니다. |
| init_top_pgt | 전체 페이지 테이블을 순회해 가상 주소를 물리 주소로 변환합니다. `swapper_pg_dir`와 비슷하지만 x86_64에서만 사용합니다. |
| pgtable_l5_enabled | 크래시한 커널이 5-level paging 모드였는지 사용자 공간 도구에 알립니다. |
| node_data | 모든 NUMA 노드 정보를 저장하는 `struct pglist_data` 배열입니다. Makedumpfile이 여기서 `pglist_data`를 얻습니다. |
| (node_data, MAX_NUMNODES) | 시스템이 지원하는 최대 노드 수입니다. |
| KERNELOFFSET | 커널 randomization 오프셋입니다. page offset 계산에 사용하며 KASLR이 꺼져 있으면 0입니다. |
| KERNEL_IMAGE_SIZE | 현재 Makedumpfile은 사용하지 않습니다. Crash가 모듈 가상 주소를 계산할 때 사용합니다. |
| sme_mask | SME를 지원하는 AMD 시스템의 secure memory encryption mask입니다. 첫 번째 커널에서 SME가 켜졌다면 crash kernel의 `pgd`/`pud`/`pmd`/`pte`에 암호화 mask가 들어 있으므로, 이를 제거해 실제 물리 주소를 구합니다. 현재는 C-bit 위치를 저장하며 필요하면 다른 SME 정보도 함께 담을 수 있습니다. |
원문의 ASCII 비트 그림을 같은 의미의 필드 표로 재구성했습니다. bit 47 부근의 C-bit가 암호화 여부를 표시하고 나머지 비트는 기타 SME 정보에 사용할 수 있습니다.
x86_32 항목
405-415| 항목 | 의미와 용도 |
|---|---|
| X86_PAE | Physical Address Extension 활성화 여부입니다. PAE는 페이지 테이블 조회 비용과 프로세스별 페이지 테이블 공간을 늘립니다. 크래시 커널의 가상 주소를 물리 주소로 변환할 때 PAE 사용 여부를 확인합니다. |
ARM64 항목
416-468| 항목 | 의미와 용도 |
|---|---|
| VA_BITS | 가상 주소의 최대 비트 수이며 가상 메모리 범위 계산에 사용합니다. |
| kimage_voffset | 커널 가상 mapping과 물리 mapping 사이의 오프셋이며 가상 주소를 물리 주소로 변환합니다. |
| PHYS_OFFSET | 메모리 시작 물리 주소입니다. 가상 주소를 물리 주소로 바꾸는 `kimage_voffset`과 비슷한 역할을 합니다. |
| KERNELOFFSET | 커널 randomization 오프셋입니다. page offset 계산에 사용하며 KASLR이 꺼져 있으면 0입니다. |
| KERNELPACMASK | 커널 가상 주소에서 Pointer Authentication Code를 추출하는 mask입니다. |
| TCR_EL1.T1SZ | `TTBR1_EL1`이 주소 지정하는 메모리 영역의 크기 오프셋입니다. 영역 크기는 `2^(64-T1SZ)`바이트입니다. `TTBR1_EL1`은 ARMv8-A가 정의한 table base address register로 상위 VA 범위의 page table 조회에 사용합니다. |
| MODULES_VADDR|MODULES_END|VMALLOC_START|VMALLOC_END|VMEMMAP_START|VMEMMAP_END | `MODULES_VADDR`~`MODULES_END-1`은 커널 모듈 공간, `VMALLOC_START`~`VMALLOC_END-1`은 `vmalloc()`/`ioremap()` 공간, `VMEMMAP_START`~`VMEMMAP_END-1`은 `struct page` 배열용 vmemmap 영역입니다. |
arm 항목
469-477| 항목 | 의미와 용도 |
|---|---|
| ARM_LPAE | 크래시 커널이 Large Physical Address Extension을 지원하는지 나타내며 가상 주소를 물리 주소로 변환할 때 사용합니다. |
s390 항목
478-496| 항목 | 의미와 용도 |
|---|---|
| lowcore_ptr | 각 CPU의 lowcore를 가리키는 포인터 배열입니다. PSW와 모든 레지스터 정보를 출력할 때 사용합니다. |
| high_memory | `high_memory` 심벌에서 `vmalloc_start` 주소를 얻는 데 사용합니다. |
| (lowcore_ptr, NR_CPUS) | 지원하는 최대 CPU 수입니다. |
powerpc 항목
497-549| 항목 | 의미와 용도 |
|---|---|
| node_data|(node_data, MAX_NUMNODES) | 앞의 공통·x86_64 설명과 같이 NUMA 노드 정보와 시스템 최대 노드 수를 제공합니다. |
| contig_page_data | 앞의 공통 설명과 같이 메모리 배치를 설명하는 `pglist_data`를 얻고 free page를 제외할 때 사용합니다. |
| vmemmap_list | 전체 vmemmap 물리 mapping을 유지합니다. vmemmap 목록 수와 채워진 영역 정보를 얻으며, crash kernel에 변환 정보가 있으면 vmemmap 커널 가상 주소를 물리 주소로 바꿉니다. |
| mmu_vmemmap_psize | 페이지 크기이며 가상 주소를 물리 주소로 변환할 때 사용합니다. |
| mmu_psize_defs | 4k, 64k, 16M 같은 페이지 크기 정의이며 vtop 변환에 사용합니다. |
| vmemmap_backing|(vmemmap_backing, list)|(vmemmap_backing, phys)|(vmemmap_backing, virt_addr) | vmemmap 가상 주소 공간은 물리 mapping을 추적하는 전통적 페이지 테이블이 없고 단순 연결 목록을 사용합니다. 사용자 공간 도구는 vmemmap 영역 수를 계산하려고 `list`, `phys`, `virt_addr` 오프셋을 사용합니다. |
| mmu_psize_def|(mmu_psize_def, shift) | `struct mmu_psize_def`의 크기와 `shift` 멤버 오프셋이며 vtop 변환에 사용합니다. |
sh 항목
550-562| 항목 | 의미와 용도 |
|---|---|
| node_data|(node_data, MAX_NUMNODES) | 앞에서 설명한 NUMA 노드 정보와 최대 노드 수를 제공합니다. |
| X2TLB | 크래시한 커널이 SH extended mode를 활성화했는지 나타냅니다. |
RISCV64 항목
563-596| 항목 | 의미와 용도 |
|---|---|
| VA_BITS | 가상 주소의 최대 비트 수이며 가상 메모리 범위 계산에 사용합니다. |
| PAGE_OFFSET | direct-mapped RAM 영역의 가상 커널 시작 주소를 나타냅니다. |
| phys_ram_base | 물리 RAM의 시작 주소를 나타냅니다. |
| MODULES_VADDR|MODULES_END|VMALLOC_START|VMALLOC_END|VMEMMAP_START|VMEMMAP_END|KERNEL_LINK_ADDR | `MODULES_VADDR`~`MODULES_END`는 커널 모듈 공간, `VMALLOC_START`~`VMALLOC_END`는 `vmalloc()`/`ioremap()` 공간, `VMEMMAP_START`~`VMEMMAP_END`는 `struct page` 배열용 vmemmap 공간입니다. `KERNEL_LINK_ADDR`은 Kernel link와 BPF의 시작 주소입니다. |
| va_kernel_pa_offset | 커널 가상 mapping과 물리 mapping 사이의 오프셋이며 가상 주소를 물리 주소로 변환합니다. |
ELF note의 역할
vmcoreinfo.rst:1-46덤프 분석 도구가 커널 메모리 배치를 재구성하는 데 VMCOREINFO가 필요한 이유를 설명합니다.