From owner-svn-src-all@freebsd.org Mon Dec 9 19:18:06 2019 Return-Path: Delivered-To: svn-src-all@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 727A21DD30D; Mon, 9 Dec 2019 19:18:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47WtJG22Gcz3yC6; Mon, 9 Dec 2019 19:18:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 40CDE1F289; Mon, 9 Dec 2019 19:18:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xB9JI6gb020855; Mon, 9 Dec 2019 19:18:06 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xB9JI6Uc020854; Mon, 9 Dec 2019 19:18:06 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201912091918.xB9JI6Uc020854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 9 Dec 2019 19:18:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355569 - head/sys/amd64/linux32 X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/amd64/linux32 X-SVN-Commit-Revision: 355569 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2019 19:18:06 -0000 Author: jhb Date: Mon Dec 9 19:18:05 2019 New Revision: 355569 URL: https://svnweb.freebsd.org/changeset/base/355569 Log: Use 4 byte stack alignment instead of 8 byte. This was an old bug prior to r355373 and mostly harmless as it would waste at most a handful of bytes on the stack. Modified: head/sys/amd64/linux32/linux32_sysvec.c Modified: head/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c Mon Dec 9 19:17:56 2019 (r355568) +++ head/sys/amd64/linux32/linux32_sysvec.c Mon Dec 9 19:18:05 2019 (r355569) @@ -741,7 +741,7 @@ linux_copyout_strings(struct image_params *imgp, uintp if (execpath_len != 0) { destp -= execpath_len; - destp = rounddown2(destp, sizeof(void *)); + destp = rounddown2(destp, sizeof(uint32_t)); imgp->execpathp = destp; error = copyout(imgp->execpath, (void *)destp, execpath_len); if (error != 0) @@ -750,7 +750,7 @@ linux_copyout_strings(struct image_params *imgp, uintp /* Prepare the canary for SSP. */ arc4rand(canary, sizeof(canary), 0); - destp -= roundup(sizeof(canary), sizeof(void *)); + destp -= roundup(sizeof(canary), sizeof(uint32_t)); imgp->canary = destp; error = copyout(canary, (void *)destp, sizeof(canary)); if (error != 0) @@ -758,7 +758,7 @@ linux_copyout_strings(struct image_params *imgp, uintp /* Allocate room for the argument and environment strings. */ destp -= ARG_MAX - imgp->args->stringspace; - destp = rounddown2(destp, sizeof(void *)); + destp = rounddown2(destp, sizeof(uint32_t)); ustringp = destp; if (imgp->auxargs) { @@ -767,7 +767,7 @@ linux_copyout_strings(struct image_params *imgp, uintp * array. It has LINUX_AT_COUNT entries. */ destp -= LINUX_AT_COUNT * sizeof(Elf32_Auxinfo); - destp = rounddown2(destp, sizeof(void *)); + destp = rounddown2(destp, sizeof(uint32_t)); } vectp = (uint32_t *)destp;