From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755211AbcBEUoH (ORCPT ); Fri, 5 Feb 2016 15:44:07 -0500 Received: from mail-io0-f170.google.com ([209.85.223.170]:36200 "EHLO mail-io0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752509AbcBEUoF (ORCPT ); Fri, 5 Feb 2016 15:44:05 -0500 MIME-Version: 1.0 In-Reply-To: References: <1454695723-4393-1-git-send-email-john.stultz@linaro.org> <20160205121353.63d65c6b33a153bd9f863d8b@linux-foundation.org> <20160205123230.bd8bd228a0f3798a281266eb@linux-foundation.org> Date: Fri, 5 Feb 2016 12:44:04 -0800 X-Google-Sender-Auth: v1tzTc_He4nDg_3MQa1RGRDh0nQ Message-ID: Subject: Re: [PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer slack of an arbitrary thread. From: Kees Cook To: John Stultz Cc: Andrew Morton , lkml , Ruchi Kandoi , Arjan van de Ven , Thomas Gleixner , Oren Laadan , Rom Lemarchand , Android Kernel Team Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 5, 2016 at 12:39 PM, John Stultz wrote: > On Fri, Feb 5, 2016 at 12:32 PM, Andrew Morton > wrote: >> On Fri, 5 Feb 2016 12:23:13 -0800 John Stultz wrote: >>> On Fri, Feb 5, 2016 at 12:13 PM, Andrew Morton >>> wrote: >>>> >>>> IOW, it would be more consistent to add sys_set_timer_slack()? >>> >>> I'm fine with moving this way. >>> >>> Ruchi/Rom: Any objections to that idea? >>> >>> Thomas/Arjan: Any other functionality we should consider including >>> when adding a syscall to tweak timer slack? >> >> A syscall is quite a bit more fuss - implement it on x86_64, provide a >> no-op default in sys_ni.c, add a test suite into >> tools/testing/selftests (mainly for arch maintainers), wait for the >> various arch maintainers to wire it up. > > Yea. It is. And I'm not excited to start over on this, but this > functionality has already run into trouble in the Android tree, as the > PR_SET_TIMERSLACK_PID value has hit multiple collisions over time. So > this functionality upstream would help resolve that pain. > >> Fortunately the build system now emits little messages which tell >> maintainers that there's a new syscall which needs looking at. >> >> And a manpage will be needed, but a prctl manpage patch would have been >> needed anyway. > > Yea. Could this be exposed as a writable /proc entry instead? Like the oom_* stuff? -Kees -- Kees Cook Chrome OS & Brillo Security