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: <20161123150435.GA30459@sasha-lappy>
Date:   Wed, 23 Nov 2016 15:04:27 +0000
From:   alexander.levin@...izon.com
To:     Dmitry Vyukov <dvyukov@...gle.com>
CC:     Steven Rostedt <rostedt@...dmis.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "scientist@...com" <scientist@...com>,
        "glider@...gle.com" <glider@...gle.com>,
        "andreyknvl@...gle.com" <andreyknvl@...gle.com>,
        "arnd@...db.de" <arnd@...db.de>,
        "mathieu.desnoyers@...icios.com" <mathieu.desnoyers@...icios.com>,
        "daniel.vetter@...ll.ch" <daniel.vetter@...ll.ch>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC 2/3] abi_spec: hooks into syscall to allow pre and post
 checking

On Mon, Nov 21, 2016 at 04:57:02PM +0100, Dmitry Vyukov wrote:
> On Mon, Nov 21, 2016 at 4:54 PM, Steven Rostedt <rostedt@...dmis.org> wrote:
> > On Wed, 16 Nov 2016 17:37:01 +0000
> > alexander.levin@...izon.com wrote:
> >>  #define __SYSCALL_DEFINEx(x, name, ...)                                      \
> >> +     extern const struct syscall_spec syscall_spec##name;            \
> >>       asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))       \
> >>               __attribute__((alias(__stringify(SyS##name))));         \
> >>       static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__));  \
> >>       asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__));      \
> >>       asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))       \
> >>       {                                                               \
> >> -             long ret = SYSC##name(__MAP(x,__SC_CAST,__VA_ARGS__));  \
> >> +             long ret;                                               \
> >> +             abispec_check_pre(&syscall_spec##name, __MAP(x,__SC_CAST,__VA_ARGS__)); \
> >> +             ret = SYSC##name(__MAP(x,__SC_CAST,__VA_ARGS__));       \
> >> +             abispec_check_post(&syscall_spec##name, ret, __MAP(x,__SC_CAST,__VA_ARGS__)); \
> >
> > Do you want this for DEFINE0() too? Or does this not care about system
> > calls with no arguments?
> 
> This should care about syscalls without args:
>  - we still may want to check return values
>  - something like debug tracing would like to print them
>  - there may also be some side effects (or absence of side effects)
> that we may want to check

Yes, agreed, I just missed that detail in my implementation.

-- 

Thanks,
Sasha

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ