Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4271449imm; Mon, 14 May 2018 05:18:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoGiAJsXB9XRqFxNqO+xtry2O0EBksnBq8x3Q2RYj3nrhWfkQ+sJj0JzikSPBguGfbZyB0J X-Received: by 2002:a62:4651:: with SMTP id t78-v6mr10346620pfa.46.1526300333924; Mon, 14 May 2018 05:18:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526300333; cv=none; d=google.com; s=arc-20160816; b=malSB2JmBsQSY8y4vknX5Q9xH2bMZhGBtyZUIy7NVwLxHKNQVKyyQO/xX926QVvyf9 rCKQ0UR+8pRB3GIFqMqYYxQSl1JusqkTjtzA1JXESQweIJHMd5BoRfcM64TR2jzcGPyG zch99AeJbwW8lmVHPdkFwk8MbpDwoVE1StlT9ACRAaP3OvSQFHscRthgEfOA2DdDLwKg aPcTq/C2a1lvD81RMluXOawhE1P+9HRF0BEA2GLsUBqOnJDa4Ism7aP2BtXPDE29Rj8/ 0XBVFPq/UIaw3c5zqFIF/oT52rPO0o4AyNBTjNBSovDSuoJmVyUZxpCKnL0x7s7gk6A3 o3Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=TA24t/eaGEsU1g3O7C6JeYjjvqfrAWx7wiD4/S7BK/g=; b=D2K5ut9PukOO0mHvs3INnmHfZHwDJoRKHAOSPYeeUmwYbGnHsKLC/EDwhPB6Dagq9T hg211PiaPU1sZoJIPXg5etGLNZjxACyqQS5+O0OqVgeA/9UW73EpWXjhGDepeYOeBfla 7Kq+vfYu7sddT9KDmMPvEhZaPMkUgD3jbBZVwWhYcQi/lVcYyxzUIGs+G80ZyIL/cGlR s8jhJXnZKMifSNfEyP9CHcwa4c62IHH3WrppMP+Ip1eDrNcAgf2CeVp/NvPBQW6vUrMJ FT5vj45gmW+GxMgTSX2+eoA1McJSJorRkoF5/LR2YyxxL8jP4MgGsHCA/xWL7xreJSAd vHig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i9-v6si6788973pgq.131.2018.05.14.05.18.38; Mon, 14 May 2018 05:18:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752671AbeENMSV (ORCPT + 99 others); Mon, 14 May 2018 08:18:21 -0400 Received: from bmailout1.hostsharing.net ([83.223.95.100]:40891 "EHLO bmailout1.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752095AbeENMST (ORCPT ); Mon, 14 May 2018 08:18:19 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id F3A963000222B; Mon, 14 May 2018 14:18:17 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id BE7406F4E0; Mon, 14 May 2018 14:18:17 +0200 (CEST) Date: Mon, 14 May 2018 14:18:17 +0200 From: Lukas Wunner To: Andy Shevchenko Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Ard Biesheuvel , linux-efi@vger.kernel.org, Sakari Ailus , Mika Westerberg , "Rafael J . Wysocki" , ACPI Devel Maling List Subject: Re: [PATCH v2] device property: Get rid of union aliasing Message-ID: <20180514121817.GA27869@wunner.de> References: <20180508131547.44366-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180508131547.44366-1-andriy.shevchenko@linux.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 08, 2018 at 04:15:47PM +0300, Andy Shevchenko wrote: > --- a/drivers/firmware/efi/apple-properties.c > +++ b/drivers/firmware/efi/apple-properties.c > @@ -13,6 +13,9 @@ > * > * You should have received a copy of the GNU General Public License > * along with this program; if not, see . > + * > + * FIXME: The approach is still based on union aliasing and should be > + * replaced by a proper resource provider. Why? All Apple EFI properties are either boolean or u8 arrays. You've correctly changed this file to always supply u8 arrays, so I don't see where union aliasing is happening here? Thanks, Lukas > */ > > #define pr_fmt(fmt) "apple-properties: " fmt > @@ -96,12 +99,13 @@ static void __init unmarshal_key_value_pairs(struct dev_header *dev_header, > entry[i].name = key; > entry[i].length = val_len - sizeof(val_len); > entry[i].is_array = !!entry[i].length; > - entry[i].pointer.raw_data = ptr + key_len + sizeof(val_len); > + entry[i].type = DEV_PROP_U8; > + entry[i].pointer.u8_data = ptr + key_len + sizeof(val_len); > > if (dump_properties) { > dev_info(dev, "property: %s\n", entry[i].name); > print_hex_dump(KERN_INFO, pr_fmt(), DUMP_PREFIX_OFFSET, > - 16, 1, entry[i].pointer.raw_data, > + 16, 1, entry[i].pointer.u8_data, > entry[i].length, true); > } >