Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4542804imu; Fri, 30 Nov 2018 20:31:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/U+6qO3rpJVRGccCmz4yoqD0D5TqdGgnmJqiCpaEUir8aIhu/vZYbvoINhoFNATOCANZXT6 X-Received: by 2002:a62:da5a:: with SMTP id w26mr8146325pfl.106.1543638705542; Fri, 30 Nov 2018 20:31:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543638705; cv=none; d=google.com; s=arc-20160816; b=a5ZkBN02xJwsMTehM4qpD07ogF/VfadVVTw0+v1jGxBxIZ2dBcrh+qQI1BFTYVrPJK jfmzii/g2ECIXf6AMFxJ4djncp5blEdEuea1iKKRxrR77PAClNO8inD7sJWfssyJt8lF yfbKXVTaVtoo7XRsygVehYHaOSpTXmcM2/LoUPrZrOxr2OVehozG/j7Mhyzjt56ARu55 DuspJSnN+ZeoncNXcaMbwK9mp09w3wOxSrbkHYpIf0E1vWMLGQHHZ5W2PZyshGwB1Wmp WIWGfsrW0powNQYUIjXhdzwXSmjMQ/dsE2zPRtME/eHlBADAB5QInQqzgl/DB/ki1MNF kc9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=KyNy40w++dlOJxJZqsTwDufOR/T3RFR2sKzGh4yWLAQ=; b=u/1IkQFBpnV4TapmyBSgt2DhjooSi3BjQF6hSx6tDPv3P4m5EuJwRd1NJjZdtQBldX xKpcRTisDUbJO7LLZ9IEoLyqrLFW4vVPYzQdEexCjNJ5LXu+FipMJ122c/u8kBsGek5H +IRQPfP9ti0pqjTgmb6kh+HsXA+i8Oxzn5h/DrXWSyOlyzXJi4d91A9klUsteRTUdJAF lrg3l/smV0xLXsI1l2X9QKCaCxkdc9o1/NOfJg8mTlbFJKE8BztHHbsh+GsLWWEqO/NY Nf4B5lugh1UFuG7iTpSDwvbxWlxUhzjhGh89X8Ow85xKJ+4BRXXrWwInWkiBU2Ge4xhc Nwog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=QUojoPHw; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s123si7360170pfb.274.2018.11.30.20.31.15; Fri, 30 Nov 2018 20:31:45 -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; dkim=pass header.i=@chromium.org header.s=google header.b=QUojoPHw; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726629AbeLAPkk (ORCPT + 99 others); Sat, 1 Dec 2018 10:40:40 -0500 Received: from mail-yb1-f194.google.com ([209.85.219.194]:42780 "EHLO mail-yb1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726555AbeLAPkk (ORCPT ); Sat, 1 Dec 2018 10:40:40 -0500 Received: by mail-yb1-f194.google.com with SMTP id s8so977350ybe.9 for ; Fri, 30 Nov 2018 20:29:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=KyNy40w++dlOJxJZqsTwDufOR/T3RFR2sKzGh4yWLAQ=; b=QUojoPHwTd/DRQEoc0DIBuhbhlRqAPOFOaDiAKasxJPWSfubTDV8029DvkEspbOuzo oTDnB2P/r+elgAtrcFoYR90eP/efbsEQYLMwRel1uVSQ4YMzr263LVe0hynHDwZjEL8f oO1/HdjvDQOOiuvvjAWx2cI1NfakStBRo8/iM= 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:content-transfer-encoding; bh=KyNy40w++dlOJxJZqsTwDufOR/T3RFR2sKzGh4yWLAQ=; b=bjrggZHnQgVPOZ+TaWcqf2YyOFDzfUvenSWpynNPuyF1WSPFo07WUMEszNi3R2Lb32 X9vokUUc+RmnybKpBoDXtmdfyDzPyzENqRbEi/FQ5SU+0GY7y7NYPuty+ceXQ1cINLp8 jNmGW9Yd59vbIXIbjKWOjdKhlFn4TMMMM7xjAlDUSbHDZQlo1NGAzsY1TC6ZnB1RiWGb KPdYLNiU9EwIhoPkDd1q/MAHHUS1dPJilbHdTK1H525WaRdQGYX7AJgfk2fEIzxD1Dp0 t9uhpyPq4eEF5oQIm7kpScJpcEqy4dtGvzkk6NYPb1dX/dnB9L0ZF/dINbawwBwl/GYp Uk4w== X-Gm-Message-State: AA+aEWZ9a4FM016b39TLX/fCVvgy1yDU9RBtA27VRwTEY+sVCT7frF1f DW+jEbUJ4RdjuxxeEDEnIKKz5W2KIt4= X-Received: by 2002:a25:ab8a:: with SMTP id v10-v6mr8162711ybi.127.1543638544323; Fri, 30 Nov 2018 20:29:04 -0800 (PST) Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com. [209.85.219.172]) by smtp.gmail.com with ESMTPSA id m66sm2193066ywc.37.2018.11.30.20.29.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Nov 2018 20:29:03 -0800 (PST) Received: by mail-yb1-f172.google.com with SMTP id z2-v6so3139876ybj.2 for ; Fri, 30 Nov 2018 20:29:02 -0800 (PST) X-Received: by 2002:a25:3502:: with SMTP id c2-v6mr8232917yba.410.1543638542467; Fri, 30 Nov 2018 20:29:02 -0800 (PST) MIME-Version: 1.0 References: <20181127225408.7553-1-j@bitron.ch> <20181127225408.7553-2-j@bitron.ch> <20181128144230.GG30395@redhat.com> <87r2f5gr9g.fsf@xmission.com> <20181129123409.GA10645@redhat.com> <20181130103329.GB23670@redhat.com> In-Reply-To: <20181130103329.GB23670@redhat.com> From: Kees Cook Date: Fri, 30 Nov 2018 20:28:50 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] prctl: add PR_{GET,SET}_KILL_DESCENDANTS_ON_EXIT To: Oleg Nesterov Cc: j@bitron.ch, "Eric W. Biederman" , Andrew Morton , Thomas Gleixner , Andy Lutomirski , Linux API , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 30, 2018 at 2:33 AM Oleg Nesterov wrote: > > On 11/29, J=C3=BCrg Billeter wrote: > > > > On Thu, 2018-11-29 at 13:34 +0100, Oleg Nesterov wrote: > > > So I think the patch is mostly fine, the only problem I can see is th= at > > > PR_SET_KILL_DESCENDANTS_ON_EXIT can race with PR_SET_CHILD_SUBREAPER,= they both > > > need to update the bits in the same word. > > > > Good point. I'll make it a regular bool instead of a bitfield for v2, > > Agreed, Is it worth doing something for singal_struct like we did for task_struct with the TASK_PFA_* and atomic_flags? --=20 Kees Cook