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  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]
Date:   Wed, 9 Jun 2021 15:44:34 +0200
From:   Daniel Bristot de Oliveira <bristot@...hat.com>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     linux-kernel@...r.kernel.org, Phil Auld <pauld@...hat.com>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Kate Carcia <kcarcia@...hat.com>,
        Jonathan Corbet <corbet@....net>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Alexandre Chartre <alexandre.chartre@...cle.com>,
        Clark Willaims <williams@...hat.com>,
        John Kacur <jkacur@...hat.com>,
        Juri Lelli <juri.lelli@...hat.com>, linux-doc@...r.kernel.org
Subject: Re: [PATCH V3 8/9] tracing: Add osnoise tracer

On 6/9/21 3:03 PM, Steven Rostedt wrote:
> On Wed, 9 Jun 2021 14:14:17 +0200
> Daniel Bristot de Oliveira <bristot@...hat.com> wrote:
> 
>> On 6/4/21 11:28 PM, Steven Rostedt wrote:
>>>> +#ifdef CONFIG_X86_LOCAL_APIC  
>>> I wonder if we should move this into a separate file, making the
>>> __trace_irq_entry() a more name space safe name and have it call that.
>>> I have a bit of a distaste for arch specific code in a generic file.
>>>   
>>
>> I am placing the intel specific file in:
>>
>> arch/x86/kernel/trace_osnoise.c
> 
> I would make it just arch/x86/kernel/trace.c

moved!

> so that it can hold all arch specific tracing information, and not need
> to create a file for anything else we might need later.
> 
>>
>> and the kernel/trace/trace_osnoise.h looks like this:
>>
>> #ifdef CONFIG_X86_LOCAL_APIC
>> int osnoise_arch_register(void);
>> int osnoise_arch_unregister(void);
>> #else /* CONFIG_X86_LOCAL_APIC */
>> #define osnoise_arch_register() do {} while (0)
>> #define osnoise_arch_unregister() do {} while (0)
>> #endif /* CONFIG_X86_LOCAL_APIC */
>>
>> This can be used by other archs as well...
>>
>> sound reasonable?
>>
> 
> The proper way to d that is to use weak functions in the C code in the
> generic file.
> 
> int __weak osnoise_arch_register(void)
> {
> 	return 0;
> }
> 
> int __weak osnoise_arch_unregister(void)
> {
> 	return 0;
> }
> 
> Hmm, does the unregister really need a return value?

it was always returning 0, changed it to void.

-- Daniel

Powered by blists - more mailing lists