Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753501Ab1BTEom (ORCPT ); Sat, 19 Feb 2011 23:44:42 -0500 Received: from ausxippc101.us.dell.com ([143.166.85.207]:26703 "EHLO ausxippc101.us.dell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751627Ab1BTEom (ORCPT ); Sat, 19 Feb 2011 23:44:42 -0500 X-Loopcount0: from 143.166.82.43 Date: Sat, 19 Feb 2011 22:44:40 -0600 From: Matt Domsch To: Mike Waychison Cc: Greg KH , torvalds@linux-foundation.org, San Mehat , Aaron Durbin , Duncan Laurie , linux-kernel@vger.kernel.org, Tim Hockin Subject: Re: [PATCH v1 3/6] driver: Google EFI SMI Message-ID: <20110220044440.GA28167@auslistsprd01.us.dell.com> References: <20110125002433.12637.51091.stgit@mike.mtv.corp.google.com> <20110125002449.12637.35623.stgit@mike.mtv.corp.google.com> <20110125031752.GA9846@kroah.com> <20110126024608.GB28283@kroah.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1441 Lines: 38 On Thu, Jan 27, 2011 at 03:41:06PM -0800, Mike Waychison wrote: > On Wed, Jan 26, 2011 at 5:22 PM, Mike Waychison wrote: > > I've spent the last few hours looking at efivars.c and working out how > I can refactor it to reuse all the kobject bits it uses. Does anybody > use this thing though? > > I can't believe I was just lectured for crappy ABI when this thing > takes a binary packed struct on write() and process it: > - without regard to write length, and > - in a way that isn't compatible across compat (both DataSize and > Status are unsigned long!). > > struct efi_variable { > efi_char16_t VariableName[1024/sizeof(efi_char16_t)]; > efi_guid_t VendorGuid; > unsigned long DataSize; > __u8 Data[1024]; > efi_status_t Status; > __u32 Attributes; > } __attribute__((packed)); > > :( I wrote that long before anyone believed there could be a 32-bit EFI or 32-bit kernel running on a 64-bit EFI. Remember, this originated on Itanium. I knew it was ugly, but the EFI spec itself defined the DataSize and Status as they did. -- Matt Domsch Technology Strategist Dell | Office of the CTO -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/