<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/misc/lkdtm/usercopy.c, 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>2021-06-24T13:32:08Z</updated>
<entry>
<title>lkdtm: Add CONFIG hints in errors where possible</title>
<updated>2021-06-24T13:32:08Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2021-06-23T20:39:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5b777131bd8005acaf7e9d6e7690214155f42890'/>
<id>urn:sha1:5b777131bd8005acaf7e9d6e7690214155f42890</id>
<content type='text'>
For various failure conditions, try to include some details about where
to look for reasons about the failure.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/20210623203936.3151093-8-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lkdtm: use function_nocfi</title>
<updated>2021-04-08T23:04:22Z</updated>
<author>
<name>Sami Tolvanen</name>
</author>
<published>2021-04-08T18:28:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6c4df54ed293f6383efb97fca0e643b8dcbc3769'/>
<id>urn:sha1:6c4df54ed293f6383efb97fca0e643b8dcbc3769</id>
<content type='text'>
To ensure we take the actual address of a function in kernel text,
use function_nocfi. Otherwise, with CONFIG_CFI_CLANG, the compiler
replaces the address with a pointer to the CFI jump table, which is
actually in the module when compiled with CONFIG_LKDTM=m.

Signed-off-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Tested-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/20210408182843.1754385-11-samitolvanen@google.com
</content>
</entry>
<entry>
<title>lkdtm: remove set_fs-based tests</title>
<updated>2020-09-09T02:21:34Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2020-09-03T14:22:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c6f7c753f71cccb21d1a7f0c1127ce7804374c5e'/>
<id>urn:sha1:c6f7c753f71cccb21d1a7f0c1127ce7804374c5e</id>
<content type='text'>
Once we can't manipulate the address limit, we also can't test what
happens when the manipulation is abused.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>lkdtm: Avoid more compiler optimizations for bad writes</title>
<updated>2020-06-29T16:41:39Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2020-06-25T20:37:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=464e86b4abadfc490f426954b431e2ec6a9d7bd2'/>
<id>urn:sha1:464e86b4abadfc490f426954b431e2ec6a9d7bd2</id>
<content type='text'>
It seems at least Clang is able to throw away writes it knows are
destined for read-only memory, which makes things like the WRITE_RO test
fail, as the write gets elided. Instead, force the variable to be
volatile, and make similar changes through-out other tests in an effort
to avoid needing to repeat fixing these kinds of problems. Also includes
pr_err() calls in failure paths so that kernel logs are more clear in
the failure case.

Reported-by: Prasad Sodagudi &lt;psodagud@codeaurora.org&gt;
Suggested-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;
Fixes: 9ae113ce5faf ("lkdtm: add tests for additional page permissions")
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/20200625203704.317097-2-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lkdtm/usercopy: Moves the KERNEL_DS test to non-canonical</title>
<updated>2019-04-07T17:38:31Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2019-04-06T15:52:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2bf8496f6e9b7e9a557f65eb95eab16fea7958c7'/>
<id>urn:sha1:2bf8496f6e9b7e9a557f65eb95eab16fea7958c7</id>
<content type='text'>
The prior implementation of the KERNEL_DS fault checking would work on
any unmapped kernel address, but this was narrowed to the non-canonical
range instead. This adjusts the LKDTM test to match.

Fixes: 00c42373d397 ("x86-64: add warning for non-canonical user access address dereferences")
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'char-misc-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc</title>
<updated>2018-10-26T16:11:43Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2018-10-26T16:11:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=18d0eae30e6a4f8644d589243d7ac1d70d29203d'/>
<id>urn:sha1:18d0eae30e6a4f8644d589243d7ac1d70d29203d</id>
<content type='text'>
Pull char/misc driver updates from Greg KH:
 "Here is the big set of char/misc patches for 4.20-rc1.

  Loads of things here, we have new code in all of these driver
  subsystems:
   - fpga
   - stm
   - extcon
   - nvmem
   - eeprom
   - hyper-v
   - gsmi
   - coresight
   - thunderbolt
   - vmw_balloon
   - goldfish
   - soundwire
  along with lots of fixes and minor changes to other small drivers.

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'char-misc-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (245 commits)
  Documentation/security-bugs: Clarify treatment of embargoed information
  lib: Fix ia64 bootloader linkage
  MAINTAINERS: Clarify UIO vs UIOVEC maintainer
  docs/uio: fix a grammar nitpick
  docs: fpga: document programming fpgas using regions
  fpga: add devm_fpga_region_create
  fpga: bridge: add devm_fpga_bridge_create
  fpga: mgr: add devm_fpga_mgr_create
  hv_balloon: Replace spin_is_locked() with lockdep
  sgi-xp: Replace spin_is_locked() with lockdep
  eeprom: New ee1004 driver for DDR4 memory
  eeprom: at25: remove unneeded 'at25_remove'
  w1: IAD Register is yet readable trough iad sys file. Fix snprintf (%u for unsigned, count for max size).
  misc: mic: scif: remove set but not used variables 'src_dma_addr, dst_dma_addr'
  misc: mic: fix a DMA pool free failure
  platform: goldfish: pipe: Add a blank line to separate varibles and code
  platform: goldfish: pipe: Remove redundant casting
  platform: goldfish: pipe: Call misc_deregister if init fails
  platform: goldfish: pipe: Move the file-scope goldfish_pipe_dev variable into the driver state
  platform: goldfish: pipe: Move the file-scope goldfish_pipe_miscdev variable into the driver state
  ...
</content>
</entry>
<entry>
<title>misc: lkdtm: fixed static variable initialization</title>
<updated>2018-09-12T07:46:46Z</updated>
<author>
<name>Parth Y Shah</name>
</author>
<published>2018-08-06T07:10:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0181cfd93c7b09a3fc69ff734e84c49bfe7d9020'/>
<id>urn:sha1:0181cfd93c7b09a3fc69ff734e84c49bfe7d9020</id>
<content type='text'>
Resolved "ERROR: do not initialise statics to 0"

Signed-off-by: Parth Y Shah &lt;sparth1292@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lkdtm: Test copy_to_user() on bad kernel pointer under KERNEL_DS</title>
<updated>2018-09-03T13:12:10Z</updated>
<author>
<name>Jann Horn</name>
</author>
<published>2018-08-28T20:14:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bef459026b161fbc39d20dcba698ed0cfffbac38'/>
<id>urn:sha1:bef459026b161fbc39d20dcba698ed0cfffbac38</id>
<content type='text'>
Test whether the kernel WARN()s when, under KERNEL_DS, a bad kernel pointer
is used as "userspace" pointer. Should normally be used in "DIRECT" mode.

Signed-off-by: Jann Horn &lt;jannh@google.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Tested-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Andy Lutomirski &lt;luto@kernel.org&gt;
Cc: kernel-hardening@lists.openwall.com
Cc: dvyukov@google.com
Cc: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: "Naveen N. Rao" &lt;naveen.n.rao@linux.vnet.ibm.com&gt;
Cc: Anil S Keshavamurthy &lt;anil.s.keshavamurthy@intel.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: linux-fsdevel@vger.kernel.org
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Link: https://lkml.kernel.org/r/20180828201421.157735-8-jannh@google.com

</content>
</entry>
<entry>
<title>lkdtm: Relocate code to subdirectory</title>
<updated>2018-03-07T03:18:55Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2018-03-06T22:58:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=039a1c42058db54692a6d4497508bd48555f29fb'/>
<id>urn:sha1:039a1c42058db54692a6d4497508bd48555f29fb</id>
<content type='text'>
The LKDTM modules keep expanding, and it's getting weird to have each file
get a prefix. Instead, move to a subdirectory for cleaner handling.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
