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: <835997d71ae1b68f2eb9f1617dce126f75783aae.camel@codeconstruct.com.au>
Date: Thu, 04 Jul 2024 17:40:59 +0800
From: Jeremy Kerr <jk@...econstruct.com.au>
To: admiyo@...amperecomputing.com, Sudeep Holla <sudeep.holla@....com>, 
 Jassi Brar <jassisinghbrar@...il.com>, Robert Moore
 <robert.moore@...el.com>, "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
 Len Brown <lenb@...nel.org>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org, Matt Johnston
 <matt@...econstruct.com.au>, "David S . Miller" <davem@...emloft.net>, Eric
 Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo
 Abeni <pabeni@...hat.com>,  Jonathan Cameron <Jonathan.Cameron@...wei.com>,
 Huisong Li <lihuisong@...wei.com>
Subject: Re: [PATCH v4 1/3] mctp pcc: Check before sending MCTP PCC response
 ACK

Hi Adam,

> +static void check_and_ack(struct pcc_chan_info *pchan, struct mbox_chan *chan)
> +{
> +       struct pcc_extended_type_hdr pcc_hdr;
> +
> +       if (pchan->type != ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE)
> +               return;
> +       memcpy_fromio(&pcc_hdr, pchan->shmem_base_addr,
> +                     sizeof(struct pcc_extended_type_hdr));
> +       /*
> +        * The PCC slave subspace channel needs to set the command complete bit
> +        * and ring doorbell after processing message.
> +        *
> +        * The PCC master subspace channel clears chan_in_use to free channel.
> +        */
> +       if (!!le32_to_cpup(&pcc_hdr.flags) & PCC_ACK_FLAG_MASK)

This should be:

       if (!!(le32_to_cpup(&pcc_hdr.flags) & PCC_ACK_FLAG_MASK))

- otherwise you're bitwise testing the result of the '!!'.

Cheers,


Jeremy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ