<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/amt.c, branch linux-5.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-01-27T11:02:02Z</updated>
<entry>
<title>amt: fix wrong return type of amt_send_membership_update()</title>
<updated>2022-01-27T11:02:02Z</updated>
<author>
<name>Taehee Yoo</name>
</author>
<published>2022-01-09T16:37:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=162dad32f4a6a8ff5e9d39504d4bffa8797a8f5b'/>
<id>urn:sha1:162dad32f4a6a8ff5e9d39504d4bffa8797a8f5b</id>
<content type='text'>
[ Upstream commit dd3ca4c5184ea98e40acb8eb293d85b88ea04ee2 ]

amt_send_membership_update() would return -1 but it's return type is bool.
So, it should be used TRUE instead of -1.

Fixes: cbc21dc1cfe9 ("amt: add data plane of amt interface")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Taehee Yoo &lt;ap420073@gmail.com&gt;
Link: https://lore.kernel.org/r/20220109163702.6331-1-ap420073@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>amt: cancel delayed_work synchronously in amt_fini()</title>
<updated>2021-11-17T03:14:12Z</updated>
<author>
<name>Taehee Yoo</name>
</author>
<published>2021-11-16T16:09:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b0024a04e48837b6556a080ff37ecd8351632596'/>
<id>urn:sha1:b0024a04e48837b6556a080ff37ecd8351632596</id>
<content type='text'>
When the amt module is being removed, it calls cancel_delayed_work()
to cancel pending delayed_work. But this function doesn't wait for
canceling delayed_work.
So, workers can be still doing after module delete.

In order to avoid this, cancel_delayed_work_sync() should be used instead.

Suggested-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Fixes: bc54e49c140b ("amt: add multicast(IGMP) report message handler")
Signed-off-by: Taehee Yoo &lt;ap420073@gmail.com&gt;
Link: https://lore.kernel.org/r/20211116160923.25258-1-ap420073@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>amt: use cancel_delayed_work() instead of flush_delayed_work() in amt_fini()</title>
<updated>2021-11-10T03:12:56Z</updated>
<author>
<name>Taehee Yoo</name>
</author>
<published>2021-11-08T14:53:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=43aa4937994f39a5ffc1a581b5ca382a1a2a8b1e'/>
<id>urn:sha1:43aa4937994f39a5ffc1a581b5ca382a1a2a8b1e</id>
<content type='text'>
When the amt module is being removed, it calls flush_delayed_work() to exit
source_gc_wq. But it wouldn't be exited properly because the
amt_source_gc_work(), which is the callback function of source_gc_wq
internally calls mod_delayed_work() again.
So, amt_source_gc_work() would be called after the amt module is removed.
Therefore kernel panic would occur.
In order to avoid it, cancel_delayed_work() should be used instead of
flush_delayed_work().

Test commands:
   modprobe amt
   modprobe -rv amt

Splat looks like:
 BUG: unable to handle page fault for address: fffffbfff80f50db
 #PF: supervisor read access in kernel mode
 #PF: error_code(0x0000) - not-present page
 PGD 1237ee067 P4D 1237ee067 PUD 1237b2067 PMD 100c11067 PTE 0
 Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC KASAN PTI
 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.15.0+ #27
 5a0ebebc29fe5c40c68bea90197606c3a832b09f
 RIP: 0010:run_timer_softirq+0x221/0xfc0
 Code: 00 00 4c 89 e1 4c 8b 30 48 c1 e9 03 80 3c 29 00 0f 85 ed 0b 00 00
 4d 89 34 24 4d 85 f6 74 19 49 8d 7e 08 48 89 f9 48 c1 e9 03 &lt;80&gt; 3c 29 00
 0f 85 fa 0b 00 00 4d 89 66 08 83 04 24 01 49 89 d4 48
 RSP: 0018:ffff888119009e50 EFLAGS: 00010806
 RAX: ffff8881191f8a80 RBX: 00000000007ffe2a RCX: 1ffffffff80f50db
 RDX: ffff888119009ed0 RSI: 0000000000000008 RDI: ffffffffc07a86d8
 RBP: dffffc0000000000 R08: ffff8881191f8280 R09: ffffed102323f061
 R10: ffff8881191f8307 R11: ffffed102323f060 R12: ffff888119009ec8
 R13: 00000000000000c0 R14: ffffffffc07a86d0 R15: ffff8881191f82e8
 FS:  0000000000000000(0000) GS:ffff888119000000(0000)
 knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: fffffbfff80f50db CR3: 00000001062dc002 CR4: 00000000003706e0
 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
 Call Trace:
  &lt;IRQ&gt;
  ? add_timer+0x650/0x650
  ? kvm_clock_read+0x14/0x30
  ? ktime_get+0xb9/0x180
  ? rcu_read_lock_held_common+0xe/0xa0
  ? rcu_read_lock_sched_held+0x56/0xc0
  ? rcu_read_lock_bh_held+0xa0/0xa0
  ? hrtimer_interrupt+0x271/0x790
  __do_softirq+0x1d0/0x88f
  irq_exit_rcu+0xe7/0x120
  sysvec_apic_timer_interrupt+0x8a/0xb0
  &lt;/IRQ&gt;
  &lt;TASK&gt;
[ ... ]

Fixes: bc54e49c140b ("amt: add multicast(IGMP) report message handler")
Signed-off-by: Taehee Yoo &lt;ap420073@gmail.com&gt;
Link: https://lore.kernel.org/r/20211108145340.17208-1-ap420073@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>amt: remove duplicate include in amt.c</title>
<updated>2021-11-05T14:24:37Z</updated>
<author>
<name>Zhang Mingyu</name>
</author>
<published>2021-11-05T01:27:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dce981c42151e1f0176b0788c2e1bdc3f1e2bc1f'/>
<id>urn:sha1:dce981c42151e1f0176b0788c2e1bdc3f1e2bc1f</id>
<content type='text'>
'net/protocol.h' included in 'drivers/net/amt.c' is duplicated.

Reported-by: Zeal Robot &lt;zealci@zte.com.cn&gt;
Signed-off-by: Zhang Mingyu &lt;zhang.mingyu@zte.com.cn&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>amt: Fix NULL but dereferenced coccicheck error</title>
<updated>2021-11-05T10:45:03Z</updated>
<author>
<name>Yang Li</name>
</author>
<published>2021-11-05T07:12:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3f81c579912855f19ed1a72af8133485a6119fba'/>
<id>urn:sha1:3f81c579912855f19ed1a72af8133485a6119fba</id>
<content type='text'>
Eliminate the following coccicheck warning:
./drivers/net/amt.c:2795:6-9: ERROR: amt is NULL but dereferenced.

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Yang Li &lt;yang.lee@linux.alibaba.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>amt: Remove duplicate include</title>
<updated>2021-11-03T11:06:55Z</updated>
<author>
<name>Jiapeng Chong</name>
</author>
<published>2021-11-03T03:45:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a4414341b58397e703c066d28081c58f5057e948'/>
<id>urn:sha1:a4414341b58397e703c066d28081c58f5057e948</id>
<content type='text'>
Clean up the following includecheck warning:

./drivers/net/amt.c: net/protocol.h is included more than once.

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Jiapeng Chong &lt;jiapeng.chong@linux.alibaba.com&gt;
Reviewed-by: Taehee Yoo &lt;ap420073@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>amt: fix error return code in amt_init()</title>
<updated>2021-11-03T02:15:52Z</updated>
<author>
<name>Yang Yingliang</name>
</author>
<published>2021-11-02T13:03:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=db2434343b2c29817fe1fa63919e9c56218a46e8'/>
<id>urn:sha1:db2434343b2c29817fe1fa63919e9c56218a46e8</id>
<content type='text'>
Return error code when alloc_workqueue()
fails in amt_init().

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Reviewed-by: Taehee Yoo &lt;ap420073@gmail.com&gt;
Link: https://lore.kernel.org/r/20211102130353.1666999-1-yangyingliang@huawei.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>amt: add mld report message handler</title>
<updated>2021-11-01T13:36:09Z</updated>
<author>
<name>Taehee Yoo</name>
</author>
<published>2021-10-31T16:00:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b75f7095d4d4bebc054d48ed25ddc1b0937ba9c7'/>
<id>urn:sha1:b75f7095d4d4bebc054d48ed25ddc1b0937ba9c7</id>
<content type='text'>
In the previous patch, igmp report handler was added.
That handler can be used for mld too.
So, it uses that common code to parse mld report message.

Signed-off-by: Taehee Yoo &lt;ap420073@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>amt: add multicast(IGMP) report message handler</title>
<updated>2021-11-01T13:36:08Z</updated>
<author>
<name>Taehee Yoo</name>
</author>
<published>2021-10-31T16:00:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bc54e49c140b7bf95e7290849e26b0427779f4de'/>
<id>urn:sha1:bc54e49c140b7bf95e7290849e26b0427779f4de</id>
<content type='text'>
amt 'Relay' interface manages multicast groups(igmp/mld) and sources.
In order to manage, it should have the function to parse igmp/mld
report messages. So, this adds the logic for parsing igmp report messages
and saves them on their own data structure.

   struct amt_group_node means one group(igmp/mld).
   struct amt_source_node means one source.

The same source can't exist in the same group.
The same group can exist in the same tunnel because it manages
the host address too.

The group information is used when forwarding multicast data.
If there are no groups in the specific tunnel, Relay doesn't forward it.

Although Relay manages sources, it doesn't support the source filtering
feature. Because the reason to manage sources is just that in order
to manage group more correctly.

In the next patch, MLD part will be added.

Signed-off-by: Taehee Yoo &lt;ap420073@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>amt: add data plane of amt interface</title>
<updated>2021-11-01T13:36:08Z</updated>
<author>
<name>Taehee Yoo</name>
</author>
<published>2021-10-31T16:00:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cbc21dc1cfe949e37b2a54c71511579f1899e8d4'/>
<id>urn:sha1:cbc21dc1cfe949e37b2a54c71511579f1899e8d4</id>
<content type='text'>
Before forwarding multicast traffic, the amt interface establishes between
gateway and relay. In order to establish, amt defined some message type
and those message flow looks like the below.

                      Gateway                  Relay
                      -------                  -----
                         :        Request        :
                     [1] |           N           |
                         |----------------------&gt;|
                         |    Membership Query   | [2]
                         |    N,MAC,gADDR,gPORT  |
                         |&lt;======================|
                     [3] |   Membership Update   |
                         |   ({G:INCLUDE({S})})  |
                         |======================&gt;|
                         |                       |
    ---------------------:-----------------------:---------------------
   |                     |                       |                     |
   |                     |    *Multicast Data    |  *IP Packet(S,G)    |
   |                     |      gADDR,gPORT      |&lt;-----------------() |
   |    *IP Packet(S,G)  |&lt;======================|                     |
   | ()&lt;-----------------|                       |                     |
   |                     |                       |                     |
    ---------------------:-----------------------:---------------------
                         ~                       ~
                         ~        Request        ~
                     [4] |           N'          |
                         |----------------------&gt;|
                         |   Membership Query    | [5]
                         | N',MAC',gADDR',gPORT' |
                         |&lt;======================|
                     [6] |                       |
                         |       Teardown        |
                         |   N,MAC,gADDR,gPORT   |
                         |----------------------&gt;|
                         |                       | [7]
                         |   Membership Update   |
                         |  ({G:INCLUDE({S})})   |
                         |======================&gt;|
                         |                       |
    ---------------------:-----------------------:---------------------
   |                     |                       |                     |
   |                     |    *Multicast Data    |  *IP Packet(S,G)    |
   |                     |     gADDR',gPORT'     |&lt;-----------------() |
   |    *IP Packet (S,G) |&lt;======================|                     |
   | ()&lt;-----------------|                       |                     |
   |                     |                       |                     |
    ---------------------:-----------------------:---------------------
                         |                       |
                         :                       :

1. Discovery
 - Sent by Gateway to Relay
 - To find Relay unique ip address
2. Advertisement
 - Sent by Relay to Gateway
 - Contains the unique IP address
3. Request
 - Sent by Gateway to Relay
 - Solicit to receive 'Query' message.
4. Query
 - Sent by Relay to Gateway
 - Contains General Query message.
5. Update
 - Sent by  Gateway to Relay
 - Contains report message.
6. Multicast Data
 - Sent by Relay to Gateway
 - encapsulated multicast traffic.
7. Teardown
 - Not supported at this time.

Except for the Teardown message, it supports all messages.

In the next patch, IGMP/MLD logic will be added.

Signed-off-by: Taehee Yoo &lt;ap420073@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
