lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 29 May 2009 15:47:01 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Christoph Pleger <Christoph.Pleger@...tu-dortmund.de>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: Maximum size of a swap partition

On Fri, 29 May 2009 08:30:54 +0200
Christoph Pleger <Christoph.Pleger@...tu-dortmund.de> wrote:

> Hello,
> 
> > what is the maximum size of a swap partition with Kernel 2.6.26 on an
> > x86 and on an x86_64 machine? Some people say that it is 2GB on x86,
> > but that seems not to be true any more.
> 
> Is here, in the mailing list where the power of kernel knowledge
> resides, really no one able to answer that question within one day?
> 
Mailing list is not a place where a kind man reads all e-mails every day.

At first, start from man. man mkswap says.
==
      The maximum useful size of a swap area depends on the architecture  and
       the  kernel  version.  It is roughly 2GiB on i386, PPC, m68k, ARM, 1GiB
       on sparc, 512MiB on mips, 128GiB on alpha and 3TiB on sparc64. For ker-
       nels after 2.3.3 there is no such limitation.
==
 For kernels after 2.3.3 there is no such limitation.

>From code,
==
union swap_header {
        struct {
                char reserved[PAGE_SIZE - 10];
                char magic[10];                 /* SWAP-SPACE or SWAPSPACE2 */
        } magic;
        struct {
                char            bootbits[1024]; /* Space for disklabel etc. */
                __u32           version;
                __u32           last_page;
                __u32           nr_badpages;
                unsigned char   sws_uuid[16];
                unsigned char   sws_volume[16];
                __u32           padding[117];
                __u32           badpages[1];
        } info;
};
==

last_page represents the size of a swap partition.

Then, 
  UINT_MAX * PAZE_SIZE = 16Tbytes ? is a limitation for a swap device.
  you can use 30 swap devices now.

I'm not sure whether there are other limitations. But maybe enough big.

Bye,
-Kame


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ