From owner-freebsd-bugs@FreeBSD.ORG Wed Feb 5 13:54:17 2014 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2712891C for ; Wed, 5 Feb 2014 13:54:17 +0000 (UTC) Received: from mail-vc0-x22c.google.com (mail-vc0-x22c.google.com [IPv6:2607:f8b0:400c:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D0A871BC9 for ; Wed, 5 Feb 2014 13:54:16 +0000 (UTC) Received: by mail-vc0-f172.google.com with SMTP id lf12so295933vcb.31 for ; Wed, 05 Feb 2014 05:54:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=/y7OJIqUwYz0hFnTZ8rT5I2QmDIFfxhICauYAkyGHeE=; b=PlsdFqGxhH/8OWTWbv4IojOo+TFXRhks2QooFutxJJPB7XnGj9GYQHLROMpyiQtOGE S74sLWG/W31TfT3o4TsZ83nOSkoxVIYwdaop10AXR1lpKkeL05oL6yJFG0xA680YPX8X KeKKQPzUtgCaxRv/U0GC3Lv6qs+AHrHJJuLB2yHwhca/clopBh+jMDkzJ/ELYlBgsYeQ hOTr8GpWIbwkG/qinZGEeeUiUa4S3exaDvhq2hTlkCpFikyoh/FVZyXEfozibdGkztj2 B/tTGzlFB5j1sBevWa0RPBF2PHbRGbEDUVJGBI5JLqAwLzSEPqruqymGu0S++wpwi8Q/ yMHQ== MIME-Version: 1.0 X-Received: by 10.59.10.130 with SMTP id ea2mr141429ved.55.1391608455489; Wed, 05 Feb 2014 05:54:15 -0800 (PST) Received: by 10.58.37.135 with HTTP; Wed, 5 Feb 2014 05:54:15 -0800 (PST) In-Reply-To: References: <201402042000.s14K01eo021855@freefall.freebsd.org> Date: Wed, 5 Feb 2014 08:54:15 -0500 Message-ID: Subject: Re: kern/181497: [kernel] [patch] Add ASLR feature to kernel From: Shawn Webb To: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: freebsd-bugs@freebsd.org X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Feb 2014 13:54:17 -0000 Looks like that variable is missing in that struct. The exec delta variable changes how the binary itself and the RTLD is loaded. I'll fix the warnings and errors you reported today. Thanks for helping! On Wed, Feb 5, 2014 at 3:56 AM, Olivier Cochard-Labb=E9 wrote: > On Tue, Feb 4, 2014 at 9:00 PM, Shawn Webb wrote: > >> The following reply was made to PR kern/181497; it has been noted by >> GNATS. >> >> From: Shawn Webb >> To: bug-followup@FreeBSD.org, >> steven@roothosts.com >> >> Cc: >> Subject: Re: kern/181497: [kernel] [patch] Add ASLR feature to kernel >> Date: Tue, 4 Feb 2014 14:57:44 -0500 >> >> --Apple-Mail=3D_70D08D01-527F-4575-806A-36757E957E5A >> Content-Transfer-Encoding: quoted-printable >> Content-Type: text/plain; >> charset=3Dus-ascii >> >> I'm sorry, my patch actually wasn't right. It included other fixes I ha= d >> =3D >> in my branch for other features and didn't include some of the other = =3D >> ASLR bits. Attached is the right patch. >> >> > kernel compilation failed if configuration is "with PAX_ASLR options" and > "without COMPAT_FREEBSD32 options": > > --- kern_pax.o --- > /src/sys/kern/kern_pax.c:531:9: error: no member named > 'vm_aslr_delta_exec' in 'struct vmspace' > > vm->vm_aslr_delta_exec =3D round_page(PAX_ASLR_DELTA(arc4random(), > PAX_ASLR_DELTA_EXEC_LSB, (pr !=3D NULL) ? pr->pr_pax_aslr_exec_len : > pax_aslr_exec_len)); > ~~ ^ > 1 error generated. > > What's is this "vm_aslr_delta_exec" ? >