From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0371ACA9EA4 for ; Fri, 18 Oct 2019 14:05:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A00C321925 for ; Fri, 18 Oct 2019 14:05:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uVBKWaKR"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="s/332UPV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A00C321925 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tznHB+rN6+FulqqM3cXmUNNhjiIs6y5iNLVyDQyx5uI=; b=uVBKWaKR1LlgUn VgrP91s5kX+1+VJfofG49o5oj3MTpWmhYwkgMdxw+aU/SECwQShjs5C6W49JGPJcoOMiTUdKfPHkJ cKxhjWB9qiIbSd6XK624W46Z8oXaXR5sjYOBFhrFEXtxQ/p5mawUeb6N0R4f5LLGvpMeMjBcrJakZ uWHfLwa/EqRnEa6uTSZefpojb39dI7Df8+5AOXObx88+pg5XaHqQ/lP65pH9WDo8kmN3JJeoTGXiT 0Y2SWYDSG29eDMHNYUcSej1FXgG2xI6ncgllWpIT4g8sGWtB7RUCWKPO8pDAQixNPN7Wj/w4DdGrS gmGnqBoXquALabkgh74A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iLSsB-0000MZ-Ai; Fri, 18 Oct 2019 14:04:55 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iLSrr-00005a-J0 for linux-arm-kernel@lists.infradead.org; Fri, 18 Oct 2019 14:04:37 +0000 Received: by mail-pf1-x444.google.com with SMTP id h195so3967279pfe.5 for ; Fri, 18 Oct 2019 07:04:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XDsR3uMfXkgF7u6HALnY0iXOM6iF9eRUOFTw+nG58FU=; b=s/332UPVcH1YG4ye19Mtt+q/dq09kM3b0whWofT6iOrvdLjKeNJSYkEGYFV41HwrJ+ NWTQw49T0F9jwGWvwScp1UZ2t847mGaAFXXulMv9mGQAJLsG3dKWHgREe0FpOs6jVYWK cppS7aPIqstVZHnSUo3gHthlzVCgIAjPKB5T0vMa1tMxCUgxWuDmLC+RQT/E6RHfjHDC AqSTsQDXzjEWd/gfhgAYV3UjuuJtrtpN/6tAuKaAU/ghmYpCssDi7ZljlQIV/F5zRKrX TWEOv8hq5IVZpBOqM1H9GQ9T/oMyHsN53zFGEZmTr+uA1ka0S8bMJoWEGMXfMR0uDHxe aVkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XDsR3uMfXkgF7u6HALnY0iXOM6iF9eRUOFTw+nG58FU=; b=Z3wcZyrVIa8HJhC/pX3YyRDky9Gi9FYGA6C5qjviba9bDEVtGty1HfZjur4LqCGuCT B0l/7XZd0i9UzIJJqKxKf1vSjMrdOcKT9X6z+BjSmnKMuRZa8SfBstGuizA/kYJL/ULR 4x/0SHiDwKa6kmHxxmirhEmBeWNF9HQ/dLyjM8ACAjQ3Ql3PXIX7cCzee0PyBNbCXIwK gQpQgUMjUcKY5/xbmA8/TlSxWaDv3PuDRPHNrReB/kcjnMQrwRZPhdGS/SaEryzrSvYB +gsABKPe9IVow0YMb1Us+sYiRnWglw5nfPQv3cEpS3dr1J3+j1DB8jLmtBAx8UdsZASZ flwQ== X-Gm-Message-State: APjAAAU2Ytz6LuKrHs4xHDSOeHgc8W4Bdl/CI8VNSwViT3OkWh+h2vva iIi6LjOCpFLRXq4VubkidEkYhvxdlgNlU9aYFf4= X-Google-Smtp-Source: APXvYqwnOvM20v2TXGRKh+0hhjR67QeiaXXXTMLJTzrrZMqLeIyDAtaDXT+eB8luNhsXXvgzPPPobaNa8D5T/VNq5xk= X-Received: by 2002:a17:90a:9416:: with SMTP id r22mr11549632pjo.20.1571407473810; Fri, 18 Oct 2019 07:04:33 -0700 (PDT) MIME-Version: 1.0 References: <20191017025058.31528-1-hslester96@gmail.com> In-Reply-To: From: Andy Shevchenko Date: Fri, 18 Oct 2019 17:04:22 +0300 Message-ID: Subject: Re: [PATCH] spi: pxa2xx: Add missed security checks To: Chuhong Yuan X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191018_070435_643516_C12945D0 X-CRM114-Status: GOOD ( 15.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux Kernel Mailing List , Haojian Zhuang , linux-spi , Mark Brown , Daniel Mack , Robert Jarzmik , linux-arm Mailing List Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Oct 18, 2019 at 2:37 PM Chuhong Yuan wrote: > On Fri, Oct 18, 2019 at 7:14 PM Andy Shevchenko > wrote: > > On Fri, Oct 18, 2019 at 1:39 PM Chuhong Yuan wrote: > > > On Fri, Oct 18, 2019 at 5:35 PM Andy Shevchenko > > > wrote: > > > > On Fri, Oct 18, 2019 at 8:59 AM Chuhong Yuan wrote: > > > > I'm not sure they are mandatory for all platforms. > > > > To be on the safe side, you simple need to add _optional() to the both > > > > call along with above change. > > > > > > > > > > As I know, this is the only one in spi which does not have a check for > > > devm_clk_get. > > > > For some it still may be optional. That's why better to check it and > > mention in the commit message. > > > > > Even if add _optional(), they still may return errors and need security checks. > > > > Of course, see "along with" in my previous comment. > > > > Got it. I will send version 2 in which both _optional() and security > checks will be added. Let me be clear. I didn't check if _optional() needed or not. You need to investigate this before sending new verison. And in either case this should be explained in commit message. -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel