Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4287693imu; Mon, 12 Nov 2018 08:36:52 -0800 (PST) X-Google-Smtp-Source: AJdET5fNB/4K11n7WNSffx83+Echyi50QNjdobTz+dYsoIbeX+645lea0xOVLc8zR2WpSOdRcaGL X-Received: by 2002:a65:530c:: with SMTP id m12mr1395169pgq.224.1542040612214; Mon, 12 Nov 2018 08:36:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542040612; cv=none; d=google.com; s=arc-20160816; b=D7XCqQKmIwFjF8yh6Wrv59j/8sxiiO/pLe/Q6+2P3UGPxpGEESkY9FduV1bpyFGvdm u+YTFet7iwgN+FPl/LgRFYriOmpZBPtWCgurV0DHHzWdkcZYjDqpr0018AxaT0lXgpvt Pwo6zso7jHljuKlOYdAT/ZUHWekrLjQzL86VHODSCwmeS9Una88kyzeOpUeFku1cz83g NoyeCdcfUrW+qBRFo8H/kx4l4cqkEhxPVkW5fvztPOXH9OeINo17vXzoSJKGRU9SO7u2 y6qh7f27x9pLiT6s+n5Q/fATrDa8IW8lrFl+hkrDZUIBegyGQSfJs44LKPdT8y3Fijcf k0WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:to:subject:cc :dkim-signature; bh=hYoQ2lSz8fR+42O1RqBQGgPomQdWTJswscGMlmCpSmc=; b=la9/NqmPrHTmAGoHNHjlG/Y8HTwPcSB+uU35TD5ZU9nrD+r6cGrxzQ1cevk4r5PIX6 Mejgv0fRQauuPeoJ93PKBRV75ONmZtXrUGiLC6w94uvE3D6K5NoKIOS+lDI/DzRpcxvU mxytrAHSPLhRVgBzoMLLaEnQ+oq3zV6Q53ekEG9mktlajjgPw/qjyrH+u/rsSU6wbwxi TbsFApseE2fVS3NEntwkD64BDSo/53VJbWtGYvTQULScD151WpU1aMw0h7OftEKeITjO LMM8upULoofusstP6VtzAJhCVi/N7Ku44RdEi/QHjS/11x/tgTr8O0i2tbUuroInui5k SFlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TVMd0Ww2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c41-v6si18256561plj.194.2018.11.12.08.36.19; Mon, 12 Nov 2018 08:36:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TVMd0Ww2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729757AbeKMC3n (ORCPT + 99 others); Mon, 12 Nov 2018 21:29:43 -0500 Received: from mail-qk1-f193.google.com ([209.85.222.193]:43821 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728199AbeKMC3n (ORCPT ); Mon, 12 Nov 2018 21:29:43 -0500 Received: by mail-qk1-f193.google.com with SMTP id r71so14325452qkr.10 for ; Mon, 12 Nov 2018 08:35:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:subject:to:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hYoQ2lSz8fR+42O1RqBQGgPomQdWTJswscGMlmCpSmc=; b=TVMd0Ww2KN41eqdIa3Wj5qeV6AfyGKFVGsFsTxhOn992sPfrm1EAxFiKq+BITf0F5Z JPOIkdh9aGXjR5JB5zX/3H2c7PHtfxSUMLD1JdcHVD76vTmi26XwhOOqbmqbj59Tj8yQ IsmPcKYhjiHvwOYKejLEzqYf69BKhhM8cBp28= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:cc:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=hYoQ2lSz8fR+42O1RqBQGgPomQdWTJswscGMlmCpSmc=; b=dtTeGgB0lwy0oRKegWMDayqYZ/SiRI0OzJZIG6AYoRakzHFp9G+/RvctJUt9JK/Czk aSZoxcaaa0vUIpIRq3O47jdEYlTvPmsKn7T6LCGArwyGAtemjuAxizdO77Y0NB3w3ZEP ykkYL3OCEXajrAtLAKSoncE0lpz7Brk4cDfaF3ofC1THoJT2YoakxUcQ/sqo/14rVVov Wat4BhH1DpgtDi4uTX3X5xDfgu8u36J1aHXZsI/1PLuIjgiIC0MQtndADWUs0CiBidKS J9RajFHYgWxCYTjyPgqvUzhmxZsang9GVFfU7qLCif9S3VKFo2r9x0+5WdBbIFwzYy6H Tkqg== X-Gm-Message-State: AGRZ1gIJr0oGlEkj7N2FhCtomTmq48qZ/4UK06eNJJubTrPViLeYPS4v ehC5zAnPBwA30w37LTb5TOXURA== X-Received: by 2002:a37:2bcf:: with SMTP id r76mr1520422qkr.218.1542040543181; Mon, 12 Nov 2018 08:35:43 -0800 (PST) Received: from [192.168.48.13] ([168.181.50.245]) by smtp.gmail.com with ESMTPSA id 86sm727115qky.92.2018.11.12.08.35.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 08:35:42 -0800 (PST) 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 To: Cyrill Gorcunov , Alexey Dobriyan References: <20181110184920.GA18252@avx2> <1541904527.857883.1572718104.2AE8D0DA@webmail.messagingengine.com> <20181112141456.GA15690@avx2> <20181112155559.GV13195@uranus.lan> From: Rafael David Tinoco Organization: Linaro Message-ID: Date: Mon, 12 Nov 2018 14:35:39 -0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20181112155559.GV13195@uranus.lan> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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