Skip to contentSkip to conversation

32-bit user suspend program on 64-bit kernel?

DISCUSSION Johannes Berg 3 participants 7 messages Mar 21, 2007

lore
Share & tools
lore
#0 lore raw

Is that configuration possible? It seems not since I can't find any compat code for the ioctl which shares pointers and structs, is there any way to make it possible?

johannes

#1 lore raw

Hi!

Quoted 1 line

Is that configuration possible? It seems not since I can't find any

Yes.

Quoted 2 lines

compat code for the ioctl which shares pointers and structs, is there any way to make it possible?

That means that either ioctl is very hw-specific, or you've found a bug.

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#2 lore raw
Quoted 5 lines · Pavel Machek
Quoted 2 lines

compat code for the ioctl which shares pointers and structs, is there any way to make it possible?

That means that either ioctl is very hw-specific, or you've found a bug.

I think I'll just have to give it a try.

johannes

#3 lore raw
Quoted 9 lines · Johannes Berg
Quoted 5 lines · Pavel Machek
Quoted 2 lines

compat code for the ioctl which shares pointers and structs, is there any way to make it possible?

That means that either ioctl is very hw-specific, or you've found a bug.

I think I'll just have to give it a try.

Unfortunately the numbers of ioctls are not portable due to my rookie mistake in the beginning (using void * in _IOW() and friends which passed with no objections).

I'm ashamed of that, but it's probably too late to fix it. :-(

Greetings,
Rafael

#4 lore raw
Quoted 5 lines · Rafael J. Wysocki

Unfortunately the numbers of ioctls are not portable due to my rookie mistake in the beginning (using void * in _IOW() and friends which passed with no objections).

I'm ashamed of that, but it's probably too late to fix it. :-(

Bugger. What would be required to fix it?

Thing is, this is going to make powerpc distro's lives difficult since part of uswsusp needs to live in the initrd which usually just contains kernel modules + normal programs, and no powerpc distro I know of ships 64-bit userspace on a 32-bit kernel since, well, it doesn't really have many advantages.

johannes

#5 lore raw
Quoted 9 lines · Johannes Berg
Quoted 5 lines · Rafael J. Wysocki

Unfortunately the numbers of ioctls are not portable due to my rookie mistake in the beginning (using void * in _IOW() and friends which passed with no objections).

I'm ashamed of that, but it's probably too late to fix it. :-(

Bugger. What would be required to fix it?

Well, the change itself wouldn't be big (three #defines or so), but it would break all of the existing setups.

Alternatively, we can add some ioctls that duplicate those with nonportable numbers and tell people to use the new ones in the future (documentation changes would be needed).

Greetings,
Rafael

#6 lore raw
Quoted 6 lines · Rafael J. Wysocki

Well, the change itself wouldn't be big (three #defines or so), but it would break all of the existing setups.

Alternatively, we can add some ioctls that duplicate those with nonportable numbers and tell people to use the new ones in the future (documentation changes would be needed).

Sounds like a plan then, no? Make them print a big warning that people actually see and put the other numbers on the feature deprecation schedule :)

I do have a 64-bit powerpc that runs 32-bit userspace exclusively, that's why I asked.

johannes