[Crash-utility] [PATCH v2] Basic support for PaX's split module layout

Mathias Krause minipli at grsecurity.net
Mon Aug 24 07:21:43 UTC 2020


Am 21.08.20 um 10:13 schrieb HAGIO KAZUHITO(萩尾 一仁):
>> [...]
>> +	if (PAX_MODULE_SPLIT()) {
>> +		fprintf(fp, "         module_module_core_rx: %ld\n",
>> +			OFFSET(module_module_core_rx));
>> +		fprintf(fp, "         module_module_core_rw: %ld\n",
>> +			OFFSET(module_module_core_rw));
>> +		fprintf(fp, "           module_core_size_rx: %ld\n",
>> +			OFFSET(module_core_size_rx));
>> +		fprintf(fp, "           module_core_size_rw: %ld\n",
>> +			OFFSET(module_core_size_rw));
>> +		fprintf(fp, "         module_module_init_rx: %ld\n",
>> +			OFFSET(module_module_init_rx));
>> +		fprintf(fp, "         module_module_init_rw: %ld\n",
>> +			OFFSET(module_module_init_rw));
>> +		fprintf(fp, "           module_init_size_rx: %ld\n",
>> +			OFFSET(module_init_size_rx));
>> +		fprintf(fp, "           module_init_size_rw: %ld\n",
>> +			OFFSET(module_init_size_rw));
>> +	} else {
>> +		fprintf(fp, "            module_module_core: %ld\n",
>> +			OFFSET(module_module_core));
>> +		fprintf(fp, "              module_core_size: %ld\n",
>> +			OFFSET(module_core_size));
>> +		fprintf(fp, "         module_core_text_size: %ld\n",
>> +			OFFSET(module_core_text_size));
>> +		fprintf(fp, "         module_init_size: %ld\n",
>> +			OFFSET(module_init_size));
>> +		fprintf(fp, "         module_init_text_size: %ld\n",
>> +			OFFSET(module_init_text_size));
>> +		fprintf(fp, "            module_module_init: %ld\n",
>> +			OFFSET(module_module_init));
>> +	}
> 
> I would prefer dumping all of the defined offsets unconditionally a little
> rather than this conditional switch, because they are kind of debugging
> information for checking if crash is working intendedly, so I think it's
> important to be able to also confirm they are "-1" certainly even if not used.
> 
> In this patch's case, obviously they will be "-1" and not used, so might not
> need to be shown, but I would not like to make a precedent for future cases.

Fair enough. Will send a v3 soon.

Thanks,
Mathias




More information about the Crash-utility mailing list