O_DIRECT on devices
I'm currently working on LVM2 and we want to use O_DIRECT to write the metadata from userspace. so I open a partition with O_DIRECT and try to read/write the data from an aligned buffer.
This works fine on Alpha & Intel but seems very unreliable on parisc for some reason. Sometimes it works, sometimes it oopses "do_page_fault() pid=2120 command='lvm' type=15 address=0x00000001" and sometimes I just get back the wrong information (at least LVM thinks its wrong I haven't check in detail just what is up with it).
I haven't tried writing yet - I'd rather not think what might happen to my disk just ATM :)
This is a C110 with 256meg of memory running 2.4.18-pa46
patrick
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 8 lines · Rodolfo Baselli
Quoted 5 lines · Patrick Caulfield
I'm currently working on LVM2 and we want to use
O_DIRECTto write the metadata
from userspace. so I open a partition withO_DIRECTand try to read/write the
data from an aligned buffer.Hmmm, so is LVM ready for HP PA-RISC Linux? WOW!
LVM2 works fine - I use it all the time on my HP and Alpha boxes. O_DIRECT is an optimisation I would like to have in there though cos it avoids a lot of buffer-cache nastiness when clustering (yes, I'm working on that too but that bit won't be GPLed)
Quoted 3 lines
By the way, I'm reading right now "The catcher in the rye" by J.D. Salinger, and as I glanced at your 2nd name I felt like I was still reading the book! :-)))
:-)
If you were a pop-art expert you might have got even more deja-vu !
http://www.postershop.com/Caulfield-Patrick/Caulfield-Patrick-After-Lunch-2405657.html
I blame my parents...
patrick
Quoted 5 lines · Patrick Caulfield
This works fine on Alpha & Intel but seems very unreliable on parisc for some reason. Sometimes it works, sometimes it oopses "
do_page_fault()pid=2120 command='lvm' type=15 address=0x00000001" and sometimes I just get back the wrong information (at least LVM thinks its wrong I haven't check in detail just what is up with it).
pid 2120 did a NULL pointer dereference ... you should be able to trace it with the IAOQ, perhaps. I'm not sure whether anyone's really played with the O_DIRECT code yet, it could well be buggy on PA. What you're seeing sounds like bogus cache behaviour.
Signature · 1 line
Revolutions do not require corporate support.
Quoted 1 line · Matthew Wilcox
What you're seeing sounds like bogus cache behaviour.
Randolph and I think most SMP bugs reported (and we seen ourselves) suggest a D-cache problem.
My theory is virtual addresses are flushed on one CPU but any data accessed through an aliases on another CPU are not flushed. And then we end up with an inconsistency.
We've been reading Documentation/cachetlb.txt and trying to understand what it says about virtually indexed caches.
The other thing is we don't hit the problems with PA8500 - only PA8700. I'm guessing the aliasing or timing is quite different betweem the two. Maybe someone else knows more?
grant
Quoted 2 lines · Grant Grundler
Randolph and I think most SMP bugs reported (and we seen ourselves) suggest a D-cache problem.
Entirely plausible. PA has bigger virtually indexed caches than anyone else, so we're more susceptible to cache aliasing bugs than anyone else. It could be a missing flush somewhere in the arch-independent code.
Quoted 3 lines
My theory is virtual addresses are flushed on one CPU but any data accessed through an aliases on another CPU are not flushed. And then we end up with an inconsistency.
it's certainly possible... i don't claim to understand exactly how this works, but my recollection is that some of the flush instructions are cpu-local whereas others are global to the system. you'd have to ask jsm about it, really.
Quoted 2 lines
We've been reading
Documentation/cachetlb.txtand trying to understand what it says about virtually indexed caches.
It seems pretty straightforward to me... am I missing something?
Quoted 3 lines
The other thing is we don't hit the problems with PA8500 - only PA8700. I'm guessing the aliasing or timing is quite different betweem the two. Maybe someone else knows more?
8700 has bigger caches than 8500 and more TLB entries, so it may be easier to hit problems.
Signature · 1 line
Revolutions do not require corporate support.
Quoted 7 lines · Matthew Wilcox
Quoted 2 lines · Grant Grundler
Randolph and I think most SMP bugs reported (and we seen ourselves) suggest a D-cache problem.
Entirely plausible. PA has bigger virtually indexed caches than anyone else, so we're more susceptible to cache aliasing bugs than anyone else. It could be a missing flush somewhere in the arch-independent code.
My machine isn't SMP but could a similar bug cause the problem to occur between the CPU and the DMA controller of the SCSI card ?
patrick
Quoted 2 lines · Patrick Caulfield
My machine isn't SMP but could a similar bug cause the problem to occur between the CPU and the DMA controller of the SCSI card ?
you're on a C110, right? that has a ccio IOC so you shouldn't have any problems, unless there's a driver bug. and the symbios driver gets a lot of testing ;-)
what we could be seeing on your machine is incoherency between user & kernel space.
Signature · 1 line
Revolutions do not require corporate support.
Quoted 7 lines · Matthew Wilcox
Quoted 2 lines · Patrick Caulfield
My machine isn't SMP but could a similar bug cause the problem to occur between the CPU and the DMA controller of the SCSI card ?
you're on a C110, right? that has a ccio IOC so you shouldn't have any problems, unless there's a driver bug. and the symbios driver gets a lot of testing ;-)
yes.
Quoted 2 lines
what we could be seeing on your machine is incoherency between user & kernel space.
ah OK. makes sense.
patrick
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [parisc-linux] HP9000/L2000 + FC60 Fiber Support
Quoted 5 lines · Matthew Wilcox
Quoted 1 line · Ant�nio Ribeiro
Fibre Channel: PCI device 103c:1028 (Hewlett-Packard Company) (rev 11).
according to the latest pci.ids, this is:
Tach TL Fibre Channel Host Adapter
http://lists.parisc-linux.org/pipermail/parisc-linux/2002-August/017288.html
grant
A message that is not in the archive (sent off-list or not yet received): 20020916163335.J10583-+pPCBgu9SkPzIGdyhVEDUDl5KyyQGfY2kSSpQ9I8OhVaa/[email protected]
Re: 2.5.34?
Quoted 2 lines · Matthew Wilcox
but 2.5.35 is out, so there's no need any more ;-)
ok, I'll try 2.5.35; Is there a changelog for acpi? (other than the kernel changelog)
S1 is working for me with 2.4.19, but even if I throttle back the cpu it eats a lot of power (and generates a lot of heat!)
I've been fooling around with S3. It looks like the big recent additions (in 2.5) are to try and set the video mode in the wakeup callback. I keep sending email to the list but I have not heard from anyone talk about the status of this code.
I want to ask "does the s3 wakeup code work for anyone?"; I suspect it does since I've read reports that S4 is working for some and it uses the same code path (for wakeup anyway).
Any suggestions how to debug this? I would hack in some code to spit messages out the uart but my hp laptop doesn't have one :-) I may try a pcmcia 16550 card and a kgdb hack...
S3 puts it to sleep fine but when I wake up it seem to be hung - no lcd, no keyboard... It's pretty hard to say how far it gets.
-brad
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
A message that is not in the archive (sent off-list or not yet received): 200209161612.g8GGCtv24883-paYRYfI9b/[email protected]
Re: 2.5.34?
Hi!
Quoted 5 lines
Quoted 1 line
but 2.5.35 is out, so there's no need any more ;-)
ok, I'll try 2.5.35; Is there a changelog for acpi? (other than the kernel changelog)
Quoted 7 lines
S1 is working for me with 2.4.19, but even if I throttle back the cpu it eats a lot of power (and generates a lot of heat!)
I've been fooling around with S3. It looks like the big recent additions (in 2.5) are to try and set the video mode in the wakeup callback. I keep sending email to the list but I have not heard from anyone talk about the status of this code.
In such case... you are not listening.
Quoted 3 lines
I want to ask "does the s3 wakeup code work for anyone?"; I suspect it does since I've read reports that S4 is working for some and it uses the same code path (for wakeup anyway).
No. S3 wakeup is completely different from S4 wakeup.
And bothworked for me in 2.5.32 IIRC.
Quoted 6 lines
Any suggestions how to debug this? I would hack in some code to spit messages out the uart but my hp laptop doesn't have one :-) I may try a pcmcia 16550 card and a kgdb hack...
S3 puts it to sleep fine but when I wake up it seem to be hung - no lcd, no keyboard... It's pretty hard to say how far it gets.
Look at acpi_wakeup.S. If your mode is in text VGA you can just write to videoram. Maybe code to do that is still there?
Pavel
Signature · 10 lines
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt, details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html. ------------------------------------------------------- This SF.NET email is sponsored by: AMD - Your access to the experts on Hammer Technology! Open Source & Linux Developers, register now for the AMD Developer Symposium. Code: EX8664 http://www.developwithamd.com/developerlab
Re: [parisc-linux] cvs [login aborted]?
In reply to a message not in the archiveQuoted 2 lines
I think someone must have changed the firewall config because I can reach port 2401 from localhost, but not from any other machine.
I don't know how that happened, but I reopened the port and anon CVS should work now.
-P
[parisc-linux] HP9000/L2000 + FC60 Fiber Support
Hi,
Can anyone let me know is this cards are supported and they can be attached to the FC60 from HP.
Bus 16, device 0, function 0:
Fibre Channel: PCI device 103c:1028 (Hewlett-Packard Company) (rev 11).
IRQ 256.
Master Capable. No bursts. Min Gnt=32.
I/O at 0x20000 [0x200ff].
I/O at 0x20100 [0x201ff].
Non-prefetchable 32 bit memory at 0xfffffffff9040000
[0xfffffffff90401ff].
Non-prefetchable 32 bit memory at 0xfffffffff9000000
[0xfffffffff901ffff].
Bus 24, device 0, function 0:
Fibre Channel: PCI device 103c:1028 (Hewlett-Packard Company) (rev 11).
IRQ 320.
Master Capable. No bursts. Min Gnt=32.
I/O at 0x30000 [0x300ff].
I/O at 0x30100 [0x301ff].
Non-prefetchable 32 bit memory at 0xfffffffff9840000
[0xfffffffff98401ff].
Non-prefetchable 32 bit memory at 0xfffffffff9800000[0xfffffffff981ffff].
Thanks.
Antonio
Re: [parisc-linux] HP9000/L2000 + FC60 Fiber Support
Quoted 1 line · António Ribeiro
Fibre Channel: PCI device 103c:1028 (Hewlett-Packard Company) (rev 11).
according to the latest pci.ids, this is:
Tach TL Fibre Channel Host Adapter
hope this helps someone determine whether or not it's supported.
Signature · 1 line
Revolutions do not require corporate support.
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: Runlevel for Sleep?
Quoted 2 lines
umounting nfs seems like good idea, and no ammount of drivers will fix that.
Can't unmount it if there are open files. I don't agree that unmounting NFS is necessarily a good idea -- I want everything to resume exactly the way it was suspended to the greatest extent possible. If the server has gone away and returned, well, that can't be helped. But otherwise, I would expect all my network resources to be in the same state as I left them, just as with my local resources.
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: 2.5.34?
Quoted 2 lines · Pavel Machek
No. S3 wakeup is completely different from S4 wakeup.
Really? I thought they both used the same "wakeup vector" and hence used the pre-_WAK code path. Perhaps I am mistaken.
Quoted 1 line
And bothworked for me in 2.5.32 IIRC.
ok, thanks. That's actually the first time anyone has said that clearly.
(your previous email was somewhat vague about S3 working - it didn't actually state that it was working and when)
Quoted 2 lines
Look at
acpi_wakeup.S. If your mode is in text VGA you can just write to videoram. Maybe code to do that is still there?
The problem is that the backlight is not on, and it's not clear the vga controller is turned on. This code runs before _WAK (which I think is what turns on the backlight)
I'll try it, however, as it's a reasonable suggestion. thanks!
-brad
-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts on Hammer Technology! Open Source & Linux Developers, register now for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
A message that is not in the archive (sent off-list or not yet received): 200209181224.g8ICONr31147-paYRYfI9b/[email protected]
Re: 2.5.34?
Hi!
Quoted 4 lines
Quoted 1 line
No. S3 wakeup is completely different from S4 wakeup.
Really? I thought they both used the same "wakeup vector" and hence used the pre-_WAK code path. Perhaps I am mistaken.
Well, we do S3 using ACPI but do S4 "by hand", so wakeup vector is not even used in S4 (==swsusp) case.
S3 is similar to S4bios; there are patches for S4bios floating around, but its not in mainline.
Quoted 6 lines
Quoted 1 line
And bothworked for me in 2.5.32 IIRC.
ok, thanks. That's actually the first time anyone has said that clearly.
(your previous email was somewhat vague about S3 working - it didn't actually state that it was working and when)
[I'm not 100% sure about it was 2.5.32. I think it was.]
Quoted 8 lines
Quoted 2 lines
Look at
acpi_wakeup.S. If your mode is in text VGA you can just write to videoram. Maybe code to do that is still there?The problem is that the backlight is not on, and it's not clear the vga controller is turned on. This code runs before
_WAK(which I think is what turns on the backlight)I'll try it, however, as it's a reasonable suggestion. thanks!
On my machines I'm lucky enough to have video either in VGA text or in original mode. In VGA text it is rather easy to show some debugging.
Pavel
Signature · 9 lines
Casualities in World Trade Center: ~3k dead inside the building, cryptography in U.S.A. and free speech in Czech Republic. ------------------------------------------------------- This SF.NET email is sponsored by: AMD - Your access to the experts on Hammer Technology! Open Source & Linux Developers, register now for the AMD Developer Symposium. Code: EX8664 http://www.developwithamd.com/developerlab
A message that is not in the archive (sent off-list or not yet received): 20040624195304.GE698-u08AdweFZfgxtPtxi4kahqVXKuFTiq87@public.gmane.org
Re: swsusp and ac status
Quoted 8 lines
Quoted 2 lines
I noticed that a change in the ac status is not detected after a swsusp. I think this should be a known issue; is there any workaround available?
Its known, and yes I have ugly workaround.
Quoted 1 line
Same behavior with pm-suspend, swsusp and swsusp2.
Can you try pm-suspend with powerdown mode set to "platform"?
I did and it WORKS!
In my kernel configuration I have all acpi compiled in the kernel (no modules).
This probably means there is something wrong with how swsusp2 handles acpi.
Daniele
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
A message that is not in the archive (sent off-list or not yet received): 200406291150.i5TBopX9001428-xzhXYMPkGmXoPXhRcRtihA@public.gmane.org
Re: swsusp and ac status
Hi!
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
I noticed that a change in the ac status is not detected after a swsusp. I think this should be a known issue; is there any workaround available?
Its known, and yes I have ugly workaround.
Quoted 1 line
Same behavior with pm-suspend, swsusp and swsusp2.
Quoted 7 lines
Quoted 1 line
Can you try pm-suspend with powerdown mode set to "platform"?
I did and it WORKS!
In my kernel configuration I have all acpi compiled in the kernel (no modules).
This probably means there is something wrong with how swsusp2 handles acpi.
There's nothing wrong, just missing code to do S4 properly. pm-disk is only one that can do it right at this point.
Pavel
Signature · 9 lines
People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
2.5.34?
Hello,
Is 2.5.34 patch comming out soon?
Gustavo
_______________________________________________________________________
Yahoo! PageBuilder
O super editor para criação de sites: é grátis, fácil e rápido.
http://br.geocities.yahoo.com/v/pb.html
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
A message that is not in the archive (sent off-list or not yet received): 20020916001425.82756.qmail-jIUPyM9ARX+A/[email protected]
Re: 2.5.34?
Quoted 3 lines · Gustavo Sverzut Barbieri
Hello,
Is 2.5.34 patch comming out soon?
i don't particularly see the point in releasing one since all ACPI patches for 2.5 that i'm aware of are integrated into the current bitkeeper tree. you could grab a nightly snapshot if you can't wait for 2.5.35:
http://www.kernel.org/pub/linux/kernel/people/jgarzik/snap/2.5/patch-2.5.34-bk6.bz2
Signature · 7 lines
Revolutions do not require corporate support. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf
A message that is not in the archive (sent off-list or not yet received): 20020916012506.G10583-+pPCBgu9SkPzIGdyhVEDUDl5KyyQGfY2kSSpQ9I8OhVaa/[email protected]
Re: 2.5.34?
Quoted 9 lines · Matthew Wilcox
Quoted 3 lines · Gustavo Sverzut Barbieri
Hello,
Is 2.5.34 patch comming out soon?
i don't particularly see the point in releasing one since all ACPI patches for 2.5 that i'm aware of are integrated into the current bitkeeper tree. you could grab a nightly snapshot if you can't wait for 2.5.35:
http://www.kernel.org/pub/linux/kernel/people/jgarzik/snap/2.5/patch-2.5.34-bk6.bz2
But be aware that the swsusp patch in the IDE driver in de 2.5 kernel was lost when Martin Dalecki's IDE project was removed!
I would wait for it to return in some form or another, if I where you.
Regards,
Toon.
Signature · 10 lines
/"\ | \ / ASCII RIBBON CAMPAIGN | "Who is this General Failure, and X AGAINST HTML MAIL | what is he doing on my harddisk?" / \ ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: 2.5.34?
Hi
Quoted 10 lines
Quoted 6 lines
Quoted 1 line
Is 2.5.34 patch comming out soon?
i don't particularly see the point in releasing one since all ACPI patches for 2.5 that i'm aware of are integrated into the current bitkeeper tree. you could grab a nightly snapshot if you can't wait for 2.5.35:
http://www.kernel.org/pub/linux/kernel/people/jgarzik/snap/2.5/patch-2.5.34-bk6.bz2But be aware that the swsusp patch in the IDE driver in de 2.5 kernel was lost when Martin Dalecki's IDE project was removed!
I would wait for it to return in some form or another, if I where you.
Look at l-k, I already submitted IDE swsusp support to Andre.
Signature · 10 lines
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt, details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html. ------------------------------------------------------- This SF.NET email is sponsored by: AMD - Your access to the experts on Hammer Technology! Open Source & Linux Developers, register now for the AMD Developer Symposium. Code: EX8664 http://www.developwithamd.com/developerlab
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: 2.5.34?
Quoted 8 lines · Pavel Machek
Quoted 8 lines
Quoted 7 lines
Quoted 2 lines
Is 2.5.34 patch comming out soon?
i don't particularly see the point in releasing one since all ACPI patches for 2.5 that i'm aware of are integrated into the current bitkeeper tree. you could grab a nightly snapshot if you can't wait for 2.5.35:
http://www.kernel.org/pub/linux/kernel/people/jgarzik/snap/2.5/patch-2.5.34-bk6.bz2
Quoted 5 lines
Quoted 3 lines
But be aware that the swsusp patch in the IDE driver in de 2.5 kernel was lost when Martin Dalecki's IDE project was removed!
I would wait for it to return in some form or another, if I where you.Look at l-k, I already submitted IDE swsusp support to Andre.
I know.
I got my information from your postings on the linux-kernel mailing list. My only intention was to warn people that their data is NOT safe when using swsusp with recent 2.5 kernels.
I should have added that you already submitted a patch on the linux-kernel mailing list. Sorry about that.
BTW: From your discussion with André Hedrick I understood that there still is some disagreement about the layer where the I/O to the IDE block devices should be blocked by swsusp. Is this resolved now?
Regards,
Toon.
Signature · 11 lines
/"\ | \ / ASCII RIBBON CAMPAIGN | "Who is this General Failure, and X AGAINST HTML MAIL | what is he doing on my harddisk?" / \ ------------------------------------------------------- This SF.NET email is sponsored by: AMD - Your access to the experts on Hammer Technology! Open Source & Linux Developers, register now for the AMD Developer Symposium. Code: EX8664 http://www.developwithamd.com/developerlab
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: 2.5.34?
Hi!
Quoted 7 lines
Quoted 1 line
Look at l-k, I already submitted IDE swsusp support to Andre.
I know.
I got my information from your postings on the linux-kernel mailing list. My only intention was to warn people that their data is NOT safe when using swsusp with recent 2.5 kernels.
Quoted 6 lines
I should have added that you already submitted a patch on the linux-kernel mailing list. Sorry about that.
BTW: From your discussion with André Hedrick I understood that there still is some disagreement about the layer where the I/O to the IDE block devices should be blocked by swsusp. Is this resolved now?
No but we are working on it.
Pavel
Signature · 9 lines
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt, details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf
Re: 2.5.34?
In reply to a message not in the archiveMatthew Wilcox wrote:
...
Quoted 3 lines
you could grab a nightly snapshot if you can't wait for 2.5.35:
http://www.kernel.org/pub/linux/kernel/people/jgarzik/snap/2.5/patch-2.5.34-bk
6.bz2
Hi,
This link doesn't work; there's no .../jgarzik/snap directory.
Can anyone provide a coherent description of the S3 support in 2.5.34? Is it close? does it need patches (like the one above?)
I'm willing to put some work into it but I'd benefit from whom ever is closest to it giving a quick status.
It seems like if S4 can be made to work, S3 should be straightforward (heh). If tried it in a stock 2.5.34 and found no difference from the 2.2.x acpi patched kernels I use...
-brad
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
A message that is not in the archive (sent off-list or not yet received): 200209161130.g8GBUo024143-paYRYfI9b/[email protected]
Re: 2.5.34?
Quoted 10 lines · Brad Parker
Matthew Wilcox wrote:
...Quoted 3 lines
you could grab a nightly snapshot if you can't wait for 2.5.35:
http://www.kernel.org/pub/linux/kernel/people/jgarzik/snap/2.5/patch-2.5.34-bk
6.bz2Hi,
This link doesn't work; there's no .../jgarzik/snap directory.
looks like jeff moved it:
http://www.kernel.org/pub/linux/kernel/v2.5/snapshots/
but 2.5.35 is out, so there's no need any more ;-)
Signature · 7 lines
Revolutions do not require corporate support. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf
Re: 2.5.34?
In reply to a message not in the archiveHi!
Quoted 2 lines
Can anyone provide a coherent description of the S3 support in 2.5.34? Is it close? does it need patches (like the one above?)
It worked before. IDE support is recommended, through.
Quoted 6 lines
I'm willing to put some work into it but I'd benefit from whom ever is closest to it giving a quick status.
It seems like if S4 can be made to work, S3 should be straightforward (heh). If tried it in a stock 2.5.34 and found no difference from the 2.2.x acpi patched kernels I use...
S3 is not as simple as you think, but as it worked before... It should be easy.
Pavel
Signature · 10 lines
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt, details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html. ------------------------------------------------------- This SF.NET email is sponsored by: AMD - Your access to the experts on Hammer Technology! Open Source & Linux Developers, register now for the AMD Developer Symposium. Code: EX8664 http://www.developwithamd.com/developerlab
[parisc-linux] cvs [login aborted]?
Hi pa,
Is it an actual cvs server pb or a local pb I could have:
those last two days cvs -d :pserver:[email protected]:/var/cvs "failed: Connection timed out"?
Any idea?
Thanks,
Joel
------------------------------------------------------
Soldes Tiscali ADSL : 27,50 euros/mois jusque fin 2003. On s'habitue vite à payer son ADSL moins cher!
Plus d'info? Cliquez ici... http://reg.tiscali.be/default.asp?lg=fr
Re: [parisc-linux] cvs [login aborted]?
Quoted 5 lines · Joel Soete
Hi pa,
Is it an actual cvs server pb or a local pb I could have:
those last two days cvs -d :pserver:[email protected]:/var/cvs "failed: Connection timed out"?
Hm, it's not working for me either:
willy@honeydew:~/kernel/pci-2.5$ cvs up Makefile cvs [update aborted]: connect to cvs.parisc-linux.org(192.25.206.14):2401 failed: Connection timed out willy@honeydew:~/kernel/pci-2.5$ cat CVS/Root :pserver:[email protected]:/var/cvs
I think someone must have changed the firewall config because I can reach port 2401 from localhost, but not from any other machine.
Signature · 3 lines
"It's not Hollywood. War is real, war is primarily not about defeat or victory, it is about death. I've seen thousands and thousands of dead bodies. Do you think I want to have an academic debate on this subject?" -- Robert Fisk
PATCH 1/1 Toshiba ACPI Extras 0.16
Hello Andy,
Recently there was a mass patch to the 2.5 kernel that tried to replace instances of strncpy with strlcpy. In the case of my driver the substitution was not appropriate and causes end-user problems due to the resulting undefined memory access. This change was made about 6 weeks ago without my knowledge, the result being that there are tainted copies of version 0.15 of the driver out there.
What I'd like to do is forget version 0.15 ever existed, so this patch reverts the change and increments the version. I'd also like to increment the version in the 2.4 tree to keep things in sync, so I've got a patch ready for each tree.
Unfortunately I've complicated matters by already trying to submit a patch to Linus that reverts the change but doesn't increment the version. I doubt he'll apply it, but if he does before you get to it then apply the 2.4 patch to the 2.5 tree to increment the version only.
Sorry for the trouble.
Regards,
-John
Changes:
* Increment version because release 0.15 was tainted by a bad "strlcpy conversion" patch.
toshiba_acpi.c renamed from toshiba_acpi.c.old +4 -2
@@ -33,7 +33,7 @@* */ -#define TOSHIBA_ACPI_VERSION "0.15" +#define TOSHIBA_ACPI_VERSION "0.16"#define PROC_INTERFACE_VERSION 1#include <linux/kernel.h>
@@ -108,7 +108,9 @@int result;char * str2 =kmalloc (n +1 ,GFP_KERNEL );if (str2 ==0 )return 0 ; -strlcpy (str2, str, n); +/* NOTE: don't even _think_ about replacing this with strlcpy */ +strncpy (str2, str, n); + str2[n] =0 ;va_start (args, format); result =vsscanf (str2, format, args);va_end (args);
toshiba_acpi.c renamed from toshiba_acpi.c.old +2 -1
@@ -33,7 +33,7 @@* */ -#define TOSHIBA_ACPI_VERSION "0.15" +#define TOSHIBA_ACPI_VERSION "0.16"#define PROC_INTERFACE_VERSION 1#include <linux/kernel.h>
@@ -108,6 +108,7 @@int result;char * str2 =kmalloc (n +1 ,GFP_KERNEL );if (str2 ==0 )return 0 ; +/* NOTE: don't even _think_ about replacing this with strlcpy */ strncpy (str2, str, n); str2[n] =0 ;va_start (args, format);
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH] Toshiba ACPI Extras 0.16
toshiba_acpi.c line 116
Quoted 11 lines · John Belmonte
toshiba_acpi.c renamed from toshiba_acpi.c.old +3
-1@@ -108,7 +108,9 @@int result;char * str2 =kmalloc (n +1 ,GFP_KERNEL );if (str2 ==0 )return 0 ; -strlcpy (str2, str, n); +/* NOTE: don't even _think_ about replacing this with strlcpy */ +strncpy (str2, str, n); + str2[n] =0 ;va_start (args, format); result =vsscanf (str2, format, args);va_end (args);
seems to me you'd be better off doing ...
len = strlen(str); if (len > n) len = n; memcpy(str2, str, n); str2[n] = '\0';
i wrote a short note entitled "strncpy Considered Harmful" a few years ago. unfortunately, it seems lost in time.
Signature · 10 lines
"It's not Hollywood. War is real, war is primarily not about defeat or victory, it is about death. I've seen thousands and thousands of dead bodies. Do you think I want to have an academic debate on this subject?" -- Robert Fisk ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
A message that is not in the archive (sent off-list or not yet received): 20030726052012.GO1485-+pPCBgu9SkPzIGdyhVEDUDl5KyyQGfY2kSSpQ9I8OhVaa/[email protected]
Re: [PATCH] Toshiba ACPI Extras 0.16
Quoted 11 lines
seems to me you'd be better off doing ...
len = strlen(str); if (len > n) len = n; memcpy(str2, str, n); str2[n] = '\0';i wrote a short note entitled "strncpy Considered Harmful" a few years ago. unfortunately, it seems lost in time.
Obviously, you meant: memcpy(str2, str, len);
But strlen() is dangerous when you point it at something that you can't swear is null-terminated. It almost always works because, somewhere along the line, there's a null byte. BUT, it *is* walking off the end of your string and poking about in memory, and you never know what that might do.
You could just do this:
memcpy(str2, str, n); str2[n] = '\0';
But, enlighten me. What's wrong with strncpy, that is solved by doing the above?
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
A message that is not in the archive (sent off-list or not yet received): 20030726132501.C766314829-RAHWjsxJnJUdnm+yROfE0A@public.gmane.org
Re: [PATCH] Toshiba ACPI Extras 0.16
So what was wrong with strlcpy? Was strncpy used because trailing NULs for the length of the field was required? That, and the point below, are the only differences between two versions of the code posted.
Also:
strncyp(str2, str, n); str2[n] = '\0';
means that you copy n + 1 bytes into str2, which is typically a bug, so a comment explaining why it isn't would be in order.
As it is the comment of 'don't even consider using strlcpy' is about useless because it tells what, but not why. And there's a long history of people in the Linux world ignoring dictates when the reasons get lost in the mists of time.
Warner
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
A message that is not in the archive (sent off-list or not yet received): 20030726.111800.13461649.imp-uzTCJ5RojNnQT0dZR+AlfA@public.gmane.org
Re: [PATCH] Toshiba ACPI Extras 0.16
Quoted 4 lines · M. Warner Losh
So what was wrong with strlcpy? Was strncpy used because trailing NULs for the length of the field was required? That, and the point below, are the only differences between two versions of the code posted.
The strlcpy function expects the input string to be zero-terminated, which is not the case here.
Quoted 4 lines
Also:
strncyp(str2, str, n); str2[n] = '\0';means that you copy n + 1 bytes into str2, which is typically a bug, so a comment explaining why it isn't would be in order.
It isn't a bug because
char* str2 = kmalloc(n + 1, GFP_KERNEL)
Quoted 4 lines
As it is the comment of 'don't even consider using strlcpy' is about useless because it tells what, but not why. And there's a long history of people in the Linux world ignoring dictates when the reasons get lost in the mists of time.
What's going on is that someone made a conversion to my driver which was not functionally equivalent and caused a serious bug, and did not notify me of the change. It's my name in the maintainer field and I have to deal with resulting bug reports. I wasted an entire day tracking down exactly what happened, discussing it with the people involved and even more with those not involved, and preparing a correction.
This should have never happened, and the comment I added is only a reaction to this. To me it states the obvious, "don't break my code", and indeed left to my own devices it wouldn't be there.
Signature · 9 lines
http:// if l .o / ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Re: [PATCH] Toshiba ACPI Extras 0.16
In reply to a message not in the archiveQuoted 5 lines · Lyle Seaman
But
strlen()is dangerous when you point it at something that you can't swear is null-terminated. It almost always works because, somewhere along the line, there's a null byte. BUT, it *is* walking off the end of your string and poking about in memory, and you never know what that might do.
It's never acceptable to read undefined memory, and in this case it triggers real symptoms such as causing the driver or unrelated drivers to fail.
Signature · 9 lines
http:// if l .o / ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Re: [PATCH] Toshiba ACPI Extras 0.16
In reply to a message not in the archiveQuoted 10 lines · Matthew Wilcox
seems to me you'd be better off doing ...
len = strlen(str); if (len > n) len = n; memcpy(str2, str, n); str2[n] = '\0';i wrote a short note entitled "strncpy Considered Harmful" a few years ago. unfortunately, it seems lost in time.
Since you have that experience then I would expect you to consider whether str is zero-terminated before suggesting that I change my code.
Signature · 9 lines
http:// if l .o / ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH] Toshiba ACPI Extras 0.16
Quoted 9 lines · John Belmonte
Quoted 8 lines · Matthew Wilcox
seems to me you'd be better off doing ...
len = strlen(str); if (len > n) len = n; memcpy(str2, str, n); str2[n] = '\0';
Quoted 5 lines
Quoted 2 lines
i wrote a short note entitled "strncpy Considered Harmful" a few years ago. unfortunately, it seems lost in time.
Since you have that experience then I would expect you to consider whether str is zero-terminated before suggesting that I change my code.
ok, you want strnlen there then. my original note was in the context of how completely useless strncpy was for C strings.
Signature · 10 lines
"It's not Hollywood. War is real, war is primarily not about defeat or victory, it is about death. I've seen thousands and thousands of dead bodies. Do you think I want to have an academic debate on this subject?" -- Robert Fisk ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
swsusp and ac status
Hi,
I noticed that a change in the ac status is not detected after a swsusp. I think this should be a known issue; is there any workaround available?
How to reproduce the bad behavior:
- swsuspend when on ac (resp. battery) power
- unplug (resp. plug) the ac adapter when the laptop is off
- resume when on battery (resp. ac) power
Then /proc/acpi/ac_adapter/*/state says "on-line" (resp. "off-line"). A new change in the status is then correctly detected.
I tried different acpi configurations (ac in the kernel or as a module, unload the ac module before suspending and reload it after resuming...) with no success.
actual kernel 2.6.7 (same behavior with previous ones), no acpi patch, swsusp2 patch
Same behavior with pm-suspend, swsusp and swsusp2.
Daniele
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: swsusp and ac status
Quoted 3 lines · Daniele Boffi
Hi,
I noticed that a change in the ac status is not detected after a swsusp. I think this should be a known issue; is there any workaround available?
What machine? hp compaq nx5000?
Signature · 9 lines
Stefan Seyfried ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
Re: swsusp and ac status
In reply to a message not in the archiveHi!
Quoted 2 lines
I noticed that a change in the ac status is not detected after a swsusp. I think this should be a known issue; is there any workaround available?
Its known, and yes I have ugly workaround.
Quoted 1 line
Same behavior with pm-suspend, swsusp and swsusp2.
Can you try pm-suspend with powerdown mode set to "platform"?
Signature · 9 lines
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com