Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp690356pxb; Wed, 29 Sep 2021 07:45:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybzTrSCtU1O//qsYNplKRf6gl3AWV/Wo9G9iTRtxcdje2QyqgYDnv7lNI6ILQRF1/TgooQ X-Received: by 2002:a50:9d85:: with SMTP id w5mr343995ede.268.1632926749550; Wed, 29 Sep 2021 07:45:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632926749; cv=none; d=google.com; s=arc-20160816; b=Jb/JOzK8sb7Qc1fzRJjFz2rHnv4xT31kbJoAi4h1q2L+P2s+xwPWunRMyCOMMLs8nT eCyVOHaSPtRq08fmPsX2klKonDHr1eFTOwYV7lKOzbIgVbHRtR0G9hEpM3GORrF/rn1A hYRWWVznUD65I7LjfmQjTHhV6PUzdLfEXDoA2g1ZFk/YtR6sVlzjeLVYJ+r3Nd8raXI3 que5LTZS3OhwbA/xAjnvVzToKjS5wwqiDUnyoC+DhAVfMP/ibVSA2GRyEEO9PX53uX4b 8+l7BjqlbIlH8qWrdQEEoaGOJS3BpHv0FyFGesxf0Pa4EKGd72T6GUlpyC02B6NTY/L8 fzwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :references:cc:to:subject:from:dkim-filter; bh=Z8rvyiFflJQeSQOAuneK3NGp9Hjn7wVvCIBFVWS1Mks=; b=BgZcAtBQ8NVuYfvB/3j+IvazphfLk4pcl4CrskwSVUOr90Ri/JP5TGDEngQlzkjJct uAmjYWUTUOeyUcN6WdSFZ0ABAqr9poDKrPKn0Is+IFQ9lvOMClryW/yWsQcFVvB7v6aH GtnOSfLI+dIfFBhOIiTg7hK7G6x7SYGBY/V46CPDqQ8XuRo2eq3+qZowWP0QRMTmBlRh snI13OAi0gBRJocWq1UJJLV7yXoPJLkGAWUgfHbWvC01tNq4b4R6Wg3El2tTFM5/2/hY HRO5kOp/6KV0fIJsBca5NQU2DdGh7eDiYvaMIcWVCNy095BRYJbAuKqU7n2j0FqI0JUz X+uw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hy4si37327ejc.575.2021.09.29.07.45.21; Wed, 29 Sep 2021 07:45:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344438AbhI2OmE (ORCPT + 99 others); Wed, 29 Sep 2021 10:42:04 -0400 Received: from mxout02.lancloud.ru ([45.84.86.82]:54440 "EHLO mxout02.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344537AbhI2OmD (ORCPT ); Wed, 29 Sep 2021 10:42:03 -0400 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout02.lancloud.ru 2EA65236520F Received: from LanCloud Received: from LanCloud Received: from LanCloud From: Sergey Shtylyov Subject: Re: [PATCH] drivers/ata: Fix kernel pointer leak To: Guo Zhi , Damien Le Moal CC: , References: <20210929121618.1157415-1-qtxuning1999@sjtu.edu.cn> Organization: Open Mobile Platform Message-ID: <563011b8-52cd-3bae-a6f6-4611ab5863da@omp.ru> Date: Wed, 29 Sep 2021 17:40:07 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20210929121618.1157415-1-qtxuning1999@sjtu.edu.cn> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT01.lancloud.ru (fd00:f066::141) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29.09.2021 15:16, Guo Zhi wrote: I'd recommend the subject prefix to be just "pata_atp867x: "... > Pointers should be printed with %p or %px rather than cast to > 'unsigned long' and pinted with %lx Printed. > Change %lx to %p to print the secured pointer. > > Signed-off-by: Guo Zhi > --- > drivers/ata/pata_atp867x.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/ata/pata_atp867x.c b/drivers/ata/pata_atp867x.c > index 2bc5fc81efe3..c32b95f48e50 100644 > --- a/drivers/ata/pata_atp867x.c > +++ b/drivers/ata/pata_atp867x.c > @@ -447,11 +447,11 @@ static int atp867x_ata_pci_sff_init_host(struct ata_host *host) > #ifdef ATP867X_DEBUG > atp867x_check_ports(ap, i); > #endif > - ata_port_desc(ap, "cmd 0x%lx ctl 0x%lx", > - (unsigned long)ioaddr->cmd_addr, > - (unsigned long)ioaddr->ctl_addr); > - ata_port_desc(ap, "bmdma 0x%lx", > - (unsigned long)ioaddr->bmdma_addr); > + ata_port_desc(ap, "cmd 0x%p ctl 0x%p", > + ioaddr->cmd_addr, This line shouldn't be broken up, it's not long at all. > + ioaddr->ctl_addr); > + ata_port_desc(ap, "bmdma 0x%p", > + ioaddr->bmdma_addr); Hmm, I've looked at the driver and got an imperession it only uses the I/O ports, not MMIO... [...] MBR, Sergey