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]
Message-Id: <834254e6-a9c2-440c-9c67-fc5fa5ca43bc@app.fastmail.com>
Date:   Sun, 05 Feb 2023 10:55:38 +0100
From:   "Arnd Bergmann" <arnd@...db.de>
To:     "Nhat Pham" <nphamcs@...il.com>,
        "Andrew Morton" <akpm@...ux-foundation.org>
Cc:     "Johannes Weiner" <hannes@...xchg.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, bfoster@...hat.com,
        "Matthew Wilcox" <willy@...radead.org>, linux-api@...r.kernel.org,
        kernel-team@...a.com
Subject: Re: [PATCH v9 2/3] cachestat: implement cachestat syscall

On Fri, Feb 3, 2023, at 20:04, Nhat Pham wrote:

> +SYSCALL_DEFINE5(cachestat, unsigned int, fd, loff_t, off, size_t, len,
> +		struct cachestat __user *, cstat, unsigned int, flags)
> +{
> +	return ksys_cachestat(fd, off, len, cstat, flags);
> +}
> +
> +#ifdef CONFIG_COMPAT
> +COMPAT_SYSCALL_DEFINE6(cachestat, unsigned int, fd, 
> compat_arg_u64_dual(off),
> +		size_t, len, struct cachestat __user *, cstat, unsigned int, flags)
> +{
> +	return ksys_cachestat(fd, compat_arg_u64_glue(off), len, cstat, 
> flags);
> +}

This still looks wrong to me, as this compat definition does not match
the native variant on architectures that require 64-bit arguments to
be passed in aligned register pairs, such as arm, mips or ppc, but
not x86, s390 or riscv.

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ