lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 5 Sep 2022 11:32:40 +0000
From:   "Huang, Kai" <kai.huang@...el.com>
To:     "jarkko@...nel.org" <jarkko@...nel.org>
CC:     "pmenzel@...gen.mpg.de" <pmenzel@...gen.mpg.de>,
        "linux-sgx@...r.kernel.org" <linux-sgx@...r.kernel.org>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "bp@...en8.de" <bp@...en8.de>,
        "Dhanraj, Vijay" <vijay.dhanraj@...el.com>,
        "Chatre, Reinette" <reinette.chatre@...el.com>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "x86@...nel.org" <x86@...nel.org>,
        "haitao.huang@...ux.intel.com" <haitao.huang@...ux.intel.com>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>,
        "hpa@...or.com" <hpa@...or.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] x86/sgx: Do not fail on incomplete sanitization on
 premature stop of ksgxd

On Mon, 2022-09-05 at 12:44 +0300, jarkko@...nel.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.

-- 
Thanks,
-Kai


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ