Message ID | 20210517181424.8093-59-laurent@vivier.eu |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=<UNKNOWN>) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FkT1028qRz9s1l for <incoming@patchwork.ozlabs.org>; Tue, 18 May 2021 04:58:12 +1000 (AEST) Received: from localhost ([::1]:37364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1liiRM-00072Z-HR for incoming@patchwork.ozlabs.org; Mon, 17 May 2021 14:58:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34352) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <laurent@vivier.eu>) id 1lihm6-00075H-3e for qemu-devel@nongnu.org; Mon, 17 May 2021 14:15:30 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:44031) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <laurent@vivier.eu>) id 1lihle-0004cc-9p for qemu-devel@nongnu.org; Mon, 17 May 2021 14:15:29 -0400 Received: from quad ([82.142.31.78]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MiMIY-1lEItz0r7G-00fP25; Mon, 17 May 2021 20:14:57 +0200 From: Laurent Vivier <laurent@vivier.eu> To: qemu-devel@nongnu.org Subject: [PULL 58/59] linux-user/elfload: fix filling psinfo->pr_psargs Date: Mon, 17 May 2021 20:14:23 +0200 Message-Id: <20210517181424.8093-59-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517181424.8093-1-laurent@vivier.eu> References: <20210517181424.8093-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:+/At8f9TSNJZ0TGAWLYr9+ZJ+Wxk3Mn9EOcaa2PhcsDPEQzqclg w8fwxupAk+VlgftcyjUbXhFcZeCR6MS/3NXuIFQoXhA3V/jGERqJpaTEdUnyaR4sglvP70W dhd0Bxg7h8yrEQkGKrjiEm+djHFKd0zrkulHyOxORvuh44jFu1IwN7a1RldX2U+/Q5eU6Sw Jh764tSkDAsfyy435+dLQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:ioU0sDOAAkk=:plq9aaFDwZd5NNKL1ggw+/ UL4R+9M7EdIq9OxHDGQ9ZWsv4bh3DyrGZjwdldW15z5kxW8+KiCG/RTd79TXTKLUz7QwGM45G M306oofBNDwAie4eZeA6bP1ojGWQQ6WlfMb7zi/3l/tpMAiaI+Djg2hbuS2+bL9aVOZyxA+ox ehc11XH8ftTdGxE0HsD42bmD6+MKp12tfqBU8OZ7+bdsFJpowLMB8aD/6f1tKS79L4RLevWvW LXvbuRuT09MeFZjgCfXRtWRMemwVz+tocfMN+ngcx72XyVX1EZIrMMkDq8bQ/xEnHNBOHaF+3 1Z3utdl0XRqYfwe/TVDfvnfuvoMCFx8zID2kS1vl3cs+5tXAVqWSOYWyxDQPL6r5xsEPhQmEZ b16xK8y4hU08m84QoGeDeeYZl7OWi3dv3I+YyhWD2jCgTJAM8Pasd8Xe8UV9GuSLsw37LRW9u fYFWdsUEyivGLyJ+NXxeTQO3NYYbP+Iub2O+XPkXpA4dE7lzrW/lMX851D6tIP66PPk1FJ/3Q 5UChMA82Ta4sjdf/jQB6z0= Received-SPF: none client-ip=212.227.126.187; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Laurent Vivier <laurent@vivier.eu>, Ilya Leoshkevich <iii@linux.ibm.com> Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> |
Series |
[PULL,01/59] linux-user: Remove dead code
|
expand
|
diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 015eed1a27b4..9779263727ba 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -3618,11 +3618,12 @@ static int fill_psinfo(struct target_elf_prpsinfo *psinfo, const TaskState *ts) (void) memset(psinfo, 0, sizeof (*psinfo)); - len = ts->info->arg_end - ts->info->arg_start; + len = ts->info->env_strings - ts->info->arg_strings; if (len >= ELF_PRARGSZ) len = ELF_PRARGSZ - 1; - if (copy_from_user(&psinfo->pr_psargs, ts->info->arg_start, len)) + if (copy_from_user(&psinfo->pr_psargs, ts->info->arg_strings, len)) { return -EFAULT; + } for (i = 0; i < len; i++) if (psinfo->pr_psargs[i] == 0) psinfo->pr_psargs[i] = ' ';