<div dir="ltr">I ran make defconfig, ran make allyesconfig, then make scripts and finally make M= net/ to build tehy subsytem alone and this is what it tells me ...<br><br>aruna@aruna-desktop:/media/kernel-dev/dev/linux-git$ make M=net/<br>
<br>  WARNING: Symbol version dump /media/kernel-dev/dev/linux-git/Module.symvers<br>           is missing; modules will have no dependencies and modversions.<br><br>  CC      net/socket.o<br>  CC      net/802/fddi.o<br>  LD      net/802/built-in.o<br>
  CC      net/core/sock.o<br>  CC      net/core/request_sock.o<br>  CC      net/core/skbuff.o<br>  CC      net/core/iovec.o<br>  CC      net/core/datagram.o<br>  CC      net/core/stream.o<br>  CC      net/core/scm.o<br>  CC      net/core/gen_stats.o<br>
  CC      net/core/gen_estimator.o<br>  CC      net/core/net_namespace.o<br>  CC      net/core/secure_seq.o<br>  CC      net/core/flow_dissector.o<br>  CC      net/core/sysctl_net_core.o<br>  CC      net/core/dev.o<br>  CC      net/core/ethtool.o<br>
  CC      net/core/dev_addr_lists.o<br>  CC      net/core/dst.o<br>  CC      net/core/netevent.o<br>  CC      net/core/neighbour.o<br>net/core/neighbour.c: In function ‘pneigh_enqueue’:<br>net/core/neighbour.c:1396: error: implicit declaration of function ‘NEIGH_VAR’<br>
net/core/neighbour.c:1396: error: ‘PROXY_DELAY’ undeclared (first use in this function)<br>net/core/neighbour.c:1396: error: (Each undeclared identifier is reported only once<br>net/core/neighbour.c:1396: error: for each function it appears in.)<br>
net/core/neighbour.c:1403: error: ‘PROXY_QLEN’ undeclared (first use in this function)<br>net/core/neighbour.c:1423: warning: ISO C90 forbids mixed declarations and code<br>net/core/neighbour.c:1423: warning: ‘__used__’ attribute ignored<br>
net/core/neighbour.c:1423: error: section attribute cannot be specified for local variables<br>net/core/neighbour.c:1427: error: invalid storage class for function ‘lookup_neigh_parms’<br>net/core/neighbour.c:1471: error: non-static declaration of ‘neigh_parms_alloc’ follows static declaration<br>
net/core/neighbour.c:1439: note: previous definition of ‘neigh_parms_alloc’ was here<br>net/core/neighbour.c:1471: warning: ‘__used__’ attribute ignored<br>net/core/neighbour.c:1471: error: section attribute cannot be specified for local variables<br>
net/core/neighbour.c:1474: error: invalid storage class for function ‘neigh_rcu_free_parms’<br>net/core/neighbour.c:1502: error: non-static declaration of ‘neigh_parms_release’ follows static declaration<br>net/core/neighbour.c:1481: note: previous definition of ‘neigh_parms_release’ was here<br>
net/core/neighbour.c:1502: warning: ‘__used__’ attribute ignored<br>net/core/neighbour.c:1502: error: section attribute cannot be specified for local variables<br>net/core/neighbour.c:1505: error: invalid storage class for function ‘neigh_parms_destroy’<br>
net/core/neighbour.c:1513: error: invalid storage class for function ‘neigh_table_init_no_netlink’<br>net/core/neighbour.c:1577: error: non-static declaration of ‘neigh_table_init’ follows static declaration<br>net/core/neighbour.c:1557: note: previous definition of ‘neigh_table_init’ was here<br>
net/core/neighbour.c:1577: warning: ‘__used__’ attribute ignored<br>net/core/neighbour.c:1577: error: section attribute cannot be specified for local variables<br>net/core/neighbour.c:1613: error: non-static declaration of ‘neigh_table_clear’ follows static declaration<br>
net/core/neighbour.c:1579: note: previous definition of ‘neigh_table_clear’ was here<br>net/core/neighbour.c:1613: warning: ‘__used__’ attribute ignored<br>net/core/neighbour.c:1613: error: section attribute cannot be specified for local variables<br>
net/core/neighbour.c:1616: error: invalid storage class for function ‘neigh_delete’<br>net/core/neighbour.c:1680: error: invalid storage class for function ‘neigh_add’<br>net/core/neighbour.c:1778: error: invalid storage class for function ‘neightbl_fill_parms’<br>
net/core/neighbour.c:1816: error: invalid storage class for function ‘neightbl_fill_info’<br>net/core/neighbour.c:1905: error: invalid storage class for function ‘neightbl_fill_param_info’<br>net/core/neighbour.c:1958: error: invalid storage class for function ‘neightbl_set’<br>
net/core/neighbour.c:2093: error: invalid storage class for function ‘neightbl_dump_info’<br>net/core/neighbour.c:2143: error: invalid storage class for function ‘neigh_fill_info’<br>net/core/neighbour.c:2196: error: invalid storage class for function ‘pneigh_fill_info’<br>
net/core/neighbour.c:2224: error: invalid storage class for function ‘neigh_update_notify’<br>net/core/neighbour.c:2231: error: invalid storage class for function ‘neigh_dump_table’<br>net/core/neighbour.c:2272: error: invalid storage class for function ‘pneigh_dump_table’<br>
net/core/neighbour.c:2311: error: invalid storage class for function ‘neigh_dump_info’<br>net/core/neighbour.c:2369: error: non-static declaration of ‘neigh_for_each’ follows static declaration<br>net/core/neighbour.c:2349: note: previous definition of ‘neigh_for_each’ was here<br>
net/core/neighbour.c:2369: warning: ‘__used__’ attribute ignored<br>net/core/neighbour.c:2369: error: section attribute cannot be specified for local variables<br>net/core/neighbour.c:2404: error: non-static declaration of ‘__neigh_for_each_release’ follows static declaration<br>
net/core/neighbour.c:2372: note: previous definition of ‘__neigh_for_each_release’ was here<br>net/core/neighbour.c:2404: warning: ‘__used__’ attribute ignored<br>net/core/neighbour.c:2404: error: section attribute cannot be specified for local variables<br>
net/core/neighbour.c:2409: error: invalid storage class for function ‘neigh_get_first’<br>net/core/neighbour.c:2450: error: invalid storage class for function ‘neigh_get_next’<br>net/core/neighbour.c:2496: error: invalid storage class for function ‘neigh_get_idx’<br>
net/core/neighbour.c:2511: error: invalid storage class for function ‘pneigh_get_first’<br>net/core/neighbour.c:2534: error: invalid storage class for function ‘pneigh_get_next’<br>net/core/neighbour.c:2560: error: invalid storage class for function ‘pneigh_get_idx’<br>
net/core/neighbour.c:2575: error: invalid storage class for function ‘neigh_get_idx_any’<br>net/core/neighbour.c:2601: error: non-static declaration of ‘neigh_seq_start’ follows static declaration<br>net/core/neighbour.c:2587: note: previous definition of ‘neigh_seq_start’ was here<br>
net/core/neighbour.c:2601: warning: ‘__used__’ attribute ignored<br>net/core/neighbour.c:2601: error: section attribute cannot be specified for local variables<br>net/core/neighbour.c:2628: error: non-static declaration of ‘neigh_seq_next’ follows static declaration<br>
net/core/neighbour.c:2603: note: previous definition of ‘neigh_seq_next’ was here<br>net/core/neighbour.c:2628: warning: ‘__used__’ attribute ignored<br>net/core/neighbour.c:2628: error: section attribute cannot be specified for local variables<br>
net/core/neighbour.c:2635: error: non-static declaration of ‘neigh_seq_stop’ follows static declaration<br>net/core/neighbour.c:2630: note: previous definition of ‘neigh_seq_stop’ was here<br>net/core/neighbour.c:2635: warning: ‘__used__’ attribute ignored<br>
net/core/neighbour.c:2635: error: section attribute cannot be specified for local variables<br>net/core/neighbour.c:2640: error: invalid storage class for function ‘neigh_stat_seq_start’<br>net/core/neighbour.c:2657: error: invalid storage class for function ‘neigh_stat_seq_next’<br>
net/core/neighbour.c:2671: error: invalid storage class for function ‘neigh_stat_seq_stop’<br>net/core/neighbour.c:2676: error: invalid storage class for function ‘neigh_stat_seq_show’<br>net/core/neighbour.c:2710: error: initializer element is not constant<br>
net/core/neighbour.c:2710: error: (near initialization for ‘neigh_stat_seq_ops.start’)<br>net/core/neighbour.c:2711: error: initializer element is not constant<br>net/core/neighbour.c:2711: error: (near initialization for ‘neigh_stat_seq_ops.next’)<br>
net/core/neighbour.c:2712: error: initializer element is not constant<br>net/core/neighbour.c:2712: error: (near initialization for ‘neigh_stat_seq_ops.stop’)<br>net/core/neighbour.c:2713: error: initializer element is not constant<br>
net/core/neighbour.c:2713: error: (near initialization for ‘neigh_stat_seq_ops.show’)<br>net/core/neighbour.c:2717: error: invalid storage class for function ‘neigh_stat_seq_open’<br>net/core/neighbour.c:2729: error: initializer element is not constant<br>
net/core/neighbour.c:2729: error: (near initialization for ‘neigh_stat_seq_fops.open’)<br>net/core/neighbour.c:2727: warning: ISO C90 forbids mixed declarations and code<br>net/core/neighbour.c:2738: error: invalid storage class for function ‘neigh_nlmsg_size’<br>
net/core/neighbour.c:2747: error: invalid storage class for function ‘__neigh_notify’<br>net/core/neighbour.c:2774: error: non-static declaration of ‘neigh_app_ns’ follows static declaration<br>net/core/neighbour.c:2770: note: previous definition of ‘neigh_app_ns’ was here<br>
net/core/neighbour.c:2774: warning: ‘__used__’ attribute ignored<br>net/core/neighbour.c:2774: error: section attribute cannot be specified for local variables<br>net/core/neighbour.c:2783: error: invalid storage class for function ‘proc_unres_qlen’<br>
net/core/neighbour.c:2879: error: initializer element is not constant<br>net/core/neighbour.c:2879: error: (near initialization for ‘neigh_sysctl_template.neigh_vars[7].proc_handler’)<br>net/core/neighbour.c:3035: error: non-static declaration of ‘neigh_sysctl_register’ follows static declaration<br>
net/core/neighbour.c:2960: note: previous definition of ‘neigh_sysctl_register’ was here<br>net/core/neighbour.c:3035: warning: ‘__used__’ attribute ignored<br>net/core/neighbour.c:3035: error: section attribute cannot be specified for local variables<br>
net/core/neighbour.c:3046: error: non-static declaration of ‘neigh_sysctl_unregister’ follows static declaration<br>net/core/neighbour.c:3037: note: previous definition of ‘neigh_sysctl_unregister’ was here<br>net/core/neighbour.c:3046: warning: ‘__used__’ attribute ignored<br>
net/core/neighbour.c:3046: error: section attribute cannot be specified for local variables<br>net/core/neighbour.c:3051: error: invalid storage class for function ‘neigh_init’<br>net/core/neighbour.c:3063: error: initializer element is not constant<br>
net/core/neighbour.c:3063: error: expected declaration or statement at end of input<br>net/core/neighbour.c:2727: warning: unused variable ‘neigh_stat_seq_fops’<br>net/core/neighbour.c:1396: warning: unused variable ‘sched_next’<br>
make[2]: *** [net/core/neighbour.o] Error 1<br>make[1]: *** [net/core] Error 2<br>make: *** [_module_net] Error 2<br>aruna@aruna-desktop:/media/kernel-dev/dev/linux-git$ <br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Jan 10, 2014 at 8:42 PM, Aruna Hewapathirane <span dir="ltr"><<a href="mailto:aruna.hewapathirane-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" target="_blank">aruna.hewapathirane-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Ted believe me I have tried and tried and finally decided to ask for help. The patch errors are below:<br><div><br>aruna@aruna-desktop:/media/kernel-dev/next-net/net-next$ git format-patch --subject-prefix="PATCH v1" HEAD^<br>

0001-Network-Subsystem-v2.patch<br><br>aruna@aruna-desktop:/media/kernel-dev/next-net/net-next$ git apply --check 0001-Network-Subsystem-v2.patch<br><br>error: patch failed: net/core/neighbour.c:117<br><br>error: net/core/neighbour.c: patch does not apply<br>

<br></div><div class="gmail_extra">It makes no sense to me because all the other files compile clean nil errors :( <br></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Fri, Jan 10, 2014 at 8:36 PM, ted leslie <span dir="ltr"><<a href="mailto:ted.leslie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" target="_blank">ted.leslie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:courier new,monospace;font-size:small">What patch error are you getting?</div><div style="font-family:courier new,monospace;font-size:small">



<br></div><div style="font-family:courier new,monospace;font-size:small">You can see what the patch is doing, you can just go put the changed two lines in with editor.</div><span><font color="#888888"><div style="font-family:courier new,monospace;font-size:small">



-tl</div><div style="font-family:courier new,monospace;font-size:small"><br></div><div style="font-family:courier new,monospace;font-size:small"><br></div></font></span></div><div><div><div class="gmail_extra">


<br><br><div class="gmail_quote">On Fri, Jan 10, 2014 at 8:05 PM, Aruna Hewapathirane <span dir="ltr"><<a href="mailto:aruna.hewapathirane@gmail.com" target="_blank">aruna.hewapathirane-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hello Everybody,<br></div><div><br></div>I am a total newbie to kernel hacking and I have a 
question. Am trying to patch the Network Subsystem  and changing the 
net_random() to direct calls of prandom_u32. Why ? Because it is<br>
harder to audit / <span>grep</span> and new commits actually use prandom_u32 only am told.<br><br></div><div>u32 prandom_u32(void);    /* defined in include/linux/random.h: */<br><br></div><div>#define net_random()        prandom_u32() /* defined in include/linux/net.h */<br>





<br></div><div>Everything works as expected until I get to net/core/neighbour.c and then patch fails to apply.<br></div><div><br></div>The diff is here: <br><div><br>-------------------------------------------------------------------------------------------------------------------------------<br>






diff --git a/net/core/neighbour.c b/net/core/neighbour.c<br>index 47d834e..ea97361 100644<br>--- a/net/core/neighbour.c<br>+++ b/net/core/neighbour.c<br>@@ -117,7 +117,7 @@ static void neigh_cleanup_and_release(struct neighbour *neig<br>





 <br> unsigned long neigh_rand_reach_time(unsigned long base)<br> {<br>-       return base ? (prandom_u32() % base) + (base >> 1) : 0;<br>+       return base ? (net_random() % base) + (base >> 1) : 0;<br> }<br>





 EXPORT_SYMBOL(neigh_rand_reach_time);<br> <br>@@ -1415,7 +1415,7 @@ void pneigh_enqueue(struct neigh_table *tbl, struct neigh_<br>                    struct sk_buff *skb)<br> {<br>        unsigned long now = jiffies;<br>





-       unsigned long sched_next = now + (prandom_u32() %<br>+       unsigned long sched_next = now + (net_random() %<br>                                          NEIGH_VAR(p, PROXY_DELAY));<br> <br>        if (tbl->proxy_queue.qlen > NEIGH_VAR(p, PROXY_QLEN)) {<br>





-------------------------------------------------------------------------------------------------------------------------------<br>
<br></div><div>I can use some help and guidance please, what am I doing 
wrong ? Or not seeing ? It's just this neighbor.c file that is doing 
this and I am stumped. <br><br></div>Thank you.<div><div><img src="https://mail.google.com/mail/u/0/images/cleardot.gif"></div></div><span><font color="#888888">Aruna<br clear="all"><div><a href="https://sites.google.com/site/arunahewapathirane/home/business-card/buisness-card.png?attredirects=0" target="_blank"><br>




</a>
</div></font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><br></div></div><span class="HOEnZb"><font color="#888888">-- <br><span style="font-family:comic sans ms,sans-serif"><b>Aruna Hewapathirane</b><br>Consultant/Trainer<br>
Phone : <a href="tel:647-709-9269" value="+16477099269" target="_blank">647-709-9269</a><br>Website:<a href="http://goog_1768911931" target="_blank"> </a><a href="http://sahanaya.net/aruna/" target="_blank">Open Source Solutions</a></span><br>

<br><br><a href="https://sites.google.com/site/arunahewapathirane/home/business-card/buisness-card.png?attredirects=0" target="_blank"><br></a>
</font></span></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><span style="font-family:comic sans ms,sans-serif"><b>Aruna Hewapathirane</b><br>Consultant/Trainer<br>Phone : 647-709-9269<br>Website:<a href="http://goog_1768911931" target="_blank"> </a><a href="http://sahanaya.net/aruna/" target="_blank">Open Source Solutions</a></span><br>
<br><br><a href="https://sites.google.com/site/arunahewapathirane/home/business-card/buisness-card.png?attredirects=0" target="_blank"><br></a>
</div>