Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1096841yba; Tue, 2 Apr 2019 02:07:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqyVPhaU/KCv3spQCqiOJ+k/Hj8exsGljlpqoRwyeQodm3d/BkZ3ThYOe2HhVaZf5RrX6A1l X-Received: by 2002:a63:cf11:: with SMTP id j17mr65980740pgg.252.1554196076120; Tue, 02 Apr 2019 02:07:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554196076; cv=none; d=google.com; s=arc-20160816; b=gCdr7TYRzk6qF10LJFW4luw6qsL0cSn/3HZk6wDKxKAYM1WIIS7ooGPyqIH9NqGQmR Vjce56GB4nMBZ81tuErExJdjII4ISy//+38kYWLaDhi/KjqObc8PIM6zFWw6qqkXZTAS xu+elRJaLnAgQZT40y8fN7D0SBfg4FP7VWxUZG3WB5sOM/1AhYhUTi549NMarmzTsvSW pS5u6e/dFbYhkTkPBriwtQmgTgw6dYYYgly2svwYoLxJLQpffyxEKZdjWNGCEWwWd7HY FcyUgtPBKXQaaJwkbESAelteGG+UT4+IH0a4AxeKbHyVEwlTdAH7umSAhzzH/MYRcYCx xvMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=HgDVmrH1TEj8lB7DZTb8m1c+FDNpEzdNIKj7t7782gA=; b=R9eH5WTzjE53yajH5Kw3LhkMMZ9XORCM6riqA20raGZs8wQF8zksNCJoM+cEGeIkRv aH5GCFEdRbtFXa+woq7wZD9aFcxWPgH3P8ALFZ7HzjYEnKWbMZPZLmR7uS0FO/Syj6HL E+k4uJyU/NOluB08FEHyH+94U8eTfnmff8A+MyGn0XxIhV2Ep6UL+XvucI5A3vJHHgLx 4Gz07Wl4M/CQYvksdLwOFIVbsyx8fwzLKrKIsQgzizilIq5UTzz7MlO0HxeidwpJEvMR DDrYvKp+OphdYXz+ugRtJVa+ZeQNNoZp3khKoq3prthPxkKqQewNZBt3ep1st0Z+mlrH YVNA== 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 j11si3162121pff.216.2019.04.02.02.07.40; Tue, 02 Apr 2019 02:07:56 -0700 (PDT) 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 S1729713AbfDBJGw (ORCPT + 99 others); Tue, 2 Apr 2019 05:06:52 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:34192 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726790AbfDBJGw (ORCPT ); Tue, 2 Apr 2019 05:06:52 -0400 Received: from [5.158.153.52] (helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hBFNX-0000cS-BX; Tue, 02 Apr 2019 11:06:47 +0200 Date: Tue, 2 Apr 2019 11:06:46 +0200 (CEST) From: Thomas Gleixner To: Ondrej Mosnacek cc: Linux-Audit Mailing List , Paul Moore , Richard Guy Briggs , Steve Grubb , Miroslav Lichvar , John Stultz , Stephen Boyd , Linux kernel mailing list Subject: Re: [RFC PATCH ghak10 v6 1/2] timekeeping: Audit clock adjustments In-Reply-To: Message-ID: References: <20190307123254.348-1-omosnace@redhat.com> <20190307123254.348-2-omosnace@redhat.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 1 Apr 2019, Ondrej Mosnacek wrote: > On Thu, Mar 28, 2019 at 1:09 AM Thomas Gleixner wrote: > > > EXPORT_SYMBOL(do_settimeofday64); > > > @@ -2322,6 +2326,8 @@ int do_adjtimex(struct timex *txc) > > > ret = timekeeping_inject_offset(&delta); > > > if (ret) > > > return ret; > > > + > > > + audit_tk_injoffset(delta); > > > } > > > > > > ktime_get_real_ts64(&ts); > > > > This can be done at the end of do_adjtimex() quite nicely in preemptible > > context. > > But wait, isn't this call outside of the critical section as well? (I > must have been moving the call around when I was writing the code and > didn't realize that this function actually doesn't need GFP_ATOMIC at > all...) Or am I missing something? Nah. I was misreading it. Just it does not need GFP_ATOMIC at all. But then you might just combine it with your new struct storage which you want to do for __do_adjtimex() anyway. Thanks, tglx