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:	Sat, 01 Mar 2008 21:15:19 -0800
From:	"Andrew G. Morgan" <morgan@...nel.org>
To:	Christoph Hellwig <hch@...radead.org>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] cleanup: correct tabbing of check_kill_permission()

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Christoph,

I ran it through scripts/checkpatch.pl - it said it was ok - and I see
that other places in this file contain code of this style -
do_sigaltstack() for example.

Could you give me a reference for "completely right"? Its not obvious to
me that Documentation/CodingStyle is what you are using as a reference.

Thanks

Andrew

Christoph Hellwig wrote:
| On Sat, Mar 01, 2008 at 02:32:38PM -0800, Andrew G. Morgan wrote:
|> +	if (info == SEND_SIG_NOINFO
|> +	    || (!is_si_special(info) && SI_FROMUSER(info))) {
|> +		 /* Let audit system see the signal */
|> +		error = audit_signal_info(sig, t);
|>  		if (error)
|>  			return error;
|>  		error = -EPERM;
|> -		if (((sig != SIGCONT) ||
|> -			(task_session_nr(current) != task_session_nr(t)))
|> +		if (((sig != SIGCONT)
|> +		     || (task_session_nr(current) != task_session_nr(t)))
|>  		    && (current->euid ^ t->suid) && (current->euid ^ t->uid)
|>  		    && (current->uid ^ t->suid) && (current->uid ^ t->uid)
|>  		    && !capable(CAP_KILL))
|> -		return error;
|> +			return error;
|
| If you start reformmating it please get it completely right:
|
| 	if (info == SEND_SIG_NOINFO ||
| 	    (!is_si_special(info) && SI_FROMUSER(info))) {
| 		/* Let audit system see the signal */
| 		error = audit_signal_info(sig, t);
|  		if (error)
|  			return error;
|  		error = -EPERM;
| 		if ((sig != SIGCONT ||
| 		     (task_session_nr(current) != task_session_nr(t))) &&
| 		    (current->euid ^ t->suid) && (current->euid ^ t->uid) &&
| 		    (current->uid ^ t->suid) && (current->uid ^ t->uid) &&
| 		    !capable(CAP_KILL))
| 			return error;
|  	}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFHyjfn+bHCR3gb8jsRAuilAJ9QJKsEQz66UrFtLOCcHVokGcVV7wCeP0HE
ftOI2APLX1YpWiznyhLfN6U=
=HGa0
-----END PGP SIGNATURE-----
--
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