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]
Date:   Tue, 12 Mar 2019 18:34:35 +0900
From:   Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To:     Petr Mladek <pmladek@...e.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        "Ahmed S. Darwish" <darwish.07@...il.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        John Ogness <john.ogness@...utronix.de>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] printk: kmsg_dump: Mark registered flag as private

On (03/12/19 10:18), Petr Mladek wrote:
> > >   * @max_reason:	filter for highest reason number that should be dumped
> > > - * @registered:	Flag that specifies if this is already registered
> > > + * @registered:	Flag that specifies if this is already registered (private)
> > >   */
> > >  struct kmsg_dumper {
> > >  	struct list_head list;
> > 
[..]
> This is another field in the same structure. There are 4 other fields
> that are described as private by extra comment. Thefore this patch
> might make it more consistent.

Well, no objections from my side. At the same time nothing in kmsg_dump.h
suggests that "(private)" stands for "protected by logbuf_lock". Even more,
that struct has another "private" members, which are protected by
logbuf_lock - cur_idx, next_idx, cur_srq, next_seq; except when they are
not (see kmsg_dump_get_line_nolock() and other _nolock() functions). So
"private" has conflicting meanings.

struct kmsg_dumper {
	struct list_head list;
	void (*dump)(struct kmsg_dumper *dumper, enum kmsg_dump_reason reason);
	enum kmsg_dump_reason max_reason;
	bool active;
	bool registered;

	/* private state of the kmsg iterator */
	u32 cur_idx;
	u32 next_idx;
	u64 cur_seq;
	u64 next_seq;
};

> 
> Well, I am not sure if it is worth it. Andrew?
> 

Agreed.

	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ