Re: [PATCH 3/3] binfmt_elf_fdpic: Wire up AT_EXECFD, AT_EXECFN, AT_SECURE.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Paul Mundt <lethal@...>
Cc: <dhowells@...>, <linux-sh@...>, <linux-kernel@...>
Date: Monday, August 11, 2008 - 5:18 pm

On Wed, 6 Aug 2008 19:36:15 +0900
Paul Mundt <lethal@linux-sh.org> wrote:


The patches ran afoul of the credentials changes in linux-next.

#1 and #2 applied OK, but #3 tossed the below reject.  Please check
that my (fairly obvious) fixups are OK.

***************
*** 562,572 ****
  	}
  
  	/* force 16 byte _final_ alignment here for generality */
- #define DLINFO_ITEMS 13
  
  	nitems = 1 + DLINFO_ITEMS + (k_platform ? 1 : 0) + \
  		(k_base_platform ? 1 : 0) + AT_VECTOR_SIZE_ARCH;
  
  	csp = sp;
  	sp -= nitems * 2 * sizeof(unsigned long);
  	sp -= (bprm->envc + 1) * sizeof(char *);	/* envv[] */
--- 563,576 ----
  	}
  
  	/* force 16 byte _final_ alignment here for generality */
+ #define DLINFO_ITEMS 15
  
  	nitems = 1 + DLINFO_ITEMS + (k_platform ? 1 : 0) + \
  		(k_base_platform ? 1 : 0) + AT_VECTOR_SIZE_ARCH;
  
+ 	if (bprm->interp_flags & BINPRM_FLAGS_EXECFD)
+ 		nitems++;
+ 
  	csp = sp;
  	sp -= nitems * 2 * sizeof(unsigned long);
  	sp -= (bprm->envc + 1) * sizeof(char *);	/* envv[] */
***************
*** 618,623 ****
  	NEW_AUX_ENT(AT_EUID,	(elf_addr_t) current->euid);
  	NEW_AUX_ENT(AT_GID,	(elf_addr_t) current->gid);
  	NEW_AUX_ENT(AT_EGID,	(elf_addr_t) current->egid);
  
  #ifdef ARCH_DLINFO
  	nr = 0;
--- 628,635 ----
  	NEW_AUX_ENT(AT_EUID,	(elf_addr_t) current->euid);
  	NEW_AUX_ENT(AT_GID,	(elf_addr_t) current->gid);
  	NEW_AUX_ENT(AT_EGID,	(elf_addr_t) current->egid);
+ 	NEW_AUX_ENT(AT_SECURE,	security_bprm_secureexec(bprm));
+ 	NEW_AUX_ENT(AT_EXECFN,	bprm->exec);
  
  #ifdef ARCH_DLINFO
  	nr = 0;

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/3] binfmt_elf_fdpic: auxvec updates, v2., Paul Mundt, (Wed Aug 6, 6:34 am)
Re: [PATCH 3/3] binfmt_elf_fdpic: Wire up AT_EXECFD, AT_EXEC..., Andrew Morton, (Mon Aug 11, 5:18 pm)