Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1699725

Re: [PATCH v2 2/2] userfaultfd: selftest: Add tests for UFFD_FEATURE_SIGBUS feature

From Prakash Sangappa <prakash.sangappa@oracle.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/2] userfaultfd: selftest: Add tests for UFFD_FEATURE_SIGBUS feature
Date 2017-07-31 08:40 +0200
Message-ID <u9cwW-2P5-9@gated-at.bofh.it> (permalink)
References <u832G-61x-3@gated-at.bofh.it> <u8Qwq-5B9-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 7/30/17 12:07 AM, Mike Rapoport wrote:
> On Thu, Jul 27, 2017 at 10:18:40PM -0400, Prakash Sangappa wrote:
>> This patch adds tests for UFFD_FEATURE_SIGBUS feature. The
>> tests will verify signal delivery instead of userfault events.
>> Also, test use of UFFDIO_COPY to allocate memory and retry
>> accessing monitored area after signal delivery.
>>
>> This patch also fixes a bug in uffd_poll_thread() where 'uffd'
>> is leaked.
>>
>> Signed-off-by: Prakash Sangappa <prakash.sangappa@oracle.com>
>> ---
>> Change log
>>
>> v2:
>>    - Added comments to explain the tests.
>>    - Fixed test to fail immediately if signal repeats.
>>    - Addressed other review comments.
>>
>> v1: https://lkml.org/lkml/2017/7/26/101
>> ---
> Overall looks good to me, just small nitpick below.
[...]
>>   	for (nr = 0; nr < split_nr_pages; nr++) {
>> +		if (signal_test) {
>> +			if (sigsetjmp(*sigbuf, 1) != 0) {
>> +				if (nr == lastnr) {
>> +					sig_repeats++;
> You can simply 'return 1' here, then sig_repeats variable can be dropped
> and the return statement for signal_test can be simplified.

Ok, sent v3 patch with this change.

Thanks,
-Prakash.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2 2/2] userfaultfd: selftest: Add tests for UFFD_FEATURE_SIGBUS feature Prakash Sangappa <prakash.sangappa@oracle.com> - 2017-07-28 04:20 +0200
  Re: [PATCH v2 2/2] userfaultfd: selftest: Add tests for  UFFD_FEATURE_SIGBUS feature Mike Rapoport <rppt@linux.vnet.ibm.com> - 2017-07-30 09:10 +0200
    Re: [PATCH v2 2/2] userfaultfd: selftest: Add tests for  UFFD_FEATURE_SIGBUS feature Prakash Sangappa <prakash.sangappa@oracle.com> - 2017-07-31 08:40 +0200

csiph-web