Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754274Ab0AENt7 (ORCPT ); Tue, 5 Jan 2010 08:49:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754199Ab0AENt6 (ORCPT ); Tue, 5 Jan 2010 08:49:58 -0500 Received: from casper.infradead.org ([85.118.1.10]:34802 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754126Ab0AENt5 (ORCPT ); Tue, 5 Jan 2010 08:49:57 -0500 Date: Tue, 5 Jan 2010 05:52:24 -0800 From: Arjan van de Ven To: Arnd Bergmann Cc: Heiko Carstens , Ingo Molnar , David Miller , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: strict copy_from_user checks issues? Message-ID: <20100105055224.39f9efff@infradead.org> In-Reply-To: <201001051445.26149.arnd@arndb.de> References: <20100104154345.GA5671@osiris.boeblingen.de.ibm.com> <20100105094857.GB5480@osiris.boeblingen.de.ibm.com> <20100105053443.4a43fc18@infradead.org> <201001051445.26149.arnd@arndb.de> Organization: Intel X-Mailer: Claws Mail 3.7.3 (GTK+ 2.16.6; i586-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1071 Lines: 27 On Tue, 5 Jan 2010 14:45:25 +0100 Arnd Bergmann wrote: > > I think it will get inlined on 32 bit machines or without > CONFIG_COMPAT, but not when CONFIG_COMPAT is enabled, because then > there are two call-sites. one of them is buggy it seems; it passes in a shorter length, but there is no code in sight that makes sure that the end of the structure (the difference between the shorter and full length one) gets initialized to, say, zeros rather than stack garbage. So looks like there is at least a bug there. Would be nice if the copy (+ clear) would be pulled to the two callers I suspect... at which point the warning will go away too as a side effect. -- Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org -- 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/