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]
Message-ID: <2410594.BZ40g7jear@bentobox>
Date:	Tue, 02 Aug 2016 15:38:00 +0200
From:	Sven Eckelmann <sven@...fation.org>
To:	b.a.t.m.a.n@...ts.open-mesh.org
Cc:	Baole Ni <baolex.ni@...el.com>, mareklindner@...mailbox.ch,
	sw@...onwunderlich.de, a@...table.cc, davem@...emloft.net,
	jiangshanlai@...il.com, m.chehab@...sung.com,
	gregkh@...uxfoundation.org, m.szyprowski@...sung.com,
	kyungmin.park@...sung.com, k.kozlowski@...sung.com,
	aarcange@...hat.com, mhocko@...e.com, gang.chen.5i5j@...il.com,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	aryabinin@...tuozzo.com, chuansheng.liu@...el.com, koct9i@...il.com
Subject: Re: [B.A.T.M.A.N.] [PATCH 1086/1285] Replace numeric parameter like 0444 with macro

On Dienstag, 2. August 2016 20:15:13 CEST Baole Ni wrote:
[...]
> diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
> index 5f2974b..25759b9 100644
> --- a/net/batman-adv/main.c
> +++ b/net/batman-adv/main.c
> @@ -1313,7 +1313,7 @@ static struct kparam_string batadv_param_string_ra = {
>  };
>  
>  module_param_cb(routing_algo, &batadv_param_ops_ra, &batadv_param_string_ra,
> -		0644);
> +		S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
>  module_init(batadv_init);
>  module_exit(batadv_exit);

Doesn't seem to apply on current net-next:

    $ git am -3 16577.patch
    Applying: Replace numeric parameter like 0444 with macro
    Using index info to reconstruct a base tree...
    M       net/batman-adv/main.c
    Falling back to patching base and 3-way merge...
    Auto-merging net/batman-adv/main.c
    CONFLICT (content): Merge conflict in net/batman-adv/main.c
    error: Failed to merge in the changes.
    Patch failed at 0001 Replace numeric parameter like 0444 with macro
    The copy of the patch that failed is found in: .git/rebase-apply/patch
    When you have resolved this problem, run "git am --continue".
    If you prefer to skip this patch, run "git am --skip" instead.
    To restore the original branch and stop patching, run "git am --abort".

The code for it can now be found at net/batman-adv/bat_algo.c

Also the prefix "batman-adv: " is missing in the subject and you should
include <linux/stat.h> in net/batman-adv/bat_algo.c to make sure that these
macros are actually defined before you use them.

So you would end up with something more like:

--- a/net/batman-adv/bat_algo.c
+++ b/net/batman-adv/bat_algo.c
@@ -22,6 +22,7 @@
 #include <linux/moduleparam.h>
 #include <linux/printk.h>
 #include <linux/seq_file.h>
+#include <linux/stat.h>
 #include <linux/stddef.h>
 #include <linux/string.h>
 
@@ -137,4 +138,4 @@ static struct kparam_string batadv_param_string_ra = {
 };
 
 module_param_cb(routing_algo, &batadv_param_ops_ra, &batadv_param_string_ra,
-		0644);
+		S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);

Kind regards,
	Sven
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ