Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3573032imm; Mon, 6 Aug 2018 07:08:02 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdJ19O+22RlKLxq7eoEBKWggh3Om0C0tvIGL74RgKhO1sP1lVV+u6MGD6uuot8VYzXWvtdP X-Received: by 2002:a62:1b4a:: with SMTP id b71-v6mr16949069pfb.221.1533564482790; Mon, 06 Aug 2018 07:08:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533564482; cv=none; d=google.com; s=arc-20160816; b=Dvi5kIIBiV0WbGdkiiiPebxcw5VeVr7AKceC/l8fv1yvBWNH/6RVPiaAfqkrUUnasW GhbK6aDvs+j5tdprLdGh5lyxYSs+ZPS/7IIkebS10oYuH6xQopiTqJ/Eul9ULf88ydpB vo3guZ62sIozQbwCugnc4d93KMaehEoimn5inAYdrQ/mUa/3z8gDG3NjvPJq1cQcWU+4 DtMh6MLTlfJR0dlthMTlAaF9RzpQ7KX3A/v1A1WUwWlkSDFjPi6pZNyIhmqEd8sXWYtT p+dLCAiYd3b6kek5oyxbHzObF86KEJDXlIX9UW4vgP3FjeNs0wehVOiiTM4e8wVw2ULa q3Lg== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=xUqn9ofczgvF+xBcg/ntqbDthju1M0N+z6Bf5PK6yBY=; b=VFF/PvfXciH6ZOECLkqp97dzu+xRZPufTHzbatQSgnZe0vW1k4rnmtgPlGt4zULrCj wdwlPWLGBV6n1CaOLR5Yi1nviSeocQs4nwCGi8in4nWgNcEXYqt1VUTKj/2LfXsSKrK0 UHl9HHK5eRJ9Dn/GK1+CWXs/gtSHSE2sul0tA9EMcN8PvYcG2OomQuG4T47YyWSZ2sx9 ePumYmK9ILmTonBrN/r1+n31lpTUEk0TDOT+wLXVuvfAyu51N2gnTMRwqmGNIBZWGGAZ 8rjZT+vTwY89eBTZns6wfmJcRtwTBsh7JmfyKksozojbeqf4nH85RDEOqHd3Ed6ZEGhf AJaA== 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 f2-v6si13786068pfk.97.2018.08.06.07.07.48; Mon, 06 Aug 2018 07:08:02 -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 S1730731AbeHFQPD (ORCPT + 99 others); Mon, 6 Aug 2018 12:15:03 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:59644 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727451AbeHFQPD (ORCPT ); Mon, 6 Aug 2018 12:15:03 -0400 Received: from localhost (unknown [194.244.16.108]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 34419E47; Mon, 6 Aug 2018 14:05:15 +0000 (UTC) Date: Mon, 6 Aug 2018 16:05:12 +0200 From: "gregkh@linuxfoundation.org" To: "Zhang, Ning A" Cc: "pombredanne@nexb.com" , "linux-kernel@vger.kernel.org" , "Li, Ting" , "yamada.masahiro@socionext.com" , "kstewart@linuxfoundation.org" , "markus@trippelsdorf.de" Subject: Re: [PATCH] firmware: make sure builtin firmware is page alignment Message-ID: <20180806140512.GA19844@kroah.com> References: <20180803014521.21527-1-ning.a.zhang@intel.com> <20180803053948.GB1852@kroah.com> <1533285744.20683.67.camel@intel.com> <20180803103121.GB6557@kroah.com> <1533520123.20683.71.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1533520123.20683.71.camel@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 06, 2018 at 01:48:44AM +0000, Zhang, Ning A wrote: > 在 2018-08-03五的 12:31 +0200,gregkh@linuxfoundation.org写道: > > On Fri, Aug 03, 2018 at 08:42:25AM +0000, Zhang, Ning A wrote: > > > 在 2018-08-03五的 07:39 +0200,Greg KH写道: > > > > On Fri, Aug 03, 2018 at 09:45:21AM +0800, Zhang Ning wrote: > > > > > when firmware is in filesystem, request_firmware will load it, > > > > > and copy it to vmalloc memory, that is page align memory. > > > > > > > > > > but when firmware is builtin, it is 8 bytes or 4 bytes > > > > > alignment. > > > > > > > > > > make sure builtin firmware is page algnment, that can simplify > > > > > algorithm > > > > > to handle firmware. > > > > > > > > How is it simplified?  I don't see any such change like that here > > > > :( > > > > > > > > > > Thank you for review this patch. > > > > > > When driver handles its firmware based on  page, like below: > > > > > > struct page *p; > > > p = vmalloc_to_page(fw->data);  // for filesystem firmware > > > p = virt_to_page(fw->data); // for builtin firmware > > > > > > but if builtin firmware is not page alignment, page pointer for > > > builtin > > > firmware is wrong, it contains memory not belong to firmware. > > > drivers > > > has to use additional code to handle this.  > > > > > > if builtin firmware is also page alignment, no need additional code > > > to > > > handle builtin firmware. simplified. > > > > But you did not change anything like this in your code, so why would > > I > > know this? > > I understand it is very difficult to review this patch without context. > The driver is not opensource, I can't show the patch for driver. Then I can not accept your patch. Go talk to your corporate lawyers about changing core kernel code for a closed source driver and what that implies about that closed driver (hint, your driver can not be closed...) :) Then come back with a proper open sourced driver, that's the only way Linux drivers can be written sorry. best of luck, greg k-h