From owner-svn-src-all@freebsd.org Mon Jan 13 19:54:43 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 34FB71EAAE3 for ; Mon, 13 Jan 2020 19:54:43 +0000 (UTC) (envelope-from tsoome@me.com) Received: from pv50p00im-ztdg10021901.me.com (pv50p00im-ztdg10021901.me.com [17.58.6.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47xPSK51P0z46fF for ; Mon, 13 Jan 2020 19:54:41 +0000 (UTC) (envelope-from tsoome@me.com) Received: from nazgul.lan (148-52-235-80.sta.estpak.ee [80.235.52.148]) by pv50p00im-ztdg10021901.me.com (Postfix) with ESMTPSA id D33458804C6; Mon, 13 Jan 2020 19:54:38 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Subject: Re: svn commit: r356693 - in head/stand: efi/libefi i386/libi386 libofw uboot/lib From: Toomas Soome In-Reply-To: <15236c9adbb7ec8c90375e283f7d1d5d5eafe6be.camel@freebsd.org> Date: Mon, 13 Jan 2020 21:54:29 +0200 Cc: Toomas Soome , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <202001131822.00DIMtrW016338@repo.freebsd.org> <5a3e388ed5c91a6d1f88ecc91c08dc103d0369d1.camel@freebsd.org> <4437F251-43CC-4DED-B449-00A9516C75E2@me.com> <15236c9adbb7ec8c90375e283f7d1d5d5eafe6be.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.3608.40.2.2.4) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2020-01-13_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=699 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-2001130162 X-Rspamd-Queue-Id: 47xPSK51P0z46fF X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.60 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:17.58.0.0/16]; FREEMAIL_FROM(0.00)[me.com]; MV_CASE(0.50)[]; RCPT_COUNT_FIVE(0.00)[5]; DKIM_TRACE(0.00)[me.com:+]; DMARC_POLICY_ALLOW(-0.50)[me.com,quarantine]; RECEIVED_SPAMHAUS_PBL(0.00)[148.52.235.80.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; RCVD_IN_DNSWL_LOW(-0.10)[55.6.58.17.list.dnswl.org : 127.0.5.1]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:714, ipnet:17.58.0.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[me.com]; R_DKIM_ALLOW(-0.20)[me.com:s=1a1hai]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (-7.06), ipnet: 17.58.0.0/20(-1.92), asn: 714(-2.24), country: US(-0.05)]; IP_SCORE_FREEMAIL(0.00)[]; DWL_DNSWL_LOW(-1.00)[me.com.dwl.dnswl.org : 127.0.5.1]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] 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 19:54:43 -0000 > On 13. Jan 2020, at 20:45, Ian Lepore wrote: > > On Mon, 2020-01-13 at 20:43 +0200, Toomas Soome wrote: >>> On 13. Jan 2020, at 20:31, Ian Lepore wrote: >>> >>> On Mon, 2020-01-13 at 18:22 +0000, Toomas Soome wrote: >>>> Author: tsoome >>>> Date: Mon Jan 13 18:22:54 2020 >>>> New Revision: 356693 >>>> URL: https://svnweb.freebsd.org/changeset/base/356693 >>>> >>>> Log: >>>> loader: allocate properly aligned buffer for network packet >>>> >>>> Use memalign(4, size) to ensure we have properly aligned buffer. >>>> >>>> MFC after: 2 weeks >>>> >>>> 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 >>>> >>> >>> The malloc implementation in libstand already g'tees minimum >>> alignment >>> of 16 bytes on most arches, 64 bytes on arches that use u-boot (see >>> libsa/zalloc_defs.h). So how does this change anything? >>> >> >> Hi! >> >> Well, given the amount of knobs etc, it does not hurt to be explicit, >> does it? >> >> rgds, >> toomas > > I think it does hurt, because now it misleads you into thinking it's 4- > byte aligned when it's actually 16 or 64. (That's what made me reply > at all, my first gut reaction to reading the commit message was "but 4 > is not at all the right alignment on many platforms"). > hm, I think you are right. time for backout. thanks for bringing this into my attention, toomas