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] [day] [month] [year] [list]
Message-Id: <5478BA97020000780004B83E@mail.emea.novell.com>
Date:	Fri, 28 Nov 2014 17:10:31 +0000
From:	"Jan Beulich" <JBeulich@...e.com>
To:	"Ingo Molnar" <mingo@...nel.org>
Cc:	"Peter Zijlstra" <a.p.zijlstra@...llo.nl>,
	"Steven Rostedt" <rostedt@...dmis.org>,
	<akpm@...ux-foundation.org>, <mingo@...hat.com>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] irqflags: fix (at least latent) code generation
 issue

>>> On 10.11.14 at 13:13, <mingo@...nel.org> wrote:
> * Jan Beulich <JBeulich@...e.com> wrote:
>> @@ -131,7 +131,7 @@
>>  	} while (0)
>>  
>>  
>> -#else /* !CONFIG_TRACE_IRQFLAGS_SUPPORT */
>> +#else /* !CONFIG_TRACE_IRQFLAGS */
>>  
>>  #define local_irq_enable()	do { raw_local_irq_enable(); } while (0)
>>  #define local_irq_disable()	do { raw_local_irq_disable(); } while (0)
>> @@ -145,6 +145,6 @@
>>  #define irqs_disabled_flags(flags) (raw_irqs_disabled_flags(flags))
>>  #define safe_halt()		do { raw_safe_halt(); } while (0)
>>  
>> -#endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */
>> +#endif /* CONFIG_TRACE_IRQFLAGS */
> 
> So this breaks a couple of non-x86 architectures, such as MIPS:
> 
> /home/mingo/tip/include/acpi/platform/aclinuxex.h: In function 
> 'acpi_os_allocate':
> /home/mingo/tip/include/acpi/platform/aclinuxex.h:86: error: implicit 
> declaration of function 'arch_irqs_disabled'

Now that I finally found time to look into this a little, I wonder what
you expect: Code in linux/irqflags.h ahead of the above conditional
uses arch_irqs_disable():

#define raw_irqs_disabled()		(arch_irqs_disabled())

so it would seem to me that architectures are required to have the
latter available. And in fact it would seem very logical to me if pieces
like the definition of irqs_disabled() would be pulled out of that
conditional, as their behavior shouldn't (for this one) or already
doesn't (for e.g. irqs_disabled_flags() and local_save_flags()) differ
between the two cases. Would, short of adding arch_irqs_disabled()
for all architectures currently lacking it, uniformly using the definition
from the #if portion of the conditional be an acceptable thing? If not,
do you have any other suggestion on how to resolve this?

Jan

--
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