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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 26 Jul 2017 12:02:31 -0700
From:   Prakash Sangappa <prakash.sangappa@...cle.com>
To:     Andrea Arcangeli <aarcange@...hat.com>
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        linux-api@...r.kernel.org, rppt@...ux.vnet.ibm.com,
        akpm@...ux-foundation.org, mike.kravetz@...cle.com
Subject: Re: [RESEND PATCH 2/2] userfaultfd: selftest: Add tests for
 UFFD_FREATURE_SIGBUS



On 7/26/17 7:27 AM, Andrea Arcangeli wrote:
> On Tue, Jul 25, 2017 at 12:47:42AM -0400, Prakash Sangappa wrote:
>> Signed-off-by: Prakash Sangappa <prakash.sangappa@...cle.com>
>> ---
>>   tools/testing/selftests/vm/userfaultfd.c |  121 +++++++++++++++++++++++++++++-
>>   1 files changed, 118 insertions(+), 3 deletions(-)
> Like Mike said, some comment about the test would be better, commit
> messages are never one liners in the kernel.

Ok

>
>> @@ -408,6 +409,7 @@ static int copy_page(int ufd, unsigned long offset)
>>   				userfaults++;
>>   			break;
>>   		case UFFD_EVENT_FORK:
>> +			close(uffd);
>>   			uffd = msg.arg.fork.ufd;
>>   			pollfd[0].fd = uffd;
>>   			break;
> Isn't this fd leak bugfix independent of the rest of the changes? The
> only side effects should have been that it could run out of fds, but I
> assume this was found by source review as I doubt it could run out of fds.
> This could be splitted off in a separate patch.

Not just the fd leak, it causes problems here with the addition of the
new test userfaultfd_sig_test(). Since the original vma registration
persists in the parent, subsequent registration in userfaultfd_events_test()
fails with 'EBUSY' error, as userfault implementation does not allow
registering same vma with another uffd, while one exists.

Therefore, will need this change. I could just leave this fix here along
with the rest of the changes, will that be ok?

-Prakash

> Overall it looks a good test also exercising UFFD_EVENT_FORK at the
> same time.
>
> Thanks,
> Andrea

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ