From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tetsuo Handa Date: Wed, 01 Jul 2020 14:08:57 +0000 Subject: Re: linux-next: umh: fix processed error when UMH_WAIT_PROC is used seems to break linux bridge on s Message-Id: <8d714a23-bac4-7631-e5fc-f97c20a46083@i-love.sakura.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit List-Id: References: <9e767819-9bbe-2181-521e-4d8ca28ca4f7@de.ibm.com> <20200624160953.GH4332@42.do-not-panic.com> <4e27098e-ac8d-98f0-3a9a-ea25242e24ec@de.ibm.com> <4d8fbcea-a892-3453-091f-d57c03f9aa90@de.ibm.com> <1263e370-7cee-24d8-b98c-117bf7c90a83@de.ibm.com> <20200626025410.GJ4332@42.do-not-panic.com> <20200630175704.GO13911@42.do-not-panic.com> <20200701135324.GS4332@42.do-not-panic.com> In-Reply-To: <20200701135324.GS4332@42.do-not-panic.com> To: Luis Chamberlain Cc: Christian Borntraeger , Christoph Hellwig , ast@kernel.org, axboe@kernel.dk, bfields@fieldses.org, bridge@lists.linux-foundation.org, chainsaw@gentoo.org, christian.brauner@ubuntu.com, chuck.lever@oracle.com, davem@davemloft.net, dhowells@redhat.com, gregkh@linuxfoundation.org, jarkko.sakkinen@linux.intel.com, jmorris@namei.org, josh@joshtriplett.org, keescook@chromium.org, keyrings@vger.kernel.org, kuba@kernel.org, lars.ellenberg@linbit.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-security-module@vger.kernel.org, nikolay@cumulusnetworks.com, philipp.reisner@linbit.com, ravenexp@gmail.com, roopa@cumulusnetworks.com, serge@hallyn.com, slyfox@gentoo.org, viro@zeniv.linux.org.uk, yangtiezhu@loongson.cn, netdev@vger.kernel.org, markward@linux.ibm.com, linux-s390 On 2020/07/01 22:53, Luis Chamberlain wrote: >> Well, it is not br_stp_call_user() but br_stp_start() which is expecting >> to set sub_info->retval for both KWIFEXITED() case and KWIFSIGNALED() case. >> That is, sub_info->retval needs to carry raw value (i.e. without "umh: fix >> processed error when UMH_WAIT_PROC is used" will be the correct behavior). > > br_stp_start() doesn't check for the raw value, it just checks for err > or !err. So the patch, "umh: fix processed error when UMH_WAIT_PROC is > used" propagates the correct error now. No. If "/sbin/bridge-stp virbr0 start" terminated due to e.g. SIGSEGV (for example, by inserting "kill -SEGV $$" into right after "#!/bin/sh" line), br_stp_start() needs to select BR_KERNEL_STP path. We can't assume that /sbin/bridge-stp is always terminated by exit() syscall (and hence we can't ignore KWIFSIGNALED() case in call_usermodehelper_exec_sync()). From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F898C433E1 for ; Wed, 1 Jul 2020 14:11:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EBAB720702 for ; Wed, 1 Jul 2020 14:11:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731420AbgGAOLv (ORCPT ); Wed, 1 Jul 2020 10:11:51 -0400 Received: from www262.sakura.ne.jp ([202.181.97.72]:60283 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731153AbgGAOLu (ORCPT ); Wed, 1 Jul 2020 10:11:50 -0400 Received: from fsav305.sakura.ne.jp (fsav305.sakura.ne.jp [153.120.85.136]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 061E90OX093153; Wed, 1 Jul 2020 23:09:00 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav305.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav305.sakura.ne.jp); Wed, 01 Jul 2020 23:09:00 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav305.sakura.ne.jp) Received: from [192.168.1.9] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 061E8xWB093138 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 1 Jul 2020 23:08:59 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Subject: Re: linux-next: umh: fix processed error when UMH_WAIT_PROC is used seems to break linux bridge on s390x (bisected) To: Luis Chamberlain Cc: Christian Borntraeger , Christoph Hellwig , ast@kernel.org, axboe@kernel.dk, bfields@fieldses.org, bridge@lists.linux-foundation.org, chainsaw@gentoo.org, christian.brauner@ubuntu.com, chuck.lever@oracle.com, davem@davemloft.net, dhowells@redhat.com, gregkh@linuxfoundation.org, jarkko.sakkinen@linux.intel.com, jmorris@namei.org, josh@joshtriplett.org, keescook@chromium.org, keyrings@vger.kernel.org, kuba@kernel.org, lars.ellenberg@linbit.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-security-module@vger.kernel.org, nikolay@cumulusnetworks.com, philipp.reisner@linbit.com, ravenexp@gmail.com, roopa@cumulusnetworks.com, serge@hallyn.com, slyfox@gentoo.org, viro@zeniv.linux.org.uk, yangtiezhu@loongson.cn, netdev@vger.kernel.org, markward@linux.ibm.com, linux-s390 References: <9e767819-9bbe-2181-521e-4d8ca28ca4f7@de.ibm.com> <20200624160953.GH4332@42.do-not-panic.com> <4e27098e-ac8d-98f0-3a9a-ea25242e24ec@de.ibm.com> <4d8fbcea-a892-3453-091f-d57c03f9aa90@de.ibm.com> <1263e370-7cee-24d8-b98c-117bf7c90a83@de.ibm.com> <20200626025410.GJ4332@42.do-not-panic.com> <20200630175704.GO13911@42.do-not-panic.com> <20200701135324.GS4332@42.do-not-panic.com> From: Tetsuo Handa Message-ID: <8d714a23-bac4-7631-e5fc-f97c20a46083@i-love.sakura.ne.jp> Date: Wed, 1 Jul 2020 23:08:57 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20200701135324.GS4332@42.do-not-panic.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/07/01 22:53, Luis Chamberlain wrote: >> Well, it is not br_stp_call_user() but br_stp_start() which is expecting >> to set sub_info->retval for both KWIFEXITED() case and KWIFSIGNALED() case. >> That is, sub_info->retval needs to carry raw value (i.e. without "umh: fix >> processed error when UMH_WAIT_PROC is used" will be the correct behavior). > > br_stp_start() doesn't check for the raw value, it just checks for err > or !err. So the patch, "umh: fix processed error when UMH_WAIT_PROC is > used" propagates the correct error now. No. If "/sbin/bridge-stp virbr0 start" terminated due to e.g. SIGSEGV (for example, by inserting "kill -SEGV $$" into right after "#!/bin/sh" line), br_stp_start() needs to select BR_KERNEL_STP path. We can't assume that /sbin/bridge-stp is always terminated by exit() syscall (and hence we can't ignore KWIFSIGNALED() case in call_usermodehelper_exec_sync()). From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: References: <9e767819-9bbe-2181-521e-4d8ca28ca4f7@de.ibm.com> <20200624160953.GH4332@42.do-not-panic.com> <4e27098e-ac8d-98f0-3a9a-ea25242e24ec@de.ibm.com> <4d8fbcea-a892-3453-091f-d57c03f9aa90@de.ibm.com> <1263e370-7cee-24d8-b98c-117bf7c90a83@de.ibm.com> <20200626025410.GJ4332@42.do-not-panic.com> <20200630175704.GO13911@42.do-not-panic.com> <20200701135324.GS4332@42.do-not-panic.com> From: Tetsuo Handa Message-ID: <8d714a23-bac4-7631-e5fc-f97c20a46083@i-love.sakura.ne.jp> Date: Wed, 1 Jul 2020 23:08:57 +0900 MIME-Version: 1.0 In-Reply-To: <20200701135324.GS4332@42.do-not-panic.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Bridge] linux-next: umh: fix processed error when UMH_WAIT_PROC is used seems to break linux bridge on s390x (bisected) List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luis Chamberlain Cc: ast@kernel.org, jarkko.sakkinen@linux.intel.com, philipp.reisner@linbit.com, bfields@fieldses.org, keyrings@vger.kernel.org, christian.brauner@ubuntu.com, yangtiezhu@loongson.cn, linux-s390 , bridge@lists.linux-foundation.org, jmorris@namei.org, Christoph Hellwig , Christian Borntraeger , kuba@kernel.org, serge@hallyn.com, keescook@chromium.org, nikolay@cumulusnetworks.com, roopa@cumulusnetworks.com, josh@joshtriplett.org, slyfox@gentoo.org, viro@zeniv.linux.org.uk, axboe@kernel.dk, dhowells@redhat.com, linux-nfs@vger.kernel.org, chainsaw@gentoo.org, ravenexp@gmail.com, gregkh@linuxfoundation.org, markward@linux.ibm.com, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, chuck.lever@oracle.com, netdev@vger.kernel.org, linux-fsdevel@vger.kernel.org, lars.ellenberg@linbit.com, davem@davemloft.net On 2020/07/01 22:53, Luis Chamberlain wrote: >> Well, it is not br_stp_call_user() but br_stp_start() which is expecting >> to set sub_info->retval for both KWIFEXITED() case and KWIFSIGNALED() case. >> That is, sub_info->retval needs to carry raw value (i.e. without "umh: fix >> processed error when UMH_WAIT_PROC is used" will be the correct behavior). > > br_stp_start() doesn't check for the raw value, it just checks for err > or !err. So the patch, "umh: fix processed error when UMH_WAIT_PROC is > used" propagates the correct error now. No. If "/sbin/bridge-stp virbr0 start" terminated due to e.g. SIGSEGV (for example, by inserting "kill -SEGV $$" into right after "#!/bin/sh" line), br_stp_start() needs to select BR_KERNEL_STP path. We can't assume that /sbin/bridge-stp is always terminated by exit() syscall (and hence we can't ignore KWIFSIGNALED() case in call_usermodehelper_exec_sync()).