Github messages for voidlinux
 help / color / mirror / Atom feed
From: q66 <q66@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] drop slub_debug/page_poison from bootloaders
Date: Mon, 01 Mar 2021 00:14:51 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29142@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1967 bytes --]

There is a new pull request by q66 against master on the void-packages repository

https://github.com/void-ppc/void-packages page-poison
https://github.com/void-linux/void-packages/pull/29142

drop slub_debug/page_poison from bootloaders
These are kernel hardening options introduced into Void in 2016. On most modern hardware they have a small performance hit, on older hardware they can have a significant performance hit. In kernel 5.3, new options were introduced, `init_on_alloc` and `init_on_free`. There are also kernel options to make these default.

The new defaults have been toggled in kernels 5.4, 5.10 and 5.11 in bd0d33eec0bd774d8cc62e32689b6fbfda517179. I explicitly did not enable `init_on_free` since that has a much bigger performance penalty, even on current-day hardware.

The only "drawback" of these changes is that people using old kernels will not get these options anymore. OTOH, the new behavior is much better in other ways (it has less of an impact, it's enabled in kernels rather than default configs so any changes to it will propagate to all users unconditionally, etc). And also, there isn't any other mainstream distribution that was using these options in the first place, for a reason, as far as I can tell.

People on kernels 4.4, 4.9, 4.14 and 4.19 who really care can update it themselves. But since older kernels tend to be associated with older hardware, they'll probably want to keep the options off in the first place.

What troubles me more is that even if I merge this PR, it will not propagate to existing users who have modified their `/etc/default/grub`, so they will need to change those files themselves. The new default kernel options are not incompatible with the old options, but people will likely want to remove them anyway. So we should probably put information about this in the documentation, too.

[ci skip]

A patch file from https://github.com/void-linux/void-packages/pull/29142.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-page-poison-29142.patch --]
[-- Type: text/x-diff, Size: 4238 bytes --]

From 5c17699452ddaea9c4ab02d9b0574e9263e63abf Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 1 Mar 2021 00:01:29 +0100
Subject: [PATCH 1/3] pinephone-uboot: drom slub_debug/page_poison

---
 srcpkgs/pinephone-uboot/files/uboot.default | 2 +-
 srcpkgs/pinephone-uboot/template            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/pinephone-uboot/files/uboot.default b/srcpkgs/pinephone-uboot/files/uboot.default
index e0955f552c2..2fee8db656e 100644
--- a/srcpkgs/pinephone-uboot/files/uboot.default
+++ b/srcpkgs/pinephone-uboot/files/uboot.default
@@ -8,4 +8,4 @@
 ROCKER_ARGS=yes
 
 # Regular cmdline for configured kernel
-CMDLINE="console=tty0 console=ttyS0,115200 rootwait loglevel=4 slub_debug=P page_poison=1"
+CMDLINE="console=tty0 console=ttyS0,115200 rootwait loglevel=4"
diff --git a/srcpkgs/pinephone-uboot/template b/srcpkgs/pinephone-uboot/template
index aaee84f998b..e594d838f2b 100644
--- a/srcpkgs/pinephone-uboot/template
+++ b/srcpkgs/pinephone-uboot/template
@@ -1,7 +1,7 @@
 # Template file for 'pinephone-uboot'
 pkgname=pinephone-uboot
 version=0.0.20200917
-revision=2
+revision=3
 archs="aarch64*"
 create_wrksrc=yes
 hostmakedepends="flex cross-or1k-none-elf-gcc dtc python3 python3-devel bc swig"

From fa68e194c31a56fe96ce8058e8f366d96b11739d Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 1 Mar 2021 00:01:59 +0100
Subject: [PATCH 2/3] pinebookpro-uboot: drop slub_debug/page_poison

---
 srcpkgs/pinebookpro-uboot/files/kernel.d/uboot | 2 +-
 srcpkgs/pinebookpro-uboot/template             | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/pinebookpro-uboot/files/kernel.d/uboot b/srcpkgs/pinebookpro-uboot/files/kernel.d/uboot
index c7914c454fe..f184ced22d5 100755
--- a/srcpkgs/pinebookpro-uboot/files/kernel.d/uboot
+++ b/srcpkgs/pinebookpro-uboot/files/kernel.d/uboot
@@ -14,7 +14,7 @@ cat > /boot/boot.txt <<EOF
 setenv macaddr da 19 c8 7a 6d f4
 
 part uuid \${devtype} \${devnum}:\${bootpart} uuid
-setenv bootargs console=ttyS2,1500000 console=tty1 root=PARTUUID=${partuuid} rootwait video=eDP-1:1920x1080@60 loglevel=4 slub_debug=P page_poison=1
+setenv bootargs console=ttyS2,1500000 console=tty1 root=PARTUUID=${partuuid} rootwait video=eDP-1:1920x1080@60 loglevel=4
 setenv fdtfile rockchip/rk3399-pinebook-pro.dtb
 
 if load \${devtype} \${devnum}:\${bootpart} \${kernel_addr_r} $(bootstrip /boot/vmlinux-${kver}); then
diff --git a/srcpkgs/pinebookpro-uboot/template b/srcpkgs/pinebookpro-uboot/template
index 4aff7de9e65..2f497adcd5b 100644
--- a/srcpkgs/pinebookpro-uboot/template
+++ b/srcpkgs/pinebookpro-uboot/template
@@ -2,7 +2,7 @@
 pkgname=pinebookpro-uboot
 reverts="20200212_1 20200212_2"
 version=0.0.20200212
-revision=3
+revision=4
 _commit_uboot=365495a329c8e92ca4c134562d091df71b75845e
 _commit_atf=22d12c4148c373932a7a81e5d1c59a767e143ac2
 archs="aarch64*"

From b943fb66cd89c38762733958ad0a488930bf3960 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 1 Mar 2021 00:03:24 +0100
Subject: [PATCH 3/3] grub: remove slub_debug/page_poison from defaults

---
 srcpkgs/grub/files/grub.default | 2 +-
 srcpkgs/grub/template           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/grub/files/grub.default b/srcpkgs/grub/files/grub.default
index 5cd1fd2fd52..8e8231603eb 100644
--- a/srcpkgs/grub/files/grub.default
+++ b/srcpkgs/grub/files/grub.default
@@ -6,7 +6,7 @@ GRUB_DEFAULT=0
 #GRUB_HIDDEN_TIMEOUT_QUIET=false
 GRUB_TIMEOUT=5
 GRUB_DISTRIBUTOR="Void"
-GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4 slub_debug=P page_poison=1"
+GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4"
 # Uncomment to use basic console
 #GRUB_TERMINAL_INPUT="console"
 # Uncomment to disable graphical terminal
diff --git a/srcpkgs/grub/template b/srcpkgs/grub/template
index 21321d001c9..009b1e48822 100644
--- a/srcpkgs/grub/template
+++ b/srcpkgs/grub/template
@@ -1,7 +1,7 @@
 # Template file for 'grub'
 pkgname=grub
 version=2.04
-revision=4
+revision=5
 hostmakedepends="python3 pkg-config flex freetype-devel font-unifont-bdf help2man"
 makedepends="libusb-compat-devel ncurses-devel freetype-devel
  liblzma-devel device-mapper-devel fuse-devel"

             reply	other threads:[~2021-02-28 23:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-28 23:14 q66 [this message]
2021-03-01  8:42 ` fosslinux
2021-03-04 23:30 ` [PR PATCH] [Updated] " q66
2021-03-04 23:33 ` [PR PATCH] [Merged]: " q66

Reply instructions:

You may reply publicly 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=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29142@inbox.vuxu.org \
    --to=q66@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).