Message ID | 20210518053131.87212-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 4FklhK46nmz9sWP for <incoming@patchwork.ozlabs.org>; Tue, 18 May 2021 15:59:45 +1000 (AEST) Received: from localhost ([::1]:33980 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 1lislb-0001So-IF for incoming@patchwork.ozlabs.org; Tue, 18 May 2021 01:59:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38958) 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 1lisKy-0008Cz-5q for qemu-devel@nongnu.org; Tue, 18 May 2021 01:32:12 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:58617) 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 1lisKt-0007FQ-Hh for qemu-devel@nongnu.org; Tue, 18 May 2021 01:32:11 -0400 Received: from quad ([82.142.31.78]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MPGmZ-1m7pAk33gz-00Phn9; Tue, 18 May 2021 07:32:03 +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: Tue, 18 May 2021 07:31:30 +0200 Message-Id: <20210518053131.87212-59-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210518053131.87212-1-laurent@vivier.eu> References: <20210518053131.87212-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:SXGcUCyk2w4MelPvXMCf4xCSBuyTpvDgnePVpFH2wbhHnKOoQPw gx8uD+hQ7Cj6bHNo4yvW3ujs5IIyqToeOnvTvsxYNvMuuWmquxN/7J6TcgG1KXzpjl8vpD8 7ZaJWDHp1OvjkqiY4bFh6gmk0OqSWrDfPmodDYhn/w8dLu+fKwv+FS3g26Og60Izyn+bBd6 jvV4U4Ja66hDHe6FVBi3w== X-UI-Out-Filterresults: notjunk:1;V03:K0:ZyNJWaNQIvk=:VWg7DxfF3iyke5xYsKTcrW rONkeEg1lFVqGmtqQdlG8MpL2LhJk9lXVJldvnSLv6V97r7dZeNaU27xwmcQH73cqKyp7TDew Lgd27UmLdE39vEyD6HfpRYs5cn37ajtgThc5X/odEQ/QiATiBVjmtsKmRpLSZaZVd1WbOgYYB +2g3OQwZqHQ612j5MNeX9gM/0GwYAJwGjdjN1Lrvkrbzh/DSiBJ1pT8CVvB0MpRE86WnHiEXB 4ZRqOVV9DY4V76/nLZHntIrPGqdUaOsYiqEHJnDW5728AsOP4yeLPVkQr6kDrLlblrI3eH0UD VPmpzTkdRQgDcd+Uogt9M8gHAXfnuFocfuoQ4QnsqMveYfelJCBzrCSrBZkFSEuuVqOYbF8Hp DuvLsCH6clWOV1X2Iju8yu6PmwIGDbaM1IIFe4KsAXjs9P006pz+DYnsdc3kHSe883Ibt1aC3 aH9q7n41PZLkoT0cZBeYSoM1BuxPOcuoIV8xVotzn1Aib450cf153UNKTYPy7FQn//xLYxiWq GT1l2UL82ZBhExLQ8CdpS0= Received-SPF: none client-ip=217.72.192.73; 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] = ' ';