Received: by 10.223.185.116 with SMTP id b49csp1079235wrg; Fri, 23 Feb 2018 11:32:30 -0800 (PST) X-Google-Smtp-Source: AH8x227pqMH0oRgYa5d+yf/RX7C1+BA3aYQxf2hV3jhL1Y+1jXW6S6x/bry4vfv78N4JK7z5Z7yV X-Received: by 2002:a17:902:b606:: with SMTP id b6-v6mr2618808pls.93.1519414350502; Fri, 23 Feb 2018 11:32:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519414350; cv=none; d=google.com; s=arc-20160816; b=EMG1c6kF2BKMoazhkgdzsCnMoqeCBYViPvOoya8bu8kPFUb6r8E2Pb1qtEaE72C9r3 Qzdorcwb0BEVqTuLUaMsnvY8deGNufnnywp4RLr7gGR5jlJsDqKKUAH2YhhIax7vN8gD CN2d80oFVlDA2teitpurIMlaPq/ZmM8+Y4uP2qcOE+L2rkqHo1XU8LCLqY6p6pLHPY5Q PymIVCi1OwEGrNF/2J6JYSEC/Fhyx2aycT0UZqEwng5seV4G59h6b4rWS7xaP0u5fyPh 82d28QbVeF1roQN61z/OWbZYviA4wdYxSB3qDaE7kmW9ptdOZki1s3L/wY4+HYk3Xjxm feaw== 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=qOuZBK+DLveoEslwRpgoiLYr2N/+ElvKtO6KO6jbitQ=; b=Uqkz/zTYBJhICT3/iu7EKyK7J4HmHnRgi4BbwSmYtoDh3wAoCClGoV4wV6xqDDKCyl JaZ2AB3UJzoCJ6CmzVvRL6shJjaJrhqOWqLoSHgI7rY1Z3rJrJ3vGjxs60SpM/BeONFE CdeVzgqJCl1E0agZQeGu2dLSg0cRgkPmkDm4ulUVFhqbX94GkDBS/7c6dOFqKt5yt0Y7 oo28o3EaFBpj216oGnv7QPp+Fb/bTQDr4RXXFn07bmwkV7gWfZFvvqSSfnS6nCI4q97g r8+sOG0e45cgcbL/jnsaZX5a3dpN7xRFTw4wlmhojZQevQBz7ZgDpR8+ZpdFyW8BQYUy 5Q+Q== 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 b13-v6si2233368plz.218.2018.02.23.11.32.16; Fri, 23 Feb 2018 11:32:30 -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 S935005AbeBWSvl (ORCPT + 99 others); Fri, 23 Feb 2018 13:51:41 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:46058 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934995AbeBWSvi (ORCPT ); Fri, 23 Feb 2018 13:51:38 -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 970E412E2; Fri, 23 Feb 2018 18:51:37 +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.14 054/159] binder: replace "%p" with "%pK" Date: Fri, 23 Feb 2018 19:26:02 +0100 Message-Id: <20180223170750.142875604@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170743.086611315@linuxfoundation.org> References: <20180223170743.086611315@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.14-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); }