On Mon, 2022-09-05 at 12:44 +0300, jarkko@kernel.org wrote:
On Mon, Sep 05, 2022 at 07:50:33AM +0000, Huang, Kai wrote:
On Sat, 2022-09-03 at 13:26 +0300, Jarkko Sakkinen wrote:
static int ksgxd(void *p) {
- unsigned long left_dirty;
set_freezable(); /* * Sanitize pages in order to recover from kexec(). The 2nd pass is * required for SECS pages, whose child pages blocked EREMOVE. */
- __sgx_sanitize_pages(&sgx_dirty_page_list);
- __sgx_sanitize_pages(&sgx_dirty_page_list);
- left_dirty = __sgx_sanitize_pages(&sgx_dirty_page_list);
- pr_debug("%ld unsanitized pages\n", left_dirty);
%lu
I assume the intention is to print out the unsanitized SECS pages, but what is the value of printing it? To me it doesn't provide any useful information, even for debug.
How do you measure "useful"?
If for some reason there were unsanitized pages, I would at least want to know where it ended on the first value.
Using pr_debug() means it's for debugging the driver, but to me it doesn't help on debugging the driver, so it is not useful.
Anyway, I will stop argue here.