@@ -189,50 +189,123 @@ from this.
189189Free areas descriptor. User-space tools use this value to iterate the
190190free_area ranges. MAX_ORDER is used by the zone buddy allocator.
191191
192- log_first_idx
192+ prb
193+ ---
194+
195+ A pointer to the printk ringbuffer (struct printk_ringbuffer). This
196+ may be pointing to the static boot ringbuffer or the dynamically
197+ allocated ringbuffer, depending on when the the core dump occurred.
198+ Used by user-space tools to read the active kernel log buffer.
199+
200+ printk_rb_static
201+ ----------------
202+
203+ A pointer to the static boot printk ringbuffer. If @prb has a
204+ different value, this is useful for viewing the initial boot messages,
205+ which may have been overwritten in the dynamically allocated
206+ ringbuffer.
207+
208+ clear_seq
209+ ---------
210+
211+ The sequence number of the printk() record after the last clear
212+ command. It indicates the first record after the last
213+ SYSLOG_ACTION_CLEAR, like issued by 'dmesg -c'. Used by user-space
214+ tools to dump a subset of the dmesg log.
215+
216+ printk_ringbuffer
217+ -----------------
218+
219+ The size of a printk_ringbuffer structure. This structure contains all
220+ information required for accessing the various components of the
221+ kernel log buffer.
222+
223+ (printk_ringbuffer, desc_ring|text_data_ring|dict_data_ring|fail)
224+ -----------------------------------------------------------------
225+
226+ Offsets for the various components of the printk ringbuffer. Used by
227+ user-space tools to view the kernel log buffer without requiring the
228+ declaration of the structure.
229+
230+ prb_desc_ring
193231-------------
194232
195- Index of the first record stored in the buffer log_buf. Used by
196- user-space tools to read the strings in the log_buf .
233+ The size of the prb_desc_ring structure. This structure contains
234+ information about the set of record descriptors .
197235
198- log_buf
199- -------
236+ (prb_desc_ring, count_bits|descs|head_id|tail_id)
237+ -------------------------------------------------
238+
239+ Offsets for the fields describing the set of record descriptors. Used
240+ by user-space tools to be able to traverse the descriptors without
241+ requiring the declaration of the structure.
242+
243+ prb_desc
244+ --------
245+
246+ The size of the prb_desc structure. This structure contains
247+ information about a single record descriptor.
248+
249+ (prb_desc, info|state_var|text_blk_lpos|dict_blk_lpos)
250+ ------------------------------------------------------
251+
252+ Offsets for the fields describing a record descriptors. Used by
253+ user-space tools to be able to read descriptors without requiring
254+ the declaration of the structure.
255+
256+ prb_data_blk_lpos
257+ -----------------
258+
259+ The size of the prb_data_blk_lpos structure. This structure contains
260+ information about where the text or dictionary data (data block) is
261+ located within the respective data ring.
262+
263+ (prb_data_blk_lpos, begin|next)
264+ -------------------------------
200265
201- Console output is written to the ring buffer log_buf at index
202- log_first_idx. Used to get the kernel log.
266+ Offsets for the fields describing the location of a data block. Used
267+ by user-space tools to be able to locate data blocks without
268+ requiring the declaration of the structure.
203269
204- log_buf_len
270+ printk_info
205271-----------
206272
207- log_buf's length.
273+ The size of the printk_info structure. This structure contains all
274+ the meta-data for a record.
208275
209- clear_idx
210- ---------
276+ (printk_info, seq|ts_nsec|text_len|dict_len|caller_id)
277+ ------------------------------------------------------
211278
212- The index that the next printk() record to read after the last clear
213- command. It indicates the first record after the last SYSLOG_ACTION
214- _CLEAR, like issued by 'dmesg -c'. Used by user-space tools to dump
215- the dmesg log.
279+ Offsets for the fields providing the meta-data for a record. Used by
280+ user-space tools to be able to read the information without requiring
281+ the declaration of the structure.
216282
217- log_next_idx
218- ------------
283+ prb_data_ring
284+ -------------
219285
220- The index of the next record to store in the buffer log_buf. Used to
221- compute the index of the current buffer position .
286+ The size of the prb_data_ring structure. This structure contains
287+ information about a set of data blocks .
222288
223- printk_log
224- ----------
289+ (prb_data_ring, size_bits|data|head_lpos|tail_lpos)
290+ ---------------------------------------------------
225291
226- The size of a structure printk_log. Used to compute the size of
227- messages, and extract dmesg log. It encapsulates header information for
228- log_buf, such as timestamp, syslog level, etc .
292+ Offsets for the fields describing a set of data blocks. Used by
293+ user-space tools to be able to access the data blocks without
294+ requiring the declaration of the structure .
229295
230- (printk_log, ts_nsec|len|text_len|dict_len)
231- -------------------------------------------
296+ atomic_long_t
297+ -------------
298+
299+ The size of the atomic_long_t structure. Used by user-space tools to
300+ be able to copy the full structure, regardless of its
301+ architecture-specific implementation.
302+
303+ (atomic_long_t, counter)
304+ ------------------------
232305
233- It represents field offsets in struct printk_log. User space tools
234- parse it and check whether the values of printk_log's members have been
235- changed .
306+ Offset for the long value of an atomic_long_t variable. Used by
307+ user-space tools to access the long value without requiring the
308+ architecture-specific declaration .
236309
237310(free_area.free_list, MIGRATE_TYPES)
238311------------------------------------
0 commit comments