Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932390AbWHaRig (ORCPT ); Thu, 31 Aug 2006 13:38:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932397AbWHaRig (ORCPT ); Thu, 31 Aug 2006 13:38:36 -0400 Received: from moutng.kundenserver.de ([212.227.126.183]:8908 "EHLO moutng.kundenserver.de") by vger.kernel.org with ESMTP id S932390AbWHaRif (ORCPT ); Thu, 31 Aug 2006 13:38:35 -0400 From: Bodo Eggert <7eggert@elstempel.de> Subject: Re: [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit (ping) To: Andi Kleen , "H. Peter Anvin" , Alon Bar-Lev , Matt Domsch , Andrew Morton , linux-kernel@vger.kernel.org, johninsd@san.rr.com Reply-To: 7eggert@gmx.de Date: Thu, 31 Aug 2006 19:32:24 +0200 References: <6OyEf-3Zm-5@gated-at.bofh.it> <6PCwg-3mz-43@gated-at.bofh.it> <6PDBU-5Qb-25@gated-at.bofh.it> <6PDBU-5Qb-23@gated-at.bofh.it> User-Agent: KNode/0.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8Bit X-Troll: Tanz Message-Id: X-be10.7eggert.dyndns.org-MailScanner-Information: See www.mailscanner.info for information X-be10.7eggert.dyndns.org-MailScanner: Found to be clean X-be10.7eggert.dyndns.org-MailScanner-From: 7eggert@elstempel.de X-Provags-ID: kundenserver.de abuse@kundenserver.de login:9b3b2cc444a07783f194c895a09f1de9 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1292 Lines: 27 Andi Kleen wrote: > On Wednesday 30 August 2006 20:59, H. Peter Anvin wrote: >> Alon Bar-Lev wrote: >> > This is not entirely true... >> > All architectures sets saved_command_line variable... >> > So I can add __init to the saved_command_line and >> > copy its contents into kmalloced persistence_command_line at >> > main.c. >> > >> >> My opinion is that you should change saved_command_line (which already >> implies a copy) to be the kmalloc'd version and call the fixed-sized >> buffer something else. > > It might be safer to rename everything. Then all users could be caught > and audited. This would ensure saved_command_line is not accessed > before the kmalloc'ed copy exists. If you set the new *saved_cmdline=saved_cmdline_init, the users don't need to be adjusted at all, and you won't have trouble with code that may be run before or after kmallocking (if it exists). -- Ich danke GMX daf?r, die Verwendung meiner Adressen mittels per SPF verbreiteten L?gen zu sabotieren. http://david.woodhou.se/why-not-spf.html - 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/