Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4408381ybx; Sat, 9 Nov 2019 15:09:19 -0800 (PST) X-Google-Smtp-Source: APXvYqy5VpsJOq046X2u3NfyzCi+QTS/NCRr9uQyxfSICtrGlQ1YM0YJ9dbeSbs8HaGXxWML06o2 X-Received: by 2002:a05:6402:3042:: with SMTP id bu2mr18298673edb.298.1573340959578; Sat, 09 Nov 2019 15:09:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573340959; cv=none; d=google.com; s=arc-20160816; b=XTYT8/HZz1W1mjRAFgmnpiaJYk2kU8feNmSm0HQO144sjsVn+UksRZYHV1vBrfD5lN 2g573W59BxY53J1M5Cs812n/JUonLfWpLzcGlHS8RAcBr2zv+FMgEwzJ6cJR8n1fBBR3 lUUgYn76xssGjunpne6QRWSE8VIkGVrsQ0X61EF+5qkzujG52y2xt7BYA2+zTVYxfPYQ 4UsxNokr7QCt4flnHDiEbcv7k3MvKY0zXs8NTNvLiJEUi2hw7M8CNtS/RQB8rp44nycL e/DjoVAxkdnevvGWRR5wWV81hBagU7ayGjBuJ55EWs5hZSE0ZQytssuFuxTf+Y1ABox4 np9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=nM/QlBuwgFsk9POi3L9W4gfZTnhffjaZ1rya0qjcHXg=; b=bOIg9RidX4OiXTG617Ud+iuYwlQAM1kPmgq90MC40dj/meCEfd4q1Ps7XlOI/i7HaK JaJDcwYRxzp6ubf+0bOYzDvq0EHBWMzu8712VDUeorkjPRoDK5Z1MFFSTTMX7oDh5oR7 MeqOucBopjgCmmPIte1njDnUcv2oWDAOE17AcSRulLN4kN5816ePQlSfCcDWeiXg7QUE KZmuZLImnjA2e7lz0dyOGyoGhnBBFzgI6wdLbN4rrxGNXYFYCHAhv3nVueJ0xME7tQTk zOI5mW7s+ubNLZ3NaMs3s7dNU8YpRPEFoRVXvrq0KSwfylyND65mX4ylbOh1LjjKI4OC /QuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Pms9Fk0T; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id uz25si6612835ejb.43.2019.11.09.15.08.55; Sat, 09 Nov 2019 15:09:19 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Pms9Fk0T; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726641AbfKIXHh (ORCPT + 99 others); Sat, 9 Nov 2019 18:07:37 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:29035 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726470AbfKIXHg (ORCPT ); Sat, 9 Nov 2019 18:07:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573340855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nM/QlBuwgFsk9POi3L9W4gfZTnhffjaZ1rya0qjcHXg=; b=Pms9Fk0TkPDCeYYTUEEbcYQoS7EIvFQDPsLwIFl5ub/ZTa7r8ZINHDsIeKPcgUy1de7sgZ cxCmzRqyBrAFliYSYqyhS2fXd3/DO6KR//khogZfZ72W58wNpItvAb/U9ix+zL6SasILwe dIsJnuJ9CWxV1b7TB722qAKvaWJQ5uo= Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-419-lzRiNWsXMBKiC2ItYrSv1g-1; Sat, 09 Nov 2019 18:07:32 -0500 Received: by mail-ot1-f69.google.com with SMTP id 88so8268567ots.1 for ; Sat, 09 Nov 2019 15:07:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=joVZUMPvUOgWVUGh3XNj6yKcnBUM0ZIbNDOvlvl0Y3s=; b=j05h+X8K6VOLQTNY0xdYbKOAu447yfKwCiZlq7kJi0/X5N7jXtLH175IwCPmwSjL+c FoKpEv8iOzyAiFEAxP9dv8IwA7Ndzo8G+0SF/1JvLq6/pHbnmmvJW18cGybcf/7lJ/7a K5LlWQOQvQoXxcr9K2uCgyjjUiFMDA5Cb/LHyT2icW8AwHnfqlCkw4+TaJi9F3PSx/dd 8TjVCBIlEJPzAlWM/qrWIfosMdydzfc++Yvdyj0G9QSp11v+YQOHX30ABorCjmSQLmlD MtnIwVs+26PmoBc+GeYKyZYEt8BKTMBY5bMNqBy4wNDy5UggdKGf1W88E/47S46NkFh4 nJAA== X-Gm-Message-State: APjAAAV6zaKtPP3XKYEuGTYlYGUw70Lskm7BqbBOF7ALKFJmtWRQzkOT 9bUYvQMCYCwGWeh0hAUvQmkmZg2jyynEYSkULUey1EfSkx33hDVrZryqmNwCc+2YuBeeLAdujc2 XbzHQSTF/a9cCjlc/arfh7ht1UkwY9DhPOdoY/zrR X-Received: by 2002:aca:ecd0:: with SMTP id k199mr17121164oih.166.1573340851730; Sat, 09 Nov 2019 15:07:31 -0800 (PST) X-Received: by 2002:aca:ecd0:: with SMTP id k199mr17121146oih.166.1573340851438; Sat, 09 Nov 2019 15:07:31 -0800 (PST) MIME-Version: 1.0 References: <20191108210236.1296047-1-arnd@arndb.de> <20191108211323.1806194-11-arnd@arndb.de> In-Reply-To: From: Ondrej Mosnacek Date: Sun, 10 Nov 2019 00:07:20 +0100 Message-ID: Subject: Re: [PATCH 20/23] y2038: move itimer reset into itimer.c To: Arnd Bergmann 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 X-MC-Unique: lzRiNWsXMBKiC2ItYrSv1g-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 10:03 PM Arnd Bergmann wrote: > > On Sat, Nov 9, 2019 at 2:43 PM Ondrej Mosnacek wrot= e: > > > > -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 *va= lue, 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. All right, but you declare the function in time.h even if CONFIG_SECURITY_SELINUX is not enabled... it is kind of awkward when it can happen that the function is declared but not defined anywhere (even if it shouldn't be used by new users). Maybe you could at least put the header declaration/definition inside #ifdef CONFIG_SECURITY_SELINUX as well so it is clear that this function is intended for SELinux only? --=20 Ondrej Mosnacek Software Engineer, Security Technologies Red Hat, Inc.