Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3552871imu; Mon, 28 Jan 2019 06:54:35 -0800 (PST) X-Google-Smtp-Source: ALg8bN7KNNnYlNmr8CyZBlebuDN+M99V8nWN7KrfYT5/8igCCOZDeF+n1/84pEvv9kw5U4JgjHAF X-Received: by 2002:a63:f844:: with SMTP id v4mr19952923pgj.82.1548687275927; Mon, 28 Jan 2019 06:54:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548687275; cv=none; d=google.com; s=arc-20160816; b=dybZCMBhH08dlNdUo9AK4cYmTHgmOA7JxdrHyR+FTTXg4HiRwxJGpR+dGRj1s/btHU 91Hu70ker8jMxygVap9IcPyWkUble0LQx1Z9/ilA+0ls8+nH+oG9RECz3e/ZJjERAdIB DcYMiSrDIJ7Fw+mGiMjlABhY6D3Z+1vuYN6Njjh969YQz0cCm2IWcyxt/YO/o8Y5Fw6L IEIJJV0p6vhmxFg0VgRIogYbsdhGpKqbB0QccL6ZfQeO07o6OcCT13/0e1S8xlNBp+xn uc2pS80fthvqIPgMZXJtuTvNNbW+vRbQzbcIVCCpG6v4B/vYSLHkrQ0xUlXPqZARVrUB OeFg== 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:dkim-signature; bh=fBENkcMXEzBlZN5GByv2ewYQ+oLDu6vHTniUepHWzk8=; b=Y+/36L23psTRmLZ5ZF+gvrS0kv8ij12gbImyVDNAjgww3fUZbYqGBY3SpdkO2Wad07 PE81tvUC7J6CYhNHoxHrKHZmgWAhm97F7bWz1lODxopr1jwWT/kDcCb2PvUfyrJWuDmE aW8jB3LOZPI1SGeasRYYjqyu74wrlEIP74NhHS+/ccP0iZOUx7af8mQRGEiFttVDtszM s9sx3MP0xpizroad+eWf3JUdz9z4GXe3uZWROVwvtW7FE0DQ0Q8vW0ect91EAjc3x+my Efwha2MzaBc1D4wBxOVE1Nb//jhjR2t4HFcfDbJ7SaMqWdKPxq7c8qPms5JD+9huzIq1 VhhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=b6Lg9os6; 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 b36si32368880pgl.596.2019.01.28.06.54.20; Mon, 28 Jan 2019 06:54:35 -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=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=b6Lg9os6; 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 S1727064AbfA1Owu (ORCPT + 99 others); Mon, 28 Jan 2019 09:52:50 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:38664 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727051AbfA1Ows (ORCPT ); Mon, 28 Jan 2019 09:52:48 -0500 Received: by mail-lj1-f194.google.com with SMTP id c19-v6so14465319lja.5 for ; Mon, 28 Jan 2019 06:52:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fBENkcMXEzBlZN5GByv2ewYQ+oLDu6vHTniUepHWzk8=; b=b6Lg9os6GuGm/VRPbxhKKDH+wzDPMaSNFZuSHtPW2Vzgxq79fEwey0C0SKifvhPIGQ 0UR8ld39YPLpyecNERr7W+pWBo3z9ujU2GQiJAa4fiCLR5j1YssEe4Gmk8mO8gTRedR4 UFV8/17JuLiI11YSUHOA2udUw9HCbb/8FHnjlQtnDaEj8Mrs/zhyYos0gdmCVScwU15J zfitEtPAgqNEIO2Ql4IizaUFMro6DK5g4nq4NRRl7QptCOe4WSViiDWod2VQ6JBDnwu7 eIGnuid75r0Cnz57TzJczcI51jtKL2p9o7DJEKjgyAzgd0oQAgAvgcPiRqzAW9TMrmsu HaLg== 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=fBENkcMXEzBlZN5GByv2ewYQ+oLDu6vHTniUepHWzk8=; b=h0BZK39AuImApm3c/r0IMyBZi7Eh7j1UpnNpSwc+2ou9OSKG+TA4AdSxqWMRg+I4et /NLHQ67nhyyT0YoANCFCgdFRwe3duHPzJmHqsFmy25FOWKQf0Bv4JxNTAxt9XhYfj//5 +Upj+0xTN/ovh+U1Yg6nZKUSCAeRVPehuEXZnpX/IyeNdyRIFLthvHGzch+s07E26svX bDW3BLmlyH223gQ6esFirf2eoDpCXRgB7iofdFBIPyOx0rvG+7vVr6A21Ad4UONDbpXl YaBApyaZKnTeqko96snt+sgEiRt5eqe2LExllGAfaDirG6ZtZFLU0c+oZE5V2MGeT+mz v2+w== X-Gm-Message-State: AJcUukcO4+AIW9IW/qqgYFwf8+v26WLCd+QmSD7yZuhJ6cC42yDTm4Rx qOEFnmmqbEwHAo4bBcjRRENUKlHLvx4RG8iautnX X-Received: by 2002:a2e:9d17:: with SMTP id t23-v6mr10070985lji.57.1548687165969; Mon, 28 Jan 2019 06:52:45 -0800 (PST) MIME-Version: 1.0 References: <20151208164237.15736.42955.stgit@localhost> <5490ae28-251b-bfda-38a6-5be201a4a8d8@nokia.com> <4fb6def1-a1d9-8af0-394c-f92224884d18@nokia.com> In-Reply-To: <4fb6def1-a1d9-8af0-394c-f92224884d18@nokia.com> From: Paul Moore Date: Mon, 28 Jan 2019 09:52:34 -0500 Message-ID: Subject: Re: [PATCH] audit: always enable syscall auditing when supported and audit is enabled To: "Sverdlin, Alexander (Nokia - DE/Ulm)" Cc: Paul Moore , "linux-audit@redhat.com" , Richard Guy Briggs , Greg Kroah-Hartman , Alexei Starovoitov , Daniel Borkmann , "linux-kernel@vger.kernel.org" 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, Jan 28, 2019 at 9:36 AM Sverdlin, Alexander (Nokia - DE/Ulm) wrote: > Hello Paul, > > On 28/01/2019 15:19, Paul Moore wrote: > >>> time also enables syscall auditing; this patch simplifies the Kconfig > >>> menus by removing the option to disable syscall auditing when audit > >>> is selected and the target arch supports it. > >>> > >>> Signed-off-by: Paul Moore > >> this patch is responsible for massive performance degradation for those > >> who used only CONFIG_SECURITY_APPARMOR. > >> > >> And the numbers are, take the following test for instance: > >> > >> dd if=/dev/zero of=/dev/null count=2M > >> > >> ARM64: 500MB/s -> 350MB/s > >> ARM: 400MB/s -> 300MB/s > > Hi there. > > > > Out of curiosity, what kernel/distribution are you running, or is this > > a custom kernel compile? Can you also share the output of 'auditctl > > This test was carried out with Linux 4.9. Custom built. I suspected that was the case, thanks. > > -l' from your system? The general approach taken by everyone to > > turn-off the per-syscall audit overhead is to add the "-a never,task" > > rule to their audit configuration: > > > > # auditctl -a never,task > > > > If you are using Fedora/CentOS/RHEL, or a similarly configured system, > > This is an embedded distribution. We are not using auditctl or any other > audit-related user-space packages. > > > you can find this configuration in the /etc/audit/audit.rules file (be > > warned, that file is automatically generated based on > > /etc/audit/rules.d). > > I suppose in this case rule list must be empty. Is there a way to check > this without extra user-space packages? Yes, unless you are loading rules through some other method I would expect that your audit rule list is empty. I'm not aware of any other tools besides auditctl to load audit rules into the kernel, although I haven't ever had a need for another tool so I haven't looked very hard. If you didn't want to bring auditctl into your distribution, I expect it would be a rather trivial task to create a small tool to load a single "-a never,task" into the kernel. -- paul moore www.paul-moore.com