lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 4 Oct 2018 15:59:54 +0530
From:   Suganath Prabu Subramani <suganath-prabu.subramani@...adcom.com>
To:     joe@...ches.com
Cc:     Sathya Prakash <sathya.prakash@...adcom.com>,
        Chaitra Basappa <chaitra.basappa@...adcom.com>,
        jejb@...ux.vnet.ibm.com,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        PDL-MPT-FUSIONLINUX <MPT-FusionLinux.pdl@...adcom.com>,
        linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/7] mpt3sas: Remove KERN_WARNING from panic uses

Please consider this patch as Acked-by: Suganath Prabu
<suganath-prabu.subramani@...adcom.com>

Thanks.
On Mon, Sep 17, 2018 at 8:31 PM Joe Perches <joe@...ches.com> wrote:
>
> Remove the logging level as panic calls stop the machine and should
> always be emitted regardless of requested logging level.
>
> These existing panic uses are perhaps inappropriate.
>
> Miscellanea:
>
> o Coalesce formats and convert MPT3SAS_FMT to "%s: " to improve clarity
>
> Signed-off-by: Joe Perches <joe@...ches.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_config.c | 41 +++++++++++++----------------------
>  1 file changed, 15 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_config.c b/drivers/scsi/mpt3sas/mpt3sas_config.c
> index 38d3b163b5d1..02209447f4ef 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_config.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_config.c
> @@ -421,12 +421,10 @@ _config_request(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigRequest_t
>                     (mpi_reply->Header.PageType & 0xF)) {
>                         _debug_dump_mf(mpi_request, ioc->request_sz/4);
>                         _debug_dump_reply(mpi_reply, ioc->request_sz/4);
> -                       panic(KERN_WARNING MPT3SAS_FMT "%s: Firmware BUG:" \
> -                           " mpi_reply mismatch: Requested PageType(0x%02x)" \
> -                           " Reply PageType(0x%02x)\n", \
> -                           ioc->name, __func__,
> -                           (mpi_request->Header.PageType & 0xF),
> -                           (mpi_reply->Header.PageType & 0xF));
> +                       panic("%s: %s: Firmware BUG: mpi_reply mismatch: Requested PageType(0x%02x) Reply PageType(0x%02x)\n",
> +                             ioc->name, __func__,
> +                             mpi_request->Header.PageType & 0xF,
> +                             mpi_reply->Header.PageType & 0xF);
>                 }
>
>                 if (((mpi_request->Header.PageType & 0xF) ==
> @@ -434,11 +432,10 @@ _config_request(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigRequest_t
>                     mpi_request->ExtPageType != mpi_reply->ExtPageType) {
>                         _debug_dump_mf(mpi_request, ioc->request_sz/4);
>                         _debug_dump_reply(mpi_reply, ioc->request_sz/4);
> -                       panic(KERN_WARNING MPT3SAS_FMT "%s: Firmware BUG:" \
> -                           " mpi_reply mismatch: Requested ExtPageType(0x%02x)"
> -                           " Reply ExtPageType(0x%02x)\n",
> -                           ioc->name, __func__, mpi_request->ExtPageType,
> -                           mpi_reply->ExtPageType);
> +                       panic("%s: %s: Firmware BUG: mpi_reply mismatch: Requested ExtPageType(0x%02x) Reply ExtPageType(0x%02x)\n",
> +                             ioc->name, __func__,
> +                             mpi_request->ExtPageType,
> +                             mpi_reply->ExtPageType);
>                 }
>                 ioc_status = le16_to_cpu(mpi_reply->IOCStatus)
>                     & MPI2_IOCSTATUS_MASK;
> @@ -461,14 +458,10 @@ _config_request(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigRequest_t
>                                 _debug_dump_reply(mpi_reply, ioc->request_sz/4);
>                                 _debug_dump_config(p, min_t(u16, mem.sz,
>                                     config_page_sz)/4);
> -                               panic(KERN_WARNING MPT3SAS_FMT
> -                                       "%s: Firmware BUG:" \
> -                                   " config page mismatch:"
> -                                   " Requested PageType(0x%02x)"
> -                                   " Reply PageType(0x%02x)\n",
> -                                   ioc->name, __func__,
> -                                   (mpi_request->Header.PageType & 0xF),
> -                                   (p[3] & 0xF));
> +                               panic("%s: %s: Firmware BUG: config page mismatch: Requested PageType(0x%02x) Reply PageType(0x%02x)\n",
> +                                     ioc->name, __func__,
> +                                     mpi_request->Header.PageType & 0xF,
> +                                     p[3] & 0xF);
>                         }
>
>                         if (((mpi_request->Header.PageType & 0xF) ==
> @@ -478,13 +471,9 @@ _config_request(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigRequest_t
>                                 _debug_dump_reply(mpi_reply, ioc->request_sz/4);
>                                 _debug_dump_config(p, min_t(u16, mem.sz,
>                                     config_page_sz)/4);
> -                               panic(KERN_WARNING MPT3SAS_FMT
> -                                       "%s: Firmware BUG:" \
> -                                   " config page mismatch:"
> -                                   " Requested ExtPageType(0x%02x)"
> -                                   " Reply ExtPageType(0x%02x)\n",
> -                                   ioc->name, __func__,
> -                                   mpi_request->ExtPageType, p[6]);
> +                               panic("%s: %s: Firmware BUG: config page mismatch: Requested ExtPageType(0x%02x) Reply ExtPageType(0x%02x)\n",
> +                                     ioc->name, __func__,
> +                                     mpi_request->ExtPageType, p[6]);
>                         }
>                 }
>                 memcpy(config_page, mem.page, min_t(u16, mem.sz,
> --
> 2.15.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ