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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 15 Dec 2023 14:59:51 +0000
From: Mark Brown <broonie@...nel.org>
To: Thiago Jung Bauermann <thiago.bauermann@...aro.org>
Cc: Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will@...nel.org>, Jonathan Corbet <corbet@....net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Marc Zyngier <maz@...nel.org>,
	Oliver Upton <oliver.upton@...ux.dev>,
	James Morse <james.morse@....com>,
	Suzuki K Poulose <suzuki.poulose@....com>,
	Arnd Bergmann <arnd@...db.de>, Oleg Nesterov <oleg@...hat.com>,
	Eric Biederman <ebiederm@...ssion.com>,
	Kees Cook <keescook@...omium.org>, Shuah Khan <shuah@...nel.org>,
	"Rick P. Edgecombe" <rick.p.edgecombe@...el.com>,
	Deepak Gupta <debug@...osinc.com>, Ard Biesheuvel <ardb@...nel.org>,
	Szabolcs Nagy <Szabolcs.Nagy@....com>,
	"H.J. Lu" <hjl.tools@...il.com>,
	Paul Walmsley <paul.walmsley@...ive.com>,
	Palmer Dabbelt <palmer@...belt.com>,
	Albert Ou <aou@...s.berkeley.edu>,
	Florian Weimer <fweimer@...hat.com>,
	Christian Brauner <brauner@...nel.org>,
	linux-arm-kernel@...ts.infradead.org, linux-doc@...r.kernel.org,
	kvmarm@...ts.linux.dev, linux-fsdevel@...r.kernel.org,
	linux-arch@...r.kernel.org, linux-mm@...ck.org,
	linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-riscv@...ts.infradead.org
Subject: Re: [PATCH v7 34/39] kselftest/arm64: Add a GCS test program built
 with the system libc

On Thu, Dec 14, 2023 at 11:50:11PM -0300, Thiago Jung Bauermann wrote:
> Mark Brown <broonie@...nel.org> writes:

> > +	ret = process_vm_writev(child, &local_iov, 1, &remote_iov, 1, 0);
> > +	if (ret == -1)
> > +		ksft_print_msg("process_vm_readv() failed: %s (%d)\n",
> > +			       strerror(errno), errno);

> The comment and the error message say "process_vm_readv()", but the
> function actually called is process_vm_writev(). Is this intended?

No, that's a rebasing issue.

> If I swap process_vm_readv() and process_vm_writev(), then the read
> succeeds but the write fails:
> 
> #  RUN           global.ptrace_read_write ...
> # Child: 1996
> # Child GCSPR 0xffffa7fcffd8, flags 1, locked 0
> # process_vm_writev() failed: Bad address (14)
> # libc-gcs.c:291:ptrace_read_write:Expected ret (-1) == sizeof(rval) (8)
> # libc-gcs.c:293:ptrace_read_write:Expected val (281473500358268) == ptrace(PTRACE_PEEKDATA, child, (void *)gcspr, NULL) (0)
> # ptrace_read_write: Test failed at step #1
> #          FAIL  global.ptrace_read_write
> not ok 4 global.ptrace_read_write

Yeah, I did notice something had happened with the writes but didn't
investigate yet.

> Also, it's strange that the tests defined after map_gcs.stack_overflow
> don't run when I execute this test program. I'm doing:

> $ ./run_kselftest.sh -t arm64:libc-gcs

> I.e., these tests aren't being run in my FVP:

> > +FIXTURE_VARIANT_ADD(map_invalid_gcs, too_small)
> > +FIXTURE_VARIANT_ADD(map_invalid_gcs, unligned_1)
> > +FIXTURE_VARIANT_ADD(map_invalid_gcs, unligned_2)
> > +FIXTURE_VARIANT_ADD(map_invalid_gcs, unligned_3)
> > +FIXTURE_VARIANT_ADD(map_invalid_gcs, unligned_4)
> > +FIXTURE_VARIANT_ADD(map_invalid_gcs, unligned_5)
> > +FIXTURE_VARIANT_ADD(map_invalid_gcs, unligned_6)
> > +FIXTURE_VARIANT_ADD(map_invalid_gcs, unligned_7)
> > +TEST_F(map_invalid_gcs, do_map)
> > +FIXTURE_VARIANT_ADD(invalid_mprotect, exec)
> > +FIXTURE_VARIANT_ADD(invalid_mprotect, bti)
> > +FIXTURE_VARIANT_ADD(invalid_mprotect, exec_bti)
> > +TEST_F(invalid_mprotect, do_map)
> > +TEST_F(invalid_mprotect, do_map_read)

I'm seeing all of those appearing.  I'm not sure what to say there -
that's all kselftest framework stuff, I'd expect the framework to say
something about what it's doing if it decides to skip and I can't think
why it would decide to skip.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ