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: <CAHUa44EAR=5Syz9vz4pCNm8ytqd3rhj=PDE8trAvOiAdhs_T8A@mail.gmail.com>
Date:   Mon, 12 Oct 2020 13:35:06 +0200
From:   Jens Wiklander <jens.wiklander@...aro.org>
To:     Volodymyr Babchuk <Volodymyr_Babchuk@...m.com>
Cc:     "tee-dev@...ts.linaro.org" <tee-dev@...ts.linaro.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] optee: remove address tag in check_mem_type()

On Mon, Oct 12, 2020 at 11:26 AM Volodymyr Babchuk
<Volodymyr_Babchuk@...m.com> wrote:
>
> Before passing 'start' to find_vma() we need to remove
> tags from it to get sane results.
>
> Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@...m.com>
> ---
>  drivers/tee/optee/call.c | 2 ++
>  1 file changed, 2 insertions(+)

Would you mind giving a bit more background to this? For example in
which contexts this function does or doesn't work as expected? Do you
have any special use cases that don't work, etc? This is not a new
regression, it's rather a problem we've always had, right?

Thanks,
Jens

>
> diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c
> index a5afbe6dee68..61420395137b 100644
> --- a/drivers/tee/optee/call.c
> +++ b/drivers/tee/optee/call.c
> @@ -562,6 +562,8 @@ static int check_mem_type(unsigned long start, size_t num_pages)
>         struct mm_struct *mm = current->mm;
>         int rc;
>
> +       start = untagged_addr(start);
> +
>         down_read(&mm->mmap_sem);
>         rc = __check_mem_type(find_vma(mm, start),
>                               start + num_pages * PAGE_SIZE);
> --
> 2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ