All of lore.kernel.org
 help / color / mirror / Atom feed
* [parisc-linux] ldcw in __pthread_acquire
@ 2000-12-15 10:12 John Marvin
  2000-12-15 11:37 ` Alan Modra
  0 siblings, 1 reply; 29+ messages in thread
From: John Marvin @ 2000-12-15 10:12 UTC (permalink / raw)
  To: parisc-linux


I just ran into an unaligned data reference in user land.  The problem is
that the routine __pthread_acquire (in libpthread) does a ldcw, but it is
not ensuring that the address it is operating on is 16 byte aligned (it is
operating on the address that was passed in as the first argument).  Some
processors don't require the 16 byte alignment, but many do.

I haven't looked at the source (I just found the location by disassembly),
so I don't know what the root cause is.  The actual ldcw is probably from
an inlined function or macro, e.g. spin_lock().  My first guess would be
that it is using the machine dependent spin_lock macro, but the procedure
which called __pthread_acquire is passing in a structure whose lock field
does not have the aligned(16) attribute.

I don't have time to look at this right now.  Any volunteers?

John Marvin
jsm@fc.hp.com

^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: [parisc-linux] ldcw in __pthread_acquire
@ 2000-12-15 10:26 John Marvin
  0 siblings, 0 replies; 29+ messages in thread
From: John Marvin @ 2000-12-15 10:26 UTC (permalink / raw)
  To: parisc-linux


I just realized that I forgot to mention that __pthread_acquire was called by
__pthread_alt_lock, and that it is passing a pointer that has a 4 byte offset
from whatever was passed as the first argument to __pthread_alt_lock.

John

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2000-12-18 22:23 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-15 10:12 [parisc-linux] ldcw in __pthread_acquire John Marvin
2000-12-15 11:37 ` Alan Modra
2000-12-15 16:37   ` Matthew Wilcox
2000-12-15 17:32     ` Jes Sorensen
2000-12-16 19:29       ` Matthew Wilcox
2000-12-16 21:58         ` Jes Sorensen
2000-12-17  4:31           ` Alan Modra
2000-12-17  1:22         ` Stan Sieler
2000-12-17  2:38           ` Alan Cox
2000-12-17  4:18             ` LaMont Jones
2000-12-18  0:29             ` Stan Sieler
2000-12-18  0:36               ` Alan Cox
2000-12-18  0:48                 ` Stan Sieler
2000-12-18  0:59                   ` Alan Cox
2000-12-18  4:43                     ` LaMont Jones
2000-12-18 11:53                       ` Alan Cox
2000-12-18 12:27                         ` Philippe Benard
2000-12-18 14:40                           ` LaMont Jones
2000-12-18 19:44                             ` Stan Sieler
2000-12-18 19:54                               ` Alan Cox
2000-12-18 20:15                                 ` Stan Sieler
2000-12-18 20:44                                 ` LaMont Jones
2000-12-18 21:56                                   ` Alan Cox
2000-12-18 22:26                               ` LaMont Jones
2000-12-18  7:10                 ` Philippe Benard
2000-12-18 12:06                   ` Alan Cox
2000-12-18 14:49                     ` LaMont Jones
2000-12-18 15:59                       ` Matthew Wilcox
  -- strict thread matches above, loose matches on Subject: below --
2000-12-15 10:26 John Marvin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.