Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4056303pxv; Mon, 28 Jun 2021 20:50:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyugRy562MnlF7JIsOXcdc5iwCfF+G6rNmDOl5UxpV2YsXne7bi6XAZ3FDntGDHcE6HXma/ X-Received: by 2002:a17:906:eca1:: with SMTP id qh1mr4093050ejb.287.1624938638127; Mon, 28 Jun 2021 20:50:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624938638; cv=none; d=google.com; s=arc-20160816; b=WUg0mCSMg9TRs6SCI5sjpjZbIFXGXQJyhw4NaHIRuxfZ4OvOwMD8jB4gFFT0Pz0wmn DPSMLTdPZHbx7FoVB0PZWr2hU0z0qNkZGZarx5AksoMrAZVThNIr2P9GWc4qDEscRkhi hI/CdsYE27BEY+Yw0FErDHSaobmztxSN0MOiVtTsHlGdlUxc7A/RJargOltsGNKdpBPM 1bolGl7pr63gT4MFvxgw7iWKkpygmieGv7wd1Vjd6HFSEo9ijenO7kuL+rOVPIs9cW3E byj/N/PYcS1QHKRXwbAOOaL3s1tjKR/4eZOS51n6RESOuZ5eTx19FxiMgWOFELMebNpQ +C9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=SAkvrvf9vGodn3/SdXI/Z/HezeeoY0M2aYPCWRA/0sw=; b=MNraU6wjRIAEwpVB7TMVHF+8/mkhZvSQAjAJI34yCXN7VqwTAnleJH6YbLPB/hBSkQ ux5Ms2n2xwnx5Tg8ZcZFZzvNjOAYPnnxW+MYLWL2nvqBlEQI8znxQuu2Zf83l8pN2oSb tTlGJxmu3alPNDMNMr2e/7+np9/DjgeYeMrHSf8VVeJTY3wo91ib1H+oFIzID0XckjFQ M7NBYMncLlCPYZPLIRtsdj/yvkg7i6ethw5Z9jTrqB+daydPWupTIFDSCD0UNk5i+Oh5 D/puNup5xVC8K8sPv2JFfodckRukvepJbAFYzAw7OEyOqs532OECJGWpf64Wbv+xXzCb TUJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=FmHwzUVn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v7si17051430edj.541.2021.06.28.20.50.13; Mon, 28 Jun 2021 20:50:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=FmHwzUVn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231938AbhF2Dt6 (ORCPT + 99 others); Mon, 28 Jun 2021 23:49:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231598AbhF2Dt5 (ORCPT ); Mon, 28 Jun 2021 23:49:57 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E7DEC061574 for ; Mon, 28 Jun 2021 20:47:30 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id t17so36867198lfq.0 for ; Mon, 28 Jun 2021 20:47:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SAkvrvf9vGodn3/SdXI/Z/HezeeoY0M2aYPCWRA/0sw=; b=FmHwzUVnPSfz54gaaoFrV1I0m/OZYcDkto7MvfD87BMJlg2wfd6ksfLDQbgEpoWnMe GAzSOezqUJyyT5jjyC+szrJQMOrt+WSEMBY7k37vOZp5Td1xrgjvF0meno42vsEqDRBl FOMVPDRn63bn/bCTzLCUFsYJJWTGc/rswSo/w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SAkvrvf9vGodn3/SdXI/Z/HezeeoY0M2aYPCWRA/0sw=; b=kqmlZ5PEkhgnm920Z2bcW1tkteoW7L4rPenCkmbJlzLNYtE/2AVVIt/HpZ+RX+5s3P VDeGu+AKVpYZEF/GUJ3HFtYvkd9pdBgbrCc6rbHohjNvbzKTAmOKMiLx29uMxuN6zG9T 0M40mcbzxdLMCzXahdCtJPCg7Cdla2PIdEbdp9AC/1vihCbME86mnjOg9J1P+NkUFAqE nWO4ibokUrrEu1CIjJvfj8vRsEjDJKhRBSDh/kVMBRRwi9HgfE+6Mr/R9w6pyIVoX7EF 737TuJKnadAzMIXUmlOoJi5zRCIIKM9CBPkfRYkRSCu4bWvehlX1K0UTq7K2RZq3RRHr IkxA== X-Gm-Message-State: AOAM530nTzvROFGc/bc6jdRL6Ewpv0J0L7cEjyPLrAl/NNyglSjIE4zH ueZNZjvAJHtHa0JxVE93eYEG38u0VCIOaPnVVPI= X-Received: by 2002:ac2:545b:: with SMTP id d27mr22202688lfn.320.1624938448507; Mon, 28 Jun 2021 20:47:28 -0700 (PDT) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com. [209.85.208.177]) by smtp.gmail.com with ESMTPSA id h5sm1338749lfk.164.2021.06.28.20.47.28 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Jun 2021 20:47:28 -0700 (PDT) Received: by mail-lj1-f177.google.com with SMTP id c11so29022477ljd.6 for ; Mon, 28 Jun 2021 20:47:28 -0700 (PDT) X-Received: by 2002:a2e:b553:: with SMTP id a19mr2124829ljn.507.1624938447840; Mon, 28 Jun 2021 20:47:27 -0700 (PDT) MIME-Version: 1.0 References: <87fsx1vcr9.fsf@disp2133> In-Reply-To: <87fsx1vcr9.fsf@disp2133> From: Linus Torvalds Date: Mon, 28 Jun 2021 20:47:12 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] ucounts: Count rlimits in each user namespace To: "Eric W. Biederman" , Alexey Gladkov Cc: Linux Kernel Mailing List , Linux Containers Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 28, 2021 at 3:35 PM Eric W. Biederman wrote: > > This is the work mainly by Alexey Gladkov to limit rlimits to the > rlimits of the user that created a user namespace, and to allow users to > have stricter limits on the resources created within a user namespace. I guess all the performance issues got sorted, since I haven't seen any reports from the test robots. I do end up with two questions, mainly because of looking at the result of the conflict resolution. In particular, in __sigqueue_alloc(), two oddities.. Why the "sigpending < LONG_MAX" test in that if (override_rlimit || (sigpending < LONG_MAX && sigpending <= task_rlimit(t, RLIMIT_SIGPENDING))) { thing? And why test for "ucounts" being non-NULL in if (ucounts && dec_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_SIGPENDING, 1)) put_ucounts(ucounts); when afaik both of those should be happy with a NULL 'ucounts' pointer (if it was NULL, we certainly already used it for the reverse operations for get_ucounts() and inc_rlimit_ucounts()..) Hmm? And somebody should verify that I didn't screw anything up in my merge resolution. It all looked very straightforward, but mistakes happen.. Linus