Github messages for voidlinux
 help / color / mirror / Atom feed
From: q66 <q66@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] drop slub_debug/page_poison from bootloaders
Date: Fri, 05 Mar 2021 00:30:20 +0100	[thread overview]
Message-ID: <20210304233020.y-9Cty0eS2ASPgIj0c9pMyY4fJwxLtR5ZS1l7-7drUg@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-29142@inbox.vuxu.org>

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

There is an updated 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]

Anyway, waiting with merging this until the affected kernels have been rebuilt (i.e. for their next version bump).

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: 2928 bytes --]

From bc5d8dad48eb250f89933dbe5ce07c61a4000b5b Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 1 Mar 2021 00:01:29 +0100
Subject: [PATCH 1/2] 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 1f02a1eb483b9f49f066fd670ae1478110d1c231 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 1 Mar 2021 00:01:59 +0100
Subject: [PATCH 2/2] 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*"

  parent reply	other threads:[~2021-03-04 23:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-28 23:14 [PR PATCH] " q66
2021-03-01  8:42 ` fosslinux
2021-03-04 23:30 ` q66 [this message]
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=20210304233020.y-9Cty0eS2ASPgIj0c9pMyY4fJwxLtR5ZS1l7-7drUg@z \
    --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).