Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756318AbYGNQAY (ORCPT ); Mon, 14 Jul 2008 12:00:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753787AbYGNQAL (ORCPT ); Mon, 14 Jul 2008 12:00:11 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:37657 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753647AbYGNQAK (ORCPT ); Mon, 14 Jul 2008 12:00:10 -0400 Date: Mon, 14 Jul 2008 08:59:44 -0700 (PDT) From: Linus Torvalds To: Ingo Molnar cc: Linux Kernel Mailing List , Andrew Morton , Avi Kivity Subject: Re: [git pull] core, x86: make LIST_POISON less deadly In-Reply-To: <20080714151247.GA27145@elte.hu> Message-ID: References: <20080714144828.GA22666@elte.hu> <20080714151247.GA27145@elte.hu> User-Agent: Alpine 1.10 (LFD 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1367 Lines: 36 On Mon, 14 Jul 2008, Ingo Molnar wrote: > > > > Why not use something sane like 0xdead000000000000, which has the high > > bit set but very fundamentally isn't a valid pointer, and never will > > be? And which is a *lot* more visually obvious too! > > initially i suggested that too - but such addresses raise a #GP instead > of a page fault so their decoding is a bit harder. But raising a GP is exactly what you want: a PF is an indication that the address was actually half-way valid, and will not fault at all on some (possibly future) machine. > We dont do any instruction decoding in #GP handlers to figure out what > happened, while in the pagefault case we know which address faulted, > etc. Why would we care? It would be very obvious from the instruction disassembly plus the register contents. No need to decode instructions. > Perhaps we could try to make #GP handlers a bit more informative - > although decoding instructions will make things a bit more fragile > inevitably. > > Perhaps make it 0xffffcdead0000000 ? I'm really not seeing the reason for not just doing it right. Linus -- 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/