From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935220AbYD1PYn (ORCPT ); Mon, 28 Apr 2008 11:24:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933820AbYD1PYe (ORCPT ); Mon, 28 Apr 2008 11:24:34 -0400 Received: from mx3.mail.elte.hu ([157.181.1.138]:43305 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933261AbYD1PYe (ORCPT ); Mon, 28 Apr 2008 11:24:34 -0400 Date: Mon, 28 Apr 2008 17:24:22 +0200 From: Ingo Molnar To: Hugh Dickins Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86: vget_cycles() __always_inline Message-ID: <20080428152422.GD18776@elte.hu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Hugh Dickins wrote: > Mark vget_cycles() as __always_inline, so gcc is never tempted to make > the vsyscall vread_tsc() dive into kernel text, with resulting > SIGSEGV. > > This was a self-inflicted wound: I've not seen that happen with > unhacked sources; but for debug reasons I'd changed my x86/Makefile to > compile no-unit-at-a-time, and that in conjunction with > OPTIMIZE_INLINING=y ended up with vget_cycles() in kernel text. > Perhaps it can happen in other ways: safer to use __always_inline. applied, thanks Hugh - i agree that this is worth fixing. Ingo