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:   Fri, 22 Dec 2017 19:37:03 +0530
From:   Harsh Shandilya <msfjarvis@...il.com>
To:     devel@...verdev.osuosl.org
Cc:     Harsh Shandilya <harsh@...kt.io>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Arve Hjønnevåg <arve@...roid.com>,
        Todd Kjos <tkjos@...roid.com>,
        Martijn Coenen <maco@...roid.com>, linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] drivers: android: Fix logtags in methods

From: Harsh Shandilya <harsh@...kt.io>

Several methods in the driver were hardcoding
the function name in their logging calls which
is a checkpatch violation. Utilise the __func__
macro to avoid needing to add the function name
as is to the string.

Test: logtags in dmesg remain unaffected before
and after the patch.

Signed-off-by: Harsh Shandilya <harsh@...kt.io>

Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: "Arve Hjønnevåg" <arve@...roid.com>
Cc: Todd Kjos <tkjos@...roid.com>
Cc: Martijn Coenen <maco@...roid.com>
Cc: devel@...verdev.osuosl.org
Cc: linux-kernel@...r.kernel.org
---
 drivers/android/binder.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index ffb31dd9191a..1e48acfe27b7 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -4467,8 +4467,8 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 	unsigned int size = _IOC_SIZE(cmd);
 	void __user *ubuf = (void __user *)arg;
 
-	/*pr_info("binder_ioctl: %d:%d %x %lx\n",
-			proc->pid, current->pid, cmd, arg);*/
+	// pr_info("%s: %d:%d %x %lx\n",
+	//		__func__, proc->pid, current->pid, cmd, arg);
 
 	binder_selftest_alloc(&proc->alloc);
 
@@ -4631,8 +4631,9 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma)
 	return 0;
 
 err_bad_arg:
-	pr_err("binder_mmap: %d %lx-%lx %s failed %d\n",
-	       proc->pid, vma->vm_start, vma->vm_end, failure_string, ret);
+	pr_err("%s: %d %lx-%lx %s failed %d\n",
+		__func__, proc->pid, vma->vm_start, vma->vm_end,
+		failure_string, ret);
 	return ret;
 }
 
@@ -4641,8 +4642,8 @@ static int binder_open(struct inode *nodp, struct file *filp)
 	struct binder_proc *proc;
 	struct binder_device *binder_dev;
 
-	binder_debug(BINDER_DEBUG_OPEN_CLOSE, "binder_open: %d:%d\n",
-		     current->group_leader->pid, current->pid);
+	binder_debug(BINDER_DEBUG_OPEN_CLOSE, "%s: %d:%d\n",
+			__func__, current->group_leader->pid, current->pid);
 
 	proc = kzalloc(sizeof(*proc), GFP_KERNEL);
 	if (proc == NULL)
-- 
2.15.0.631.g7ddcec0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ