All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/1] pty04: Fix build for kernel headers < v4.2-rc1
Date: Wed, 6 May 2020 17:47:24 +0200	[thread overview]
Message-ID: <20200506154724.GA19535@dell5510> (raw)
In-Reply-To: <20200506134858.23919-1-pvorel@suse.cz>

Hi all,

The struct added in 6b6b56cf3 ("pty04: Add SLCAN ldisc and check for CVE-2020-11494") uses
uint32_t, kernel version always used __u8. Richie, any reason to use uint32_t
instead of uint8_t? I does not fixes the problem, I'm just asking, whether
different size affect test coverage.

struct can_frame {
	canid_t can_id;
	uint32_t can_dlc;
	uint32_t __pad;
	uint32_t __res0;
	uint32_t __res1;
	uint32_t data[CAN_MAX_DLEN] __attribute__((aligned(8)));
};

struct can_frame {
	canid_t can_id;  /* 32 bit CAN_ID + EFF/RTR/ERR flags */
	__u8    can_dlc; /* frame payload length in byte (0 .. CAN_MAX_DLEN) */
	__u8    __pad;   /* padding */
	__u8    __res0;  /* reserved / padding */
	__u8    __res1;  /* reserved / padding */
	__u8    data[CAN_MAX_DLEN] __attribute__((aligned(8)));
};

Kind regards,
Petr

  parent reply	other threads:[~2020-05-06 15:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06 13:48 [LTP] [PATCH 1/1] pty04: Fix build for kernel headers < v4.2-rc1 Petr Vorel
2020-05-06 13:55 ` Cyril Hrubis
2020-05-06 14:00 ` Jan Stancek
2020-05-06 14:14   ` Petr Vorel
2020-05-06 14:45   ` Petr Vorel
2020-05-06 15:47 ` Petr Vorel [this message]
2020-05-06 15:56   ` Cyril Hrubis
2020-05-06 16:01     ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200506154724.GA19535@dell5510 \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.