From owner-svn-src-head@freebsd.org Fri Aug 9 01:38:42 2019 Return-Path: Delivered-To: svn-src-head@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 91309B91DC for ; Fri, 9 Aug 2019 01:38:42 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 464SZ93Tvbz3Pxs for ; Fri, 9 Aug 2019 01:38:41 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x844.google.com with SMTP id v38so1941977qtb.0 for ; Thu, 08 Aug 2019 18:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Za4kNDf3+zUt5DKsAq9XjAe0wPpfoDYZiLcjTPSv0Gk=; b=f5O7RmjGCOIVYOFEsQNuNBm6T4OabtU+zpfdlzHqKrr7BoiOBpKSx7y2Fpw6plsT8Q c2Ozmyqb6O1oMkhGj7+QEh0C+GP/80o9tlOBd62bf9W0zy6V0AOvtm9+kLbsiJmI9PFD fgG+aLBF2+W6QroB1mITXazVEEF/EJQhaq6ov0fmwkYUpiUu4kmk1ayAG/4cx00cudah +PthOhHSXWf7yPlwljjVi9PlR2yPnvywrnvhEvDVyMCGJqD/RCrE4ZB+9BlO4MWVYOFe MNWVUowzd2exyBn6+zoInCXrTmy5YwkMDgX3nKI3NFUHtXTdr6iZOUQZ4hW4VYMOmtAq dfFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Za4kNDf3+zUt5DKsAq9XjAe0wPpfoDYZiLcjTPSv0Gk=; b=KedlaXlIwcYIEu6NwEmK7QgNcWvPV1QOlbjdjzWIuCcOpJ/x3rp+nXEXZAsowSlJDJ vfWFzWsx9AtJzSvD96PDq5LDvmRJKpQTnPaxKY9i5/JP+lo1woE4CgcSLH7ab2Ggb/OH oDdr6tYXzbLHCL8veIWLIznFRY3i94DbVMOCr2Q4RNA4PZGLDRHVpcB1f7Q7qTqG1XBD p6LjTccRiTHcLRKw6MLpIwefxwiB8OKrOEq5+gAwzXSjcxm1bUERXpinjHHmpJX7OAoO nI/zI1676nQ9kgSU8uqAJAV36ttDqUGhs6D9+xrPCXNJKY2zgT9uq1RxtrVyPKwhNrof PN9w== X-Gm-Message-State: APjAAAVuyiBryGZXDfk4QBeQITsnbgQslZjCx34DnlwDDNNdCP6N89Pq FfVLYbpZ/d1TQLf8e4lRCuqOFU1y1tFsuy08e11tnQ== X-Google-Smtp-Source: APXvYqzUKqiZqNZM3KZ4u2PLX5eXF3HLvVJCbb9pmJ8uVA0iogtAPd5DLjXXa38v4Zxh3ca1RHVnTsef+rQzIHPi69M= X-Received: by 2002:a0c:c250:: with SMTP id w16mr4480540qvh.188.1565314720151; Thu, 08 Aug 2019 18:38:40 -0700 (PDT) MIME-Version: 1.0 References: <201908081748.x78Hm79V085760@repo.freebsd.org> <20190808225947.GD1531@FreeBSD.org> In-Reply-To: <20190808225947.GD1531@FreeBSD.org> From: Warner Losh Date: Thu, 8 Aug 2019 19:38:28 -0600 Message-ID: Subject: Re: svn commit: r350764 - head/sys/arm64/arm64 To: Gleb Smirnoff Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 464SZ93Tvbz3Pxs X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=f5O7RmjG; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::844) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.15 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[9]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.55)[-0.548,0]; RCVD_IN_DNSWL_NONE(0.00)[4.4.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-0.60)[ip: (2.50), ipnet: 2607:f8b0::/32(-3.03), asn: 15169(-2.43), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Aug 2019 01:38:42 -0000 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... Warner On Thu, Aug 08, 2019 at 05:48:07PM +0000, Warner Losh wrote: > W> Author: imp > W> Date: Thu Aug 8 17:48:07 2019 > W> New Revision: 350764 > W> URL: https://svnweb.freebsd.org/changeset/base/350764 > W> > W> Log: > W> Make arm64 32-bit mode compile with COMPAT_43 > W> > W> The COMPAT_43 option isn't quite like the other compat options, and > arm64 makes > W> attempts to support it in 64-bit mode. In 32-bit compat mode, > however, two > W> syscall implementations that COMPAT_FREEBSD32 assumes will be there > are > W> missing. Provide implementations for these: ofreebsd32_sigreturn > (which we'll > W> never encounter, so implement it as nosys as is done in kern_sig.c) > and > W> ofreebsd32_getpagesize, where we'll always return 4096 since that's > the only > W> PAGE_SIZE we support, similar to how the ia32 implementation does > things. > W> > W> Reviewed by: manu@ > W> Differential Revision: https://reviews.freebsd.org/D21192 > W> > W> Modified: > W> head/sys/arm64/arm64/freebsd32_machdep.c > W> > W> Modified: head/sys/arm64/arm64/freebsd32_machdep.c > W> > ============================================================================== > W> --- head/sys/arm64/arm64/freebsd32_machdep.c Thu Aug 8 17:30:51 2019 > (r350763) > W> +++ head/sys/arm64/arm64/freebsd32_machdep.c Thu Aug 8 17:48:07 2019 > (r350764) > W> @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); > W> #include > W> #include > W> #include > W> +#include > W> #include > W> #ifdef VFP > W> #include > W> @@ -410,3 +411,30 @@ freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, > sigs > W> mtx_lock(&psp->ps_mtx); > W> > W> } > W> + > W> +#ifdef COMPAT_43 > W> +/* > W> + * COMPAT_FREEBSD32 assumes we have this system call when COMPAT_43 is > defined. > W> + * FreeBSD/arm provies a similar getpagesize() syscall. > W> + */ > W> +#define ARM32_PAGE_SIZE 4096 > W> +int > W> +ofreebsd32_getpagesize(struct thread *td, > W> + struct ofreebsd32_getpagesize_args *uap) > W> +{ > W> + > W> + td->td_retval[0] = ARM32_PAGE_SIZE; > W> + return (0); > W> +} > W> + > W> +/* > W> + * Mirror the osigreturn definition in kern_sig.c for !i386 platforms. > This > W> + * mirrors what's connected to the FreeBSD/arm syscall. > W> + */ > W> +int > W> +ofreebsd32_sigreturn(struct thread *td, struct > ofreebsd32_sigreturn_args *uap) > W> +{ > W> + > W> + return (nosys(td, (struct nosys_args *)uap)); > W> +} > W> +#endif > W> _______________________________________________ > W> svn-src-all@freebsd.org mailing list > W> https://lists.freebsd.org/mailman/listinfo/svn-src-all > W> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > > -- > Gleb Smirnoff >