On Tue, Sep 19, 2006 at 10:31:38PM +0200, Daniel Smolik wrote: > Package: sparc-utils > Version: 1.9-2.5 > Severity: important > > In newer kernel > 2.6.18-rc1 is changed /dev/openprom interface (may be) > and eeprom tool dies with SIGBUS. On 2.6.17 works. There is a backtrace. > NU gdb 6.4.90-debian > Copyright (C) 2006 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you are > welcome to change it and/or distribute copies of it under certain > conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "sparc-linux-gnu"...Using host libthread_db > library "/lib/libthread_db.so.1". > > (gdb) run > Starting program: /home/marvin/sparc-utils-1.9.orig/prtconf-1.3/eeprom > > Program received signal SIGBUS, Bus error. > 0x00012160 in main (argc=0, argv=<value optimized out>) at eeprom.c:661 > 661 *(int *)op->oprom_array = 0; > (gdb) bt > #0 0x00012160 in main (argc=0, argv=<value optimized out>) at eeprom.c:661 > (gdb)
Hello Daniel, I don't have access to a sparc workstation anymore. All those from debian network are currently down, therefore it is hard for me to investigate. SIGBUS is raised on non aligned access. But I don't know why it fails here. Code just above this line to set up 'op' pointer seems to be ok: char buf2[4096]; struct openpromio *op = (struct openpromio *)buf2; op is an alias to buf2. I guess buf2 is aligned on a 32-bits boundary since it is allocated on stack and is a multiple of 4 bytes. Therefore I cannot figure out what fails. Did you recompile sparc-utils package? What your asm/openpromio.h header contains about openpromio struct definition? The last I can find is from 2.6.17 kernel: struct openpromio { u_int oprom_size; /* Actual size of the oprom_array. */ char oprom_array[1]; /* Holds property names and values. */ }; Could you print out addresses of 'op' pointer and op->oprom_array field under gdb to see whether they are 32-bits aligned or not? Best regards, Eric. -- Eric Delaunay | Le travail est trop sérieux pour le confier [EMAIL PROTECTED] | à ceux qui veulent se tuer avec. Jissey.