From patchwork Fri Dec 13 22:24:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 22411 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f71.google.com (mail-pa0-f71.google.com [209.85.220.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2665E23FBA for ; Fri, 13 Dec 2013 22:27:23 +0000 (UTC) Received: by mail-pa0-f71.google.com with SMTP id kl14sf1985762pab.6 for ; Fri, 13 Dec 2013 14:27:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=G5kLx3NbuBzUaep7J9GTIAQojRH3LFJp5+MdycVVEyI=; b=ayhER+HyEie3GS8m+aDaqXMLWQT8lJNnokMS4MZMVsusBitz33Q1MF2GkhM6JDIkTN Utky/sLd451X4U+yczhVaxf1FeJue5XqAQK1Alz5bR42T4Menb++OLAOe2YrdodPlTLY AU8SH35jXPesRtVcBYNXXmEpJRQ2qr22xS9No4YB4ILzb+WQenu2YVajkPfNf2B6Xek4 jfeSpGwnkXafAn2bs3obJWEjgjCGKflyyWE8jRMGPruVjS0rGwt9yneUmisjpxZ//YkJ lcvyCZMiqzJvC98lntoOBK+Ai/MIYwfWX3G2XAK/Tb8hhiPbsOhkUNmL73zOfLLroQ4A /qeA== X-Gm-Message-State: ALoCoQmEVgZsip2RUI/BdASxGTRTbRohYereVspQS2pBm8zKoElG1OawAufbm7uffHZEHrZLstTj X-Received: by 10.67.21.145 with SMTP id hk17mr2766590pad.35.1386973642402; Fri, 13 Dec 2013 14:27:22 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.17.65 with SMTP id m1ls1185764qed.91.gmail; Fri, 13 Dec 2013 14:27:22 -0800 (PST) X-Received: by 10.221.64.17 with SMTP id xg17mr2231261vcb.5.1386973642242; Fri, 13 Dec 2013 14:27:22 -0800 (PST) Received: from mail-vb0-f51.google.com (mail-vb0-f51.google.com [209.85.212.51]) by mx.google.com with ESMTPS id im16si1189692vec.130.2013.12.13.14.27.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 14:27:22 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.51 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.51; Received: by mail-vb0-f51.google.com with SMTP id 11so1718044vbe.38 for ; Fri, 13 Dec 2013 14:27:22 -0800 (PST) X-Received: by 10.58.181.230 with SMTP id dz6mr2175208vec.35.1386973642172; Fri, 13 Dec 2013 14:27:22 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp73538vcz; Fri, 13 Dec 2013 14:27:21 -0800 (PST) X-Received: by 10.68.197.73 with SMTP id is9mr5969827pbc.75.1386973641373; Fri, 13 Dec 2013 14:27:21 -0800 (PST) Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by mx.google.com with ESMTPS id 8si2509881pbe.100.2013.12.13.14.27.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 14:27:21 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.46 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=209.85.220.46; Received: by mail-pa0-f46.google.com with SMTP id kl14so586978pab.5 for ; Fri, 13 Dec 2013 14:27:21 -0800 (PST) X-Received: by 10.68.225.9 with SMTP id rg9mr6159375pbc.122.1386973640998; Fri, 13 Dec 2013 14:27:20 -0800 (PST) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id qz9sm7457908pbc.3.2013.12.13.14.27.19 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 14:27:19 -0800 (PST) From: John Stultz To: LKML Cc: Greg KH , Android Kernel Team , Sumit Semwal , Jesse Barker , Colin Cross , Rebecca Schultz Zavin , John Stultz Subject: [PATCH 046/115] gpu: ion: Fix bug in zeroing pages in system heap Date: Fri, 13 Dec 2013 14:24:20 -0800 Message-Id: <1386973529-4884-47-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1386973529-4884-1-git-send-email-john.stultz@linaro.org> References: <1386973529-4884-1-git-send-email-john.stultz@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.51 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Rebecca Schultz Zavin Pages are zeroed for security purposes when returned to the ion heap. There was a bug in this code preventing this from happening. Bug: 7573871 Signed-off-by: Rebecca Schultz Zavin [jstultz: modified patch to apply to staging directory] Signed-off-by: John Stultz --- drivers/staging/android/ion/ion_system_heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c index df08469..9327a32 100644 --- a/drivers/staging/android/ion/ion_system_heap.c +++ b/drivers/staging/android/ion/ion_system_heap.c @@ -103,7 +103,7 @@ static void free_buffer_page(struct ion_system_heap *heap, security. This uses vmap as we want to set the pgprot so the writes to occur to noncached mappings, as the pool's purpose is to keep the pages out of the cache */ - for (i = 0; i < order / PAGE_SIZE; i++) { + for (i = 0; i < (1 << order); i++) { struct page *sub_page = page + i; void *addr = vmap(&sub_page, 1, VM_MAP, pgprot_writecombine(PAGE_KERNEL));