From owner-svn-src-all@freebsd.org Fri Aug 9 21:49:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E7114AB204; Fri, 9 Aug 2019 21:49:10 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 464zQt1gWYz45R4; Fri, 9 Aug 2019 21:49:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x79Ln15X031905 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 10 Aug 2019 00:49:05 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x79Ln15X031905 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x79Ln1gi031904; Sat, 10 Aug 2019 00:49:01 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 10 Aug 2019 00:49:01 +0300 From: Konstantin Belousov To: rgrimes@freebsd.org Cc: Warner Losh , Gleb Smirnoff , Warner Losh , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r350764 - head/sys/arm64/arm64 Message-ID: <20190809214901.GK2731@kib.kiev.ua> References: <20190809210505.GJ2731@kib.kiev.ua> <201908092129.x79LTncP099313@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201908092129.x79LTncP099313@gndrsh.dnsmgr.net> User-Agent: Mutt/1.12.1 (2019-06-15) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-Rspamd-Queue-Id: 464zQt1gWYz45R4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-2.99 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_HAM_LONG(-1.00)[-0.997,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.994,0]; RCPT_COUNT_SEVEN(0.00)[7]; IP_SCORE(0.00)[ip: (-2.57), ipnet: 2001:470::/32(-4.47), asn: 6939(-2.97), country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Aug 2019 21:49:11 -0000 On Fri, Aug 09, 2019 at 02:29:49PM -0700, Rodney W. Grimes wrote: > > On Fri, Aug 09, 2019 at 10:01:31AM -0600, Warner Losh wrote: > > > On Fri, Aug 9, 2019 at 12:57 AM Konstantin Belousov > > > wrote: > > > > > > > On Thu, Aug 08, 2019 at 07:38:28PM -0600, Warner Losh wrote: > > > > > On Thu, Aug 8, 2019, 4:59 PM Gleb Smirnoff wrote: > > > > > > > > > > > Hi, > > > > > > > > > > > > why do we need COMPAT_43 for arm64 at all? I can't imagine an > > > > > > application that would require this compatibility. > > > > > > > > > > > > A more general question is how far in the future are we going > > > > > > to carry COMPAT_43 for i386/amd64? > > > > > > > > > > > > > > > > COMPAT_43 is a weird option. It's a combo of both sys calls and kernel > > > > > behavior modifications. Before we thinned the ABIs we supported, it was > > > > > necessary for them as well. The biggest behavior change is around > > > > signals. > > > > > It is weird to sort out and nobody has done the deep analysis to see what > > > > > is truly unused and what is there for compat with Linux and other SysV > > > > > systems... > > > > I am not aware of any changes that COMPAT_43 provides for the signal > > > > handling semantic, except a minor adjustment for interpretation of > > > > zero-sized stack for sigaltstack(2). > > > > > > > > > > The onstack stuff was what I was thinking about, but we also have code in > > > sys_getpid() that returns the ppid in the second retval register, and > > > similar things for getuid and getgid, It also allows ioctl numbers that > > > have IOC_IN set, but size == 0 (these would otherwise return ENOTTY). It > > > also turns on the COMPAT_OLDSOCK code which generally only kicks in when > > > compat bits are set, but in one place it allows a shorter unix domain > > > socket path length to be compatible unconditionally. The compatibility TTY > > > stuff, at least is under COMPAT_43TTY, but that's purely ioctl translation > > > code. > > I only reacted to the note about changing the signals syscalls behavior. > > But the point is valid, we should not change the syscalls ABI for new > > binaries when COMPAT_43 is enabled. I propose the following > > https://reviews.freebsd.org/D21200 > > > > WRT ioctl code for no IOC_OUT and size == 0, I believe that this is in > > fact cannot be changed. It is enabled also under COMPAT_FREEBSD4 and > > 5, and we always enable these for GENERIC. So effectively this ioctl > > permissive mode is always there. > > > > > > > > The COMPAT_43 option indeed enables lcall 7,0 syscall entry emulation, > > > > on both i386 and amd64. We are able to run FreeBSD 1.1.8 (i386) on amd64 > > > > kernel in chroot this way. Since sometimes I get bug reports about this > > > > stuff, there are some users of it. I believe it is important to be able > > > > to run any FreeBSD binary for PR purposes, to wave the flag of excellent > > > > binary compatibility we offer. > > > > > > > > COMPAT_43 is there to stay as far as there are people willing to maintain > > > > it. There are more than one. > > > > > > > > > > I think it's safe to retain on i386. amd64 is less clear to me, but I'd > > > lean yes. > > I believe amd64 is required since you have less and less chances to usefully > > run i386 kernel on modern hardware. > > Would this also be required for running i386 binaries on amd64 using lib32 > that expect the COMPAT_43 behavior? I do not quite understand the question. My proposed change would mostly limit effect of COMPAT_43 to a.out binaries. /usr/lib32 are ELF. I would not expect any modern (as in, ELF) binaries to require changes to the syscalls behavior from COMPAT_43. > > > > All the other platforms I'd agree with gleb: why do we need it in > > > the kernels by default (and maybe why do we need to support it at all)? > > > > > > Warner > > -- > Rod Grimes rgrimes@freebsd.org