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:	Thu, 24 May 2007 12:28:10 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Cyrill Gorcunov <gorcunov@...il.com>
Cc:	Pekka Enberg <penberg@...helsinki.fi>, Jan Kara <jack@...e.cz>,
	Christoph Hellwig <hch@...radead.org>,
	Ben Fennema <bfennema@...con.csc.calpoly.edu>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH]: UDF code style conversion to kernel style

On Thu, 24 May 2007 23:06:06 +0400
Cyrill Gorcunov <gorcunov@...il.com> wrote:

> [Pekka Enberg - Thu, May 24, 2007 at 09:47:42PM +0300]
> | Hi Cyrill,
> | 
> | On 5/23/07, Cyrill Gorcunov <gorcunov@...il.com> wrote:
> | >@@ -2103,7 +1944,7 @@ long udf_block_map(struct inode *inode, sector_t 
> | >block)
> | > 	kernel_lb_addr eloc;
> | > 	uint32_t elen;
> | > 	sector_t offset;
> | >-	struct extent_position epos = { NULL, 0, { 0, 0}};
> | >+	struct extent_position epos = {};
> | 
> | Bits like these in the middle of indentation fixes makes me feel
> | uneasy. Could we simply ask Andrew to run Lindent on the UDF sources
> | at some convinient point and push those to Linus like we did with
> | mm/slab.c if I recall correctly? Its safer to do cleanups like these
> | after that.
> | 
> 
> Dunno... Pekka, the patch I sent also added empty lines to separate
> some code block to be convenient to read. For some parts of code
> additinal 'if...else..' braces were added. Anyway even the code being
> formatted by linednt is to be reviewed manually I think. Anyway, your
> word Andrew?
> 

Such a patch should be whitespace-only: ideally it should generate an
identical .o file.  There may be legitimate reasons why the .o file
isn't identical, but we'd need to understand why that happened.  

The way to do this is as two patches (or two-per-C file):

1: feed foo.c through Lindent

2: manual fixups for places where Lindent went wrong.


<fiddles a bit>

OK, so I did

make kernel/sched.s
Lindent kernel/sched.c
make kernel/sched.s

and compared the two sched.s's:

--- kernel/sched.s      2007-05-24 12:25:40.000000000 -0700
+++ /tmp/sched.s        2007-05-24 12:25:16.000000000 -0700
@@ -1713,7 +1713,7 @@
        1:      ud2
 .pushsection __bug_table,"a"
 2:     .long 1b, .LC8  #
-       .word 4306, 0   #
+       .word 4308, 0   #
        .org 2b+12      #
 .popsection
 #NO_APP
@@ -1730,7 +1730,7 @@
        1:      ud2
 .pushsection __bug_table,"a"
 2:     .long 1b, .LC8  #
-       .word 4274, 0   #
+       .word 4276, 0   #
        .org 2b+12      #
 .popsection
 #NO_APP
@@ -2441,7 +2441,7 @@
 .L522:
        movl    $__func__.24446, %eax   #,
        movl    %eax, 12(%esp)  #,
-       movl    $1921, %eax     #,
+       movl    $1920, %eax     #,
        movl    %eax, 8(%esp)   #,
        movl    $.LC8, %eax     #,
        movl    %eax, 4(%esp)   #,
@@ -3855,7 +3855,7 @@
        1:      ud2
 .pushsection __bug_table,"a"
 2:     .long 1b, .LC8  #
-       .word 4078, 0   #
+       .word 4082, 0   #
        .org 2b+12      #
 .popsection
 #NO_APP


those differences are all due to changed line numbers, so we know that this
was a safe change.


-
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