From owner-freebsd-hackers@freebsd.org Tue Jun 12 17:04:26 2018 Return-Path: Delivered-To: freebsd-hackers@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 A02401007ED8 for ; Tue, 12 Jun 2018 17:04:26 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pg0-x233.google.com (mail-pg0-x233.google.com [IPv6:2607:f8b0:400e:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2675D6EF5F for ; Tue, 12 Jun 2018 17:04:26 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pg0-x233.google.com with SMTP id m5-v6so11749021pgd.3 for ; Tue, 12 Jun 2018 10:04:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=jTyOYCimflHFEnDSgQMYPt2hInVZ9zieZTlY4DYG9Hs=; b=dGcmkOSh8ZGeUfIYFCdbFJiPSKoXNG3doVdIcD0XeOZ5ub4jFgo0Dv5T4R8UUt75gH w8zYlOQjImcLmCt4zZtQcfFO5kiSipxIUf9Ew90kJFfMj/6tdlI5VZm+vf4WTq1cW7h1 qjuFpESTYrOTLsWU912VCJu2dpd7LFTVLMk+ECovfpI2FTm0DtxfJS83MWkC0KDILoVO EcBa0Kmr7grxfbR40N6+cyu0xHzhsWKeaPUE4k9R9xFrdhPwmIpup2WpDHv3cmXzTPSq zttaZCMX12e929u/ziyliaKhPaQsQXnfMlGxN+gUd7GJfEvTbWIkTHWngP9bOeotyUwa f0uQ== 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:subject:message-id :mime-version:content-disposition:user-agent; bh=jTyOYCimflHFEnDSgQMYPt2hInVZ9zieZTlY4DYG9Hs=; b=TxBSdMoYfnrBlYxDgzseGCpmD02PZ8HmN2sQzEVTiUrSQoSfgwWv6+wT5c36uNrrUn hGyvUxvsPOLAlH6gzQ/8S3ExEzjPqmqd0AgBdA6veoYMs8yuEllfkrtMbz4rgMfs4kvN 6V0ACa1B25wri+Y+71RxgkYiIX8GtB/xDEUeSHUBMp6B+jaoaJ65udozMq8BI/64Hmlk qq/k/uMNooH+/6fsnx7HpBXnK4G/tiA8WykDt7/UyKZdBtfp6AJBmoNVYAJ4EynSBVUz KSPmnSmZyLJpap8OUrTzjNssIu5gpm2NbMjnPGgIt6BHV6Ay+qn5+Lo43M3PQ/A4RFls ybWg== X-Gm-Message-State: APt69E2ZIxSBFMdNMTpj4I+P7TqF+3v0QEjKSabRu53WdjzT3WevOxCd cZrTYHEJgfVS0MXrsPsz9U7FS+WC X-Google-Smtp-Source: ADUXVKKT/W/RA7yAwmI2/+k+YDFx7VT/gmCiD42t0IsSefT+iV6ZSz0f5O5CJ5uKt7wGg53rofKnCw== X-Received: by 2002:a63:6741:: with SMTP id b62-v6mr1037976pgc.5.1528823064930; Tue, 12 Jun 2018 10:04:24 -0700 (PDT) Received: from raichu (toroon0560w-lp140-02-70-49-169-156.dsl.bell.ca. [70.49.169.156]) by smtp.gmail.com with ESMTPSA id g2-v6sm1098853pfc.4.2018.06.12.10.04.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jun 2018 10:04:23 -0700 (PDT) Sender: Mark Johnston Date: Tue, 12 Jun 2018 13:04:20 -0400 From: Mark Johnston To: freebsd-hackers@freebsd.org Subject: specifying alignment of loader files Message-ID: <20180612170420.GD56138@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.0 (2018-05-17) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jun 2018 17:04:26 -0000 Hi, I'm writing some code which processes a file loaded by the loader. I want the file's contents to be available at a certain alignment in memory, and as far as I can see, the loader provides no alignment guarantees today. The access will happen early enough during boot that making an aligned copy of the data will be awkward, so I'd like the loader to provide the desired alignment. I'm considering adding a new "module_align" variable that would specify the alignment for a given file type, and plumb that through to command_load(). Does anyone have an alternate suggestion, or an objection to my proposal?