From owner-freebsd-hackers@freebsd.org Fri Mar 3 20:15:00 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 727A0CF7DFC for ; Fri, 3 Mar 2017 20:15:00 +0000 (UTC) (envelope-from mmokhi.fbsd@gmail.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 52C841617 for ; Fri, 3 Mar 2017 20:15:00 +0000 (UTC) (envelope-from mmokhi.fbsd@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 4F4C4CF7DFB; Fri, 3 Mar 2017 20:15:00 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EF98CF7DFA for ; Fri, 3 Mar 2017 20:15:00 +0000 (UTC) (envelope-from mmokhi.fbsd@gmail.com) Received: from mail-ua0-f169.google.com (mail-ua0-f169.google.com [209.85.217.169]) (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 12BB51616 for ; Fri, 3 Mar 2017 20:14:59 +0000 (UTC) (envelope-from mmokhi.fbsd@gmail.com) Received: by mail-ua0-f169.google.com with SMTP id f54so127212660uaa.1 for ; Fri, 03 Mar 2017 12:14:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=1Td1An3QccO0f9M73mw/O0VhCy5nx4g3v4vcl129Veg=; b=svRoKcw5cFzSx+C0dvNmvgZOIIB//Wb73shoUsRQdZ/n5N+kHXG0TqPLIab6xxN1XX Oj2u20QLbv4ewooQ0OzfAipn3ZmxDW5y6wr0kvSW9ZYpA16jdTCeEWvjRS3/qtfCcnEm NU7JKXHVIjXrU53AQSFyAdyUCw9WF1jeKDhgNWQtcYhPm3IBNOcW9+JP+zeq6NV0GIap 8Bh8QrA2+JLlYXllUanJ9D8pMLCs4PmbYTfzug5b9Rw5rYFhenZPTgUVHqsxIDr26FDH bLMp+huIiSz82bp2i9i9HheCcE/YxHv7k1ysugdv2LQfhUo7K+i29H2tH1rejB4ERNqR /PGg== X-Gm-Message-State: AMke39l46/xOLHOhIZtouWAIScX1OazjCTiRID8zew3m1ZcZiLxD1v5vKTFXet1WjGwdIA== X-Received: by 10.176.82.93 with SMTP id j29mr2082572uaa.57.1488572093169; Fri, 03 Mar 2017 12:14:53 -0800 (PST) Received: from mail-ua0-f170.google.com (mail-ua0-f170.google.com. [209.85.217.170]) by smtp.gmail.com with ESMTPSA id x32sm3134657uab.31.2017.03.03.12.14.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Mar 2017 12:14:53 -0800 (PST) Received: by mail-ua0-f170.google.com with SMTP id q7so92326828uaf.2 for ; Fri, 03 Mar 2017 12:14:52 -0800 (PST) X-Received: by 10.31.148.71 with SMTP id w68mr1460283vkd.87.1488572092675; Fri, 03 Mar 2017 12:14:52 -0800 (PST) MIME-Version: 1.0 Reply-To: mmokhi@freebsd.org Received: by 10.103.75.136 with HTTP; Fri, 3 Mar 2017 12:14:52 -0800 (PST) From: Mahdi Mokhtari Date: Fri, 3 Mar 2017 23:44:52 +0330 X-Gmail-Original-Message-ID: Message-ID: Subject: Some questions about kernel stuffs (namei, and AUDIT_ARG, ...) To: hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Mar 2017 20:15:00 -0000 Hi hackers@ I'm working on implementing and completing Linuxulator syscalls with helps of trasz@ and dchagin@ (and learning more about it on this way ;-D). In middle of this way, I'm implementing execveat() natively for FreeBSD to use it for Linuxulator (yeah dogfooding ;]]) I encountered to some questions and I'm told here is the place to ask :-) I'd like to know the difference between `AUDIT_ARG_ATFD1` and `AUDIT_ARG_ATFD2`, when I should use which (for a syscall for example)? Also, Should I free the name buffer I get from `namei()` after `NDINIT_ATRIGHTS()` myself? (like what I do on `vput(node)`)? P.S. Actually namei() man page is too short to explain the API very well (at least for me, well I'm not native English speaker '':-D), so any hints/extra resources is appreciated __/|\__ -- Best regards, MMokhi.