Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2460222imm; Thu, 7 Jun 2018 10:58:26 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJwW2Y0AsqHaCD7oFQp4YfySOoH3oOL9oi9RLqRNNn50qFIMsk6DaOqF9MLvBVlSWKyQryF X-Received: by 2002:a17:902:b216:: with SMTP id t22-v6mr3001460plr.199.1528394306271; Thu, 07 Jun 2018 10:58:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528394306; cv=none; d=google.com; s=arc-20160816; b=VtPjYeTXXXCSi6t11EjSw19El4uaI90c+mS7wba/xIkH1dKWVjAKvYUid/g8D/sD6z 04X0x2GqGX08+RtHBsyqyaTOUDG1qQU6LmEedHKwRSKDjXCHHKvkIfjNbQcesXlFpFLc at3KjgLmVMw2BZ7/mAgHcDac6o+eQmqDeKacVNqXuXM9wFdYbS/sh5LN+q4vcwY4Ap9Q jBr/yw5BWfs+RrexXxfm69964kT+wjZv4yfxaMcSOxc6giNOYkp6OsHKW3i38RRRNptK xzjt6PY9m6tk+7samjFo3ZTd9bTueyfXk9G4alOJ4N15khL/QEUXKZti/IGJHmza+8wZ mx+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=uW7i9hf4STaKArcZj4lXl5drMhyGW/gTG/eSTCLM02M=; b=EEKjVBsFdRv8y+bvFtWsKlM9muMdJGcPJhMQV/q524mB4hrufc53f42lteVqEU3ReO i7XbhAeqoGH7Z2Z3fKBxNe16bJ5wc2F7Bh94wcZ+rTFkPYo/a+cr29T/A0nnm+NXA+lm UO9hBrl7mvOJ+BiXe79X+yCJ06txk7Bp39uTcDlY1xeltgh/RGsfrdJydhW76uMh7JQe TE5/8BgpMAxxz6lwaExazOKJr9UfBGULrSJqviAp7U94pLiZnwwiO4DkIDCtQI2gyz3h TaJPARUlog11NG/iMLxES1EVc5abe+hMcwH3+FgocPBWgDVw1rul5lWEphc8n1HepBMK kP7A== 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 n3-v6si43057928pgc.56.2018.06.07.10.58.12; Thu, 07 Jun 2018 10:58:26 -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 S934126AbeFGOrm (ORCPT + 99 others); Thu, 7 Jun 2018 10:47:42 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:40808 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933094AbeFGOri (ORCPT ); Thu, 7 Jun 2018 10:47:38 -0400 Received: from [148.252.241.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1fQvbd-0005Zv-HB; Thu, 07 Jun 2018 15:09:37 +0100 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1fQvb8-00034Q-1V; Thu, 07 Jun 2018 15:09:06 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Todd Kjos" , "Todd Kjos" , "Greg Kroah-Hartman" Date: Thu, 07 Jun 2018 15:05:21 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 247/410] binder: replace "%p" with "%pK" In-Reply-To: X-SA-Exim-Connect-IP: 148.252.241.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.57-rc1 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 Signed-off-by: Greg Kroah-Hartman [bwh: Backported to 3.16: adjust filename, context] Signed-off-by: Ben Hutchings --- drivers/staging/android/binder.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/staging/android/binder.c +++ b/drivers/staging/android/binder.c @@ -1242,7 +1242,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); @@ -2059,7 +2059,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) { @@ -3162,7 +3162,7 @@ static void print_binder_transaction(str struct binder_transaction *t) { 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, @@ -3176,7 +3176,7 @@ static void print_binder_transaction(str if (t->buffer->target_node) seq_printf(m, " node %d", t->buffer->target_node->debug_id); - seq_printf(m, " size %zd:%zd data %p\n", + seq_printf(m, " size %zd:%zd data %pK\n", t->buffer->data_size, t->buffer->offsets_size, t->buffer->data); }