Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bad tag messages while running liunx binaries and native NetBSD binaries too



On Thu, Aug 02, 2012 at 10:19:58AM +0000, Christos Zoulas wrote:
> In article <20120802054230.GD2465%arresum.veego.de@localhost>,
> Bernd Ernesti  <current-users%NetBSD.org@localhost> wrote:
> >Hi,
> >
> >I just tried to install the java 6 package and got the following
> >messages on 6.0_BETA2 / i386 with the suse 12.1 emul set:
> >
> >./install.sfx.14812: bad tag 1: [8 4, 0 4, 01.0  PaX]
> >jre1.6.0_33/bin/unpack200: bad tag 1: [8 4, 0 4, 01.0  PaX]
> >jre1.6.0_33/bin/unpack200: bad tag 1: [8 4, 0 4, 01.0  PaX]
> >jre1.6.0_33/bin/unpack200: bad tag 1: [8 4, 0 4, 01.0  PaX]
> >jre1.6.0_33/bin/unpack200: bad tag 1: [8 4, 0 4, 01.0  PaX]
> >jre1.6.0_33/bin/unpack200: bad tag 1: [8 4, 0 4, 01.0  PaX]
> >jre1.6.0_33/bin/unpack200: bad tag 1: [8 4, 0 4, 01.0  PaX]
> >jre1.6.0_33/bin/unpack200: bad tag 1: [8 4, 0 4, 01.0  PaX]
> >jre1.6.0_33/bin/java: bad tag 1: [8 4, 0 4, 01.0  PaX]
> >/pkgsrc/lang/sun-jre6/work.i386/jre1.6.0_33/bin/java: bad tag 1: [8 4, 0
> >4, 01.0  PaX]
> >jre1.6.0_33/bin/java: bad tag 1: [8 4, 0 4, 01.0  PaX]
> >/pkgsrc/lang/sun-jre6/work.i386/jre1.6.0_33/bin/java: bad tag 1: [8 4, 0
> >4, 01.0  PaX]
> >/usr/pkg/java/sun-6/bin/java: bad tag 1: [8 4, 0 4, 01.0  PaX]
> >/usr/pkg/java/sun-6/bin/java: bad tag 1: [8 4, 0 4, 01.0  PaX]
> >
> >The same messages appeared while installing the jdk package.
> 
> These are harmless. Can you compare the elf code with the one in current
> and see if the current code would fix this?

I assume you mean this commit:

> Module Name:    src
> Committed By:   christos
> Date:           Tue May 22 02:40:06 UTC 2012
> 
> Modified Files:
>         src/sys/kern: exec_elf.c
>         src/sys/sys: exec_elf.h
> 
> Log Message:
> - Recognize the SuSE ABI note. 
> - Restructure the code to do the checking in the appropriate note type,
> and harmonize all the checks to be positive.
> - Print only the tag data being careful not to overrun the allocated buffer.
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.38 -r1.39 src/sys/kern/exec_elf.c
> cvs rdiff -u -r1.122 -r1.123 src/sys/sys/exec_elf.h

Now I get:

/usr/pkg/java/sun-6/bin/java: Unknown elf note type 1: [namesz=8, descsz=0 
name=   01.01]

And for a native mysqld I get this when starting the rc.d script:

/usr/pkg/bin/my_print_defaults: Unknown elf note type 1: [namesz=5, descsz=0 
name= 1.00]
/usr/pkg/libexec/mysqld: Unknown elf note type 1: [namesz=5, descsz=0 name= 
1.00]

See kern/46761 for other issues with older NetBSD binaries but in my case it 
was a
binary build for the same OS version:

/usr/pkg/bin/my_print_defaults: ELF 32-bit LSB executable, Intel 80386, version 
1 (SYSV), dynamically linked (uses shared libs), for NetBSD 6.0, stripped
/usr/pkg/libexec/mysqld: ELF 32-bit LSB executable, Intel 80386, version 1 
(SYSV), dynamically linked (uses shared libs), for NetBSD 6.0, stripped

From readelf -a /usr/pkg/libexec/mysqld:

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .interp           PROGBITS        08048114 000114 000017 00   A  0   0  1
  [ 2] .note.netbsd.iden NOTE            0804812c 00012c 000018 00   A  0   0  4
  [ 3] .note.netbsd.pax  NOTE            08048144 000144 000014 00   A  0   0  4
  [ 4] .hash             HASH            08048158 000158 004f98 04   A  5   0  4
  [ 5] .dynsym           DYNSYM          0804d0f0 0050f0 00bdf0 10   A  6   1  4
  [ 6] .dynstr           STRTAB          08058ee0 010ee0 010fea 00   A  0   0  1
  [ 7] .gnu.version      VERSYM          08069eca 021eca 0017be 02   A  5   0  2
  [ 8] .gnu.version_r    VERNEED         0806b688 023688 000020 00   A  6   1  4
  [ 9] .rel.dyn          REL             0806b6a8 0236a8 0056d8 08   A  5   0  4
  [10] .rel.plt          REL             08070d80 028d80 0007f0 08   A  5  12  4
  [11] .init             PROGBITS        08071570 029570 00000a 00  AX  0   0 16
  [12] .plt              PROGBITS        0807157c 02957c 000ff0 04  AX  0   0  4
  [13] .text             PROGBITS        08072570 02a570 49fc44 00  AX  0   0 16
  [14] .fini             PROGBITS        085121c0 4ca1c0 00000a 00  AX  0   0 16
  [15] .rodata           PROGBITS        085121e0 4ca1e0 1709e8 00   A  0   0 32
  [16] .eh_frame_hdr     PROGBITS        08682bc8 63abc8 000024 00   A  0   0  4
  [17] .eh_frame         PROGBITS        08682bec 63abec 0000e8 00   A  0   0  4
  [18] .ctors            PROGBITS        08683000 63b000 000104 00  WA  0   0  4
  [19] .dtors            PROGBITS        08683104 63b104 000008 00  WA  0   0  4
  [20] .jcr              PROGBITS        0868310c 63b10c 000004 00  WA  0   0  4
  [21] .data.rel.ro      PROGBITS        08683120 63b120 03c060 00  WA  0   0 32
  [22] .dynamic          DYNAMIC         086bf180 677180 000108 08  WA  6   0  4
  [23] .got              PROGBITS        086bf288 677288 002b74 04  WA  0   0  4
  [24] .got.plt          PROGBITS        086c1dfc 679dfc 000404 04  WA  0   0  4
  [25] .data             PROGBITS        086c2200 67a200 05fb34 00  WA  0   0 32
  [26] .bss              NOBITS          08721d40 6d9d34 014f98 00  WA  0   0 32
  [27] .comment          PROGBITS        00000000 6d9d34 000027 01  MS  0   0  1
  [28] .ident            PROGBITS        00000000 6d9d5b 000150 00      0   0  1
  [29] .note             NOTE            00000000 6d9eab 00003c 00      0   0  1
  [30] .shstrtab         STRTAB          00000000 6d9ee7 0000fe 00      0   0  1

[..]
Version needs section '.gnu.version_r' contains 1 entries:
 Addr: 0x000000000806b688  Offset: 0x023688  Link: 6 (.dynstr)
  000000: Version: 1  File: libgcc_s.so.1  Cnt: 1
  0x0010:   Name: GCC_3.0  Flags: none  Version: 2

Notes at offset 0x0000012c with length 0x00000018:
  Owner         Data size       Description
  NetBSD                0x00000004      NT_VERSION (version)

Notes at offset 0x00000144 with length 0x00000014:
  Owner         Data size       Description
  PaX           0x00000004      Unknown note type: (0x00000003)

Notes at offset 0x006d9eab with length 0x0000003c:
  Owner         Data size       Description
  1.00          0x00000000      NT_VERSION (version)
  1.02          0x00000000      NT_VERSION (version)
  01.02         0x00000000      NT_VERSION (version)

Bernd



Home | Main Index | Thread Index | Old Index