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:	Sat, 25 Oct 2008 10:24:11 +0200 (CEST)
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Steven Rostedt <rostedt@...dmis.org>
cc:	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...e.hu>,
	Alexey Dobriyan <adobriyan@...il.com>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Richard Henderson <rth@...ddle.net>,
	Greg Ungerer <gerg@...inux.org>,
	Linux/m68k <linux-m68k@...r.kernel.org>,
	linux-next@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] ftrace: handle archs that do not support irqs_disabled_flags

On Fri, 24 Oct 2008, Steven Rostedt wrote:
> Some architectures do not support a way to read the irq flags that
> is set from "local_irq_save(flags)" to determine if interrupts were
> disabled or enabled. Ftrace uses this information to display to the user
> if the trace occurred with interrupts enabled or disabled.

Both alpha

	#define irqs_disabled() (getipl() == IPL_MAX)

and m68k

	static inline int irqs_disabled(void)
	{
		unsigned long flags;
		local_save_flags(flags);
		return flags & ~ALLOWINT;
	}

do have irqs_disabled(), but they don't have irqs_disabled_flags().

M68knommu has both, but they don't check the same thing:

	#define irqs_disabled()                 \
	({                                      \
		unsigned long flags;            \
		local_save_flags(flags);        \
		((flags & 0x0700) == 0x0700);   \
	})

	static inline int irqs_disabled_flags(unsigned long flags)
	{
		if (flags & 0x0700)
			return 0;
		else
			return 1;
	}

Is there a semantic difference between them (except that the latter takes the
flags as a parameter)?

Or can we just extract the core logic of irqs_disabled() into
irqs_disabled_flags()?

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
--
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