Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux_5_7: init at 5.7.1 #89820

Merged
merged 2 commits into from Jun 9, 2020
Merged

linux_5_7: init at 5.7.1 #89820

merged 2 commits into from Jun 9, 2020

Conversation

primeos
Copy link
Member

@primeos primeos commented Jun 8, 2020

Changes:

  • Copied linux-5.7.nix from linux-5.6.nix
  • Add linux_5_7 and linuxPackages_5_7
  • Update linux_latest to 5.7
  • linuxPackages_latest_hardened keep at 5.6 until the patches for 5.7
    are released, e.g. 0 (currently 404)

Note:
The kernel patch 'kernelPatches.export_kernel_fpu_functions."5.3"' is
still applied as I copied the list from linux_5_7 (vs. linux_testing).
This patch is probably still required for the ZFS performance.

Motivation for this change

Another GPU hang on 5.6.x thanks to i915... -> I decided to switch to 5.7 right away

I tested that the kernel does at least boot:

michael@jarvis:~]$ uptime
 19:13:09  up   0:07,  1 user,  load average: 0.98, 1.42, 0.72

[michael@jarvis:~]$ uname -a
Linux jarvis 5.7.1 #1-NixOS SMP Sun Jun 7 09:33:02 UTC 2020 x86_64 GNU/Linux
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Changes:
- Copied linux-5.7.nix from linux-5.6.nix
- Add linux_5_7 and linuxPackages_5_7
- Update linux_latest to 5.7

Note:
The kernel patch 'kernelPatches.export_kernel_fpu_functions."5.3"' is
still applied as I copied the list from linux_5_7 (vs. linux_testing).
This patch is probably still required for the ZFS performance.
@primeos primeos force-pushed the linux_5_7 branch 2 times, most recently from b66ee59 to f3b3c34 Compare June 8, 2020 18:18
@NeQuissimus
Copy link
Member

I think this is OK for now but this needs to be fixed ASAP :D
I am not sure what the best way forward would be, I don't want the different kernel variations to become unwieldy...

This adds an abstraction/hack to update the latest hardened kernel
independent of linux_latest, which is required as the hardened patches
aren't immediately available ([0] currently doesn't exist).
Currently the Linux hardened patches aren't even available for 5.7 which
was released on 2020-05-31 (already 9 days ago!).
Therefore it is required to keep both linuxPackages_latest_hardened and
linuxPackages_latest_xen_dom0_hardened at 5.6 until the patches for 5.7
are released.

This abstraction makes that task more manageable but we should aim for a
better solution to resolve this or at least a cleaner and more robust
implementation (in the sense of better error messages).

[0]: https://github.com/anthraxx/linux-hardened/releases/tag/5.7.1.a
@primeos
Copy link
Member Author

primeos commented Jun 9, 2020

I did extract the hardenedLinuxPackagesFor into a separate commit to document that change independently and so that we could easily revert it if we want. I didn't make any actual changes.

On my system the kernel is still running fine without any noticeable regressions:

$ uptime
 15:50:18  up  20:44,  1 user,  load average: 0.63, 0.65, 0.64

So let's give this a go :)

I think this is OK for now but this needs to be fixed ASAP :D

Agreed

I am not sure what the best way forward would be, I don't want the different kernel variations to become unwieldy...

Yes, this already seems quite difficult to manage (hardened/libre patches, different major versions, feature/configuration overrides, etc.) even though our abstractions seem to help a lot to manage the complexity.

@NeQuissimus anyway, thanks a lot for maintaining the Linux kernel :)

@primeos primeos merged commit e0c970c into NixOS:master Jun 9, 2020
dtzWill pushed a commit to dtzWill/nixpkgs that referenced this pull request Jun 9, 2020
linux_5_7: init at 5.7.1

(cherry picked from commit e0c970c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants