public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Ammar Faizi <[email protected]>,
	Pavel Begunkov <[email protected]>,
	io-uring Mailing List <[email protected]>
Cc: Bedirhan KURT <[email protected]>,
	Louvian Lyndal <[email protected]>
Subject: Re: [PATCH v2 liburing 1/4] test/thread-exit: Fix use after free bug
Date: Sun, 10 Oct 2021 05:25:35 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 10/10/21 12:39 AM, Ammar Faizi wrote:
> When I add support for nolibc x86-64, I find this test failed.
> 
> Long story short, we provide our own `free()` that always unmaps the VM
> with `munmap()`. It makes the CQE return -EFAULT because the kernel
> reads unmapped user memory from the pending `write()` SQE.
> 
> I believe this test can run properly with libc build because `free()`
> from libc doesn't always unmap the memory, instead it uses free list on
> the userspace and the freed heap may still be userspace addressable.
> 
> Fix this by deferring the free.

Applied, thanks.

-- 
Jens Axboe


  reply	other threads:[~2021-10-10 11:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-10  6:39 [PATCHSET v2 liburing 0/4] Add nolibc support for x86-64 arch Ammar Faizi
2021-10-10  6:39 ` [PATCH v2 liburing 1/4] test/thread-exit: Fix use after free bug Ammar Faizi
2021-10-10 11:25   ` Jens Axboe [this message]
2021-10-10  6:39 ` [PATCH v2 liburing 2/4] Add arch dependent directory and files Ammar Faizi
2021-10-10 11:16   ` Jens Axboe
2021-10-10  6:39 ` [PATCH v2 liburing 3/4] Add no libc build support Ammar Faizi
2021-10-10 11:19   ` Jens Axboe
2021-10-10  6:39 ` [PATCH v2 liburing 4/4] Add CONFIG_NOLIBC variable and macro Ammar Faizi
2021-10-10 11:22   ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox