From owner-freebsd-current@freebsd.org Sat Jun 8 02:57:30 2019 Return-Path: Delivered-To: freebsd-current@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 2932215BF8C6 for ; Sat, 8 Jun 2019 02:57:30 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660070.outbound.protection.outlook.com [40.107.66.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F0D8C6EC2C for ; Sat, 8 Jun 2019 02:57:28 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YQXPR01MB3128.CANPRD01.PROD.OUTLOOK.COM (52.132.93.160) by YQXPR01MB2488.CANPRD01.PROD.OUTLOOK.COM (52.132.92.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1965.14; Sat, 8 Jun 2019 02:57:27 +0000 Received: from YQXPR01MB3128.CANPRD01.PROD.OUTLOOK.COM ([fe80::f9fe:559f:fdc:9e5a]) by YQXPR01MB3128.CANPRD01.PROD.OUTLOOK.COM ([fe80::f9fe:559f:fdc:9e5a%3]) with mapi id 15.20.1965.011; Sat, 8 Jun 2019 02:57:27 +0000 From: Rick Macklem To: "freebsd-current@FreeBSD.org" Subject: adding a syscall to libc? Thread-Topic: adding a syscall to libc? Thread-Index: AQHVHaUq4CSrPmO6/E+nutIFTmCjBA== Date: Sat, 8 Jun 2019 02:57:27 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7e36fbce-66ba-4012-a8dd-08d6ebbd0a59 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:YQXPR01MB2488; x-ms-traffictypediagnostic: YQXPR01MB2488: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0062BDD52C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(376002)(396003)(366004)(136003)(39860400002)(199004)(189003)(51874003)(40764003)(8936002)(6436002)(64756008)(6916009)(66446008)(66556008)(2501003)(305945005)(66476007)(73956011)(52536014)(9686003)(2906002)(66946007)(478600001)(76116006)(55016002)(86362001)(99286004)(25786009)(2351001)(186003)(74316002)(68736007)(46003)(33656002)(74482002)(102836004)(476003)(486006)(7696005)(53936002)(316002)(81166006)(81156014)(256004)(5640700003)(14454004)(14444005)(786003)(6506007)(5660300002)(4744005)(71200400001)(71190400001)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:YQXPR01MB2488; H:YQXPR01MB3128.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: VUBuytgWs/zmB0c4GezCjwcNhT1RV6Xea5kR1qyftvq4SNP5yZAUxYH+4BfvV/N/BaSAR3JBg4GhXv6FjCeORYRWMIv2saKK61oXlnbLWxX6HFnLBUGzzXyd34SVWrgAh90sG0jdk7TGMNNWVU1DPyTcCd/7bQxrST7DWIoQ6q5jTCmFMpdiCcdwY+lRnQnKNPDxBBOtvsdssVzpJwye4YwKH08ki3VTvulhzBX8cYTLQMD7V6PDk6ofdCopneqLtJ60Zo+emwe7Gqix5N25cfpLY5cTTEBxkChHNoM6v26IL6xeZJNP9il2XxfY5/UroOHGLeAACTr/Me4brrPpWEr1gZpcv4iQF+nbyt34H8Zg2GE4/SmWgT6dkEYJ+xqciCOvmvblZjAFuF7sHWDrwNimNLkSpYzAsX/XBEulh58= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: 7e36fbce-66ba-4012-a8dd-08d6ebbd0a59 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jun 2019 02:57:27.3189 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: rmacklem@uoguelph.ca X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQXPR01MB2488 X-Rspamd-Queue-Id: F0D8C6EC2C X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of rmacklem@uoguelph.ca designates 40.107.66.70 as permitted sender) smtp.mailfrom=rmacklem@uoguelph.ca X-Spamd-Result: default: False [-3.23 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:40.107.0.0/16]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; SUBJECT_ENDS_QUESTION(1.00)[]; DMARC_NA(0.00)[uoguelph.ca]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.02)[ipnet: 40.64.0.0/10(-2.85), asn: 8075(-2.17), country: US(-0.06)]; MX_GOOD(-0.01)[mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com]; NEURAL_HAM_SHORT(-0.91)[-0.909,0]; RCVD_IN_DNSWL_NONE(0.00)[70.66.107.40.list.dnswl.org : 127.0.3.0]; TO_DN_EQ_ADDR_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8075, ipnet:40.64.0.0/10, country:US]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jun 2019 02:57:30 -0000 Hi, I've started working of a copy_file_range() syscall for FreeBSD. I think I = have the kernel patched and ready for some testing. However, I'm confused about what I need to do in src/lib/libc/sys? - Some syscalls have little .c files, but other ones do not. When is one of these little .c files needed and, when not needed, what el= se needs to be done? (I notice that syscall.mk in src/sys/sys automagically,= but I can't see what else, if anything, needs to be done?) Thanks in advance for your help, rick ps: I am using the Linux man pages for the syscall ABI. At some point, I'll= put this in phabricator and post here for comments/review.