lkml.org 
[lkml]   [2022]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/6] PCI: hv: Use vmbus_requestor to generate transaction IDs for VMbus hardening
> > @@ -2743,11 +2751,14 @@ static void hv_pci_onchannelcallback(void *context)
> > switch (desc->type) {
> > case VM_PKT_COMP:
> >
> > - /*
> > - * The host is trusted, and thus it's safe to interpret
> > - * this transaction ID as a pointer.
> > - */
> > - comp_packet = (struct pci_packet *)req_id;
> > + req_addr = chan->request_addr_callback(chan, req_id);
> > + if (req_addr == VMBUS_RQST_ERROR) {
> > + dev_warn_ratelimited(&hbus->hdev->device,
> > + "Invalid transaction ID %llx\n",
> > + req_id);
>
> This handling of a bad requestID error is a bit different from storvsc
> and netvsc. They both use dev_err(). Earlier in the storvsc and netvsc
> cases, I remember some discussion about whether to rate limit these errors,
> and evidently we decided not to. I think we should be consistent unless
> there's a specific reason not to.

Well, this 'error' is hardcoded in hv_compose_msi_msg() (as described in
patch #6). But no strong opinion really: let me replace with dev_err().

Thanks,
Andrea

\
 
 \ /
  Last update: 2022-04-08 18:34    [W:0.046 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site