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] [day] [month] [year] [list]
Date:   Tue, 28 Mar 2023 20:37:51 +0200
From:   Simon Horman <simon.horman@...igine.com>
To:     Manish Mandlik <mmandlik@...gle.com>
Cc:     marcel@...tmann.org, luiz.dentz@...il.com,
        chromeos-bluetooth-upstreaming@...omium.org,
        linux-bluetooth@...r.kernel.org,
        Abhishek Pandit-Subedi <abhishekpandit@...omium.org>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Johan Hedberg <johan.hedberg@...il.com>,
        Paolo Abeni <pabeni@...hat.com>, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH v9 1/4] Bluetooth: Add support for hci devcoredump

On Mon, Mar 27, 2023 at 06:18:54PM -0700, Manish Mandlik wrote:
> From: Abhishek Pandit-Subedi <abhishekpandit@...omium.org>
> 
> Add devcoredump APIs to hci core so that drivers only have to provide
> the dump skbs instead of managing the synchronization and timeouts.
> 
> The devcoredump APIs should be used in the following manner:
>  - hci_devcoredump_init is called to allocate the dump.
>  - hci_devcoredump_append is called to append any skbs with dump data
>    OR hci_devcoredump_append_pattern is called to insert a pattern.
>  - hci_devcoredump_complete is called when all dump packets have been
>    sent OR hci_devcoredump_abort is called to indicate an error and
>    cancel an ongoing dump collection.
> 
> The high level APIs just prepare some skbs with the appropriate data and
> queue it for the dump to process. Packets part of the crashdump can be
> intercepted in the driver in interrupt context and forwarded directly to
> the devcoredump APIs.
> 
> Internally, there are 5 states for the dump: idle, active, complete,
> abort and timeout. A devcoredump will only be in active state after it
> has been initialized. Once active, it accepts data to be appended,
> patterns to be inserted (i.e. memset) and a completion event or an abort
> event to generate a devcoredump. The timeout is initialized at the same
> time the dump is initialized (defaulting to 10s) and will be cleared
> either when the timeout occurs or the dump is complete or aborted.
> 
> Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@...omium.org>
> Signed-off-by: Manish Mandlik <mmandlik@...gle.com>
> Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@...omium.org>

As it looks like you'll need to respin [1]

[1] https://lore.kernel.org/oe-kbuild-all/202303281102.Wu5F8pYw-lkp@intel.com/

> +void hci_devcd_handle_pkt_pattern(struct hci_dev *hdev, struct sk_buff *skb)
> +{
> +	struct hci_devcoredump_skb_pattern *pattern;
> +
> +	if (hdev->dump.state != HCI_DEVCOREDUMP_ACTIVE) {
> +		DBG_UNEXPECTED_STATE();
> +		return;
> +	}
> +
> +	if (skb->len != sizeof(*pattern)) {
> +		bt_dev_dbg(hdev, "Invalid pattern skb");
> +		return;
> +	}
> +
> +	pattern = skb_pull_data(skb, sizeof(*pattern));;

nit: s/;;/;/


> +
> +	if (!hci_devcd_memset(hdev, pattern->pattern, pattern->len))
> +		bt_dev_dbg(hdev, "Failed to set pattern");
> +}

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ