Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Oct 2009 11:57:21 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r197729 - in head/sys: amd64/amd64 arm/arm compat/ia32 i386/i386 ia64/ia64 mips/mips powerpc/powerpc sparc64/sparc64
Message-ID:  <200910031157.n93BvLhS039965@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Sat Oct  3 11:57:21 2009
New Revision: 197729
URL: http://svn.freebsd.org/changeset/base/197729

Log:
  Make sure that the primary native brandinfo always gets added
  first and the native ia32 compat as middle (before other things).
  o(ld)brandinfo as well as third party like linux, kfreebsd, etc.
  stays on SI_ORDER_ANY coming last.
  
  The reason for this is only to make sure that even in case we would
  overflow the MAX_BRANDS sized array, the native FreeBSD brandinfo
  would still be there and the system would be operational.
  
  Reviewed by:	kib
  MFC after:	1 month

Modified:
  head/sys/amd64/amd64/elf_machdep.c
  head/sys/arm/arm/elf_machdep.c
  head/sys/compat/ia32/ia32_sysvec.c
  head/sys/i386/i386/elf_machdep.c
  head/sys/ia64/ia64/elf_machdep.c
  head/sys/mips/mips/elf64_machdep.c
  head/sys/mips/mips/elf_machdep.c
  head/sys/powerpc/powerpc/elf_machdep.c
  head/sys/sparc64/sparc64/elf_machdep.c

Modified: head/sys/amd64/amd64/elf_machdep.c
==============================================================================
--- head/sys/amd64/amd64/elf_machdep.c	Sat Oct  3 11:02:36 2009	(r197728)
+++ head/sys/amd64/amd64/elf_machdep.c	Sat Oct  3 11:57:21 2009	(r197729)
@@ -89,7 +89,7 @@ static Elf64_Brandinfo freebsd_brand_inf
 	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
-SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY,
+SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_FIRST,
 	(sysinit_cfunc_t) elf64_insert_brand_entry,
 	&freebsd_brand_info);
 

Modified: head/sys/arm/arm/elf_machdep.c
==============================================================================
--- head/sys/arm/arm/elf_machdep.c	Sat Oct  3 11:02:36 2009	(r197728)
+++ head/sys/arm/arm/elf_machdep.c	Sat Oct  3 11:57:21 2009	(r197729)
@@ -88,7 +88,7 @@ static Elf32_Brandinfo freebsd_brand_inf
 	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
-SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY,
+SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST,
 	(sysinit_cfunc_t) elf32_insert_brand_entry,
 	&freebsd_brand_info);
 

Modified: head/sys/compat/ia32/ia32_sysvec.c
==============================================================================
--- head/sys/compat/ia32/ia32_sysvec.c	Sat Oct  3 11:02:36 2009	(r197728)
+++ head/sys/compat/ia32/ia32_sysvec.c	Sat Oct  3 11:57:21 2009	(r197729)
@@ -152,7 +152,7 @@ static Elf32_Brandinfo ia32_brand_info =
 	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
-SYSINIT(ia32, SI_SUB_EXEC, SI_ORDER_ANY,
+SYSINIT(ia32, SI_SUB_EXEC, SI_ORDER_MIDDLE,
 	(sysinit_cfunc_t) elf32_insert_brand_entry,
 	&ia32_brand_info);
 

Modified: head/sys/i386/i386/elf_machdep.c
==============================================================================
--- head/sys/i386/i386/elf_machdep.c	Sat Oct  3 11:02:36 2009	(r197728)
+++ head/sys/i386/i386/elf_machdep.c	Sat Oct  3 11:57:21 2009	(r197729)
@@ -88,7 +88,7 @@ static Elf32_Brandinfo freebsd_brand_inf
 	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
-SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY,
+SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST,
 	(sysinit_cfunc_t) elf32_insert_brand_entry,
 	&freebsd_brand_info);
 

Modified: head/sys/ia64/ia64/elf_machdep.c
==============================================================================
--- head/sys/ia64/ia64/elf_machdep.c	Sat Oct  3 11:02:36 2009	(r197728)
+++ head/sys/ia64/ia64/elf_machdep.c	Sat Oct  3 11:57:21 2009	(r197729)
@@ -95,7 +95,7 @@ static Elf64_Brandinfo freebsd_brand_inf
 	.brand_note	= &elf64_freebsd_brandnote,
 	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
-SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY,
+SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_FIRST,
     (sysinit_cfunc_t)elf64_insert_brand_entry, &freebsd_brand_info);
 
 static Elf64_Brandinfo freebsd_brand_oinfo = {

Modified: head/sys/mips/mips/elf64_machdep.c
==============================================================================
--- head/sys/mips/mips/elf64_machdep.c	Sat Oct  3 11:02:36 2009	(r197728)
+++ head/sys/mips/mips/elf64_machdep.c	Sat Oct  3 11:57:21 2009	(r197729)
@@ -108,7 +108,7 @@ static Elf64_Brandinfo freebsd_brand_inf
 	.flags		= BI_BRAND_NOTE
 };
 
-SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY,
+SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_FIRST,
     (sysinit_cfunc_t) elf64_insert_brand_entry,
     &freebsd_brand_info64);
 

Modified: head/sys/mips/mips/elf_machdep.c
==============================================================================
--- head/sys/mips/mips/elf_machdep.c	Sat Oct  3 11:02:36 2009	(r197728)
+++ head/sys/mips/mips/elf_machdep.c	Sat Oct  3 11:57:21 2009	(r197729)
@@ -90,7 +90,7 @@ static Elf32_Brandinfo freebsd_brand_inf
 	.flags		= BI_BRAND_NOTE
 };
 
-SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY,
+SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST,
     (sysinit_cfunc_t) elf32_insert_brand_entry,
     &freebsd_brand_info);
 

Modified: head/sys/powerpc/powerpc/elf_machdep.c
==============================================================================
--- head/sys/powerpc/powerpc/elf_machdep.c	Sat Oct  3 11:02:36 2009	(r197728)
+++ head/sys/powerpc/powerpc/elf_machdep.c	Sat Oct  3 11:57:21 2009	(r197729)
@@ -91,7 +91,7 @@ static Elf32_Brandinfo freebsd_brand_inf
 	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
-SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY,
+SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST,
     (sysinit_cfunc_t) elf32_insert_brand_entry,
     &freebsd_brand_info);
 

Modified: head/sys/sparc64/sparc64/elf_machdep.c
==============================================================================
--- head/sys/sparc64/sparc64/elf_machdep.c	Sat Oct  3 11:02:36 2009	(r197728)
+++ head/sys/sparc64/sparc64/elf_machdep.c	Sat Oct  3 11:57:21 2009	(r197729)
@@ -103,7 +103,7 @@ static Elf64_Brandinfo freebsd_brand_inf
 	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
-SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY,
+SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_FIRST,
     (sysinit_cfunc_t) elf64_insert_brand_entry,
     &freebsd_brand_info);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910031157.n93BvLhS039965>