Bug 163611

Summary: ia64: Unaligned accesses are made when udev starts
Product: [Fedora] Fedora Reporter: Prarit Bhargava <prarit>
Component: udevAssignee: Harald Hoyer <harald>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: notting, prarit
Target Milestone: ---   
Target Release: ---   
Hardware: ia64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-04-13 02:11:59 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 163350    

Description Prarit Bhargava 2005-07-19 10:35:32 EDT
Description of problem:

Unaligned accesses are made when udev starts on ia64.

Version-Release number of selected component (if applicable):

Fedora ia64 devel, rawhide-20050719
udev-062-2

How reproducible: 100%

Steps to Reproduce:

1. Install latest Fedora ia64 devel
2. Boot.
  
Actual results:

Starting udev:  udevstart(2050): unaligned access to 0x6000000000014d29,
ip=0x400000000000f1b1
udevstart(2050): unaligned access to 0x6000000000014b21, ip=0x400000000000bb40
udevstart(2050): unaligned access to 0x6000000000014f59, ip=0x400000000000f1b1
udevstart(2050): unaligned access to 0x6000000000014d41, ip=0x400000000000bb40
[  OK  ]

and later on when xfs and appletalk start,
Starting xfs: udev(4726): unaligned access to 0x6000000000018d29,
ip=0x400000000000f581
udev(4726): unaligned access to 0x6000000000018f5c, ip=0x400000000000f581
udev(4726): unaligned access to 0x60000000000193bd, ip=0x400000000000f581
udev(4726): unaligned access to 0x600000000001935d, ip=0x400000000000e2b1
[  OK  ]
Starting AppleTalk services: 
  Starting atalkd:udev(4839): unaligned access to 0x6000000000018d29,
ip=0x400000000000f581
udev(4839): unaligned access to 0x6000000000018f5c, ip=0x400000000000f581
udev(4839): unaligned access to 0x60000000000193bd, ip=0x400000000000f581
udev(4839): unaligned access to 0x600000000001935d, ip=0x400000000000e2b1

[  OK  ]


Expected results:

No errors should be seen.

Additional info:

If memory serves the issue is that ia64 udev needs to built with the -ftz
compile flag.
Comment 1 Harald Hoyer 2005-07-19 10:45:38 EDT
what does -ftz do?
Comment 2 Bill Nottingham 2005-07-19 13:57:44 EDT
Something to do with -force-to-zero or -flush-to-zero for the floating point
stuff, I think. Shouldn't be relelvant.

I'd suspect the patches that Kay posted to the list for it SIGBUSing on sparc
might be more relevant here.
Comment 3 Prarit Bhargava 2005-07-20 16:13:30 EDT
Whups -- the -ftz thing was a mistake.  Had a brain spasm ...

P.
Comment 4 Bill Nottingham 2005-07-20 16:19:11 EDT
Does the last patch in
http://sourceforge.net/mailarchive/forum.php?thread_id=7720331&forum_id=3157
work for you?
Comment 5 Prarit Bhargava 2005-07-26 10:17:08 EDT
Bill, 
 
The link pushes me to the general list -- not a specific set of patches.  Can 
you attach the patch here/email it to me?   
 
Thanks, 
 
P. 
Comment 6 Bill Nottingham 2005-07-26 12:26:09 EDT
See the next-to-last mail in the thread:

diff --git a/udev_rules_parse.c b/udev_rules_parse.c
 --- a/udev_rules_parse.c
 +++ b/udev_rules_parse.c
 @@ -241,6 +241,7 @@ static int add_to_rules(struct udev_rule
  	int valid;
  	char *linepos;
  	char *attr;
 +	size_t padding;
  	int retval;
  
  	/* get all the keys */
 @@ -506,6 +507,11 @@ static int add_to_rules(struct udev_rule
  
  	/* grow buffer and add rule */
  	rule_size = sizeof(struct udev_rule) + rule->bufsize;
 +	padding = (sizeof(size_t) - rule_size % sizeof(size_t)) % sizeof(size_t);
 +	dbg("add %zi padding bytes", padding);
 +	rule_size += padding;
 +	rule->bufsize += padding;
 +
  	rules->buf = realloc(rules->buf, rules->bufsize + rule_size);
  	if (!rules->buf) {
  		err("realloc failed");
 
Comment 7 Prarit Bhargava 2005-07-26 14:24:21 EDT
That looks like it fixes it ....

Thanks Bill.

P.
Comment 8 Bill Nottingham 2005-08-22 14:11:11 EDT
Did 063-x fix this for you?
Comment 9 Prarit Bhargava 2006-02-23 13:04:26 EST
This is fixed.