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]
Message-ID: <20210503180654.GP3844417@zorba>
Date:   Mon, 3 May 2021 11:06:54 -0700
From:   Daniel Walker <danielwa@...co.com>
To:     Christophe Leroy <christophe.leroy@...roup.eu>
Cc:     linuxppc-dev@...ts.ozlabs.org, x86@...nel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        xe-linux-external@...co.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] lib: early_string: allow early usage of some string
 functions

On Mon, May 03, 2021 at 11:01:41AM -0700, Daniel Walker wrote:
> On Sat, May 01, 2021 at 09:31:47AM +0200, Christophe Leroy wrote:
> > 
> > > In fact, should be like in prom_init today:
> > > 
> > > #ifdef __EARLY_STRING_ENABLED
> > >      if (dsize >= count)
> > >          return count;
> > > #else
> > >      BUG_ON(dsize >= count);
> > > #endif
> > 
> > Thinking about it once more, this BUG_ON() is overkill and should be
> > avoided, see https://www.kernel.org/doc/html/latest/process/deprecated.html
> > 
> > Therefore, something like the following would make it:
> > 
> > 	if (dsize >= count) {
> > 		WARN_ON(!__is_defined(__EARLY_STRING_ENABLED));
> > 
> > 		return count;
> > 	}
> 
> I agree, it's overkill it stop the system for this condition.
> 
> how about I do something more like this for my changes,
> 
> 
> > 	if (WARN_ON(dsize >= count && !__is_defined(__EARLY_STRING_ENABLED)))
> > 		return count;

I'll have to work on this one..

Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ