From owner-freebsd-hackers@FreeBSD.ORG Mon May 2 16:46:44 2011 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 DE4681065678 for ; Mon, 2 May 2011 16:46:43 +0000 (UTC) (envelope-from jamesbrandongooch@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 713518FC14 for ; Mon, 2 May 2011 16:46:43 +0000 (UTC) Received: by wyf23 with SMTP id 23so5690659wyf.13 for ; Mon, 02 May 2011 09:46:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=jJfBTw0wThYvauwTWFBK80zLqnyUCmay6n55jb25DZo=; b=lVMxMbQeTW9dtXZ9q0d+CcfTHgfuxwAQX/mU/bItZA19Hr1kL1A+PXTFyHYaeUByA0 xduWskB8fZZ7DVV3kecqO3k1rTZ7YtJkLLqS8uohh6IBJrd25bmmzjFZUhPZfYzi1+pR 5jlXdplz4FX4DrnEePbR0+iRDEKzANrdoQrlo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=rIoeA39UQZdijce6DncbzrFaNgoBJnzpiRV8np0JiTdKOvcj7cLgqC4y42Sm0ixjrW LSCFOhvKD68iam6VYMfEHn2MggLl0mzpkD1lv7WujlNvhSrlhHVbI7IL4saxbP+dPwZg zVBBUvlqiA2rR3AATpdhQQrpT3LcSUkA5jn/M= MIME-Version: 1.0 Received: by 10.216.188.20 with SMTP id z20mr3374801wem.66.1304353086637; Mon, 02 May 2011 09:18:06 -0700 (PDT) Received: by 10.216.17.213 with HTTP; Mon, 2 May 2011 09:18:06 -0700 (PDT) In-Reply-To: References: Date: Mon, 2 May 2011 11:18:06 -0500 Message-ID: From: Brandon Gooch To: Garrett Cooper Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: [PATCH] draft patch to make usr.bin/kdump WARNS?= 6 clean 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: Mon, 02 May 2011 16:46:44 -0000 On Mon, May 2, 2011 at 11:10 AM, Garrett Cooper wrote: > =A0 =A0I wanted to do something different this weekend, and I picked > usr.bin/kdump as a likely 'victim' for converting from WARNS?=3D 0 to > WARNS?=3D 6. I'm curious as to whether or not this is on the right > track, but here's the reasoning I used: > > 1. Conditionally include diskmbr.h or diskpc98.h based on whether or > not an architecture was non-pc98 or pc98 to avoid duplicate > definitions, because the beforementioned headers are mutually > exclusive. > 2. Move the sockfamilyname declaration to kdump_subr.h as it's used in > the generated ioctl.c file. > 3. Fix a signed vs unsigned comparison with a simple cast because the > size_t value will be sufficiently small that it can be converted to a > signed comparison. > 4. Fix a cast assignment type source//dest value alignment issue on > ia64 assigning a struct sockaddr value to either struct sockaddr_in or > struct sockaddr_in6 by using calloc and memcpy. > 5. Fix structure alignment issues on arm by marking some structures as __= packed. > 6. Fix a shadowed declaration for flags by renaming a locally scoped > variable to _flags; add appropriate type to field. > 7. Remove unused argument to ktruser_malloc. > 8. Add missing declarations for ktruser_malloc and ktruser_rtld. > > =A0 =A0I've run some basic tests and things seem sane (in particular > ktrace'ing ktrace :)... ktrace'ing 'ssh ::1' and ktrace'ing 'ssh > localhost', but I was wondering if there was anything I was missing or > if someone else who ran arm or ia64 could test this patch out for me. > =A0 =A0I've run make universe on amd64, i386, ia64, mips, and pc98, and > things seem sane, but I can't play around with those machines to > determine whether or not they're functional at runtime with the above > changes. > Thanks! > -Garrett > > PS Oh yeah... no commit bit means that I can't commit this either, but > I was curious if my approach was correct before getting to that step > :). Cool, but where's the patch for review? -Brandon