From owner-freebsd-current@freebsd.org Thu May 9 04:31:22 2019 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5EE2F159CFAD for ; Thu, 9 May 2019 04:31:22 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-it1-x142.google.com (mail-it1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) (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 EE40775B67; Thu, 9 May 2019 04:31:21 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-it1-x142.google.com with SMTP id g71so1264322ita.5; Wed, 08 May 2019 21:31:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+q7wkKYmM3bGkXlPhSnpA4AHSEr+u4609CWp8sZP1sc=; b=jTZ7f9Wwhs1QrTMHrsEEGhX49Dazr2MHFhonPlAwCbqbwDyoaJp8lHl+Pqfa7DxWwO Kxbiip5wNCkhrox2T4P0SB0t3dlxpjIgC0MyOrhKmMsmiNjz4uCsGeoqLMuVcz4H28WU YVtYauzWuXhwq9hTy9+Qsg53AVzz9Q9KAduO7JIudQMAtYF/BR05v1QLzLSCxev/sn4O Mi1T5LZ7cCb4oDhuY8tFDpwZSqcXdwzR/lMf1Y55ZLPUvDg6l9RU6U/QuX+RWG1qhnX9 BJ+vybQq78njm0Q8s6KsSZsauvuqpj9eCLrtMuR1B3zShfFjAj8ioS5/31fFj7ijCSEy n4iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=+q7wkKYmM3bGkXlPhSnpA4AHSEr+u4609CWp8sZP1sc=; b=F2vID5Jk+khf63qsGy8+5y8tp3W3q3aMPvtrN4L/rM0mTD14VAaldaDR5WGrNKkRU5 IDvCrtNZIR4D90L16rP9tPcBxlYrFDYajICt+U7n1AHSdYOAVmCC8mR+/eE4lPBeBLIF gPz7atFC7GpMbDMvypSuYG5qOoT/nMgwQ9/zqkpPWE0RYx1AIkCuTrvEt4Qvt09nZst9 T1ndkTj9sLL/aLuSmg67fp745u5BZ5IDwhuiNUSZsVy0HFqXYZ3GitoGXbMiAIwe4XqD iiIvfpOd1h3p0vf6QB8iCfmo/zYDy2dHId4xV2fWJRNmmVZXgtXVUnOQIu5DcoEpwiSv cx0Q== X-Gm-Message-State: APjAAAWN1wcm8XD4RyR6da17e+snmgqQ/iiBRk9+Rr2Jgdi3gS88p4qb 3uIVV5rT9MD7/SGwudo0LO++rxOB X-Google-Smtp-Source: APXvYqzxw53SxgH6B3GsZcCnrIssMe3tP9t3m+K5DXVnE+vaCHpip9aGA6F+860qhlXBxlN6w76zkA== X-Received: by 2002:a02:694f:: with SMTP id e76mr1511439jac.111.1557376280818; Wed, 08 May 2019 21:31:20 -0700 (PDT) Received: from raichu (toroon0560w-lp140-01-69-159-36-31.dsl.bell.ca. [69.159.36.31]) by smtp.gmail.com with ESMTPSA id f1sm451181iop.53.2019.05.08.21.31.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 May 2019 21:31:19 -0700 (PDT) Sender: Mark Johnston Date: Thu, 9 May 2019 00:31:17 -0400 From: Mark Johnston To: Larry Rosenman Cc: freebsd-current@freebsd.org Subject: Re: Crash loading dtraceall Message-ID: <20190509043117.GF11774@raichu> References: <20190508205245.ulbo6fusk3b4py7t@ler-imac.local> <20190508222932.GB11774@raichu> <845dd186ef038d98c1a95a7454e432d2@FreeBSD.org> <20190508225553.GC11774@raichu> <460d563e2fe48bfd90b489015b4c0f9d@FreeBSD.org> <20190509033211.GE11774@raichu> <8418ec8f5e303dce4225a53be88fc49d@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8418ec8f5e303dce4225a53be88fc49d@FreeBSD.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: EE40775B67 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 May 2019 04:31:22 -0000 On Wed, May 08, 2019 at 11:01:58PM -0500, Larry Rosenman wrote: > On 05/08/2019 10:32 pm, Mark Johnston wrote: > > On Wed, May 08, 2019 at 05:57:18PM -0500, Larry Rosenman wrote: > >> On 05/08/2019 5:55 pm, Mark Johnston wrote: > >> > On Wed, May 08, 2019 at 05:47:08PM -0500, Larry Rosenman wrote: > >> >> On 05/08/2019 5:29 pm, Mark Johnston wrote: > >> >> > On Wed, May 08, 2019 at 03:52:45PM -0500, Larry Rosenman wrote: > >> >> >> Greetings, > >> >> >> > >> >> >> Somewhere between r346483 and r347241 loading dtraceall causes a > >> >> >> crash. I have the cores and kernels. > >> >> >> > >> >> >> It's hard for me to bisect more than this, as the box is remote. > >> >> >> > >> >> >> What more do you need? (this dump is fropm r347355). > >> >> > > > The problem is with the kernel linker's handling of ifuncs. When > > enumerating symbols, it replaces ifunc symbol values with the return > > value of the resolver but preserves the original symbol size, which is > > that of the resolver. I believe this patch will address the panic > > you're seeing: > > > It does *NOT*. I see, my theory above is not the real problem here. The resolver for x86_rng_store() may return NULL, which we do not expect. Can you show the CPU info and features lines from the dmesg to confirm? Also see if this patch helps: diff --git a/sys/dev/random/ivy.c b/sys/dev/random/ivy.c index 57f3d0a1d80b..71065d788cf9 100644 --- a/sys/dev/random/ivy.c +++ b/sys/dev/random/ivy.c @@ -97,6 +97,13 @@ x86_rdseed_store(u_long *buf) return (retry); } +static int +x86_dead_store(u_long *buf __unused) +{ + + panic("missing hardware PRNG support"); +} + DEFINE_IFUNC(static, int, x86_rng_store, (u_long *buf), static) { has_rdrand = (cpu_feature2 & CPUID2_RDRAND); @@ -107,7 +114,7 @@ DEFINE_IFUNC(static, int, x86_rng_store, (u_long *buf), static) else if (has_rdrand) return (x86_rdrand_store); else - return (NULL); + return (x86_dead_store); } /* It is required that buf length is a multiple of sizeof(u_long). */