Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2150290imd; Sun, 28 Oct 2018 04:10:19 -0700 (PDT) X-Google-Smtp-Source: AJdET5eyiWiVYujp0ANR+u+2dfhJSk3o9hu7Q6zv4kPF7hRn+lymsE9nY4Rrigm1kR8dGs4fLNhu X-Received: by 2002:a62:3245:: with SMTP id y66-v6mr10800952pfy.72.1540725019007; Sun, 28 Oct 2018 04:10:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540725018; cv=none; d=google.com; s=arc-20160816; b=c6zOGxlG2JfomcGtS35ub22K/NpMHaGk7yotSRT/ZWZ7ChKpPKnUVoFvVxomgSZvst JJj+H1usGjyIIcLrxTUdWYQbG5t4JIm080s4vlykU75SGx2qAJRDUnjG2kMgQui41JQ6 D4lNuwyTCdNQuF9BmEmWIJfGe+iJtEtnsZbORLXf9oTPsKeYAIDjNB69IieCMmnU+8WX zLGK5p7M27nkO5OsBl09vBoT4cESRJYmvX/Nu9AdlCtwXFEH0doP1PMz/l2s09PgpEOA mUgJVc4MJjIsKOJmEG22DDJvS0EmJ8BWDPiav3304y17ylq4yfq6PCXvrnzAy57ib8b9 sHKA== 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=zoBdfcRiaVEHFB5Jm23iN91BJyij07w+KRhsgAhhdUQ=; b=VDtzSq5G0qMY1wjB3cUAT5Pi3woAPNsivMEFC4NiqRKyDkAqPeC8v90MWQRwmBNZHp 6/LNzn5vQ2OTK5v96rZSkgiJkJsDbtcaCNvxiw25s60WriGwsRJEgqTv0NigPVCPaYOe EhQ42uCcVNaoZdCLUHV2XnLCNHoCFnhwMvijDD9zIKq5aMPKn6R9QTgNjvlN99MYnUlH FerMPC/1zZQmIc4rY3Dq0/aNcTPt4QhAtXmHncQOTwDMGmMaFAkGUYInTcnDMAD/qGib ap4zD9pQhlfqozZ/azauJnB8H9IEn6yvyxMhsloCyf8bhjJirJ3YSdEmkzaxFQfcAODs xadw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ei4OmGbW; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q4-v6si13701469pli.119.2018.10.28.04.10.03; Sun, 28 Oct 2018 04:10:18 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ei4OmGbW; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727519AbeJ1Tw1 (ORCPT + 99 others); Sun, 28 Oct 2018 15:52:27 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:37585 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726427AbeJ1Tw1 (ORCPT ); Sun, 28 Oct 2018 15:52:27 -0400 Received: by mail-ot1-f68.google.com with SMTP id o14so4983617oth.4 for ; Sun, 28 Oct 2018 04:08:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zoBdfcRiaVEHFB5Jm23iN91BJyij07w+KRhsgAhhdUQ=; b=Ei4OmGbW31h7xATkmdrworvdjvV/DwRSl0oIqEHDP1zFqaAZEPxewkv2rdhgoeq+Wv Kq+JOMNj+MhzQk/emORX3aMVsyYNm2EL5Iq35bXAxgqFfyXVqq8+jyHmQ0i/IdWjHZQY cQnaNmJ24l99uuIRKjiesvQ8/RXxPJrWfaIsarM/1xaPkhNdhhp+kuVdAEEKdRovxcfs XrWdwx/sWFvTdA/XdPa1paE4jbxjmkjdPwwWWApsxDZQ6bJeJ7YsCu8kh+JXm/m1Erlq 2xiXOXn95NJcSsLwJb/GOtkD//lpQqu1w6CUsAyY65orM2M0vBc0emQH9knUuZKW6H0b ZZOA== 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=zoBdfcRiaVEHFB5Jm23iN91BJyij07w+KRhsgAhhdUQ=; b=dkZlDtwSVpYx/Jcne50ox9aotMjH8mu9nZY9cIv6LJoiS5hMzPAQaSZ1d7cLc5EoEl RMIFDKI/xnBZcdMRzBAUh0JGUFZSyZOw69TrBJFd8VFiM8hKgm+gAAXMB8M9cmqunDaY IykYn9eNCQ6iBNffTyysD6hUCMXBXKpupMpmIqMIa1mXNKUA3pamX/xA9Zm4mlNtLvJs c2WPLHeN5XucoICnbdvVRNgpnwxJSDuBlwy8kURxHt/2JNPXeh9sL85UWBUlTTljaBMT EzwAoAK/3dd0uGDGUdJthC6walaj3ar2F/V73JRAmD9iNrmP+VLnfm0MtdgnyJmxQmvn eeFQ== X-Gm-Message-State: AGRZ1gKhR5qahA7+y305XTPpHje+kAcNnSDLQbFE6zKqxkTjQ/YF4+8j Eu3OAHE4jafmhXMScEX8TIs8T2t3ibhX+3dA/nA= X-Received: by 2002:a9d:5910:: with SMTP id t16mr5732504oth.99.1540724886617; Sun, 28 Oct 2018 04:08:06 -0700 (PDT) MIME-Version: 1.0 References: <20181024204036.8799-1-palmer@sifive.com> <20181024204036.8799-3-palmer@sifive.com> In-Reply-To: From: David Abdurachmanov Date: Sun, 28 Oct 2018 12:07:55 +0100 Message-ID: Subject: Re: [PATCH 2/2] RISC-V: Add support for SECCOMP To: Paul Moore Cc: Palmer Dabbelt , linux-riscv@lists.infradead.org, aou@eecs.berkeley.edu, eparis@redhat.com, Kees Cook , luto@amacapital.net, Will Drewry , wesley@sifive.com, dhowells@redhat.com, tglx@linutronix.de, Philippe Ombredanne , gregkh@linuxfoundation.org, Kate Stewart , linux-kernel@vger.kernel.org, linux-audit@redhat.com 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 Thu, Oct 25, 2018 at 10:36 PM Paul Moore wrote: > > On Thu, Oct 25, 2018 at 2:31 PM David Abdurachmanov > wrote: > > On Wed, Oct 24, 2018 at 10:40 PM Palmer Dabbelt wrote: > > > From: "Wesley W. Terpstra" > > ... > > > Palmer, > > > > Half of the patch seems to touch audit parts. I started working on audit > > support this morning, and I can boot Fedora with audit traces. > > > > [root@fedora-riscv ~]# dmesg | grep audit > > [ 0.312000] audit: initializing netlink subsys (disabled) > > [ 0.316000] audit: type=2000 audit(0.316:1): state=initialized > > audit_enabled=0 res=1 > > [ 7.288000] audit: type=1130 audit(1529665913.772:2): pid=1 uid=0 > > auid=4294967295 ses=4294967295 msg='unit=systemd-remount-fs > > comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? > > terminal=? res=success' > > [ 7.684000] audit: type=1130 audit(1529665914.176:3): pid=1 uid=0 > > auid=4294967295 ses=4294967295 msg='unit=systemd-sysctl comm="systemd" > > exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? > > res=success' > > [..] > > > > I am still working on audit user-space support for better testing. > > > > I suggest we first implement audit and then seccomp. > > FYI, while small and far from comprehensive, we do have a test suite > we use for basic validation of the audit kernel bits which may be > helpful while you're working on the audit enablement: > > * https://github.com/linux-audit/audit-testsuite Currently I checked the following to work: - /proc/self/loginuid (required by DNF [package manager]) - auditctl (checked several different example rules from internet) - aulast - aulastlog - ausearch - ausyscall - aureport - autrace (compared some syscalls to strace: order and return value/input arguments seems to be correct) I checked audit-testsuite yesterday and it seems to be only for x86-64 / x86-32. After adjusting it (MODE, syscalls) I am at: Failed 4/14 test programs. 19/88 subtests failed. I don't plan to look further in the failure, e.g.: - syscall_socketcall: that's an old stuff and not relevant to new arches - syscall_module: Fedora kernel currently is not compiled with kernel loadable module support - filter_exclude: two tests fail because id -Z doesn't print any categories, but "semanage login -l" output is identical between x86_64 and riscv64 - netfilter_pkt: don't have CONFIG_IP_NF_MANGLE enabled Fedora kernel currently has minimal CONFIG_* options and is built without loadable module support. I will send the patches for review soon. david