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: <Y+4SCXeMUgQhpADE@kroah.com>
Date:   Thu, 16 Feb 2023 12:22:49 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Pawel Laszczak <pawell@...ence.com>
Cc:     linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
        Daisy.Barrera@...iusxm.com, Cliff.Holden@...iusxm.com,
        arnd@...db.de, tony@...mide.com, jdelvare@...e.de,
        neal_liu@...eedtech.com, linus.walleij@...aro.org,
        egtvedt@...fundet.no, biju.das.jz@...renesas.com,
        herve.codina@...tlin.com
Subject: Re: [PATCH 3/4] usb: cdns2: Add tracepoints for CDNS2 driver

On Thu, Feb 16, 2023 at 05:54:10AM -0500, Pawel Laszczak wrote:
> Patch adds the series of tracepoints that can be used for
> debugging issues detected in driver.
> 
> Signed-off-by: Pawel Laszczak <pawell@...ence.com>
> ---
>  drivers/usb/gadget/udc/cdns2/Makefile       |   2 +
>  drivers/usb/gadget/udc/cdns2/cdns2-debug.h  | 200 +++++++
>  drivers/usb/gadget/udc/cdns2/cdns2-ep0.c    |  26 +-
>  drivers/usb/gadget/udc/cdns2/cdns2-gadget.c |  52 +-
>  drivers/usb/gadget/udc/cdns2/cdns2-trace.c  |  11 +
>  drivers/usb/gadget/udc/cdns2/cdns2-trace.h  | 609 ++++++++++++++++++++
>  6 files changed, 897 insertions(+), 3 deletions(-)
>  create mode 100644 drivers/usb/gadget/udc/cdns2/cdns2-debug.h
>  create mode 100644 drivers/usb/gadget/udc/cdns2/cdns2-trace.c
>  create mode 100644 drivers/usb/gadget/udc/cdns2/cdns2-trace.h
> 
> diff --git a/drivers/usb/gadget/udc/cdns2/Makefile b/drivers/usb/gadget/udc/cdns2/Makefile
> index 7c746e6d53c2..a1ffbbe2e768 100644
> --- a/drivers/usb/gadget/udc/cdns2/Makefile
> +++ b/drivers/usb/gadget/udc/cdns2/Makefile
> @@ -1,5 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0
>  # define_trace.h needs to know how to find our header
> +CFLAGS_cdns2-trace.o		:= -I$(src)
>  
>  obj-$(CONFIG_USB_CDNS2_UDC)		+= cdns2-udc-pci.o
>  cdns2-udc-pci-$(CONFIG_USB_CDNS2_UDC)	+= cdns2-pci.o cdns2-gadget.o cdns2-ep0.o
> +cdns2-udc-pci-$(CONFIG_TRACING)	+= cdns2-trace.o
> diff --git a/drivers/usb/gadget/udc/cdns2/cdns2-debug.h b/drivers/usb/gadget/udc/cdns2/cdns2-debug.h
> new file mode 100644
> index 000000000000..3a80f3fbdcd3
> --- /dev/null
> +++ b/drivers/usb/gadget/udc/cdns2/cdns2-debug.h
> @@ -0,0 +1,200 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * Cadence USBHS-DEV Driver.
> + * Debug header file.
> + *
> + * Copyright (C) 2023 Cadence.
> + *
> + * Author: Pawel Laszczak <pawell@...ence.com>
> + */
> +
> +#ifndef __LINUX_CDNS2_DEBUG
> +#define __LINUX_CDNS2_DEBUG
> +
> +static inline const char *cdns2_decode_usb_irq(char *str, size_t size,
> +					       u8 usb_irq, u8 ext_irq)

<snip>

Why are all of these big functions declared as inline?  Do they really
work as inline functions if you only reference them in a trace callback?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ