Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932271AbVK1Xlw (ORCPT ); Mon, 28 Nov 2005 18:41:52 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932282AbVK1Xlw (ORCPT ); Mon, 28 Nov 2005 18:41:52 -0500 Received: from e4.ny.us.ibm.com ([32.97.182.144]:53925 "EHLO e4.ny.us.ibm.com") by vger.kernel.org with ESMTP id S932271AbVK1Xlv (ORCPT ); Mon, 28 Nov 2005 18:41:51 -0500 Subject: [BUG][PATCH] process events connector - uid_t gid_t size issues From: Matt Helsley To: Andrew Morton Cc: 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 , larva@linux.ucla.edu Content-Type: text/plain Date: Mon, 28 Nov 2005 15:35:39 -0800 Message-Id: <1133220939.25202.902.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: 1422 Lines: 49 Andrew, I noticed this follow up patch did not make it's way into -mm and subsequently to 2.6.15-rc2. The uid_t and gid_t fields appear to present a 32/64-bit userspace/kernel problem for some archs. This patch addresses the problem by fixing the size to the largest size for uid_t/gid_t used in the kernel. This preserves the total size of the event structure while ensuring that the layouts of the ID change event match in 32 and 64-bit kernels and applications. Please apply. Signed-off-by: Matt Helsley --- Index: linux-2.6.15-rc2/include/linux/cn_proc.h =================================================================== --- linux-2.6.15-rc2.orig/include/linux/cn_proc.h +++ linux-2.6.15-rc2/include/linux/cn_proc.h @@ -84,16 +84,16 @@ struct proc_event { struct id_proc_event { pid_t process_pid; pid_t process_tgid; union { - uid_t ruid; /* current->uid */ - gid_t rgid; /* current->gid */ + __u32 ruid; /* task uid */ + __u32 rgid; /* task gid */ } r; union { - uid_t euid; - gid_t egid; + __u32 euid; + __u32 egid; } e; } id; struct exit_proc_event { pid_t process_pid; - 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/