From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12509 Path: news.gmane.org!.POSTED!not-for-mail From: Nicholas Wilson Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] Possible patch for __syscall_cp Date: Wed, 14 Feb 2018 12:09:18 +0000 Message-ID: References: ,<20180213144955.GB4418@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1518610079 32388 195.159.176.226 (14 Feb 2018 12:07:59 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 14 Feb 2018 12:07:59 +0000 (UTC) To: "musl@lists.openwall.com" Original-X-From: musl-return-12526-gllmg-musl=m.gmane.org@lists.openwall.com Wed Feb 14 13:07:55 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1elvqY-0006kv-5y for gllmg-musl@m.gmane.org; Wed, 14 Feb 2018 13:07:34 +0100 Original-Received: (qmail 18369 invoked by uid 550); 14 Feb 2018 12:09:36 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 18344 invoked from network); 14 Feb 2018 12:09:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=realvnc.onmicrosoft.com; s=selector1-realvnc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=mOqy7UkJ1DcgwraSz2DOo+4XHtb746+IfzBF3V7Qykk=; b=CvqixVaQZngExLeb3FrI2s6sHN5bJADd+pY9KiJ6jASyMSG+moC60RtIfgHpnko3uKydBplDSKW+bCfEavHvtH4paUALgS+dEEjPbcaB8/t9xzLhty0nrrsw6MuU4yLsv16n1jQm+ma/E17jYUSzJT1Bc4/S6RaOT7yjCr6NkoY= Thread-Topic: [musl] [PATCH] Possible patch for __syscall_cp Thread-Index: AQHTpNXbVh8lNvkSFEaYm+ClO4dw96OiaiaAgAFkCGQ= In-Reply-To: <20180213144955.GB4418@port70.net> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=nicholas.wilson@realvnc.com; x-originating-ip: [2a02:390:a001:192:d6be:d9ff:fe9c:1892] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DB6PR0502MB2904;7:CzAF6pE6gIgiJps8syk8x/cUossi+7uU4hWhg7FTY9MmVldRZ8XeZvPvzCImQZU7xvN4zojB82N6WzBYb7v0S7KMgerGOTqRn6qooPb4CfXUjaUr7OrDyO2Ql+2GmSsurYTT0NB29NzTSlQt+GHEUN9/TPsFAhQUWNnvWiZgdUZfuT65uQNoctrfHh9CLzf4Fi5tCF5eP5nkvOZcIbUXiMrAaeLH+f3d1N/0Nvv/PnQKQRKAiMGxF+3R4j63r73x x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: c7384397-a2e0-4432-ece9-08d573a3c63c x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(7021125)(5600026)(4604075)(3008032)(4534165)(7022125)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603307)(7153060)(7193020);SRVR:DB6PR0502MB2904; x-ms-traffictypediagnostic: DB6PR0502MB2904: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231101)(944501161)(3002001)(6041288)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(2016111802025)(6072148)(6043046)(201708071742011);SRVR:DB6PR0502MB2904;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0502MB2904; x-forefront-prvs: 0583A86C08 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(366004)(39840400004)(346002)(376002)(39380400002)(51914003)(199004)(189003)(2501003)(186003)(14454004)(5660300001)(9686003)(99286004)(6116002)(3280700002)(97736004)(2900100001)(2906002)(6506007)(86362001)(316002)(53546011)(7736002)(74316002)(6246003)(5250100002)(305945005)(25786009)(6916009)(6436002)(8676002)(8936002)(68736007)(478600001)(106356001)(2950100002)(33656002)(1730700003)(81166006)(81156014)(2351001)(76176011)(229853002)(105586002)(102836004)(5640700003)(55016002)(3660700001)(7696005)(53936002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0502MB2904;H:DB6PR0502MB3016.eurprd05.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: realvnc.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: vIGMQ/XLxudMAMTBIRtHKZwdoHSPrT+LIcbfV3Sav3NKqwh06zkzNGGSp6jbcYabgpxDkhViWVt0I7Agj1a47w== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM X-MS-Exchange-CrossTenant-Network-Message-Id: c7384397-a2e0-4432-ece9-08d573a3c63c X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Feb 2018 12:09:18.5069 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 9ad766d3-c6a5-4458-8c58-244e7c118728 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0502MB2904 X-OriginatorOrg: realvnc.com Xref: news.gmane.org gmane.linux.lib.musl.general:12509 Archived-At: On 13 February 2018 14:49, Szabolcs Nagy wrote: > i think your patch is ok (__syscall6 should behave the same > way as __syscall other than the inlining), but you can fix > it for your target only by adding > > static inline long __syscall(long n, long a, long b, long c, long d, long= e, long f) > { > return __syscall6(n,a,b,c,d,e,f); > } > > to syscall_arch.h Yes, that's the approach I was thinking of when I mentioned we could just i= mplement __syscall. In fact, _syscall is declared as varargs, so it would h= ave to be: static inline long __syscall(long n, ...) { va_list va; va_start(va, n); long a =3D va_arg(va, long); ... etc long f =3D va_arg(va, long); return __syscall6(n, a, b, ..., f); } The question really is - would you prefer archs to define __syscall that wa= y, or would you rather patch __syscall_cp to allow macro expansion? In your= opinion, which is cleaner? If you don't want to see a shim like that in th= e archs, would you consider applying the __syscall_cp patch for us? Thanks for the feedback, Nick=