Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Mar 2017 14:25:21 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Ed Schouten <ed@nuxi.nl>
Cc:        Ed Schouten <ed@freebsd.org>, src-committers <src-committers@freebsd.org>,  svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r315701 - in head/sys: amd64/cloudabi32 amd64/cloudabi64 arm/cloudabi32 arm64/cloudabi64 i386/cloudabi32
Message-ID:  <20170323122521.GA43712@kib.kiev.ua>
In-Reply-To: <CABh_MK=Gge1oSJ9ERvvNCeEW2F6omLiLAVqEYQ1sdG5oVoVZVg@mail.gmail.com>
References:  <201703220705.v2M75RHE066483@repo.freebsd.org> <20170322090258.GR43712@kib.kiev.ua> <CABh_MKmEMidUHFXw1fpwb8TP7qEktnFPgXH4UUvmu2bmhdgiqA@mail.gmail.com> <20170322230026.GV43712@kib.kiev.ua> <CABh_MK=Gge1oSJ9ERvvNCeEW2F6omLiLAVqEYQ1sdG5oVoVZVg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Mar 23, 2017 at 08:43:20AM +0100, Ed Schouten wrote:
> Thanks! I just gave the patch a try, but the comparison added to
> imgact_elf.c now causes the brandinfo to be skipped entirely. Attached
> is a patch that does work for me.
> 
> Index: sys/kern/imgact_elf.c
> ===================================================================
> --- sys/kern/imgact_elf.c	(revision 315828)
> +++ sys/kern/imgact_elf.c	(working copy)
> @@ -312,8 +312,9 @@
>  			continue;
>  		if (hdr->e_machine == bi->machine &&
>  		    (hdr->e_ident[EI_OSABI] == bi->brand ||
> +		    (bi->compat_3_brand != NULL &&
>  		    strcmp((const char *)&hdr->e_ident[OLD_EI_BRAND],
> -		    bi->compat_3_brand) == 0)) {
> +		    bi->compat_3_brand) == 0))) {
>  			/* Looks good, but give brand a chance to veto */
>  			if (!bi->header_supported ||
>  			    bi->header_supported(imgp)) {

This looks fine, please commit.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170323122521.GA43712>