From owner-svn-src-all@freebsd.org Mon Jan 13 20:02:28 2020 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 A1AC11EAFB9; Mon, 13 Jan 2020 20:02:28 +0000 (UTC) (envelope-from tsoome@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 47xPdJ1zQ9z47DM; Mon, 13 Jan 2020 20:02:28 +0000 (UTC) (envelope-from tsoome@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 3EFC99FA8; Mon, 13 Jan 2020 20:02:28 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00DK2SLF075520; Mon, 13 Jan 2020 20:02:28 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00DK2RVD075517; Mon, 13 Jan 2020 20:02:27 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202001132002.00DK2RVD075517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 13 Jan 2020 20:02:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r356700 - in head/stand: efi/libefi i386/libi386 libofw uboot/lib X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: in head/stand: efi/libefi i386/libi386 libofw uboot/lib X-SVN-Commit-Revision: 356700 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, 13 Jan 2020 20:02:28 -0000 Author: tsoome Date: Mon Jan 13 20:02:27 2020 New Revision: 356700 URL: https://svnweb.freebsd.org/changeset/base/356700 Log: Backout 356693. The libsa malloc does provide necessary alignment and memalign by 4 will reduce alignment for some platforms. Thanks for Ian for pointing this out. Modified: head/stand/efi/libefi/efinet.c head/stand/i386/libi386/pxe.c head/stand/libofw/ofw_net.c head/stand/uboot/lib/net.c Modified: head/stand/efi/libefi/efinet.c ============================================================================== --- head/stand/efi/libefi/efinet.c Mon Jan 13 19:34:15 2020 (r356699) +++ head/stand/efi/libefi/efinet.c Mon Jan 13 20:02:27 2020 (r356700) @@ -178,7 +178,7 @@ efinet_get(struct iodesc *desc, void **pkt, time_t tim return (ret); bufsz = net->Mode->MaxPacketSize + ETHER_HDR_LEN + ETHER_CRC_LEN; - buf = memalign(4, bufsz + ETHER_ALIGN); + buf = malloc(bufsz + ETHER_ALIGN); if (buf == NULL) return (ret); ptr = buf + ETHER_ALIGN; Modified: head/stand/i386/libi386/pxe.c ============================================================================== --- head/stand/i386/libi386/pxe.c Mon Jan 13 19:34:15 2020 (r356699) +++ head/stand/i386/libi386/pxe.c Mon Jan 13 20:02:27 2020 (r356700) @@ -484,7 +484,7 @@ pxe_netif_receive(void **pkt) } size = isr->FrameLength; - buf = memalign(4, size + ETHER_ALIGN); + buf = malloc(size + ETHER_ALIGN); if (buf == NULL) { bio_free(isr, sizeof(*isr)); return (-1); Modified: head/stand/libofw/ofw_net.c ============================================================================== --- head/stand/libofw/ofw_net.c Mon Jan 13 19:34:15 2020 (r356699) +++ head/stand/libofw/ofw_net.c Mon Jan 13 20:02:27 2020 (r356700) @@ -142,7 +142,7 @@ ofwn_get(struct iodesc *desc, void **pkt, time_t timeo * a small shortcut here. */ len = ETHER_MAX_LEN; - buf = memalign(4, len + ETHER_ALIGN); + buf = malloc(len + ETHER_ALIGN); if (buf == NULL) return (-1); ptr = buf + ETHER_ALIGN; Modified: head/stand/uboot/lib/net.c ============================================================================== --- head/stand/uboot/lib/net.c Mon Jan 13 19:34:15 2020 (r356699) +++ head/stand/uboot/lib/net.c Mon Jan 13 20:02:27 2020 (r356700) @@ -302,7 +302,7 @@ net_get(struct iodesc *desc, void **pkt, time_t timeou #endif if (rlen > 0) { - buf = memalign(4, rlen + ETHER_ALIGN); + buf = malloc(rlen + ETHER_ALIGN); if (buf == NULL) return (-1); memcpy(buf + ETHER_ALIGN, sc->sc_rxbuf, rlen);