Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758865Ab1FALyZ (ORCPT ); Wed, 1 Jun 2011 07:54:25 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:63426 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758827Ab1FALyX convert rfc822-to-8bit (ORCPT ); Wed, 1 Jun 2011 07:54:23 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=KDDsAqN7rc/tA+ZJx1c2WJzEXeAduYmGoKzVi8CnHL/6V5YkbWGCKaOimq+NDC4R05 r5sY8i90q+YD5IUJhOd7IOXBwr6W3prY5LHCUVXS/1QvdUlgyT8NIgcIEOEB3AgYuCka DQZ4KJROD8pPGq3IFR5vdwee33vUTimzNHH7E= MIME-Version: 1.0 In-Reply-To: <06958cd58d0de8b0c674c9b3fa37f9a297ee90f2.1306847455.git.luto@mit.edu> References: <06958cd58d0de8b0c674c9b3fa37f9a297ee90f2.1306847455.git.luto@mit.edu> Date: Wed, 1 Jun 2011 07:54:22 -0400 Message-ID: Subject: Re: [PATCH v3 08/10] x86-64: Emulate legacy vsyscalls From: Brian Gerst To: Andy Lutomirski Cc: Ingo Molnar , x86@kernel.org, Thomas Gleixner , linux-kernel@vger.kernel.org, Jesper Juhl , Borislav Petkov , Linus Torvalds , Andrew Morton , Arjan van de Ven , Jan Beulich , richard -rw- weinberger , Mikael Pettersson , Andi Kleen Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 973 Lines: 22 On Tue, May 31, 2011 at 9:16 AM, Andy Lutomirski wrote: > There's a fair amount of code in the vsyscall page.  It contains a > syscall instruction (in the gettimeofday fallback) and who knows > what will happen if an exploit jumps into the middle of some other > code. > > Reduce the risk by replacing the vsyscalls with short magic > incantations that cause the kernel to emulate the real vsyscalls. > These incantations are useless if entered in the middle. How about remapping the vsyscall page into a random page in the modules area, and make the fixed page simply have stubs that jump to the code in that page. That would solve the fixed address syscall problem without any more overhead. -- Brian Gerst -- 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/