<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/misc/lkdtm, branch linux-5.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-01-27T11:01:22Z</updated>
<entry>
<title>lkdtm: Fix content of section containing lkdtm_rodata_do_nothing()</title>
<updated>2022-01-27T11:01:22Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2021-10-08T16:58:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=89421c976d5c34e4420255e5950bd263ebe2cfa8'/>
<id>urn:sha1:89421c976d5c34e4420255e5950bd263ebe2cfa8</id>
<content type='text'>
commit bc93a22a19eb2b68a16ecf04cdf4b2ed65aaf398 upstream.

On a kernel without CONFIG_STRICT_KERNEL_RWX, running EXEC_RODATA
test leads to "Illegal instruction" failure.

Looking at the content of rodata_objcopy.o, we see that the
function content zeroes only:

	Disassembly of section .rodata:

	0000000000000000 &lt;.lkdtm_rodata_do_nothing&gt;:
	   0:	00 00 00 00 	.long 0x0

Add the contents flag in order to keep the content of the section
while renaming it.

	Disassembly of section .rodata:

	0000000000000000 &lt;.lkdtm_rodata_do_nothing&gt;:
	   0:	4e 80 00 20 	blr

Fixes: e9e08a07385e ("lkdtm: support llvm-objcopy")
Cc: stable@vger.kernel.org
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Cc: Nathan Chancellor &lt;nathan@kernel.org&gt;
Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Reviewed-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/8900731fbc05fb8b0de18af7133a8fc07c3c53a1.1633712176.git.christophe.leroy@csgroup.eu
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lkdtm/bugs: Check that a per-task stack canary exists</title>
<updated>2021-10-25T07:13:46Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2021-10-22T22:38:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d46e58ef776bc6548b17b563ec4a8ed30c6643da'/>
<id>urn:sha1:d46e58ef776bc6548b17b563ec4a8ed30c6643da</id>
<content type='text'>
Introduce REPORT_STACK_CANARY to check for differing stack canaries
between two processes (i.e. that an architecture is correctly implementing
per-task stack canaries), using the task_struct canary as the hint to
locate in the stack. Requires that one of the processes being tested
not be pid 1.

Cc: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/20211022223826.330653-3-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lkdtm: Use init_uts_ns.name instead of macros</title>
<updated>2021-09-10T15:09:40Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2021-09-01T23:34:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a3a11e6e5a2bc0595c7e36ae33c861c9e8c75b1'/>
<id>urn:sha1:3a3a11e6e5a2bc0595c7e36ae33c861c9e8c75b1</id>
<content type='text'>
Using generated/compile.h triggered a full LKDTM rebuild with every
build. Avoid this by using the exported strings instead.

Fixes: b8661450bc7f ("lkdtm: Add kernel version to failure hints")
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/20210901233406.2571643-1-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lkdtm: remove IDE_CORE_CP crashpoint</title>
<updated>2021-08-19T05:40:22Z</updated>
<author>
<name>Kevin Mitchell</name>
</author>
<published>2021-08-19T02:29:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b2159182dd498fdb0f49e371ccc94efbc12d1f8e'/>
<id>urn:sha1:b2159182dd498fdb0f49e371ccc94efbc12d1f8e</id>
<content type='text'>
With the removal of the legacy IDE driver in kb7fb14d3ac63 ("ide: remove
the legacy ide driver"), this crashpoint no longer points to a valid
function.

Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Kevin Mitchell &lt;kevmitch@arista.com&gt;
Link: https://lore.kernel.org/r/20210819022940.561875-3-kevmitch@arista.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lkdtm: replace SCSI_DISPATCH_CMD with SCSI_QUEUE_RQ</title>
<updated>2021-08-19T05:40:22Z</updated>
<author>
<name>Kevin Mitchell</name>
</author>
<published>2021-08-19T02:29:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d1f278da6b11585f05b2755adfc8851cbf14a1ec'/>
<id>urn:sha1:d1f278da6b11585f05b2755adfc8851cbf14a1ec</id>
<content type='text'>
When scsi_dispatch_cmd was moved to scsi_lib.c and made static, some
compilers (i.e., at least gcc 8.4.0) decided to compile this
inline. This is a problem for lkdtm.ko, which inserted a kprobe
on this function for the SCSI_DISPATCH_CMD crashpoint.

Move this crashpoint one function up the call chain to
scsi_queue_rq. Though this is also a static function, it should never be
inlined because it is assigned as a structure entry. Therefore,
kprobe_register should always be able to find it.

Fixes: 82042a2cdb55 ("scsi: move scsi_dispatch_cmd to scsi_lib.c")
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Kevin Mitchell &lt;kevmitch@arista.com&gt;
Link: https://lore.kernel.org/r/20210819022940.561875-2-kevmitch@arista.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lkdtm/heap: Avoid __alloc_size hint warning for VMALLOC_LINEAR_OVERFLOW</title>
<updated>2021-08-18T20:28:51Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2021-08-18T17:48:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e6d468d32cd084edd030a8bae76440b17b854b5c'/>
<id>urn:sha1:e6d468d32cd084edd030a8bae76440b17b854b5c</id>
<content type='text'>
Once __alloc_size hints have been added, the compiler will (correctly!)
see this as an overflow. We are, however, trying to test for this
condition at run-time (not compile-time), so work around it with a
volatile int offset.

Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/20210818174855.2307828-5-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lkdtm: Add kernel version to failure hints</title>
<updated>2021-08-18T20:28:51Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2021-08-18T17:48:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b8661450bc7f1f3dd746f8cac48534e0dfdc1cdf'/>
<id>urn:sha1:b8661450bc7f1f3dd746f8cac48534e0dfdc1cdf</id>
<content type='text'>
In an effort to keep as much information in once place as possible in
CI logs, report the kernel version and architecture in the failure hints.

Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: kernelci@groups.io
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/20210818174855.2307828-4-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lkdtm/fortify: Consolidate FORTIFY_SOURCE tests</title>
<updated>2021-08-18T20:28:51Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2021-08-18T17:48:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fe8e353bfda6d6c8cefd0a933640025ad3d302e5'/>
<id>urn:sha1:fe8e353bfda6d6c8cefd0a933640025ad3d302e5</id>
<content type='text'>
The FORTIFY_SOURCE tests were split between bugs.c and fortify.c. Move
tests into fortify.c, standardize their naming, add CONFIG hints, and
add them to the lkdtm selftests.

Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/20210818174855.2307828-3-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lkdtm/bugs: Add ARRAY_BOUNDS to selftests</title>
<updated>2021-08-18T20:28:51Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2021-08-18T17:48:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c75be56e35b2eef824a2ac8d90a98f9e65b28efa'/>
<id>urn:sha1:c75be56e35b2eef824a2ac8d90a98f9e65b28efa</id>
<content type='text'>
Add CONFIG hints about why the ARRAY_BOUNDS test might fail, and
similarly include the CONFIGs needed to pass the ARRAY_BOUNDS test via
the selftests, and add to selftests.

Cc: kernelci@groups.io
Suggested-by: Guillaume Tucker &lt;guillaume.tucker@collabora.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/20210818174855.2307828-2-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lkdtm: remove duplicated include of init.h</title>
<updated>2021-07-21T13:50:26Z</updated>
<author>
<name>Wan Jiabing</name>
</author>
<published>2021-06-28T12:35:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=36cdc20b79ef8841d38217ea8ba837a7dbfbe852'/>
<id>urn:sha1:36cdc20b79ef8841d38217ea8ba837a7dbfbe852</id>
<content type='text'>
Fix following checkincludes.pl warning:
./drivers/misc/lkdtm/core.c
26	#include &lt;linux/init.h&gt;
    29	#include &lt;linux/init.h&gt;

Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Wan Jiabing &lt;wanjiabing@vivo.com&gt;
Link: https://lore.kernel.org/r/20210628123512.38090-1-wanjiabing@vivo.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
