Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2705470rdg; Mon, 16 Oct 2023 12:11:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHeR7Ph73lPbDAXLPi4o9RHWN3b7Sa3WSAAoaAiTSvlYq2WVGhJkN2sBtNa70d9T4rFKECO X-Received: by 2002:a05:6359:c87:b0:143:383e:5b22 with SMTP id go7-20020a0563590c8700b00143383e5b22mr305811rwb.28.1697483505017; Mon, 16 Oct 2023 12:11:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697483504; cv=none; d=google.com; s=arc-20160816; b=mZZTvLtabMOM39rt29dS7QLniWVX5Xrsfx/EqHINR8kf2h4gXz54Huee6KUCzj1TJ3 jlOufIMAyGznO7qRSCiO4LmZXnBhUtyjgXOysqSv4FPa1DlPKxenki9OSsHkA7VB9uJP d5QyCO3s47AXgjAvJ9SCGDAH1KClQ56uTVhGhDgTw7Fp+oHYr9qKpfvBcAR1JiT1MUcZ MIdL4S/CNpRQmVYT7eyzYRDAuedLiySi0scik5/IDQmCo4TlzZyYzKtOYquPJrRBjY3y 0hd38L0DrldK5wI4ak23bC6VgPigKIzSkFcuvU2Ty5BJWzBn5zrQr3qlXXi33wEhHSe+ BfRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=97Jr9vviM+x4SUD86jnNmVMmDRCtqdF2LUTUyfs0IuE=; fh=YgH9L25qqwnPaDsZu8q8fX2DSbO1glmDWY1lhAJsj88=; b=ZB81X577TXhPnii+LecmPYK2XTEZLIl+xIBvP1LshvWcwoANLvhss8R5by2lWzWxM1 /Z3AkYvBQ8uL9X2qTrHeFsARZhvZaaebDuRsogZ5bT66+QhCLWUeix3oaYnnz3M5Ga14 8AA8L/S+Oby5ovjADPAR0j8QwIkT3d+hBzcKQ1fj248dQh2uNePZm+Hc7ie3QmYZsVOI KKv3l4Zb7nRDU6wXs5dVdUjNUQG/Lx8p8Z637/tuTZrHoFVA66xz9Gj+ay9ExY2h1Jq8 npCNggF5B2ll5XDxm8SulhGFnSqG3nOY3i075Z2ycNoh+U4MgtA2nEtKx+hw6kmq8kn7 /X9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b="C8Wee/a9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id t13-20020a056a0021cd00b006bd78b99aa5si434663pfj.334.2023.10.16.12.11.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 12:11:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b="C8Wee/a9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 7AEAA809BE51; Mon, 16 Oct 2023 12:11:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233109AbjJPTLU (ORCPT + 99 others); Mon, 16 Oct 2023 15:11:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232983AbjJPTLR (ORCPT ); Mon, 16 Oct 2023 15:11:17 -0400 Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6BC2A2 for ; Mon, 16 Oct 2023 12:11:13 -0700 (PDT) Received: by mail-il1-x136.google.com with SMTP id e9e14a558f8ab-3575b6d3080so2544755ab.1 for ; Mon, 16 Oct 2023 12:11:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1697483473; x=1698088273; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=97Jr9vviM+x4SUD86jnNmVMmDRCtqdF2LUTUyfs0IuE=; b=C8Wee/a9/1LvZYsKBum+9iKkp/2TtutIAawRh3NfY0XRHaB3tm1fS7Zo2SYOSYDQ94 BcrDtbNYr7EDtmIqETOfr/X1f6pvq9juDMXc7BccCs6q6wK9aJMTZhb0GXqEX17VbwQ/ OlE6ksMZ/RyYgzP8Rc9+LQUgP1mAduNKu0tMI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697483473; x=1698088273; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=97Jr9vviM+x4SUD86jnNmVMmDRCtqdF2LUTUyfs0IuE=; b=KpnJCdsyyHfX7yuhT2jJBaubVT631tad/4jFV7kaV2Zv8bbSB9mrBxhUuNZR6x2ac1 e7QGf/Hsz0rCHw7dAtd3m1TZc3nnFtrccxSrV5TNWB43XUt12KuSVGhv8Nqe7TQeDo96 KU/l9Ob0VbCAiIQohE5dz58OSK9/nz1IZo0ojzOOlYwxrETce+Nc1IjjHJGIfqzinlS5 4F/ty3h8BOV1OzyM04Bu40C33fF0UQH08FDY8wOUlcxRP35GWb3gcxdeMdgFQp/c7CMk P30FhANIqyQ0C6MH4E6bgmIGCY9YoYtFFb3sDFNNeKRAkA6Dkq+jVj39YraAYjK+ZrCF s6Wg== X-Gm-Message-State: AOJu0YzT67ZiUgkGvxXR6utMiH5i1uxxCWAPQSQYI26y9vmGnu+3y3YE rnnGn4gWkKlL0+KOQ8tz26KTRu25MkVb4zcABK0= X-Received: by 2002:a05:6602:342a:b0:79a:c487:2711 with SMTP id n42-20020a056602342a00b0079ac4872711mr224390ioz.0.1697483473240; Mon, 16 Oct 2023 12:11:13 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id b13-20020a02380d000000b0042b4f9ddecasm1881402jaa.85.2023.10.16.12.11.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Oct 2023 12:11:12 -0700 (PDT) Message-ID: Date: Mon, 16 Oct 2023 13:11:12 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] selftests/x86/lam: Zero out buffer for readlink() Content-Language: en-US To: kirill.shutemov@linux.intel.com, Binbin Wu Cc: dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, shuah@kernel.org, linux-kselftest@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, Shuah Khan References: <20231016062446.695-1-binbin.wu@linux.intel.com> <20231016084723.icjv6mj64ocx2hoj@box> From: Shuah Khan In-Reply-To: <20231016084723.icjv6mj64ocx2hoj@box> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 16 Oct 2023 12:11:42 -0700 (PDT) On 10/16/23 02:47, kirill.shutemov@linux.intel.com wrote: > On Mon, Oct 16, 2023 at 02:24:46PM +0800, Binbin Wu wrote: >> Zero out the buffer for readlink() since readlink() does not append a >> terminating null byte to the buffer. Also change the buffer length >> passed to readlink() to 'PATH_MAX - 1' to ensure the resulting string >> is always null terminated. >> >> Fixes: 833c12ce0f430 ("selftests/x86/lam: Add inherit test cases for linear-address masking") >> >> Signed-off-by: Binbin Wu > > Reviewed-by: Kirill A. Shutemov > Thank you. Applied to linux-kselftest next for Linux 6.7-rc1 thanks, -- Shuah