Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5680307imm; Mon, 27 Aug 2018 02:15:25 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYVcY32K8YqhxLnLIUVP9q7r3ylMd4xnQVilbpeuyNTuMTzcumvAQ8nNN3SreKp1W7muObw X-Received: by 2002:a62:1157:: with SMTP id z84-v6mr13519595pfi.66.1535361325273; Mon, 27 Aug 2018 02:15:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535361325; cv=none; d=google.com; s=arc-20160816; b=O3i/czDaCbmdwDN8Q3CxJe45h8Zy7S++xziAyvbLIjSmyfVJuUESmn+CfoxMzGQknF DGA4T1NnLiOMeYn2CgyLL4ZbZFMzKixYTtsoWT/utGzep6Cs2yu+sgoKvedS8kTU1Q00 JoUBDujAKPPOpdgojLVZcNrLrULNBKoXWcX3DxG4FBpuYS6Yi+7fUWVrIyGRSGmDyEjj d2K2XToBX+z12KFd+tbtSPCSveT5jCUIxduIkvmu3vq1L9JI2IS/WR7ma+SeB6HlxM0L HRyfBe4M5FBlngpLCNufV2yZB0Q4ZWvxrBRMS0+n9C1fidyxt3OiHcPE8VWywvNMXugC r1ow== 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:arc-authentication-results; bh=FdyB5L5u+AgNWTGX8hrCvOghcobJpARjDStYBw7uhzI=; b=yKRLZcQTIBiJrrpRm8+zHPoEWrqvGnyp4zkO2qHYdn4krA+zLvMMp19/poLHSDqMqo TzKzmYLq5eekg6BGr69NXwJeRtvPPlL71NuIVO7GDgfA/t34LyAJo9pd0yvy1GEHypLx rMJYco++295riNFpie1NekZgnSaK5ha3cnAr1thYzqgx9MkKnYcKooRb/xtZ7Bpj9p8+ UgJblImlpv6vIFoczHA1ivMg/r1pdKsjsYYlZedjNf0CD/u9Bd+B1xvClw3tZpy7lf6m E2APPCezqkGGHnHaMz7POObQKJSlM+PBb9YaCCyFLzUWSv4Iz4ZUhVa/JQM7fKukvKLX 0lbA== 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; dmarc=fail (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 d4-v6si15067707pfc.219.2018.08.27.02.15.10; Mon, 27 Aug 2018 02:15:25 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727498AbeH0M7S (ORCPT + 99 others); Mon, 27 Aug 2018 08:59:18 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:43510 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726809AbeH0M7S (ORCPT ); Mon, 27 Aug 2018 08:59:18 -0400 Received: by mail-oi0-f67.google.com with SMTP id b15-v6so26023248oib.10 for ; Mon, 27 Aug 2018 02:13:29 -0700 (PDT) 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=FdyB5L5u+AgNWTGX8hrCvOghcobJpARjDStYBw7uhzI=; b=rUSzwk1jlU/4Khkr4/D9FvTumyZ8wE6oOLLp7mfjS9kDRcX9PBaXzW7qpnw6L/9Pzy tg778vJ7FYXaWWg4cl3Bov8s0cAXL6yemf64ueeBrX1Ol+nOUWK0IMk5+2i3ycDHdo07 yd/17RjBbP0lSzKey+IdG4ZVyYuG7xkuoh09hVyw9wU4DwwacRRvscgHFyaOzBWzIZDY +URFHOXoYK+Hi/An71cV1dHwuyotH0Nu4WMmxBBiblsY4FkW/z6l1nKxFyXFot8wtn0e cnCAoVRxC7WqfRATTUZXWYmJHlNJIyW3HVahadsp1AzPws4fEwmuntC+LdQToEfSICA6 WFLw== X-Gm-Message-State: APzg51B/tLCB3kImDwHq8Yrcbt+5Zh7kh5aKXhxQW5XIah6f+DfYk5AE B9FV5GtZAK55ZeAWVl6UrsVYnDvQxhRY3e1zU4K4FQ== X-Received: by 2002:aca:7c2:: with SMTP id 185-v6mr11917504oih.31.1535361209229; Mon, 27 Aug 2018 02:13:29 -0700 (PDT) MIME-Version: 1.0 References: <20180824120001.20771-1-omosnace@redhat.com> <20180824120001.20771-2-omosnace@redhat.com> <20180827075020.GL27091@localhost> In-Reply-To: <20180827075020.GL27091@localhost> From: Ondrej Mosnacek Date: Mon, 27 Aug 2018 11:13:17 +0200 Message-ID: Subject: Re: [PATCH ghak10 v5 1/2] audit: Add functions to log time adjustments To: Miroslav Lichvar Cc: Linux-Audit Mailing List , Paul Moore , Richard Guy Briggs , Steve Grubb , John Stultz , Thomas Gleixner , Stephen Boyd , Linux kernel mailing list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 27, 2018 at 9:50 AM Miroslav Lichvar wrote: > On Fri, Aug 24, 2018 at 02:00:00PM +0200, Ondrej Mosnacek wrote: > > This patch adds two auxiliary record types that will be used to annotate > > the adjtimex SYSCALL records with the NTP/timekeeping values that have > > been changed. > > It seems the "adjust" function intentionally logs also calls/modes > that don't actually change anything. Can you please explain it a bit > in the message? > > NTP/PTP daemons typically don't read the adjtimex values in a normal > operation and overwrite them on each update, even if they don't > change. If the audit function checked that oldval != newval, the > number of messages would be reduced and it might be easier to follow. We actually want to log any attempt to change a value, as even an intention to set/change something could be a hint that the process is trying to do something bad (see discussion at [1]). There are valid arguments both for and against this choice, but we have to pick one in the end... Anyway, I should explain the reasoning in the commit message better, right now it just states the fact without explanation (in the second patch), thank you for pointing my attention to it. [1] https://www.redhat.com/archives/linux-audit/2018-July/msg00061.html -- Ondrej Mosnacek Associate Software Engineer, Security Technologies Red Hat, Inc.