From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.202]) (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 3AEF442A797 for ; Mon, 6 Jul 2026 21:01:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783371662; cv=none; b=hheqEOgGYtDjsxQzHQd4jEvjJgC0DnyF5ie2Q2X9NURJsXQFvPc5cO/0eQdodhN9BUphX56IMoDg0zFmYmtnd+C1bmcENwfQUh+157Qpr+EU6g8IQXMtgLPhPk1EjDCiv69Rsvflj8g82fAQRBz0Vr3YgjyVlA2YrmfcUnwa2F8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783371662; c=relaxed/simple; bh=s3HmX/X+f0lhUwieovc5I87ItO93dMcnh6GKz5aaolQ=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=JrXqiAQHEIn7TNT8rc/Z81+SJ5atsbBwCUs55O/FTE/M3n0thvBWMlAHprIulOyWxyBGTjzxXEZjzI0PxJUhaAMuWwJgP5zTjgMGaWgLAN+tnD6RBa5S+fkcvyI6AUJvRPTB7Y+wOVMqZIBbm1VEf86RXi/Yo/+MjQmlNMWfd5k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--tadamsjr.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=NCuKt/7X; arc=none smtp.client-ip=209.85.214.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--tadamsjr.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="NCuKt/7X" Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-2cae134ab3aso59523465ad.2 for ; Mon, 06 Jul 2026 14:01:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1783371659; x=1783976459; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=lLV4dGqOqstjD7NgUACah9WKGnrbohBkKXo+o2sEYrw=; b=NCuKt/7XGoK46qNZoIaHz/qHarKbbmuXqs2MYPqvjg2balsLZeQbHoibsCCmU4gh2t Cbf9wHD3+21nB1rrtH7cGldUEJoibiMk+5wb9uqAI2b2GF39RREUWBRdTEZl0GTP9wTb N/wHqNyUo2EZxayz+/nYVX2iTeUM6nGSDAaVC7nAOve9EWTi8hyf1rn1ICKLAX2LStjd srscODy9wytDkSvsJ3HTsfKqK6xmWai6fTXXyvqFDW6sqYwbEbLy/SgNqtEP6TG3oR/R mcqsjOna4rTY8XUdXUaYksu4OEppJPfiAfMO5wHGhSiQZLKkYLv5qjsyoLfKfOHyZXJ9 HsGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783371659; x=1783976459; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lLV4dGqOqstjD7NgUACah9WKGnrbohBkKXo+o2sEYrw=; b=fhqPY/4zc/7w0+7Nld0rTmO6iE/H/Ze+APSrtzbufoBYqf3udiIElDxsEqnSnzz+5C 35LUwROJddSRMQ54u+gBTVAcqessi7FKSaSbwWNcmqKQekwE2EzSp5YOxCbhgplbYfMN yA6eoFjSAKNvqxvZZwMF/mbEBJZMMP9yQQFXGCWV6mcGJXnUX88JdCD8tqqJRco9F3f2 B0WVezn9k1Qsv0Kffehs7fqVw5Ehk4l+6ri0oRApopdgUK8MoQ1BnX8wulLt1XRFJIFf 7ctPbQ67cfWiKKeDgXT1bEy4AxenfIz6j0PDNIvuZFJyN56N1K2NwBv2dkYAlINJ+YVa 8g0A== X-Forwarded-Encrypted: i=1; AHgh+Rqb/wYS43+utG5G5wT5ZZanknCehQ2NhrjQnDCydctAOZ2pOUI89/86jeCsfjgMtbxXYNdEeVYUhgt/pPA=@vger.kernel.org X-Gm-Message-State: AOJu0YwpbHVo4MAV6WgRG9nnUXSr2qaXRBoGuen//Nw1x7h5lbshzoiE a16rN8AY/0GBFuZrZHCRKxApuntiProUGxftasSGwVIcQb9xyyxOFVZKwqExv2m7uDtP+mnZbEx pYliHIe8vBNDyhA== X-Received: from pjbdw23.prod.google.com ([2002:a17:90b:957:b0:381:224:393a]) (user=tadamsjr job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:2d89:b0:381:18c3:1b99 with SMTP id 98e67ed59e1d1-3875779b61bmr2257011a91.23.1783371659024; Mon, 06 Jul 2026 14:00:59 -0700 (PDT) Date: Mon, 6 Jul 2026 14:00:52 -0700 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: X-Mailer: git-send-email 2.55.0.rc2.803.g1fd1e6609c-goog Message-ID: <20260706210054.1336654-1-tadamsjr@google.com> Subject: [PATCH v2 0/2] Fixes for security locked drives From: TJ Adams To: Damien Le Moal , Niklas Cassel , Hannes Reinecke , "Martin K. Petersen" Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, Igor Pylypiv , Salomon Dushimirimana , TJ Adams Content-Type: text/plain; charset="UTF-8" These patches improve libata handling of locked drives. Changes since v1: - Simplified the n_sectors check in ata_dev_revalidate() as suggested by Niklas - Added Patch 2 to disable HPA resizing for locked drives to address Sashiko's feedback. Testing: - Verified using the internal test suite that originally detected the regression. - The issue can be reproduced manually using the steps outlined in the thread (runtime locking, disabling SSP, active I/O, and link reset). TJ Adams (2): ata: libata-core: Skip HPA resize for locked drives ata: libata-core: Allow capacity transition to zero for locked drives drivers/ata/libata-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.55.0.rc2.803.g1fd1e6609c-goog