Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp867305imm; Thu, 31 May 2018 10:45:43 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJPvlbgms9hFX0NUIDDVQas0NI00QN0QobzT/+dfIU18OYaXPRMIb6QBmiCfupngVE/cXCl X-Received: by 2002:a62:f24a:: with SMTP id y10-v6mr7702934pfl.75.1527788743790; Thu, 31 May 2018 10:45:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527788743; cv=none; d=google.com; s=arc-20160816; b=CpH7PaAhZQlnZNCMImF8rCqNV+DGAYVyEolrYrwtp5GvBgU+8QnVst2IOTpiQBhYOB tDZPriRVhyBCvcg97ERHSsRYrOLZNjR7goOrR7WpqOnOOjGsoYFbpCqHCUBsIc02klqi xeAHb1pz5WRgWmITvz2gbk8s/IKqpWpotBccWMsrBzMhkaYq6zkDg9MBAC42dpxNLKST kO3K8B7ahs5MdpSFV5XSD8zmPLxzX9iEmJ2T3senITPHK81lcl1Nbh70Vdn/3wFferrd Y2Lo27tCDCamm4kS+/6/ytIFJn0YtOouMoYoY1VWIxJxeG3HmEKDQ8qVa5xujgq7dxP7 7bfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:mime-version:user-agent :message-id:in-reply-to:date:references:cc:to:from :arc-authentication-results; bh=gj3hS3hAY7hE1+ISTnHMfE9s6qw+Dwz+X2xEneOVOZI=; b=GGSrjZoLhCElE+Ur1Q00ZhtVfSxzKipzaNigyGf37PCEPeu5U8n+XCNkXsWhKlVPGt XfB92F4LojyRuhjYtJkWntoc7yAobs+MKxQFh7NqR7Q8Ox1WDxOrdJyUeOavGDATZUrK qcXUcGD4jNhTb1yh1mCXVMj+8bTusPdDuyewRHgyobsNUavrNb1Fzz2XnVSeE6QFo9L7 Er+Henj9TPlcp7vmigRPn2vQ4wzYFZsAt84CdgJ7A+uwacpyQEYuu1ZW7MdFOZQQBRUm TgsqqeGpTpzghIs2+courwGPcDUf+ybRE0ora1yT6kFenUhyfe0H2/CWFFmqkW19O5w9 FA3g== 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 n8-v6si479337pgr.437.2018.05.31.10.45.29; Thu, 31 May 2018 10:45:43 -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 S1755860AbeEaRns (ORCPT + 99 others); Thu, 31 May 2018 13:43:48 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:51892 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755763AbeEaRnp (ORCPT ); Thu, 31 May 2018 13:43:45 -0400 Received: from in01.mta.xmission.com ([166.70.13.51]) by out01.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1fORbn-0003dR-Ka; Thu, 31 May 2018 11:43:31 -0600 Received: from 97-119-124-205.omah.qwest.net ([97.119.124.205] helo=x220.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1fORbm-0006LA-SF; Thu, 31 May 2018 11:43:31 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Michal Hocko Cc: Andrew Morton , Johannes Weiner , Kirill Tkhai , peterz@infradead.org, viro@zeniv.linux.org.uk, mingo@kernel.org, paulmck@linux.vnet.ibm.com, keescook@chromium.org, riel@redhat.com, tglx@linutronix.de, kirill.shutemov@linux.intel.com, marcos.souza.org@gmail.com, hoeun.ryu@gmail.com, pasha.tatashin@oracle.com, gs051095@gmail.com, dhowells@redhat.com, rppt@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, Balbir Singh , Tejun Heo , Oleg Nesterov References: <20180504142056.GA26151@redhat.com> <87r2mrh4is.fsf@xmission.com> <20180504145435.GA26573@redhat.com> <87y3gzfmjt.fsf@xmission.com> <20180504162209.GB26573@redhat.com> <871serfk77.fsf@xmission.com> <87tvrncoyc.fsf_-_@xmission.com> <20180510121418.GD5325@dhcp22.suse.cz> <20180522125757.GL20020@dhcp22.suse.cz> <87wovu889o.fsf@xmission.com> <20180530115246.GB20910@dhcp22.suse.cz> Date: Thu, 31 May 2018 12:43:24 -0500 In-Reply-To: <20180530115246.GB20910@dhcp22.suse.cz> (Michal Hocko's message of "Wed, 30 May 2018 13:52:46 +0200") Message-ID: <87vab3en5v.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1fORbm-0006LA-SF;;;mid=<87vab3en5v.fsf@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=97.119.124.205;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1+7DnYmQKjVW7DvzBp6+3negZCqR5XNU3o= X-SA-Exim-Connect-IP: 97.119.124.205 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa08.xmission.com X-Spam-Level: ** X-Spam-Status: No, score=2.3 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,TVD_RCVD_IP,T_TM2_M_HEADER_IN_MSG,T_TooManySym_01, T_TooManySym_02,T_XMDrugObfuBody_08,XMNoVowels autolearn=disabled version=3.4.1 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.0 TVD_RCVD_IP Message was received from an IP address * 1.5 XMNoVowels Alpha-numberic number with no vowels * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa08 1397; Body=1 Fuz1=1 Fuz2=1] * 1.0 T_XMDrugObfuBody_08 obfuscated drug references * 0.0 T_TooManySym_02 5+ unique symbols in subject * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa08 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: **;Michal Hocko X-Spam-Relay-Country: X-Spam-Timing: total 179 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 4.8 (2.7%), b_tie_ro: 3.5 (1.9%), parse: 1.06 (0.6%), extract_message_metadata: 3.0 (1.7%), get_uri_detail_list: 0.83 (0.5%), tests_pri_-1000: 4.2 (2.3%), tests_pri_-950: 1.33 (0.7%), tests_pri_-900: 1.15 (0.6%), tests_pri_-400: 20 (11.1%), check_bayes: 19 (10.5%), b_tokenize: 4.6 (2.6%), b_tok_get_all: 7 (3.7%), b_comp_prob: 1.41 (0.8%), b_tok_touch_all: 3.4 (1.9%), b_finish: 0.81 (0.5%), tests_pri_0: 132 (73.7%), check_dkim_signature: 0.41 (0.2%), check_dkim_adsp: 3.2 (1.8%), tests_pri_500: 3.9 (2.2%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH 0/2] mm->owner to mm->memcg fixes X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Michal Hocko writes: > On Wed 23-05-18 14:46:43, Eric W. Biederman wrote: > [...] >> As two processes sharing an mm is useless and highly unlikely there is >> no need to handle this case well, it just needs to be handled well >> enough to prevent an indefinite loop. So when css_tryget_online fails >> just treat the mm as belong to the root memory cgroup. > > Does that mean that a malicious user can construct such a task and > runaway from its limits? Unfortunately if the memory cgroup is delegated than yes that can happen. So removing the loop in get_mem_cgroup_from_mm won't work. Eric