Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp77958pxb; Tue, 15 Feb 2022 08:47:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxH3DWVNBzZ36cNSYYWCFMKKXuvkCd+NVJpVMcjeTDkcs4afyHTzciJa3NBSMLpQseNnNLV X-Received: by 2002:a17:903:32c5:: with SMTP id i5mr5065541plr.57.1644943634551; Tue, 15 Feb 2022 08:47:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644943634; cv=none; d=google.com; s=arc-20160816; b=fDVZAWsfWQxFXVuF/VooxmhS/0lpsCDvtjEGuW4zDGdCMnEBgnW8sF9UE0f4l5NblJ oyfijQVKMJGnG6FG43X4amxf+IS2npHukGDNVcKZVeg1eCTn18/LdLFEj2X0Cmpyx1hJ 34GSKe7cDnKbXrXh/s8zK5fOaU8fsdPR3ewMEHigPGvpx15Yz240/QFicZy5FQ8UWPWx wjlluiskWTFJQcqIiBoAPzp8ZzlCIkJrOGrjg0DyMfHHJ2wJW+uKPxzEoeq7nKp4ftUU VknXdakwH7MSfGIHdaiksyZ72YpEOCdV8NlPtLI40ezcQw+P4n7x2dBGpM25aulkPPWF 6RGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Cn4ZOnzkLUwdV4GSdmhBv6HuJ+flbDE0pzlK1n4n1ks=; b=Ly6pi/M7crILkAJI9azycPLCeO/Jw9XQadv/pLJq6BWJs1Z935qFX1XTOE75oth7I1 kerkBNL7C60auht7ZnUE7fX0my25D6VTLOCUaYClUKw3sM7lpe3WVdA3tg7bCuX3Bdp0 rpJzUSCFTv6uz+31dUdAfqUdv+x3rc0VjLXzI9yQSO1Er3ZejqsutqK/0ra/e3cfMCRp PJeiP7UXBFZvmDIKDc1GFi1yG/u1fnHXvVEah849ZT7GhId2QRQqsXM1BTrLPx/Sb1VQ QxTD8AZx7M1gHFO9wmOs5sUoDwAi0nS3d8Ji272eZPaVvj8h0rNG7+pp0Gulr3MpEqxK qJMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=eCOM7jhL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pf5si16519640pjb.125.2022.02.15.08.46.58; Tue, 15 Feb 2022 08:47:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=eCOM7jhL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236313AbiBOKMG (ORCPT + 99 others); Tue, 15 Feb 2022 05:12:06 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:45880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234549AbiBOKMD (ORCPT ); Tue, 15 Feb 2022 05:12:03 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 783C610E06C; Tue, 15 Feb 2022 02:11:53 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 2EE591F38A; Tue, 15 Feb 2022 10:11:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1644919912; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Cn4ZOnzkLUwdV4GSdmhBv6HuJ+flbDE0pzlK1n4n1ks=; b=eCOM7jhLs38pfcQ1gzcSRPU749WffBvghxjPn1mdJChcZrH2Z/dmhHESjTxHseKtCVz+pT rAU/sJ+cAHfe10HPrrJHW4t6l1jRzX7Xqq/U8HVdnkNvXB0TK8zuovJdAs+Z7roOATJHFm nJAteGNPVGZeeoDpOnINu4hNRiI3IH4= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 06EA713C16; Tue, 15 Feb 2022 10:11:52 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id kGwuAWh8C2L2FgAAMHmgww (envelope-from ); Tue, 15 Feb 2022 10:11:52 +0000 Date: Tue, 15 Feb 2022 11:11:50 +0100 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Etienne Dechamps Cc: Eric Biederman , Alexey Gladkov , Kees Cook , Shuah Khan , Christian Brauner , Solar Designer , Ran Xiaokai , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Linux Containers Subject: Re: [RFC PATCH 0/6] RLIMIT_NPROC in ucounts fixups Message-ID: <20220215101150.GD21589@blackbody.suse.cz> References: <20220207121800.5079-1-mkoutny@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 12, 2022 at 03:32:30PM +0000, Etienne Dechamps wrote: > I'm not sure I understand everything that's going on in this thread but it > does seem very relevant. You guys might want to double-check the behavior in > the particular scenario described there. I'm mostly sending this to make > sure everything is cross-linked. Thanks for the report with strace. AFAICT, it's caused by setresuid() after unshare(), i.e. all root's tasks are (wrongly) compared against the lowered RLIMIT_NPROC. This is tackled by my RFC patch 2/6 [1] or Eric's variant but 3/8 (equivalent fix for this case but I haven't run that build). Michal [1] I could run your test (LimitNPROC=1 actually) against kernel with my patches and the service starts.