Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4309144ybx; Sat, 9 Nov 2019 13:06:31 -0800 (PST) X-Google-Smtp-Source: APXvYqxgczlbKbDubjwdUG81pojoD2z6XV2wc9atrQDEKo+EbbA97OEsPL5Xv5AFFSIq0r4BpFvt X-Received: by 2002:aa7:c695:: with SMTP id n21mr18045923edq.204.1573333591577; Sat, 09 Nov 2019 13:06:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573333591; cv=none; d=google.com; s=arc-20160816; b=zrKvQQKVSdHf5z1BEcNryXrbgF9AQdZpvn+eWESWvUNFgNnZEqwu6r5iDFgvPJjq8G R2ny0StQG95XD22UniJFsU3ExDV3/vJiGHYQn/sAaoiO3bvt7wWAYJLwqEtKFwWnnEyA UBibFmeHsaDbsgBHVuDUGUPTUBTdWueQ+Jc8jn+g2eLEkeNKjfM7XyzLU0lgXaJ6V11X 5WrGQ/m94YC2Nz1PQET1MIFF0CH1h2r5Mk+wgQFVzZIYk8W8hzhyqbY+UYseALbOlXFA ug8L6SsOhGl/Sku3u2nGV5Pkqac2LfiwGMUenIHiLGlWrjytzYCwpd2CwRFaoNCH2VnO K/uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=5bBKbCK1MqHJK8b/QNJLiH0jVrrq2HzedctCt/Sn/zM=; b=PTf4AG+5AywSg5XMdRzfBKP68q3MlM3DZGfyNMr9wh++Cznn1QA61LlXXpnwFHvaQj BMtdNNoDFueBBEPN5bzRF5COZ6x6g/SzpicpBbhqcClLQdlMbo/G7Ji1HRmKkpFwk2uR rZ7kDyfF/aYJtPQ6FR5x3yZWjMsq5omt51D8mn/Ynp7BgIYGylxge+YhZwFzhAVPyRWc L9lVIPsf8FhAwld2xNaNMWVYfoyD//2oX0Fk1JhveRs3m1rtqfWL155jQCyMg3NCBy7Y eY3c6GoVXbWIvPEBwMbHWyLYQmXN4NVpFdmyQtrzUJNhEyem6jFFuEySiy7a2m433KTK evXw== 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 oz10si6151410ejb.163.2019.11.09.13.05.58; Sat, 09 Nov 2019 13:06:31 -0800 (PST) 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 S1726692AbfKIVDJ (ORCPT + 99 others); Sat, 9 Nov 2019 16:03:09 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:34273 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726545AbfKIVDJ (ORCPT ); Sat, 9 Nov 2019 16:03:09 -0500 Received: from mail-qv1-f45.google.com ([209.85.219.45]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPSA (Nemesis) id 1N5VTm-1hrmS02jko-016stv; Sat, 09 Nov 2019 22:03:06 +0100 Received: by mail-qv1-f45.google.com with SMTP id w11so3519335qvu.13; Sat, 09 Nov 2019 13:03:06 -0800 (PST) X-Gm-Message-State: APjAAAV2k8JvymMxplEpZ4LWlhRJ12lcRL5DPKRX91lIzt3uALcIcpi0 St2XKjMdDm8nFqDWlv08kWalMFSW0AXhnL8fwMw= X-Received: by 2002:a0c:fde8:: with SMTP id m8mr16974889qvu.4.1573333385442; Sat, 09 Nov 2019 13:03:05 -0800 (PST) MIME-Version: 1.0 References: <20191108210236.1296047-1-arnd@arndb.de> <20191108211323.1806194-11-arnd@arndb.de> In-Reply-To: From: Arnd Bergmann Date: Sat, 9 Nov 2019 22:02:49 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 20/23] y2038: move itimer reset into itimer.c To: Ondrej Mosnacek Cc: y2038 Mailman List , John Stultz , Thomas Gleixner , Paul Moore , Stephen Smalley , Eric Paris , Linux kernel mailing list , Stephen Boyd , Sebastian Andrzej Siewior , Ingo Molnar , Anna-Maria Gleixner , Al Viro , SElinux list Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:Gl1fFRfO9j2DtrAd5m3vLUZBvw9/Qo04K69D9QBhEGuOD3kC6Ny oJrNEFUAUBLNcpyJd2NO/dlDsQfw9Sx0x1h/mb2qXrr25t9QyHsazOvrdCPsRHKjBDxl844 lLTq5Rdq8mkxH+Z5ZBX6DsSnrGRaVSmGFaY66BoLJi6JMnwp6zjC0bGDz5RmAJpWHhSHKhu gn5MdMPpuQPw6FkLwB1lQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ut+WqSDbMvI=:qi5JdruNp2M1RiCv44NEpL NClrdIpdVHDSulBhWPNKUy5IgZNyGwnR20PN7pXrApDtHKovD3EfNtslqN2/jYr0B4eH9CzcT y8YjI8eky82YrPxm2jMwRPZ2QNpsH/u4qYD7SexAYPhURFPANKx8/4bFv22KMM0/N2c8/mHBA fOqyMWHyPAJgejXwt57yHWDgKcz3wHziYlErVJXitZo/FsMFSrK24BCEsphqkKorbuQ3pgay6 wgrj0V1NFXlgSCS5GNu/uoarBsn2vISyJ8RBc72IJUWSdVVvvappxtPKl3NW1NA6PQ2F104uo GwNyeos9tJ7IDP7PSf5IOvP6U4n2tafCh8rHVFLNUhz3WUcOcUEpmZXRM8lGc48bvIXTXT+zr P6jlJ9DxeY4gas5oxVmABJiEnrCLNPmRz/dAGf+BBabZAdAC7OhCVQCFGSPE13h39/j5xPGfR u4mfQSoyPwZ4hT9tGgADLv1ljE3Hzw5PSCJLyhUmKwanoqhfDm0hcYB78ulb00rr4ngBXfb25 MVeAwHfhHQ5uoM9SC1tqjiWNF5yh2tgHrOiYPisTVqqgSHrbnpIUEjUblJygy5U+FHGGXD27S 0F/QqLs3FYOuLOfun6Pz7nOvRrCZX448Ir0R7aEfg4TTaQ/n4MVRHRGLMgemP2gzHn8Vh4j2K xKn5811CPZA/NanWNOOOyYH3kaBJJn3U6uPobs4iAd8yEstZKL6jdlscaR9s67gQwGIatJl2v eKUIcMGGY3kjGOBcWQBdYQU8V6YGTxP5LfQtRgGXm6egfA06cbOEXWvToPTG+jd+vt27lTqec A/vGneTmMHiJeyUb5ydqIrgU49cdvLQmEGh6XC54TqVfC+HJOWn7fNSOv66cZONFJ6mF8FX0V UmGEuS8UyAaAWkjhy4Vw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 9, 2019 at 2:43 PM Ondrej Mosnacek wrote: > > -struct itimerval; > > -extern int do_setitimer(int which, struct itimerval *value, > > - struct itimerval *ovalue); > > -extern int do_getitimer(int which, struct itimerval *value); > > +#ifdef CONFIG_POSIX_TIMERS > > +extern void clear_itimer(void); > > +#else > > +static inline void clear_itimer(void) {} > > +#endif > > > > @@ -249,6 +249,17 @@ int do_setitimer(int which, struct itimerval *value, struct itimerval *ovalue) > > return 0; > > } > > > > +#ifdef CONFIG_SECURITY_SELINUX > > Did you mean "#ifdef CONFIG_POSIX_TIMERS" here to match the header? No, this part is intentional, CONFIG_POSIX_TIMERS already controls whether itimer.c is compiled in the first place, but this function is only needed when called from the selinux driver. > > - } > > + if (IS_ENABLED(CONFIG_POSIX_TIMERS)) > > + clear_itimer(); > > Since you already define a no-op fallback for the case of > !IS_ENABLED(CONFIG_POSIX_TIMERS) in time.h, why not simply call > clear_itimer() unconditionally? Ah right, that was indeed my plan here when I changed the declaration in the header, I just forgot to remove the if(). Fixed now. Thanks for the review! Arnd