Re: /proc/self/oom_adj is deprecated in newer Linux kernels - Mailing list pgsql-hackers

From andres@anarazel.de (Andres Freund)
Subject Re: /proc/self/oom_adj is deprecated in newer Linux kernels
Date
Msg-id 20140610153347.GM8406@alap3.anarazel.de
Whole thread Raw
In response to Re: /proc/self/oom_adj is deprecated in newer Linux kernels  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: /proc/self/oom_adj is deprecated in newer Linux kernels  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2014-06-10 11:20:28 -0400, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
> > On 2014-06-10 11:04:52 -0400, Tom Lane wrote:
> >> But anyway, yeah, the point of this feature is that the OOM priority
> >> of the postmaster, and *only* the postmaster, should be raised.  Allowing
> >> unprivileged people to break that is not attractive on any level.
> 
> > A superuser could already write a function that echoes into /proc?
> 
> Maybe I'm mistaken, but I thought once the fork_process code has reset our
> process's setting to zero it's not possible to lower it again (without
> privileges we'd not have).

No, doesn't look that way. It's possible to reset it to the value set at
process start. So unless we introduce double forks for every backend
start it can be reset by ordinary processes.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: /proc/self/oom_adj is deprecated in newer Linux kernels
Next
From: Robert Haas
Date:
Subject: Re: /proc/self/oom_adj is deprecated in newer Linux kernels