Received: by 10.223.185.116 with SMTP id b49csp1050215wrg; Fri, 23 Feb 2018 11:01:01 -0800 (PST) X-Google-Smtp-Source: AH8x226lArxtdXU7aJwr/P5smpni+rdcSsdjzVs/osCxTomZ77Mp8v9MQDM5Z5s0GbD+jML28K3S X-Received: by 10.99.109.138 with SMTP id i132mr2203052pgc.417.1519412461596; Fri, 23 Feb 2018 11:01:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519412461; cv=none; d=google.com; s=arc-20160816; b=qMAKh/0Hzf/bkCAftj5RRmO17InEOApWsHC3pNgh9/aFSMZf2gZ6cRslYOrE8blNkV X3mlx/7JdLhyPvOcUM9FhaHp+O4nZxskf7vzC8xpvao3E5LK93BUeoR7ZUQ0p9QIMrpN JzoDqPfP4cuhAlG/1FitNWRXQoltcGeFYIdy2K2D2Y6oCt4i4PxKkUUkkjHwgq6cu9Ir jc4jNw5xD7eZxC/mY9R5xWT0L5/Ki273Cv0HU1xs0vqPqZ5E5Iqr5uw79j399awt/c7R 7ubLohIHiJtq/ghHsylGbalOLYP3YqcCuoFfumug9HM70uyPT841tG5j8tSI76X90X5e eXWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=lpXsS0oHCons5apTLRDVRyXMzLfbUegPrdmtL8QPjUw=; b=WPlHdpSmDc4T6Myq/RsYy1OqWQzppsD6sUl+HhZryzMguiTbsjM134hZpEySXOlejn VdlC2Nws6QvYJHYR3BZWpO579YR6KvfganjVdmZXhiOi6iGasGBwrmZAt/cn6Dqcnh5z uIiI+iG8wKrIfktitALHu6YqPrHpi3goo18kXuUDAguZddBAOAhMhBopx66WH5iAc0PS V4x6kTlixd28MNorPCvVcz0cK61jOhE784BB90LSUljUNN8xo3NNhwxIK2u3rQxEKX6t MrNYjmKGkvLrUu3xayrLcP7BayIPZe0luzs9rTXaWgw4NecDZHTYZb0/wVD/831Lcgpr 0j7A== 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 75si2208066pfp.353.2018.02.23.11.00.47; Fri, 23 Feb 2018 11:01:01 -0800 (PST) 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 S935735AbeBWS7V (ORCPT + 99 others); Fri, 23 Feb 2018 13:59:21 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:50872 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935707AbeBWS7T (ORCPT ); Fri, 23 Feb 2018 13:59:19 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 2692E1216; Fri, 23 Feb 2018 18:59:18 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Todd Kjos Subject: [PATCH 4.15 33/45] binder: replace "%p" with "%pK" Date: Fri, 23 Feb 2018 19:29:12 +0100 Message-Id: <20180223170720.624113327@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170715.197760019@linuxfoundation.org> References: <20180223170715.197760019@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Todd Kjos commit 8ca86f1639ec5890d400fff9211aca22d0a392eb upstream. The format specifier "%p" can leak kernel addresses. Use "%pK" instead. There were 4 remaining cases in binder.c. Signed-off-by: Todd Kjos Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/android/binder.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -2141,7 +2141,7 @@ static void binder_transaction_buffer_re int debug_id = buffer->debug_id; binder_debug(BINDER_DEBUG_TRANSACTION, - "%d buffer release %d, size %zd-%zd, failed at %p\n", + "%d buffer release %d, size %zd-%zd, failed at %pK\n", proc->pid, buffer->debug_id, buffer->data_size, buffer->offsets_size, failed_at); @@ -3653,7 +3653,7 @@ static int binder_thread_write(struct bi } } binder_debug(BINDER_DEBUG_DEAD_BINDER, - "%d:%d BC_DEAD_BINDER_DONE %016llx found %p\n", + "%d:%d BC_DEAD_BINDER_DONE %016llx found %pK\n", proc->pid, thread->pid, (u64)cookie, death); if (death == NULL) { @@ -4991,7 +4991,7 @@ static void print_binder_transaction_ilo spin_lock(&t->lock); to_proc = t->to_proc; seq_printf(m, - "%s %d: %p from %d:%d to %d:%d code %x flags %x pri %ld r%d", + "%s %d: %pK from %d:%d to %d:%d code %x flags %x pri %ld r%d", prefix, t->debug_id, t, t->from ? t->from->proc->pid : 0, t->from ? t->from->pid : 0, @@ -5015,7 +5015,7 @@ static void print_binder_transaction_ilo } if (buffer->target_node) seq_printf(m, " node %d", buffer->target_node->debug_id); - seq_printf(m, " size %zd:%zd data %p\n", + seq_printf(m, " size %zd:%zd data %pK\n", buffer->data_size, buffer->offsets_size, buffer->data); }