Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp139225imm; Tue, 5 Jun 2018 16:42:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKfBkJ03Gw6F2qlmqCy8aqvNh6I/7qbNvHuhGmEXFq+zrSPfw8KLjVL+32X9+gu5jGvNADw X-Received: by 2002:a63:be4f:: with SMTP id g15-v6mr550556pgo.115.1528242121647; Tue, 05 Jun 2018 16:42:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528242121; cv=none; d=google.com; s=arc-20160816; b=pozPDsk9QoP11xp/H3ai6Br69POf4RH8swuUyoXLGmzyrEHSImZtZ6BV3PTxqtnyUI KHkxmFQRx2Lxwh0B6gT5X+iA/4X12gksHiAdClQfrw7ullNQ+wE8QdT+hIY964n24m9/ PmT09CFqvoUBMpJ9QEZK6T+KkaJTGzJIzfC8k83y16y/BeTAhhjSECt8I7m/J7AlvfAL wrZKZT+B7fuk6Lv+16HWQWttM+yztMXY1AQ+HyzX07bYIRX10p5u2Q/fkbwdXYfxcp5W wmIqyCbRpkZk2ySlb6gww9K9WIj+kFKacPtxATHgcZEP02Ur53hLGvWBj0g/mltT2MsD +oxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=lgrhnNE86gQ6sMYXn+4YR9kgOMo8pKaYL4yoHZIzgC4=; b=gNl1PY3l2oFY3RBoWIo/7ksm9ZAhm4Sr5JJOTrnpR5+rFSGvPZJ1FLcfl5VEB8ZYFC 6YXwHNuqYVx2QTCk81YvWt102TRVMcf/zR4dHg8uQFaOnBBorcVrCvQKkjztO0R+U2Ad On4+cnTVUYJp8z4b2NAXLeia7RCNjJnV8cYwSvAAzcXCdSkczsPVZ7Z3EcTPP/yloASd w1Jk/FNO5TlxIhMQw+sfhWYowFXvVn+UrHmhdeu6pmvE2a32BRDmYyj1XFxtg6vHL6h8 1TxJBa3+Dn4aLLRRjk3TQu/OI3ey4bN8xG9Mvlkn5l7dx/GlYPscWG+4bPvjX2w74A6n m0aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gOFXpI8H; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n2-v6si50859611plk.433.2018.06.05.16.41.34; Tue, 05 Jun 2018 16:42:01 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=gOFXpI8H; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752989AbeFEXky (ORCPT + 99 others); Tue, 5 Jun 2018 19:40:54 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:33828 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752962AbeFEXkw (ORCPT ); Tue, 5 Jun 2018 19:40:52 -0400 Received: by mail-pg0-f68.google.com with SMTP id q4-v6so956558pgr.1 for ; Tue, 05 Jun 2018 16:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=lgrhnNE86gQ6sMYXn+4YR9kgOMo8pKaYL4yoHZIzgC4=; b=gOFXpI8HZzz+u/x+0ZFbWA8DnKp/xgTGzkVTJ3qxsMkxbofUsa6aZ0Q1KUwbw85LpL LBRll+U0Ftc1ODHOIxsukrVlDYOTAJQbIL31+g4j/tCyeyulaARms93EGuOVMLt2EypL 8hYg3D+qfCh19OYuyrfMmVxz0tQFy8lhOfzFP2FeRroiQq47p/JHoqKoe7E+xOEtgBR5 1QGYY8fIeWc7AcpoNQ+IssfOTAHWyxQ8qNozQ4x5pT/xiwE75/zBNNhP72tAjUWcugno l8sSgAP/i5S31qkF5SA390bUDcO6rsKgkFLo2hqjSE1ZTzYl5rSMvuZxtnLnTCcU1gyU 0boA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=lgrhnNE86gQ6sMYXn+4YR9kgOMo8pKaYL4yoHZIzgC4=; b=CL3Z20DOtGUqNzIfJQP9cywZsL30VneqMTCPPROOzgO21akJiEzBoYSD6jWpMutm5z tdQWA2519FyJXIJC/UPNj7f2fJ0aMnEzS3phzjxkEGQuftEcsgqWOOBlWZu/Cdz4KCrC jt+4u2h4cesmWWkH7TPLOPyBe4LWnrVrEs3mrxqZQl4K9zIuAZJoJmthXmKU5qAuvfdu TQvfogr/6PUTrLVi/Vitrf7K0AB8v6lUINqbm3zytL1usHcyTLhMWC12Wk6k1ZfRbfg9 7iVmXymJVTWVrzKtvl5jWU3Tqn4O7KB7UbYZ5fV+TRofiifn2rWUexDsDbbW4F9eT5Vd 0R+A== X-Gm-Message-State: APt69E1luT7t1UWDRvsXPw/isk1vfA6mYKjITG6TPAasHUCerlSTazkf D8vYsJajfAp/3CEe49OOOvZIgA== X-Received: by 2002:a63:7b07:: with SMTP id w7-v6mr516232pgc.199.1528242051728; Tue, 05 Jun 2018 16:40:51 -0700 (PDT) Received: from drosen.mtv.corp.google.com ([2620:0:1000:1611:7129:1142:3149:848c]) by smtp.gmail.com with ESMTPSA id j15-v6sm14007563pfk.40.2018.06.05.16.40.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jun 2018 16:40:51 -0700 (PDT) From: Daniel Rosenberg To: Sumit Semwal , linux-kernel@vger.kernel.org Cc: Gustavo Padovan , linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, dri-devel@lists.freedesktop.org, kernel-team@android.com, Daniel Rosenberg , Divya Ponnusamy , stable Subject: [PATCH resend] drivers: dma-buf: Change %p to %pK in debug messages Date: Tue, 5 Jun 2018 16:40:41 -0700 Message-Id: <20180605234041.246060-1-drosen@google.com> X-Mailer: git-send-email 2.17.1.1185.g55be947832-goog Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The format specifier %p can leak kernel addresses while not valuing the kptr_restrict system settings. Use %pK instead of %p, which also evaluates whether kptr_restrict is set. Signed-off-by: Divya Ponnusamy Signed-off-by: Daniel Rosenberg Cc: stable --- drivers/dma-buf/sync_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma-buf/sync_debug.c b/drivers/dma-buf/sync_debug.c index c4c8ecb24aa9..d8d340542a79 100644 --- a/drivers/dma-buf/sync_debug.c +++ b/drivers/dma-buf/sync_debug.c @@ -133,7 +133,7 @@ static void sync_print_sync_file(struct seq_file *s, char buf[128]; int i; - seq_printf(s, "[%p] %s: %s\n", sync_file, + seq_printf(s, "[%pK] %s: %s\n", sync_file, sync_file_get_name(sync_file, buf, sizeof(buf)), sync_status_str(dma_fence_get_status(sync_file->fence))); -- 2.17.0.441.gb46fe60e1d-goog