Re: LINHIB0001 hibernate signature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Rafael J. Wysocki (rjw@xxxxxxx) wrote:
> On Monday, November 29, 2010, Karel Zak wrote:
> > On Sun, Nov 28, 2010 at 02:08:38AM +0000, Dr. David Alan Gilbert wrote:
> > >   libblkid and friends stopped detecting my swap partition on
> > > my Ubuntu laptop that I'm running the bleeding edge natty repo on
> > > (e.g. wipefs shows nothing, and I can't get a uuid from blkid).
> > > It's running 2.6.37-2 kernel and this bug persists in the latest
> > > git from  git.kernel.org/pub/scm/utils/util-linux-ng version 07b33...40a8
> > > 
> > > I think this is due to the change in the hibernate signature from 
> > > this patch:
> > > 
> > > http://www.gossamer-threads.com/lists/linux/kernel/1283551
> > 
> >  It seems we still don't live in ideal world where userspace is
> >  informed (e.g. by CC:) about all such important kernel changes ;-)
> 
> Well, I had no idea it would cause any problems to happen for any user space.
> That is an internal kernel thing.

Well it's a signature on a device, so hardly internal.
 
> > > If I look at the header of my partition I see:
> > > 
> > > 0007740 027 ! \0 \0 \0 \0 \0 \0 001 \0 \0 \0 S W A P
> > >          17 21 00 00 00 00 00 00 01 00 00 00 53 57 41 50
> > > 0007760 S P A C E 2 L I N H I B 0 0 0 1
> > >          53 50 41 43 45 32 4c 49 4e 48 49 42 30 30 30 31
> > > 
> > > Looking at shlibs/blkid/src/superblocks/swap.c I see it's
> > > looking for the SWAPSPACE2 signature at the address where
> > > I ahve LINHIB0001.
> > > 
> > > What's the right fix here?  Is it to add the LINHIB0001 to the
> > > swsuspend match table?  Or is it more subtle - the SWAPSPACE2 in my
> > > header above is 10 bytes earlier than the one that util-linux is looking
> > > for.  How are these headers supposed to work - should that LINHIB0001
> > > still be there or is it due to a failed resume?
> 
> That is due to a failed resume.  Running mkswap on the partition generally
> helps in those cases (which has nothing to do with the change above, because
> you will still have S1SUSPEND instead of SWAPSPACE2 in there).

Hmm, but what's the expected behaviour after a failed resume from hibernate?
Surely someone shouldn't have to run mkswap to fix up their system after a trivial
failure like that?

> > > I assume libblkid should still find it even in that case?
> > 
> >  I guess that the place where is the magic string is still the same 
> >  (last 10 bytes of the first page). Rafael?
> 
> Yes, it is.
> 
> >  Note, it would be nice to have a test image (for u-l-ng regression
> >  tests) with the new magic string -- 100KiB from the beginning of the
> >  device is enough.
> > 
> >  Thanks for your bug report!

Karel can you put a match in for this signature so it still at least finds the UUID?

Dave
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\ gro.gilbert @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux