Re: Patch for proc w/ no supplementary groups

From: Paul H. Hargrove (PHHargrove_at_lbl_dot_gov)
Date: Wed Aug 13 2008 - 10:38:32 PDT

  • Next message: MSNBC Breaking News: "msnbc.com - BREAKING NEWS: NAACP Protests Hurricane Names"
    As the manpage says, POSIX and other standards don't specify whether the 
    "base" group is part of the list returned by getgroups().  IIRC, 
    getgroups() under Linux returns exactly the list set by setgroups(), so 
    the difference comes down to user-space tools, like login and/or PAM, 
    that setup your session.  So, this is probably a distro-specific 
    difference between the i386 and ARM platforms, not a kernel difference.
    
    -Paul
    
    mukti jain wrote:
    > I checked on i386 and arm,
    > getgroups  when run by a user(included  in one group only) returns  
    > zero supplementary groups on arm and 1 on i386.
    > in the manpage of getgroups it is said that
    > "It is unspecified whether the effective group ID of the calling 
    > process is included in the returned list."
    >
    > Can someone throw more light on this?
    >
    > On Wed, Aug 13, 2008 at 2:27 PM, mukti jain <muktijn_at_gmail_dot_com 
    > <mailto:muktijn_at_gmail_dot_com>> wrote:
    >
    >     We have not seen the issue on x86 with the same application,
    >     why is this problem arm specific?
    >
    >
    >         On Tue, Aug 12, 2008 at 12:04 AM, Paul H. Hargrove
    >         <PHHargrove_at_lbl_dot_gov <mailto:PHHargrove_at_lbl_dot_gov>> wrote:
    >
    >             It seems the ENOMEM problem reported by Manish Dwivedi
    >             recently is due to having zero supplementary group ids.
    >              When BLCR goes to save the group ids, this results in
    >             vmalloc(0) which rightly returns NULL.  BLCR, however,
    >             interprets the NULL return as an out of memory condition.
    >              Mukti Jain has observed that the same exists on the
    >             corresponding restore path.
    >
    >             Attached is a patch that should resolve these problems
    >             (works in my limited testing).
    >
    >             I had planned to release 0.7.3 today, but will probably
    >             delay that until I've gotten confirmation from Manish
    >             and/or Mukti that this patch solves the problem, or until
    >             somebody finds a problem with this patch.
    >
    >             -Paul
    >
    >             -- 
    >             Paul H. Hargrove                        
    >              PHHargrove_at_lbl_dot_gov <mailto:PHHargrove_at_lbl_dot_gov>
    >             Future Technologies Group
    >             HPC Research Department                   Tel: +1-510-495-2352
    >             Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900
    >
    >             [snip... patch removed]
    >
    >
    
    
    -- 
    Paul H. Hargrove                          PHHargrove_at_lbl_dot_gov
    Future Technologies Group                 
    HPC Research Department                   Tel: +1-510-495-2352
    Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900
    

  • Next message: MSNBC Breaking News: "msnbc.com - BREAKING NEWS: NAACP Protests Hurricane Names"