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, 13 Mar 2010 17:08:19 +0300
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Lin Ming <ming.m.lin@...el.com>,
	Peter Zijlstra <peterz@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86,perf: Unmask LVTPC only if we have APIC supported

On Sat, Mar 13, 2010 at 02:50:22PM +0100, Ingo Molnar wrote:
[ ... ]
> > > 
> > > apic_write() is really just equivalent to a spin_lock() on UP without 
> > > UP_IOAPIC set - it should do nothing. So if it does something and fails the 
> > > build, then that should be fixed - not the P4 PMU code.
> > > 
> > > 	Ingo
> > > 
> > 
> > Looking at code a bit and config deps I think the former proposal with
> > #ifdef is minimal (in amount of changes) and sufficient. perf_event.c
> > uses #ifdef CONFIG_X86_LOCAL_APIC for the very same reason.
> > 
> > The former issue with config dependencies is that we may need to compile 
> > perf_event.c without CONFIG_LOCAL_APIC support at all (and this is a case 
> > for which you've posted the config). CONFIG_LOCAL_APIC deps on X86_UP_APIC, 
> > the config has no X86_UP_APIC support and as result -- no CONFIG_LOCAL_APIC 
> > and no apic.o compiled.
> > 
> > So, as expected, no apic_write/read and friends there. We may introduce 
> > apic_write/read weak(s) but this would only mess the code more and would 
> > smell unpleasant I think :) .
> > 
> > All-in-once: unresolved external symbol here, which could be fixed either by 
> > introducing dummy symbol, or conditional compilation. I think the second is 
> > preferred if the issue is just one line code.
> > 
> > Or you mean something different and I took a wrong mind-path?
> 
> Well it's not just one line of code as (like you mentioned) perf_event.c is 
> affected as well.
> 
> Introducing a dummy (NOP) placeholder method is what we are doing in all the 
> other cases (such as spin_lock()), we dont pollute the kernel with #ifdefs.
> 
> 	Ingo
> 

ok, understood what you mean. will back with patch.

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