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] [day] [month] [year] [list]
Date:	Sat, 5 Dec 2015 13:19:10 -0800
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Josh Triplett <josh@...htriplett.org>
Cc:	linux-kernel@...r.kernel.org, mingo@...nel.org,
	jiangshanlai@...il.com, dipankar@...ibm.com,
	akpm@...ux-foundation.org, mathieu.desnoyers@...icios.com,
	tglx@...utronix.de, peterz@...radead.org, rostedt@...dmis.org,
	dhowells@...hat.com, edumazet@...gle.com, dvhart@...ux.intel.com,
	fweisbec@...il.com, oleg@...hat.com, bobby.prani@...il.com
Subject: Re: [PATCH tip/core/rcu 1/8] documentation: Record RCU requirements

On Fri, Dec 04, 2015 at 05:56:01PM -0800, Paul E. McKenney wrote:
> On Fri, Dec 04, 2015 at 04:38:42PM -0800, Josh Triplett wrote:

[ . . . ]

> > Because you don't want to complicate the script, or because you don't
> > want to accidentally edit the wrong version?  (Note that a carefully
> > written script would mean it doesn't matter which version you edit.)
> 
> I prefer the simpler script.
> 
> > A third alternative would be to include the answers inline right after
> > the questions, and optionally add a tiny bit of JavaScript that hides
> > them by default and lets you click to show the answer. :)
> 
> That does have some advantages.  I would welcome a patch that added
> the JavaScript.

And I did try a CSS approach with this CSS definition:

	<style media="screen" type="text/css">
	.quick-quiz-wrap {
		position: relative;
	}
	.quick-quiz-wrap .quick-quiz-content {
		display: none;
		position: absolute;
		bottom: -10px;
		left: 10px;
		right: 10px;
		background-color: lightgrey;
		padding: 20px;
	}
	.quick-quiz-wrap:hover .quick-quiz-content {
		display: block;
	}
	</style>

I linked to this as follows:

	<link rel="stylesheet" type="text/css" href="../quick-quiz.css" media="screen">

And used it like this:

	<p><b>Quick Quiz:</b>
	Wait a minute!
	You said that updaters can make useful forward progress concurrently
	with readers, but pre-existing readers will block
	<tt>synchronize_rcu()</tt>!!!
	Just who are you trying to fool???
	</p>

	<div class="quick-quiz-wrap">
		<b>Quick Quiz Answer</b>
		<div class="quick-quiz-content">
			<p>First, if updaters do not wish to be blocked
			by readers, they can use <tt>call_rcu()</tt> or
			<tt>kfree_rcu()</tt>, which will be discussed later.
			Second, even when using <tt>synchronize_rcu()</tt>,
			the other update-side code does run concurrently with
			readers, whether pre-existing or not.
		</div> 
	</div>

This proved fragile.  It worked in trivial cases, but with non-trivial
content in a non-trivial document, it refused to show anything on mouse
hover.  Even in trivial cases, it sometimes made strange choices on
where to display the text.  At this point, I drop back to the old-school
scripted approach.  It has the advantage of working consistently and
providing good user experience, with the HTML unconditionally present. ;-)

							Thanx, Paul

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ