public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Jan Stancek <jstancek@redhat.com>
Cc: kernel-team@android.com, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] close_range: check for kernel support below 5.9
Date: Thu, 2 Feb 2023 09:20:04 +0100	[thread overview]
Message-ID: <Y9tyNEspOUlHMOGU@pevik> (raw)
In-Reply-To: <CAASaF6xQPu1ZgAFKMLjbLtcP4woq7+uQ_H4phB5TO_6CLsy_kQ@mail.gmail.com>

> On Thu, Feb 2, 2023 at 8:50 AM Petr Vorel <pvorel@suse.cz> wrote:

> > Hi Edward,

> > > Hi Petr,

> > > > > +++ b/include/lapi/close_range.h
> > > > > @@ -25,4 +25,17 @@ static inline int close_range(unsigned int fd, unsigned int max_fd,
> > > > >       return tst_syscall(__NR_close_range, fd, max_fd, flags);
> > > > >  }
> > > > >  # endif
> > > > > +
> > > > > +static inline void close_range_supported_by_kernel(void)
> > > > > +{
> > > > > +     long ret;
> > > > > +
> > > > > +     if ((tst_kvercmp(5, 9, 0)) < 0) {
> > > > > +             /* Check if the syscall is backported on an older kernel */
> > > > BTW what particular use case this fixed? Is it backported to some android
> > > > kernel? Or to some enterprise distro? Because I don't think kernel stable trees
> > > > accept new functionality, just fixes.

> > > Oops, should I use .min_kver instead?  It isn't backported on Android;
> > > I just wasn't sure what the right approach was.

> > Actually, looking into SLES kernel sources, we backported close_range() to SLES
> > 15-SP3 (bsc#1179090), which was 5.3.18 based. Thus you actually did good work :).

> > @Li, @Jan out of curiosity, was this backported to RHEL kernel as well?
> > It'd be useful to note that (one day we will be able to remove it once kernels
> > which backported are EOL).

> Yes, it's present in 8.4 since kernel-4.18.0-290.el8.

Jan, thanks a lot!

@Edward we have Hackweek at SUSE, I'll merge this on Monday,
noting the reason why to keep this instead simple .min_kver.

Kind regards,
Petr

> > Kind regards,
> > Petr

> > > Thanks,
> > > Edward



-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2023-02-02  8:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31  0:25 [LTP] [PATCH] close_range: check for kernel support below 5.9 Edward Liaw via ltp
2023-02-01 12:24 ` Petr Vorel
2023-02-01 18:31   ` Edward Liaw via ltp
2023-02-02  7:49     ` Petr Vorel
2023-02-02  8:11       ` Jan Stancek
2023-02-02  8:20         ` Petr Vorel [this message]
2023-02-03  2:03           ` Edward Liaw via ltp
2023-02-03 10:18             ` Petr Vorel
2023-02-03 10:25               ` Petr Vorel
2023-02-03 19:30                 ` Edward Liaw via ltp
2023-02-06  5:36                   ` Petr Vorel
2023-02-06 18:38                     ` Edward Liaw via ltp
2023-02-03  8:30 ` Li Wang

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=Y9tyNEspOUlHMOGU@pevik \
    --to=pvorel@suse.cz \
    --cc=jstancek@redhat.com \
    --cc=kernel-team@android.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox