lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202406271250.A227529@keescook>
Date: Thu, 27 Jun 2024 12:51:40 -0700
From: Kees Cook <kees@...nel.org>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Mark Rutland <mark.rutland@....com>, David Gow <davidgow@...gle.com>,
	Vitor Massaru Iha <vitor@...saru.org>,
	Ivan Orlov <ivan.orlov0322@...il.com>,
	Brendan Higgins <brendan.higgins@...ux.dev>,
	Rae Moar <rmoar@...gle.com>,
	"Gustavo A. R. Silva" <gustavoars@...nel.org>,
	linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
	kunit-dev@...glegroups.com, linux-hardening@...r.kernel.org
Subject: Re: [PATCH v3 1/2] kunit: test: Add vm_mmap() allocation resource
 manager

On Sat, Jun 22, 2024 at 06:47:39AM -0700, Guenter Roeck wrote:
> Hi,
> 
> On Wed, Jun 12, 2024 at 12:59:18PM -0700, Kees Cook wrote:
> > For tests that need to allocate using vm_mmap() (e.g. usercopy and
> > execve), provide the interface to have the allocation tracked by KUnit
> > itself. This requires bringing up a placeholder userspace mm.
> > 
> > This combines my earlier attempt at this with Mark Rutland's version[1].
> > 
> > Normally alloc_mm() and arch_pick_mmap_layout() aren't exported for
> > modules, so export these only for KUnit testing.
> > 
> > Link: https://lore.kernel.org/lkml/20230321122514.1743889-2-mark.rutland@arm.com/ [1]
> 
> FWIW, not sure I understand what the above link has to do with this patch.

Both the above Link and this patch were implementing KUnit usercopy
tests (and the required infrastructure).

> 
> > Co-developed-by: Mark Rutland <mark.rutland@....com>
> > Signed-off-by: Mark Rutland <mark.rutland@....com>
> > Reviewed-by: David Gow <davidgow@...gle.com>
> > Signed-off-by: Kees Cook <kees@...nel.org>
> 
> This patch results in a build failure for nommu_kc705_defconfig if kunit tests
> are also enabled.
> 
> ERROR: modpost: vmlinux: local symbol 'arch_pick_mmap_layout' was exported
> 
> If CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=n, CONFIG_MMU=n, and
> CONFIG_KUNIT=y, arch_pick_mmap_layout is exported. However, if
> CONFIG_MMU=n, it is declared as static inline function.

I replied in the other thread too, but this has had a fix pending:
https://lore.kernel.org/lkml/202406271005.4E767DAE@keescook/

I pinged the patch again today.

-Kees

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ