Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758640AbYG1PyS (ORCPT ); Mon, 28 Jul 2008 11:54:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754762AbYG1PyB (ORCPT ); Mon, 28 Jul 2008 11:54:01 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:53858 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754759AbYG1Px7 (ORCPT ); Mon, 28 Jul 2008 11:53:59 -0400 Date: Mon, 28 Jul 2008 08:50:12 -0700 (PDT) From: Linus Torvalds To: Vitaly Mayatskikh cc: linux-kernel@vger.kernel.org, Andi Kleen , Ingo Molnar Subject: Re: [PATCH] x86: Set clear flag in copy_from_user/copy_to_user In-Reply-To: Message-ID: References: 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: 586 Lines: 16 On Mon, 28 Jul 2008, Vitaly Mayatskikh wrote: > > Only copy_to_user should clear the rest of uncopied area. Copy *from* user should clear the kernel result buffer tail. Copying *to* user should do no such thing, and cannot do it anyway, since if we get a fault, it's going to be in that tail that caused a fault to begin with. 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/