From owner-freebsd-hackers@freebsd.org Mon Jan 22 21:03:08 2018 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 634F6ED5A1A for ; Mon, 22 Jan 2018 21:03:08 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E8D156EB5C; Mon, 22 Jan 2018 21:03:07 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w0ML2xME015312 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Jan 2018 22:03:00 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: kostikbel@gmail.com Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w0ML2tc5008769 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 23 Jan 2018 04:02:55 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: Calling getaddrinfo(3) in 32-bit binary on 64-bit host To: Konstantin Belousov , Li-Wen Hsu References: <8c6dc5b5-7640-61fc-b687-08efd1e621ee@icloud.com> <20180122154709.GF55707@kib.kiev.ua> <20180122192925.GI55707@kib.kiev.ua> Cc: Yuri Pankov , freebsd-hackers@freebsd.org From: Eugene Grosbein Message-ID: <5A66517B.4040802@grosbein.net> Date: Tue, 23 Jan 2018 04:02:51 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20180122192925.GI55707@kib.kiev.ua> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS * 2.6 LOCAL_FROM From my domains X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2018 21:03:08 -0000 23.01.2018 2:29, Konstantin Belousov пишет: > On Tue, Jan 23, 2018 at 02:55:24AM +0800, Li-Wen Hsu wrote: >> I'll try to find other uses of SA_SIZE() and see if they would be run in >> compat32 mode and works or not. > There are enough uses of SA_SIZE() by functions which are perhaps called > both from a sysctl handler and for queuing the routing messages into routing > socket queue. In the later case, we cannot know ABI of the reader. This > is what I referenced when I noted that routing socket's ABI compat is > impossible to implement correctly. Can't we supply sysctl handler with some kind of back reference to original userland caller of the syscall to find its ABI?