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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 6 May 2020 18:15:22 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org, rostedt@...dmis.org,
        mhiramat@...nel.org, bristot@...hat.com, jbaron@...mai.com,
        torvalds@...ux-foundation.org, tglx@...utronix.de,
        mingo@...nel.org, namit@...are.com, hpa@...or.com, luto@...nel.org,
        ard.biesheuvel@...aro.org, pbonzini@...hat.com,
        mathieu.desnoyers@...icios.com
Subject: Re: [PATCH v4 07/18] static_call: Add inline static call
 infrastructure

On Tue, May 05, 2020 at 05:10:51PM -0500, Josh Poimboeuf wrote:
> On Fri, May 01, 2020 at 10:28:56PM +0200, Peter Zijlstra wrote:
> > +#ifdef CONFIG_HAVE_STATIC_CALL_INLINE
> > +
> > +struct static_call_mod {
> > +	struct static_call_mod *next;
> > +	struct module *mod; /* for vmlinux, mod == NULL */
> > +	struct static_call_site *sites;
> > +};
> > +
> > +struct static_call_key {
> > +	void *func;
> > +	struct static_call_mod *next;
> > +};
> 
> "next" implies it links to another key.  How about "mods" or
> "site_mods"?
> 
> > +++ b/include/linux/static_call_types.h
> > @@ -2,14 +2,27 @@
> >  #ifndef _STATIC_CALL_TYPES_H
> >  #define _STATIC_CALL_TYPES_H
> >  
> > +#include <linux/types.h>
> >  #include <linux/stringify.h>
> >  
> >  #define STATIC_CALL_PREFIX		__SC__
> > +#define STATIC_CALL_PREFIX_STR		__stringify(STATIC_CALL_PREFIX)
> > +#define STATIC_CALL_PREFIX_LEN		(sizeof(STATIC_CALL_PREFIX_STR) - 1)
> 
> STATIC_CALL_KEY_PREFIX_STR
> STATIC_CALL_KEY_PREFIX_LEN
> 

> > +#ifdef CONFIG_MODULES
> > +		if (site_mod->mod) {
> > +			stop = site_mod->mod->static_call_sites +
> > +			       site_mod->mod->num_static_call_sites;
> > +		}
> > +#endif
> 
> Instead of defining 'mod' in the inner loop below, it can be set at the
> top of the outer loop above.  Then the above 'stop' calculation can
> be a little less verbose.

All done!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ