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:	Thu, 23 Oct 2014 23:47:25 +0200
From:	Alexis Berlemont <alexis.berlemont@...il.com>
To:	Michal Marek <mmarek@...e.cz>
Cc:	linux-kernel@...r.kernel.org, jolsa@...hat.com, dsahern@...il.com,
	mingo@...nel.org, sam@...nborg.org, namhyung@...nel.org
Subject: Re: [PATCH 01/15] kbuild: add support of custom paths for
 "auto.conf*" files

Michal Marek wrote:
> On 2014-09-22 23:53, Alexis Berlemont wrote:
> > In the scripts/Makefile.build, use KCONFIG_AUTOCONFIG to include a
> > custom path for the "auto.conf" file.
> > 
> > The "*conf" programs were modified so as to work with the environment
> > variable KCONFIG_AUTOCONFIG.
> > ---
> >  scripts/Makefile.build     |  3 ++-
> >  scripts/kconfig/confdata.c | 27 ++++++++++++++++++++++++++-
> >  scripts/kconfig/lkc.h      |  1 +
> >  3 files changed, 29 insertions(+), 2 deletions(-)
> > 
> > diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> > index bf3e677..ef60769 100644
> > --- a/scripts/Makefile.build
> > +++ b/scripts/Makefile.build
> > @@ -31,7 +31,8 @@ subdir-asflags-y :=
> >  subdir-ccflags-y :=
> >  
> >  # Read auto.conf if it exists, otherwise ignore
> > --include include/config/auto.conf
> > +kconfig-autoconfig := $(if $(KCONFIG_AUTOCONFIG),$(KCONFIG_AUTOCONFIG),include/config/auto.conf)
> > +-include $(kconfig-autoconfig)
> >  
> >  include scripts/Kbuild.include
> >  
> > diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
> > index f88d90f..d4d8920 100644
> > --- a/scripts/kconfig/confdata.c
> > +++ b/scripts/kconfig/confdata.c
> > @@ -75,6 +75,27 @@ const char *conf_get_autoconfig_name(void)
> >  	return name ? name : "include/config/auto.conf";
> >  }
> >  
> > +#define PATH_MAXLENGTH 4096
> > +const char *conf_get_autoconfigdep_name(void)
> > +{
> > +	static char res_value[PATH_MAXLENGTH];
> > +
> > +	char *name = getenv("KCONFIG_AUTOCONFIG");
> > +
> > +	if (name == NULL)
> > +		name = "include/config/auto.conf.cmd";
> 
> This will result in "include/config/auto.conf.cmd.cmd". Better simplify
> it to name = conf_get_autoconfig_name().
> 

Sorry for such a terrible mistake. I broke everything just to make
kconfig work for perf...

> 
> > +	if (strlen(name) > PATH_MAXLENGTH - 5)
> > +		name = NULL;
> > +	else {
> > +		res_value[0] = 0;
> 
> This assignment is superfluous.

OK.

> 
> 
> > +		strncpy(res_value, name, PATH_MAXLENGTH);
> > +		strcat(res_value, ".cmd");
> > +		name = res_value;
> 
> Michal
> 

Alexis
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ