From nobody Sat Jul 01 10:11:40 2023 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QtSfD2VdRz4lBxQ for ; Sat, 1 Jul 2023 10:12:04 +0000 (UTC) (envelope-from pat@patmaddox.com) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QtSfC5sqNz3G4r for ; Sat, 1 Jul 2023 10:12:03 +0000 (UTC) (envelope-from pat@patmaddox.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=patmaddox.com header.s=fm1 header.b="Y kYLvXa"; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=HHKMTRNf; spf=pass (mx1.freebsd.org: domain of pat@patmaddox.com designates 66.111.4.28 as permitted sender) smtp.mailfrom=pat@patmaddox.com; dmarc=none Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 6C2815C01EC; Sat, 1 Jul 2023 06:12:02 -0400 (EDT) Received: from imap41 ([10.202.2.91]) by compute2.internal (MEProxy); Sat, 01 Jul 2023 06:12:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=patmaddox.com; h=cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:message-id:mime-version:reply-to :sender:subject:subject:to:to; s=fm1; t=1688206322; x= 1688292722; bh=Su66X2vgnPg8lqr3G6HOJ7/Qk7YzWnSletbuwMZhyK0=; b=Y kYLvXaSmj/zBYHMNmZsxF39m6+hO3IwGdySEca/gDJHv7ZMXEssQIB1+JQ11bgN8 SVKzXtvui9NEqzwqRkHstVu3gTWYkf8hVvBy70Z2QJC0MEmdmjhAlx7WNC9vp7fu Gi6gL34JB4kMyKH8ukX+mugiXHtFVwBo13HuALOaLouMwBQiPyeZigZU30gTFFLW tyBu4zuNhHIy+i3Cl0oBBboB3QZ6JuWCK64RMjpwoDRzuTmFhUtF6GvFdeKNvaea sZn0KpfYLEArchDE6sYta6Z/O9yf23FWKk/vubYHQnlQPjE3ysZ+gmtOBIVJHZVa n+5Zj6Q8GOLyQsqV/+6Cg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1688206322; x=1688292722; bh=Su66X2vgnPg8l qr3G6HOJ7/Qk7YzWnSletbuwMZhyK0=; b=HHKMTRNf09MkolzZZBE5X6vdHMIb5 SN9qbXZiaD2EtlX3NoYAQq1awaIs2o36XHJPNE1ML+O6t9OLdy5LIqdBbWpMtFiX ZqUCTuL1uHJ3SvnnNLSzMGbR1qJ1dT1P33ZfzyyE/Zvdn2QeLTxUiqxwrIulxptu SCaO6O3awVhyXUO/Gy1VxFB5poinFhDz62eKi6Rkr/aRHGyKXRcsj3gwT2Vj40FR IRoEj+Ilh/Q0+aV6w1tqD36p4PAKl09MGPHRByVoKArzHetU4FTUumLQcaAyYCB9 7KF84yJEgNAQNoXkdWU1RrZdrVsZEecwLSKirqZKXwUVR4Z7KIYN2Atuw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrtdekgddvfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkfffhvffutgfgsehtqhertd erreejnecuhfhrohhmpedfrfgrthcuofgrugguohigfdcuoehprghtsehprghtmhgruggu ohigrdgtohhmqeenucggtffrrghtthgvrhhnpeevgfefgfdvtdeukeduhfffvddttefgue ekfeelleegjeekieegvefggeejieeghfenucffohhmrghinhepghhithhhuhgsrdgtohhm necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgrth esphgrthhmrgguughogidrtghomh X-ME-Proxy: Feedback-ID: i8b6c40f9:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 22FF5234007B; Sat, 1 Jul 2023 06:12:02 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-499-gf27bbf33e2-fm-20230619.001-gf27bbf33 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org Mime-Version: 1.0 Message-Id: <5f311275-e307-4e78-a479-c6d4e7f116d5@app.fastmail.com> Date: Sat, 01 Jul 2023 03:11:40 -0700 From: "Pat Maddox" To: freebsd-hackers@freebsd.org Subject: How are syscall functions defined? Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-2.94 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; DWL_DNSWL_LOW(-1.00)[messagingengine.com:dkim]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.75)[-0.752]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[patmaddox.com:s=fm1,messagingengine.com:s=fm2]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.28]; RCVD_IN_DNSWL_LOW(-0.10)[66.111.4.28:from]; MIME_GOOD(-0.10)[text/plain]; RWL_MAILSPIKE_GOOD(-0.10)[66.111.4.28:from]; XM_UA_NO_VERSION(0.01)[]; FREEFALL_USER(0.00)[pat]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[patmaddox.com]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:19151, ipnet:66.111.4.0/24, country:US]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_NONE(0.00)[]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[patmaddox.com:+,messagingengine.com:+]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org] X-Rspamd-Queue-Id: 4QtSfC5sqNz3G4r X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N jail_attach is defined in syscalls.master [1] which generates a declarat= ion in jail.h [2]. Try as I might, I can=E2=80=99t find any definition o= f that specific syscall function (or any other). I think the closest I=E2= =80=99ve found is sys_jail_attach in kern_jail.c [3]. I suspect there=E2= =80=99s some generation going on that defines jail_attach - but if that=E2= =80=99s the case, I haven=E2=80=99t been able to track it down. Can someone point me to how the C function gets defined? Thanks, Pat [1] https://github.com/freebsd/freebsd-src/blob/releng/13.2/sys/kern/sys= calls.master#L2307 [2] https://github.com/freebsd/freebsd-src/blob/releng/13.2/sys/sys/jail= .h#L119 [3] https://github.com/freebsd/freebsd-src/blob/releng/13.2/sys/kern/ker= n_jail.c#L2340