From patchwork Thu Mar 28 09:06:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1917197 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=jB4DcEDf; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=sipsolutions.net header.i=@sipsolutions.net header.a=rsa-sha256 header.s=mail header.b=QP0jzS4i; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V4yTb4xs3z1yYR for ; Thu, 28 Mar 2024 20:11:47 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=IPVeZRXnqJidyGpr4HO2lELicvr7jyE2bmMpBvU7AgI=; b=jB4DcEDfkDu12bTyxvaTVUeQ6C CoZyVbQvrOyj9zy3EApWlWokohEooOKa40IIhDZapRFLShAQjdRID0yS6oxd+4oJaf7md0KABEFgQ fkFRfAb+ZobmQQzkBGueycIhcG2HojFEd26BBiVeNKDcQqsdUd2LtQM2dw8yUL6inszGADKz+cGpb Z817zEcLcUd5XPCpkOCtqgZPdfghJnDOo9777Bj6vKhFwbVkyMlbP++VcHmpyG176YgWJv+S3gZ43 0wrmovMWsnBU2eHX1i0qXQ+C0JnVWi0bhh3YeUTHp+KPx7n3fCnOhMo9KZKSBv9f6yMERhkAubJcM PtgYgkEQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rplnV-0000000DFWC-1fi9; Thu, 28 Mar 2024 09:11:45 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:242:246e::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rplnR-0000000DFUK-3gDm for linux-um@lists.infradead.org; Thu, 28 Mar 2024 09:11:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-To:Resent-Cc: Resent-Message-ID:In-Reply-To:References; bh=IPVeZRXnqJidyGpr4HO2lELicvr7jyE2bmMpBvU7AgI=; t=1711617101; x=1712826701; b=QP0jzS4ivhKo7fm5cf4E7h7kul3veeuj/uwnnVzpjVkm58/gX8vjzpKhYbcqqSDP+8XPCiWns7S l7B66CkALsMBWYBVpufoQ/CmY1aDwTTvSCB8idU0KsClZmiUYupqJzKbqtzSbkqv2TpqWlCuOF3UM DMSyCf+WSPOHF+sSgCKfir9R6cu1vpICWeslvceUosBk7UCJO/AF+2tDi6cSElJp8SlQJAe4LRiwc hunrKp+tHXCbkPX8Twt/LR91LGR2Lo8Wm/vGD9SSwsj3g3SIyhoRQ+mAtx2MTE0p50lgLSbxxUwOs 1A3le7LZLdxorbpjseTXnkKlc1M3NmVSjphQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rplnP-00000000oe8-04nh; Thu, 28 Mar 2024 10:11:39 +0100 From: Johannes Berg To: linux-um@lists.infradead.org Cc: Johannes Berg Subject: [PATCH 1/5] um: signal: move pid variable where needed Date: Thu, 28 Mar 2024 10:06:34 +0100 Message-ID: <20240328100640.d3ffb37dc64b.I2e2e713d6a78ea24e6508db9d3ef2882b88861da@changeid> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240328_021142_245110_903E2BDA X-CRM114-Status: GOOD ( 11.47 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Johannes Berg We have W=1 warnings on 64-bit because the pid is only used in branches on 32-bit; move it inside to get rid of the warnings. Signed-off-by: Johannes Berg --- arch/x86/um/signal.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg We have W=1 warnings on 64-bit because the pid is only used in branches on 32-bit; move it inside to get rid of the warnings. Signed-off-by: Johannes Berg --- arch/x86/um/signal.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/x86/um/signal.c b/arch/x86/um/signal.c index 263e1d08f216..16ff097e790d 100644 --- a/arch/x86/um/signal.c +++ b/arch/x86/um/signal.c @@ -155,7 +155,7 @@ static int copy_sc_from_user(struct pt_regs *regs, struct sigcontext __user *from) { struct sigcontext sc; - int err, pid; + int err; /* Always make any pending restarted system calls return -EINTR */ current->restart_block.fn = do_no_restart_syscall; @@ -201,10 +201,10 @@ static int copy_sc_from_user(struct pt_regs *regs, #undef GETREG - pid = userspace_pid[current_thread_info()->cpu]; #ifdef CONFIG_X86_32 if (have_fpx_regs) { struct user_fxsr_struct fpx; + int pid = userspace_pid[current_thread_info()->cpu]; err = copy_from_user(&fpx, &((struct _fpstate __user *)sc.fpstate)->_fxsr_env[0], @@ -240,7 +240,7 @@ static int copy_sc_to_user(struct sigcontext __user *to, { struct sigcontext sc; struct faultinfo * fi = ¤t->thread.arch.faultinfo; - int err, pid; + int err; memset(&sc, 0, sizeof(struct sigcontext)); #define PUTREG(regno, regname) sc.regname = regs->regs.gp[HOST_##regno] @@ -288,10 +288,9 @@ static int copy_sc_to_user(struct sigcontext __user *to, if (err) return 1; - pid = userspace_pid[current_thread_info()->cpu]; - #ifdef CONFIG_X86_32 if (have_fpx_regs) { + int pid = userspace_pid[current_thread_info()->cpu]; struct user_fxsr_struct fpx; err = save_fpx_registers(pid, (unsigned long *) &fpx); From patchwork Thu Mar 28 09:06:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1917199 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=PMUVvioK; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=sipsolutions.net header.i=@sipsolutions.net header.a=rsa-sha256 header.s=mail header.b=m/snCPN3; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V4yTd4Qpzz1yYR for ; Thu, 28 Mar 2024 20:11:49 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2ZM+pq/GSSG3w0acZya1FsmZ0mi5CZ9pgRopR/Q9rxU=; b=PMUVvioK8KIh2h5wC/yB+UUSuk QOHK5aLs9livlyuV/SCv+z5xCy1Kalgn7bdAvU2eNh0l3r8k7mGlg1eFfb1lHqC8fiZDGnE5/cMBV P0ljFlofx1tIN4LT5UXoqJeTQSIw0cAZXr8RUEfW45QM1xT3p5nCk3B/hGaZtVU7DvU2+yxL1RPNC S4GG3IV4sP4unRxAYHR2ulUcC8Cf8wtQXgFb++anPsrp8K9yoZMuvHtnMBAlypkmGD/iDFHIJd+64 7Pz6338OvOiA6V5AIrO4g5TT7IFXyWnIJpW77G2HMDl9SSwjhWnJEkABJpeo2L7p+5NJwKUYih32z MjbmCrhg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rplnX-0000000DFWt-2I38; Thu, 28 Mar 2024 09:11:47 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:242:246e::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rplnS-0000000DFUT-1vZw for linux-um@lists.infradead.org; Thu, 28 Mar 2024 09:11:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=2ZM+pq/GSSG3w0acZya1FsmZ0mi5CZ9pgRopR/Q9rxU=; t=1711617102; x=1712826702; b=m/snCPN31VLgNKW/2SgDpNZ40B5bUTfZZspTtu27eZmbT2T V4SZDb7/7mBCfx/BdSAAFk+C62kSAvD3WtjWjbczcLz7aUDfSXxGJCNzcH0Y3r7wkphZ/HimE2lX0 oVgh0MIjrjuMRuPLR32ux+hP5Zrl3RHTPtANMkCas9drvTuFYAMu0XjTuqAkcLb5P9jg+39AYdhlD N9tMuUp63Ir4x66kDdqv2HxLaHXbAOcxG2soU570BuLRC8TR+eq8MUis6MvVQ7OQR24Y8h2zWCRhy LD2tms2DLymDSwKr7bN9JVDFeEJbRy9RAJAWFwlYYyIBIG9IsNX+RhTLQs+yLsyw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rplnP-00000000oe8-2ZiD; Thu, 28 Mar 2024 10:11:39 +0100 From: Johannes Berg To: linux-um@lists.infradead.org Cc: Johannes Berg Subject: [PATCH 2/5] um: slirp: remove set but unused variable 'pid' Date: Thu, 28 Mar 2024 10:06:35 +0100 Message-ID: <20240328100640.93259e4a5f81.Iedc5c3ffb2c7b09c74ef096c42fb55b624a13931@changeid> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240328100640.d3ffb37dc64b.I2e2e713d6a78ea24e6508db9d3ef2882b88861da@changeid> References: <20240328100640.d3ffb37dc64b.I2e2e713d6a78ea24e6508db9d3ef2882b88861da@changeid> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240328_021142_646053_8A86F0B4 X-CRM114-Status: UNSURE ( 9.06 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Johannes Berg The code doesn't use 'pid' here, just remove it. Signed-off-by: Johannes Berg --- arch/um/drivers/slirp_user.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg The code doesn't use 'pid' here, just remove it. Signed-off-by: Johannes Berg --- arch/um/drivers/slirp_user.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/um/drivers/slirp_user.c b/arch/um/drivers/slirp_user.c index 8f633e2e5f3d..97228aa080cb 100644 --- a/arch/um/drivers/slirp_user.c +++ b/arch/um/drivers/slirp_user.c @@ -49,7 +49,7 @@ static int slirp_tramp(char **argv, int fd) static int slirp_open(void *data) { struct slirp_data *pri = data; - int fds[2], pid, err; + int fds[2], err; err = os_pipe(fds, 1, 1); if (err) @@ -60,7 +60,6 @@ static int slirp_open(void *data) printk(UM_KERN_ERR "slirp_tramp failed - errno = %d\n", -err); goto out; } - pid = err; pri->slave = fds[1]; pri->slip.pos = 0; From patchwork Thu Mar 28 09:06:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1917198 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=slV48bxk; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=sipsolutions.net header.i=@sipsolutions.net header.a=rsa-sha256 header.s=mail header.b=YZNRTvnJ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V4yTb69Q1z1yYk for ; Thu, 28 Mar 2024 20:11:47 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mYTYdP3mOgcsMusGGChd6ekEbeBpCSRv5NcGhhE2fko=; b=slV48bxk24V2Dd2Bt7+MpoOYUO EaAMkPhkkSAHzDphCZPF8rmNU3MfLnQ/sLY38vOuybj3OJgjjUXYgNCPWsdclcWZ91K9FBms3gySt HEG5yF7fyBrtv4WpmytTE+VEX5P1uIEr4Hv+a5k29j2yKAVKrJ/I9DG85WOEDTaEcNtCKqiHD3kXi CrwbvOxOEX4CAIzeErO0tpH2Pf+DYXul2rLA7TRrTD5B3zwYxzAu5t/uK+pimSVZgiKlHkjdzlGBI 3QyorMV2/ODpcW8mfJoM7a64okTNXVI+ByjdAXTBiIfvPEEBVftlCaOfW5Qk02i3GP7aX9U/AFn1E IguV89bA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rplnV-0000000DFWR-3WiP; Thu, 28 Mar 2024 09:11:45 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:242:246e::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rplnS-0000000DFUS-1P40 for linux-um@lists.infradead.org; Thu, 28 Mar 2024 09:11:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=mYTYdP3mOgcsMusGGChd6ekEbeBpCSRv5NcGhhE2fko=; t=1711617102; x=1712826702; b=YZNRTvnJsAtXdT6mvDhGpZ5hIgtiwqe+6bWVPmntq2RygzT s5AYyTzTAG0M2nCwp74zcRN1opeJhaqvtNZ1yH4XKOs7/+5ObvrpI+VkoLdK4mFjnY3ks1tSkafeG /yHI4ALWnXESy/zZ++cQIZz+qFZAZ71GvqnHa7N8ZQOwYGe7gSnycgnKr8q+OzBMwMqYLURRlJzsr no7THFMupTvTcu8xQG9qMY4WpGpIFv4P5HGMOGCRO/gPKIsSSjEgsHSmnS5jgrhatch8Ia+r04fWe btW2B0S3GwEpGHfUAdtJuAl06eaKjbsrzYo9+XrTiB7yc+h46KG4bIuW0Y1XPiRw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rplnQ-00000000oe8-0j5c; Thu, 28 Mar 2024 10:11:40 +0100 From: Johannes Berg To: linux-um@lists.infradead.org Cc: Johannes Berg Subject: [PATCH 3/5] um: vector: fix bpfflash parameter evaluation Date: Thu, 28 Mar 2024 10:06:36 +0100 Message-ID: <20240328100640.1fe2aa1ac586.I9225b571409fd75485cacf2d9542efc630e997e9@changeid> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240328100640.d3ffb37dc64b.I2e2e713d6a78ea24e6508db9d3ef2882b88861da@changeid> References: <20240328100640.d3ffb37dc64b.I2e2e713d6a78ea24e6508db9d3ef2882b88861da@changeid> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240328_021142_434606_498E528C X-CRM114-Status: UNSURE ( 9.46 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Johannes Berg With W=1 the build complains about a pointer compared to zero, clearly the result should've been compared. Fixes: 9807019a62dc ("um: Loadable BPF "Firmware" for vector drivers") Signed-off-by: Johannes Berg --- arch/um/drivers/vector_kern.c | 2 +- 1 file changed, 1 insertion(+), 1 [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg With W=1 the build complains about a pointer compared to zero, clearly the result should've been compared. Fixes: 9807019a62dc ("um: Loadable BPF "Firmware" for vector drivers") Signed-off-by: Johannes Berg --- arch/um/drivers/vector_kern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c index dc2feae789cb..63e5f108a6b9 100644 --- a/arch/um/drivers/vector_kern.c +++ b/arch/um/drivers/vector_kern.c @@ -141,7 +141,7 @@ static bool get_bpf_flash(struct arglist *def) if (allow != NULL) { if (kstrtoul(allow, 10, &result) == 0) - return (allow > 0); + return result > 0; } return false; } From patchwork Thu Mar 28 09:06:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1917200 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=uScs3VNO; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=sipsolutions.net header.i=@sipsolutions.net header.a=rsa-sha256 header.s=mail header.b=juKxyDdB; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V4yTf0pgdz1yYk for ; Thu, 28 Mar 2024 20:11:50 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4CqmHBgGuhDFAhbRLiaVScv62RrdX1L+enWVRXV7cUk=; b=uScs3VNOnlK7UL4oYfaZi3OSml 93NHgleOJzbDgEw63+Nyd0OtPo/HkrlYf5xaIACGQ2jsnbDvbbFEAJl9uBDiQR6Qqs89gmZJZ/Swh xApqr7F3CiDLFfFSbVHGmAKLbJxusESXaqFUe+9NhiIN//Je3r+/wC4dxKmNoHNPILNDIcjimMGtg Je/Cj3dB/lFvjqnfB/sEXuRvVm7hBnKH6b/voms6mZ1GFxhvvjVJpOIG4ccSOwRUeBLDLUdd8LZqi 4oPmtwzdPhWummyyE48tVQY1CcZLxeaYwIYCWca9plrxE/cmTQF7WjbioJv8CzDONtgPPOk5YJ/Uh Rg4pqU6w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rplnY-0000000DFXQ-1Bxa; Thu, 28 Mar 2024 09:11:48 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:242:246e::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rplnT-0000000DFUa-08mv for linux-um@lists.infradead.org; Thu, 28 Mar 2024 09:11:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=4CqmHBgGuhDFAhbRLiaVScv62RrdX1L+enWVRXV7cUk=; t=1711617102; x=1712826702; b=juKxyDdBmWr7AwOkl5ioOEuOqXLLmdY1ipmYm12eghEQga1 4Cdb2v4M8utju1IITVd7BRP9R6rwYjEzermFmYReGJZldFilcpnENAT7KDrjhxkl0WnhJ2NMJAmNK 6cP3oaLyp59aqGVaTUT2GNlulsas9/+Bdj4am67BHhucuOX2pJIEqV3XCruNcltYXyDwEh8nIhToF fnlZaLtq/e2Bqss9czow/VW88Fx7gRE60UPTje4ytNwGesJh3ITGndyxgyzyakcNHeDKpJ8O11gVF cZA+CMlnIlTM4zvRsiG72gty3WugEwykwFefB2MO8aGtwF3YhPo/dBODDzv3mL2g==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rplnQ-00000000oe8-3Ryz; Thu, 28 Mar 2024 10:11:41 +0100 From: Johannes Berg To: linux-um@lists.infradead.org Cc: Johannes Berg Subject: [PATCH 4/5] um: vector: remove unused len variable/calculation Date: Thu, 28 Mar 2024 10:06:37 +0100 Message-ID: <20240328100640.da2074437deb.I8dcad89b470978e3856258d7111ddb101037acdc@changeid> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240328100640.d3ffb37dc64b.I2e2e713d6a78ea24e6508db9d3ef2882b88861da@changeid> References: <20240328100640.d3ffb37dc64b.I2e2e713d6a78ea24e6508db9d3ef2882b88861da@changeid> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240328_021143_096433_E33D61FE X-CRM114-Status: UNSURE ( 8.38 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Johannes Berg The len variable is unused, so not needed, remove it. Signed-off-by: Johannes Berg --- arch/um/drivers/vector_kern.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg The len variable is unused, so not needed, remove it. Signed-off-by: Johannes Berg --- arch/um/drivers/vector_kern.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c index 63e5f108a6b9..4279793b11b7 100644 --- a/arch/um/drivers/vector_kern.c +++ b/arch/um/drivers/vector_kern.c @@ -712,11 +712,9 @@ static struct vector_device *find_device(int n) static int vector_parse(char *str, int *index_out, char **str_out, char **error_out) { - int n, len, err; + int n, err; char *start = str; - len = strlen(str); - while ((*str != ':') && (strlen(str) > 1)) str++; if (*str != ':') { From patchwork Thu Mar 28 09:06:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1917201 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=FJrij+kg; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=sipsolutions.net header.i=@sipsolutions.net header.a=rsa-sha256 header.s=mail header.b=JyXVg/rY; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V4yTf5100z1yYR for ; Thu, 28 Mar 2024 20:11:50 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fjWputmxWIOxc8zEZ0YweNF74ZEvqCJV1sDZ3d34o6g=; b=FJrij+kg4PFezPcx7LyWaVMhPo dFWHCFNuhuz2XTca8qX181aPSXSO/+GFGp3ebZL7KLp4Rk0FTOD6VlgoA72dsgEo+1emzuXlYsoI1 4O4HS6dnvZcxW+PwKMXXVJpAn7BBzVHun3IbcfK6V1dblizPTkRQm4bVaxBBsz4C6VzmH3RuuArJO 85B743lFw/iMLwTqCawW3ar+qWhKr9dEyW2tUOCO8I93gZ29Bv94/GBqrirQ/vXZZVSmshk9AlSFJ rAaLILpNBuYwf12dtyN/NIgFgS04y23MKR/0I8KxIIFtAf3xGJ+N3XXm13rtXUzT7OpZR6uQTE2JZ wcnY/l1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rplnY-0000000DFYE-36ly; Thu, 28 Mar 2024 09:11:48 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:242:246e::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rplnU-0000000DFVQ-1G6H for linux-um@lists.infradead.org; Thu, 28 Mar 2024 09:11:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=fjWputmxWIOxc8zEZ0YweNF74ZEvqCJV1sDZ3d34o6g=; t=1711617104; x=1712826704; b=JyXVg/rYW7w15u0g4eMhVvdxH4lyyBfP6IOAIznlqQFhoUV kL77Ien2BZxj5SvUfc5AhsmspLiZPIrDdYe8nvDHERWcvfJubGczsTDUZGSBwJMg6Jm9Vo01Fl78i JW46Vw42HbdEYeu03Y04T27DSRBrabpbYI/cff93EFGtXsaJmuXuEToTJDzIQlEgcqtPwyW4XiYjP UM0aVmM9sWrLDUJbu//yTcJeJvSx/Wv7XIWD0Kxp+u61WNc78BpjG4vAfQ7ZJ0fXQ/CDcc6p2iS/M XdUSS/vvN62ZBb0lHg2HOIjqDgvM930ZPWeD/gojwEP4auhd6FFi/FHtwYV28oDg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rplnR-00000000oe8-26vr; Thu, 28 Mar 2024 10:11:41 +0100 From: Johannes Berg To: linux-um@lists.infradead.org Cc: Johannes Berg Subject: [PATCH 5/5] um: process: remove unused 'n' variable Date: Thu, 28 Mar 2024 10:06:38 +0100 Message-ID: <20240328100640.cec1867f0944.I739ea3921fa4354f4afcd6de1d3db2056ea11c72@changeid> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240328100640.d3ffb37dc64b.I2e2e713d6a78ea24e6508db9d3ef2882b88861da@changeid> References: <20240328100640.d3ffb37dc64b.I2e2e713d6a78ea24e6508db9d3ef2882b88861da@changeid> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240328_021144_361002_1FF0DE3A X-CRM114-Status: GOOD ( 12.29 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Johannes Berg The return value of fn() wasn't used for a long time, so no need to assign it to a variable, addressing a W=1 warning. This seems to be - with patches from others posted to the list before - the last W=1 warning in arch/um/. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg The return value of fn() wasn't used for a long time, so no need to assign it to a variable, addressing a W=1 warning. This seems to be - with patches from others posted to the list before - the last W=1 warning in arch/um/. Fixes: 22e2430d60db ("x86, um: convert to saner kernel_execve() semantics") Signed-off-by: Johannes Berg --- arch/um/kernel/process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index 30bf7739ed0f..d2134802f6a8 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c @@ -102,7 +102,7 @@ int get_current_pid(void) */ void new_thread_handler(void) { - int (*fn)(void *), n; + int (*fn)(void *); void *arg; if (current->thread.prev_sched != NULL) @@ -115,7 +115,7 @@ void new_thread_handler(void) /* * callback returns only if the kernel thread execs a process */ - n = fn(arg); + fn(arg); userspace(¤t->thread.regs.regs, current_thread_info()->aux_fp_regs); }