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: <20141229143210.C9C685180445@grass.foxharp.boston.ma.us>
Date:	Mon, 29 Dec 2014 09:32:10 -0500
From:	Paul Fox <pgf@...top.org>
To:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
cc:	linux-kernel@...r.kernel.org, Andres Salomon <dilinger@...ued.net>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v1] OLPC: use %*ph specifier instead of passing direct values

change looks okay to me.
 Acked-by: Paul Fox <pgf@...top.org>

paul

andy wrote:
 > The %*ph specifier allows to dump small buffers in hex format. Let's use it
 > instead of passing direct values via stack.
 > 
 > Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
 > ---
 >  drivers/platform/olpc/olpc-ec.c | 13 +++++--------
 >  1 file changed, 5 insertions(+), 8 deletions(-)
 > 
 > diff --git a/drivers/platform/olpc/olpc-ec.c b/drivers/platform/olpc/olpc-ec.c
 > index f911952..f99b183 100644
 > --- a/drivers/platform/olpc/olpc-ec.c
 > +++ b/drivers/platform/olpc/olpc-ec.c
 > @@ -192,18 +192,15 @@ static ssize_t ec_dbgfs_cmd_write(struct file *file, const char __user *buf,
 >  	for (i = 0; i <= ec_cmd_bytes; i++)
 >  		ec_cmd[i] = ec_cmd_int[i];
 >  
 > -	pr_debug("olpc-ec: debugfs cmd 0x%02x with %d args %02x %02x %02x %02x %02x, want %d returns\n",
 > -			ec_cmd[0], ec_cmd_bytes, ec_cmd[1], ec_cmd[2],
 > -			ec_cmd[3], ec_cmd[4], ec_cmd[5], ec_dbgfs_resp_bytes);
 > +	pr_debug("olpc-ec: debugfs cmd 0x%02x with %d args %5ph, want %d returns\n",
 > +			ec_cmd[0], ec_cmd_bytes, ec_cmd + 1,
 > +			ec_dbgfs_resp_bytes);
 >  
 >  	olpc_ec_cmd(ec_cmd[0], (ec_cmd_bytes == 0) ? NULL : &ec_cmd[1],
 >  			ec_cmd_bytes, ec_dbgfs_resp, ec_dbgfs_resp_bytes);
 >  
 > -	pr_debug("olpc-ec: response %02x %02x %02x %02x %02x %02x %02x %02x (%d bytes expected)\n",
 > -			ec_dbgfs_resp[0], ec_dbgfs_resp[1], ec_dbgfs_resp[2],
 > -			ec_dbgfs_resp[3], ec_dbgfs_resp[4], ec_dbgfs_resp[5],
 > -			ec_dbgfs_resp[6], ec_dbgfs_resp[7],
 > -			ec_dbgfs_resp_bytes);
 > +	pr_debug("olpc-ec: response %8ph (%d bytes expected)\n",
 > +			ec_dbgfs_resp, ec_dbgfs_resp_bytes);
 >  
 >  out:
 >  	mutex_unlock(&ec_dbgfs_lock);
 > -- 
 > 2.1.3

=---------------------
 paul fox, pgf@...top.org
--
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