Re: [Suspend-devel] [PATCH] Speedup image writing

2007-08-15 Thread Luca
; > cc -g -I/usr/local/include -DS2RAM -O2 -Wall -DCONFIG_COMPRESS > -DCONFIG_ENCRYPT vt.o md5.o encrypt.o config.o loglevel.o splash.o > bootsplash.o suspend.c -o s2disk -L/usr/local/lib -llzf -L/usr/lib64 -lgcrypt > -L/usr/lib64 -lgpg-error > /tmp/ccLdqLq2.o: In function `writ

Re: [Suspend-devel] encryption docs

2007-08-14 Thread Luca
RSA private > > key is (encrypted using the password at installation time) is also > > stored in the header. > > At resume the password is used to unlock the private key which is then > > used to decrypt the random key. > >

Re: [Suspend-devel] encryption docs

2007-08-14 Thread Luca
e random key is encrypted with RSA and stored in the header, RSA private key is (encrypted using the password at installation time) is also stored in the header. At resume the password is used to unlock the private key which is then used to decrypt the random key. IOW we don't use RSA to encrypt th

Re: [Suspend-devel] s2ram does not know your machine.

2007-08-11 Thread Luca
gt; I can't tell you anything more up to now, I'll investigate deeper. It would be interesting to know which options are used by Suse on unknown machines. Maybe Stefan knows :) > Yes I do need X to get the display back. Try with -m -p (VBE_MODE | VBE_POST). Luca -

Re: [Suspend-devel] s2ram does not know your machine.

2007-08-10 Thread Luca
sion = "68YAF Ver. F.1A" > See http://en.opensuse.org/S2ram for details. > > This is the output of s2ram on my machine. > > Please contact me if you need further informations. Which options are you using f

Re: [Suspend-devel] [PATCH 1/6] - autoconf/automake glue - license

2007-08-06 Thread Luca
+ > +suspend License > + > + Copyright (C) 2005-2007 Rafael J. Wysocki <[EMAIL PROTECTED]> > + Copyright (C) 2006-2007 Pavel Machek <[EMAIL PROTECTED]> > + Copyright (C) 2006-2007 Stefan Seyfried <[EMAIL PROTECTED]> > + Copyright 2006 Tim Dijkstra <

Re: [Suspend-devel] [PATCH 6/6] - autoconf/automake glue - s2ram

2007-08-05 Thread Luca
't do that unless you know what you're doing"; the inclusion was deliberate (and permitted by the standard btw). On the auto{conf,make}: we just have a handful of files, isn't it overkill? (Shall I include the standard rant about auto* stuff? :P ) Luca --

Re: [Suspend-devel] Autoconf/automake support

2007-07-31 Thread Luca
> > > > Excuse me for not understanding such short messages... > > Are you doping the idea of link only suspend site and redirect from > > suspend site to suse wiki? > > Or you will ask your "some webmaster" to add the new URL? > > Luca, could you

Re: [Suspend-devel] x86_64

2007-05-15 Thread Luca
it since the very beginning on x86_64. > > > > The above Makefile bug seems to be recent. > > Yes as you can see from the quote, from 13th of may. It was the patch from > luca that I applied, but I know, that is no excuse;) Ah, I definitely forgot to test with x86_64. Sorry ;-)

Re: [Suspend-devel] [PATCH 2/2] s2ram: add PPC support

2007-04-23 Thread Luca Tettamanti
Il Fri, Apr 20, 2007 at 06:59:11PM +0200, Stefan Seyfried ha scritto: > On Wed, Apr 18, 2007 at 09:22:20PM +0200, Tim Dijkstra wrote: > > Luca Tettamanti <[EMAIL PROTECTED]> wrote: > > > Well, it's possible to do something like this: > > > > > > in

Re: [Suspend-devel] swapfiles

2007-04-22 Thread Luca Tettamanti
> > It prints nothing ... What's "shift"? swap-offset prints the offset in PAGE_SIZE units, so you must multiply it by 4096 to get a byte offset. Furthermore the swap signature is at the end of the first page. So you'd do: shift = swap_offset_number * 4096 + 4096 - 10 (10

Re: [Suspend-devel] [PATCH 2/2] s2ram: add PPC support

2007-04-16 Thread Luca Tettamanti
Il Mon, Apr 16, 2007 at 10:35:25PM +0200, Tim Dijkstra ha scritto: > On Sun, 15 Apr 2007 02:36:12 +0200 > Luca Tettamanti <[EMAIL PROTECTED]> wrote: > > > > @@ -27,7 +27,16 @@ > > > int s2ram_do(void) > > > { > > > int ret = 0; > > &

Re: [Suspend-devel] [PATCH 2/2] s2ram: add PPC support

2007-04-14 Thread Luca Tettamanti
s this?\n"); return ENODEV; diff -X exclude -uN a/s2ram.h b/s2ram.h --- a/s2ram.h 2007-04-10 21:39:19.0 +0200 +++ b/s2ram.h 2007-04-15 02:23:38.0 +0200 @@ -30,5 +30,5 @@ int s2ram_do(void); void s2ram_resume(void); void s2ram_add_flag(int opt, const

Re: [Suspend-devel] [PATCH 2/2] s2ram: add PPC support

2007-04-14 Thread Luca Tettamanti
On 4/11/07, Tim Dijkstra <[EMAIL PROTECTED]> wrote: > Luca Tettamanti schreef: > > Add s2ram support for PPC architecture. s2ram.{c,h} contain the > > implementation of the required functions, used by the main file. The > > Makefile selects the correct platform f

Re: [Suspend-devel] [PATCH 2/2] s2ram: add PPC support

2007-04-14 Thread Luca Tettamanti
(autodetected by default, can be overridden). > > > > PPC code is based on original patch from Tim Dijkstra. > > > > Signed-Off-By: Luca Tettamanti <[EMAIL PROTECTED]> > > > > --- a/s2ram-ppc.c 1970-01-01 01:00:00.0 +0100 > > +++ b/s

[Suspend-devel] [PATCH 2/2] s2ram: add PPC support

2007-04-10 Thread Luca Tettamanti
Dijkstra. Signed-Off-By: Luca Tettamanti <[EMAIL PROTECTED]> --- Makefile| 22 +++- s2ram-ppc.c | 75 s2ram-ppc.h |2 + 3 files changed, 93 insertions(+), 6 deletions(-) --- a/Makefile 2007-04-10 23:46:38.0

[Suspend-devel] [PATCH 1/2] s2ram: split generic and x86 code

2007-04-10 Thread Luca Tettamanti
Split generic and x86 s2ram code: the new files (s2ram.{c,h}) contains platform specific code moved out of the main file. Signed-Off-By: Luca Tettamanti <[EMAIL PROTECTED]> --- Makefile|8 - s2ram-x86.c | 331 s2ram-x86.h

Re: [Suspend-devel] CONFIG_PPC

2007-04-10 Thread Luca Tettamanti
ve a better solution?). PPC part is a bit strange, in the original patch PMU_IOC_SLEEP was exclusive with /sys/power/mem, i.e. s2ram_do() is called iff PMU is supported _and_ PMU_IOC_SLEEP fails; is this correct? I'll send a serie of 2 patches in reply to this mail: the first one splits x86 sp

Re: [Suspend-devel] CONFIG_PPC

2007-04-05 Thread Luca Tettamanti
Il Fri, Apr 06, 2007 at 01:24:13AM +0200, Luca Tettamanti ha scritto: > On 4/6/07, Tim Dijkstra <[EMAIL PROTECTED]> wrote: > >A while back I proposed a patch to support powerpc. The comments where > >that it was a bit ugly with all those #ifdef's. Now the question is

Re: [Suspend-devel] CONFIG_PPC

2007-04-05 Thread Luca Tettamanti
sure about command line arguments... Then maybe split s2ram.c into s2ram, s2ram-x86.c and s2ram-ppc.c; this will ease the addition of a new platform. Luca - Take Surveys. Earn Cash. Influence the Future of IT Join SourceFor

Re: [Suspend-devel] [PATCH] encourage the usage of --long_options

2007-03-31 Thread Luca Tettamanti
; usage(MYNAME, ...); > ... Pass down argv[0] instead of a hardcoded string ;) Luca - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to shar

Re: [Suspend-devel] powerpc support

2007-03-27 Thread Luca Tettamanti
compiler optimize this stuff out very well. Better use this: #define s2ram_prepare() do { } while (0) otherwise gcc complains. Or just make it a real function, gcc is smart enough ;-) Luca - Take Surveys. Earn Cash. Infl

Re: [Suspend-devel] powerpc support

2007-03-27 Thread Luca Tettamanti
upport for s2ram in the kernel don't need those hacks. Hum, scattering #ifdef all over the code quickly turns into a maintenance nightmare. Luca - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.ne

Re: [Suspend-devel] s2both on powerpc

2007-03-25 Thread Luca Tettamanti
unsigned int', but > > argument 2 has type 'dev_t' > > suspend.c:217: warning: format '%u' expects type 'unsigned int', but > > argument 3 has type 'dev_t' > > > > Th

Re: [Suspend-devel] Shuttle XPC SS51g whitelist conflict

2007-03-02 Thread Luca Tettamanti
ardcoded. I can code that if it's interesting enough... Luca - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & bus

Re: [Suspend-devel] Shuttle XPC SS51g whitelist conflict

2007-03-02 Thread Luca Tettamanti
obably running Gnome/KDE that was installed by default by the distro. > That whitelist should have been in kernel; we can't do that, but it > still makes sense to keep it at low level. Even if it means duplicating a part of HAL? s2ram provi

Re: [Suspend-devel] Shuttle XPC SS51g whitelist conflict

2007-02-26 Thread Luca Tettamanti
sys_vendor = " " > sys_product = " " > sys_version = " " > bios_version = "6.00 PG" Problem is that your vendor did not fill those DMI fields. IOW we cannot whitelist the machine. Luca --

Re: [Suspend-devel] [patch] small trivial "make install" fixes

2007-02-14 Thread Luca Tettamanti
le magic at all, so could you please tell me > what $< means? ;-) $< is expanded to the first prerequisite in the list. In our case the prerequisite is the expansion of the wildcard % (e.g. the prereq for install-foo is foo). Other u

Re: [Suspend-devel] Current CVS does not compile on OpenSUSE 10.2

2007-02-05 Thread Luca Tettamanti
On 2/5/07, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: > Hi, > > I've just tried to compile the current CVS on OpenSUSE 10.2: > > cc -g -I/usr/local/include -DS2RAM -O2 -Wall -DCONFIG_COMPRESS > -DCONFIG_ENCRYPT vt.o vbetool/x86-common.o vbetool/vbetool.o radeontool.o > dmidecode.o vbetool/thun

Re: [Suspend-devel] swap-offset

2007-01-18 Thread Luca Tettamanti
uspension.\n"); err = EINVAL; } else { - printf("resume offset = %d\n", first_block * blk_size / page_size); + offset = (unsigned long long)first_block * blk_size / page_size; + printf("resume offset = %

Re: [Suspend-devel] [RFC][PATCH -mm 1/5] PM: Make freeze_processes SMP-safe

2006-11-26 Thread Luca
be used. But that's okay, we > should just use atomic_t here. Should be as fast on i386/x86-64, and > still safe. What about using lock_task_sighand()? This should protect us against ->flags manipulation due to signals without the need of an extra field. Luca -

Re: [Suspend-devel] suspend-0.5 released

2006-11-12 Thread Luca Tettamanti
On 11/12/06, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: > I've just released the current CVS as suspend-0.5. Where did 0.3 and 0.4 go? O_o Luca (updating web pages) - Using Tomcat but need to do more? Need

[Suspend-devel] [PATCH] swap-offset: add missing space in printf

2006-11-12 Thread Luca
on.\n"); err = EINVAL; } else { printf("resume offset = %d\n", first_block * blk_size / page_size); Luca -- Mi piace avere amici rispettabili; Mi piace essere il peggiore della compagnia.

Re: [Suspend-devel] Fibmap

2006-11-11 Thread Luca Tettamanti
On 11/12/06, Luca Tettamanti <[EMAIL PROTECTED]> wrote: > But AFAICS the offset is only needed for swap_type_of(); instead using > the extents it may be possible to use somehow the 'struct file' > (f_path? sounds interesting :D) for swapfiles. Ok, I think you can find

Re: [Suspend-devel] Fibmap

2006-11-11 Thread Luca Tettamanti
instead using the extents it may be possible to use somehow the 'struct file' (f_path? sounds interesting :D) for swapfiles. > > Even if I'm wrong: If header is fragmented, it is likely that rest > > will also be fragm

Re: [Suspend-devel] Fibmap

2006-11-10 Thread Luca Tettamanti
Il Thu, Nov 09, 2006 at 10:35:13PM +0100, Rafael J. Wysocki ha scritto: > On Thursday, 9 November 2006 22:30, Luca Tettamanti wrote: > > On 11/9/06, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: > > > I think that the swap header need not be continuous. This actually als

Re: [Suspend-devel] Fibmap

2006-11-09 Thread Luca Tettamanti
ituations and informed the > user that the swap file could not be used. Basically: - find the first block of the swapfile - check that there's a contiguous PAGE_SIZE cluster - check signature Luca - Using Tomcat but n

Re: [Suspend-devel] Fibmap

2006-11-09 Thread Luca
Il Thu, Nov 09, 2006 at 12:38:51AM +0100, Rafael J. Wysocki ha scritto: > On Thursday, 9 November 2006 00:32, Luca Tettamanti wrote: > > On 11/8/06, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > On Wednesday, 8 November 2006 18:58,

Re: [Suspend-devel] Fibmap

2006-11-08 Thread Luca Tettamanti
On 11/8/06, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: > Hi, > > On Wednesday, 8 November 2006 18:58, Luca wrote: > > I've been working on a small program to find the first valid block of a > > swapfile. If I understand it correctly we need the first contiguos clu

[Suspend-devel] Fibmap

2006-11-08 Thread Luca
err = EINVAL; } else printf("%d\n", first_block * blk_size / page_size); out: close(fd); return err; } How does it look? Luca -- This message will self destruct in 5 seconds.

Re: [Suspend-devel] Fix platform mode for in-kernel suspend

2006-10-17 Thread Luca Tettamanti
it will speed up the recovery (->sync_fs() will also trigger a journal commit). Luca - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make y

Re: [Suspend-devel] half success with Dell Inspiron 510m

2006-10-13 Thread Luca Tettamanti
d to get it working). > > Yep, you should not be patching video BIOS in the first place. Can you > ask Intel to fix their BIOS instead? They are working on the new driver which doesn't need the BIOS at all. See the 'modesetting' head in the git repository: http://gitweb.freedeskt

Re: [Suspend-devel] freeze everything but s2ram?

2006-10-08 Thread Luca Tettamanti
console(); /* Put devices to sleep */ error = device_suspend(PMSG_SUSPEND); if (error) { @@ -304,6 +306,7 @@ static int snapshot_ioctl(struct inode * pm_ops->finish(PM_SUSPEND_MEM); OutS3: + resume_console(); up(&

Re: [Suspend-devel] freeze everything but s2ram?

2006-10-08 Thread Luca Tettamanti
chine_match(); It makes sense to pin s2ram in memory, it will also help when e.g. the disk doesn't come back to life after suspension. Luca -- "La teoria e` quando sappiamo come funzionano le cose ma non funzionano. La pratica e` quando le cose funzionano ma non sappiamo perche`. Abb

Re: [Suspend-devel] [PATCH] add optional pause during resume

2006-09-25 Thread Luca Tettamanti
's _expected_ to be swap space. I guess that before unfreezing the processes it's safe to have a broken swap space; but if it's frozen suspend cannot read and reset the swap header, right? I suppose that there's no way to preserve the "

Re: [Suspend-devel] Suspend read/write "benchmarks"

2006-09-18 Thread Luca Tettamanti
. My guess is that if seek time is high enough early writeout will cause a seek storm and slow down s2disk. Your image is about 250MB, with early writeout at 1% it means that kernel will flush data every 2.5MB... Luca - Take

Re: [Suspend-devel] s2ram doesn't work for Toshiba A105-S4004

2006-09-02 Thread Luca
rm /var/run/s2ram exit fi # normal shutdown here Of course you can also stop and restart acpid: #!/bin/bash /etc/init.d/acpid stop s2ram /etc/init.d/acpid start Luca -- Home: http://kronoz.cjb.net "L'amore consiste nell'ess

Re: [Suspend-devel] s2disk: potential problems with HPA (host protected area)

2006-08-09 Thread Luca Tettamanti
I know this IBM Predesktop Area is located in a HPA. > > Which is where? Are you asking where the HPA is? Usually is a the end of the disk so that it can be hidden just "lying" about disk size. For ThinkP

Re: [Suspend-devel] Whitelist ASUS P5LD2-VM

2006-08-09 Thread Luca Tettamanti
n notebook the hardware set is known a priori, in a desktop the ID from the DMI table is meaningless since the hardware varies (video card being probably the most critical component). Luca - Using Tomcat but need to do more?

Re: [Suspend-devel] [RFT][PATCH] Use libgcrypt instead of openssl

2006-07-20 Thread Luca Tettamanti
On 7/20/06, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: > On Thursday 20 July 2006 18:58, Luca wrote: > > (btw, rsa_data_set was leacked): > > Yes, it was intentional. If you free the key created out of a data set, you > can't free the data set itself, apparen

Re: [Suspend-devel] [RFT][PATCH] Use libgcrypt instead of openssl

2006-07-20 Thread Luca
Il Wed, Jul 19, 2006 at 10:13:00PM +0200, Rafael J. Wysocki ha scritto: > On Wednesday 19 July 2006 21:38, Luca wrote: > > Il Wed, Jul 19, 2006 at 05:55:17PM +0200, Rafael J. Wysocki ha scritto: > > > The libgcrypt's AES seems to be significantly slower than the openss

Re: [Suspend-devel] [RFT][PATCH] Use libgcrypt instead of openssl

2006-07-19 Thread Luca
gcry_ac_close(rsa_hd); > Close: > close(fd); > } > @@ -1026,6 +1088,13 @@ int main(int argc, char *argv[]) > } > #ifdef CONFIG_ENCRYPT > if (encrypt) { > + printf("suspend: libgcrypt version: %s\n", > + gcry

Re: [Suspend-devel] s2ram details for FujitsuSiemens Lifebook 8010

2006-07-14 Thread Luca
erify this on a number of other FuSi laptops > from colleagues, too... One problem is that sometimes SATA HDs don't come back to life; you may fail to notice that when running from a live cd (i.e. mostly from a ram disk). If you do this be sure to check that the HD is indeed usable, a simple ca

Re: [Suspend-devel] Problems with suspend-0.2

2006-07-10 Thread Luca Tettamanti
ase we'll have to find a replacement for OpenSSL, I think. I've been fiddling with libgcrypt as a replacement for OpenSSL, but the documentation is scarce and I've been busy with the exams (I'll finish in a few days). I c

Re: [Suspend-devel] Problems with suspend-0.2

2006-07-10 Thread Luca Tettamanti
and resolves the symbols by itself. If you use dlopen() you do exactly the same stuff by hand. Luca - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology

Re: [Suspend-devel] partial success - 64-bit s2ram on HP zv5000

2006-07-05 Thread Luca Tettamanti
On 7/4/06, Jason Lunz <[EMAIL PROTECTED]> wrote: > On Tue, Jul 04, 2006 at 10:53:27PM +0200, Luca Tettamanti wrote: > > >bcm43xx: set security called enabled = 1 encrypt = 1 > > >hda: dma_timer_expiry: dma status == 0x21 > > >hda: DMA timeout error > >

Re: [Suspend-devel] partial success - 64-bit s2ram on HP zv5000

2006-07-04 Thread Luca Tettamanti
ugh mcelog --ascii to decode and contact your hardware vendor > Kernel panic - not syncing: Machine check > <4>atkbd.c: Spurious ACK on isa0060/serio0. Some program, like XFree86, > might be trying access hardware directly. The rest is caused by the led blinker. > Anyone got

Re: [Suspend-devel] s2both and s2disk

2006-06-27 Thread Luca
set s2ram */ > + if( (our_name=strrchr(argv[0],'/')) != NULL) Coding style: if ((our_name = strrchr(argv[0], '/')) != NULL) > + our_name++; > + else > + our_name=argv[0]; ^ missing space > + &

Re: [Suspend-devel] openssl and licence issues

2006-06-26 Thread Luca Tettamanti
h SSL/TLS. It may be possible to use libgcrypt in place of openssl, but libgcrypt package has other dependancies (at least on debian...). Luca Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Do

Re: [Suspend-devel] suspend in shell

2006-06-14 Thread Luca
propagate the return value. Is this correct? > else > vecho 1 "$EXE: Not actually suspending (--no-suspend given)" > fi > return 0 > } > > # EnsureUSuspendCapable: makes sure we have /sys/power/state and that > # the selection option is one of