Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932237AbVJ1KRa (ORCPT ); Fri, 28 Oct 2005 06:17:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932615AbVJ1KRa (ORCPT ); Fri, 28 Oct 2005 06:17:30 -0400 Received: from e32.co.us.ibm.com ([32.97.110.150]:57515 "EHLO e32.co.us.ibm.com") by vger.kernel.org with ESMTP id S932237AbVJ1KR3 (ORCPT ); Fri, 28 Oct 2005 06:17:29 -0400 Subject: Re: [PATCH] Process Events Connector From: Matt Helsley To: Arjan van de Ven Cc: Andrew Morton , LKML , Evgeniy Polyakov , Jean-Pierre Dion , Guillaume Thouvenin , Badari Pulavarty , Ram Pai , CKRM-Tech , Erich Focht , elsa-devel , Gerrit Huizenga , Adrian Bunk , "Chandra S. Seetharaman" , Jay Lan , Erik Jacobson , Jack Steiner In-Reply-To: <1130491147.2800.15.camel@laptopd505.fenrus.org> References: <1130489713.10680.685.camel@stark> <1130491147.2800.15.camel@laptopd505.fenrus.org> Content-Type: text/plain Date: Fri, 28 Oct 2005 03:03:18 -0700 Message-Id: <1130493798.10680.750.camel@stark> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1459 Lines: 51 On Fri, 2005-10-28 at 11:19 +0200, Arjan van de Ven wrote: > On Fri, 2005-10-28 at 01:55 -0700, Matt Helsley wrote: > > > +void proc_fork_connector(struct task_struct *task) > > +{ > > + struct cn_msg *msg; > > + struct proc_event *ev; > > + __u8 buffer[CN_PROC_MSG_SIZE]; > > do you really want to do this stack based? cn_netlink_send() performs an skb_alloc() and I wanted to avoid doing two allocations that might sleep. On a 32-bit machine the buffer should be around 42 bytes, making the function locals around 50 bytes. On a 64-bit machine I believe this should be around 58 bytes. Is this generally considered to be too large? These functions are called from: fork: -> do_fork -> copy_process -> proc_fork_connector -> ... -> fork_idle (this holds a struct ptregs) -> copy_process -> proc_fork_connector -> ... exec: -> do_execve -> search_binary_handler -> proc_exec_connector -> ... id: -> sys_set(r|e|s|fs)?[ug]id -> proc_id_connector -> ... exit: -> do_exit -> proc_exit_connector -> ... Where "-> ..." signifies a call to cn_netlink_send(). So they should only be a problem if a caller or cn_netlink_send() use too much stack space. Cheers, -Matt Helsley < matthltc @ us.ibm.com > - 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/