All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rafael David Tinoco <rafael.tinoco@linaro.org>
To: Cyrill Gorcunov <gorcunov@gmail.com>,
	Alexey Dobriyan <adobriyan@gmail.com>
Cc: rafael.tinoco@linaro.org, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	shuah@kernel.org
Subject: Re: [PATCH] proc: fixup map_files test on arm
Date: Mon, 12 Nov 2018 14:35:39 -0200	[thread overview]
Message-ID: <f1805813-62b7-8572-d906-bc49b62d1bf3@linaro.org> (raw)
In-Reply-To: <20181112155559.GV13195@uranus.lan>

On 11/12/18 1:55 PM, Cyrill Gorcunov wrote:
> On Mon, Nov 12, 2018 at 05:14:57PM +0300, Alexey Dobriyan wrote:
> ...
>>>>   int main(void)
>>>>   {
>>>>   	const unsigned int PAGE_SIZE = sysconf(_SC_PAGESIZE);
>>>> +#ifdef __arm__
>>>> +	unsigned long va = 2 * PAGE_SIZE;
>>>> +#else
>>>> +	unsigned long va = 0;
>>>> +#endif
> ...
>>>
>>> I have sent a patch removing proc-self-map-files-002 AND making 001 to use as a
>>> HINT for mmap (MAP_FIXED) *at least*  *(2 * PAGE_SIZE), which would, likely,
>>> attend all  architectures, avoiding trying to make the test specific to one,
>>> and, still, test the symlinks for issues (like bad chars, spaces, so on).
>>
>> If the goal is to test the lowest address then going for 2*PAGE_SIZE is
>> a mistake.
>>
>> Which BTW hints to add a test for the highest address.
>>
>>> Both tests (001 and 002) have pretty much the same code, while they could have 2
>>> tests in a single code, using kselftest framework. Is NULL hint + MAP_FIXED
>>> something imperative for this test ? Why not to have all in a single test ?
>>
>> I dislike tests which lump everything together into one process.
>>
>>> Are you keeping the NULL hint just to test mmap, apart" from the core of
>>> this test ?
> 
> Guys, lets simply stick with Alexey's patch. I personnally think that
> testing mappings should be a separate test in vm/, but seriously this
> took too long already :) If Alexey's patch fixes the problem with arm
> I think we're fine.
> 

Fine for me. It works in armhf.

Tested-by: Rafael David Tinoco <rafael.tinoco@linaro.org>

Note: Maybe you should amend the patch and cast "va" in mmap() to avoid:

In file included from proc-self-map-files-002.c:7:
/usr/include/arm-linux-gnueabihf/sys/mman.h:57:14: note: expected ‘void 
*’ but argument is of type ‘long unsigned int’
  extern void *mmap (void *__addr, size_t __len, int __prot,

--
Rafael D. Tinoco
Linaro Kernel Validation

WARNING: multiple messages have this Message-ID
From: rafael.tinoco at linaro.org (Rafael David Tinoco)
Subject: [PATCH] proc: fixup map_files test on arm
Date: Mon, 12 Nov 2018 14:35:39 -0200	[thread overview]
Message-ID: <f1805813-62b7-8572-d906-bc49b62d1bf3@linaro.org> (raw)
In-Reply-To: <20181112155559.GV13195@uranus.lan>

On 11/12/18 1:55 PM, Cyrill Gorcunov wrote:
> On Mon, Nov 12, 2018 at 05:14:57PM +0300, Alexey Dobriyan wrote:
> ...
>>>>   int main(void)
>>>>   {
>>>>   	const unsigned int PAGE_SIZE = sysconf(_SC_PAGESIZE);
>>>> +#ifdef __arm__
>>>> +	unsigned long va = 2 * PAGE_SIZE;
>>>> +#else
>>>> +	unsigned long va = 0;
>>>> +#endif
> ...
>>>
>>> I have sent a patch removing proc-self-map-files-002 AND making 001 to use as a
>>> HINT for mmap (MAP_FIXED) *at least*  *(2 * PAGE_SIZE), which would, likely,
>>> attend all  architectures, avoiding trying to make the test specific to one,
>>> and, still, test the symlinks for issues (like bad chars, spaces, so on).
>>
>> If the goal is to test the lowest address then going for 2*PAGE_SIZE is
>> a mistake.
>>
>> Which BTW hints to add a test for the highest address.
>>
>>> Both tests (001 and 002) have pretty much the same code, while they could have 2
>>> tests in a single code, using kselftest framework. Is NULL hint + MAP_FIXED
>>> something imperative for this test ? Why not to have all in a single test ?
>>
>> I dislike tests which lump everything together into one process.
>>
>>> Are you keeping the NULL hint just to test mmap, apart" from the core of
>>> this test ?
> 
> Guys, lets simply stick with Alexey's patch. I personnally think that
> testing mappings should be a separate test in vm/, but seriously this
> took too long already :) If Alexey's patch fixes the problem with arm
> I think we're fine.
> 

Fine for me. It works in armhf.

Tested-by: Rafael David Tinoco <rafael.tinoco at linaro.org>

Note: Maybe you should amend the patch and cast "va" in mmap() to avoid:

In file included from proc-self-map-files-002.c:7:
/usr/include/arm-linux-gnueabihf/sys/mman.h:57:14: note: expected ‘void 
*’ but argument is of type ‘long unsigned int’
  extern void *mmap (void *__addr, size_t __len, int __prot,

--
Rafael D. Tinoco
Linaro Kernel Validation

WARNING: multiple messages have this Message-ID
From: rafael.tinoco@linaro.org (Rafael David Tinoco)
Subject: [PATCH] proc: fixup map_files test on arm
Date: Mon, 12 Nov 2018 14:35:39 -0200	[thread overview]
Message-ID: <f1805813-62b7-8572-d906-bc49b62d1bf3@linaro.org> (raw)
Message-ID: <20181112163539.YK6iUBzRVafSPo0lQy-xWLV4DJlzNdSBjU4Gfw2knAA@z> (raw)
In-Reply-To: <20181112155559.GV13195@uranus.lan>

On 11/12/18 1:55 PM, Cyrill Gorcunov wrote:
> On Mon, Nov 12, 2018@05:14:57PM +0300, Alexey Dobriyan wrote:
> ...
>>>>   int main(void)
>>>>   {
>>>>   	const unsigned int PAGE_SIZE = sysconf(_SC_PAGESIZE);
>>>> +#ifdef __arm__
>>>> +	unsigned long va = 2 * PAGE_SIZE;
>>>> +#else
>>>> +	unsigned long va = 0;
>>>> +#endif
> ...
>>>
>>> I have sent a patch removing proc-self-map-files-002 AND making 001 to use as a
>>> HINT for mmap (MAP_FIXED) *at least*  *(2 * PAGE_SIZE), which would, likely,
>>> attend all  architectures, avoiding trying to make the test specific to one,
>>> and, still, test the symlinks for issues (like bad chars, spaces, so on).
>>
>> If the goal is to test the lowest address then going for 2*PAGE_SIZE is
>> a mistake.
>>
>> Which BTW hints to add a test for the highest address.
>>
>>> Both tests (001 and 002) have pretty much the same code, while they could have 2
>>> tests in a single code, using kselftest framework. Is NULL hint + MAP_FIXED
>>> something imperative for this test ? Why not to have all in a single test ?
>>
>> I dislike tests which lump everything together into one process.
>>
>>> Are you keeping the NULL hint just to test mmap, apart" from the core of
>>> this test ?
> 
> Guys, lets simply stick with Alexey's patch. I personnally think that
> testing mappings should be a separate test in vm/, but seriously this
> took too long already :) If Alexey's patch fixes the problem with arm
> I think we're fine.
> 

Fine for me. It works in armhf.

Tested-by: Rafael David Tinoco <rafael.tinoco at linaro.org>

Note: Maybe you should amend the patch and cast "va" in mmap() to avoid:

In file included from proc-self-map-files-002.c:7:
/usr/include/arm-linux-gnueabihf/sys/mman.h:57:14: note: expected ‘void 
*’ but argument is of type ‘long unsigned int’
  extern void *mmap (void *__addr, size_t __len, int __prot,

--
Rafael D. Tinoco
Linaro Kernel Validation

  reply	other threads:[~2018-11-12 16:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-10 18:49 Alexey Dobriyan
2018-11-11  2:48 ` Rafael David Tinoco
2018-11-11  2:48   ` Rafael David Tinoco
2018-11-11  2:48   ` rafael.tinoco
2018-11-12 14:14   ` Alexey Dobriyan
2018-11-12 14:14     ` Alexey Dobriyan
2018-11-12 14:14     ` adobriyan
2018-11-12 15:55     ` Cyrill Gorcunov
2018-11-12 15:55       ` Cyrill Gorcunov
2018-11-12 15:55       ` gorcunov
2018-11-12 16:35       ` Rafael David Tinoco [this message]
2018-11-12 16:35         ` Rafael David Tinoco
2018-11-12 16:35         ` rafael.tinoco
2018-11-13 16:54         ` [PATCH v2] " Alexey Dobriyan
2018-11-13 16:54           ` Alexey Dobriyan
2018-11-13 16:54           ` adobriyan
2018-11-13 17:01           ` Cyrill Gorcunov
2018-11-13 17:01             ` Cyrill Gorcunov
2018-11-13 17:01             ` gorcunov

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 \
    --in-reply-to=f1805813-62b7-8572-d906-bc49b62d1bf3@linaro.org \
    --to=rafael.tinoco@linaro.org \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=gorcunov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --subject='Re: [PATCH] proc: fixup map_files test on arm' \
    /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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.