The kernel log holds memory addresses, hardware details and driver errors. That is useful to an attacker who already has a normal shell, so I don’t want every user reading it.
First see what you have now:
sysctl kernel.dmesg_restrict kernel.kptr_restrict
With dmesg_restrict set to 1, a user needs CAP_SYSLOG, in practice root, to run dmesg. Many distributions already ship it that way, but I’d check instead of assuming. To make it stick, put it in a file of its own:
printf 'kernel.dmesg_restrict = 1\nkernel.kptr_restrict = 1\n' | sudo tee /etc/sysctl.d/60-kernel-hardening.conf
sudo sysctl --system
The second setting is a companion. kptr_restrict = 1 replaces kernel pointers printed in places like /proc/kallsyms with zeros for anyone without CAP_SYSLOG. A value of 2 hides them from root as well.
Expect a small cost in convenience. Admins in the adm group who used to run dmesg without sudo will now get Operation not permitted. They can still use sudo dmesg, or journalctl -k if they have read access to the journal. Containers share the host kernel, so these values are set on the host, not inside a container.
Further reading: Linux kernel documentation: /proc/sys/kernel