From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C889C4338F for ; Thu, 19 Aug 2021 01:50:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C5637610A6 for ; Thu, 19 Aug 2021 01:50:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C5637610A6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 5F3236B006C; Wed, 18 Aug 2021 21:50:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 57AE86B0071; Wed, 18 Aug 2021 21:50:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 41BD88D0001; Wed, 18 Aug 2021 21:50:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0192.hostedemail.com [216.40.44.192]) by kanga.kvack.org (Postfix) with ESMTP id 250B26B006C for ; Wed, 18 Aug 2021 21:50:13 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id ADBF1267E1 for ; Thu, 19 Aug 2021 01:50:12 +0000 (UTC) X-FDA: 78490149864.01.F533CD8 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by imf06.hostedemail.com (Postfix) with ESMTP id A2D218024082 for ; Thu, 19 Aug 2021 01:50:11 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10080"; a="277489173" X-IronPort-AV: E=Sophos;i="5.84,333,1620716400"; d="scan'208";a="277489173" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Aug 2021 18:50:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,333,1620716400"; d="scan'208";a="489106654" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga008.fm.intel.com with ESMTP; 18 Aug 2021 18:50:09 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Wed, 18 Aug 2021 18:50:08 -0700 Received: from shsmsx605.ccr.corp.intel.com (10.109.6.215) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Thu, 19 Aug 2021 09:50:06 +0800 Received: from shsmsx605.ccr.corp.intel.com ([10.109.6.215]) by SHSMSX605.ccr.corp.intel.com ([10.109.6.215]) with mapi id 15.01.2242.010; Thu, 19 Aug 2021 09:50:06 +0800 From: "Ma, XinjianX" To: Alexey Gladkov , "Eric W. Biederman" CC: "linux-kselftest@vger.kernel.org" , lkp , "akpm@linux-foundation.org" , "axboe@kernel.dk" , "christian.brauner@ubuntu.com" , "containers@lists.linux-foundation.org" , "jannh@google.com" , "keescook@chromium.org" , "kernel-hardening@lists.openwall.com" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "oleg@redhat.com" , "torvalds@linux-foundation.org" Subject: RE: [PATCH v11 5/9] Reimplement RLIMIT_MSGQUEUE on top of ucounts Thread-Topic: [PATCH v11 5/9] Reimplement RLIMIT_MSGQUEUE on top of ucounts Thread-Index: AQHXkxd6jQPRg5rF3UWHcji9NSI54at32Gt6gADgWICAAVhdsA== Date: Thu, 19 Aug 2021 01:50:06 +0000 Message-ID: <54046232de974a3687e4af6366c8ba18@intel.com> References: <87a6lgysxp.fsf@disp2133> <20210818131117.x7omzb2wkjq7le3s@example.org> In-Reply-To: <20210818131117.x7omzb2wkjq7le3s@example.org> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.5.1.3 dlp-reaction: no-action x-originating-ip: [10.108.32.68] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Rspamd-Queue-Id: A2D218024082 Authentication-Results: imf06.hostedemail.com; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=intel.com (policy=none); spf=none (imf06.hostedemail.com: domain of xinjianx.ma@intel.com has no SPF policy when checking 134.134.136.31) smtp.mailfrom=xinjianx.ma@intel.com X-Rspamd-Server: rspam04 X-Stat-Signature: t94mn44qd3n4qq3jkjtgh1thwue4w9ap X-HE-Tag: 1629337811-911082 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > -----Original Message----- > From: Alexey Gladkov > Sent: Wednesday, August 18, 2021 9:11 PM > To: Eric W. Biederman > Cc: Ma, XinjianX ; linux-kselftest@vger.kernel.org= ; > lkp ; akpm@linux-foundation.org; axboe@kernel.dk; > christian.brauner@ubuntu.com; containers@lists.linux-foundation.org; > jannh@google.com; keescook@chromium.org; kernel- > hardening@lists.openwall.com; linux-kernel@vger.kernel.org; linux- > mm@kvack.org; oleg@redhat.com; torvalds@linux-foundation.org > Subject: Re: [PATCH v11 5/9] Reimplement RLIMIT_MSGQUEUE on top of > ucounts >=20 > On Tue, Aug 17, 2021 at 10:47:14AM -0500, Eric W. Biederman wrote: > > "Ma, XinjianX" writes: > > > > > Hi Alexey, > > > > > > When lkp team run kernel selftests, we found after these series of > > > patches, testcase mqueue: mq_perf_tests in kselftest failed with > following message. > > > > Which kernel was this run against? > > > > Where can the mq_perf_tests that you ran and had problems with be > found? > > > > During your run were you using user namespaces as part of your test > > environment? > > > > The error message too many files corresponds to the error code EMFILES > > which is the error code that is returned when the rlimit is reached. > > > > One possibility is that your test environment was run in a user > > namespace and so you wound up limited by rlimit of the user who > > created the user namespace at the point of user namespace creation. > > > > At this point if you can give us enough information to look into this > > and attempt to reproduce it that would be appreciated. >=20 > I was able to reproduce it on master without using user namespace. > I suspect that the maximum value is not assigned here [1]: >=20 > set_rlimit_ucount_max(&init_user_ns, UCOUNT_RLIMIT_MSGQUEUE, > task_rlimit(&init_task, RLIMIT_MSGQUEUE)); >=20 > [1] > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/k= erne > l/fork.c#n832 Thank you for confirming the issue. And will you plan to fix this issue? If it's your plan, kindly add following tag as appropriate Reported-by: kernel test robot >=20 > > > If you confirm and fix the issue, kindly add following tag as > > > appropriate > > > Reported-by: kernel test robot lkp@intel.com > > > > > > ``` > > > # selftests: mqueue: mq_perf_tests > > > # > > > # Initial system state: > > > # Using queue path: /mq_perf_tests > > > # RLIMIT_MSGQUEUE(soft): 819200 > > > # RLIMIT_MSGQUEUE(hard): 819200 > > > # Maximum Message Size: 8192 > > > # Maximum Queue Size: 10 > > > # Nice value: 0 > > > # > > > # Adjusted system state for testing: > > > # RLIMIT_MSGQUEUE(soft): (unlimited) > > > # RLIMIT_MSGQUEUE(hard): (unlimited) > > > # Maximum Message Size: 16777216 > > > # Maximum Queue Size: 65530 > > > # Nice value: -20 > > > # Continuous mode: (disabled) > > > # CPUs to pin: 3 > > > # ./mq_perf_tests: mq_open() at 296: Too many open files not ok 2 > > > selftests: mqueue: mq_perf_tests # exit=3D1 > > > ``` > > > > > > Test env: > > > rootfs: debian-10 > > > gcc version: 9 > > > > > > ------ > > > Thanks > > > Ma Xinjian > > > > Eric > > >=20 > -- > Rgrds, legion