Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752137AbaJPP5y (ORCPT ); Thu, 16 Oct 2014 11:57:54 -0400 Received: from mail.skyhub.de ([78.46.96.112]:40199 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751231AbaJPP5w (ORCPT ); Thu, 16 Oct 2014 11:57:52 -0400 Date: Thu, 16 Oct 2014 17:57:56 +0200 From: Borislav Petkov To: Peter Zijlstra Cc: Andy Lutomirski , Valdis Kletnieks , "linux-kernel@vger.kernel.org" , Paul Mackerras , Arnaldo Carvalho de Melo , Ingo Molnar , Kees Cook , Andrea Arcangeli , Erik Bosman Subject: Re: [RFC 5/5] x86,perf: Only allow rdpmc if a perf_event is mapped Message-ID: <20141016155756.GE30314@nazgul.tnic> References: <20141016084227.GI7369@worktop.fdxtended.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20141016084227.GI7369@worktop.fdxtended.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 16, 2014 at 10:42:27AM +0200, Peter Zijlstra wrote: > gawd I hate the static_key API. Yahaa, I like to twist my brain for fun just by staring at sched_clock_stable() logic. Oh, and it needs fixing btw because if you look at the asm that comes out, after the jump labels have run, you get an unconditional jump to the likely code doing RDTSC. This should be avoided and we should have the likely code be laid out first with the NOP and have the jump labels patch in the unconditional JMP only on the small amount of systems where we're unlikely to be using the TSC... For that we'd need to pound on jump labels a bit more though. -- Regards/Gruss, Boris. -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/