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
| ||
|
Date: Fri, 08 Jun 2012 20:52:17 +0200 From: Peter Zijlstra <peterz@...radead.org> To: Borislav Petkov <borislav.petkov@....com> Cc: Ingo Molnar <mingo@...nel.org>, Stephane Eranian <eranian@...gle.com>, linux-kernel@...r.kernel.org, andi@...stfloor.org, mingo@...e.hu, ming.m.lin@...el.com, Andreas Herrmann <andreas.herrmann3@....com>, Dimitri Sivanich <sivanich@....com>, Dmitry Adamushko <dmitry.adamushko@...il.com> Subject: Re: [PATCH] perf/x86: check ucode before disabling PEBS on SandyBridge On Fri, 2012-06-08 at 20:05 +0200, Borislav Petkov wrote: > How about this: since the ucode cannot be downgraded and since higher > ucode versions are supposed to fix current and older problems (otherwise > ucoders will get an earlfull) you shouldn't be needing to verify the > ucode version on all CPUs per-CPU, i.e. the O(n^2) overhead. > > Rather, simply track which CPUs _haven't_ been updated yet, and once > this is the empty set, run the verify thing to check ucode version on > all CPUs. > > And this should happen only when we update ucode from version A to > version B, where B > A. > > And unless I'm missing something, this should be O(n) and ucode update > should happen very seldomly anyway. Checking a bitmap of n bits for being all zero is O(n), so the total is still O(n^2). Still, probably faster than the for_each_online_cpu() scan I do now. -- 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