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: <BYAPR07MB53814D13CAF0AC674AD00317DDA09@BYAPR07MB5381.namprd07.prod.outlook.com>
Date:   Thu, 16 Feb 2023 11:36:14 +0000
From:   Pawel Laszczak <pawell@...ence.com>
To:     Greg KH <gregkh@...uxfoundation.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "Daisy.Barrera@...iusxm.com" <Daisy.Barrera@...iusxm.com>,
        "Cliff.Holden@...iusxm.com" <Cliff.Holden@...iusxm.com>,
        "arnd@...db.de" <arnd@...db.de>,
        "tony@...mide.com" <tony@...mide.com>,
        "jdelvare@...e.de" <jdelvare@...e.de>,
        "neal_liu@...eedtech.com" <neal_liu@...eedtech.com>,
        "linus.walleij@...aro.org" <linus.walleij@...aro.org>,
        "egtvedt@...fundet.no" <egtvedt@...fundet.no>,
        "biju.das.jz@...renesas.com" <biju.das.jz@...renesas.com>,
        "herve.codina@...tlin.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?
>

Yes, driver reference them only in trace callback.
The big function are used only once in code, so it seems reasonable to use them as inline.
I don't know how they will be used by compiler. 

Thanks,

Pawel Laszczak

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ