Message ID | 20240424225123.929152-3-richard.henderson@linaro.org |
---|---|
State | Accepted |
Commit | 04f6fb897a5aeb3e356a7b889869c9962f9c16c7 |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:4884:0:b0:346:15ad:a2a with SMTP id g4csp1091890wrq; Wed, 24 Apr 2024 15:53:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW8rrvdTNVlw7n5jcXmJC4L3HQ1cOzS0ArgDS+6bRPhtTtrWJCyDFRCdpFkyLDufD3Wq+62NeLpP5Yb9Rc6f66P X-Google-Smtp-Source: AGHT+IGejCxZ4mIrR6LHQKhHFzXcuEFNqEoXE9IWuRnGsuLLsQlK3t68G81zOTLSmjktG1omyaCp X-Received: by 2002:a05:6214:bd3:b0:6a0:5626:122c with SMTP id ff19-20020a0562140bd300b006a05626122cmr3825355qvb.58.1713999179877; Wed, 24 Apr 2024 15:52:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713999179; cv=none; d=google.com; s=arc-20160816; b=KfQqCM4ewu665hd2A0dR1bKUpYOBrFfUgOB+7lTJYRxk6vq5E6HEJvE5OamQ41N3xr UrHYC2GQ/AwXvVExohgCMiqZldVfgDGSlP/3Fyi6AmurXqurAIu4TtQgMyOTh/ks+msv rXL+br3oU3BTb71iCSa1Uro5DJBzjphlpLrm4t7dtMs4yckX/OU7Eqv64QBjUCPWWOsO nnx5Ui64VBPo9myDvplObri8h7+0eedqLBphns0tL3ov8f86yNZ3ne3sxM/34b7j4HwE 1SlF7CVEcehqBoZRyM1kcVkgQVXlJuhVXxTASQXw9ApYiu+K/8TqKU/T5PJ9MJ2NXkVN sGKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=eljbs2yNGMGPnWHJwv7NSq5kkRuO1URzZsDZcIZtS6U=; fh=TF63Ze67lDnVlkd8xmxXNff2WGh+3exboZvnQbD94Yg=; b=hgJnSwiKkLoQ8Dtmb/Qz+Qat8PT9HFf/UC6bUzPYE7Z+zO+iUhJu2YhB7xWXkQknck dmH6xRi0o2W/qy0FuziDaRFzTcweSiGcFSRugMmTc1e/6QU3ixhGgGLG32zpvOLFP9kX rIntR6zs/1fy9YoOcQbX3oY2o1l+y0rA+6XRmxIIuo4lLCUxxozUKrCyyjy+VYrKedC/ jWoem3KshnQjav1lGPcB47eXnOLpOFVCe740xDWjsI9sx5pq3rCvbIQ3ezXU3zowieCH Q/oZEB9DJiTYq7kXa3S5GNBeDILNIm//abrg3d0jf/UvTYC2EhCcPWyOFkWBRcTT801r BPxg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=usK6UKzC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id kd2-20020a056214400200b0069925c427e4si15878070qvb.69.2024.04.24.15.52.59 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Apr 2024 15:52:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=usK6UKzC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1rzlSf-0006xQ-Lq; Wed, 24 Apr 2024 18:51:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1rzlSc-0006vk-Ft for qemu-devel@nongnu.org; Wed, 24 Apr 2024 18:51:30 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1rzlSa-0006f3-N9 for qemu-devel@nongnu.org; Wed, 24 Apr 2024 18:51:30 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6ed112c64beso427631b3a.1 for <qemu-devel@nongnu.org>; Wed, 24 Apr 2024 15:51:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713999087; x=1714603887; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eljbs2yNGMGPnWHJwv7NSq5kkRuO1URzZsDZcIZtS6U=; b=usK6UKzCb0VsgHONVjfFftPh6lKhjR/dE9mB5CHzE+wE04bVVvnjseD/cGMgCD30lk 0o7zo6FruHCExRFxVpGzabksn5XnfX6/OhHnyC2GXAS9+Z2RJ0bfOQ+nmyrRIjlO3YBV qbM8JHS1bsC1RHQsbVKI2mKeizEmp4/jSC0agJnT6VPU8L9JUl/VIc961QL9cE0kUHib 1mxB4MizoPORy2ED+lpOrs65d2PAzmqxsGX5hS0bp6SBuGRNM66Jr41Kor6YZZqKmL+p 4qziw7Bdp9DoyJgBQ3owTvBx0ieQNaFLaWChrtFrHvfnwVmbElujMgNLB/K/8+QzBznr Pc4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713999087; x=1714603887; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eljbs2yNGMGPnWHJwv7NSq5kkRuO1URzZsDZcIZtS6U=; b=e/sWSAyg7byxafTUQQmWwJaFaexn5pnxozbXOlpjppEJgcK9QjYK/CnurPCYig+67f Aa0WKTf3e9A0EPMSwOe967bemaRjeZM9q7jIvHGtw/01Pkc2Gig0jcmXFZjwA80fNkeC Nc2S6NS5SudpiKfcarFoqulsQvr+VGmO+DBi7s7YZetAkqmgNjHYHDphSVfVIsN2I1xe K76e9fP/QaAUHmNfRwm0ez7Q2gu+J+O3rNUYVIodgWBEBq4uXAvkitmi/IT8ysyw3S1+ En+FShW45JWbgaGd0oh86yKcQih+P6HlrlDjDt4Ho2b2jHCL8GLziO7sxNWwG5n2pNRC jV1g== X-Gm-Message-State: AOJu0YxJsOpWXmlqtcyx4CZeRwag/y9tjLuFMTUU2l5V4jA7tngm7f/c 4GSl/2Ro2MYQJS3MaNdvXQrG1VweudDVIaGAZbNJU9TEGRaeCDhP6eIEN6XwzfNEwk1aSUH6J1V N X-Received: by 2002:a05:6a20:6a12:b0:1a3:7de2:12b6 with SMTP id p18-20020a056a206a1200b001a37de212b6mr4250188pzk.26.1713999087335; Wed, 24 Apr 2024 15:51:27 -0700 (PDT) Received: from stoup.. ([156.19.246.23]) by smtp.gmail.com with ESMTPSA id it12-20020a056a00458c00b006ead792b6f2sm11960864pfb.1.2024.04.24.15.51.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 15:51:27 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Cc: Michael Tokarev <mjt@tls.msk.ru> Subject: [PULL 2/9] linux-user: do_setsockopt: fix SOL_ALG.ALG_SET_KEY Date: Wed, 24 Apr 2024 15:51:16 -0700 Message-Id: <20240424225123.929152-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240424225123.929152-1-richard.henderson@linaro.org> References: <20240424225123.929152-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
[PULL,1/9] meson: Make DEBUG_REMAP a meson option
|
expand
|
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 3df2b94d9a..59fb3e911f 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2277,18 +2277,13 @@ static abi_long do_setsockopt(int sockfd, int level, int optname, switch (optname) { case ALG_SET_KEY: { - char *alg_key = g_malloc(optlen); - + char *alg_key = lock_user(VERIFY_READ, optval_addr, optlen, 1); if (!alg_key) { - return -TARGET_ENOMEM; - } - if (copy_from_user(alg_key, optval_addr, optlen)) { - g_free(alg_key); return -TARGET_EFAULT; } ret = get_errno(setsockopt(sockfd, level, optname, alg_key, optlen)); - g_free(alg_key); + unlock_user(alg_key, optval_addr, optlen); break; } case ALG_SET_AEAD_AUTHSIZE: