Turning off spectre and meltdown protection in Linux

This is perhaps not the best thing to do always, particularly not in a desktop Linux system. But in my case, I have some machines that are inside a firewall, doing nothing but compiling software, and it generally doesn't run things that are unsafe or from the wild. Turning off these protections can give you significant performance improvements (well, returning to the old performance before Spectre). Here's what I did for my Fedora 29 boxes:

In /etc/default/grub, append:

GRUB_CMDLINE_LINUX="... quiet pti=off spectre_v2=off l1tf=off nospec_store_bypass_disable no_stf_barrier"

Then, re-run the grub2 command, in my case, since I'm on EFI, it's

grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

Alternatively, you would run

grub2-mkconfig -o /boot/grub2/grub.cfg