Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4060935imm; Tue, 25 Sep 2018 10:38:46 -0700 (PDT) X-Google-Smtp-Source: ACcGV60wvR3Z00dXvicbNCMQ92lBrqlU6eRHoaVPsgOY8eO085nlDCAQhCGFl+s7T3hPNsGSiQVS X-Received: by 2002:a17:902:18a:: with SMTP id b10-v6mr2255642plb.62.1537897126769; Tue, 25 Sep 2018 10:38:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537897126; cv=none; d=google.com; s=arc-20160816; b=vYOG5f5JhebTtXz2xFqbkvy8lno1ChKNJfM8VR+CxnV4TAAEEqzCZzRa20ui8npxZQ +r4As+4xCKViIoYXT8w8eA8n3H7G+LXaaO7zG+mJ2icGy+twfm33Svu8R6rLrJlTCPLK ZdAB0loyso/TCMxhp6MpeCVuJTqEXVyt51Jd0qUno11SwyWZWK8g4QQpYfvGnmSlK8B4 7edTKdSGQYfkc3xL/XmbfLn/77iEn4nrOTZ2Z74GIoFD68H46oImJC6hUdTMPMdysRTd xVRyquIFwsCgaNsyFcFzmrivJ00foSkRwDAs0MtDzawOL1U/KYPQPlQbsrCHcmBztrZm IFMA== 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=ZbwM9TxwvoebiqF9GO6SDxloiQ1BaNi//IKoFCh6wkI=; b=s/9xftN/5ypkiPgvIMkS5G1oq7RJKfLime4FfwsJ28aJGfofSW7A1PQdFf807ELTZ6 Du68H8nOaOn74hl2o7aJchuFr1XmAQlb3AbOvlVBEYWPGNpouoRJaK+ldD1VZIB+sHal fqmwvWYm2JwKHZAxA7OMyF6NODL8dsOs/fhAREbcfCuo3Zd29JuDjpJhcz2RlCXn12X+ byEWO7ohGnnCFjgLJRv4fHAkBZ8FT/ux0g8HPlNzAWWsZnPJ2ElJ0o59RwBjARxk/yn+ q+OOeW9L+Jgd5plpkmxWxXSpbEtHSpKhs/E0s07ZXcPhtWIk4LIWZFqRtM3JZoL27UTy KGRg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c17-v6si2902240plz.467.2018.09.25.10.38.30; Tue, 25 Sep 2018 10:38:46 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726815AbeIYXqW (ORCPT + 99 others); Tue, 25 Sep 2018 19:46:22 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:49646 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726163AbeIYXqW (ORCPT ); Tue, 25 Sep 2018 19:46:22 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C9F52FA2; Tue, 25 Sep 2018 17:37:47 +0000 (UTC) Date: Tue, 25 Sep 2018 19:37:45 +0200 From: Greg KH To: Tong Zhang Cc: tglx@linutronix.de, akpm@linux-foundation.org, linux@dominikbrodowski.net, gorcunov@openvz.org, ebiederm@xmission.com, keescook@chromium.org, Dave.Martin@arm.com, wolffhardt.schwabe@fau.de, yang.shi@linux.alibaba.com, linux-kernel@vger.kernel.org, wenbo.s@samsung.com Subject: Re: different capability from different namespace required for prctl_set_mm_exe_file Message-ID: <20180925173745.GA20508@kroah.com> References: <990D0DB4-35C7-4B7B-A938-2B984CD97E78@vt.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <990D0DB4-35C7-4B7B-A938-2B984CD97E78@vt.edu> 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 Tue, Sep 25, 2018 at 01:26:55PM -0400, Tong Zhang wrote: > Kernel Version: 4.18.5 > > Problem Description: > > We discovered inconsistent check when using prctl_set_mm_exe_file(), which is used to setup exe file link. > > It is required to have capable(CAP_SYS_RESOURCE) in prctl_set_mm(). > while ns_capable(CAP_SYS_ADMIN) in prctl_set_mm_map(). > > There are two differences: > 1)requiring capability from: user namespace, init namespace. > 2)capability bit required is different Can you submit a patch showing what you think is the correct fix here? thanks, greg k-h