Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1149527yba; Tue, 2 Apr 2019 03:23:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqztmZc7nAnycHA8ShW4zS7tEEF7pCGvtuNk+FjjCSZvaON9BlfZOoPW4L+HD3dfJfFBAKN/ X-Received: by 2002:a17:902:9a4a:: with SMTP id x10mr12050611plv.113.1554200594463; Tue, 02 Apr 2019 03:23:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554200594; cv=none; d=google.com; s=arc-20160816; b=gtXamEcNqXC6ZJskEDbQRLShREaFJTgzLsEj8kJrnOvE5gkA2AXQ4U1fE37NuRE5K2 oq5/vb1HwyMB/bPUNgJes3zC7Aneukaae7LMGXWKambyib9uSSTXSuUyvVT0ak+whkIq zD/3s9OKgK6CT2qojU1r9dYsXmTank20rmMdJ96G3htY2Oh1zcA8itmX/EBhoY29Y4Bw /DtanZcrYfmR3D6nNnF55F/Dd7s7K3OVoeL1s74spRn9OPKbfBZqPbepIJ4mHsJD7QXt 87If7RbR95a2CmTki/5XOcsegqxEDEhVykJZV41y40znLYAS2uo4DXeX3OL6x97n4sCd dmPA== 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=CoHAi+qRLQdp4IY+OB0DJ9RgiTclZZdQlOLJQl1SCmg=; b=DKAz/WkcfT9TaTWK6UrY3oIrccKYwormdJGlFe4/dEVt/JKy30ZmuLl5EzfSzgYn8U OJKJiC2UATMAhaaemalBHtMTwmpClvfBeoyY4JfgJJiSUmF9SCoIwsWlKJLVcDROA5CT vwxD9+m3z1pyI9sf0sjsrubx9fIFn/09XjlepUY0AEFDTD2faJSWlEV4wq28PuaVYvVk EVlBTfksWuo39PrY1P219iGjffJLFCQ71bt8XsnDgaNfuuCV6RZbimsGXrwj9coUK5xl +XPNygvu54nFkEMADc9wfBN8Gt/+BqrXgOruDq684CEcq8LF6HxPpbLYwAQM+r1YhD+M xA/w== 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 r23si8363924pgv.471.2019.04.02.03.22.59; Tue, 02 Apr 2019 03:23:14 -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 S1729831AbfDBJDR (ORCPT + 99 others); Tue, 2 Apr 2019 05:03:17 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:34175 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725991AbfDBJDP (ORCPT ); Tue, 2 Apr 2019 05:03:15 -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 1hBFK2-0000OV-4I; Tue, 02 Apr 2019 11:03:10 +0200 Date: Tue, 2 Apr 2019 11:03:09 +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 2/2] ntp: Audit NTP parameters adjustment In-Reply-To: Message-ID: References: <20190307123254.348-1-omosnace@redhat.com> <20190307123254.348-3-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:02 AM Thomas Gleixner wrote: > > On Thu, 7 Mar 2019, Ondrej Mosnacek wrote: > > > /* adjtime() is independent from ntp_adjtime() */ > > > time_adjust = txc->offset; > > > ntp_update_frequency(); > > > + > > > + audit_ntp_adjust("adjust", save_adjust, txc->offset); > > > } > > > txc->offset = save_adjust; > > > } else { > > > > Not going to happen. We are not reshuffling all that code just to > > accomodate random audit log invocations in a critical section plus having a > > gazillion of GFP_ATOMIC allocation in the critical section just because. > > OK, seems I underestimated the consequences of putting the logging > calls directly in there. While I was offline over the weekend I > already came up with a cleaner version that collects the changes in a > structure and does the logging outside of the critical section. I > currently does a few unnecessary writes into memory under > CONFIG_AUDIT=n, but if that is an issue I can boost the abstraction or > just add some #ifdefs to avoid that. No ifdefs please. Aside of that, why do you need all those details of the ntp internals in the first place? The changelog does not give me an answer to that. Thanks, tglx