lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1805251245210.158701@chino.kir.corp.google.com>
Date:   Fri, 25 May 2018 12:48:54 -0700 (PDT)
From:   David Rientjes <rientjes@...gle.com>
To:     ufo19890607 <ufo19890607@...il.com>
cc:     akpm@...ux-foundation.org, mhocko@...e.com,
        kirill.shutemov@...ux.intel.com, aarcange@...hat.com,
        penguin-kernel@...ove.sakura.ne.jp, guro@...com,
        yang.s@...baba-inc.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org,
        yuzhoujian <yuzhoujian@...ichuxing.com>
Subject: Re: [PATCH v5] Refactor part of the oom report in dump_header

On Fri, 25 May 2018, ufo19890607 wrote:

> From: yuzhoujian <yuzhoujian@...ichuxing.com>
> 
> The dump_header does not print the memcg's name when the system
> oom happened, so users cannot locate the certain container which
> contains the task that has been killed by the oom killer.
> 
> I follow the advices of David Rientjes and Michal Hocko, and refactor
> part of the oom report in a backwards compatible way. After this patch,
> users can get the memcg's path from the oom report and check the certain
> container more quickly.
> 

I like the direction you are taking.  A couple notes:

 - you may find it easier to declare an array of const char * for each
   constraint:

	static const char * const oom_constraint_text[] = {
		[CONSTRAINT_NONE] = "CONSTRAINT_NONE",
		[CONSTRAINT_CPUSET] = "CONSTRAINT_CPUSET",
		[CONSTRAINT_MEMORY_POLICY] = "CONSTRAINT_MEMORY_POLICY",
		[CONSTRAINT_MEMCG] = "CONSTRAINT_MEMCG",
	};

 - we need to eliminate all the usage of pr_cont() because otherwise we
   can still get interleaving in the kernel log (the single line output
   should always be a complete single line that can be parsed by
   userspace).

 - to generate a single line output, I think you need a call to a
   function in mm/memcontrol.c when is_memcg_oom(oc) is true and
   otherwise a function in mm/oom_kill.c when false.   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ