Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4262158imm; Mon, 15 Oct 2018 11:41:35 -0700 (PDT) X-Google-Smtp-Source: ACcGV608RqzdcijphJi8PRzhkBJIcm78VC1yb+RT0+ggHZkdHt2SbjgOCo13+W/WE3wSIeO4h0OE X-Received: by 2002:a17:902:bd0a:: with SMTP id p10-v6mr17684846pls.245.1539628895595; Mon, 15 Oct 2018 11:41:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539628895; cv=none; d=google.com; s=arc-20160816; b=t5zqs13J4743bTRGLkypAVBLGLx6GHRyTNkOb9+uAKE0/TlK6xyBNAyiH8S+aAzp0Q T3THPVH1cAfkpFoPQlLP264xpy3QRvFzalz7PXmJFRvbjY5Vobj7mYq1k/V4qSUChxbr nSNCrm0lrdSxR8bw8bYYD+wzGL3OeZ+ovzxtOdhvP4a8jtO1MFaLXqkW9P0gyvD57veS hoaaMrpSzCYrWPs42aqEqNio7ThV0MvRuRwIxaDx44RLk4fMFZd6cUeHGx5e+nV6A95R nti0YgZCLMsy9SE9p516c7desRFcDI2JCZ3lnOnBD83n0y3cidmIj2303N4hn6oO6PTN I3tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:subject:dkim-signature; bh=icMRi4S56gD+pq+DYx32OfK2vhHQlygsNAvlGTQF45s=; b=l30yq7WPdyKSBDHwn1jf4grM79OzbMKyN8VpVewDCHtyykK9v81jM/fpYCf/NZl+mt S7n/Df1yksT+UkYfvD+kQjPQKtrSUU1WnYuxhNCIAXGreYw3lOeqwRBBQ1YQb/icuUUh y55hrXIgOv2QvyI/Z4X9vYhP23UvXVctBaq1pBVut7Z5Fswb4N06Ap0wkqZps5pT5cyr jEmEmrngITyJ7UuS0hBtteVHK+TMaVlgoLNv2VIKyfp7xmtW3EORCh4fpb1k+3jYOgeW mtVFm/vYw4OCec8psB4TS9himPccbyhKTcewJ3wNywY32MZHhqxdKJ2AL/lHbj/kWhXm 7eUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cisco.com header.s=iport header.b=ZGY9umb0; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cisco.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l22-v6si11536305pfj.188.2018.10.15.11.41.19; Mon, 15 Oct 2018 11:41:35 -0700 (PDT) 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=@cisco.com header.s=iport header.b=ZGY9umb0; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cisco.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726948AbeJPC0I (ORCPT + 99 others); Mon, 15 Oct 2018 22:26:08 -0400 Received: from alln-iport-8.cisco.com ([173.37.142.95]:52186 "EHLO alln-iport-8.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726594AbeJPC0H (ORCPT ); Mon, 15 Oct 2018 22:26:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=746; q=dns/txt; s=iport; t=1539628780; x=1540838380; h=subject:cc:references:from:message-id:date:mime-version: in-reply-to:content-transfer-encoding; bh=QwMaFRmp4FoAGJvsqbXJX/x9khc5sTCL54rY9D1eWyE=; b=ZGY9umb0A/b1C73IAPoPF1tZmaTR6Ki+Ycfq4jXKwF/HeDKOpwWuL0OR /xpm/HZ9GFs4NIkWf46GCOywZYa8bcIbs3reoHTNXMyIVGaLnwu04+3PU JFPfylc0DHzDCxlEeFH484s3G8cQ6fb74NDTlAL7iI3cHe0cYiC4n4MMr k=; X-IronPort-AV: E=Sophos;i="5.54,385,1534809600"; d="scan'208";a="185845618" Received: from alln-core-12.cisco.com ([173.36.13.134]) by alln-iport-8.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Oct 2018 18:39:39 +0000 Received: from [10.154.208.167] ([10.154.208.167]) by alln-core-12.cisco.com (8.15.2/8.15.2) with ESMTP id w9FIdXst019863; Mon, 15 Oct 2018 18:39:33 GMT Subject: Re: [PATCH] kernel/signal: Signal-based pre-coredump notification Cc: christian@brauner.io, Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Peter Zijlstra , Arnd Bergmann , "Eric W. Biederman" , Khalid Aziz , Kate Stewart , Helge Deller , Greg Kroah-Hartman , Al Viro , Andrew Morton , Catalin Marinas , Will Deacon , Dave Martin , Mauro Carvalho Chehab , Michal Hocko , Rik van Riel , "Kirill A. Shutemov" , Roman Gushchin , Marcos Paulo de Souza , Oleg Nesterov , Dominik Brodowski , Cyrill Gorcunov , Yang Shi , Jann Horn , Kees Cook , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, "Victor Kamensky (kamensky)" , xe-linux-external@cisco.com, Stefan Strogin , Enke Chen References: <20181013104446.b3z26rwmiripqfks@gmail.com> From: Enke Chen Message-ID: <5bbe7c70-d6a8-7b37-51d4-eed9a99bc7e1@cisco.com> Date: Mon, 15 Oct 2018 11:39:32 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181013104446.b3z26rwmiripqfks@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Auto-Response-Suppress: DR, OOF, AutoReply X-Outbound-SMTP-Client: 10.154.208.167, [10.154.208.167] X-Outbound-Node: alln-core-12.cisco.com To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Christian: As I replied to Jann, I will remove the code that does the setting on others to make the code simpler and more secure. Thanks. -- Enke >> +static bool set_predump_signal_perm(struct task_struct *p) >> +{ >> + const struct cred *cred = current_cred(), *pcred = __task_cred(p); >> + >> + return uid_eq(pcred->uid, cred->euid) || >> + uid_eq(pcred->euid, cred->euid) || >> + capable(CAP_SYS_ADMIN); > > So before proceeding I'd like to discuss at least two points: > - how does this interact with the dumpability of a process? > - do we need the capable(CAP_SYS_ADMIN) restriction to init_user_ns? > Seems we could make this work per-user-ns just like > PRCTL_SET_PDEATHSIG does? > >> +}