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.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 73963CA9EA1 for ; Fri, 18 Oct 2019 14:04:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4CBDB21925 for ; Fri, 18 Oct 2019 14:04:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="s/332UPV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2410225AbfJROEf (ORCPT ); Fri, 18 Oct 2019 10:04:35 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:38163 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408654AbfJROEe (ORCPT ); Fri, 18 Oct 2019 10:04:34 -0400 Received: by mail-pg1-f194.google.com with SMTP id w3so3446857pgt.5; 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=M1g3JUbOoZsVDjdyERFUL8jVd7PIfRJQynGrwPzRSG1M9wbGBRflDgLhpiFIvIXBCc liCcKlyxKYlMBYebpC/ggiwm7skM/8ZZmz8vxDQICpBbK5tz/JUaAXNoGZU8EDcGEJhc 0FMi5nyxo2o0B8UcrkvWlRsgR1lrl3mM02nrd0KzU4hQtUVZLPaMSuWBJQknyP7+B5vE Pl8VxJ3XfpcL3Hz/8Am+lDC4ZTLp74KnXl/TTiOmvm2keuZ5Bl4bfb15lpkwan7l7vjH LAnMPgyek5FT3MIYtD2lZD1dJbkQ7XZNTlovuuBeRHcoMIcIHLi3Qy8Fcy9GDQxCx6+m +m5w== X-Gm-Message-State: APjAAAUMfS4d4f+Li92/M+FWk+VcuOYxXxHreJ/l++u+AjmKAxtr2Fja 27Kd8nY1A5Nja6zKE7l+ckcee+uC6bB3Yv/T65M= 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 Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , Mark Brown , linux-arm Mailing List , linux-spi , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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