From owner-freebsd-arch@freebsd.org Sat Mar 3 03:33:27 2018 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0FABF3B604 for ; Sat, 3 Mar 2018 03:33:26 +0000 (UTC) (envelope-from whoistalg@gmail.com) Received: from mail-it0-x230.google.com (mail-it0-x230.google.com [IPv6:2607:f8b0:4001:c0b::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 68A596A4BF for ; Sat, 3 Mar 2018 03:33:26 +0000 (UTC) (envelope-from whoistalg@gmail.com) Received: by mail-it0-x230.google.com with SMTP id c11so3837355ith.4 for ; Fri, 02 Mar 2018 19:33:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to:cc; bh=3QOfvlIWtxbzorhLeEfNSBCKe4RfjA+WYmepvPGMYgg=; b=oJ47SspiEB0nPoUNqAU6cjYxRfAnCUhqHNp54on7tuSEVZMmUq84V50IErdXOSMySm /Lq00FDnZ8j+YtMhEU89WSwFymbvxR5N0MGXyhlzATcH8t7uAEZACqSSHG8HdvO1cKO+ dFHjppHKyFcRl62LEaqCwA2B1UXsTGhFAnRsAX1dGon77gj305iNL8ymxU2OVKxKaoc8 jhUqJBXxSHpoA0vr2Di2jBPyuVrWPBvJAfTbcRz9lJ82qlbgRex5vgiTF1csN/VplloJ 7lABiy+zyUBSFiBCjSQ1ybo/wQ9NzHIQWlgJhuNQIeu2hcBfTuO/UBUnu87+e5ESblUN yU0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to:cc; bh=3QOfvlIWtxbzorhLeEfNSBCKe4RfjA+WYmepvPGMYgg=; b=B2behDb+QtdgvL92Pcz+MCtVQX3x000nypZXvbfY3dPGqwRENyE6chIXzjrisQTKzJ uMoRuXcA16qBs048/z/nva9wb6ncyN9bOpzobOcAtUaRGvYkIMjepetdLSOrAAjlASkt mHeyAA1h2kB5Vm4Z5JWMjDCkMI52BVtf+zmhDxAkGTZjQLhZZ7fU9WO3id0vb5JfPS99 ipaMCsvw/ANKLY6XOe9xNFNfMHTeYkv/sSTNei7HO2XhDLuf8cKTfKOHDjPSpsYTza7O UY2FANwW5Ids1zkSXW94DIwpRl8eiT8DcRSOyfEnf2TIfslUZMH8xW0THre1NlQKsTRL JVdw== X-Gm-Message-State: AElRT7FMHXnb2PkwVwPA/ZiPoiDx7DkEq6J7NPrZbxWUEcvKSJTkJxqP 67XMfAN8k601Gr73fNMrUCKDyOg+oj5wDWrEQc6MuQ== X-Google-Smtp-Source: AG47ELu1eqkFyaT7kmJSBsWIxFwKGCIYGMCjnarSIS+LcYnY2/FIW5zuwdgb5eGeBQU+ejWpdMCC7VSpIzsOSlzDRmQ= X-Received: by 10.36.135.195 with SMTP id f186mr5518333ite.100.1520048005186; Fri, 02 Mar 2018 19:33:25 -0800 (PST) MIME-Version: 1.0 Sender: whoistalg@gmail.com Received: by 10.107.149.76 with HTTP; Fri, 2 Mar 2018 19:32:44 -0800 (PST) From: Tal Garfinkel Date: Fri, 2 Mar 2018 19:32:44 -0800 X-Google-Sender-Auth: utW9l_FQWy4Zm6yX-w3pSU-sKa4 Message-ID: Subject: Feedback on adding SAL annotations to syscalls.master To: freebsd-arch@freebsd.org Cc: Brooks Davis Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Mar 2018 03:33:27 -0000 Hi all, I recently put a patch up on Phabricator with SAL annotations for syscalls.master and small modification to makesyscalls.sh to strip out the annotations. https://reviews.freebsd.org/D14285 The annotations were originally written by Brooks Davis, for the cheribsd project, I just made a few changes to bring them up to speed with freebsd current with help from Brooks. The immediate motivation for this is to support automatically generating code for a record/replay system that will stay consistent with the system call interface. Other potential uses include: dynamic bound checking system call inputs (the original motivation in cheribsd), static analysis (the original use for SAL), automatic test generation (which Brooks has a student looking at), and a variety of other potential uses where one would like to automatically generate code to deal with the system call interface without having to deal with the tedium and error prone nature of doing the by hand, and have to worry about this drifting from version to version. What is the impact: Since these annotations are stripped out before code is generated from syscalls.master their impact on the system is minimal. Tal