From patchwork Thu Oct 11 18:43:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael David Tinoco X-Patchwork-Id: 148666 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp2472912lji; Thu, 11 Oct 2018 11:44:08 -0700 (PDT) X-Google-Smtp-Source: ACcGV631xbT3wLbZrwsvCoLkmCmgNgTJnJ1jrXX7Zvny+mC+yzyHR8MPnxdR4mXPLz1BiRmI+y/j X-Received: by 2002:a62:449b:: with SMTP id m27-v6mr2689602pfi.82.1539283448071; Thu, 11 Oct 2018 11:44:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539283448; cv=none; d=google.com; s=arc-20160816; b=l1icyDva2aOd0EJON1ZwxbhJgoY4aDSkyPeF9UeutsgtzWhVFe7u6gljVKUyhpdo4b c9FMuX4RBmzPkcrhiaCivEn80SQfJx36Yx4jhJ4LKSns4CyesFQRvKCmAtcgSuj0Giyc y/Rcmg7zD3/mBDKUGDamc3tQCKW4TZNJG1RyUnnROtGfi9La1lC4ROO+SCJdfJw51wnp Ie+8RZriWMVLYSghrXsDeTDrwP4nJ7/0u8Tw9kGCcC51q2s4FY0NI4zCrpf9dEierIG+ coLluz3wRfZxnib+qCpwY9fXRrZpHqq5pOGfJQeS05uxW9awwC/CcmXVkcW1GFe0JFX7 IsBA== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=y3bQQWocC3HuwOzt4zpfsSQh51EQpWfENSgZkqebcms=; b=s7zbNM8hnOfEAyUnKqj//VawHiVFPwCYFRX/ZKhckZMZApNFvxzoaRHlL9+cd2F199 ZTKzf2exHglVF460gWmXOAGZfJhPhTwgNvOLmymWc6kamotq4ypLQOZalmflhLzplB2b 0HRJO8CJhrhPnZU2w0ZsaCEdB4ndZ5bHFFLcmu3h0gEikqLUDmuimrb8lkEY+o6yL2Lc 2ArPL9TTjJdE60giQWlyo4/ZYfmuS3FcF49+d11SqZNhWELKQgQ/xvWrVi8iKQiM88m7 EemR/7hhyIkFOQg5SW93RXXpdWLYLE6GTHFgL26lQJ1P2GoMg9XCmNMG3pvEZngsrrHU cvVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JJjrpn3d; 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 w11-v6si24682776pgs.377.2018.10.11.11.44.07; Thu, 11 Oct 2018 11:44:08 -0700 (PDT) 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=JJjrpn3d; 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 S1729560AbeJLCMc (ORCPT + 32 others); Thu, 11 Oct 2018 22:12:32 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:37831 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728766AbeJLCMb (ORCPT ); Thu, 11 Oct 2018 22:12:31 -0400 Received: by mail-qk1-f194.google.com with SMTP id x8-v6so6127172qka.4 for ; Thu, 11 Oct 2018 11:44:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=y3bQQWocC3HuwOzt4zpfsSQh51EQpWfENSgZkqebcms=; b=JJjrpn3dYWGiwscpAnbnWMRxHGkH3W1d+cbHnr+1utxQXyqUCqB8vp9gQbHRyOSF2P I9gKAE4+L/AeibS+8kK90a0EPKcJoKdtIOsa1gGR8hjB9fXISPur5eQi8C7pUBd/OVyG dmYQb+24p3saB7iZ1iNMOEorqETweiIXnhL90= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=y3bQQWocC3HuwOzt4zpfsSQh51EQpWfENSgZkqebcms=; b=TG9nc4hHYol0VzaCaVXVpN6KaoDWOR+rECJURbSV/lagB4RXVx4Znr4nu36+aGbiJj qX9xEMPgs0oCL4Tw6lvR8t3n8Fnh0EE6z2c8ht2zL0jwzQiyaMYtvGJN993E2Hz1hhF3 QcUu+oSTRCfsZtk8nqr/guWfLktFxWFPE3DuMQLpe53OqncsRXwSjkq0epoxDUsIQgPo wvbKjpQgkFVn+ruobQXB/zd01OAvIdMuJ9W0rWTvSmdF5JMB93HoWQ7Xszph7q/gr7s1 yQeDgJlv9DDbPgjvUZ3KQOemTeobrUD67rWAbY/N2QWV4Bt0xVjT3ajBaLYcyCq9vGwQ 0u3g== X-Gm-Message-State: ABuFfohfm3zAo/ui3lNrWJ+/aOJuW4kwaUrKim/o6IlpOaSEqcrbCq6f k9WZQcQsSxi59t2ZMz10puy0+w== X-Received: by 2002:a37:6cc3:: with SMTP id h186-v6mr2731001qkc.49.1539283444694; Thu, 11 Oct 2018 11:44:04 -0700 (PDT) Received: from workstation.celeiro.br ([138.204.25.12]) by smtp.gmail.com with ESMTPSA id 18-v6sm18527434qtm.13.2018.10.11.11.44.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Oct 2018 11:44:03 -0700 (PDT) From: Rafael David Tinoco To: linux-kselftest@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, gorcunov@gmail.com, rafael.tinoco@linaro.org, akpm@linux-foundation.org, shuah@kernel.org, adobriyan@gmail.com Subject: [PATCH] proc: fix proc-self-map-files selftest for arm Date: Thu, 11 Oct 2018 15:43:59 -0300 Message-Id: <20181011184359.15627-1-rafael.tinoco@linaro.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org MAP_FIXED is important for this test but, unfortunately, lowest virtual address for user space mapping on arm is (PAGE_SIZE * 2) and NULL hint does not seem to guarantee that when MAP_FIXED is given. This patch sets the virtual address that will hold the mapping for the test, fixing the issue. Link: https://bugs.linaro.org/show_bug.cgi?id=3782 Signed-off-by: Rafael David Tinoco --- tools/testing/selftests/proc/proc-self-map-files-002.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.19.1 Reviewed-by: Cyrill Gorcunov diff --git a/tools/testing/selftests/proc/proc-self-map-files-002.c b/tools/testing/selftests/proc/proc-self-map-files-002.c index 6f1f4a6e1ecb..0a47eaca732a 100644 --- a/tools/testing/selftests/proc/proc-self-map-files-002.c +++ b/tools/testing/selftests/proc/proc-self-map-files-002.c @@ -55,7 +55,9 @@ int main(void) if (fd == -1) return 1; - p = mmap(NULL, PAGE_SIZE, PROT_NONE, MAP_PRIVATE|MAP_FILE|MAP_FIXED, fd, 0); + p = mmap((void *) (2 * PAGE_SIZE), PAGE_SIZE, PROT_NONE, + MAP_PRIVATE|MAP_FILE|MAP_FIXED, fd, 0); + if (p == MAP_FAILED) { if (errno == EPERM) return 2;