Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2405517yba; Thu, 25 Apr 2019 16:11:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHDmTDCJ4KwGFrnl3JF+uvSm0sTFfSjXpT5wzsMy9m1+Xj8B7FNvxAlNtHN9o+c0StfYqJ X-Received: by 2002:a63:f115:: with SMTP id f21mr39696976pgi.65.1556233871065; Thu, 25 Apr 2019 16:11:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556233871; cv=none; d=google.com; s=arc-20160816; b=kjC/71ht+MQMfnT1/omkgTm2EaFORVgLD9ZXvjjtetRPxTrOfspA2bryee9d4dCdhG xe42nF2IQ2G8Cv9f+PjfDjuHJYqfIBvFzKtyf1m+qSBPZnWGBq7HgPZsEqXJv3tOsleE zq5ySGBA66BlyDTG3K3RRdv5fWg6FiGxF5I76siG4KuukeDiHSqqPyDTllIRv+466mCC EVSqsg0lDWb+3JOwk1psJzDVvs8Lwz5c8eAN/ql5uiKdCCuLACW+Lwn0ZPnnh3G6ovxw BD6Bs/y/x1BJSM3dqjExreFSdB6r26RJS6gtRp3zWw7yVyaya1hE/jCP9zKL0qGBDnaW 39Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=q3t7m72xnriC1AtIWYUp+t+avKLKvsO18nYRudIdLpE=; b=mXXzG8VS2UTpGLl23O/7TlpLopSA4eMNrANIU3awO1j8j8uuqxiTWEfmalusnVd7mF JoE6XfH30KoNxGWi0BJuYfTbAjYYx1XPd9Yk259P2UIXLFo0Oqfm3aUqqkIZZUJORrcx rQApXPevoVoKJUQzzEwgBZwfTj9Iwlh7PIDzj780TiWdGFnFwqRjuzrKh04V2YBsA1LO T+1Ta6jEUpmiQxsbrfgvc9qLIFrIX5TMwsGXwyBW7amMbUfWJsTXN5GK4pGfzmS3cZrz oZxeqN8wwAbVyhhvnq8qSRPc/T4KVX5zMQpXNDYMa9sYaPG9hx1mODPVW5vi+AeSFPPr +D8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=hnLnV0Fm; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w15si10121406pga.591.2019.04.25.16.10.55; Thu, 25 Apr 2019 16:11:11 -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=@google.com header.s=20161025 header.b=hnLnV0Fm; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728125AbfDYWpI (ORCPT + 99 others); Thu, 25 Apr 2019 18:45:08 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:35658 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726380AbfDYWpI (ORCPT ); Thu, 25 Apr 2019 18:45:08 -0400 Received: by mail-pf1-f193.google.com with SMTP id t21so655524pfh.2 for ; Thu, 25 Apr 2019 15:45:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=q3t7m72xnriC1AtIWYUp+t+avKLKvsO18nYRudIdLpE=; b=hnLnV0Fm4GpZPPZZifuFJOv5LDjcCq0mbhuM/jcZ/0vyr6Yc60Lqblv/WuFTi+U7mu QAfMAtl5b19inEcIlK3vb+mjrMpxvKRr8Xc+52e7+236bXx8ykIsH4UX1ejGqbTvH+4z C9SbfbF5GFGVkacgvSNsO6QstuqtMcgkcTAlhZVm7W1ZFkra3qvPO5Ci3tmD6e6uiJ3u dUBoNHaJTlQ+6SaP4UKLJJVyjJoA48IhxuH/7pTTjJST8G8GnQJV9m3AAajQi00xsT5C i8nb/7PgcRiifOv8Q47j7uBGvFK0wLPnnUVOjRL7LxYFAnO3TwFYXWPGYVw3HSjtvjcT 4qgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=q3t7m72xnriC1AtIWYUp+t+avKLKvsO18nYRudIdLpE=; b=oLKzN5JmhgPijbZM0FWc8c5g8c4r2bNJdQJqlSsNrs7OXOI887M9tY6tz2LjCLgzYS vDN70dvl5vCUpgWUojvg6T/d27fnWK8cduVs5et0rGi+ufn4MesrhtU42+uXIJZ/etjQ TE14f/RNlzxjKIRSAXSVAXdJLQtt645ITs6YM+Iz5AzBL7DJrwDs7rVn4DOmptM67KAx BrG031vtg8PXCQ1uVf3HUR/UTPl9I/AB6F1M4hc9Lliw2L9wAKyrWV+VZck/LfH/5CsG 1XipzLmzatKORM/2FYvoKMmcyt+tchoUvxUhFn6cTT3AIfGLjYmWTeUO7BEFWTzxTu+U SdOg== X-Gm-Message-State: APjAAAUZ609fDK1e3nqNNCsF/KgRcujWG6ucMdFquQQVMMHg4/MADo4l tmi6YtDSYMRYn2yTinB3IFU4BQ== X-Received: by 2002:a65:654c:: with SMTP id a12mr8537744pgw.101.1556232307137; Thu, 25 Apr 2019 15:45:07 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id h4sm31517875pfo.119.2019.04.25.15.45.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Apr 2019 15:45:06 -0700 (PDT) Date: Thu, 25 Apr 2019 15:45:05 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Joel Savitz cc: linux-kernel@vger.kernel.org, Rafael Aquini Subject: Re: [PATCH] mm/oom_killer: Add task UID to info message on an oom kill In-Reply-To: <1556130013-19021-1-git-send-email-jsavitz@redhat.com> Message-ID: References: <1556130013-19021-1-git-send-email-jsavitz@redhat.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 24 Apr 2019, Joel Savitz wrote: > In the event of an oom kill, useful information about the killed > process is printed to dmesg. Users, especially system administrators, > will find it useful to immediately see the UID of the process. > > In the following example, abuse_the_ram is the name of a program > that attempts to iteratively allocate all available memory until it is > stopped by force. > > Current message: > > Out of memory: Killed process 35389 (abuse_the_ram) > total-vm:133718232kB, anon-rss:129624980kB, file-rss:0kB, > shmem-rss:0kB > > Patched message: > > Out of memory: Killed process 2739 (abuse_the_ram), UID 0, > total-vm:133880028kB, anon-rss:129754836kB, file-rss:0kB, > shmem-rss:0kB > > Signed-off-by: Joel Savitz Makes sense, could you add it to the end of the message in case anybody is parsing the current string and we would now break their regex? This would also need from_kuid(&init_user_ns, task_uid(task)) instead.