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: <20220319013536.v2syx2ru7ijuvw23@treble>
Date:   Fri, 18 Mar 2022 18:35:36 -0700
From:   Josh Poimboeuf <jpoimboe@...hat.com>
To:     Sathvika Vasireddy <sv@...ux.ibm.com>
Cc:     linuxppc-dev@...ts.ozlabs.org, peterz@...radead.org,
        linux-kernel@...r.kernel.org, aik@...abs.ru, mpe@...erman.id.au,
        rostedt@...dmis.org, naveen.n.rao@...ux.vnet.ibm.com
Subject: Re: [RFC PATCH 0/3] objtool: Add mcount sub-command

On Fri, Mar 18, 2022 at 04:21:37PM +0530, Sathvika Vasireddy wrote:
> This patchset adds support to implement 'objtool mcount' command.
> 
> Right now, objtool is built if CONFIG_STACK_VALIDATION is enabled.
> And, '__mcount_loc' section is generated by objtool when --mcount 
> option is passed to check sub-command. 
> 
> For architectures to be able to generate '__mcount_loc' section
> without having to do stack validation, introduce 'mcount' as
> a sub-command to objtool. This way, objtool is built for mcount 
> if CONFIG_FTRACE_MCOUNT_USE_OBJTOOL is enabled. Additionally, 
> architectures can select HAVE_NOP_MCOUNT to be able to nop out
> mcount call sites.  
> 
> TODO: Enable "objtool mcount" for clang LTO builds.
> 
> Sathvika Vasireddy (3):
>   objtool: Move common code to utils.c
>   objtool: Enable and implement 'mcount' subcommand
>   objtool/mcount: Add powerpc specific functions

Hi Sathvika,

Thanks for the patches!

I have some other patches in progress which will rework the objtool
interface by modularizing the cmdline options, so that each option can
be specified either individually or in combination.  Even stack
validation itself will be its own separate option.

I think it will help your situation as well: "objtool run --mcount" will
only do '__mcount_loc' generation and nothing else.

Something like so:

$ ./objtool run --help

 Usage: objtool run [<options>] file.o

Commands (at least one required):
    -a, --uaccess         validate uaccess
    -c, --static-call     annotate static calls
    -i, --ibt             validate and annotate IBT
    -m, --mcount          generate '__mcount_loc' section
    -n, --noinstr         validate noinstr
    -o, --orc             generate ORC metadata
    -r, --retpoline       validate retpoline usage
    -S, --sls             validate straight-line-speculation mitigation
    -s, --stack-val       validate stack metadata

Options:
        --backtrace       unwind on error
        --backup          create .orig files before modification
        --dry-run         don't write the modifications
        --fp              object uses frame pointers
        --module          object will be part of a kernel module
        --no-unreachable  skip 'unreachable instruction' warnings
        --stats           print statistics
        --vmlinux         object is vmlinux.o


Hopefully I'll have the patches ready soon.

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ