Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3222405lqo; Wed, 15 May 2024 03:33:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXqpIW3PYDeXNyVEJQJuqdS1F93uhyJr+h4OF9SDiznAsnxOEASaVDVgIHb9OUxkYYl+vBmvNOLmVE2SVN9Orr8qNPbMfsO+vwYcuEf1g== X-Google-Smtp-Source: AGHT+IFiYZdbj/w88iFv3/yNIlwrTh6IU5bSFjzIB9EeLWU3EFOwS2Kz+whso40S5mRz/JoKxWLg X-Received: by 2002:a05:6214:5192:b0:6a3:46a0:f79e with SMTP id 6a1803df08f44-6a346a0f818mr46021036d6.21.1715769218080; Wed, 15 May 2024 03:33:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715769218; cv=pass; d=google.com; s=arc-20160816; b=eSYT8cHK93bqsEFzRdCt+wtzpFqZaIy8mtWmNzQK02iVoWHd8TUOVxsSRrdw+acHo0 8aztMDKBWPEXCcPq05Il0aM/DdbxavOJLI0CnPglylx3OAJbjEkaNbVpX3dfDuBwlNNA EMuKpidRX8qx4pRNI5518Wcz8ISCBoD5/RoBJMPgRVNMnIEuP9y7/vbzh+VJV2P6lFNM zWglfUighqylajwpXpLAuXlteSShGmJPjRQmKH9Ses3LRzgOZGWF55HFWQuXaLeesouj f89uIMbvFlRbVdDBjjdd5lWek5aroThHdvmLbsQnNTPLnOeqMpIsZiq9odjGYXdw56XD GN5A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id; bh=5E2sB2pBYr3np4xznZt/8xphLK9uMA6XWTkmu1qlwTg=; fh=4g7Lhc1CA0X3QkVZB9DwexCy4frYnfC/Sx5AjQoe3Ws=; b=MC2d3rRUtxDJ/H/8CDYp2ECKL4mQ25VqVWGR1PNFuB9k5wdwIFZx/v07zPpYxBgU2U ckQj8gceca1b0VxeAxefalwzWWz/58YArTEGYdfvu+DbjPae8YS+RwukW7aRzq3VGpqG g4e1hbuFYf5ab7sNrqIf4OsY6IYAAfmBu5INhQvKBlS3lZx4l4FubvxduHrvAJ2+Rgn+ YFQgI9ZNAAyqReSfDcpJySP/iRlilLwBNQF286jrawdkS/PJIurJQDKmofOypM4uQiDG XOZUYQv0EMmgNlwhWSq9qOEHHHLvWnE5qtdpew9vIENBwdt1FJeRxYuwzj+NlHhjLsU+ jaQA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-179765-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179765-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f1d6d8dsi141848536d6.20.2024.05.15.03.33.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 03:33:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179765-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-179765-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179765-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B719D1C213F0 for ; Wed, 15 May 2024 10:33:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 611D25EE8D; Wed, 15 May 2024 10:33:30 +0000 (UTC) Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A5241F60A; Wed, 15 May 2024 10:33:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715769209; cv=none; b=aVhFqq3QTL+xXGEgg/JxAxqx0n8koSJx1ggFwDjlG5B5Ai9IZwECS2GdR4OfIx1SXmgstTXfhJBTcqWcThotvNHdWcVMUbedVaLod7gy27C1hptlivxlTfViiYAQ6vbKGiWa+JpCrGp7v5ZBpd839dL+ZWN/W/Nss5GZTrrJovw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715769209; c=relaxed/simple; bh=RuTxmaXPW9TWUDmseSr162fsqIHkGzTbkbkEh1b3r6g=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=pi/6fsQwpr+Q6A3NWXX9M5K6MfUfrnXOS4/up5OKmOVG2bkuReIIrkF7YHvbSMNJn0kHNj+rK5LDRw9UH1C6AkcGkjStOFygX0mUEZwTgDRft9A1OA+jfIfQXdooDs9DW+ZG/uhQ2jo41A240hRGQaeH8MNeGmfzdgTNa2znkRA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.208.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-571be483ccaso1561362a12.2; Wed, 15 May 2024 03:33:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715769207; x=1716374007; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=5E2sB2pBYr3np4xznZt/8xphLK9uMA6XWTkmu1qlwTg=; b=rJQTG7+VNYBZ8N+i7upSLT2Ef7w3/l1MMu9TZQ2o+t/Ze7QELsCPmy9g0Sse3iojfj t9DxZUxNfFViovpUOHs8IvO67kVjX3recfG2lEc6eqYl1u8a1ALIspCrsuyhksOlwh2c EbkiV3Mfa8F4aPqv4jECBRJpBMrvWkj04Y6Pr/VOqF/Bz6bt89KkQzd0u+n7yURbeWv9 Shbehg+URCwcpqOl/6T1oyxQhFL4OBeX9Iq17gtEiVYkLHpdFTJPvcHcYRJ+X9oOm7rY U9JJVmMEbkITgmngTMqzQIfD8p/mh7e8Okx9ax3Fh1YNZCZAyqAnS+0YmzAFhG8ACc9X OG2g== X-Forwarded-Encrypted: i=1; AJvYcCWkjeV+zq1eVExTPb9rFawCm1JDM78RdCbVARdULy4s0HKyfMqCy2CbF5tiivOXcOo1fsH01q/gVM5hKPVqCXaP9uJVFF3yJt8DEl6aMJdEbw5SCeJ3DI+ZHGrUxs/p8WMA2Q4shmjSg1xu X-Gm-Message-State: AOJu0Yxss2Eh6v9RJ8XzO90hENRqHxmYWMOgr1xNMvIHfgoK2+WjQ1ob ob/oqNk+V5F6yRtXUNeExrJGwD6g3pQ4nK/0XtEIZESG4Da3ephV5pIlpg== X-Received: by 2002:a50:8757:0:b0:572:cfa4:3ccb with SMTP id 4fb4d7f45d1cf-5734d5c1352mr10791703a12.8.1715769206479; Wed, 15 May 2024 03:33:26 -0700 (PDT) Received: from ?IPV6:2a0b:e7c0:0:107::aaaa:69? ([2a0b:e7c0:0:107::aaaa:69]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5733c2c7dd9sm8594830a12.69.2024.05.15.03.33.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 May 2024 03:33:25 -0700 (PDT) Message-ID: Date: Wed, 15 May 2024 12:33:24 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: N_HDLC line discipline: Race condition To: Dianne Skoll , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman References: <20240424173114.035ddd7b@gato.skoll.ca> <20240425140127.6504ade1@gato.skoll.ca> Content-Language: en-US From: Jiri Slaby Autocrypt: addr=jirislaby@kernel.org; keydata= xsFNBE6S54YBEACzzjLwDUbU5elY4GTg/NdotjA0jyyJtYI86wdKraekbNE0bC4zV+ryvH4j rrcDwGs6tFVrAHvdHeIdI07s1iIx5R/ndcHwt4fvI8CL5PzPmn5J+h0WERR5rFprRh6axhOk rSD5CwQl19fm4AJCS6A9GJtOoiLpWn2/IbogPc71jQVrupZYYx51rAaHZ0D2KYK/uhfc6neJ i0WqPlbtIlIrpvWxckucNu6ZwXjFY0f3qIRg3Vqh5QxPkojGsq9tXVFVLEkSVz6FoqCHrUTx wr+aw6qqQVgvT/McQtsI0S66uIkQjzPUrgAEtWUv76rM4ekqL9stHyvTGw0Fjsualwb0Gwdx ReTZzMgheAyoy/umIOKrSEpWouVoBt5FFSZUyjuDdlPPYyPav+hpI6ggmCTld3u2hyiHji2H cDpcLM2LMhlHBipu80s9anNeZhCANDhbC5E+N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K/+dyTKL wLMJgiBzbVx8G+fCJJ9YtlNOPWhbKPlrQ8+AY52Aagi9WNhe6XfJdh5g6ptiOILm330mkR4g W6nEgZVyIyTq3ekOuruftWL99qpP5zi+eNrMmLRQx9iecDNgFr342R9bTDlb1TLuRb+/tJ98 f/bIWIr0cqQmqQ33FgRhrG1+Xml6UXyJ2jExmlO8JljuOGeXYh6ZkIEyzqzffzBLXZCujlYQ DFXpyMNVJ2ZwPmX2mWEoYuaBU0JN7wM+/zWgOf2zRwhEuD3A2cO2PxoiIfyUEfB9SSmffaK/ S4xXoB6wvGENZ85Hg37C7WDNdaAt6Xh2uQIly5grkgvWppkNy4ZHxE+jeNsU7tg= In-Reply-To: <20240425140127.6504ade1@gato.skoll.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, On 25. 04. 24, 20:01, Dianne Skoll wrote: > I have (somewhat) narrowed down when the kernel bug appeared by installing > Debian 10, 11 and 12 in KVM virtual machines. > > The bug is NOT present in Debian 10, kernel version 4.19.67. I can repro even with 4.19: posix_openpt = 3 grantpt(3) = 0 unlockpt(3) = 0 ptsname(3) = /dev/pts/2 open(/dev/pts/2) = 4 ioctl(3, TIOCSETD) = 0 ioctl(4, TIOCSETD) = 0 write(3, Hello , 6) = 6 write(3, world, 5) = 5 read(4, buf, 2048) = 6 buf = |Hello | read(4, buf, 2048) = 5 buf = |world| read(4, buf, 2048) = -1 write(3, Hello , 6) = 6 write(3, world, 5) = 5 read(4, buf, 2048) = 11 buf = |Hello world| HAHA! Try #2: The two writes were combined in a single read! Could you recheck? > The bug IS present in Debian 11, kernel version 5.10.209 > > The bug IS present in Debian 12, kernel version 6.1.85 > > So I guess it was introduced sometime between 4.19.67 and 5.10.209. I'll > take a look to see if I can do a git bisect. Were you able to do so? thanks, -- js suse labs