No description
Find a file
Randy Dunlap b689622cc4 TOMOYO: fix __setup handlers return values
[ Upstream commit 39844b7e30 ]

__setup() handlers should return 1 if the parameter is handled.
Returning 0 causes the entire string to be added to init's
environment strings (limited to 32 strings), unnecessarily polluting it.

Using the documented strings "TOMOYO_loader=string1" and
"TOMOYO_trigger=string2" causes an Unknown parameter message:
  Unknown kernel command line parameters
    "BOOT_IMAGE=/boot/bzImage-517rc5 TOMOYO_loader=string1 \
     TOMOYO_trigger=string2", will be passed to user space.

and these strings are added to init's environment string space:
  Run /sbin/init as init process
    with arguments:
     /sbin/init
    with environment:
     HOME=/
     TERM=linux
     BOOT_IMAGE=/boot/bzImage-517rc5
     TOMOYO_loader=string1
     TOMOYO_trigger=string2

With this change, these __setup handlers act as expected,
and init's environment is not polluted with these strings.

Fixes: 0e4ae0e0de ("TOMOYO: Make several options configurable.")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Igor Zhbanov <i.zhbanov@omprussia.ru>
Link: https://lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru
Cc: James Morris <jmorris@namei.org>
Cc: Kentaro Takeda <takedakn@nttdata.co.jp>
Cc: tomoyo-dev-en@lists.osdn.me
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-15 14:18:13 +02:00
arch powerpc/perf: Don't use perf_hw_context for trace IMC PMU 2022-04-15 14:18:11 +02:00
block block: don't delete queue kobject before its children 2022-04-15 14:18:05 +02:00
certs certs: Trigger creation of RSA module signing key if it's not an RSA key 2021-09-15 09:47:29 +02:00
crypto crypto: authenc - Fix sleep in atomic context in decrypt_tail 2022-04-15 14:18:04 +02:00
Documentation Documentation: update stable tree link 2022-04-15 14:17:58 +02:00
drivers drm/amd/display: Remove vupdate_int_entry definition 2022-04-15 14:18:13 +02:00
fs f2fs: fix to avoid potential deadlock 2022-04-15 14:18:06 +02:00
include block: don't merge across cgroup boundaries if blkcg is enabled 2022-04-15 14:18:01 +02:00
init bpf: Add kconfig knob for disabling unpriv bpf by default 2022-02-16 12:52:49 +01:00
ipc shm: extend forced shm destroy to support objects from several IPC nses 2021-12-01 09:23:35 +01:00
kernel printk: fix return value of printk.devkmsg __setup handler 2022-04-15 14:18:08 +02:00
lib lib/raid6/test: fix multiple definition linking error 2022-04-15 14:18:02 +02:00
LICENSES
mm mm/kmemleak: reset tag when compare object pointer 2022-04-15 14:18:01 +02:00
net udp: call udp_encap_enable for v6 sockets when enabling encap 2022-04-15 14:18:01 +02:00
samples samples/kretprobes: Fix return value if register_kretprobe() failed 2021-11-17 09:48:39 +01:00
scripts kconfig: fix failing to generate auto.conf 2022-02-23 12:00:01 +01:00
security TOMOYO: fix __setup handlers return values 2022-04-15 14:18:13 +02:00
sound ASoC: msm8916-wcd-analog: Fix error handling in pm8916_wcd_analog_spmi_probe 2022-04-15 14:18:10 +02:00
tools selftests/x86: Add validity check and allow field splitting 2022-04-15 14:18:04 +02:00
usr initramfs: restore default compression behavior 2020-04-08 09:08:38 +02:00
virt KVM: arm64: Allow SMCCC_ARCH_WORKAROUND_3 to be discovered and migrated 2022-03-19 13:40:15 +01:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap ARM: SoC fixes 2019-11-10 13:41:59 -08:00
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS Documentation/llvm: add documentation on building w/ Clang/LLVM 2020-08-26 10:40:46 +02:00
Makefile Linux 5.4.188 2022-03-28 08:46:49 +02:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.