Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 May 2020 23:12:51 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Paul Floyd <pjfloyd@wanadoo.fr>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: SIGBUS si_code 12
Message-ID:  <20200522201251.GM64045@kib.kiev.ua>
In-Reply-To: <D22F2087-4FB3-4EB5-841E-61C809DF94F0@wanadoo.fr>
References:  <2102917207.11671.1589487524169.JavaMail.www@wwinf1n11> <490544208.11847.1589489181927.JavaMail.www@wwinf1n11> <20200514224347.GB46537@kib.kiev.ua> <9840EA0E-CF11-4332-A5A0-A3CDBA0F0464@wanadoo.fr> <20200521154621.GB85681@raichu> <068F2B99-24C2-4F38-ACC1-02273C198434@wanadoo.fr> <679A6BE4-E344-49D0-B76D-DB65A41E26FA@wanadoo.fr> <20200522192804.GL64045@kib.kiev.ua> <D22F2087-4FB3-4EB5-841E-61C809DF94F0@wanadoo.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 22, 2020 at 09:54:40PM +0200, Paul Floyd wrote:
> 
> 
> > On 22 May 2020, at 21:28, Konstantin Belousov <kostikbel@gmail.com> wrote:
> > 
> > On Fri, May 22, 2020 at 05:32:37PM +0200, Paul Floyd wrote:
> >> A bit more on this.
> >> 
> >> The code in question is in trap.c:
> 
> [snip]
> 
> >> 
> >> I have machte.prot_fault_translation set to 0 (the default I believe) so this enters the first ‘else if’ branch.
> >> 
> >> The value of p_osrel looks like it comes from retold.c. I see two mechanisms - passed via auxv AT_OSRELDATE (with a backup of using a sysctl) and reading the NT_FREEBSD_ABI_TAG note - I’m not sure which is used in this case.
> > I do not know what retold.c is.
> 
> 
> That’s how autocorrect thinks that rtld.c should be spelt.
> 
> 
> >> 
> >> The auxv value seems to be sent and I can’t see why either should be failing.
> > 
> > auxv has nothing to do with p_osrel as seen by kernel.  In-kernel
> > ELF image activator parses notes and reads osrel if available.
> 
> And which files/functions do that?
ELF image activator.

Look in kern/imgact_elf.c.  It is basically in check_note, used from
get_brandinfo.  The real function names are mangled for co-existence
of 32 and 64 bit elf activators.



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