From nobody Mon Aug 29 18:27:55 2022 X-Original-To: freebsd-stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MGf7r3D78z4ZPxQ for ; Mon, 29 Aug 2022 18:28:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-vk1-xa32.google.com (mail-vk1-xa32.google.com [IPv6:2607:f8b0:4864:20::a32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MGf7q5BNlz3XWk for ; Mon, 29 Aug 2022 18:28:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-vk1-xa32.google.com with SMTP id o17so2545631vkn.7 for ; Mon, 29 Aug 2022 11:28:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=cVz39SxwsBdM9LnJcVkbDFSlUqSa6QqWS8IxC9u+O2Y=; b=OAdsrpsSdSXPXB+JJx0uiyvgd/XBBYaVJ3gG1a+7todorF6W3lWtzGU8s9UH1kyV7e 5rGhryWsazjUgbgcW5Qwp5dfSVfjO0vvdnV6ymdlMR5TYHE2Axs2DEZxCFZ8uX4xdTn2 A2RKqhbiVGma3mhlfaPDLmv2GVtijb5GViMYDDGyUhwcurode33OpsYb6vFhw9mhFqmr WhKjrKaxAkDndmKVCrfeA+thYcGfQ5LEY25iVV4qaEO5UpIDjXCezVm0s3KtflWFfT43 1MtcPqCfoQ8X9qHmLtIFmltoNYROG6xmQ0+yk/L4FX56LICSB14+vqjmENgdxU/BJSeW 9B/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=cVz39SxwsBdM9LnJcVkbDFSlUqSa6QqWS8IxC9u+O2Y=; b=SyieIfvQ7Qhaw02uP6ndLxE8XzlDVqbcwjgfoo+5iGNGK0A9EqNq2Al0rSOMxXucv4 4Weefjrz0NMppjUdlfuB4K3dBXYMU8azE2F3Tq9f8IFpYZxRlvq68kFaV6Mei/wJ99Jr 9rFI+uTFYTxGtaymVh4eDKHN6PVbyATOQqasm0YGs6EHbgTLyT/YPZ8eL7MQIrsIvMuL Atk/sDVHLw/i0XYHencRw/jyTT5XrwyI0np7fsJP0FEDJ+RZg75svyfpffrctnFTVTrG bPV2eFLiAWgBr21+peNVfexGNfn+0ggfaBnRiDjbHTZuE5k+sSKKG4IyXS7fiReB3TSQ rVFg== X-Gm-Message-State: ACgBeo32ITzSChLSPJXJlAe/bVVRbM4+DuKWHmnrlhyr6KL01I/CQRek /JrIYbNQsa8LsDnU4NcQ6jPhXyNOKE4H5Kz7ictUAhzsi8TXUw== X-Google-Smtp-Source: AA6agR7q/bVRPgS91i+vSWqSjCTkFjYC3M6iY48zE6Ln5EqUMNnBJ4u+DxQuoU6u0XHBjZnL8R0wQ1YDIsx50Zs0ihY= X-Received: by 2002:a1f:5ec7:0:b0:394:4ef0:d583 with SMTP id s190-20020a1f5ec7000000b003944ef0d583mr2540154vkb.37.1661797686612; Mon, 29 Aug 2022 11:28:06 -0700 (PDT) List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 References: <3caeafa8-6c9c-2632-9010-9c8e21098378@FreeBSD.org> In-Reply-To: From: Warner Losh Date: Mon, 29 Aug 2022 12:27:55 -0600 Message-ID: Subject: Re: CAM IOCTL issue with 13.1-STABLE To: Mark Johnston Cc: Alexander Motin , Matthew Grooms , FreeBSD-STABLE Mailing List Content-Type: multipart/alternative; boundary="000000000000ccade905e7656c8e" X-Rspamd-Queue-Id: 4MGf7q5BNlz3XWk X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b=OAdsrpsS; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::a32) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20210112.gappssmtp.com:s=20210112]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::a32:from]; MLMMJ_DEST(0.00)[freebsd-stable@freebsd.org]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_SPF_NA(0.00)[no SPF record]; ARC_NA(0.00)[]; TO_DN_ALL(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCPT_COUNT_THREE(0.00)[4]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[bsdimp.com]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --000000000000ccade905e7656c8e Content-Type: text/plain; charset="UTF-8" On Mon, Aug 29, 2022 at 12:00 PM Mark Johnston wrote: > On Tue, Aug 23, 2022 at 09:44:48AM -0400, Alexander Motin wrote: > > Hi Matthew, > > > > I took a brief look on it and found that CAM compatibility code just > > does not cover that IOCTL. That is why when CAM version was bumped it > > cause the unexpected breakage. Short term fix would be to rebuild the > > application to new CAM version, while for proper fix somebody would have > > to implement the compatibility code for that IOCTL. > > I looked at this a bit more, and it seems trivial since > 1) for periph drivers, CAMGETPASSTHRU ignores the input CCB, and > 2) the CAM version bump from 0x19 to 0x1a does not affect XPT_GDEVLIST > CCBs. > > Note for instance that cam_compat_handle_0x19() is a no-op for > CAMGETPASSTHRU. So, isn't the patch here sufficient? > https://reviews.freebsd.org/D36389 I believe the above patch should just work. I don't know if we need to structure it differently. I don't think so, though... Warner > On 22.08.2022 14:48, Matthew Grooms wrote: > > > There appears to be a problem with XPT_DEV_MATCH CAM IOCTL calls. This > > > prevents a bunch of packages on 13.1-STABLE from working correctly. A > > > bug was filed and Mark J was kind enough to help diagnose the issue, > but > > > it's sitting in unassigned status. Can someone please assign it to the > > > correct group so it gets some attention? > > > > > > The FreeBSD bug: > > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264709 > > > > > > The offending commit ( I think? ): > > > > https://cgit.freebsd.org/src/commit/sys/cam/cam_ccb.h?h=stable/13&id=7d7168478380f08b3a7fd58ca7cf83182fae6850 > > > > -- > > Alexander Motin > > > > --000000000000ccade905e7656c8e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Aug 29, 2022 at 12:00 PM Mark= Johnston <markj@freebsd.org>= ; wrote:
On Tue,= Aug 23, 2022 at 09:44:48AM -0400, Alexander Motin wrote:
> Hi Matthew,
>
> I took a brief look on it and found that CAM compatibility code just <= br> > does not cover that IOCTL.=C2=A0 That is why when CAM version was bump= ed it
> cause the unexpected breakage.=C2=A0 Short term fix would be to rebuil= d the
> application to new CAM version, while for proper fix somebody would ha= ve
> to implement the compatibility code for that IOCTL.

I looked at this a bit more, and it seems trivial since
1) for periph drivers, CAMGETPASSTHRU ignores the input CCB, and
2) the CAM version bump from 0x19 to 0x1a does not affect XPT_GDEVLIST
=C2=A0 =C2=A0CCBs.

Note for instance that cam_compat_handle_0x19() is a no-op for
CAMGETPASSTHRU.=C2=A0 So, isn't the patch here sufficient?
https://reviews.freebsd.org/D36389

=
I believe the above patch should just work. I don't know if we nee= d to structure it
differently. I don't think so, though...

Warner

> On 22.08.2022 14:48, Matthew Grooms wrote:
> > There appears to be a problem with XPT_DEV_MATCH CAM IOCTL calls.= This
> > prevents a bunch of packages on 13.1-STABLE from working correctl= y. A
> > bug was filed and Mark J was kind enough to help diagnose the iss= ue, but
> > it's sitting in unassigned status. Can someone please assign = it to the
> > correct group so it gets some attention?
> >
> > The FreeBSD bug:
> > https://bugs.freebsd.org/bugzill= a/show_bug.cgi?id=3D264709
> >
> > The offending commit ( I think? ):
> > https://cgit.freebsd.org/src/commit/sys/cam/cam_= ccb.h?h=3Dstable/13&id=3D7d7168478380f08b3a7fd58ca7cf83182fae6850 <= br> >
> --
> Alexander Motin
>

--000000000000ccade905e7656c8e--