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:	Tue, 17 May 2011 15:13:26 -0400
From:	Valdis.Kletnieks@...edu
To:	Jean-Christophe PLAGNIOL-VILLARD <plagnioj@...osoft.com>
Cc:	Arnaud Lacombe <lacombar@...il.com>, Michal Marek <mmarek@...e.cz>,
	linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org,
	x86@...nel.org, Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH v2] kconfig: autogenerated config_is_xxx macro

On Tue, 17 May 2011 03:03:29 +0200, Jean-Christophe PLAGNIOL-VILLARD said:
> On 15:38 Mon 16 May     , Arnaud Lacombe wrote:
> > On Mon, May 16, 2011 at 3:03 PM,  <Valdis.Kletnieks@...edu> wrote:
> > > #if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP)
> > >        if (!pinned && get_sysctl_timer_migration() && idle_cpu(cpu))
> > >                cpu = get_nohz_timer_target();
> > > #endif
> > >        new_base = per_cpu(tvec_bases, cpu);

> > I already exposed this case, but let's prove it:
> >
> > % grep CONFIG_SMP .config
> > # CONFIG_SMP is not set
> >
> > % git diff
> > diff --git a/kernel/timer.c b/kernel/timer.c
> > index fd61986..ea4a5ba 100644
> > --- a/kernel/timer.c
> > +++ b/kernel/timer.c
> > @@ -681,10 +681,8 @@ __mod_timer(struct timer_list *timer, unsigned
> > long expires,
> >
> >         cpu = smp_processor_id();
> >
> > -#if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP)
> > -       if (!pinned && get_sysctl_timer_migration() && idle_cpu(cpu))
> > +       if (0 && 0 && !pinned && get_sysctl_timer_migration() && idle_cpu(cpu))
> >                 cpu = get_nohz_timer_target();
> > -#endif
> >         new_base = per_cpu(tvec_bases, cpu);
> >
> > % gmake kernel/timer.o
> >   CHK     include/linux/version.h
> >   CHK     include/generated/utsrelease.h
> >   CALL    scripts/checksyscalls.sh
> >   CC      kernel/timer.o
> > kernel/timer.c: In function '__mod_timer':
> > kernel/timer.c:685:3: error: implicit declaration of function
> > 'get_nohz_timer_target'
> > gmake[1]: *** [kernel/timer.o] Error 1
> > gmake: *** [kernel/timer.o] Error 2

> because we do not define the inline function if the CONFIG_ is not define
> as we are supposed to do if we want to compile without ifdef everywhere

Right - the point is that since many/most cases of #ifdef CONFIG_FOO in open
code won't compile cleanly if converted to config_is_foo(), it limits the
usefulness of the feature.

Which raises another question - does this create a maintenance headache, where
people who used to just 'grep -r CONFIG_FOO' to find code they needed to fix up
now have to remember to do a *second* grep to find all callsites?


Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ