Received: by 10.192.165.148 with SMTP id m20csp1234929imm; Wed, 2 May 2018 17:08:03 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoc+TfXZX87YeWjO/rZuDMh372UCBimeJkJijICZQo6HrjRY3i0Y0KLkDlepFodaTKVDCRa X-Received: by 2002:a17:902:4301:: with SMTP id i1-v6mr21970646pld.280.1525306083732; Wed, 02 May 2018 17:08:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525306083; cv=none; d=google.com; s=arc-20160816; b=oMVarfA2WQN2WinhC3OF1jzLzVn5SuaJmDlhKMFOYx6EeTuQh3fa3/ULUFnrJIRMsb ZaAor/E/U2HfK8xYsKp7PSN+aWWi2NLwLCOYFBk0PPH/r+lSVJ7XpUHfi3PogwxERyR1 8h5l582rNzXbVnQCom6YxOdelgahjsxiT1Wojt/vRVGzdpEqW94jWHcQg3rYL69BUgk0 ZkO1LQrbOHIBV8cHEZinLrrl+1pJ27HEbJ3uwBApfj38l2hY8V1WUPwBtak78pOrDaJH TbJwtSxq7eUa7nXTvNYYVijNY01VU2wG5o5g8yVMPy2IaJcTbuGWCVLpTNwLw0qVrFMo uWjw== 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=a2I9HJHrhLRjjkkKcrKMZntGj9L9fpfZSOf1UJtEg2aopwSmFw1jsxGk7O178KD1+a 1oDmmlY+4SxsJu8XilagnRrSx2ptcTMOhh37AgaV3eSD8pwXyu9nIwxQi1wapswTC1/c 6utFTwnNVaHQKRqleM2A4NcTrSCFn6oh8n4Zg1z9avgm/ZDiSaeaCDKeBmZhOqhVoCNf zSc/LQoqW/2oS4qolM/P3c1knKvtmWNexWIQhm5txCN95qAK/Hca02DDSS0WbVV+fB9C sUUMreP2mqr33NIDvZE5BQcJ9MCq4zu6MhnFfXRpCfRM0Eq3SwdMyqyrzsu/cKAHLwYv 2S/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=djr0hvTe; 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 h185-v6si10416014pgc.34.2018.05.02.17.07.48; Wed, 02 May 2018 17:08:03 -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=djr0hvTe; 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 S1751881AbeECAHK (ORCPT + 99 others); Wed, 2 May 2018 20:07:10 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:44502 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751840AbeECAHG (ORCPT ); Wed, 2 May 2018 20:07:06 -0400 Received: by mail-pf0-f193.google.com with SMTP id q22so13151313pff.11 for ; Wed, 02 May 2018 17:07:06 -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=djr0hvTez/m1Y0l7UeAi5ufl1PSnQVeYwBuTbd6DD87yGQaLFp/CK/6BAxa/B1h/M7 Hssf6jiQKI5rEHOUZV/DrZ9w0XGncMsSfjnfiE3vO7fJZDJ/CdcAVzWKslek5/M8zemd lnq4u0w8Nmv4wsIf4jIS5TJyfRko7H1ct43/+zdOkzS49MB44PPn6bPthhsFTyaECyeQ vVhmbQWRoeKBwhflmlSEo6EwOUnt0ttE9T0Kmhw3mg8RfC5XE8yh3kYPwctsUh2aKrpi NuZws9frUaHEp8RzuYxLyqzVHL+u7afE4x/GFHcZo5D5UU7UxcDVTXH1eQhvYRyQq4wK mUdw== 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=JmVofJDMghJie/JsWiHjiICsOyI8AxE7/Euujn20rVt6eJbWTmlcTdhci+ckKlg6At rioKazgO/WxuWif63Gq6uTvc0SV3nB6E0DRnaz2st7kykxADgLJYWGLPXEwBryPR+fHt Kh/tVin3CCccsF6J0DrOuCdR8z7o7Cym7Ep1Ij4AGdGfOsXG8/kfSHqKjAvN9PIeZqtP yPMceNKS9WAkuRwvwmjtE4TWppzhHO7a3kun5JdqWoA85hwdY1puCEjHO3u7bMl+jtwk aS+raRwa/SCGkM1N+xwWiVxAcAscK0gKq+9UNgRiTVzhhJ5rh0YzaC36uCwSYW6Qqfos xfeA== X-Gm-Message-State: ALQs6tA9Dl9LpntxijrI1BadE+g8OrikLcGK7bWIAY/mBuU9cLi3YTq5 Dva6AS4x+EFc+9z1Uev5AqAKcg== X-Received: by 2002:a63:7e09:: with SMTP id z9-v6mr17910003pgc.437.1525306025711; Wed, 02 May 2018 17:07:05 -0700 (PDT) Received: from drosen.mtv.corp.google.com ([2620:0:1000:1611:7129:1142:3149:848c]) by smtp.gmail.com with ESMTPSA id r8-v6sm9280365pgn.2.2018.05.02.17.07.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 May 2018 17:07:05 -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] drivers: dma-buf: Change %p to %pK in debug messages Date: Wed, 2 May 2018 17:03:00 -0700 Message-Id: <20180503000300.90083-1-drosen@google.com> X-Mailer: git-send-email 2.17.0.441.gb46fe60e1d-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