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]
Message-ID: <CAHp75VcTZRdNOdgjekCMxu-GvSCiw669SnEdyL=hO0SHLkZL2g@mail.gmail.com>
Date:   Wed, 28 Jun 2023 16:51:02 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Mukesh Ojha <quic_mojha@...cinc.com>
Cc:     corbet@....net, agross@...nel.org, andersson@...nel.org,
        konrad.dybcio@...aro.org, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
        keescook@...omium.org, tony.luck@...el.com, gpiccoli@...lia.com,
        mathieu.poirier@...aro.org, catalin.marinas@....com,
        will@...nel.org, linus.walleij@...aro.org,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
        linux-hardening@...r.kernel.org, linux-remoteproc@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-gpio@...r.kernel.org
Subject: Re: [PATCH v4 05/21] soc: qcom: Add linux minidump smem backend
 driver support

On Wed, Jun 28, 2023 at 3:35 PM Mukesh Ojha <quic_mojha@...cinc.com> wrote:
>
> Add shared memory based minidump backend driver and hook it
> with minidump core (qcom_minidump) by registering SMEM as
> backend device.

...

>         help
>           Enablement of core minidump feature is controlled from boot firmware
> -         side, and this config allow linux to query minidump segments associated
> -         with the remote processor and check its validity.
> +         side, and this config allow linux to query and manages minidump

allows
Linux

> +         table for remote processors as well as APSS.
> +
> +         This config should be enabled if the low level minidump is implemented
> +         as part of SMEM.

...

> +#include <linux/io.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
> -#include <linux/io.h>

Yeah, the result of wrong order in the initial commit. Can you fix it there?

...

> -#define MINIDUMP_SS_ENCR_DONE  ('D' << 24 | 'O' << 16 | 'N' << 8 | 'E' << 0)
> -#define MINIDUMP_SS_ENABLED    ('E' << 24 | 'N' << 16 | 'B' << 8 | 'L' << 0)
> +
> +#define MINIDUMP_REGION_VALID     ('V' << 24 | 'A' << 16 | 'L' << 8 | 'I' << 0)
> +#define MINIDUMP_REGION_INVALID           ('I' << 24 | 'N' << 16 | 'V' << 8 | 'A' << 0)
> +#define MINIDUMP_REGION_INIT      ('I' << 24 | 'N' << 16 | 'I' << 8 | 'T' << 0)
> +#define MINIDUMP_REGION_NOINIT    0
> +
> +#define MINIDUMP_SS_ENCR_REQ      (0 << 24 | 'Y' << 16 | 'E' << 8 | 'S' << 0)
> +#define MINIDUMP_SS_ENCR_NOTREQ           (0 << 24 | 0 << 16 | 'N' << 8 | 'R' << 0)
> +#define MINIDUMP_SS_ENCR_START    ('S' << 24 | 'T' << 16 | 'R' << 8 | 'T' << 0)
> +#define MINIDUMP_SS_ENCR_DONE     ('D' << 24 | 'O' << 16 | 'N' << 8 | 'E' << 0)
> +#define MINIDUMP_SS_ENABLED       ('E' << 24 | 'N' << 16 | 'B' << 8 | 'L' << 0)

For all these, please use format like

#define MINIDUMP_SS_ENCR_START    0x.... // STRT

...

> +static int smem_md_table_exit(struct minidump *md)
> +{
> +       struct minidump_ss_data *mdss_data;
> +
> +       mdss_data = md->apss_data;
> +       memset(mdss_data->md_ss_toc,
> +              cpu_to_le32(0), sizeof(struct minidump_subsystem));

Do you need cpu_to_le32() here?
Can this be on one line?

> +       return 0;
> +}

...

> +

Unnecessary blank line.

> +module_platform_driver(qcom_minidump_smem_driver);

...

> +       smem->minidump = platform_device_register_data(&pdev->dev, "qcom-minidump-smem",
> +                                                     PLATFORM_DEVID_NONE, NULL,
> +                                                     0);

Why can't room on the previous line be used?

> +       if (IS_ERR(smem->minidump))
> +               dev_dbg(&pdev->dev, "failed to register minidump device\n");

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ