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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 28 Aug 2019 16:03:38 +0200
From:   John Ogness <john.ogness@...utronix.de>
To:     Petr Mladek <pmladek@...e.com>
Cc:     Andrea Parri <andrea.parri@...rulasolutions.com>,
        Andrea Parri <parri.andrea@...il.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Brendan Higgins <brendanhiggins@...gle.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org
Subject: Re: numlist API Re: [RFC PATCH v4 1/9] printk-rb: add a new printk ringbuffer implementation

On 2019-08-28, Petr Mladek <pmladek@...e.com> wrote:
> I only think that, especially, numlist API is too generic in v4.
> It is not selfcontained. The consistency depends on external barriers.
>
> I believe that it might become fully self-contained and consistent
> if we reduce possibilities of the generic usage. In particular,
> the numlist should allow only linking of reusable structures
> stored in an array.

OK. I will make the numlist the master of the ID-to-node mapping. To
implement the getdesc() callback of the dataring, the printk_ringbuffer
can call a numlist mapping function. Also, numlist will need to provide
a function to bump the descriptor version (as your previous idea already
showed).

I plan to change the array to be numlist nodes. The ID would move into
the numlist node structure and a void-pointer private would be added so
that the numlist user can add private data (for printk_ringbuffer that
would just be a pointer to the dataring structure). When the
printk_ringbuffer gets a never-used numlist node, it can set the private
field.

This has the added benefit of making it easy to detect accidental
never-used descriptor usage when reading dataring garbage. This was
non-trivial and I'm still not sure I solved it correctly. (I've already
spent a week working on a definitive answer to your email[0] asking
about this.)

John Ogness

[0] https://lkml.kernel.org/r/20190820151239.yzdqz56yeldlknln@pathway.suse.cz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ