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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 19 May 2020 19:08:46 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Reinette Chatre <reinette.chatre@...el.com>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Borislav Petkov <bp@...en8.de>,
        Tony Luck <tony.luck@...el.com>, kuo-lang.tseng@...el.com,
        ravi.v.shankar@...el.com, Ingo Molnar <mingo@...hat.com>,
        Babu Moger <babu.moger@....com>,
        "H. Peter Anvin" <hpa@...or.com>,
        "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V5 4/4] x86/resctrl: Use appropriate API for strings
 terminated by newline

On Tue, May 19, 2020 at 07:07:10PM +0300, Andy Shevchenko wrote:
> On Tue, May 19, 2020 at 08:50:22AM -0700, Reinette Chatre wrote:
> > On 5/19/2020 1:28 AM, Andy Shevchenko wrote:
> > > On Tue, May 19, 2020 at 2:50 AM Reinette Chatre
> > > <reinette.chatre@...el.com> wrote:

...

> > > Can't we unify latter with a former like ...
> 
> > This would have been ideal if done from the start but currently "0" is
> > returned if the current mode is pseudo-locked and user attempts to
> > change the mode to pseudo-locked. Thus, to maintain the current user
> > interface the check if user wants to set pseudo-locked mode is moved
> > after the check if new mode is same as existing mode and thus not
> > unified because that will result in an error returned always when user
> > requests pseudo-locked mode.
> 
> Ah, I see now.
> 
> But we can then drop the check from sysfs_match_string() returned value, like
> 
> 	user_m = sysfs_match_string();

Yes, here some additional checks like

	if (user_m == mode)
		goto out;

> 	if (...) {
> 		...
> 	} else { // w/o even checking for the PSEUDO_LOCKED
> 		...
> 		goto out;
> 	}
> 
> Can we?

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ