From owner-freebsd-hackers@FreeBSD.ORG Tue May 13 19:26:13 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 538DC1065674 for ; Tue, 13 May 2008 19:26:13 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from hosted.kievnet.com (hosted.kievnet.com [193.138.144.10]) by mx1.freebsd.org (Postfix) with ESMTP id 0F4468FC14 for ; Tue, 13 May 2008 19:26:13 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost ([127.0.0.1] helo=edge.pp.kiev.ua) by hosted.kievnet.com with esmtpa (Exim 4.62) (envelope-from ) id 1Jw08a-0001Ri-5W for freebsd-hackers@freebsd.org; Tue, 13 May 2008 22:26:12 +0300 Message-ID: <4829EB53.3010804@icyb.net.ua> Date: Tue, 13 May 2008 22:26:11 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.12 (X11/20080320) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: /dev/mem wrap-around behavior X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2008 19:26:13 -0000 This is just out of curiosity, not a real issue. I use i386 RELENG_7. I recently played with dd-ing memory contents out of /dev/mem and examining various stuff. I "intuitively" expected dd to reach EOF at 0xFFFFFFFF (i.e. maximum possible address for i386 non-PAE), but it continued on. Apparently this happens because off_t is somewhere assigned to caddr_t (or something like that) without any extra checks. So, I am curious if this intentional, unintentional or it just happened to be this way and nobody really cares. -- Andriy Gapon