Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751856AbbKIUnk (ORCPT ); Mon, 9 Nov 2015 15:43:40 -0500 Received: from mail-ob0-f179.google.com ([209.85.214.179]:34797 "EHLO mail-ob0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750819AbbKIUni (ORCPT ); Mon, 9 Nov 2015 15:43:38 -0500 MIME-Version: 1.0 In-Reply-To: <20151109154836.GA28486@akamai.com> References: <1447064069-21469-1-git-send-email-geert@linux-m68k.org> <20151109154836.GA28486@akamai.com> Date: Mon, 9 Nov 2015 21:43:37 +0100 X-Google-Sender-Auth: JBCXpEM0kfxuSL2uhqUUDdv_lrQ Message-ID: Subject: Re: [PATCH 0/2] selftests/mlock2: Build warning fixes on Debian/m68k 4.0 From: Geert Uytterhoeven To: Eric B Munson Cc: Thierry Reding , Andrew Morton , Shuah Khan , "linux-api@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Linux-Arch Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2366 Lines: 68 Hi Eric, [CC linux-arch for more architecture-specific breakage] On Mon, Nov 9, 2015 at 4:48 PM, Eric B Munson wrote: > On Mon, 09 Nov 2015, Geert Uytterhoeven wrote: >> The following 2 patches are needed to fix build warnings on Debian/m68k >> 4.0. >> >> However, after wiring up the mlock2 syscall, the test fails with: >> >> # ./mlock2-tests >> fread kpageflags: Success >> # >> >> as the fread() call returns 0, not 1. > > This would fail is the index into the kpageflags file is not being > calculated properly. This tests works on x86_64 (I am in the process of > testing x86 incase this is a 32bit issue). I am fairly sure that I > tested it on x86, but it has been a while. Found it: /proc/kpageflags is always empty, as m68k doesn't set up max_pfn. After fixing that, the test is working fine. Funny how we managed to survive that long without setting it ;-) Note that several other architectures also don't set max_pfn. Some may be nommu, and are thus not affected, but others probably are: hexagon mn10300 nios2 score And a few of the others (e.g. avr32, didn't check all of them) assign to a local max_pfn variable instead of the global one, so it won't work on those neither. >> The original commit description for the test said "Note that the limit >> test needs to be run a normal user.". But running it as a non-root user >> also fails: > > The original commit says that the on-fault-limit test needs to be run as > a regular user becuase it relies on enforcing memory limits. > mlock2-tests has to be run as root to get access to the various files > under /proc it needs to verify things are working. Ah, I just used "git log -p" on mlock2-tests.c, and didn't notice the commit actually added two tests. Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/