Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3285843imu; Wed, 7 Nov 2018 08:01:33 -0800 (PST) X-Google-Smtp-Source: AJdET5fzMo3N+PobZa6zoxDE+MqWkg7AUM+j+ue36ePS+en30rT0XIA14HmBnN4aA8mW8X9/7EEP X-Received: by 2002:a62:2a04:: with SMTP id q4-v6mr751269pfq.61.1541606493828; Wed, 07 Nov 2018 08:01:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541606493; cv=none; d=google.com; s=arc-20160816; b=eUZts66u3I3OkNc4UVwyvY/QUkxqbod+fs1bu16//Lgh7BisxJdIA3QbS/0QNQFe6J oDwHTCCidxoxZOjD2kSV+i0xoTtloiCKFY6u0OmRuHuuZpJRLBpcfKhmNqhDFyso8Y9A ee0JxRRqg9vM3LIXvzgORZ3+v+tNoWVbeJQ4JWI8FSCDj0IcSeyHQdrpqZ2hGEAovZL2 mpmH2ASa0sKKyvjreJTwGjMSTsOOAbRmuuTZo+qSY7XTOaCoxc7rlj1Nf7pYxSekw54o ubiz3nUzy14jN5V6v81LYFWLuzLuKKep2xi138P3FDSBTElLtpSPv9Zi1vV0ZcMlm3Xm hQdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=eIpsPW3h6Fb2W/ijd+XojTfqpuUoCE6UTfUF3aoBdJQ=; b=iZ2BKzPNqp/7bWmbtllzIqt82NssHE7FebEnN39sI1IbHdHZzR3/Q2MoD4ZWMVtrxB X3agCjYzOUj1cp6Yfut+2KJq+puR3JjAkgBv51RHfpFy6ejk9opN39xEabyxreZsA/O2 BMibzzOgQnn4mwgAz/PiTkoslrJE6y9IVUHZKaHBX2DEMbvkWG+/fAsD8BLIZwBxijAR IkJU7eDMUf/BY4+Ip7T5UrxrZOzof6tLwZcMPTGJa+7GDjLGuWzlZAjhlANsnvrw+dOw q0JRDjLeN6T1/b/JJIPyByureAZq6DlSbQWwGUb48VmNKgakkI+sp9WmUYxETKEGoPI4 H0eQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 38si955979pgx.460.2018.11.07.08.01.17; Wed, 07 Nov 2018 08:01:33 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731246AbeKHBbO (ORCPT + 99 others); Wed, 7 Nov 2018 20:31:14 -0500 Received: from mx2.suse.de ([195.135.220.15]:59834 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727546AbeKHBbO (ORCPT ); Wed, 7 Nov 2018 20:31:14 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id AE160B65D; Wed, 7 Nov 2018 16:00:15 +0000 (UTC) Date: Wed, 7 Nov 2018 17:00:15 +0100 From: Michal Hocko To: Daniel Colascione Cc: linux-kernel , rppt@linux.ibm.com, Tim Murray , Joel Fernandes , Suren Baghdasaryan , Jonathan Corbet , Andrew Morton , Roman Gushchin , Mike Rapoport , Vlastimil Babka , "Kirill A. Shutemov" , "Dennis Zhou (Facebook)" , Prashant Dhamdhere , "open list:DOCUMENTATION" Subject: Re: [PATCH v2] Document /proc/pid PID reuse behavior Message-ID: <20181107160015.GI27423@dhcp22.suse.cz> References: <20181031150625.147369-1-dancol@google.com> <20181105132205.138695-1-dancol@google.com> <20181106130524.GC2453@dhcp22.suse.cz> 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 07-11-18 15:48:20, Daniel Colascione wrote: > On Tue, Nov 6, 2018 at 1:05 PM, Michal Hocko wrote: > > On Mon 05-11-18 13:22:05, Daniel Colascione wrote: > >> State explicitly that holding a /proc/pid file descriptor open does > >> not reserve the PID. Also note that in the event of PID reuse, these > >> open file descriptors refer to the old, now-dead process, and not the > >> new one that happens to be named the same numeric PID. > > > > This sounds quite obvious > > Many people *on* *LKML* were wrong about this behavior. If it's not > obvious to experienced kernel developers, it's certainly not obvious > to the public. Fair enough > > otherwise anybody could simply DoS the system > > by consuming all available pids. > > People can do that today using the instrument of terror widely known > as fork(2). The only thing standing between fork(2) and a full process > table is RLIMIT_NPROC. not really. If you really do care about pid space depletion then you should use pid cgroup controller. -- Michal Hocko SUSE Labs