Kernel Newbies archive on lore.kernel.org
 help / color / Atom feed
From: Jeffrey Walton <noloader@gmail.com>
To: "Valentin Vidić" <vvidic@valentin-vidic.from.hr>
Cc: kernelnewbies <kernelnewbies@kernelnewbies.org>
Subject: Re: Alternate method of running swapon?
Date: Wed, 8 Jan 2020 15:08:42 -0500
Message-ID: <CAH8yC8n8kQmh0fsvcwpL7=SMYTf40y9k-aFprbtxgNkDA-0Jmw@mail.gmail.com> (raw)
In-Reply-To: <20200108184234.GB8238@valentin-vidic.from.hr>

On Wed, Jan 8, 2020 at 1:43 PM Valentin Vidić
<vvidic@valentin-vidic.from.hr> wrote:
>
> On Wed, Jan 08, 2020 at 01:33:21PM -0500, Jeffrey Walton wrote:
> > I believe this is the relevant part from the Pastebin:
> >
> > readlink("/swapfile", 0x7ffefb4c0810, 4096) = -1 EINVAL (Invalid argument)
> > stat("/swapfile", {st_mode=S_IFREG|0600, st_size=2147483648, ...}) = 0
> > open("/swapfile", O_RDONLY)             = 3
> > read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
> > 65536) = 65536
> > close(3)                                = 0
> > swapon("/swapfile", 0)                  = -1 EPERM (Operation not permitted)
>
> Yes, the swapon call fails with this error. You can check the kernel
> name with uname -a, but it probably runs a custom build and you can't
> reboot with a different one to enable swap functionality.

It looks like this is coming from the OpenVZ folks. They feel a
swapfile would negatively impact performance, so it is disabled.

(I'm not sure how a DoS is considered a good result, given an OOM kill
just about always knocks out MySQL).

Jeff

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08 18:09 Jeffrey Walton
2020-01-08 18:23 ` Valentin Vidić
2020-01-08 18:33   ` Jeffrey Walton
2020-01-08 18:42     ` Valentin Vidić
2020-01-08 20:08       ` Jeffrey Walton [this message]
2020-01-08 20:28         ` Valentin Vidić
2020-01-08 18:26 ` Bernd Petrovitsch
2020-01-08 22:23   ` Jeffrey Walton
2020-01-08 18:31 ` Greg KH

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH8yC8n8kQmh0fsvcwpL7=SMYTf40y9k-aFprbtxgNkDA-0Jmw@mail.gmail.com' \
    --to=noloader@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=vvidic@valentin-vidic.from.hr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Kernel Newbies archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org
	public-inbox-index kernelnewbies

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git