Re: swapon using mkswap [changed subject]

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

 



On Fri, Jan 23, Hugh Dickins wrote:

> But that's a personal preference, and I don't think I have strong
> enough reason to turn everything around in that direction.  What
> I most strongly object to is this behaviour happening by default:
> pity those who by mistake point swapon at the wrong partition,
> and it just happens to have what looks like a swapspace signature
> at one of the offsets (not a very great likelihood, I admit).

The swap signature is not just a random string at a random place, mkswap
does also check if the partition or filesize matches with the metadata.
So its unlikely that an innocent partition or file gets corrupted by
mkswap, but it can probably still happen.
I agree that mkswap (or whatever does the validation) should be more
careful and rewrite more parts of the metadata for the current pagesize.

If there is a bug in the current 11.1 or upstream implementation,
please help to get it fixed.

> By the way, that #define MAX_PAGESIZE (64 * 1024): there's people
> now using pagesize 256kB on ppc64, don't know if you want to cater
> for them too (maybe they're not using swap, or not switching).

I guess that pagesize should be handled as well.

Olaf
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" 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